e5e0e03d17f06881fe914ad5d09ab00cce743dab
[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-file-name=libc.a"` ;
2735   cygwin_include=`eval "dirname $cygwin_include"` ;
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     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2990 fi
2991
2992
2993
2994 if test "$unexec" = "unexaix.o"; then
2995   if   test "$dynamic" = "no"; then
2996   start_flags="-Wl,-bnso,-bnodelcsect"
2997   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2998   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2999     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3000   done
3001   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3002     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3003   done
3004   
3005 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3006 echo "configure:3007: checking for terminateAndUnload in -lC" >&5
3007 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3008
3009 xe_check_libs=" -lC "
3010 cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013 /* Override any gcc2 internal prototype to avoid an error.  */
3014 /* We use char because int might match the return type of a gcc2
3015     builtin and then its argument prototype would still apply.  */
3016 char terminateAndUnload();
3017
3018 int main() {
3019 terminateAndUnload()
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3023   rm -rf conftest*
3024   eval "ac_cv_lib_$ac_lib_var=yes"
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   eval "ac_cv_lib_$ac_lib_var=no"
3030 fi
3031 rm -f conftest*
3032 xe_check_libs=""
3033
3034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3035   echo "$ac_t""yes" 1>&6
3036   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3037 else
3038   echo "$ac_t""no" 1>&6
3039 fi
3040
3041
3042   fi
3043 elif test -n "$ld_text_start_addr"; then
3044   start_flags="-T $ld_text_start_addr -e __start"
3045 fi
3046
3047
3048
3049
3050 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3051  test -z "$linker" &&  linker='$(CC) -nostdlib'
3052  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3053 fi
3054 test "$GCC" != "yes" && lib_gcc=
3055
3056
3057
3058
3059
3060 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3061 if test -n "$site_libraries"; then
3062   for arg in $site_libraries; do
3063     case "$arg" in
3064      -* ) ;;
3065      * ) test -d "$arg" || \
3066            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3067        arg="-L${arg}" ;;
3068     esac
3069     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3070   done
3071 fi
3072
3073 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3074 if test -n "$site_includes"; then
3075   for arg in $site_includes; do
3076     case "$arg" in
3077       -* ) ;;
3078       * ) test -d "$arg" || \
3079            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3080       arg="-I${arg}" ;;
3081     esac
3082     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3083   done
3084 fi
3085
3086 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3087 if test -n "$site_prefixes"; then
3088   for dir in $site_prefixes; do
3089     lib_dir="${dir}/lib"
3090     inc_dir="${dir}/include"
3091     if test ! -d "$dir"; then
3092       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3093     elif test ! -d "$lib_dir"; then
3094       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3095     else
3096       if test -d "$inc_dir"; then
3097         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
3098       fi
3099       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
3100     fi
3101   done
3102 fi
3103
3104
3105 for dir in "/usr/ccs/lib"; do
3106   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
3107 done
3108
3109 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3110 if test -n "$site_runtime_libraries"; then
3111   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3112   export LD_RUN_PATH
3113 fi
3114
3115
3116
3117
3118
3119 if test -n "$add_runtime_path"; then :;
3120 elif test "$dynamic" = "no"; then add_runtime_path=no
3121 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3122 else case "$opsys" in
3123        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3124        * ) add_runtime_path=no ;;
3125      esac
3126 fi
3127
3128 if test "$add_runtime_path" = "yes"; then
3129       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3130 echo "configure:3131: checking "for runtime libraries flag"" >&5
3131   case "$opsys" in
3132     sol2 ) dash_r="-R" ;;
3133     decosf* | linux* | irix*) dash_r="-rpath " ;;
3134     *)
3135       dash_r=""
3136       for try_dash_r in "-R" "-R " "-rpath "; do
3137         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3138         
3139 if test "$GCC" = "yes"; then
3140   set x $xe_check_libs; shift; xe_check_libs=""
3141   while test -n "$1"; do
3142     case $1 in
3143       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3144       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3145       -Xlinker* ) ;;
3146       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3147     esac
3148     shift
3149   done
3150 fi
3151         cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154
3155 int main() {
3156
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3160   rm -rf conftest*
3161   dash_r="$try_dash_r"
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165 fi
3166 rm -f conftest*
3167         xe_check_libs=""
3168         test -n "$dash_r" && break
3169       done ;;
3170   esac
3171   if test -n "$dash_r";
3172     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3173     else echo "$ac_t""NONE" 1>&6
3174   fi
3175 fi
3176
3177 xe_add_unique_runpath_dir='
3178   xe_add_p=yes
3179   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3180   done
3181   if test "$xe_add_p" = "yes"; then
3182     test -n "$runpath" && runpath="${runpath}:"
3183     runpath="${runpath}${xe_runpath_dir}"
3184     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3185   fi'
3186
3187
3188
3189
3190 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3191     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3192   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3193   
3194         runpath="" runpath_dirs=""
3195   if test -n "$LD_RUN_PATH"; then
3196     runpath="$LD_RUN_PATH"
3197   elif test "$GCC" = "yes"; then
3198         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3199     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3200     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3201     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3202       case "$arg" in P,* | -L* | -R* )
3203         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3204           {
3205 xe_runpath_dir="$dir"
3206   test "$xe_runpath_dir" != "/lib"     -a \
3207         "$xe_runpath_dir" != "/usr/lib" -a \
3208         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3209   eval "$xe_add_unique_runpath_dir"
3210 }
3211         done ;;
3212       esac
3213     done
3214     ld_switch_run="$ld_switch_run_save"
3215     rm -f conftest*
3216   else
3217         for arg in $ld_switch_site $ld_switch_x_site; do
3218       case "$arg" in -L*) {
3219 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3220   test "$xe_runpath_dir" != "/lib"     -a \
3221         "$xe_runpath_dir" != "/usr/lib" -a \
3222         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3223   eval "$xe_add_unique_runpath_dir"
3224 };; esac
3225     done
3226             if test "$opsys $need_motif" = "sol2 yes"; then
3227       xe_runpath_dir="/opt/SUNWdt/lib";
3228       eval "$xe_add_unique_runpath_dir";
3229     fi
3230   fi 
3231   if test -n "$runpath"; then
3232     ld_switch_run="${dash_r}${runpath}"
3233     
3234 if test "$GCC" = "yes"; then
3235   set x $ld_switch_run; shift; ld_switch_run=""
3236   while test -n "$1"; do
3237     case $1 in
3238       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3239       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3240       -Xlinker* ) ;;
3241       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3242     esac
3243     shift
3244   done
3245 fi
3246     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3247   fi
3248 fi
3249
3250
3251
3252 GNU_MALLOC=yes
3253 if test "$with_dlmalloc" != "no"; then
3254         doug_lea_malloc=yes
3255 else
3256         doug_lea_malloc=no
3257 fi
3258 after_morecore_hook_exists=yes
3259 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3260 echo "configure:3261: checking for malloc_set_state" >&5
3261
3262 cat > conftest.$ac_ext <<EOF
3263 #line 3264 "configure"
3264 #include "confdefs.h"
3265 /* System header to define __stub macros and hopefully few prototypes,
3266     which can conflict with char malloc_set_state(); below.  */
3267 #include <assert.h>
3268 /* Override any gcc2 internal prototype to avoid an error.  */
3269 /* We use char because int might match the return type of a gcc2
3270     builtin and then its argument prototype would still apply.  */
3271 char malloc_set_state();
3272
3273 int main() {
3274
3275 /* The GNU C library defines this for functions which it implements
3276     to always fail with ENOSYS.  Some functions are actually named
3277     something starting with __ and the normal name is an alias.  */
3278 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3279 choke me
3280 #else
3281 malloc_set_state();
3282 #endif
3283
3284 ; return 0; }
3285 EOF
3286 if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3287   rm -rf conftest*
3288   eval "ac_cv_func_malloc_set_state=yes"
3289 else
3290   echo "configure: failed program was:" >&5
3291   cat conftest.$ac_ext >&5
3292   rm -rf conftest*
3293   eval "ac_cv_func_malloc_set_state=no"
3294 fi
3295 rm -f conftest*
3296
3297 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3298   echo "$ac_t""yes" 1>&6
3299   :
3300 else
3301   echo "$ac_t""no" 1>&6
3302 doug_lea_malloc=no
3303 fi
3304
3305 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3306 echo "configure:3307: checking whether __after_morecore_hook exists" >&5
3307 cat > conftest.$ac_ext <<EOF
3308 #line 3309 "configure"
3309 #include "confdefs.h"
3310 extern void (* __after_morecore_hook)();
3311 int main() {
3312 __after_morecore_hook = 0
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3316   rm -rf conftest*
3317   echo "$ac_t""yes" 1>&6
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   echo "$ac_t""no" 1>&6
3323    after_morecore_hook_exists=no
3324 fi
3325 rm -f conftest*
3326 if test "$system_malloc" = "yes" ; then
3327   GNU_MALLOC=no
3328   GNU_MALLOC_reason="
3329     - The GNU allocators don't work with this system configuration."
3330 elif test "$with_system_malloc" = "yes" ; then
3331   GNU_MALLOC=no
3332   GNU_MALLOC_reason="
3333     - User chose not to use GNU allocators."
3334 elif test "$with_debug_malloc" = "yes" ; then
3335   GNU_MALLOC=no
3336   GNU_MALLOC_reason="
3337     - User chose to use Debugging Malloc."
3338 fi
3339
3340 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3341   GNU_MALLOC_reason="
3342     - Using Doug Lea's new malloc from the GNU C Library."
3343   { test "$extra_verbose" = "yes" && cat << \EOF
3344     Defining DOUG_LEA_MALLOC
3345 EOF
3346 cat >> confdefs.h <<\EOF
3347 #define DOUG_LEA_MALLOC 1
3348 EOF
3349 }
3350
3351   if test "$after_morecore_hook_exists" = "no" ; then
3352     GNU_MALLOC_reason="
3353     - Using Doug Lea's new malloc from the Linux C Library."
3354     { test "$extra_verbose" = "yes" && cat << \EOF
3355     Defining _NO_MALLOC_WARNING_
3356 EOF
3357 cat >> confdefs.h <<\EOF
3358 #define _NO_MALLOC_WARNING_ 1
3359 EOF
3360 }
3361
3362   fi
3363 fi
3364
3365
3366
3367
3368 # Extract the first word of "ranlib", so it can be a program name with args.
3369 set dummy ranlib; ac_word=$2
3370 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3371 echo "configure:3372: checking for $ac_word" >&5
3372
3373 if test -n "$RANLIB"; then
3374   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3375 else
3376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3377   ac_dummy="$PATH"
3378   for ac_dir in $ac_dummy; do
3379     test -z "$ac_dir" && ac_dir=.
3380     if test -f $ac_dir/$ac_word; then
3381       ac_cv_prog_RANLIB="ranlib"
3382       break
3383     fi
3384   done
3385   IFS="$ac_save_ifs"
3386   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3387 fi
3388 RANLIB="$ac_cv_prog_RANLIB"
3389 if test -n "$RANLIB"; then
3390   echo "$ac_t""$RANLIB" 1>&6
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395 ac_aux_dir=
3396 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3397   if test -f $ac_dir/install-sh; then
3398     ac_aux_dir=$ac_dir
3399     ac_install_sh="$ac_aux_dir/install-sh -c"
3400     break
3401   elif test -f $ac_dir/install.sh; then
3402     ac_aux_dir=$ac_dir
3403     ac_install_sh="$ac_aux_dir/install.sh -c"
3404     break
3405   fi
3406 done
3407 if test -z "$ac_aux_dir"; then
3408   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3409 fi
3410 ac_config_guess=$ac_aux_dir/config.guess
3411 ac_config_sub=$ac_aux_dir/config.sub
3412 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3413
3414 # Find a good install program.  We prefer a C program (faster),
3415 # so one script is as good as another.  But avoid the broken or
3416 # incompatible versions:
3417 # SysV /etc/install, /usr/sbin/install
3418 # SunOS /usr/etc/install
3419 # IRIX /sbin/install
3420 # AIX /bin/install
3421 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3422 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3423 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3424 # ./install, which can be erroneously created by make from ./install.sh.
3425 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3426 echo "configure:3427: checking for a BSD compatible install" >&5
3427 if test -z "$INSTALL"; then
3428
3429   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3430   for ac_dir in $PATH; do
3431     # Account for people who put trailing slashes in PATH elements.
3432     case "$ac_dir/" in
3433     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3434     *)
3435       # OSF1 and SCO ODT 3.0 have their own names for install.
3436       # Don't use installbsd from OSF since it installs stuff as root
3437       # by default.
3438       for ac_prog in ginstall scoinst install; do
3439         if test -f $ac_dir/$ac_prog; then
3440           if test $ac_prog = install &&
3441             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3442             # AIX install.  It has an incompatible calling convention.
3443             :
3444           else
3445             ac_cv_path_install="$ac_dir/$ac_prog -c"
3446             break 2
3447           fi
3448         fi
3449       done
3450       ;;
3451     esac
3452   done
3453   IFS="$ac_save_IFS"
3454
3455   if test "${ac_cv_path_install+set}" = set; then
3456     INSTALL="$ac_cv_path_install"
3457   else
3458     # As a last resort, use the slow shell script.  We don't cache a
3459     # path for INSTALL within a source directory, because that will
3460     # break other packages using the cache if that directory is
3461     # removed, or if the path is relative.
3462     INSTALL="$ac_install_sh"
3463   fi
3464 fi
3465 echo "$ac_t""$INSTALL" 1>&6
3466
3467 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3468 # It thinks the first close brace ends the variable substitution.
3469 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3470
3471 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3472
3473 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3474
3475 for ac_prog in 'bison -y' byacc
3476 do
3477 # Extract the first word of "$ac_prog", so it can be a program name with args.
3478 set dummy $ac_prog; ac_word=$2
3479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3480 echo "configure:3481: checking for $ac_word" >&5
3481
3482 if test -n "$YACC"; then
3483   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3484 else
3485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3486   ac_dummy="$PATH"
3487   for ac_dir in $ac_dummy; do
3488     test -z "$ac_dir" && ac_dir=.
3489     if test -f $ac_dir/$ac_word; then
3490       ac_cv_prog_YACC="$ac_prog"
3491       break
3492     fi
3493   done
3494   IFS="$ac_save_ifs"
3495 fi
3496 YACC="$ac_cv_prog_YACC"
3497 if test -n "$YACC"; then
3498   echo "$ac_t""$YACC" 1>&6
3499 else
3500   echo "$ac_t""no" 1>&6
3501 fi
3502
3503 test -n "$YACC" && break
3504 done
3505 test -n "$YACC" || YACC="yacc"
3506
3507
3508 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 
3509 do
3510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3512 echo "configure:3513: checking for $ac_hdr" >&5
3513
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 #include <$ac_hdr>
3518 EOF
3519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3520 { (eval echo configure:3521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3522 if test -z "$ac_err"; then
3523   rm -rf conftest*
3524   eval "ac_cv_header_$ac_safe=yes"
3525 else
3526   echo "$ac_err" >&5
3527   echo "configure: failed program was:" >&5
3528   cat conftest.$ac_ext >&5
3529   rm -rf conftest*
3530   eval "ac_cv_header_$ac_safe=no"
3531 fi
3532 rm -f conftest*
3533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3534   echo "$ac_t""yes" 1>&6
3535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3536   { test "$extra_verbose" = "yes" && cat << EOF
3537     Defining $ac_tr_hdr
3538 EOF
3539 cat >> confdefs.h <<EOF
3540 #define $ac_tr_hdr 1
3541 EOF
3542 }
3543  
3544 else
3545   echo "$ac_t""no" 1>&6
3546 fi
3547 done
3548
3549 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3550 echo "configure:3551: checking for sys/wait.h that is POSIX.1 compatible" >&5
3551
3552 cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555 #include <sys/types.h>
3556 #include <sys/wait.h>
3557 #ifndef WEXITSTATUS
3558 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3559 #endif
3560 #ifndef WIFEXITED
3561 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3562 #endif
3563 int main() {
3564 int s;
3565 wait (&s);
3566 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3567 ; return 0; }
3568 EOF
3569 if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3570   rm -rf conftest*
3571   ac_cv_header_sys_wait_h=yes
3572 else
3573   echo "configure: failed program was:" >&5
3574   cat conftest.$ac_ext >&5
3575   rm -rf conftest*
3576   ac_cv_header_sys_wait_h=no
3577 fi
3578 rm -f conftest*
3579
3580 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3581 if test $ac_cv_header_sys_wait_h = yes; then
3582   { test "$extra_verbose" = "yes" && cat << \EOF
3583     Defining HAVE_SYS_WAIT_H
3584 EOF
3585 cat >> confdefs.h <<\EOF
3586 #define HAVE_SYS_WAIT_H 1
3587 EOF
3588 }
3589
3590 fi
3591
3592 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3593 echo "configure:3594: checking for ANSI C header files" >&5
3594
3595 cat > conftest.$ac_ext <<EOF
3596 #line 3597 "configure"
3597 #include "confdefs.h"
3598 #include <stdlib.h>
3599 #include <stdarg.h>
3600 #include <string.h>
3601 #include <float.h>
3602 EOF
3603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3604 { (eval echo configure:3605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3606 if test -z "$ac_err"; then
3607   rm -rf conftest*
3608   ac_cv_header_stdc=yes
3609 else
3610   echo "$ac_err" >&5
3611   echo "configure: failed program was:" >&5
3612   cat conftest.$ac_ext >&5
3613   rm -rf conftest*
3614   ac_cv_header_stdc=no
3615 fi
3616 rm -f conftest*
3617
3618 if test $ac_cv_header_stdc = yes; then
3619   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3620 cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623 #include <string.h>
3624 EOF
3625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3626   egrep "memchr" >/dev/null 2>&1; then
3627   :
3628 else
3629   rm -rf conftest*
3630   ac_cv_header_stdc=no
3631 fi
3632 rm -f conftest*
3633
3634 fi
3635
3636 if test $ac_cv_header_stdc = yes; then
3637   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <stdlib.h>
3642 EOF
3643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3644   egrep "free" >/dev/null 2>&1; then
3645   :
3646 else
3647   rm -rf conftest*
3648   ac_cv_header_stdc=no
3649 fi
3650 rm -f conftest*
3651
3652 fi
3653
3654 if test $ac_cv_header_stdc = yes; then
3655   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3656 cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659 #include <ctype.h>
3660 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3661 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3662 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3663 int main () { int i; for (i = 0; i < 256; i++)
3664 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3665 exit (0); }
3666
3667 EOF
3668 if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3669 then
3670   :
3671 else
3672   conftest_rc="$?"
3673   echo "configure: failed program was:" >&5
3674   cat conftest.$ac_ext >&5
3675   rm -fr conftest*
3676   ac_cv_header_stdc=no
3677 fi
3678 rm -fr conftest*
3679 fi
3680
3681 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3682 if test $ac_cv_header_stdc = yes; then
3683   { test "$extra_verbose" = "yes" && cat << \EOF
3684     Defining STDC_HEADERS
3685 EOF
3686 cat >> confdefs.h <<\EOF
3687 #define STDC_HEADERS 1
3688 EOF
3689 }
3690
3691 fi
3692
3693 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3694 echo "configure:3695: checking whether time.h and sys/time.h may both be included" >&5
3695
3696 cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699 #include <sys/types.h>
3700 #include <sys/time.h>
3701 #include <time.h>
3702 int main() {
3703 struct tm *tp;
3704 ; return 0; }
3705 EOF
3706 if { (eval echo configure:3707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3707   rm -rf conftest*
3708   ac_cv_header_time=yes
3709 else
3710   echo "configure: failed program was:" >&5
3711   cat conftest.$ac_ext >&5
3712   rm -rf conftest*
3713   ac_cv_header_time=no
3714 fi
3715 rm -f conftest*
3716
3717 echo "$ac_t""$ac_cv_header_time" 1>&6
3718 if test $ac_cv_header_time = yes; then
3719   { test "$extra_verbose" = "yes" && cat << \EOF
3720     Defining TIME_WITH_SYS_TIME
3721 EOF
3722 cat >> confdefs.h <<\EOF
3723 #define TIME_WITH_SYS_TIME 1
3724 EOF
3725 }
3726
3727 fi
3728
3729 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3730 echo "configure:3731: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3731
3732 cat > conftest.$ac_ext <<EOF
3733 #line 3734 "configure"
3734 #include "confdefs.h"
3735 #include <sys/types.h>
3736 #include <signal.h>
3737 /* NetBSD declares sys_siglist in unistd.h.  */
3738 #ifdef HAVE_UNISTD_H
3739 #include <unistd.h>
3740 #endif
3741 int main() {
3742 char *msg = *(sys_siglist + 1);
3743 ; return 0; }
3744 EOF
3745 if { (eval echo configure:3746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3746   rm -rf conftest*
3747   ac_cv_decl_sys_siglist=yes
3748 else
3749   echo "configure: failed program was:" >&5
3750   cat conftest.$ac_ext >&5
3751   rm -rf conftest*
3752   ac_cv_decl_sys_siglist=no
3753 fi
3754 rm -f conftest*
3755
3756 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3757 if test $ac_cv_decl_sys_siglist = yes; then
3758   { test "$extra_verbose" = "yes" && cat << \EOF
3759     Defining SYS_SIGLIST_DECLARED
3760 EOF
3761 cat >> confdefs.h <<\EOF
3762 #define SYS_SIGLIST_DECLARED 1
3763 EOF
3764 }
3765
3766 fi
3767
3768
3769
3770 echo $ac_n "checking for utime""... $ac_c" 1>&6
3771 echo "configure:3772: checking for utime" >&5
3772 cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775 #include <sys/types.h>
3776 #include <utime.h>
3777 int main() {
3778 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3782   rm -rf conftest*
3783   echo "$ac_t""yes" 1>&6
3784    { test "$extra_verbose" = "yes" && cat << \EOF
3785     Defining HAVE_UTIME
3786 EOF
3787 cat >> confdefs.h <<\EOF
3788 #define HAVE_UTIME 1
3789 EOF
3790 }
3791
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -rf conftest*
3796   echo "$ac_t""no" 1>&6
3797       for ac_func in utimes
3798 do
3799 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3800 echo "configure:3801: checking for $ac_func" >&5
3801
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 /* System header to define __stub macros and hopefully few prototypes,
3806     which can conflict with char $ac_func(); below.  */
3807 #include <assert.h>
3808 /* Override any gcc2 internal prototype to avoid an error.  */
3809 /* We use char because int might match the return type of a gcc2
3810     builtin and then its argument prototype would still apply.  */
3811 char $ac_func();
3812
3813 int main() {
3814
3815 /* The GNU C library defines this for functions which it implements
3816     to always fail with ENOSYS.  Some functions are actually named
3817     something starting with __ and the normal name is an alias.  */
3818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3819 choke me
3820 #else
3821 $ac_func();
3822 #endif
3823
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827   rm -rf conftest*
3828   eval "ac_cv_func_$ac_func=yes"
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   eval "ac_cv_func_$ac_func=no"
3834 fi
3835 rm -f conftest*
3836
3837 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3838   echo "$ac_t""yes" 1>&6
3839     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3840   { test "$extra_verbose" = "yes" && cat << EOF
3841     Defining $ac_tr_func
3842 EOF
3843 cat >> confdefs.h <<EOF
3844 #define $ac_tr_func 1
3845 EOF
3846 }
3847  
3848 else
3849   echo "$ac_t""no" 1>&6
3850 fi
3851 done
3852
3853 fi
3854 rm -f conftest*
3855
3856
3857 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3858 echo "configure:3859: checking return type of signal handlers" >&5
3859
3860 cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 #include <sys/types.h>
3864 #include <signal.h>
3865 #ifdef signal
3866 #undef signal
3867 #endif
3868 #ifdef __cplusplus
3869 extern "C" void (*signal (int, void (*)(int)))(int);
3870 #else
3871 void (*signal ()) ();
3872 #endif
3873
3874 int main() {
3875 int i;
3876 ; return 0; }
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3879   rm -rf conftest*
3880   ac_cv_type_signal=void
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   ac_cv_type_signal=int
3886 fi
3887 rm -f conftest*
3888
3889 echo "$ac_t""$ac_cv_type_signal" 1>&6
3890 { test "$extra_verbose" = "yes" && cat << EOF
3891     Defining RETSIGTYPE = $ac_cv_type_signal
3892 EOF
3893 cat >> confdefs.h <<EOF
3894 #define RETSIGTYPE $ac_cv_type_signal
3895 EOF
3896 }
3897
3898
3899 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3900 echo "configure:3901: checking for size_t" >&5
3901
3902 cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 #include <sys/types.h>
3906 #if STDC_HEADERS
3907 #include <stdlib.h>
3908 #include <stddef.h>
3909 #endif
3910 EOF
3911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3912   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3913   rm -rf conftest*
3914   ac_cv_type_size_t=yes
3915 else
3916   rm -rf conftest*
3917   ac_cv_type_size_t=no
3918 fi
3919 rm -f conftest*
3920
3921 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3922 if test $ac_cv_type_size_t = no; then
3923   { test "$extra_verbose" = "yes" && cat << \EOF
3924     Defining size_t = unsigned
3925 EOF
3926 cat >> confdefs.h <<\EOF
3927 #define size_t unsigned
3928 EOF
3929 }
3930
3931 fi
3932
3933 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3934 echo "configure:3935: checking for pid_t" >&5
3935
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #include <sys/types.h>
3940 #if STDC_HEADERS
3941 #include <stdlib.h>
3942 #include <stddef.h>
3943 #endif
3944 EOF
3945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3946   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3947   rm -rf conftest*
3948   ac_cv_type_pid_t=yes
3949 else
3950   rm -rf conftest*
3951   ac_cv_type_pid_t=no
3952 fi
3953 rm -f conftest*
3954
3955 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3956 if test $ac_cv_type_pid_t = no; then
3957   { test "$extra_verbose" = "yes" && cat << \EOF
3958     Defining pid_t = int
3959 EOF
3960 cat >> confdefs.h <<\EOF
3961 #define pid_t int
3962 EOF
3963 }
3964
3965 fi
3966
3967 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3968 echo "configure:3969: checking for uid_t in sys/types.h" >&5
3969
3970 cat > conftest.$ac_ext <<EOF
3971 #line 3972 "configure"
3972 #include "confdefs.h"
3973 #include <sys/types.h>
3974 EOF
3975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3976   egrep "uid_t" >/dev/null 2>&1; then
3977   rm -rf conftest*
3978   ac_cv_type_uid_t=yes
3979 else
3980   rm -rf conftest*
3981   ac_cv_type_uid_t=no
3982 fi
3983 rm -f conftest*
3984
3985
3986 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3987 if test $ac_cv_type_uid_t = no; then
3988   { test "$extra_verbose" = "yes" && cat << \EOF
3989     Defining uid_t = int
3990 EOF
3991 cat >> confdefs.h <<\EOF
3992 #define uid_t int
3993 EOF
3994 }
3995
3996   { test "$extra_verbose" = "yes" && cat << \EOF
3997     Defining gid_t = int
3998 EOF
3999 cat >> confdefs.h <<\EOF
4000 #define gid_t int
4001 EOF
4002 }
4003
4004 fi
4005
4006 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4007 echo "configure:4008: checking for mode_t" >&5
4008
4009 cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4012 #include <sys/types.h>
4013 #if STDC_HEADERS
4014 #include <stdlib.h>
4015 #include <stddef.h>
4016 #endif
4017 EOF
4018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4019   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4020   rm -rf conftest*
4021   ac_cv_type_mode_t=yes
4022 else
4023   rm -rf conftest*
4024   ac_cv_type_mode_t=no
4025 fi
4026 rm -f conftest*
4027
4028 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4029 if test $ac_cv_type_mode_t = no; then
4030   { test "$extra_verbose" = "yes" && cat << \EOF
4031     Defining mode_t = int
4032 EOF
4033 cat >> confdefs.h <<\EOF
4034 #define mode_t int
4035 EOF
4036 }
4037
4038 fi
4039
4040 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4041 echo "configure:4042: checking for off_t" >&5
4042
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <sys/types.h>
4047 #if STDC_HEADERS
4048 #include <stdlib.h>
4049 #include <stddef.h>
4050 #endif
4051 EOF
4052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4053   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4054   rm -rf conftest*
4055   ac_cv_type_off_t=yes
4056 else
4057   rm -rf conftest*
4058   ac_cv_type_off_t=no
4059 fi
4060 rm -f conftest*
4061
4062 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4063 if test $ac_cv_type_off_t = no; then
4064   { test "$extra_verbose" = "yes" && cat << \EOF
4065     Defining off_t = long
4066 EOF
4067 cat >> confdefs.h <<\EOF
4068 #define off_t long
4069 EOF
4070 }
4071
4072 fi
4073
4074 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4075 echo "configure:4076: checking for ssize_t" >&5
4076
4077 cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <sys/types.h>
4081 #if STDC_HEADERS
4082 #include <stdlib.h>
4083 #include <stddef.h>
4084 #endif
4085 EOF
4086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4087   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4088   rm -rf conftest*
4089   ac_cv_type_ssize_t=yes
4090 else
4091   rm -rf conftest*
4092   ac_cv_type_ssize_t=no
4093 fi
4094 rm -f conftest*
4095
4096 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4097 if test $ac_cv_type_ssize_t = no; then
4098   { test "$extra_verbose" = "yes" && cat << \EOF
4099     Defining ssize_t = int
4100 EOF
4101 cat >> confdefs.h <<\EOF
4102 #define ssize_t int
4103 EOF
4104 }
4105
4106 fi
4107
4108
4109 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4110 echo "configure:4111: checking for socklen_t" >&5
4111 cat > conftest.$ac_ext <<EOF
4112 #line 4113 "configure"
4113 #include "confdefs.h"
4114 #include <sys/types.h>
4115 #include <sys/socket.h>
4116 socklen_t x;
4117
4118 int main() {
4119
4120 ; return 0; }
4121 EOF
4122 if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4123   rm -rf conftest*
4124   echo "$ac_t""yes" 1>&6
4125 else
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -rf conftest*
4129   
4130 cat > conftest.$ac_ext <<EOF
4131 #line 4132 "configure"
4132 #include "confdefs.h"
4133 #include <sys/types.h>
4134 #include <sys/socket.h>
4135 int accept (int, struct sockaddr *, size_t *);
4136
4137 int main() {
4138
4139 ; return 0; }
4140 EOF
4141 if { (eval echo configure:4142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4142   rm -rf conftest*
4143   
4144 echo "$ac_t""size_t" 1>&6
4145 { test "$extra_verbose" = "yes" && cat << \EOF
4146     Defining socklen_t = size_t
4147 EOF
4148 cat >> confdefs.h <<\EOF
4149 #define socklen_t size_t
4150 EOF
4151 }
4152
4153 else
4154   echo "configure: failed program was:" >&5
4155   cat conftest.$ac_ext >&5
4156   rm -rf conftest*
4157   
4158 echo "$ac_t""int" 1>&6
4159 { test "$extra_verbose" = "yes" && cat << \EOF
4160     Defining socklen_t = int
4161 EOF
4162 cat >> confdefs.h <<\EOF
4163 #define socklen_t int
4164 EOF
4165 }
4166
4167 fi
4168 rm -f conftest*
4169 fi
4170 rm -f conftest*
4171
4172 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4173 echo "configure:4174: checking for struct timeval" >&5
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 #ifdef TIME_WITH_SYS_TIME
4178 #include <sys/time.h>
4179 #include <time.h>
4180 #else
4181 #ifdef HAVE_SYS_TIME_H
4182 #include <sys/time.h>
4183 #else
4184 #include <time.h>
4185 #endif
4186 #endif
4187 int main() {
4188 static struct timeval x; x.tv_sec = x.tv_usec;
4189 ; return 0; }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4192   rm -rf conftest*
4193   echo "$ac_t""yes" 1>&6
4194   HAVE_TIMEVAL=yes
4195   { test "$extra_verbose" = "yes" && cat << \EOF
4196     Defining HAVE_TIMEVAL
4197 EOF
4198 cat >> confdefs.h <<\EOF
4199 #define HAVE_TIMEVAL 1
4200 EOF
4201 }
4202
4203 else
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   echo "$ac_t""no" 1>&6
4208    HAVE_TIMEVAL=no
4209 fi
4210 rm -f conftest*
4211
4212 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4213 echo "configure:4214: checking whether struct tm is in sys/time.h or time.h" >&5
4214
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <sys/types.h>
4219 #include <time.h>
4220 int main() {
4221 struct tm *tp; tp->tm_sec;
4222 ; return 0; }
4223 EOF
4224 if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4225   rm -rf conftest*
4226   ac_cv_struct_tm=time.h
4227 else
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   ac_cv_struct_tm=sys/time.h
4232 fi
4233 rm -f conftest*
4234
4235 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4236 if test $ac_cv_struct_tm = sys/time.h; then
4237   { test "$extra_verbose" = "yes" && cat << \EOF
4238     Defining TM_IN_SYS_TIME
4239 EOF
4240 cat >> confdefs.h <<\EOF
4241 #define TM_IN_SYS_TIME 1
4242 EOF
4243 }
4244
4245 fi
4246
4247 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4248 echo "configure:4249: checking for tm_zone in struct tm" >&5
4249
4250 cat > conftest.$ac_ext <<EOF
4251 #line 4252 "configure"
4252 #include "confdefs.h"
4253 #include <sys/types.h>
4254 #include <$ac_cv_struct_tm>
4255 int main() {
4256 struct tm tm; tm.tm_zone;
4257 ; return 0; }
4258 EOF
4259 if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4260   rm -rf conftest*
4261   ac_cv_struct_tm_zone=yes
4262 else
4263   echo "configure: failed program was:" >&5
4264   cat conftest.$ac_ext >&5
4265   rm -rf conftest*
4266   ac_cv_struct_tm_zone=no
4267 fi
4268 rm -f conftest*
4269
4270 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4271 if test "$ac_cv_struct_tm_zone" = yes; then
4272   { test "$extra_verbose" = "yes" && cat << \EOF
4273     Defining HAVE_TM_ZONE
4274 EOF
4275 cat >> confdefs.h <<\EOF
4276 #define HAVE_TM_ZONE 1
4277 EOF
4278 }
4279
4280 else
4281   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4282 echo "configure:4283: checking for tzname" >&5
4283
4284 cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <time.h>
4288 #ifndef tzname /* For SGI.  */
4289 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4290 #endif
4291 int main() {
4292 atoi(*tzname);
4293 ; return 0; }
4294 EOF
4295 if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4296   rm -rf conftest*
4297   ac_cv_var_tzname=yes
4298 else
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   ac_cv_var_tzname=no
4303 fi
4304 rm -f conftest*
4305
4306 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4307   if test $ac_cv_var_tzname = yes; then
4308     { test "$extra_verbose" = "yes" && cat << \EOF
4309     Defining HAVE_TZNAME
4310 EOF
4311 cat >> confdefs.h <<\EOF
4312 #define HAVE_TZNAME 1
4313 EOF
4314 }
4315
4316   fi
4317 fi
4318
4319
4320 echo $ac_n "checking for working const""... $ac_c" 1>&6
4321 echo "configure:4322: checking for working const" >&5
4322
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326
4327 int main() {
4328
4329 /* Ultrix mips cc rejects this.  */
4330 typedef int charset[2]; const charset x;
4331 /* SunOS 4.1.1 cc rejects this.  */
4332 char const *const *ccp;
4333 char **p;
4334 /* NEC SVR4.0.2 mips cc rejects this.  */
4335 struct point {int x, y;};
4336 static struct point const zero = {0,0};
4337 /* AIX XL C 1.02.0.0 rejects this.
4338    It does not let you subtract one const X* pointer from another in an arm
4339    of an if-expression whose if-part is not a constant expression */
4340 const char *g = "string";
4341 ccp = &g + (g ? g-g : 0);
4342 /* HPUX 7.0 cc rejects these. */
4343 ++ccp;
4344 p = (char**) ccp;
4345 ccp = (char const *const *) p;
4346 { /* SCO 3.2v4 cc rejects this.  */
4347   char *t;
4348   char const *s = 0 ? (char *) 0 : (char const *) 0;
4349
4350   *t++ = 0;
4351 }
4352 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4353   int x[] = {25, 17};
4354   const int *foo = &x[0];
4355   ++foo;
4356 }
4357 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4358   typedef const int *iptr;
4359   iptr p = 0;
4360   ++p;
4361 }
4362 { /* AIX XL C 1.02.0.0 rejects this saying
4363      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4364   struct s { int j; const int *ap[3]; };
4365   struct s *b; b->j = 5;
4366 }
4367 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4368   const int foo = 10;
4369 }
4370
4371 ; return 0; }
4372 EOF
4373 if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4374   rm -rf conftest*
4375   ac_cv_c_const=yes
4376 else
4377   echo "configure: failed program was:" >&5
4378   cat conftest.$ac_ext >&5
4379   rm -rf conftest*
4380   ac_cv_c_const=no
4381 fi
4382 rm -f conftest*
4383
4384 echo "$ac_t""$ac_cv_c_const" 1>&6
4385 if test $ac_cv_c_const = no; then
4386   { test "$extra_verbose" = "yes" && cat << \EOF
4387     Defining const = 
4388 EOF
4389 cat >> confdefs.h <<\EOF
4390 #define const 
4391 EOF
4392 }
4393
4394 fi
4395
4396
4397 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4398 echo "configure:4399: checking whether ${MAKE-make} sets \${MAKE}" >&5
4399 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4400
4401 cat > conftestmake <<\EOF
4402 all:
4403         @echo 'ac_maketemp="${MAKE}"'
4404 EOF
4405 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4406 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4407 if test -n "$ac_maketemp"; then
4408   eval ac_cv_prog_make_${ac_make}_set=yes
4409 else
4410   eval ac_cv_prog_make_${ac_make}_set=no
4411 fi
4412 rm -f conftestmake
4413 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4414   echo "$ac_t""yes" 1>&6
4415   SET_MAKE=
4416 else
4417   echo "$ac_t""no" 1>&6
4418   SET_MAKE="MAKE=${MAKE-make}"
4419 fi
4420
4421
4422 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4423 echo "configure:4424: checking whether byte ordering is bigendian" >&5
4424
4425 ac_cv_c_bigendian=unknown
4426 # See if sys/param.h defines the BYTE_ORDER macro.
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <sys/types.h>
4431 #include <sys/param.h>
4432 int main() {
4433
4434 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4435  bogus endian macros
4436 #endif
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4440   rm -rf conftest*
4441   # It does; now see whether it defined to BIG_ENDIAN or not.
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 #include <sys/types.h>
4446 #include <sys/param.h>
4447 int main() {
4448
4449 #if BYTE_ORDER != BIG_ENDIAN
4450  not big endian
4451 #endif
4452 ; return 0; }
4453 EOF
4454 if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4455   rm -rf conftest*
4456   ac_cv_c_bigendian=yes
4457 else
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460   rm -rf conftest*
4461   ac_cv_c_bigendian=no
4462 fi
4463 rm -f conftest*
4464 else
4465   echo "configure: failed program was:" >&5
4466   cat conftest.$ac_ext >&5
4467 fi
4468 rm -f conftest*
4469 if test $ac_cv_c_bigendian = unknown; then
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473 main () {
4474   /* Are we little or big endian?  From Harbison&Steele.  */
4475   union
4476   {
4477     long l;
4478     char c[sizeof (long)];
4479   } u;
4480   u.l = 1;
4481   exit (u.c[sizeof (long) - 1] == 1);
4482 }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4485 then
4486   ac_cv_c_bigendian=no
4487 else
4488   conftest_rc="$?"
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491   rm -fr conftest*
4492   ac_cv_c_bigendian=yes
4493 fi
4494 rm -fr conftest*
4495 fi
4496
4497 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4498 if test $ac_cv_c_bigendian = yes; then
4499   { test "$extra_verbose" = "yes" && cat << \EOF
4500     Defining WORDS_BIGENDIAN
4501 EOF
4502 cat >> confdefs.h <<\EOF
4503 #define WORDS_BIGENDIAN 1
4504 EOF
4505 }
4506
4507 fi
4508
4509
4510 echo $ac_n "checking size of short""... $ac_c" 1>&6
4511 echo "configure:4512: checking size of short" >&5
4512
4513 cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <stdio.h>
4517 main()
4518 {
4519   FILE *f=fopen("conftestval", "w");
4520   if (!f) exit(1);
4521   fprintf(f, "%d\n", sizeof(short));
4522   exit(0);
4523 }
4524 EOF
4525 if { (eval echo configure:4526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4526 then
4527   ac_cv_sizeof_short=`cat conftestval`
4528 else
4529   conftest_rc="$?"
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -fr conftest*
4533   ac_cv_sizeof_short=0
4534 fi
4535 rm -fr conftest*
4536 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4537 { test "$extra_verbose" = "yes" && cat << EOF
4538     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4539 EOF
4540 cat >> confdefs.h <<EOF
4541 #define SIZEOF_SHORT $ac_cv_sizeof_short
4542 EOF
4543 }
4544
4545
4546 if test "$ac_cv_sizeof_short" = 0; then
4547   echo ""
4548   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4549   echo "*** PANIC *** Please examine config.log for compilation errors."
4550   exit 1
4551 fi
4552 echo $ac_n "checking size of int""... $ac_c" 1>&6
4553 echo "configure:4554: checking size of int" >&5
4554
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <stdio.h>
4559 main()
4560 {
4561   FILE *f=fopen("conftestval", "w");
4562   if (!f) exit(1);
4563   fprintf(f, "%d\n", sizeof(int));
4564   exit(0);
4565 }
4566 EOF
4567 if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4568 then
4569   ac_cv_sizeof_int=`cat conftestval`
4570 else
4571   conftest_rc="$?"
4572   echo "configure: failed program was:" >&5
4573   cat conftest.$ac_ext >&5
4574   rm -fr conftest*
4575   ac_cv_sizeof_int=0
4576 fi
4577 rm -fr conftest*
4578 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4579 { test "$extra_verbose" = "yes" && cat << EOF
4580     Defining SIZEOF_INT = $ac_cv_sizeof_int
4581 EOF
4582 cat >> confdefs.h <<EOF
4583 #define SIZEOF_INT $ac_cv_sizeof_int
4584 EOF
4585 }
4586
4587
4588 echo $ac_n "checking size of long""... $ac_c" 1>&6
4589 echo "configure:4590: checking size of long" >&5
4590
4591 cat > conftest.$ac_ext <<EOF
4592 #line 4593 "configure"
4593 #include "confdefs.h"
4594 #include <stdio.h>
4595 main()
4596 {
4597   FILE *f=fopen("conftestval", "w");
4598   if (!f) exit(1);
4599   fprintf(f, "%d\n", sizeof(long));
4600   exit(0);
4601 }
4602 EOF
4603 if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4604 then
4605   ac_cv_sizeof_long=`cat conftestval`
4606 else
4607   conftest_rc="$?"
4608   echo "configure: failed program was:" >&5
4609   cat conftest.$ac_ext >&5
4610   rm -fr conftest*
4611   ac_cv_sizeof_long=0
4612 fi
4613 rm -fr conftest*
4614 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4615 { test "$extra_verbose" = "yes" && cat << EOF
4616     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4617 EOF
4618 cat >> confdefs.h <<EOF
4619 #define SIZEOF_LONG $ac_cv_sizeof_long
4620 EOF
4621 }
4622
4623
4624 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4625 echo "configure:4626: checking size of long long" >&5
4626
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630 #include <stdio.h>
4631 main()
4632 {
4633   FILE *f=fopen("conftestval", "w");
4634   if (!f) exit(1);
4635   fprintf(f, "%d\n", sizeof(long long));
4636   exit(0);
4637 }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4640 then
4641   ac_cv_sizeof_long_long=`cat conftestval`
4642 else
4643   conftest_rc="$?"
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -fr conftest*
4647   ac_cv_sizeof_long_long=0
4648 fi
4649 rm -fr conftest*
4650 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4651 { test "$extra_verbose" = "yes" && cat << EOF
4652     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4653 EOF
4654 cat >> confdefs.h <<EOF
4655 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4656 EOF
4657 }
4658
4659
4660 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4661 echo "configure:4662: checking size of void *" >&5
4662
4663 cat > conftest.$ac_ext <<EOF
4664 #line 4665 "configure"
4665 #include "confdefs.h"
4666 #include <stdio.h>
4667 main()
4668 {
4669   FILE *f=fopen("conftestval", "w");
4670   if (!f) exit(1);
4671   fprintf(f, "%d\n", sizeof(void *));
4672   exit(0);
4673 }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4676 then
4677   ac_cv_sizeof_void_p=`cat conftestval`
4678 else
4679   conftest_rc="$?"
4680   echo "configure: failed program was:" >&5
4681   cat conftest.$ac_ext >&5
4682   rm -fr conftest*
4683   ac_cv_sizeof_void_p=0
4684 fi
4685 rm -fr conftest*
4686 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4687 { test "$extra_verbose" = "yes" && cat << EOF
4688     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4689 EOF
4690 cat >> confdefs.h <<EOF
4691 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4692 EOF
4693 }
4694
4695
4696
4697 case $opsys in
4698   cygwin* ) cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 #include <cygwin/types.h>
4702 EOF
4703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4704   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4705   rm -rf conftest*
4706   echo "$ac_t""yes" 1>&6
4707                              { test "$extra_verbose" = "yes" && cat << \EOF
4708     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4709 EOF
4710 cat >> confdefs.h <<\EOF
4711 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4712 EOF
4713 }
4714
4715 else
4716   rm -rf conftest*
4717   echo "$ac_t""no" 1>&6
4718 fi
4719 rm -f conftest*
4720  ;;
4721 esac
4722
4723 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4724 echo "configure:4725: checking for long file names" >&5
4725
4726 ac_cv_sys_long_file_names=yes
4727 # Test for long file names in all the places we know might matter:
4728 #      .                the current directory, where building will happen
4729 #      $prefix/lib      where we will be installing things
4730 #      $exec_prefix/lib likewise
4731 # eval it to expand exec_prefix.
4732 #      $TMPDIR          if set, where it might want to write temporary files
4733 # if $TMPDIR is not set:
4734 #      /tmp             where it might want to write temporary files
4735 #      /var/tmp         likewise
4736 #      /usr/tmp         likewise
4737 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4738   ac_tmpdirs="$TMPDIR"
4739 else
4740   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4741 fi
4742 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4743   test -d $ac_dir || continue
4744   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4745   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4746   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4747   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4748   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4749     ac_cv_sys_long_file_names=no
4750     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4751     break
4752   fi
4753   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4754 done
4755
4756 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4757 if test $ac_cv_sys_long_file_names = yes; then
4758   { test "$extra_verbose" = "yes" && cat << \EOF
4759     Defining HAVE_LONG_FILE_NAMES
4760 EOF
4761 cat >> confdefs.h <<\EOF
4762 #define HAVE_LONG_FILE_NAMES 1
4763 EOF
4764 }
4765
4766 fi
4767
4768
4769 echo $ac_n "checking for sin""... $ac_c" 1>&6
4770 echo "configure:4771: checking for sin" >&5
4771
4772 cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 /* System header to define __stub macros and hopefully few prototypes,
4776     which can conflict with char sin(); below.  */
4777 #include <assert.h>
4778 /* Override any gcc2 internal prototype to avoid an error.  */
4779 /* We use char because int might match the return type of a gcc2
4780     builtin and then its argument prototype would still apply.  */
4781 char sin();
4782
4783 int main() {
4784
4785 /* The GNU C library defines this for functions which it implements
4786     to always fail with ENOSYS.  Some functions are actually named
4787     something starting with __ and the normal name is an alias.  */
4788 #if defined (__stub_sin) || defined (__stub___sin)
4789 choke me
4790 #else
4791 sin();
4792 #endif
4793
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   eval "ac_cv_func_sin=yes"
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_func_sin=no"
4804 fi
4805 rm -f conftest*
4806
4807 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4808   echo "$ac_t""yes" 1>&6
4809   :
4810 else
4811   echo "$ac_t""no" 1>&6
4812
4813 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4814 echo "configure:4815: checking for sin in -lm" >&5
4815 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4816
4817 xe_check_libs=" -lm "
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 /* We use char because int might match the return type of a gcc2
4823     builtin and then its argument prototype would still apply.  */
4824 char sin();
4825
4826 int main() {
4827 sin()
4828 ; return 0; }
4829 EOF
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831   rm -rf conftest*
4832   eval "ac_cv_lib_$ac_lib_var=yes"
4833 else
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_lib_$ac_lib_var=no"
4838 fi
4839 rm -f conftest*
4840 xe_check_libs=""
4841
4842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4843   echo "$ac_t""yes" 1>&6
4844     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4845     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4846   { test "$extra_verbose" = "yes" && cat << EOF
4847     Defining $ac_tr_lib
4848 EOF
4849 cat >> confdefs.h <<EOF
4850 #define $ac_tr_lib 1
4851 EOF
4852 }
4853
4854   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4855
4856 else
4857   echo "$ac_t""no" 1>&6
4858 fi
4859
4860
4861 fi
4862
4863
4864 { test "$extra_verbose" = "yes" && cat << \EOF
4865     Defining LISP_FLOAT_TYPE
4866 EOF
4867 cat >> confdefs.h <<\EOF
4868 #define LISP_FLOAT_TYPE 1
4869 EOF
4870 }
4871
4872
4873 cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 #include <math.h>
4877 int main() {
4878 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   { test "$extra_verbose" = "yes" && cat << \EOF
4884     Defining HAVE_INVERSE_HYPERBOLIC
4885 EOF
4886 cat >> confdefs.h <<\EOF
4887 #define HAVE_INVERSE_HYPERBOLIC 1
4888 EOF
4889 }
4890
4891 else
4892   echo "configure: failed program was:" >&5
4893   cat conftest.$ac_ext >&5
4894 fi
4895 rm -f conftest*
4896
4897 echo "checking type of mail spool file locking" 1>&6
4898 echo "configure:4899: checking type of mail spool file locking" >&5
4899 for ac_func in lockf flock
4900 do
4901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4902 echo "configure:4903: checking for $ac_func" >&5
4903
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 /* System header to define __stub macros and hopefully few prototypes,
4908     which can conflict with char $ac_func(); below.  */
4909 #include <assert.h>
4910 /* Override any gcc2 internal prototype to avoid an error.  */
4911 /* We use char because int might match the return type of a gcc2
4912     builtin and then its argument prototype would still apply.  */
4913 char $ac_func();
4914
4915 int main() {
4916
4917 /* The GNU C library defines this for functions which it implements
4918     to always fail with ENOSYS.  Some functions are actually named
4919     something starting with __ and the normal name is an alias.  */
4920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4921 choke me
4922 #else
4923 $ac_func();
4924 #endif
4925
4926 ; return 0; }
4927 EOF
4928 if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929   rm -rf conftest*
4930   eval "ac_cv_func_$ac_func=yes"
4931 else
4932   echo "configure: failed program was:" >&5
4933   cat conftest.$ac_ext >&5
4934   rm -rf conftest*
4935   eval "ac_cv_func_$ac_func=no"
4936 fi
4937 rm -f conftest*
4938
4939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4940   echo "$ac_t""yes" 1>&6
4941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4942   { test "$extra_verbose" = "yes" && cat << EOF
4943     Defining $ac_tr_func
4944 EOF
4945 cat >> confdefs.h <<EOF
4946 #define $ac_tr_func 1
4947 EOF
4948 }
4949  
4950 else
4951   echo "$ac_t""no" 1>&6
4952 fi
4953 done
4954
4955 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4956 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4957 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4958 if   test -z "$mail_locking"; then
4959   case "$opsys" in cygwin* | mingw*)
4960     mail_locking=pop ;;
4961   esac
4962 fi
4963
4964 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4965     Defining MAIL_LOCK_LOCKF
4966 EOF
4967 cat >> confdefs.h <<\EOF
4968 #define MAIL_LOCK_LOCKF 1
4969 EOF
4970 }
4971
4972 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4973     Defining MAIL_LOCK_FLOCK
4974 EOF
4975 cat >> confdefs.h <<\EOF
4976 #define MAIL_LOCK_FLOCK 1
4977 EOF
4978 }
4979
4980 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4981     Defining MAIL_LOCK_LOCKING
4982 EOF
4983 cat >> confdefs.h <<\EOF
4984 #define MAIL_LOCK_LOCKING 1
4985 EOF
4986 }
4987
4988 elif test "$mail_locking" = "pop"; then
4989   with_pop=yes
4990   mail_locking=
4991 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4992     Defining MAIL_LOCK_DOT
4993 EOF
4994 cat >> confdefs.h <<\EOF
4995 #define MAIL_LOCK_DOT 1
4996 EOF
4997 }
4998
4999 fi
5000 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5001   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5002 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5003   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5004 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5005   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5006
5007 case "$opsys" in decosf*)
5008   
5009 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5010 echo "configure:5011: checking for cma_open in -lpthreads" >&5
5011 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5012
5013 xe_check_libs=" -lpthreads "
5014 cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 /* We use char because int might match the return type of a gcc2
5019     builtin and then its argument prototype would still apply.  */
5020 char cma_open();
5021
5022 int main() {
5023 cma_open()
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   eval "ac_cv_lib_$ac_lib_var=yes"
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=no"
5034 fi
5035 rm -f conftest*
5036 xe_check_libs=""
5037
5038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5039   echo "$ac_t""yes" 1>&6
5040     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5041     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5042   { test "$extra_verbose" = "yes" && cat << EOF
5043     Defining $ac_tr_lib
5044 EOF
5045 cat >> confdefs.h <<EOF
5046 #define $ac_tr_lib 1
5047 EOF
5048 }
5049
5050   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5051
5052 else
5053   echo "$ac_t""no" 1>&6
5054 fi
5055
5056
5057   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5058     c_switch_site="$c_switch_site -threads" ;;
5059 esac
5060
5061
5062 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5063 echo "configure:5064: checking whether the -xildoff compiler flag is required" >&5
5064 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5065   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5066     then echo "$ac_t""no" 1>&6;
5067     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
5068   fi
5069   else echo "$ac_t""no" 1>&6
5070 fi
5071
5072 if test "$opsys" = "sol2"; then
5073   if test "$os_release" -ge 506; then
5074     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5075 echo "configure:5076: checking for \"-z ignore\" linker flag" >&5
5076     case "`ld -h 2>&1`" in
5077       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5078         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5079       *) echo "$ac_t""no" 1>&6 ;;
5080     esac
5081   fi
5082 fi
5083
5084
5085 echo "checking "for specified window system"" 1>&6
5086 echo "configure:5087: checking "for specified window system"" >&5
5087
5088
5089 GNOME_CONFIG=no
5090 GTK_CONFIG=no
5091
5092 if test "$with_gnome" != "no"; then
5093    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5094 echo "configure:5095: checking for GNOME configuration script" >&5
5095    for possible in gnome-config
5096    do
5097       possible_version=`${possible} --version 2> /dev/null`
5098       if test "x${possible_version}" != "x"; then
5099               GNOME_CONFIG="${possible}"
5100               with_gnome=yes
5101               with_gtk=yes
5102               break
5103       fi
5104    done
5105    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5106 fi
5107
5108 if test "${GNOME_CONFIG}" != "no"; then
5109       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5110       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5111       { test "$extra_verbose" = "yes" && cat << \EOF
5112     Defining HAVE_GNOME
5113 EOF
5114 cat >> confdefs.h <<\EOF
5115 #define HAVE_GNOME 1
5116 EOF
5117 }
5118
5119       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5120       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5121 fi
5122
5123 if test "$with_gtk" != "no";then
5124    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5125 echo "configure:5126: checking for GTK configuration script" >&5
5126    for possible in gtk12-config gtk14-config gtk-config
5127    do
5128       possible_version=`${possible} --version 2> /dev/null`
5129       if test "x${possible_version}" != "x"; then
5130               GTK_CONFIG="${possible}"
5131               case "${possible_version}" in
5132                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5133                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5134                 1.2.*)
5135                         with_gtk=yes
5136                         break
5137                         ;;
5138                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5139               esac
5140       fi
5141    done
5142    echo "$ac_t""${GTK_CONFIG}" 1>&6
5143 fi
5144
5145 if test "${GTK_CONFIG}" != "no"; then
5146       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5147 echo "configure:5148: checking gtk version" >&5
5148       GTK_VERSION=`${GTK_CONFIG} --version`
5149       echo "$ac_t""${GTK_VERSION}" 1>&6
5150
5151       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5152 echo "configure:5153: checking gtk libs" >&5
5153       GTK_LIBS=`${GTK_CONFIG} --libs`
5154       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5155       echo "$ac_t""${GTK_LIBS}" 1>&6
5156
5157       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5158 echo "configure:5159: checking gtk cflags" >&5
5159       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5160       if test "$GCC" = "yes"; then
5161         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5162       fi
5163       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5164       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5165
5166       
5167 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5168 echo "configure:5169: checking for main in -lgdk_imlib" >&5
5169 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5170
5171 xe_check_libs=" -lgdk_imlib "
5172 cat > conftest.$ac_ext <<EOF
5173 #line 5174 "configure"
5174 #include "confdefs.h"
5175
5176 int main() {
5177 main()
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_lib_$ac_lib_var=no"
5188 fi
5189 rm -f conftest*
5190 xe_check_libs=""
5191
5192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5193   echo "$ac_t""yes" 1>&6
5194   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198
5199
5200       
5201 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5202 echo "configure:5203: checking for Imlib_init in -lImlib" >&5
5203 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5204
5205 xe_check_libs=" -lImlib "
5206 cat > conftest.$ac_ext <<EOF
5207 #line 5208 "configure"
5208 #include "confdefs.h"
5209 /* Override any gcc2 internal prototype to avoid an error.  */
5210 /* We use char because int might match the return type of a gcc2
5211     builtin and then its argument prototype would still apply.  */
5212 char Imlib_init();
5213
5214 int main() {
5215 Imlib_init()
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219   rm -rf conftest*
5220   eval "ac_cv_lib_$ac_lib_var=yes"
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_lib_$ac_lib_var=no"
5226 fi
5227 rm -f conftest*
5228 xe_check_libs=""
5229
5230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5231   echo "$ac_t""yes" 1>&6
5232   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5233 else
5234   echo "$ac_t""no" 1>&6
5235 fi
5236
5237
5238       for ac_func in gdk_imlib_init
5239 do
5240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5241 echo "configure:5242: checking for $ac_func" >&5
5242
5243 cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* System header to define __stub macros and hopefully few prototypes,
5247     which can conflict with char $ac_func(); below.  */
5248 #include <assert.h>
5249 /* Override any gcc2 internal prototype to avoid an error.  */
5250 /* We use char because int might match the return type of a gcc2
5251     builtin and then its argument prototype would still apply.  */
5252 char $ac_func();
5253
5254 int main() {
5255
5256 /* The GNU C library defines this for functions which it implements
5257     to always fail with ENOSYS.  Some functions are actually named
5258     something starting with __ and the normal name is an alias.  */
5259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5260 choke me
5261 #else
5262 $ac_func();
5263 #endif
5264
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268   rm -rf conftest*
5269   eval "ac_cv_func_$ac_func=yes"
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   eval "ac_cv_func_$ac_func=no"
5275 fi
5276 rm -f conftest*
5277
5278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5281   { test "$extra_verbose" = "yes" && cat << EOF
5282     Defining $ac_tr_func
5283 EOF
5284 cat >> confdefs.h <<EOF
5285 #define $ac_tr_func 1
5286 EOF
5287 }
5288  
5289 else
5290   echo "$ac_t""no" 1>&6
5291 fi
5292 done
5293
5294
5295       { test "$extra_verbose" = "yes" && cat << \EOF
5296     Defining HAVE_XPM
5297 EOF
5298 cat >> confdefs.h <<\EOF
5299 #define HAVE_XPM 1
5300 EOF
5301 }
5302
5303       { test "$extra_verbose" = "yes" && cat << \EOF
5304     Defining HAVE_GTK
5305 EOF
5306 cat >> confdefs.h <<\EOF
5307 #define HAVE_GTK 1
5308 EOF
5309 }
5310
5311       
5312
5313       window_system=gtk
5314       with_gtk=yes
5315       with_x11=no
5316
5317       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5318       test "${with_toolbars}" != no && with_toolbars=gtk
5319       test "${with_menubars}" != "no" && with_menubars=gtk
5320       test "${with_dialogs}" != "no" && with_dialogs=gtk
5321       test "${with_widgets}" != "no" && with_widgets=gtk
5322
5323       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5324    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5325  fi
5326       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5327    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5328  fi
5329       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5330    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5331  fi
5332       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5333    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5334  fi
5335
5336             OLD_CFLAGS="${CFLAGS}"
5337       OLD_CPPFLAGS="${CPPFLAGS}"
5338       OLD_LDFLAGS="${LDFLAGS}"
5339       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5340       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5341       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5342       for ac_hdr in glade/glade.h glade.h
5343 do
5344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5346 echo "configure:5347: checking for $ac_hdr" >&5
5347
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 #include <$ac_hdr>
5352 EOF
5353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5354 { (eval echo configure:5355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5356 if test -z "$ac_err"; then
5357   rm -rf conftest*
5358   eval "ac_cv_header_$ac_safe=yes"
5359 else
5360   echo "$ac_err" >&5
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_header_$ac_safe=no"
5365 fi
5366 rm -f conftest*
5367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5368   echo "$ac_t""yes" 1>&6
5369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5370   { test "$extra_verbose" = "yes" && cat << EOF
5371     Defining $ac_tr_hdr
5372 EOF
5373 cat >> confdefs.h <<EOF
5374 #define $ac_tr_hdr 1
5375 EOF
5376 }
5377  
5378 else
5379   echo "$ac_t""no" 1>&6
5380 fi
5381 done
5382
5383       
5384 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5385 echo "configure:5386: checking for main in -lxml" >&5
5386 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5387
5388 xe_check_libs=" -lxml "
5389 cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392
5393 int main() {
5394 main()
5395 ; return 0; }
5396 EOF
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398   rm -rf conftest*
5399   eval "ac_cv_lib_$ac_lib_var=yes"
5400 else
5401   echo "configure: failed program was:" >&5
5402   cat conftest.$ac_ext >&5
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=no"
5405 fi
5406 rm -f conftest*
5407 xe_check_libs=""
5408
5409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5410   echo "$ac_t""yes" 1>&6
5411   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5412 else
5413   echo "$ac_t""no" 1>&6
5414 fi
5415
5416
5417       
5418 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5419 echo "configure:5420: checking for main in -lglade" >&5
5420 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5421
5422 xe_check_libs=" -lglade "
5423 cat > conftest.$ac_ext <<EOF
5424 #line 5425 "configure"
5425 #include "confdefs.h"
5426
5427 int main() {
5428 main()
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5432   rm -rf conftest*
5433   eval "ac_cv_lib_$ac_lib_var=yes"
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   eval "ac_cv_lib_$ac_lib_var=no"
5439 fi
5440 rm -f conftest*
5441 xe_check_libs=""
5442
5443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5444   echo "$ac_t""yes" 1>&6
5445   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449
5450
5451       
5452 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5453 echo "configure:5454: checking for main in -lglade-gnome" >&5
5454 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5455
5456 xe_check_libs=" -lglade-gnome "
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460
5461 int main() {
5462 main()
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5466   rm -rf conftest*
5467   eval "ac_cv_lib_$ac_lib_var=yes"
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_lib_$ac_lib_var=no"
5473 fi
5474 rm -f conftest*
5475 xe_check_libs=""
5476
5477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5478   echo "$ac_t""yes" 1>&6
5479   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5480 else
5481   echo "$ac_t""no" 1>&6
5482 fi
5483
5484
5485       cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 #include <glade/glade-xml.h>
5489 EOF
5490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5491   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5492   rm -rf conftest*
5493   echo "$ac_t""yes" 1>&6
5494                        { test "$extra_verbose" = "yes" && cat << \EOF
5495     Defining LIBGLADE_XML_TXTDOMAIN = 1
5496 EOF
5497 cat >> confdefs.h <<\EOF
5498 #define LIBGLADE_XML_TXTDOMAIN 1
5499 EOF
5500 }
5501
5502 else
5503   rm -rf conftest*
5504   echo "$ac_t""no" 1>&6
5505 fi
5506 rm -f conftest*
5507
5508       CFLAGS="${OLD_CFLAGS}"
5509       CPPFLAGS="${OLD_CPPFLAGS}"
5510       LDFLAGS="${OLD_LDFLAGS}"
5511 fi
5512
5513
5514 if test "$with_x11" != "no"; then
5515     test "$x_includes $x_libraries" != "NONE NONE" && \
5516    window_system=x11 with_x11=yes
5517
5518         
5519       if test "$x_includes $x_libraries" = "NONE NONE" \
5520     -a -n "$OPENWINHOME" \
5521     -a "$OPENWINHOME" != "/usr/openwin" \
5522     -a -d "$OPENWINHOME"; then
5523       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5524       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5525       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5526   fi
5527
5528   if test "$x_includes" = "NONE"; then
5529                     for dir in "/usr/X11" "/usr/X11R6"; do
5530       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5531     done
5532   fi
5533
5534   if test "$x_libraries" = "NONE"; then
5535     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5536       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5537     done
5538   fi
5539
5540   # If we find X, set shell vars x_includes and x_libraries to the
5541 # paths, otherwise set no_x=yes.
5542 # Uses ac_ vars as temps to allow command line to override cache and checks.
5543 # --without-x overrides everything else, but does not touch the cache.
5544 echo $ac_n "checking for X""... $ac_c" 1>&6
5545 echo "configure:5546: checking for X" >&5
5546
5547 # Check whether --with-x or --without-x was given.
5548 if test "${with_x+set}" = set; then
5549   withval="$with_x"
5550   :
5551 fi
5552
5553 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5554 if test "x$with_x" = xno; then
5555   # The user explicitly disabled X.
5556   have_x=disabled
5557 else
5558   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5559     # Both variables are already set.
5560     have_x=yes
5561   else
5562
5563 # One or both of the vars are not set, and there is no cached value.
5564 ac_x_includes=NO ac_x_libraries=NO
5565 rm -fr conftestdir
5566 if mkdir conftestdir; then
5567   cd conftestdir
5568   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5569   cat > Imakefile <<'EOF'
5570 acfindx:
5571         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5572 EOF
5573   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5574     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5575     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5576     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5577     for ac_extension in a so sl; do
5578       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5579         test -f $ac_im_libdir/libX11.$ac_extension; then
5580         ac_im_usrlibdir=$ac_im_libdir; break
5581       fi
5582     done
5583     # Screen out bogus values from the imake configuration.  They are
5584     # bogus both because they are the default anyway, and because
5585     # using them would break gcc on systems where it needs fixed includes.
5586     case "$ac_im_incroot" in
5587         /usr/include) ;;
5588         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5589     esac
5590     case "$ac_im_usrlibdir" in
5591         /usr/lib | /lib) ;;
5592         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5593     esac
5594   fi
5595   cd ..
5596   rm -fr conftestdir
5597 fi
5598
5599 if test "$ac_x_includes" = NO; then
5600   # Guess where to find include files, by looking for this one X11 .h file.
5601   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5602
5603   # First, try using that file with no special directory specified.
5604 cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 #include <$x_direct_test_include>
5608 EOF
5609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5610 { (eval echo configure:5611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5612 if test -z "$ac_err"; then
5613   rm -rf conftest*
5614   # We can compile using X headers with no special include directory.
5615 ac_x_includes=
5616 else
5617   echo "$ac_err" >&5
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   # Look for the header file in a standard set of common directories.
5622 # Check X11 before X11Rn because it is often a symlink to the current release.
5623   for ac_dir in               \
5624     /usr/X11/include          \
5625     /usr/X11R6/include        \
5626     /usr/X11R5/include        \
5627     /usr/X11R4/include        \
5628                               \
5629     /usr/include/X11          \
5630     /usr/include/X11R6        \
5631     /usr/include/X11R5        \
5632     /usr/include/X11R4        \
5633                               \
5634     /usr/local/X11/include    \
5635     /usr/local/X11R6/include  \
5636     /usr/local/X11R5/include  \
5637     /usr/local/X11R4/include  \
5638                               \
5639     /usr/local/include/X11    \
5640     /usr/local/include/X11R6  \
5641     /usr/local/include/X11R5  \
5642     /usr/local/include/X11R4  \
5643                               \
5644     /usr/X386/include         \
5645     /usr/x386/include         \
5646     /usr/XFree86/include/X11  \
5647                               \
5648     /usr/include              \
5649     /usr/local/include        \
5650     /usr/unsupported/include  \
5651     /usr/athena/include       \
5652     /usr/local/x11r5/include  \
5653     /usr/lpp/Xamples/include  \
5654                               \
5655     /usr/openwin/include      \
5656     /usr/openwin/share/include \
5657     ; \
5658   do
5659     if test -r "$ac_dir/$x_direct_test_include"; then
5660       ac_x_includes=$ac_dir
5661       break
5662     fi
5663   done
5664 fi
5665 rm -f conftest*
5666 fi # $ac_x_includes = NO
5667
5668 if test "$ac_x_libraries" = NO; then
5669   # Check for the libraries.
5670
5671   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5672   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5673
5674   # See if we find them without any special options.
5675   # Don't add to $LIBS permanently.
5676   ac_save_LIBS="$LIBS"
5677   LIBS="-l$x_direct_test_library $LIBS"
5678 cat > conftest.$ac_ext <<EOF
5679 #line 5680 "configure"
5680 #include "confdefs.h"
5681
5682 int main() {
5683 ${x_direct_test_function}()
5684 ; return 0; }
5685 EOF
5686 if { (eval echo configure:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5687   rm -rf conftest*
5688   LIBS="$ac_save_LIBS"
5689 # We can link X programs with no special library path.
5690 ac_x_libraries=
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   LIBS="$ac_save_LIBS"
5696 # First see if replacing the include by lib works.
5697 # Check X11 before X11Rn because it is often a symlink to the current release.
5698 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5699     /usr/X11/lib          \
5700     /usr/X11R6/lib        \
5701     /usr/X11R5/lib        \
5702     /usr/X11R4/lib        \
5703                           \
5704     /usr/lib/X11          \
5705     /usr/lib/X11R6        \
5706     /usr/lib/X11R5        \
5707     /usr/lib/X11R4        \
5708                           \
5709     /usr/local/X11/lib    \
5710     /usr/local/X11R6/lib  \
5711     /usr/local/X11R5/lib  \
5712     /usr/local/X11R4/lib  \
5713                           \
5714     /usr/local/lib/X11    \
5715     /usr/local/lib/X11R6  \
5716     /usr/local/lib/X11R5  \
5717     /usr/local/lib/X11R4  \
5718                           \
5719     /usr/X386/lib         \
5720     /usr/x386/lib         \
5721     /usr/XFree86/lib/X11  \
5722                           \
5723     /usr/lib              \
5724     /usr/local/lib        \
5725     /usr/unsupported/lib  \
5726     /usr/athena/lib       \
5727     /usr/local/x11r5/lib  \
5728     /usr/lpp/Xamples/lib  \
5729     /lib/usr/lib/X11      \
5730                           \
5731     /usr/openwin/lib      \
5732     /usr/openwin/share/lib \
5733     ; \
5734 do
5735   for ac_extension in a so sl; do
5736     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5737       ac_x_libraries=$ac_dir
5738       break 2
5739     fi
5740   done
5741 done
5742 fi
5743 rm -f conftest*
5744 fi # $ac_x_libraries = NO
5745
5746 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5747   # Didn't find X anywhere.  Cache the known absence of X.
5748   ac_cv_have_x="have_x=no"
5749 else
5750   # Record where we found X for the cache.
5751   ac_cv_have_x="have_x=yes \
5752                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5753 fi
5754   fi
5755   eval "$ac_cv_have_x"
5756 fi # $with_x != no
5757
5758 if test "$have_x" != yes; then
5759   echo "$ac_t""$have_x" 1>&6
5760   no_x=yes
5761 else
5762   # If each of the values was on the command line, it overrides each guess.
5763   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5764   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5765   # Update the cache value to reflect the command line values.
5766   ac_cv_have_x="have_x=yes \
5767                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5768   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5769 fi
5770
5771 if test "$no_x" = yes; then
5772   # Not all programs may use this symbol, but it does not hurt to define it.
5773   { test "$extra_verbose" = "yes" && cat << \EOF
5774     Defining X_DISPLAY_MISSING
5775 EOF
5776 cat >> confdefs.h <<\EOF
5777 #define X_DISPLAY_MISSING 1
5778 EOF
5779 }
5780
5781   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5782 else
5783   if test -n "$x_includes"; then
5784     X_CFLAGS="$X_CFLAGS -I$x_includes"
5785   fi
5786
5787   # It would also be nice to do this for all -L options, not just this one.
5788   if test -n "$x_libraries"; then
5789     X_LIBS="$X_LIBS -L$x_libraries"
5790     # For Solaris; some versions of Sun CC require a space after -R and
5791     # others require no space.  Words are not sufficient . . . .
5792     case "`(uname -sr) 2>/dev/null`" in
5793     "SunOS 5"*)
5794       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5795 echo "configure:5796: checking whether -R must be followed by a space" >&5
5796       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5797       cat > conftest.$ac_ext <<EOF
5798 #line 5799 "configure"
5799 #include "confdefs.h"
5800
5801 int main() {
5802
5803 ; return 0; }
5804 EOF
5805 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5806   rm -rf conftest*
5807   ac_R_nospace=yes
5808 else
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -rf conftest*
5812   ac_R_nospace=no
5813 fi
5814 rm -f conftest*
5815       if test $ac_R_nospace = yes; then
5816         echo "$ac_t""no" 1>&6
5817         X_LIBS="$X_LIBS -R$x_libraries"
5818       else
5819         LIBS="$ac_xsave_LIBS -R $x_libraries"
5820         cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823
5824 int main() {
5825
5826 ; return 0; }
5827 EOF
5828 if { (eval echo configure:5829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5829   rm -rf conftest*
5830   ac_R_space=yes
5831 else
5832   echo "configure: failed program was:" >&5
5833   cat conftest.$ac_ext >&5
5834   rm -rf conftest*
5835   ac_R_space=no
5836 fi
5837 rm -f conftest*
5838         if test $ac_R_space = yes; then
5839           echo "$ac_t""yes" 1>&6
5840           X_LIBS="$X_LIBS -R $x_libraries"
5841         else
5842           echo "$ac_t""neither works" 1>&6
5843         fi
5844       fi
5845       LIBS="$ac_xsave_LIBS"
5846     esac
5847   fi
5848
5849   # Check for system-dependent libraries X programs must link with.
5850   # Do this before checking for the system-independent R6 libraries
5851   # (-lICE), since we may need -lsocket or whatever for X linking.
5852
5853   if test "$ISC" = yes; then
5854     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5855   else
5856     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5857     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5858     # the Alpha needs dnet_stub (dnet does not exist).
5859     if test "$with_dnet" = "no" ; then
5860 ac_cv_lib_dnet_dnet_ntoa=no
5861 else
5862
5863 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5864 echo "configure:5865: checking for dnet_ntoa in -ldnet" >&5
5865 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5866
5867 xe_check_libs=" -ldnet "
5868 cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 /* Override any gcc2 internal prototype to avoid an error.  */
5872 /* We use char because int might match the return type of a gcc2
5873     builtin and then its argument prototype would still apply.  */
5874 char dnet_ntoa();
5875
5876 int main() {
5877 dnet_ntoa()
5878 ; return 0; }
5879 EOF
5880 if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5881   rm -rf conftest*
5882   eval "ac_cv_lib_$ac_lib_var=yes"
5883 else
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_lib_$ac_lib_var=no"
5888 fi
5889 rm -f conftest*
5890 xe_check_libs=""
5891
5892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5893   echo "$ac_t""yes" 1>&6
5894   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5895 else
5896   echo "$ac_t""no" 1>&6
5897 fi
5898
5899 fi
5900
5901     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5902       
5903 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5904 echo "configure:5905: checking for dnet_ntoa in -ldnet_stub" >&5
5905 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5906
5907 xe_check_libs=" -ldnet_stub "
5908 cat > conftest.$ac_ext <<EOF
5909 #line 5910 "configure"
5910 #include "confdefs.h"
5911 /* Override any gcc2 internal prototype to avoid an error.  */
5912 /* We use char because int might match the return type of a gcc2
5913     builtin and then its argument prototype would still apply.  */
5914 char dnet_ntoa();
5915
5916 int main() {
5917 dnet_ntoa()
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=no"
5928 fi
5929 rm -f conftest*
5930 xe_check_libs=""
5931
5932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5933   echo "$ac_t""yes" 1>&6
5934   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5935 else
5936   echo "$ac_t""no" 1>&6
5937 fi
5938
5939
5940     fi
5941
5942     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5943     # to get the SysV transport functions.
5944     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5945     # needs -lnsl.
5946     # The nsl library prevents programs from opening the X display
5947     # on Irix 5.2, according to dickey@clark.net.
5948     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5949 echo "configure:5950: checking for gethostbyname" >&5
5950
5951 cat > conftest.$ac_ext <<EOF
5952 #line 5953 "configure"
5953 #include "confdefs.h"
5954 /* System header to define __stub macros and hopefully few prototypes,
5955     which can conflict with char gethostbyname(); below.  */
5956 #include <assert.h>
5957 /* Override any gcc2 internal prototype to avoid an error.  */
5958 /* We use char because int might match the return type of a gcc2
5959     builtin and then its argument prototype would still apply.  */
5960 char gethostbyname();
5961
5962 int main() {
5963
5964 /* The GNU C library defines this for functions which it implements
5965     to always fail with ENOSYS.  Some functions are actually named
5966     something starting with __ and the normal name is an alias.  */
5967 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5968 choke me
5969 #else
5970 gethostbyname();
5971 #endif
5972
5973 ; return 0; }
5974 EOF
5975 if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5976   rm -rf conftest*
5977   eval "ac_cv_func_gethostbyname=yes"
5978 else
5979   echo "configure: failed program was:" >&5
5980   cat conftest.$ac_ext >&5
5981   rm -rf conftest*
5982   eval "ac_cv_func_gethostbyname=no"
5983 fi
5984 rm -f conftest*
5985
5986 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5987   echo "$ac_t""yes" 1>&6
5988   :
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992
5993     if test $ac_cv_func_gethostbyname = no; then
5994       
5995 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5996 echo "configure:5997: checking for gethostbyname in -lnsl" >&5
5997 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5998
5999 xe_check_libs=" -lnsl "
6000 cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 /* Override any gcc2 internal prototype to avoid an error.  */
6004 /* We use char because int might match the return type of a gcc2
6005     builtin and then its argument prototype would still apply.  */
6006 char gethostbyname();
6007
6008 int main() {
6009 gethostbyname()
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6013   rm -rf conftest*
6014   eval "ac_cv_lib_$ac_lib_var=yes"
6015 else
6016   echo "configure: failed program was:" >&5
6017   cat conftest.$ac_ext >&5
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=no"
6020 fi
6021 rm -f conftest*
6022 xe_check_libs=""
6023
6024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6025   echo "$ac_t""yes" 1>&6
6026   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6027 else
6028   echo "$ac_t""no" 1>&6
6029 fi
6030
6031
6032     fi
6033
6034     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6035     # socket/setsockopt and other routines are undefined under SCO ODT
6036     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6037     # on later versions), says simon@lia.di.epfl.ch: it contains
6038     # gethostby* variants that don't use the nameserver (or something).
6039     # -lsocket must be given before -lnsl if both are needed.
6040     # We assume that if connect needs -lnsl, so does gethostbyname.
6041     echo $ac_n "checking for connect""... $ac_c" 1>&6
6042 echo "configure:6043: checking for connect" >&5
6043
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* System header to define __stub macros and hopefully few prototypes,
6048     which can conflict with char connect(); below.  */
6049 #include <assert.h>
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char connect();
6054
6055 int main() {
6056
6057 /* The GNU C library defines this for functions which it implements
6058     to always fail with ENOSYS.  Some functions are actually named
6059     something starting with __ and the normal name is an alias.  */
6060 #if defined (__stub_connect) || defined (__stub___connect)
6061 choke me
6062 #else
6063 connect();
6064 #endif
6065
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_func_connect=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_func_connect=no"
6076 fi
6077 rm -f conftest*
6078
6079 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6080   echo "$ac_t""yes" 1>&6
6081   :
6082 else
6083   echo "$ac_t""no" 1>&6
6084 fi
6085
6086     if test $ac_cv_func_connect = no; then
6087       
6088 xe_msg_checking="for connect in -lsocket"
6089 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6090 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6091 echo "configure:6092: checking "$xe_msg_checking"" >&5
6092 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6093
6094 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 /* Override any gcc2 internal prototype to avoid an error.  */
6099 /* We use char because int might match the return type of a gcc2
6100     builtin and then its argument prototype would still apply.  */
6101 char connect();
6102
6103 int main() {
6104 connect()
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6108   rm -rf conftest*
6109   eval "ac_cv_lib_$ac_lib_var=yes"
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   eval "ac_cv_lib_$ac_lib_var=no"
6115 fi
6116 rm -f conftest*
6117 xe_check_libs=""
6118
6119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6120   echo "$ac_t""yes" 1>&6
6121   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6122 else
6123   echo "$ac_t""no" 1>&6
6124 fi
6125
6126
6127     fi
6128
6129     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6130     echo $ac_n "checking for remove""... $ac_c" 1>&6
6131 echo "configure:6132: checking for remove" >&5
6132
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 /* System header to define __stub macros and hopefully few prototypes,
6137     which can conflict with char remove(); below.  */
6138 #include <assert.h>
6139 /* Override any gcc2 internal prototype to avoid an error.  */
6140 /* We use char because int might match the return type of a gcc2
6141     builtin and then its argument prototype would still apply.  */
6142 char remove();
6143
6144 int main() {
6145
6146 /* The GNU C library defines this for functions which it implements
6147     to always fail with ENOSYS.  Some functions are actually named
6148     something starting with __ and the normal name is an alias.  */
6149 #if defined (__stub_remove) || defined (__stub___remove)
6150 choke me
6151 #else
6152 remove();
6153 #endif
6154
6155 ; return 0; }
6156 EOF
6157 if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6158   rm -rf conftest*
6159   eval "ac_cv_func_remove=yes"
6160 else
6161   echo "configure: failed program was:" >&5
6162   cat conftest.$ac_ext >&5
6163   rm -rf conftest*
6164   eval "ac_cv_func_remove=no"
6165 fi
6166 rm -f conftest*
6167
6168 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6169   echo "$ac_t""yes" 1>&6
6170   :
6171 else
6172   echo "$ac_t""no" 1>&6
6173 fi
6174
6175     if test $ac_cv_func_remove = no; then
6176       
6177 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6178 echo "configure:6179: checking for remove in -lposix" >&5
6179 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6180
6181 xe_check_libs=" -lposix "
6182 cat > conftest.$ac_ext <<EOF
6183 #line 6184 "configure"
6184 #include "confdefs.h"
6185 /* Override any gcc2 internal prototype to avoid an error.  */
6186 /* We use char because int might match the return type of a gcc2
6187     builtin and then its argument prototype would still apply.  */
6188 char remove();
6189
6190 int main() {
6191 remove()
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_lib_$ac_lib_var=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_lib_$ac_lib_var=no"
6202 fi
6203 rm -f conftest*
6204 xe_check_libs=""
6205
6206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6207   echo "$ac_t""yes" 1>&6
6208   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6209 else
6210   echo "$ac_t""no" 1>&6
6211 fi
6212
6213
6214     fi
6215
6216     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6217     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6218 echo "configure:6219: checking for shmat" >&5
6219
6220 cat > conftest.$ac_ext <<EOF
6221 #line 6222 "configure"
6222 #include "confdefs.h"
6223 /* System header to define __stub macros and hopefully few prototypes,
6224     which can conflict with char shmat(); below.  */
6225 #include <assert.h>
6226 /* Override any gcc2 internal prototype to avoid an error.  */
6227 /* We use char because int might match the return type of a gcc2
6228     builtin and then its argument prototype would still apply.  */
6229 char shmat();
6230
6231 int main() {
6232
6233 /* The GNU C library defines this for functions which it implements
6234     to always fail with ENOSYS.  Some functions are actually named
6235     something starting with __ and the normal name is an alias.  */
6236 #if defined (__stub_shmat) || defined (__stub___shmat)
6237 choke me
6238 #else
6239 shmat();
6240 #endif
6241
6242 ; return 0; }
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245   rm -rf conftest*
6246   eval "ac_cv_func_shmat=yes"
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -rf conftest*
6251   eval "ac_cv_func_shmat=no"
6252 fi
6253 rm -f conftest*
6254
6255 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6256   echo "$ac_t""yes" 1>&6
6257   :
6258 else
6259   echo "$ac_t""no" 1>&6
6260 fi
6261
6262     if test $ac_cv_func_shmat = no; then
6263       
6264 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6265 echo "configure:6266: checking for shmat in -lipc" >&5
6266 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6267
6268 xe_check_libs=" -lipc "
6269 cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272 /* Override any gcc2 internal prototype to avoid an error.  */
6273 /* We use char because int might match the return type of a gcc2
6274     builtin and then its argument prototype would still apply.  */
6275 char shmat();
6276
6277 int main() {
6278 shmat()
6279 ; return 0; }
6280 EOF
6281 if { (eval echo configure:6282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6282   rm -rf conftest*
6283   eval "ac_cv_lib_$ac_lib_var=yes"
6284 else
6285   echo "configure: failed program was:" >&5
6286   cat conftest.$ac_ext >&5
6287   rm -rf conftest*
6288   eval "ac_cv_lib_$ac_lib_var=no"
6289 fi
6290 rm -f conftest*
6291 xe_check_libs=""
6292
6293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6294   echo "$ac_t""yes" 1>&6
6295   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6296 else
6297   echo "$ac_t""no" 1>&6
6298 fi
6299
6300
6301     fi
6302   fi
6303
6304   # Check for libraries that X11R6 Xt/Xaw programs need.
6305   ac_save_LDFLAGS="$LDFLAGS"
6306   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6307   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6308   # check for ICE first), but we must link in the order -lSM -lICE or
6309   # we get undefined symbols.  So assume we have SM if we have ICE.
6310   # These have to be linked with before -lX11, unlike the other
6311   # libraries we check for below, so use a different variable.
6312   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6313   
6314 xe_msg_checking="for IceConnectionNumber in -lICE"
6315 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6316 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6317 echo "configure:6318: checking "$xe_msg_checking"" >&5
6318 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6319
6320 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6321 cat > conftest.$ac_ext <<EOF
6322 #line 6323 "configure"
6323 #include "confdefs.h"
6324 /* Override any gcc2 internal prototype to avoid an error.  */
6325 /* We use char because int might match the return type of a gcc2
6326     builtin and then its argument prototype would still apply.  */
6327 char IceConnectionNumber();
6328
6329 int main() {
6330 IceConnectionNumber()
6331 ; return 0; }
6332 EOF
6333 if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6334   rm -rf conftest*
6335   eval "ac_cv_lib_$ac_lib_var=yes"
6336 else
6337   echo "configure: failed program was:" >&5
6338   cat conftest.$ac_ext >&5
6339   rm -rf conftest*
6340   eval "ac_cv_lib_$ac_lib_var=no"
6341 fi
6342 rm -f conftest*
6343 xe_check_libs=""
6344
6345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6346   echo "$ac_t""yes" 1>&6
6347   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6348 else
6349   echo "$ac_t""no" 1>&6
6350 fi
6351
6352
6353   LDFLAGS="$ac_save_LDFLAGS"
6354
6355 fi
6356  # Autoconf claims to find X library and include dirs for us.
6357   if test "$no_x" = "yes"
6358   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6359   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6360   fi
6361 fi
6362
6363
6364 if test "$with_x11" = "yes"; then
6365   { test "$extra_verbose" = "yes" && cat << \EOF
6366     Defining HAVE_X_WINDOWS
6367 EOF
6368 cat >> confdefs.h <<\EOF
6369 #define HAVE_X_WINDOWS 1
6370 EOF
6371 }
6372
6373   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6374   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6375
6376
6377     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6378 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6379 echo "configure:6380: checking for Xm/Xm.h" >&5
6380
6381 cat > conftest.$ac_ext <<EOF
6382 #line 6383 "configure"
6383 #include "confdefs.h"
6384 #include <Xm/Xm.h>
6385 EOF
6386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6387 { (eval echo configure:6388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6389 if test -z "$ac_err"; then
6390   rm -rf conftest*
6391   eval "ac_cv_header_$ac_safe=yes"
6392 else
6393   echo "$ac_err" >&5
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_header_$ac_safe=no"
6398 fi
6399 rm -f conftest*
6400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6401   echo "$ac_t""yes" 1>&6
6402   
6403 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6404 echo "configure:6405: checking for XmStringFree in -lXm" >&5
6405 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6406
6407 xe_check_libs=" -lXm "
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6411 /* Override any gcc2 internal prototype to avoid an error.  */
6412 /* We use char because int might match the return type of a gcc2
6413     builtin and then its argument prototype would still apply.  */
6414 char XmStringFree();
6415
6416 int main() {
6417 XmStringFree()
6418 ; return 0; }
6419 EOF
6420 if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6421   rm -rf conftest*
6422   eval "ac_cv_lib_$ac_lib_var=yes"
6423 else
6424   echo "configure: failed program was:" >&5
6425   cat conftest.$ac_ext >&5
6426   rm -rf conftest*
6427   eval "ac_cv_lib_$ac_lib_var=no"
6428 fi
6429 rm -f conftest*
6430 xe_check_libs=""
6431
6432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6433   echo "$ac_t""yes" 1>&6
6434   got_motif=yes
6435 else
6436   echo "$ac_t""no" 1>&6
6437 fi
6438
6439
6440 else
6441   echo "$ac_t""no" 1>&6
6442 fi
6443
6444
6445   if test "$got_motif" != "yes"; then
6446             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6447                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6448       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6449       if test -d "$lib_dir" -a -d "$inc_dir"; then
6450         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6451           x_libraries="$lib_dir $x_libraries"
6452           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6453         esac
6454         case "$x_includes" in "$inc_dir"* ) ;; *)
6455           x_includes="$inc_dir $x_includes"
6456           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6457         esac
6458         break;  fi
6459     done
6460   fi
6461
6462     for rel in "X11R6" "X11R5" "X11R4"; do
6463     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6464     if test -d "$lib_dir" -a -d "$inc_dir"; then
6465       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6466         x_libraries="$x_libraries $lib_dir"
6467         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6468       esac
6469       case "$x_includes" in "$inc_dir"* ) ;; *)
6470         x_includes="$x_includes $inc_dir"
6471         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6472       esac
6473       break;     fi
6474   done
6475
6476     case "$opsys" in
6477   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 ;;
6478   esac
6479
6480   ld_switch_x_site="$X_LIBS"
6481
6482   
6483 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6484     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6485   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6486   
6487         runpath="" runpath_dirs=""
6488   if test -n "$LD_RUN_PATH"; then
6489     runpath="$LD_RUN_PATH"
6490   elif test "$GCC" = "yes"; then
6491         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6492     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6493     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6494     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6495       case "$arg" in P,* | -L* | -R* )
6496         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6497           {
6498 xe_runpath_dir="$dir"
6499   test "$xe_runpath_dir" != "/lib"     -a \
6500         "$xe_runpath_dir" != "/usr/lib" -a \
6501         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6502   eval "$xe_add_unique_runpath_dir"
6503 }
6504         done ;;
6505       esac
6506     done
6507     ld_switch_run="$ld_switch_run_save"
6508     rm -f conftest*
6509   else
6510         for arg in $ld_switch_site $ld_switch_x_site; do
6511       case "$arg" in -L*) {
6512 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6513   test "$xe_runpath_dir" != "/lib"     -a \
6514         "$xe_runpath_dir" != "/usr/lib" -a \
6515         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6516   eval "$xe_add_unique_runpath_dir"
6517 };; esac
6518     done
6519             if test "$opsys $need_motif" = "sol2 yes"; then
6520       xe_runpath_dir="/opt/SUNWdt/lib";
6521       eval "$xe_add_unique_runpath_dir";
6522     fi
6523   fi 
6524   if test -n "$runpath"; then
6525     ld_switch_run="${dash_r}${runpath}"
6526     
6527 if test "$GCC" = "yes"; then
6528   set x $ld_switch_run; shift; ld_switch_run=""
6529   while test -n "$1"; do
6530     case $1 in
6531       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6532       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6533       -Xlinker* ) ;;
6534       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6535     esac
6536     shift
6537   done
6538 fi
6539     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6540   fi
6541 fi
6542
6543
6544   if test "$extra_verbose" = "yes"; then
6545     echo; echo "X11 compilation variables:"
6546     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6547     echo
6548   fi
6549
6550             bitmapdirs=
6551   if test "$x_includes" != NONE; then
6552     for i in $x_includes; do
6553       if test -d "$i/bitmaps"; then
6554         bitmapdirs="$i/bitmaps:$bitmapdirs"
6555       fi
6556       if test -d "$i/X11/bitmaps"; then
6557         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6558       fi
6559     done
6560     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6561   fi
6562   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6563     Defining BITMAPDIR = "$bitmapdirs"
6564 EOF
6565 cat >> confdefs.h <<EOF
6566 #define BITMAPDIR "$bitmapdirs"
6567 EOF
6568 }
6569
6570
6571     echo "checking for X defines extracted by xmkmf" 1>&6
6572 echo "configure:6573: checking for X defines extracted by xmkmf" >&5
6573   rm -fr conftestdir
6574   if mkdir conftestdir; then
6575     cd conftestdir
6576     cat > Imakefile <<'EOF'
6577 xetest:
6578         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6579 EOF
6580     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6581       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6582       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6583     fi
6584     cd ..
6585     rm -fr conftestdir
6586     for word in $xmkmf_defines; do
6587       case "$word" in 
6588       -D__STDC__*) ;;
6589       -D* )
6590         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6591         case "$word" in
6592           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6593           *     ) val=1 ;;
6594         esac
6595         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6596           if test "$val" = "1"
6597             then { test "$extra_verbose" = "yes" && cat << EOF
6598     Defining $sym
6599 EOF
6600 cat >> confdefs.h <<EOF
6601 #define $sym 1
6602 EOF
6603 }
6604
6605             else { test "$extra_verbose" = "yes" && cat << EOF
6606     Defining $sym = $val
6607 EOF
6608 cat >> confdefs.h <<EOF
6609 #define $sym $val
6610 EOF
6611 }
6612
6613           fi
6614         fi  ;;
6615       esac
6616     done
6617   fi
6618
6619     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6620 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6621 echo "configure:6622: checking for X11/Intrinsic.h" >&5
6622
6623 cat > conftest.$ac_ext <<EOF
6624 #line 6625 "configure"
6625 #include "confdefs.h"
6626 #include <X11/Intrinsic.h>
6627 EOF
6628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6629 { (eval echo configure:6630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6631 if test -z "$ac_err"; then
6632   rm -rf conftest*
6633   eval "ac_cv_header_$ac_safe=yes"
6634 else
6635   echo "$ac_err" >&5
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   eval "ac_cv_header_$ac_safe=no"
6640 fi
6641 rm -f conftest*
6642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6643   echo "$ac_t""yes" 1>&6
6644   :
6645 else
6646   echo "$ac_t""no" 1>&6
6647 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6648 fi
6649
6650
6651       
6652 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6653 echo "configure:6654: checking for XOpenDisplay in -lX11" >&5
6654 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6655
6656 xe_check_libs=" -lX11 "
6657 cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 /* Override any gcc2 internal prototype to avoid an error.  */
6661 /* We use char because int might match the return type of a gcc2
6662     builtin and then its argument prototype would still apply.  */
6663 char XOpenDisplay();
6664
6665 int main() {
6666 XOpenDisplay()
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=yes"
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_lib_$ac_lib_var=no"
6677 fi
6678 rm -f conftest*
6679 xe_check_libs=""
6680
6681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6682   echo "$ac_t""yes" 1>&6
6683   have_lib_x11=yes
6684 else
6685   echo "$ac_t""no" 1>&6
6686 fi
6687
6688
6689   if test "$have_lib_x11" != "yes"; then
6690     
6691 xe_msg_checking="for XGetFontProperty in -lX11"
6692 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6693 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6694 echo "configure:6695: checking "$xe_msg_checking"" >&5
6695 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6696
6697 xe_check_libs=" -lX11 -b i486-linuxaout"
6698 cat > conftest.$ac_ext <<EOF
6699 #line 6700 "configure"
6700 #include "confdefs.h"
6701 /* Override any gcc2 internal prototype to avoid an error.  */
6702 /* We use char because int might match the return type of a gcc2
6703     builtin and then its argument prototype would still apply.  */
6704 char XGetFontProperty();
6705
6706 int main() {
6707 XGetFontProperty()
6708 ; return 0; }
6709 EOF
6710 if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6711   rm -rf conftest*
6712   eval "ac_cv_lib_$ac_lib_var=yes"
6713 else
6714   echo "configure: failed program was:" >&5
6715   cat conftest.$ac_ext >&5
6716   rm -rf conftest*
6717   eval "ac_cv_lib_$ac_lib_var=no"
6718 fi
6719 rm -f conftest*
6720 xe_check_libs=""
6721
6722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6723   echo "$ac_t""yes" 1>&6
6724   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6725 else
6726   echo "$ac_t""no" 1>&6
6727 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6728 fi
6729
6730
6731   fi
6732   libs_x="-lX11"
6733   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6734
6735     
6736 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6737 echo "configure:6738: checking for XShapeSelectInput in -lXext" >&5
6738 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6739
6740 xe_check_libs=" -lXext "
6741 cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* Override any gcc2 internal prototype to avoid an error.  */
6745 /* We use char because int might match the return type of a gcc2
6746     builtin and then its argument prototype would still apply.  */
6747 char XShapeSelectInput();
6748
6749 int main() {
6750 XShapeSelectInput()
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_lib_$ac_lib_var=no"
6761 fi
6762 rm -f conftest*
6763 xe_check_libs=""
6764
6765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6766   echo "$ac_t""yes" 1>&6
6767   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6768 else
6769   echo "$ac_t""no" 1>&6
6770 fi
6771
6772
6773
6774     
6775 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6776 echo "configure:6777: checking for XtOpenDisplay in -lXt" >&5
6777 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6778
6779 xe_check_libs=" -lXt "
6780 cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783 /* Override any gcc2 internal prototype to avoid an error.  */
6784 /* We use char because int might match the return type of a gcc2
6785     builtin and then its argument prototype would still apply.  */
6786 char XtOpenDisplay();
6787
6788 int main() {
6789 XtOpenDisplay()
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   eval "ac_cv_lib_$ac_lib_var=yes"
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798   rm -rf conftest*
6799   eval "ac_cv_lib_$ac_lib_var=no"
6800 fi
6801 rm -f conftest*
6802 xe_check_libs=""
6803
6804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6805   echo "$ac_t""yes" 1>&6
6806   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6807 else
6808   echo "$ac_t""no" 1>&6
6809 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6810 fi
6811
6812
6813
6814   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6815 echo "configure:6816: checking the version of X11 being used" >&5
6816   cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 #include <X11/Intrinsic.h>
6820     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6823 then
6824   ./conftest foobar; x11_release=$?
6825 else
6826   conftest_rc="$?"
6827   echo "configure: failed program was:" >&5
6828   cat conftest.$ac_ext >&5
6829   rm -fr conftest*
6830   x11_release=4
6831 fi
6832 rm -fr conftest*
6833   echo "$ac_t""R${x11_release}" 1>&6
6834   { test "$extra_verbose" = "yes" && cat << EOF
6835     Defining THIS_IS_X11R${x11_release}
6836 EOF
6837 cat >> confdefs.h <<EOF
6838 #define THIS_IS_X11R${x11_release} 1
6839 EOF
6840 }
6841
6842
6843   if test "${x11_release}" = "4"; then
6844     case "$with_widgets" in
6845       "" | "no") with_widgets=no ;;
6846       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6847     esac
6848   fi
6849
6850   for ac_func in XConvertCase
6851 do
6852 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6853 echo "configure:6854: checking for $ac_func" >&5
6854
6855 cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858 /* System header to define __stub macros and hopefully few prototypes,
6859     which can conflict with char $ac_func(); below.  */
6860 #include <assert.h>
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 /* We use char because int might match the return type of a gcc2
6863     builtin and then its argument prototype would still apply.  */
6864 char $ac_func();
6865
6866 int main() {
6867
6868 /* The GNU C library defines this for functions which it implements
6869     to always fail with ENOSYS.  Some functions are actually named
6870     something starting with __ and the normal name is an alias.  */
6871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6872 choke me
6873 #else
6874 $ac_func();
6875 #endif
6876
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_func_$ac_func=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_func_$ac_func=no"
6887 fi
6888 rm -f conftest*
6889
6890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6891   echo "$ac_t""yes" 1>&6
6892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6893   { test "$extra_verbose" = "yes" && cat << EOF
6894     Defining $ac_tr_func
6895 EOF
6896 cat >> confdefs.h <<EOF
6897 #define $ac_tr_func 1
6898 EOF
6899 }
6900  
6901 else
6902   echo "$ac_t""no" 1>&6
6903 fi
6904 done
6905
6906
6907   for ac_hdr in X11/Xlocale.h
6908 do
6909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6911 echo "configure:6912: checking for $ac_hdr" >&5
6912
6913 cat > conftest.$ac_ext <<EOF
6914 #line 6915 "configure"
6915 #include "confdefs.h"
6916 #include <$ac_hdr>
6917 EOF
6918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6919 { (eval echo configure:6920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6921 if test -z "$ac_err"; then
6922   rm -rf conftest*
6923   eval "ac_cv_header_$ac_safe=yes"
6924 else
6925   echo "$ac_err" >&5
6926   echo "configure: failed program was:" >&5
6927   cat conftest.$ac_ext >&5
6928   rm -rf conftest*
6929   eval "ac_cv_header_$ac_safe=no"
6930 fi
6931 rm -f conftest*
6932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6933   echo "$ac_t""yes" 1>&6
6934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6935   { test "$extra_verbose" = "yes" && cat << EOF
6936     Defining $ac_tr_hdr
6937 EOF
6938 cat >> confdefs.h <<EOF
6939 #define $ac_tr_hdr 1
6940 EOF
6941 }
6942  
6943 else
6944   echo "$ac_t""no" 1>&6
6945 fi
6946 done
6947
6948
6949     for ac_func in XRegisterIMInstantiateCallback
6950 do
6951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6952 echo "configure:6953: checking for $ac_func" >&5
6953
6954 cat > conftest.$ac_ext <<EOF
6955 #line 6956 "configure"
6956 #include "confdefs.h"
6957 /* System header to define __stub macros and hopefully few prototypes,
6958     which can conflict with char $ac_func(); below.  */
6959 #include <assert.h>
6960 /* Override any gcc2 internal prototype to avoid an error.  */
6961 /* We use char because int might match the return type of a gcc2
6962     builtin and then its argument prototype would still apply.  */
6963 char $ac_func();
6964
6965 int main() {
6966
6967 /* The GNU C library defines this for functions which it implements
6968     to always fail with ENOSYS.  Some functions are actually named
6969     something starting with __ and the normal name is an alias.  */
6970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6971 choke me
6972 #else
6973 $ac_func();
6974 #endif
6975
6976 ; return 0; }
6977 EOF
6978 if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6979   rm -rf conftest*
6980   eval "ac_cv_func_$ac_func=yes"
6981 else
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984   rm -rf conftest*
6985   eval "ac_cv_func_$ac_func=no"
6986 fi
6987 rm -f conftest*
6988
6989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6990   echo "$ac_t""yes" 1>&6
6991     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6992   { test "$extra_verbose" = "yes" && cat << EOF
6993     Defining $ac_tr_func
6994 EOF
6995 cat >> confdefs.h <<EOF
6996 #define $ac_tr_func 1
6997 EOF
6998 }
6999  
7000 else
7001   echo "$ac_t""no" 1>&6
7002 fi
7003 done
7004
7005   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7006 echo "configure:7007: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7007   cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010
7011 #define NeedFunctionPrototypes 1
7012 #include <X11/Xlib.h>
7013 extern Bool XRegisterIMInstantiateCallback(
7014    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7015
7016 int main() {
7017
7018 ; return 0; }
7019 EOF
7020 if { (eval echo configure:7021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7021   rm -rf conftest*
7022   echo "$ac_t""yes" 1>&6
7023 else
7024   echo "configure: failed program was:" >&5
7025   cat conftest.$ac_ext >&5
7026   rm -rf conftest*
7027   echo "$ac_t""no" 1>&6
7028    { test "$extra_verbose" = "yes" && cat << \EOF
7029     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7030 EOF
7031 cat >> confdefs.h <<\EOF
7032 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7033 EOF
7034 }
7035
7036 fi
7037 rm -f conftest*
7038
7039     test -z "$with_xmu" && { 
7040 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7041 echo "configure:7042: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7042 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7043
7044 xe_check_libs=" -lXmu "
7045 cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 /* Override any gcc2 internal prototype to avoid an error.  */
7049 /* We use char because int might match the return type of a gcc2
7050     builtin and then its argument prototype would still apply.  */
7051 char XmuReadBitmapDataFromFile();
7052
7053 int main() {
7054 XmuReadBitmapDataFromFile()
7055 ; return 0; }
7056 EOF
7057 if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7058   rm -rf conftest*
7059   eval "ac_cv_lib_$ac_lib_var=yes"
7060 else
7061   echo "configure: failed program was:" >&5
7062   cat conftest.$ac_ext >&5
7063   rm -rf conftest*
7064   eval "ac_cv_lib_$ac_lib_var=no"
7065 fi
7066 rm -f conftest*
7067 xe_check_libs=""
7068
7069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7070   echo "$ac_t""yes" 1>&6
7071   with_xmu=yes
7072 else
7073   echo "$ac_t""no" 1>&6
7074 with_xmu=no
7075 fi
7076
7077  }
7078   if test "$with_xmu" = "no"; then
7079     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7080    echo "    xemacs will be linked with \"xmu.o\""
7081  fi
7082   else
7083     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7084     { test "$extra_verbose" = "yes" && cat << \EOF
7085     Defining HAVE_XMU
7086 EOF
7087 cat >> confdefs.h <<\EOF
7088 #define HAVE_XMU 1
7089 EOF
7090 }
7091
7092   fi
7093
7094       
7095 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7096 echo "configure:7097: checking for main in -lXbsd" >&5
7097 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7098
7099 xe_check_libs=" -lXbsd "
7100 cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103
7104 int main() {
7105 main()
7106 ; return 0; }
7107 EOF
7108 if { (eval echo configure:7109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7109   rm -rf conftest*
7110   eval "ac_cv_lib_$ac_lib_var=yes"
7111 else
7112   echo "configure: failed program was:" >&5
7113   cat conftest.$ac_ext >&5
7114   rm -rf conftest*
7115   eval "ac_cv_lib_$ac_lib_var=no"
7116 fi
7117 rm -f conftest*
7118 xe_check_libs=""
7119
7120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7121   echo "$ac_t""yes" 1>&6
7122   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7123 else
7124   echo "$ac_t""no" 1>&6
7125 fi
7126
7127
7128
7129     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7130         if test "$GCC" = "yes"; then
7131                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7132 echo "configure:7133: checking for name of AIX gcc threads option" >&5
7133       case `$CC -v --help 2>&1` in
7134         *-mthreads*) aix_threads=-mthreads ;;
7135                   *) aix_threads=-pthread  ;;
7136       esac
7137       echo "$ac_t""$aix_threads" 1>&6
7138       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7139       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7140     else
7141             case "$CC" in *_r) : ;;
7142         *)
7143          xe_save_CC="$CC"
7144          CC="${CC}_r"
7145          echo $ac_n "checking size of short""... $ac_c" 1>&6
7146 echo "configure:7147: checking size of short" >&5
7147
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 #include <stdio.h>
7152 main()
7153 {
7154   FILE *f=fopen("conftestval", "w");
7155   if (!f) exit(1);
7156   fprintf(f, "%d\n", sizeof(short));
7157   exit(0);
7158 }
7159 EOF
7160 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7161 then
7162   ac_cv_sizeof_short=`cat conftestval`
7163 else
7164   conftest_rc="$?"
7165   echo "configure: failed program was:" >&5
7166   cat conftest.$ac_ext >&5
7167   rm -fr conftest*
7168   ac_cv_sizeof_short=0
7169 fi
7170 rm -fr conftest*
7171 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7172 { test "$extra_verbose" = "yes" && cat << EOF
7173     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7174 EOF
7175 cat >> confdefs.h <<EOF
7176 #define SIZEOF_SHORT $ac_cv_sizeof_short
7177 EOF
7178 }
7179
7180
7181          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7182       esac
7183     fi
7184   fi
7185
7186 fi 
7187 if test "$with_msw" != "no"; then
7188   echo "checking for MS-Windows" 1>&6
7189 echo "configure:7190: checking for MS-Windows" >&5
7190   
7191 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7192 echo "configure:7193: checking for main in -lgdi32" >&5
7193 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7194
7195 xe_check_libs=" -lgdi32 "
7196 cat > conftest.$ac_ext <<EOF
7197 #line 7198 "configure"
7198 #include "confdefs.h"
7199
7200 int main() {
7201 main()
7202 ; return 0; }
7203 EOF
7204 if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7205   rm -rf conftest*
7206   eval "ac_cv_lib_$ac_lib_var=yes"
7207 else
7208   echo "configure: failed program was:" >&5
7209   cat conftest.$ac_ext >&5
7210   rm -rf conftest*
7211   eval "ac_cv_lib_$ac_lib_var=no"
7212 fi
7213 rm -f conftest*
7214 xe_check_libs=""
7215
7216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7217   echo "$ac_t""yes" 1>&6
7218   with_msw=yes
7219 else
7220   echo "$ac_t""no" 1>&6
7221 fi
7222
7223
7224   if test "$with_msw" = "yes"; then
7225     { test "$extra_verbose" = "yes" && cat << \EOF
7226     Defining HAVE_MS_WINDOWS
7227 EOF
7228 cat >> confdefs.h <<\EOF
7229 #define HAVE_MS_WINDOWS 1
7230 EOF
7231 }
7232
7233
7234         if test "$with_netinstall" = "yes"; then
7235       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7236       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7237       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7238     fi
7239
7240     install_pp="$srcdir/lib-src/installexe.sh"
7241     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
7242     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7243     if test "$window_system" != x11; then
7244         window_system=msw
7245         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7246             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7247    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7248  fi
7249         test "$with_menubars"   != "no" && with_menubars=msw \
7250             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7251    echo "    xemacs will be linked with \"menubar-msw.o\""
7252  fi
7253         test "$with_toolbars"   != "no" && with_toolbars=msw \
7254             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7255    echo "    xemacs will be linked with \"toolbar-msw.o\""
7256  fi
7257         test "$with_dialogs"   != "no" && with_dialogs=msw \
7258             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7259    echo "    xemacs will be linked with \"dialog-msw.o\""
7260  fi
7261         test "$with_widgets"   != "no" && with_widgets=msw
7262     else
7263         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7264    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7265  fi
7266         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7267    echo "    xemacs will be linked with \"menubar-msw.o\""
7268  fi
7269         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7270    echo "    xemacs will be linked with \"toolbar-msw.o\""
7271  fi
7272         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7273    echo "    xemacs will be linked with \"dialog-msw.o\""
7274  fi
7275     fi
7276         cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 #include <fcntl.h>
7280     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7281 EOF
7282 if { (eval echo configure:7283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7283 then
7284   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7285     Defining HAVE_MSG_SELECT
7286 EOF
7287 cat >> confdefs.h <<\EOF
7288 #define HAVE_MSG_SELECT 1
7289 EOF
7290 }
7291
7292 else
7293   conftest_rc="$?"
7294   echo "configure: failed program was:" >&5
7295   cat conftest.$ac_ext >&5
7296 fi
7297 rm -fr conftest*
7298     with_file_coding=yes
7299     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
7300    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\""
7301  fi
7302   fi
7303 fi
7304
7305
7306
7307 test -z "$window_system" && window_system="none"
7308
7309 if test "$window_system" = "none"; then
7310   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7311   do
7312     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7313        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7314     fi
7315     eval "with_${feature}=no"
7316   done
7317 else
7318   test -z "$with_toolbars" && with_toolbars=yes
7319 fi
7320
7321 if test "$with_msw" != "yes"; then
7322   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7323   do
7324     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7325        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7326     fi
7327     eval "with_${feature}=no"
7328   done
7329 else
7330   :
7331 fi
7332
7333 if test "$with_x11" != "yes"; then
7334             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7335   do
7336     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7337        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7338     fi
7339     eval "with_${feature}=no"
7340   done
7341 fi
7342
7343 if test "$with_x11" = "yes"; then
7344   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7345 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7346 echo "configure:7347: checking for X11/extensions/shape.h" >&5
7347
7348 cat > conftest.$ac_ext <<EOF
7349 #line 7350 "configure"
7350 #include "confdefs.h"
7351 #include <X11/extensions/shape.h>
7352 EOF
7353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7354 { (eval echo configure:7355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7356 if test -z "$ac_err"; then
7357   rm -rf conftest*
7358   eval "ac_cv_header_$ac_safe=yes"
7359 else
7360   echo "$ac_err" >&5
7361   echo "configure: failed program was:" >&5
7362   cat conftest.$ac_ext >&5
7363   rm -rf conftest*
7364   eval "ac_cv_header_$ac_safe=no"
7365 fi
7366 rm -f conftest*
7367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369   
7370    { test "$extra_verbose" = "yes" && cat << \EOF
7371     Defining HAVE_BALLOON_HELP
7372 EOF
7373 cat >> confdefs.h <<\EOF
7374 #define HAVE_BALLOON_HELP 1
7375 EOF
7376 }
7377
7378    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7379    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7380  fi
7381 else
7382   echo "$ac_t""no" 1>&6
7383 fi
7384
7385 fi
7386
7387 bitmapdir=
7388
7389 case "$window_system" in
7390   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7391   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7392   gtk  )
7393        HAVE_X_WINDOWS=no
7394        test "$with_gnome" = "yes" && echo "  Using GNOME."
7395        test "$with_gnome" = "no" && echo "  Using GTK."
7396        ;;
7397   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7398 esac
7399
7400 case "$x_libraries" in *X11R4* )
7401   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7402   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7403 esac
7404
7405 echo "checking for WM_COMMAND option" 1>&6
7406 echo "configure:7407: checking for WM_COMMAND option" >&5;
7407 if test "$with_wmcommand" != "no"; then
7408   { test "$extra_verbose" = "yes" && cat << \EOF
7409     Defining HAVE_WMCOMMAND
7410 EOF
7411 cat >> confdefs.h <<\EOF
7412 #define HAVE_WMCOMMAND 1
7413 EOF
7414 }
7415
7416 fi
7417
7418 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7419 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7420 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7421 echo "configure:7422: checking for X11/Xauth.h" >&5
7422
7423 cat > conftest.$ac_ext <<EOF
7424 #line 7425 "configure"
7425 #include "confdefs.h"
7426 #include <X11/Xauth.h>
7427 EOF
7428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7429 { (eval echo configure:7430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7431 if test -z "$ac_err"; then
7432   rm -rf conftest*
7433   eval "ac_cv_header_$ac_safe=yes"
7434 else
7435   echo "$ac_err" >&5
7436   echo "configure: failed program was:" >&5
7437   cat conftest.$ac_ext >&5
7438   rm -rf conftest*
7439   eval "ac_cv_header_$ac_safe=no"
7440 fi
7441 rm -f conftest*
7442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7443   echo "$ac_t""yes" 1>&6
7444   :
7445 else
7446   echo "$ac_t""no" 1>&6
7447 with_xauth=no
7448 fi
7449  }
7450 test -z "$with_xauth" && { 
7451 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7452 echo "configure:7453: checking for XauGetAuthByAddr in -lXau" >&5
7453 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7454
7455 xe_check_libs=" -lXau "
7456 cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* Override any gcc2 internal prototype to avoid an error.  */
7460 /* We use char because int might match the return type of a gcc2
7461     builtin and then its argument prototype would still apply.  */
7462 char XauGetAuthByAddr();
7463
7464 int main() {
7465 XauGetAuthByAddr()
7466 ; return 0; }
7467 EOF
7468 if { (eval echo configure:7469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7469   rm -rf conftest*
7470   eval "ac_cv_lib_$ac_lib_var=yes"
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -rf conftest*
7475   eval "ac_cv_lib_$ac_lib_var=no"
7476 fi
7477 rm -f conftest*
7478 xe_check_libs=""
7479
7480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7481   echo "$ac_t""yes" 1>&6
7482   :
7483 else
7484   echo "$ac_t""no" 1>&6
7485 with_xauth=no
7486 fi
7487
7488  }
7489 test -z "$with_xauth" && with_xauth=yes
7490 if test "$with_xauth" = "yes"; then
7491   { test "$extra_verbose" = "yes" && cat << \EOF
7492     Defining HAVE_XAUTH
7493 EOF
7494 cat >> confdefs.h <<\EOF
7495 #define HAVE_XAUTH 1
7496 EOF
7497 }
7498
7499   
7500 T=""
7501 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
7502 libs_xauth="$T"
7503
7504 fi
7505
7506
7507
7508
7509 if test "$with_tooltalk" != "no" ; then
7510       for dir in "" "Tt/" "desktop/" ; do
7511     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7512 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7513 echo "configure:7514: checking for ${dir}tt_c.h" >&5
7514
7515 cat > conftest.$ac_ext <<EOF
7516 #line 7517 "configure"
7517 #include "confdefs.h"
7518 #include <${dir}tt_c.h>
7519 EOF
7520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7521 { (eval echo configure:7522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7523 if test -z "$ac_err"; then
7524   rm -rf conftest*
7525   eval "ac_cv_header_$ac_safe=yes"
7526 else
7527   echo "$ac_err" >&5
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   eval "ac_cv_header_$ac_safe=no"
7532 fi
7533 rm -f conftest*
7534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7535   echo "$ac_t""yes" 1>&6
7536   tt_c_h_file="${dir}tt_c.h"; break
7537 else
7538   echo "$ac_t""no" 1>&6
7539 fi
7540
7541   done
7542   if test -z "$tt_c_h_file"; then
7543     if test "$with_tooltalk" = "yes"; then
7544       (echo "$progname: Usage error:"
7545 echo " " "Unable to find required tooltalk header files."
7546 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7547     fi
7548     with_tooltalk=no
7549   fi
7550 fi
7551 if test "$with_tooltalk" != "no" ; then
7552   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7553     
7554 xe_msg_checking="for tt_message_create in -ltt"
7555 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7556 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7557 echo "configure:7558: checking "$xe_msg_checking"" >&5
7558 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7559
7560 xe_check_libs=" -ltt $extra_libs"
7561 cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 /* Override any gcc2 internal prototype to avoid an error.  */
7565 /* We use char because int might match the return type of a gcc2
7566     builtin and then its argument prototype would still apply.  */
7567 char tt_message_create();
7568
7569 int main() {
7570 tt_message_create()
7571 ; return 0; }
7572 EOF
7573 if { (eval echo configure:7574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7574   rm -rf conftest*
7575   eval "ac_cv_lib_$ac_lib_var=yes"
7576 else
7577   echo "configure: failed program was:" >&5
7578   cat conftest.$ac_ext >&5
7579   rm -rf conftest*
7580   eval "ac_cv_lib_$ac_lib_var=no"
7581 fi
7582 rm -f conftest*
7583 xe_check_libs=""
7584
7585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7586   echo "$ac_t""yes" 1>&6
7587   tt_libs="-ltt $extra_libs"; break
7588 else
7589   echo "$ac_t""no" 1>&6
7590 :
7591 fi
7592
7593
7594   done
7595   if test -z "$tt_libs"; then
7596     if test "$with_tooltalk" = "yes"; then
7597       (echo "$progname: Usage error:"
7598 echo " " "Unable to find required tooltalk libraries."
7599 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7600     fi
7601     with_tooltalk=no
7602   fi
7603 fi
7604 test -z "$with_tooltalk" && with_tooltalk=yes
7605 if test "$with_tooltalk" = "yes"; then
7606   { test "$extra_verbose" = "yes" && cat << \EOF
7607     Defining TOOLTALK
7608 EOF
7609 cat >> confdefs.h <<\EOF
7610 #define TOOLTALK 1
7611 EOF
7612 }
7613
7614   { test "$extra_verbose" = "yes" && cat << EOF
7615     Defining TT_C_H_FILE = "$tt_c_h_file"
7616 EOF
7617 cat >> confdefs.h <<EOF
7618 #define TT_C_H_FILE "$tt_c_h_file"
7619 EOF
7620 }
7621
7622   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7623   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7624    echo "    xemacs will be linked with \"tooltalk.o\""
7625  fi
7626 fi
7627
7628 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7629 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7630 echo "configure:7631: checking for Dt/Dt.h" >&5
7631
7632 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 #include <Dt/Dt.h>
7636 EOF
7637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7638 { (eval echo configure:7639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7640 if test -z "$ac_err"; then
7641   rm -rf conftest*
7642   eval "ac_cv_header_$ac_safe=yes"
7643 else
7644   echo "$ac_err" >&5
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_header_$ac_safe=no"
7649 fi
7650 rm -f conftest*
7651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7652   echo "$ac_t""yes" 1>&6
7653   :
7654 else
7655   echo "$ac_t""no" 1>&6
7656 with_cde=no
7657 fi
7658  }
7659 test -z "$with_cde" && { 
7660 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7661 echo "configure:7662: checking for DtDndDragStart in -lDtSvc" >&5
7662 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7663
7664 xe_check_libs=" -lDtSvc "
7665 cat > conftest.$ac_ext <<EOF
7666 #line 7667 "configure"
7667 #include "confdefs.h"
7668 /* Override any gcc2 internal prototype to avoid an error.  */
7669 /* We use char because int might match the return type of a gcc2
7670     builtin and then its argument prototype would still apply.  */
7671 char DtDndDragStart();
7672
7673 int main() {
7674 DtDndDragStart()
7675 ; return 0; }
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=yes"
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   eval "ac_cv_lib_$ac_lib_var=no"
7685 fi
7686 rm -f conftest*
7687 xe_check_libs=""
7688
7689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7690   echo "$ac_t""yes" 1>&6
7691   :
7692 else
7693   echo "$ac_t""no" 1>&6
7694 with_cde=no
7695 fi
7696
7697  }
7698 test -z "$with_cde" && with_cde=yes
7699 if test "$with_dragndrop" = no; then
7700   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7701   with_cde=no
7702 fi
7703 if test "$with_cde" = "yes" ; then
7704   { test "$extra_verbose" = "yes" && cat << \EOF
7705     Defining HAVE_CDE
7706 EOF
7707 cat >> confdefs.h <<\EOF
7708 #define HAVE_CDE 1
7709 EOF
7710 }
7711
7712   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7713   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7714   with_tooltalk=yes # CDE requires Tooltalk
7715   need_motif=yes    # CDE requires Motif
7716 fi
7717
7718 test "$window_system" != "x11" && with_offix=no
7719 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7720   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7721   with_offix=no
7722 fi
7723 if test "$with_dragndrop" = no; then
7724   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7725   with_offix=no
7726 fi
7727 if test "$with_cde" = yes; then
7728   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7729   with_offix=no
7730 fi
7731 test -z "$with_offix" && with_offix=no
7732 if test "$with_offix" = "yes"; then
7733   { test "$extra_verbose" = "yes" && cat << \EOF
7734     Defining HAVE_OFFIX_DND
7735 EOF
7736 cat >> confdefs.h <<\EOF
7737 #define HAVE_OFFIX_DND 1
7738 EOF
7739 }
7740
7741   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7742   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7743 fi
7744 if test "$with_gtk" = "yes"; then
7745    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7746 fi
7747
7748 if test "$with_dragndrop" != "no" ; then
7749   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7750 echo "configure:7751: checking if drag and drop API is needed" >&5
7751   if test -n "$dragndrop_proto" ; then
7752     with_dragndrop=yes
7753     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7754     { test "$extra_verbose" = "yes" && cat << \EOF
7755     Defining HAVE_DRAGNDROP
7756 EOF
7757 cat >> confdefs.h <<\EOF
7758 #define HAVE_DRAGNDROP 1
7759 EOF
7760 }
7761
7762     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7763   else
7764     with_dragndrop=no
7765     echo "$ac_t""no" 1>&6
7766   fi
7767 fi
7768
7769 echo "checking for LDAP" 1>&6
7770 echo "configure:7771: checking for LDAP" >&5
7771 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7772 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7773 echo "configure:7774: checking for ldap.h" >&5
7774
7775 cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778 #include <ldap.h>
7779 EOF
7780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7781 { (eval echo configure:7782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7783 if test -z "$ac_err"; then
7784   rm -rf conftest*
7785   eval "ac_cv_header_$ac_safe=yes"
7786 else
7787   echo "$ac_err" >&5
7788   echo "configure: failed program was:" >&5
7789   cat conftest.$ac_ext >&5
7790   rm -rf conftest*
7791   eval "ac_cv_header_$ac_safe=no"
7792 fi
7793 rm -f conftest*
7794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7795   echo "$ac_t""yes" 1>&6
7796   :
7797 else
7798   echo "$ac_t""no" 1>&6
7799 with_ldap=no
7800 fi
7801  }
7802 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7803 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7804 echo "configure:7805: checking for lber.h" >&5
7805
7806 cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 #include <lber.h>
7810 EOF
7811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7812 { (eval echo configure:7813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7814 if test -z "$ac_err"; then
7815   rm -rf conftest*
7816   eval "ac_cv_header_$ac_safe=yes"
7817 else
7818   echo "$ac_err" >&5
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   eval "ac_cv_header_$ac_safe=no"
7823 fi
7824 rm -f conftest*
7825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7826   echo "$ac_t""yes" 1>&6
7827   :
7828 else
7829   echo "$ac_t""no" 1>&6
7830 with_ldap=no
7831 fi
7832  }
7833 if test "$with_ldap" != "no"; then
7834   
7835 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7836 echo "configure:7837: checking for ldap_search in -lldap" >&5
7837 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7838
7839 xe_check_libs=" -lldap "
7840 cat > conftest.$ac_ext <<EOF
7841 #line 7842 "configure"
7842 #include "confdefs.h"
7843 /* Override any gcc2 internal prototype to avoid an error.  */
7844 /* We use char because int might match the return type of a gcc2
7845     builtin and then its argument prototype would still apply.  */
7846 char ldap_search();
7847
7848 int main() {
7849 ldap_search()
7850 ; return 0; }
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7853   rm -rf conftest*
7854   eval "ac_cv_lib_$ac_lib_var=yes"
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   eval "ac_cv_lib_$ac_lib_var=no"
7860 fi
7861 rm -f conftest*
7862 xe_check_libs=""
7863
7864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7865   echo "$ac_t""yes" 1>&6
7866   with_ldap=yes
7867 else
7868   echo "$ac_t""no" 1>&6
7869 fi
7870
7871
7872     test "$with_ldap" != "yes" && { 
7873 xe_msg_checking="for ldap_open in -lldap"
7874 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7875 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7876 echo "configure:7877: checking "$xe_msg_checking"" >&5
7877 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7878
7879 xe_check_libs=" -lldap -llber"
7880 cat > conftest.$ac_ext <<EOF
7881 #line 7882 "configure"
7882 #include "confdefs.h"
7883 /* Override any gcc2 internal prototype to avoid an error.  */
7884 /* We use char because int might match the return type of a gcc2
7885     builtin and then its argument prototype would still apply.  */
7886 char ldap_open();
7887
7888 int main() {
7889 ldap_open()
7890 ; return 0; }
7891 EOF
7892 if { (eval echo configure:7893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7893   rm -rf conftest*
7894   eval "ac_cv_lib_$ac_lib_var=yes"
7895 else
7896   echo "configure: failed program was:" >&5
7897   cat conftest.$ac_ext >&5
7898   rm -rf conftest*
7899   eval "ac_cv_lib_$ac_lib_var=no"
7900 fi
7901 rm -f conftest*
7902 xe_check_libs=""
7903
7904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7905   echo "$ac_t""yes" 1>&6
7906   with_ldap=yes with_ldap_lber=yes
7907 else
7908   echo "$ac_t""no" 1>&6
7909 fi
7910
7911  }
7912   test "$with_ldap" != "yes" && { 
7913 xe_msg_checking="for ldap_open in -lldap"
7914 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7915 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7916 echo "configure:7917: checking "$xe_msg_checking"" >&5
7917 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7918
7919 xe_check_libs=" -lldap -llber -lkrb"
7920 cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923 /* Override any gcc2 internal prototype to avoid an error.  */
7924 /* We use char because int might match the return type of a gcc2
7925     builtin and then its argument prototype would still apply.  */
7926 char ldap_open();
7927
7928 int main() {
7929 ldap_open()
7930 ; return 0; }
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7933   rm -rf conftest*
7934   eval "ac_cv_lib_$ac_lib_var=yes"
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -rf conftest*
7939   eval "ac_cv_lib_$ac_lib_var=no"
7940 fi
7941 rm -f conftest*
7942 xe_check_libs=""
7943
7944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7945   echo "$ac_t""yes" 1>&6
7946   with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes
7947 else
7948   echo "$ac_t""no" 1>&6
7949 fi
7950
7951  }
7952   test "$with_ldap" != "yes" && { 
7953 xe_msg_checking="for ldap_open in -lldap"
7954 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7955 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7956 echo "configure:7957: checking "$xe_msg_checking"" >&5
7957 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7958
7959 xe_check_libs=" -lldap -llber -lkrb -ldes"
7960 cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 /* We use char because int might match the return type of a gcc2
7965     builtin and then its argument prototype would still apply.  */
7966 char ldap_open();
7967
7968 int main() {
7969 ldap_open()
7970 ; return 0; }
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=yes"
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   eval "ac_cv_lib_$ac_lib_var=no"
7980 fi
7981 rm -f conftest*
7982 xe_check_libs=""
7983
7984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7985   echo "$ac_t""yes" 1>&6
7986   with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes
7987 else
7988   echo "$ac_t""no" 1>&6
7989 fi
7990
7991  }
7992               test "$with_ldap_lber" != "yes" && { 
7993 echo $ac_n "checking for ber_pvt_opt_on in -llber""... $ac_c" 1>&6
7994 echo "configure:7995: checking for ber_pvt_opt_on in -llber" >&5
7995 ac_lib_var=`echo lber'_'ber_pvt_opt_on | sed 'y%./+-%__p_%'`
7996
7997 xe_check_libs=" -llber "
7998 cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* Override any gcc2 internal prototype to avoid an error.  */
8002 /* We use char because int might match the return type of a gcc2
8003     builtin and then its argument prototype would still apply.  */
8004 char ber_pvt_opt_on();
8005
8006 int main() {
8007 ber_pvt_opt_on()
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8011   rm -rf conftest*
8012   eval "ac_cv_lib_$ac_lib_var=yes"
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   eval "ac_cv_lib_$ac_lib_var=no"
8018 fi
8019 rm -f conftest*
8020 xe_check_libs=""
8021
8022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8023   echo "$ac_t""yes" 1>&6
8024   with_ldap_lber=yes
8025 else
8026   echo "$ac_t""no" 1>&6
8027 fi
8028
8029  }
8030 fi
8031 if test "$with_ldap" = "yes"; then
8032   { test "$extra_verbose" = "yes" && cat << \EOF
8033     Defining HAVE_LDAP
8034 EOF
8035 cat >> confdefs.h <<\EOF
8036 #define HAVE_LDAP 1
8037 EOF
8038 }
8039
8040   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8041    echo "    xemacs will be linked with \"eldap.o\""
8042  fi
8043   if test "$with_ldap_des" = "yes" ; then
8044     LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8045   fi
8046   if test "$with_ldap_krb" = "yes" ; then
8047     LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8048   fi
8049   if test "$with_ldap_lber" = "yes" ; then
8050     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8051   fi
8052   LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8053   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8054 do
8055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8056 echo "configure:8057: checking for $ac_func" >&5
8057
8058 cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* System header to define __stub macros and hopefully few prototypes,
8062     which can conflict with char $ac_func(); below.  */
8063 #include <assert.h>
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char $ac_func();
8068
8069 int main() {
8070
8071 /* The GNU C library defines this for functions which it implements
8072     to always fail with ENOSYS.  Some functions are actually named
8073     something starting with __ and the normal name is an alias.  */
8074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8075 choke me
8076 #else
8077 $ac_func();
8078 #endif
8079
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   eval "ac_cv_func_$ac_func=yes"
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   eval "ac_cv_func_$ac_func=no"
8090 fi
8091 rm -f conftest*
8092
8093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8094   echo "$ac_t""yes" 1>&6
8095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8096   { test "$extra_verbose" = "yes" && cat << EOF
8097     Defining $ac_tr_func
8098 EOF
8099 cat >> confdefs.h <<EOF
8100 #define $ac_tr_func 1
8101 EOF
8102 }
8103  
8104 else
8105   echo "$ac_t""no" 1>&6
8106 fi
8107 done
8108
8109 fi
8110
8111 if test "$with_postgresql" != "no"; then
8112   echo "checking for PostgreSQL" 1>&6
8113 echo "configure:8114: checking for PostgreSQL" >&5
8114
8115   for header_dir in "" "pgsql/" "postgresql/"; do
8116     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8117 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8118 echo "configure:8119: checking for ${header_dir}libpq-fe.h" >&5
8119
8120 cat > conftest.$ac_ext <<EOF
8121 #line 8122 "configure"
8122 #include "confdefs.h"
8123 #include <${header_dir}libpq-fe.h>
8124 EOF
8125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8126 { (eval echo configure:8127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8128 if test -z "$ac_err"; then
8129   rm -rf conftest*
8130   eval "ac_cv_header_$ac_safe=yes"
8131 else
8132   echo "$ac_err" >&5
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   eval "ac_cv_header_$ac_safe=no"
8137 fi
8138 rm -f conftest*
8139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8140   echo "$ac_t""yes" 1>&6
8141   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8142 else
8143   echo "$ac_t""no" 1>&6
8144 fi
8145
8146   done
8147
8148   test -n "$libpq_fe_h_file" && { 
8149 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8150 echo "configure:8151: checking for PQconnectdb in -lpq" >&5
8151 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8152
8153 xe_check_libs=" -lpq "
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* Override any gcc2 internal prototype to avoid an error.  */
8158 /* We use char because int might match the return type of a gcc2
8159     builtin and then its argument prototype would still apply.  */
8160 char PQconnectdb();
8161
8162 int main() {
8163 PQconnectdb()
8164 ; return 0; }
8165 EOF
8166 if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=yes"
8169 else
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   eval "ac_cv_lib_$ac_lib_var=no"
8174 fi
8175 rm -f conftest*
8176 xe_check_libs=""
8177
8178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8179   echo "$ac_t""yes" 1>&6
8180   have_libpq=yes
8181 else
8182   echo "$ac_t""no" 1>&6
8183 fi
8184
8185  }
8186
8187   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8188     with_postgresql=yes
8189     { test "$extra_verbose" = "yes" && cat << \EOF
8190     Defining HAVE_POSTGRESQL
8191 EOF
8192 cat >> confdefs.h <<\EOF
8193 #define HAVE_POSTGRESQL 1
8194 EOF
8195 }
8196
8197     
8198 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8199 echo "configure:8200: checking for PQconnectStart in -lpq" >&5
8200 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8201
8202 xe_check_libs=" -lpq "
8203 cat > conftest.$ac_ext <<EOF
8204 #line 8205 "configure"
8205 #include "confdefs.h"
8206 /* Override any gcc2 internal prototype to avoid an error.  */
8207 /* We use char because int might match the return type of a gcc2
8208     builtin and then its argument prototype would still apply.  */
8209 char PQconnectStart();
8210
8211 int main() {
8212 PQconnectStart()
8213 ; return 0; }
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8216   rm -rf conftest*
8217   eval "ac_cv_lib_$ac_lib_var=yes"
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   eval "ac_cv_lib_$ac_lib_var=no"
8223 fi
8224 rm -f conftest*
8225 xe_check_libs=""
8226
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8228   echo "$ac_t""yes" 1>&6
8229   with_postgresqlv7=yes;
8230                  { test "$extra_verbose" = "yes" && cat << \EOF
8231     Defining HAVE_POSTGRESQLV7
8232 EOF
8233 cat >> confdefs.h <<\EOF
8234 #define HAVE_POSTGRESQLV7 1
8235 EOF
8236 }
8237
8238 else
8239   echo "$ac_t""no" 1>&6
8240 fi
8241
8242
8243     { test "$extra_verbose" = "yes" && cat << EOF
8244     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8245 EOF
8246 cat >> confdefs.h <<EOF
8247 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8248 EOF
8249 }
8250
8251     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8252     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8253    echo "    xemacs will be linked with \"postgresql.o\""
8254  fi
8255   elif test "$with_postgresql" = "yes"; then
8256     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8257   fi
8258 fi
8259
8260
8261 if test "$window_system" != "none"; then
8262   echo "checking for graphics libraries" 1>&6
8263 echo "configure:8264: checking for graphics libraries" >&5
8264
8265       libpath_xpm=
8266   incpath_xpm=
8267   case "$opsys" in 
8268     cygwin*)
8269       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8270       cygwin_top=`eval "dirname ${cygwin_top}"`;
8271       cygwin_top="${cygwin_top}/..";
8272       case "$window_system" in
8273                 x11)  ;;
8274                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8275              incpath_xpm="-I${cygwin_top}/include/noX"
8276               ;;
8277                 gtk)  ;;
8278                 none) ;;
8279                 *)    ;;
8280       esac
8281       ;;
8282         *) ;;
8283   esac
8284     xpm_problem=""
8285   if test -z "$with_xpm"; then
8286     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8287     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8288     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8289 echo "configure:8290: checking for Xpm - no older than 3.4f" >&5
8290     xe_check_libs=-lXpm
8291     cat > conftest.$ac_ext <<EOF
8292 #line 8293 "configure"
8293 #include "confdefs.h"
8294 #define XPM_NUMBERS
8295 #include <X11/xpm.h>
8296     int main(int c, char **v) {
8297     return c == 1 ? 0 :
8298       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8299       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8302 then
8303   ./conftest dummy_arg; xpm_status=$?;
8304       if test "$xpm_status" = "0"; then
8305         with_xpm=yes;
8306       else
8307         with_xpm=no;
8308         if test "$xpm_status" = "1"; then
8309           xpm_problem="Xpm library version and header file version don't match!"
8310         elif test "$xpm_status" = "2"; then
8311           xpm_problem="Xpm library version is too old!"
8312         else
8313           xpm_problem="Internal xpm detection logic error!"
8314         fi
8315         echo "
8316 *** WARNING *** $xpm_problem
8317   I'm not touching that with a 10-foot pole!
8318   If you really want to use the installed version of Xpm, rerun
8319   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8320     fi
8321 else
8322   conftest_rc="$?"
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -fr conftest*
8326   with_xpm=no
8327 fi
8328 rm -fr conftest*
8329     xe_check_libs=
8330     echo "$ac_t""$with_xpm" 1>&6
8331   fi
8332   if test "$with_xpm" = "yes"; then
8333                 { test "$extra_verbose" = "yes" && cat << \EOF
8334     Defining HAVE_XPM
8335 EOF
8336 cat >> confdefs.h <<\EOF
8337 #define HAVE_XPM 1
8338 EOF
8339 }
8340
8341     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8342     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8343     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8344     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8345 echo "configure:8346: checking for \"FOR_MSW\" xpm" >&5
8346     xe_check_libs=-lXpm
8347     cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350
8351 int main() {
8352 XpmCreatePixmapFromData()
8353 ; return 0; }
8354 EOF
8355 if { (eval echo configure:8356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8356   rm -rf conftest*
8357   xpm_for_msw=no
8358 else
8359   echo "configure: failed program was:" >&5
8360   cat conftest.$ac_ext >&5
8361   rm -rf conftest*
8362   xpm_for_msw=yes
8363 fi
8364 rm -f conftest*
8365     xe_check_libs=
8366     echo "$ac_t""$xpm_for_msw" 1>&6
8367     if test "$xpm_for_msw" = "yes"; then
8368       { test "$extra_verbose" = "yes" && cat << \EOF
8369     Defining FOR_MSW
8370 EOF
8371 cat >> confdefs.h <<\EOF
8372 #define FOR_MSW 1
8373 EOF
8374 }
8375
8376     fi
8377   fi
8378
8379     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8380 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8381 echo "configure:8382: checking for compface.h" >&5
8382
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 #include <compface.h>
8387 EOF
8388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8389 { (eval echo configure:8390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8391 if test -z "$ac_err"; then
8392   rm -rf conftest*
8393   eval "ac_cv_header_$ac_safe=yes"
8394 else
8395   echo "$ac_err" >&5
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   eval "ac_cv_header_$ac_safe=no"
8400 fi
8401 rm -f conftest*
8402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8403   echo "$ac_t""yes" 1>&6
8404   :
8405 else
8406   echo "$ac_t""no" 1>&6
8407 with_xface=no
8408 fi
8409  }
8410   test -z "$with_xface" && { 
8411 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8412 echo "configure:8413: checking for UnGenFace in -lcompface" >&5
8413 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8414
8415 xe_check_libs=" -lcompface "
8416 cat > conftest.$ac_ext <<EOF
8417 #line 8418 "configure"
8418 #include "confdefs.h"
8419 /* Override any gcc2 internal prototype to avoid an error.  */
8420 /* We use char because int might match the return type of a gcc2
8421     builtin and then its argument prototype would still apply.  */
8422 char UnGenFace();
8423
8424 int main() {
8425 UnGenFace()
8426 ; return 0; }
8427 EOF
8428 if { (eval echo configure:8429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8429   rm -rf conftest*
8430   eval "ac_cv_lib_$ac_lib_var=yes"
8431 else
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=no"
8436 fi
8437 rm -f conftest*
8438 xe_check_libs=""
8439
8440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8441   echo "$ac_t""yes" 1>&6
8442   : 
8443 else
8444   echo "$ac_t""no" 1>&6
8445 with_xface=no
8446 fi
8447
8448  }
8449   test -z "$with_xface" && with_xface=yes
8450   if test "$with_xface" = "yes"; then
8451     { test "$extra_verbose" = "yes" && cat << \EOF
8452     Defining HAVE_XFACE
8453 EOF
8454 cat >> confdefs.h <<\EOF
8455 #define HAVE_XFACE 1
8456 EOF
8457 }
8458
8459     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8460   fi
8461
8462         if test "$with_gif" != "no"; then
8463     with_gif="yes"
8464     { test "$extra_verbose" = "yes" && cat << \EOF
8465     Defining HAVE_GIF
8466 EOF
8467 cat >> confdefs.h <<\EOF
8468 #define HAVE_GIF 1
8469 EOF
8470 }
8471
8472     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8473    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8474  fi
8475   fi
8476
8477       if test "$with_png $with_tiff" != "no no"; then
8478     
8479 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8480 echo "configure:8481: checking for inflate in -lc" >&5
8481 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8482
8483 xe_check_libs=" -lc "
8484 cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 /* Override any gcc2 internal prototype to avoid an error.  */
8488 /* We use char because int might match the return type of a gcc2
8489     builtin and then its argument prototype would still apply.  */
8490 char inflate();
8491
8492 int main() {
8493 inflate()
8494 ; return 0; }
8495 EOF
8496 if { (eval echo configure:8497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8497   rm -rf conftest*
8498   eval "ac_cv_lib_$ac_lib_var=yes"
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   eval "ac_cv_lib_$ac_lib_var=no"
8504 fi
8505 rm -f conftest*
8506 xe_check_libs=""
8507
8508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8509   echo "$ac_t""yes" 1>&6
8510   :
8511 else
8512   echo "$ac_t""no" 1>&6
8513
8514 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8515 echo "configure:8516: checking for inflate in -lz" >&5
8516 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8517
8518 xe_check_libs=" -lz "
8519 cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* Override any gcc2 internal prototype to avoid an error.  */
8523 /* We use char because int might match the return type of a gcc2
8524     builtin and then its argument prototype would still apply.  */
8525 char inflate();
8526
8527 int main() {
8528 inflate()
8529 ; return 0; }
8530 EOF
8531 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8532   rm -rf conftest*
8533   eval "ac_cv_lib_$ac_lib_var=yes"
8534 else
8535   echo "configure: failed program was:" >&5
8536   cat conftest.$ac_ext >&5
8537   rm -rf conftest*
8538   eval "ac_cv_lib_$ac_lib_var=no"
8539 fi
8540 rm -f conftest*
8541 xe_check_libs=""
8542
8543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8544   echo "$ac_t""yes" 1>&6
8545   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8546 else
8547   echo "$ac_t""no" 1>&6
8548
8549 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8550 echo "configure:8551: checking for inflate in -lgz" >&5
8551 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8552
8553 xe_check_libs=" -lgz "
8554 cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 /* Override any gcc2 internal prototype to avoid an error.  */
8558 /* We use char because int might match the return type of a gcc2
8559     builtin and then its argument prototype would still apply.  */
8560 char inflate();
8561
8562 int main() {
8563 inflate()
8564 ; return 0; }
8565 EOF
8566 if { (eval echo configure:8567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8567   rm -rf conftest*
8568   eval "ac_cv_lib_$ac_lib_var=yes"
8569 else
8570   echo "configure: failed program was:" >&5
8571   cat conftest.$ac_ext >&5
8572   rm -rf conftest*
8573   eval "ac_cv_lib_$ac_lib_var=no"
8574 fi
8575 rm -f conftest*
8576 xe_check_libs=""
8577
8578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8579   echo "$ac_t""yes" 1>&6
8580   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8581 else
8582   echo "$ac_t""no" 1>&6
8583 fi
8584
8585
8586 fi
8587
8588
8589 fi
8590
8591
8592   fi
8593
8594     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8595 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8596 echo "configure:8597: checking for jpeglib.h" >&5
8597
8598 cat > conftest.$ac_ext <<EOF
8599 #line 8600 "configure"
8600 #include "confdefs.h"
8601 #include <jpeglib.h>
8602 EOF
8603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8604 { (eval echo configure:8605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8606 if test -z "$ac_err"; then
8607   rm -rf conftest*
8608   eval "ac_cv_header_$ac_safe=yes"
8609 else
8610   echo "$ac_err" >&5
8611   echo "configure: failed program was:" >&5
8612   cat conftest.$ac_ext >&5
8613   rm -rf conftest*
8614   eval "ac_cv_header_$ac_safe=no"
8615 fi
8616 rm -f conftest*
8617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8618   echo "$ac_t""yes" 1>&6
8619   :
8620 else
8621   echo "$ac_t""no" 1>&6
8622 with_jpeg=no
8623 fi
8624  }
8625   test -z "$with_jpeg" && { 
8626 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8627 echo "configure:8628: checking for jpeg_destroy_decompress in -ljpeg" >&5
8628 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8629
8630 xe_check_libs=" -ljpeg "
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 /* Override any gcc2 internal prototype to avoid an error.  */
8635 /* We use char because int might match the return type of a gcc2
8636     builtin and then its argument prototype would still apply.  */
8637 char jpeg_destroy_decompress();
8638
8639 int main() {
8640 jpeg_destroy_decompress()
8641 ; return 0; }
8642 EOF
8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=yes"
8646 else
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   eval "ac_cv_lib_$ac_lib_var=no"
8651 fi
8652 rm -f conftest*
8653 xe_check_libs=""
8654
8655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8656   echo "$ac_t""yes" 1>&6
8657   :
8658 else
8659   echo "$ac_t""no" 1>&6
8660 with_jpeg=no
8661 fi
8662
8663  }
8664   test -z "$with_jpeg" && with_jpeg=yes
8665   if test "$with_jpeg" = "yes"; then
8666     { test "$extra_verbose" = "yes" && cat << \EOF
8667     Defining HAVE_JPEG
8668 EOF
8669 cat >> confdefs.h <<\EOF
8670 #define HAVE_JPEG 1
8671 EOF
8672 }
8673
8674     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8675   fi
8676
8677     png_problem=""
8678   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8679 echo "configure:8680: checking for pow" >&5
8680
8681 cat > conftest.$ac_ext <<EOF
8682 #line 8683 "configure"
8683 #include "confdefs.h"
8684 /* System header to define __stub macros and hopefully few prototypes,
8685     which can conflict with char pow(); below.  */
8686 #include <assert.h>
8687 /* Override any gcc2 internal prototype to avoid an error.  */
8688 /* We use char because int might match the return type of a gcc2
8689     builtin and then its argument prototype would still apply.  */
8690 char pow();
8691
8692 int main() {
8693
8694 /* The GNU C library defines this for functions which it implements
8695     to always fail with ENOSYS.  Some functions are actually named
8696     something starting with __ and the normal name is an alias.  */
8697 #if defined (__stub_pow) || defined (__stub___pow)
8698 choke me
8699 #else
8700 pow();
8701 #endif
8702
8703 ; return 0; }
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8706   rm -rf conftest*
8707   eval "ac_cv_func_pow=yes"
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -rf conftest*
8712   eval "ac_cv_func_pow=no"
8713 fi
8714 rm -f conftest*
8715
8716 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8717   echo "$ac_t""yes" 1>&6
8718   :
8719 else
8720   echo "$ac_t""no" 1>&6
8721 with_png=no
8722 fi
8723  }
8724   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8725 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8726 echo "configure:8727: checking for png.h" >&5
8727
8728 cat > conftest.$ac_ext <<EOF
8729 #line 8730 "configure"
8730 #include "confdefs.h"
8731 #include <png.h>
8732 EOF
8733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8734 { (eval echo configure:8735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8736 if test -z "$ac_err"; then
8737   rm -rf conftest*
8738   eval "ac_cv_header_$ac_safe=yes"
8739 else
8740   echo "$ac_err" >&5
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_header_$ac_safe=no"
8745 fi
8746 rm -f conftest*
8747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8748   echo "$ac_t""yes" 1>&6
8749   :
8750 else
8751   echo "$ac_t""no" 1>&6
8752 with_png=no
8753 fi
8754  }
8755   test -z "$with_png" && { 
8756 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8757 echo "configure:8758: checking for png_read_image in -lpng" >&5
8758 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8759
8760 xe_check_libs=" -lpng "
8761 cat > conftest.$ac_ext <<EOF
8762 #line 8763 "configure"
8763 #include "confdefs.h"
8764 /* Override any gcc2 internal prototype to avoid an error.  */
8765 /* We use char because int might match the return type of a gcc2
8766     builtin and then its argument prototype would still apply.  */
8767 char png_read_image();
8768
8769 int main() {
8770 png_read_image()
8771 ; return 0; }
8772 EOF
8773 if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8774   rm -rf conftest*
8775   eval "ac_cv_lib_$ac_lib_var=yes"
8776 else
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_lib_$ac_lib_var=no"
8781 fi
8782 rm -f conftest*
8783 xe_check_libs=""
8784
8785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8786   echo "$ac_t""yes" 1>&6
8787   :
8788 else
8789   echo "$ac_t""no" 1>&6
8790 with_png=no
8791 fi
8792
8793  }
8794   if test -z "$with_png"; then
8795     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8796 echo "configure:8797: checking for workable png version information" >&5
8797     xe_check_libs="-lpng -lz"
8798     cat > conftest.$ac_ext <<EOF
8799 #line 8800 "configure"
8800 #include "confdefs.h"
8801 #include <png.h>
8802     int main(int c, char **v) {
8803     if (c == 1) return 0;
8804     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8805     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8806 EOF
8807 if { (eval echo configure:8808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8808 then
8809   ./conftest dummy_arg; png_status=$?;
8810       if test "$png_status" = "0"; then
8811         with_png=yes;
8812       else
8813         with_png=no;
8814         if test "$png_status" = "1"; then
8815           png_problem="PNG library version and header file don't match!"
8816         elif test "$png_status" = "2"; then
8817           png_problem="PNG library version too old (pre 1.0.2)!"
8818         fi
8819         echo "
8820 *** WARNING *** $png_problem
8821   I'm not touching that with a 10-foot pole!
8822   If you really want to use the installed version of libPNG, rerun
8823   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8824     fi
8825 else
8826   conftest_rc="$?"
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -fr conftest*
8830   with_png=no
8831 fi
8832 rm -fr conftest*
8833     xe_check_libs=
8834     echo "$ac_t""$with_png" 1>&6
8835   fi
8836   if test "$with_png" = "yes"; then
8837     { test "$extra_verbose" = "yes" && cat << \EOF
8838     Defining HAVE_PNG
8839 EOF
8840 cat >> confdefs.h <<\EOF
8841 #define HAVE_PNG 1
8842 EOF
8843 }
8844
8845     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8846   fi
8847
8848     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8849 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8850 echo "configure:8851: checking for tiffio.h" >&5
8851
8852 cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855 #include <tiffio.h>
8856 EOF
8857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8858 { (eval echo configure:8859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8860 if test -z "$ac_err"; then
8861   rm -rf conftest*
8862   eval "ac_cv_header_$ac_safe=yes"
8863 else
8864   echo "$ac_err" >&5
8865   echo "configure: failed program was:" >&5
8866   cat conftest.$ac_ext >&5
8867   rm -rf conftest*
8868   eval "ac_cv_header_$ac_safe=no"
8869 fi
8870 rm -f conftest*
8871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8872   echo "$ac_t""yes" 1>&6
8873   :
8874 else
8875   echo "$ac_t""no" 1>&6
8876 with_tiff=no
8877 fi
8878  }
8879   test -z "$with_tiff" && { 
8880 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8881 echo "configure:8882: checking for TIFFClientOpen in -ltiff" >&5
8882 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8883
8884 xe_check_libs=" -ltiff "
8885 cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 /* Override any gcc2 internal prototype to avoid an error.  */
8889 /* We use char because int might match the return type of a gcc2
8890     builtin and then its argument prototype would still apply.  */
8891 char TIFFClientOpen();
8892
8893 int main() {
8894 TIFFClientOpen()
8895 ; return 0; }
8896 EOF
8897 if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8898   rm -rf conftest*
8899   eval "ac_cv_lib_$ac_lib_var=yes"
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -rf conftest*
8904   eval "ac_cv_lib_$ac_lib_var=no"
8905 fi
8906 rm -f conftest*
8907 xe_check_libs=""
8908
8909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8910   echo "$ac_t""yes" 1>&6
8911   :
8912 else
8913   echo "$ac_t""no" 1>&6
8914 with_tiff=no
8915 fi
8916
8917  }
8918   test -z "$with_tiff" && with_tiff=yes
8919   if test "$with_tiff" = "yes"; then
8920     { test "$extra_verbose" = "yes" && cat << \EOF
8921     Defining HAVE_TIFF
8922 EOF
8923 cat >> confdefs.h <<\EOF
8924 #define HAVE_TIFF 1
8925 EOF
8926 }
8927
8928     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8929   fi
8930 fi
8931
8932
8933 if test "$with_gtk" = "yes"; then
8934     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8935 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8936 echo "configure:8937: checking for compface.h" >&5
8937
8938 cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 #include <compface.h>
8942 EOF
8943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8944 { (eval echo configure:8945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8946 if test -z "$ac_err"; then
8947   rm -rf conftest*
8948   eval "ac_cv_header_$ac_safe=yes"
8949 else
8950   echo "$ac_err" >&5
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_header_$ac_safe=no"
8955 fi
8956 rm -f conftest*
8957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8958   echo "$ac_t""yes" 1>&6
8959   :
8960 else
8961   echo "$ac_t""no" 1>&6
8962 with_xface=no
8963 fi
8964  }
8965   test -z "$with_xface" && { 
8966 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8967 echo "configure:8968: checking for UnGenFace in -lcompface" >&5
8968 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8969
8970 xe_check_libs=" -lcompface "
8971 cat > conftest.$ac_ext <<EOF
8972 #line 8973 "configure"
8973 #include "confdefs.h"
8974 /* Override any gcc2 internal prototype to avoid an error.  */
8975 /* We use char because int might match the return type of a gcc2
8976     builtin and then its argument prototype would still apply.  */
8977 char UnGenFace();
8978
8979 int main() {
8980 UnGenFace()
8981 ; return 0; }
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8984   rm -rf conftest*
8985   eval "ac_cv_lib_$ac_lib_var=yes"
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -rf conftest*
8990   eval "ac_cv_lib_$ac_lib_var=no"
8991 fi
8992 rm -f conftest*
8993 xe_check_libs=""
8994
8995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8996   echo "$ac_t""yes" 1>&6
8997   : 
8998 else
8999   echo "$ac_t""no" 1>&6
9000 with_xface=no
9001 fi
9002
9003  }
9004   test -z "$with_xface" && with_xface=yes
9005   if test "$with_xface" = "yes"; then
9006     { test "$extra_verbose" = "yes" && cat << \EOF
9007     Defining HAVE_XFACE
9008 EOF
9009 cat >> confdefs.h <<\EOF
9010 #define HAVE_XFACE 1
9011 EOF
9012 }
9013
9014     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9015   fi
9016 fi
9017
9018
9019
9020 if test "$with_x11" = "yes"; then
9021   echo "checking for X11 graphics libraries" 1>&6
9022 echo "configure:9023: checking for X11 graphics libraries" >&5
9023 fi
9024
9025 if test "$with_x11" = "yes"; then
9026   echo "checking for the Athena widgets" 1>&6
9027 echo "configure:9028: checking for the Athena widgets" >&5
9028
9029     case "$with_athena" in
9030         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9031     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9032     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9033     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9034     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9035     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9036   esac
9037
9038   athena_3d_function=Xaw3dComputeBottomShadowRGB
9039
9040     if test "$athena_3d" = "no"; then
9041     
9042 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9043 echo "configure:9044: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9044 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9045
9046 xe_check_libs=" -l$athena_variant "
9047 cat > conftest.$ac_ext <<EOF
9048 #line 9049 "configure"
9049 #include "confdefs.h"
9050 /* Override any gcc2 internal prototype to avoid an error.  */
9051 /* We use char because int might match the return type of a gcc2
9052     builtin and then its argument prototype would still apply.  */
9053 char XawScrollbarSetThumb();
9054
9055 int main() {
9056 XawScrollbarSetThumb()
9057 ; return 0; }
9058 EOF
9059 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=yes"
9062 else
9063   echo "configure: failed program was:" >&5
9064   cat conftest.$ac_ext >&5
9065   rm -rf conftest*
9066   eval "ac_cv_lib_$ac_lib_var=no"
9067 fi
9068 rm -f conftest*
9069 xe_check_libs=""
9070
9071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9072   echo "$ac_t""yes" 1>&6
9073           
9074 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9075 echo "configure:9076: checking for $athena_3d_function in -l$athena_variant" >&5
9076 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9077
9078 xe_check_libs=" -l$athena_variant "
9079 cat > conftest.$ac_ext <<EOF
9080 #line 9081 "configure"
9081 #include "confdefs.h"
9082 /* Override any gcc2 internal prototype to avoid an error.  */
9083 /* We use char because int might match the return type of a gcc2
9084     builtin and then its argument prototype would still apply.  */
9085 char $athena_3d_function();
9086
9087 int main() {
9088 $athena_3d_function()
9089 ; return 0; }
9090 EOF
9091 if { (eval echo configure:9092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9092   rm -rf conftest*
9093   eval "ac_cv_lib_$ac_lib_var=yes"
9094 else
9095   echo "configure: failed program was:" >&5
9096   cat conftest.$ac_ext >&5
9097   rm -rf conftest*
9098   eval "ac_cv_lib_$ac_lib_var=no"
9099 fi
9100 rm -f conftest*
9101 xe_check_libs=""
9102
9103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9104   echo "$ac_t""yes" 1>&6
9105   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9106 else
9107   echo "$ac_t""no" 1>&6
9108 athena_lib=$athena_variant
9109 fi
9110
9111
9112       
9113 else
9114   echo "$ac_t""no" 1>&6
9115 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9116 fi
9117
9118
9119   else
9120         
9121 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9122 echo "configure:9123: checking for $athena_3d_function in -l$athena_variant" >&5
9123 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9124
9125 xe_check_libs=" -l$athena_variant "
9126 cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129 /* Override any gcc2 internal prototype to avoid an error.  */
9130 /* We use char because int might match the return type of a gcc2
9131     builtin and then its argument prototype would still apply.  */
9132 char $athena_3d_function();
9133
9134 int main() {
9135 $athena_3d_function()
9136 ; return 0; }
9137 EOF
9138 if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9139   rm -rf conftest*
9140   eval "ac_cv_lib_$ac_lib_var=yes"
9141 else
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   eval "ac_cv_lib_$ac_lib_var=no"
9146 fi
9147 rm -f conftest*
9148 xe_check_libs=""
9149
9150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9151   echo "$ac_t""yes" 1>&6
9152   athena_lib=$athena_variant
9153 else
9154   echo "$ac_t""no" 1>&6
9155 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9156 echo "configure:9157: checking for $athena_3d_function in -lXaw" >&5
9157 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9158
9159 xe_check_libs=" -lXaw "
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char $athena_3d_function();
9167
9168 int main() {
9169 $athena_3d_function()
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=yes"
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -rf conftest*
9179   eval "ac_cv_lib_$ac_lib_var=no"
9180 fi
9181 rm -f conftest*
9182 xe_check_libs=""
9183
9184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9185   echo "$ac_t""yes" 1>&6
9186   athena_lib=Xaw;
9187           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9188         
9189 else
9190   echo "$ac_t""no" 1>&6
9191 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9192 fi
9193
9194
9195 fi
9196
9197
9198   fi
9199
9200     if test "$athena_3d" = "no"; then
9201     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9202 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9203 echo "configure:9204: checking for X11/Xaw/ThreeD.h" >&5
9204
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 #include <X11/Xaw/ThreeD.h>
9209 EOF
9210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9211 { (eval echo configure:9212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9213 if test -z "$ac_err"; then
9214   rm -rf conftest*
9215   eval "ac_cv_header_$ac_safe=yes"
9216 else
9217   echo "$ac_err" >&5
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -rf conftest*
9221   eval "ac_cv_header_$ac_safe=no"
9222 fi
9223 rm -f conftest*
9224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9225   echo "$ac_t""yes" 1>&6
9226   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9227 else
9228   echo "$ac_t""no" 1>&6
9229 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9230 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9231 echo "configure:9232: checking for X11/Xaw/XawInit.h" >&5
9232
9233 cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236 #include <X11/Xaw/XawInit.h>
9237 EOF
9238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9239 { (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9241 if test -z "$ac_err"; then
9242   rm -rf conftest*
9243   eval "ac_cv_header_$ac_safe=yes"
9244 else
9245   echo "$ac_err" >&5
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_header_$ac_safe=no"
9250 fi
9251 rm -f conftest*
9252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9253   echo "$ac_t""yes" 1>&6
9254   athena_h_path=X11/Xaw
9255 else
9256   echo "$ac_t""no" 1>&6
9257 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9258 fi
9259
9260 fi
9261
9262   else
9263             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9264 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9265 echo "configure:9266: checking for X11/$athena_variant/XawInit.h" >&5
9266
9267 cat > conftest.$ac_ext <<EOF
9268 #line 9269 "configure"
9269 #include "confdefs.h"
9270 #include <X11/$athena_variant/XawInit.h>
9271 EOF
9272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9273 { (eval echo configure:9274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9275 if test -z "$ac_err"; then
9276   rm -rf conftest*
9277   eval "ac_cv_header_$ac_safe=yes"
9278 else
9279   echo "$ac_err" >&5
9280   echo "configure: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   rm -rf conftest*
9283   eval "ac_cv_header_$ac_safe=no"
9284 fi
9285 rm -f conftest*
9286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9289 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9290 echo "configure:9291: checking for X11/$athena_variant/ThreeD.h" >&5
9291
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 #include <X11/$athena_variant/ThreeD.h>
9296 EOF
9297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9298 { (eval echo configure:9299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9300 if test -z "$ac_err"; then
9301   rm -rf conftest*
9302   eval "ac_cv_header_$ac_safe=yes"
9303 else
9304   echo "$ac_err" >&5
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=no"
9309 fi
9310 rm -f conftest*
9311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313   athena_h_path=X11/$athena_variant
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322
9323         if test -z "$athena_h_path"; then
9324       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9325 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9326 echo "configure:9327: checking for $athena_variant/XawInit.h" >&5
9327
9328 cat > conftest.$ac_ext <<EOF
9329 #line 9330 "configure"
9330 #include "confdefs.h"
9331 #include <$athena_variant/XawInit.h>
9332 EOF
9333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9334 { (eval echo configure:9335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9336 if test -z "$ac_err"; then
9337   rm -rf conftest*
9338   eval "ac_cv_header_$ac_safe=yes"
9339 else
9340   echo "$ac_err" >&5
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -rf conftest*
9344   eval "ac_cv_header_$ac_safe=no"
9345 fi
9346 rm -f conftest*
9347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9348   echo "$ac_t""yes" 1>&6
9349   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9350 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9351 echo "configure:9352: checking for $athena_variant/ThreeD.h" >&5
9352
9353 cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356 #include <$athena_variant/ThreeD.h>
9357 EOF
9358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9359 { (eval echo configure:9360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9361 if test -z "$ac_err"; then
9362   rm -rf conftest*
9363   eval "ac_cv_header_$ac_safe=yes"
9364 else
9365   echo "$ac_err" >&5
9366   echo "configure: failed program was:" >&5
9367   cat conftest.$ac_ext >&5
9368   rm -rf conftest*
9369   eval "ac_cv_header_$ac_safe=no"
9370 fi
9371 rm -f conftest*
9372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9373   echo "$ac_t""yes" 1>&6
9374   athena_h_path=$athena_variant
9375 else
9376   echo "$ac_t""no" 1>&6
9377 fi
9378
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383     fi
9384
9385         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9386       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9387 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9388 echo "configure:9389: checking for X11/Xaw3d/XawInit.h" >&5
9389
9390 cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393 #include <X11/Xaw3d/XawInit.h>
9394 EOF
9395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9396 { (eval echo configure:9397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9398 if test -z "$ac_err"; then
9399   rm -rf conftest*
9400   eval "ac_cv_header_$ac_safe=yes"
9401 else
9402   echo "$ac_err" >&5
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   eval "ac_cv_header_$ac_safe=no"
9407 fi
9408 rm -f conftest*
9409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9410   echo "$ac_t""yes" 1>&6
9411   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9412 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9413 echo "configure:9414: checking for X11/Xaw3d/ThreeD.h" >&5
9414
9415 cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418 #include <X11/Xaw3d/ThreeD.h>
9419 EOF
9420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9421 { (eval echo configure:9422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9423 if test -z "$ac_err"; then
9424   rm -rf conftest*
9425   eval "ac_cv_header_$ac_safe=yes"
9426 else
9427   echo "$ac_err" >&5
9428   echo "configure: failed program was:" >&5
9429   cat conftest.$ac_ext >&5
9430   rm -rf conftest*
9431   eval "ac_cv_header_$ac_safe=no"
9432 fi
9433 rm -f conftest*
9434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9435   echo "$ac_t""yes" 1>&6
9436   
9437             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9438             athena_h_path=X11/Xaw3d
9439           
9440 else
9441   echo "$ac_t""no" 1>&6
9442 fi
9443
9444 else
9445   echo "$ac_t""no" 1>&6
9446 fi
9447
9448     fi
9449
9450         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9451       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9452 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9453 echo "configure:9454: checking for Xaw3d/XawInit.h" >&5
9454
9455 cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 #include <Xaw3d/XawInit.h>
9459 EOF
9460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9461 { (eval echo configure:9462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9463 if test -z "$ac_err"; then
9464   rm -rf conftest*
9465   eval "ac_cv_header_$ac_safe=yes"
9466 else
9467   echo "$ac_err" >&5
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_header_$ac_safe=no"
9472 fi
9473 rm -f conftest*
9474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9475   echo "$ac_t""yes" 1>&6
9476   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9477 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9478 echo "configure:9479: checking for Xaw3d/ThreeD.h" >&5
9479
9480 cat > conftest.$ac_ext <<EOF
9481 #line 9482 "configure"
9482 #include "confdefs.h"
9483 #include <Xaw3d/ThreeD.h>
9484 EOF
9485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9486 { (eval echo configure:9487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9488 if test -z "$ac_err"; then
9489   rm -rf conftest*
9490   eval "ac_cv_header_$ac_safe=yes"
9491 else
9492   echo "$ac_err" >&5
9493   echo "configure: failed program was:" >&5
9494   cat conftest.$ac_ext >&5
9495   rm -rf conftest*
9496   eval "ac_cv_header_$ac_safe=no"
9497 fi
9498 rm -f conftest*
9499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9500   echo "$ac_t""yes" 1>&6
9501   
9502             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9503             athena_h_path=Xaw3d
9504           
9505 else
9506   echo "$ac_t""no" 1>&6
9507 fi
9508
9509 else
9510   echo "$ac_t""no" 1>&6
9511 fi
9512
9513     fi
9514
9515             if test -z "$athena_h_path"; then
9516       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9517 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9518 echo "configure:9519: checking for X11/Xaw/ThreeD.h" >&5
9519
9520 cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 #include <X11/Xaw/ThreeD.h>
9524 EOF
9525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9526 { (eval echo configure:9527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9528 if test -z "$ac_err"; then
9529   rm -rf conftest*
9530   eval "ac_cv_header_$ac_safe=yes"
9531 else
9532   echo "$ac_err" >&5
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   eval "ac_cv_header_$ac_safe=no"
9537 fi
9538 rm -f conftest*
9539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9540   echo "$ac_t""yes" 1>&6
9541   
9542           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9543           athena_h_path=X11/Xaw
9544         
9545 else
9546   echo "$ac_t""no" 1>&6
9547 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9548 fi
9549
9550     fi
9551   fi
9552
9553     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9554     have_xaw=yes
9555   else
9556     have_xaw=no
9557   fi
9558
9559 else
9560   have_xaw=no
9561 fi 
9562 if test "$with_x11" = "yes"; then
9563     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9564 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9565 echo "configure:9566: checking for Xm/Xm.h" >&5
9566
9567 cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570 #include <Xm/Xm.h>
9571 EOF
9572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9573 { (eval echo configure:9574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9575 if test -z "$ac_err"; then
9576   rm -rf conftest*
9577   eval "ac_cv_header_$ac_safe=yes"
9578 else
9579   echo "$ac_err" >&5
9580   echo "configure: failed program was:" >&5
9581   cat conftest.$ac_ext >&5
9582   rm -rf conftest*
9583   eval "ac_cv_header_$ac_safe=no"
9584 fi
9585 rm -f conftest*
9586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9587   echo "$ac_t""yes" 1>&6
9588   
9589 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9590 echo "configure:9591: checking for XmStringFree in -lXm" >&5
9591 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9592
9593 xe_check_libs=" -lXm "
9594 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9597 /* Override any gcc2 internal prototype to avoid an error.  */
9598 /* We use char because int might match the return type of a gcc2
9599     builtin and then its argument prototype would still apply.  */
9600 char XmStringFree();
9601
9602 int main() {
9603 XmStringFree()
9604 ; return 0; }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9607   rm -rf conftest*
9608   eval "ac_cv_lib_$ac_lib_var=yes"
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -rf conftest*
9613   eval "ac_cv_lib_$ac_lib_var=no"
9614 fi
9615 rm -f conftest*
9616 xe_check_libs=""
9617
9618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9619   echo "$ac_t""yes" 1>&6
9620   have_motif=yes
9621 else
9622   echo "$ac_t""no" 1>&6
9623 have_motif=no
9624 fi
9625
9626
9627 else
9628   echo "$ac_t""no" 1>&6
9629 have_motif=no
9630 fi
9631
9632
9633   if test "$have_motif" = "yes"; then
9634         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9635 echo "configure:9636: checking for Lesstif" >&5
9636     cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639 #include <Xm/Xm.h>
9640 #ifdef LESSTIF_VERSION
9641 yes
9642 #endif
9643
9644 EOF
9645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9646   egrep "yes" >/dev/null 2>&1; then
9647   rm -rf conftest*
9648   have_lesstif=yes
9649 else
9650   rm -rf conftest*
9651   have_lesstif=no
9652 fi
9653 rm -f conftest*
9654
9655   echo "$ac_t""$have_lesstif" 1>&6
9656   fi
9657
9658 fi 
9659
9660 case "$opsys" in
9661   *linux* )  lucid_prefers_motif="no"  ;;
9662   * )        lucid_prefers_motif="yes" ;;
9663 esac
9664
9665 case "$with_menubars" in "" | "yes" | "athena" )
9666   with_menubars="lucid" ;;
9667 esac
9668 case "$with_dialogs" in "" | "yes" | "lucid" )
9669   if test "$lucid_prefers_motif" = "yes"; then
9670     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9671     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9672     else with_dialogs=no
9673     fi
9674   else
9675     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9676     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9677     else with_dialogs=no
9678     fi
9679   fi ;;
9680 esac
9681 case "$with_scrollbars" in "" | "yes" )
9682   with_scrollbars="lucid" ;;
9683 esac
9684 case "$with_widgets" in
9685   "yes" | "lucid")
9686     if test "$lucid_prefers_motif" = "yes"; then
9687       if   test "$have_motif" = "yes"; then with_widgets="motif"
9688       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9689       else with_widgets=no
9690       fi
9691     else
9692       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9693       elif test "$have_motif" = "yes"; then with_widgets="motif"
9694       else with_widgets=no
9695       fi
9696     fi ;;
9697   "" )
9698     with_widgets=no ;;
9699 esac
9700
9701 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9702
9703 case "$all_widgets" in
9704   *athena* )
9705     if test "$have_xaw" != "yes"; then
9706       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9707     fi
9708
9709         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9710
9711         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9712
9713                     { test "$extra_verbose" = "yes" && cat << EOF
9714     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9715 EOF
9716 cat >> confdefs.h <<EOF
9717 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9718 EOF
9719 }
9720
9721     { test "$extra_verbose" = "yes" && cat << EOF
9722     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9723 EOF
9724 cat >> confdefs.h <<EOF
9725 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9726 EOF
9727 }
9728
9729     { test "$extra_verbose" = "yes" && cat << EOF
9730     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9731 EOF
9732 cat >> confdefs.h <<EOF
9733 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9734 EOF
9735 }
9736
9737     { test "$extra_verbose" = "yes" && cat << EOF
9738     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9739 EOF
9740 cat >> confdefs.h <<EOF
9741 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9742 EOF
9743 }
9744
9745     { test "$extra_verbose" = "yes" && cat << EOF
9746     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9747 EOF
9748 cat >> confdefs.h <<EOF
9749 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9750 EOF
9751 }
9752
9753     { test "$extra_verbose" = "yes" && cat << EOF
9754     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9755 EOF
9756 cat >> confdefs.h <<EOF
9757 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9758 EOF
9759 }
9760
9761     { test "$extra_verbose" = "yes" && cat << EOF
9762     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9763 EOF
9764 cat >> confdefs.h <<EOF
9765 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9766 EOF
9767 }
9768
9769     { test "$extra_verbose" = "yes" && cat << EOF
9770     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9771 EOF
9772 cat >> confdefs.h <<EOF
9773 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9774 EOF
9775 }
9776
9777     { test "$extra_verbose" = "yes" && cat << EOF
9778     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9779 EOF
9780 cat >> confdefs.h <<EOF
9781 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9782 EOF
9783 }
9784
9785     { test "$extra_verbose" = "yes" && cat << EOF
9786     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9787 EOF
9788 cat >> confdefs.h <<EOF
9789 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9790 EOF
9791 }
9792
9793
9794     { test "$extra_verbose" = "yes" && cat << \EOF
9795     Defining LWLIB_USES_ATHENA
9796 EOF
9797 cat >> confdefs.h <<\EOF
9798 #define LWLIB_USES_ATHENA 1
9799 EOF
9800 }
9801
9802     { test "$extra_verbose" = "yes" && cat << \EOF
9803     Defining NEED_ATHENA
9804 EOF
9805 cat >> confdefs.h <<\EOF
9806 #define NEED_ATHENA 1
9807 EOF
9808 }
9809
9810     need_athena="yes"
9811
9812     if test "$athena_3d" = "yes"; then
9813       { test "$extra_verbose" = "yes" && cat << \EOF
9814     Defining HAVE_ATHENA_3D
9815 EOF
9816 cat >> confdefs.h <<\EOF
9817 #define HAVE_ATHENA_3D 1
9818 EOF
9819 }
9820
9821     fi
9822   ;;
9823 esac
9824
9825 case "$all_widgets" in *motif* )
9826   { test "$extra_verbose" = "yes" && cat << \EOF
9827     Defining LWLIB_USES_MOTIF
9828 EOF
9829 cat >> confdefs.h <<\EOF
9830 #define LWLIB_USES_MOTIF 1
9831 EOF
9832 }
9833
9834   { test "$extra_verbose" = "yes" && cat << \EOF
9835     Defining NEED_MOTIF
9836 EOF
9837 cat >> confdefs.h <<\EOF
9838 #define NEED_MOTIF 1
9839 EOF
9840 }
9841
9842   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9843   need_motif=yes ;;
9844 esac
9845
9846 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9847 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9848 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9849 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9850         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9851 case "$with_widgets" in athena* )
9852         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;;
9853 esac
9854 case "$all_widgets" in *lucid* )
9855   { test "$extra_verbose" = "yes" && cat << \EOF
9856     Defining NEED_LUCID
9857 EOF
9858 cat >> confdefs.h <<\EOF
9859 #define NEED_LUCID 1
9860 EOF
9861 }
9862
9863   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9864 esac
9865
9866
9867
9868 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9869     Defining LWLIB_SCROLLBARS_ATHENA
9870 EOF
9871 cat >> confdefs.h <<\EOF
9872 #define LWLIB_SCROLLBARS_ATHENA 1
9873 EOF
9874 }
9875
9876 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9877     Defining LWLIB_DIALOGS_ATHENA
9878 EOF
9879 cat >> confdefs.h <<\EOF
9880 #define LWLIB_DIALOGS_ATHENA 1
9881 EOF
9882 }
9883
9884
9885 if test "$athena_3d" = "yes"; then
9886   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9887     Defining LWLIB_SCROLLBARS_ATHENA3D
9888 EOF
9889 cat >> confdefs.h <<\EOF
9890 #define LWLIB_SCROLLBARS_ATHENA3D 1
9891 EOF
9892 }
9893
9894   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9895     Defining LWLIB_DIALOGS_ATHENA3D
9896 EOF
9897 cat >> confdefs.h <<\EOF
9898 #define LWLIB_DIALOGS_ATHENA3D 1
9899 EOF
9900 }
9901
9902 fi
9903
9904 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9905     Defining LWLIB_WIDGETS_ATHENA
9906 EOF
9907 cat >> confdefs.h <<\EOF
9908 #define LWLIB_WIDGETS_ATHENA 1
9909 EOF
9910 }
9911 ;; esac
9912 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9913         { test "$extra_verbose" = "yes" && cat << \EOF
9914     Defining LWLIB_TABS_LUCID
9915 EOF
9916 cat >> confdefs.h <<\EOF
9917 #define LWLIB_TABS_LUCID 1
9918 EOF
9919 }
9920
9921
9922 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9923     Defining HAVE_MENUBARS
9924 EOF
9925 cat >> confdefs.h <<\EOF
9926 #define HAVE_MENUBARS 1
9927 EOF
9928 }
9929
9930 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9931     Defining HAVE_SCROLLBARS
9932 EOF
9933 cat >> confdefs.h <<\EOF
9934 #define HAVE_SCROLLBARS 1
9935 EOF
9936 }
9937
9938 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9939     Defining HAVE_DIALOGS
9940 EOF
9941 cat >> confdefs.h <<\EOF
9942 #define HAVE_DIALOGS 1
9943 EOF
9944 }
9945
9946 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9947     Defining HAVE_TOOLBARS
9948 EOF
9949 cat >> confdefs.h <<\EOF
9950 #define HAVE_TOOLBARS 1
9951 EOF
9952 }
9953
9954 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9955     Defining HAVE_WIDGETS
9956 EOF
9957 cat >> confdefs.h <<\EOF
9958 #define HAVE_WIDGETS 1
9959 EOF
9960 }
9961
9962
9963 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9964     Defining LWLIB_MENUBARS_LUCID
9965 EOF
9966 cat >> confdefs.h <<\EOF
9967 #define LWLIB_MENUBARS_LUCID 1
9968 EOF
9969 }
9970
9971 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9972     Defining LWLIB_SCROLLBARS_LUCID
9973 EOF
9974 cat >> confdefs.h <<\EOF
9975 #define LWLIB_SCROLLBARS_LUCID 1
9976 EOF
9977 }
9978
9979
9980 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9981     Defining LWLIB_MENUBARS_MOTIF
9982 EOF
9983 cat >> confdefs.h <<\EOF
9984 #define LWLIB_MENUBARS_MOTIF 1
9985 EOF
9986 }
9987
9988 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9989     Defining LWLIB_SCROLLBARS_MOTIF
9990 EOF
9991 cat >> confdefs.h <<\EOF
9992 #define LWLIB_SCROLLBARS_MOTIF 1
9993 EOF
9994 }
9995
9996 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9997     Defining LWLIB_DIALOGS_MOTIF
9998 EOF
9999 cat >> confdefs.h <<\EOF
10000 #define LWLIB_DIALOGS_MOTIF 1
10001 EOF
10002 }
10003
10004 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10005     Defining LWLIB_WIDGETS_MOTIF
10006 EOF
10007 cat >> confdefs.h <<\EOF
10008 #define LWLIB_WIDGETS_MOTIF 1
10009 EOF
10010 }
10011
10012
10013 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10014    echo "    xemacs will be linked with \"menubar.o\""
10015  fi
10016 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10017    echo "    xemacs will be linked with \"scrollbar.o\""
10018  fi
10019 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10020    echo "    xemacs will be linked with \"dialog.o\""
10021  fi
10022 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10023    echo "    xemacs will be linked with \"toolbar.o\""
10024  fi
10025
10026 if test "$with_gtk" = "yes"; then
10027   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10028    echo "    xemacs will be linked with \"menubar-gtk.o\""
10029  fi
10030   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10031    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10032  fi
10033   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10034    echo "    xemacs will be linked with \"dialog-gtk.o\""
10035  fi
10036   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10037    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10038  fi
10039   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10040    echo "    xemacs will be linked with \"gui-gtk.o\""
10041  fi
10042 fi
10043
10044 if test "$with_x11" = "yes"; then
10045   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10046    echo "    xemacs will be linked with \"menubar-x.o\""
10047  fi
10048   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10049    echo "    xemacs will be linked with \"scrollbar-x.o\""
10050  fi
10051   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10052    echo "    xemacs will be linked with \"dialog-x.o\""
10053  fi
10054   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10055    echo "    xemacs will be linked with \"toolbar-x.o\""
10056  fi
10057   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10058    echo "    xemacs will be linked with \"gui-x.o\""
10059  fi
10060 fi
10061
10062
10063 test -z "$with_mule" && with_mule=no
10064 test -z "$with_file_coding" && with_file_coding=no
10065
10066
10067 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10068   { test "$extra_verbose" = "yes" && cat << \EOF
10069     Defining FILE_CODING
10070 EOF
10071 cat >> confdefs.h <<\EOF
10072 #define FILE_CODING 1
10073 EOF
10074 }
10075
10076   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10077    echo "    xemacs will be linked with \"file-coding.o\""
10078  fi
10079 fi
10080
10081 if test "$with_mule" = "yes" ; then
10082   echo "checking for Mule-related features" 1>&6
10083 echo "configure:10084: checking for Mule-related features" >&5
10084   { test "$extra_verbose" = "yes" && cat << \EOF
10085     Defining MULE
10086 EOF
10087 cat >> confdefs.h <<\EOF
10088 #define MULE 1
10089 EOF
10090 }
10091
10092   { test "$extra_verbose" = "yes" && cat << \EOF
10093     Defining FILE_CODING
10094 EOF
10095 cat >> confdefs.h <<\EOF
10096 #define FILE_CODING 1
10097 EOF
10098 }
10099
10100   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10101    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
10102  fi
10103
10104     for ac_hdr in libintl.h
10105 do
10106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10108 echo "configure:10109: checking for $ac_hdr" >&5
10109
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 #include <$ac_hdr>
10114 EOF
10115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10116 { (eval echo configure:10117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10118 if test -z "$ac_err"; then
10119   rm -rf conftest*
10120   eval "ac_cv_header_$ac_safe=yes"
10121 else
10122   echo "$ac_err" >&5
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   eval "ac_cv_header_$ac_safe=no"
10127 fi
10128 rm -f conftest*
10129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10130   echo "$ac_t""yes" 1>&6
10131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10132   { test "$extra_verbose" = "yes" && cat << EOF
10133     Defining $ac_tr_hdr
10134 EOF
10135 cat >> confdefs.h <<EOF
10136 #define $ac_tr_hdr 1
10137 EOF
10138 }
10139  
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143 done
10144
10145   
10146 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10147 echo "configure:10148: checking for strerror in -lintl" >&5
10148 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10149
10150 xe_check_libs=" -lintl "
10151 cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 /* Override any gcc2 internal prototype to avoid an error.  */
10155 /* We use char because int might match the return type of a gcc2
10156     builtin and then its argument prototype would still apply.  */
10157 char strerror();
10158
10159 int main() {
10160 strerror()
10161 ; return 0; }
10162 EOF
10163 if { (eval echo configure:10164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10164   rm -rf conftest*
10165   eval "ac_cv_lib_$ac_lib_var=yes"
10166 else
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   eval "ac_cv_lib_$ac_lib_var=no"
10171 fi
10172 rm -f conftest*
10173 xe_check_libs=""
10174
10175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10176   echo "$ac_t""yes" 1>&6
10177     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10178     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10179   { test "$extra_verbose" = "yes" && cat << EOF
10180     Defining $ac_tr_lib
10181 EOF
10182 cat >> confdefs.h <<EOF
10183 #define $ac_tr_lib 1
10184 EOF
10185 }
10186
10187   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10188
10189 else
10190   echo "$ac_t""no" 1>&6
10191 fi
10192
10193
10194
10195   echo "checking for Mule input methods" 1>&6
10196 echo "configure:10197: checking for Mule input methods" >&5
10197         case "$with_xim" in "" | "yes" )
10198     echo "checking for XIM" 1>&6
10199 echo "configure:10200: checking for XIM" >&5
10200     
10201 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10202 echo "configure:10203: checking for XOpenIM in -lX11" >&5
10203 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10204
10205 xe_check_libs=" -lX11 "
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 /* Override any gcc2 internal prototype to avoid an error.  */
10210 /* We use char because int might match the return type of a gcc2
10211     builtin and then its argument prototype would still apply.  */
10212 char XOpenIM();
10213
10214 int main() {
10215 XOpenIM()
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10219   rm -rf conftest*
10220   eval "ac_cv_lib_$ac_lib_var=yes"
10221 else
10222   echo "configure: failed program was:" >&5
10223   cat conftest.$ac_ext >&5
10224   rm -rf conftest*
10225   eval "ac_cv_lib_$ac_lib_var=no"
10226 fi
10227 rm -f conftest*
10228 xe_check_libs=""
10229
10230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10231   echo "$ac_t""yes" 1>&6
10232   with_xim=xlib
10233 else
10234   echo "$ac_t""no" 1>&6
10235 with_xim=no
10236 fi
10237
10238
10239             if test "$need_motif $have_lesstif" = "yes no"; then
10240       
10241 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10242 echo "configure:10243: checking for XmImMbLookupString in -lXm" >&5
10243 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10244
10245 xe_check_libs=" -lXm "
10246 cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249 /* Override any gcc2 internal prototype to avoid an error.  */
10250 /* We use char because int might match the return type of a gcc2
10251     builtin and then its argument prototype would still apply.  */
10252 char XmImMbLookupString();
10253
10254 int main() {
10255 XmImMbLookupString()
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10259   rm -rf conftest*
10260   eval "ac_cv_lib_$ac_lib_var=yes"
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   eval "ac_cv_lib_$ac_lib_var=no"
10266 fi
10267 rm -f conftest*
10268 xe_check_libs=""
10269
10270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10271   echo "$ac_t""yes" 1>&6
10272   with_xim=motif
10273 else
10274   echo "$ac_t""no" 1>&6
10275 fi
10276
10277
10278     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10279       
10280 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10281 echo "configure:10282: checking for XmImMbLookupString in -lXm" >&5
10282 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10283
10284 xe_check_libs=" -lXm "
10285 cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288 /* Override any gcc2 internal prototype to avoid an error.  */
10289 /* We use char because int might match the return type of a gcc2
10290     builtin and then its argument prototype would still apply.  */
10291 char XmImMbLookupString();
10292
10293 int main() {
10294 XmImMbLookupString()
10295 ; return 0; }
10296 EOF
10297 if { (eval echo configure:10298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10298   rm -rf conftest*
10299   eval "ac_cv_lib_$ac_lib_var=yes"
10300 else
10301   echo "configure: failed program was:" >&5
10302   cat conftest.$ac_ext >&5
10303   rm -rf conftest*
10304   eval "ac_cv_lib_$ac_lib_var=no"
10305 fi
10306 rm -f conftest*
10307 xe_check_libs=""
10308
10309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10310   echo "$ac_t""yes" 1>&6
10311   with_xim=motif
10312 else
10313   echo "$ac_t""no" 1>&6
10314 fi
10315
10316
10317     fi ;;
10318   esac
10319   if test "$with_xim" != "no"; then
10320     { test "$extra_verbose" = "yes" && cat << \EOF
10321     Defining HAVE_XIM
10322 EOF
10323 cat >> confdefs.h <<\EOF
10324 #define HAVE_XIM 1
10325 EOF
10326 }
10327
10328     if test "$with_xim" = "xlib"; then
10329       { test "$extra_verbose" = "yes" && cat << \EOF
10330     Defining XIM_XLIB
10331 EOF
10332 cat >> confdefs.h <<\EOF
10333 #define XIM_XLIB 1
10334 EOF
10335 }
10336
10337       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10338    echo "    xemacs will be linked with \"input-method-xlib.o\""
10339  fi
10340     fi
10341     if test "$with_xim" = "motif"; then
10342       { test "$extra_verbose" = "yes" && cat << \EOF
10343     Defining XIM_MOTIF
10344 EOF
10345 cat >> confdefs.h <<\EOF
10346 #define XIM_MOTIF 1
10347 EOF
10348 }
10349
10350       need_motif=yes
10351       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10352    echo "    xemacs will be linked with \"input-method-motif.o\""
10353  fi
10354     fi
10355     if test "$with_xim" = "motif"; then
10356       with_xfs=no
10357     fi
10358   fi
10359
10360     if test "$with_xfs" = "yes" ; then
10361     echo "checking for XFontSet" 1>&6
10362 echo "configure:10363: checking for XFontSet" >&5
10363     
10364 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10365 echo "configure:10366: checking for XmbDrawString in -lX11" >&5
10366 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10367
10368 xe_check_libs=" -lX11 "
10369 cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 /* Override any gcc2 internal prototype to avoid an error.  */
10373 /* We use char because int might match the return type of a gcc2
10374     builtin and then its argument prototype would still apply.  */
10375 char XmbDrawString();
10376
10377 int main() {
10378 XmbDrawString()
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=no"
10389 fi
10390 rm -f conftest*
10391 xe_check_libs=""
10392
10393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10394   echo "$ac_t""yes" 1>&6
10395   :
10396 else
10397   echo "$ac_t""no" 1>&6
10398 with_xfs=no
10399 fi
10400
10401
10402     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10403       { test "$extra_verbose" = "yes" && cat << \EOF
10404     Defining USE_XFONTSET
10405 EOF
10406 cat >> confdefs.h <<\EOF
10407 #define USE_XFONTSET 1
10408 EOF
10409 }
10410
10411       if test "$with_xim" = "no" ; then
10412         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10413    echo "    xemacs will be linked with \"input-method-xlib.o\""
10414  fi
10415       fi
10416     fi
10417   fi 
10418     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10419   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10420 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10421 echo "configure:10422: checking for wnn/jllib.h" >&5
10422
10423 cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <wnn/jllib.h>
10427 EOF
10428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10429 { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10431 if test -z "$ac_err"; then
10432   rm -rf conftest*
10433   eval "ac_cv_header_$ac_safe=yes"
10434 else
10435   echo "$ac_err" >&5
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_header_$ac_safe=no"
10440 fi
10441 rm -f conftest*
10442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444   :
10445 else
10446   echo "$ac_t""no" 1>&6
10447 with_wnn=no
10448 fi
10449  }
10450     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10451 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10452 echo "configure:10453: checking for wnn/commonhd.h" >&5
10453
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 #include <wnn/commonhd.h>
10458 EOF
10459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10460 { (eval echo configure:10461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10462 if test -z "$ac_err"; then
10463   rm -rf conftest*
10464   eval "ac_cv_header_$ac_safe=yes"
10465 else
10466   echo "$ac_err" >&5
10467   echo "configure: failed program was:" >&5
10468   cat conftest.$ac_ext >&5
10469   rm -rf conftest*
10470   eval "ac_cv_header_$ac_safe=no"
10471 fi
10472 rm -f conftest*
10473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10474   echo "$ac_t""yes" 1>&6
10475   :
10476 else
10477   echo "$ac_t""no" 1>&6
10478 with_wnn=no
10479 fi
10480  }
10481     if test "$with_wnn" != "no"; then
10482     for ac_func in crypt
10483 do
10484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10485 echo "configure:10486: checking for $ac_func" >&5
10486
10487 cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 /* System header to define __stub macros and hopefully few prototypes,
10491     which can conflict with char $ac_func(); below.  */
10492 #include <assert.h>
10493 /* Override any gcc2 internal prototype to avoid an error.  */
10494 /* We use char because int might match the return type of a gcc2
10495     builtin and then its argument prototype would still apply.  */
10496 char $ac_func();
10497
10498 int main() {
10499
10500 /* The GNU C library defines this for functions which it implements
10501     to always fail with ENOSYS.  Some functions are actually named
10502     something starting with __ and the normal name is an alias.  */
10503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10504 choke me
10505 #else
10506 $ac_func();
10507 #endif
10508
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_func_$ac_func=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_func_$ac_func=no"
10519 fi
10520 rm -f conftest*
10521
10522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10523   echo "$ac_t""yes" 1>&6
10524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10525   { test "$extra_verbose" = "yes" && cat << EOF
10526     Defining $ac_tr_func
10527 EOF
10528 cat >> confdefs.h <<EOF
10529 #define $ac_tr_func 1
10530 EOF
10531 }
10532  
10533 else
10534   echo "$ac_t""no" 1>&6
10535 fi
10536 done
10537
10538     test "$ac_cv_func_crypt" != "yes" && { 
10539 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10540 echo "configure:10541: checking for crypt in -lcrypt" >&5
10541 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10542
10543 xe_check_libs=" -lcrypt "
10544 cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 /* Override any gcc2 internal prototype to avoid an error.  */
10548 /* We use char because int might match the return type of a gcc2
10549     builtin and then its argument prototype would still apply.  */
10550 char crypt();
10551
10552 int main() {
10553 crypt()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 xe_check_libs=""
10567
10568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10569   echo "$ac_t""yes" 1>&6
10570     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10571     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10572   { test "$extra_verbose" = "yes" && cat << EOF
10573     Defining $ac_tr_lib
10574 EOF
10575 cat >> confdefs.h <<EOF
10576 #define $ac_tr_lib 1
10577 EOF
10578 }
10579
10580   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10581
10582 else
10583   echo "$ac_t""no" 1>&6
10584 fi
10585
10586  }
10587   fi
10588     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10589     
10590 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10591 echo "configure:10592: checking for jl_dic_list_e in -lwnn" >&5
10592 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10593
10594 xe_check_libs=" -lwnn "
10595 cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598 /* Override any gcc2 internal prototype to avoid an error.  */
10599 /* We use char because int might match the return type of a gcc2
10600     builtin and then its argument prototype would still apply.  */
10601 char jl_dic_list_e();
10602
10603 int main() {
10604 jl_dic_list_e()
10605 ; return 0; }
10606 EOF
10607 if { (eval echo configure:10608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10608   rm -rf conftest*
10609   eval "ac_cv_lib_$ac_lib_var=yes"
10610 else
10611   echo "configure: failed program was:" >&5
10612   cat conftest.$ac_ext >&5
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=no"
10615 fi
10616 rm -f conftest*
10617 xe_check_libs=""
10618
10619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10620   echo "$ac_t""yes" 1>&6
10621   libwnn=wnn
10622 else
10623   echo "$ac_t""no" 1>&6
10624 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10625 echo "configure:10626: checking for jl_dic_list_e in -lwnn4" >&5
10626 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10627
10628 xe_check_libs=" -lwnn4 "
10629 cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632 /* Override any gcc2 internal prototype to avoid an error.  */
10633 /* We use char because int might match the return type of a gcc2
10634     builtin and then its argument prototype would still apply.  */
10635 char jl_dic_list_e();
10636
10637 int main() {
10638 jl_dic_list_e()
10639 ; return 0; }
10640 EOF
10641 if { (eval echo configure:10642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10642   rm -rf conftest*
10643   eval "ac_cv_lib_$ac_lib_var=yes"
10644 else
10645   echo "configure: failed program was:" >&5
10646   cat conftest.$ac_ext >&5
10647   rm -rf conftest*
10648   eval "ac_cv_lib_$ac_lib_var=no"
10649 fi
10650 rm -f conftest*
10651 xe_check_libs=""
10652
10653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10654   echo "$ac_t""yes" 1>&6
10655   libwnn=wnn4
10656 else
10657   echo "$ac_t""no" 1>&6
10658 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10659 echo "configure:10660: checking for jl_dic_list_e in -lwnn6" >&5
10660 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10661
10662 xe_check_libs=" -lwnn6 "
10663 cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666 /* Override any gcc2 internal prototype to avoid an error.  */
10667 /* We use char because int might match the return type of a gcc2
10668     builtin and then its argument prototype would still apply.  */
10669 char jl_dic_list_e();
10670
10671 int main() {
10672 jl_dic_list_e()
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10676   rm -rf conftest*
10677   eval "ac_cv_lib_$ac_lib_var=yes"
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=no"
10683 fi
10684 rm -f conftest*
10685 xe_check_libs=""
10686
10687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10688   echo "$ac_t""yes" 1>&6
10689   libwnn=wnn6
10690 else
10691   echo "$ac_t""no" 1>&6
10692 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10693 echo "configure:10694: checking for dic_list_e in -lwnn6_fromsrc" >&5
10694 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10695
10696 xe_check_libs=" -lwnn6_fromsrc "
10697 cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 /* Override any gcc2 internal prototype to avoid an error.  */
10701 /* We use char because int might match the return type of a gcc2
10702     builtin and then its argument prototype would still apply.  */
10703 char dic_list_e();
10704
10705 int main() {
10706 dic_list_e()
10707 ; return 0; }
10708 EOF
10709 if { (eval echo configure:10710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10710   rm -rf conftest*
10711   eval "ac_cv_lib_$ac_lib_var=yes"
10712 else
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_lib_$ac_lib_var=no"
10717 fi
10718 rm -f conftest*
10719 xe_check_libs=""
10720
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10722   echo "$ac_t""yes" 1>&6
10723   libwnn=wnn6_fromsrc
10724 else
10725   echo "$ac_t""no" 1>&6
10726 with_wnn=no
10727 fi
10728
10729
10730 fi
10731
10732
10733 fi
10734
10735
10736 fi
10737
10738
10739   fi
10740   test -z "$with_wnn" && with_wnn=yes
10741   if test "$with_wnn" = "yes"; then
10742     { test "$extra_verbose" = "yes" && cat << \EOF
10743     Defining HAVE_WNN
10744 EOF
10745 cat >> confdefs.h <<\EOF
10746 #define HAVE_WNN 1
10747 EOF
10748 }
10749
10750     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10751     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10752    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10753  fi
10754     if test "$with_wnn6" != "no"; then
10755       
10756 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10757 echo "configure:10758: checking for jl_fi_dic_list in -l$libwnn" >&5
10758 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10759
10760 xe_check_libs=" -l$libwnn "
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_fi_dic_list();
10768
10769 int main() {
10770 jl_fi_dic_list()
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   with_wnn6=yes
10788 else
10789   echo "$ac_t""no" 1>&6
10790 fi
10791
10792
10793       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10794     Defining WNN6
10795 EOF
10796 cat >> confdefs.h <<\EOF
10797 #define WNN6 1
10798 EOF
10799 }
10800
10801     fi
10802   fi
10803
10804     canna_includes_found=no
10805   if test "$with_canna" != "no"; then
10806     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10807 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10808 echo "configure:10809: checking for canna/jrkanji.h" >&5
10809
10810 cat > conftest.$ac_ext <<EOF
10811 #line 10812 "configure"
10812 #include "confdefs.h"
10813 #include <canna/jrkanji.h>
10814 EOF
10815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10816 { (eval echo configure:10817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10818 if test -z "$ac_err"; then
10819   rm -rf conftest*
10820   eval "ac_cv_header_$ac_safe=yes"
10821 else
10822   echo "$ac_err" >&5
10823   echo "configure: failed program was:" >&5
10824   cat conftest.$ac_ext >&5
10825   rm -rf conftest*
10826   eval "ac_cv_header_$ac_safe=no"
10827 fi
10828 rm -f conftest*
10829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10830   echo "$ac_t""yes" 1>&6
10831   canna_includes_found=yes
10832 else
10833   echo "$ac_t""no" 1>&6
10834 fi
10835
10836   fi
10837   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10838       -d "/usr/local/canna/include"; then
10839     save_c_switch_site="$c_switch_site"
10840     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10841     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10842 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10843 echo "configure:10844: checking for canna/jrkanji.h" >&5
10844
10845 cat > conftest.$ac_ext <<EOF
10846 #line 10847 "configure"
10847 #include "confdefs.h"
10848 #include <canna/jrkanji.h>
10849 EOF
10850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10851 { (eval echo configure:10852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10853 if test -z "$ac_err"; then
10854   rm -rf conftest*
10855   eval "ac_cv_header_$ac_safe=yes"
10856 else
10857   echo "$ac_err" >&5
10858   echo "configure: failed program was:" >&5
10859   cat conftest.$ac_ext >&5
10860   rm -rf conftest*
10861   eval "ac_cv_header_$ac_safe=no"
10862 fi
10863 rm -f conftest*
10864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866   canna_includes_found=yes
10867 else
10868   echo "$ac_t""no" 1>&6
10869 fi
10870
10871     if test "$canna_includes_found" != "yes"; then
10872       c_switch_site="$save_c_switch_site"
10873       with_canna="no"
10874     fi
10875   fi
10876
10877   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10878 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10879 echo "configure:10880: checking for canna/RK.h" >&5
10880
10881 cat > conftest.$ac_ext <<EOF
10882 #line 10883 "configure"
10883 #include "confdefs.h"
10884 #include <canna/RK.h>
10885 EOF
10886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10887 { (eval echo configure:10888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10889 if test -z "$ac_err"; then
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=yes"
10892 else
10893   echo "$ac_err" >&5
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_header_$ac_safe=no"
10898 fi
10899 rm -f conftest*
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902   :
10903 else
10904   echo "$ac_t""no" 1>&6
10905 with_canna=no
10906 fi
10907  }
10908   test -z "$with_canna" && { 
10909 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10910 echo "configure:10911: checking for RkBgnBun in -lRKC" >&5
10911 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10912
10913 xe_check_libs=" -lRKC "
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 /* Override any gcc2 internal prototype to avoid an error.  */
10918 /* We use char because int might match the return type of a gcc2
10919     builtin and then its argument prototype would still apply.  */
10920 char RkBgnBun();
10921
10922 int main() {
10923 RkBgnBun()
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10927   rm -rf conftest*
10928   eval "ac_cv_lib_$ac_lib_var=yes"
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=no"
10934 fi
10935 rm -f conftest*
10936 xe_check_libs=""
10937
10938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10939   echo "$ac_t""yes" 1>&6
10940   :
10941 else
10942   echo "$ac_t""no" 1>&6
10943 with_canna=no
10944 fi
10945
10946  }
10947   test -z "$with_canna" && { 
10948 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10949 echo "configure:10950: checking for jrKanjiControl in -lcanna" >&5
10950 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10951
10952 xe_check_libs=" -lcanna "
10953 cat > conftest.$ac_ext <<EOF
10954 #line 10955 "configure"
10955 #include "confdefs.h"
10956 /* Override any gcc2 internal prototype to avoid an error.  */
10957 /* We use char because int might match the return type of a gcc2
10958     builtin and then its argument prototype would still apply.  */
10959 char jrKanjiControl();
10960
10961 int main() {
10962 jrKanjiControl()
10963 ; return 0; }
10964 EOF
10965 if { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10966   rm -rf conftest*
10967   eval "ac_cv_lib_$ac_lib_var=yes"
10968 else
10969   echo "configure: failed program was:" >&5
10970   cat conftest.$ac_ext >&5
10971   rm -rf conftest*
10972   eval "ac_cv_lib_$ac_lib_var=no"
10973 fi
10974 rm -f conftest*
10975 xe_check_libs=""
10976
10977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10978   echo "$ac_t""yes" 1>&6
10979   :
10980 else
10981   echo "$ac_t""no" 1>&6
10982 with_canna=no
10983 fi
10984
10985  }
10986   test -z "$with_canna" && with_canna=yes
10987   if test "$with_canna" = "yes"; then
10988     { test "$extra_verbose" = "yes" && cat << \EOF
10989     Defining HAVE_CANNA
10990 EOF
10991 cat >> confdefs.h <<\EOF
10992 #define HAVE_CANNA 1
10993 EOF
10994 }
10995
10996     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10997     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10998    echo "    xemacs will be linked with \"mule-canna.o\""
10999  fi
11000   fi
11001
11002 else   for feature in xim canna wnn; do
11003     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11004       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11005     fi
11006     eval "with_${feature}=no"
11007   done
11008 fi 
11009
11010 if test "$need_motif" = "yes" ; then
11011   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11012     
11013 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11014 echo "configure:11015: checking for layout_object_getvalue in -li18n" >&5
11015 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11016
11017 xe_check_libs=" -li18n "
11018 cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021 /* Override any gcc2 internal prototype to avoid an error.  */
11022 /* We use char because int might match the return type of a gcc2
11023     builtin and then its argument prototype would still apply.  */
11024 char layout_object_getvalue();
11025
11026 int main() {
11027 layout_object_getvalue()
11028 ; return 0; }
11029 EOF
11030 if { (eval echo configure:11031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11031   rm -rf conftest*
11032   eval "ac_cv_lib_$ac_lib_var=yes"
11033 else
11034   echo "configure: failed program was:" >&5
11035   cat conftest.$ac_ext >&5
11036   rm -rf conftest*
11037   eval "ac_cv_lib_$ac_lib_var=no"
11038 fi
11039 rm -f conftest*
11040 xe_check_libs=""
11041
11042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11043   echo "$ac_t""yes" 1>&6
11044   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11045 else
11046   echo "$ac_t""no" 1>&6
11047 fi
11048
11049
11050   
11051 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11052     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11053   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11054   
11055         runpath="" runpath_dirs=""
11056   if test -n "$LD_RUN_PATH"; then
11057     runpath="$LD_RUN_PATH"
11058   elif test "$GCC" = "yes"; then
11059         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11060     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11061     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11062     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11063       case "$arg" in P,* | -L* | -R* )
11064         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11065           {
11066 xe_runpath_dir="$dir"
11067   test "$xe_runpath_dir" != "/lib"     -a \
11068         "$xe_runpath_dir" != "/usr/lib" -a \
11069         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11070   eval "$xe_add_unique_runpath_dir"
11071 }
11072         done ;;
11073       esac
11074     done
11075     ld_switch_run="$ld_switch_run_save"
11076     rm -f conftest*
11077   else
11078         for arg in $ld_switch_site $ld_switch_x_site; do
11079       case "$arg" in -L*) {
11080 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11081   test "$xe_runpath_dir" != "/lib"     -a \
11082         "$xe_runpath_dir" != "/usr/lib" -a \
11083         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11084   eval "$xe_add_unique_runpath_dir"
11085 };; esac
11086     done
11087             if test "$opsys $need_motif" = "sol2 yes"; then
11088       xe_runpath_dir="/opt/SUNWdt/lib";
11089       eval "$xe_add_unique_runpath_dir";
11090     fi
11091   fi 
11092   if test -n "$runpath"; then
11093     ld_switch_run="${dash_r}${runpath}"
11094     
11095 if test "$GCC" = "yes"; then
11096   set x $ld_switch_run; shift; ld_switch_run=""
11097   while test -n "$1"; do
11098     case $1 in
11099       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11100       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11101       -Xlinker* ) ;;
11102       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11103     esac
11104     shift
11105   done
11106 fi
11107     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11108   fi
11109 fi
11110
11111 fi
11112
11113
11114 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
11115 do
11116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11117 echo "configure:11118: checking for $ac_func" >&5
11118
11119 cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122 /* System header to define __stub macros and hopefully few prototypes,
11123     which can conflict with char $ac_func(); below.  */
11124 #include <assert.h>
11125 /* Override any gcc2 internal prototype to avoid an error.  */
11126 /* We use char because int might match the return type of a gcc2
11127     builtin and then its argument prototype would still apply.  */
11128 char $ac_func();
11129
11130 int main() {
11131
11132 /* The GNU C library defines this for functions which it implements
11133     to always fail with ENOSYS.  Some functions are actually named
11134     something starting with __ and the normal name is an alias.  */
11135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11136 choke me
11137 #else
11138 $ac_func();
11139 #endif
11140
11141 ; return 0; }
11142 EOF
11143 if { (eval echo configure:11144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11144   rm -rf conftest*
11145   eval "ac_cv_func_$ac_func=yes"
11146 else
11147   echo "configure: failed program was:" >&5
11148   cat conftest.$ac_ext >&5
11149   rm -rf conftest*
11150   eval "ac_cv_func_$ac_func=no"
11151 fi
11152 rm -f conftest*
11153
11154 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11155   echo "$ac_t""yes" 1>&6
11156     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11157   { test "$extra_verbose" = "yes" && cat << EOF
11158     Defining $ac_tr_func
11159 EOF
11160 cat >> confdefs.h <<EOF
11161 #define $ac_tr_func 1
11162 EOF
11163 }
11164  
11165 else
11166   echo "$ac_t""no" 1>&6
11167 fi
11168 done
11169
11170
11171 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11172   case "$opsys" in
11173     hpux11* )
11174       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11175       ac_cv_func_getaddrinfo=no
11176       ;;
11177   esac
11178 fi
11179
11180
11181 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11182 do
11183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11184 echo "configure:11185: checking for $ac_func" >&5
11185
11186 cat > conftest.$ac_ext <<EOF
11187 #line 11188 "configure"
11188 #include "confdefs.h"
11189 /* System header to define __stub macros and hopefully few prototypes,
11190     which can conflict with char $ac_func(); below.  */
11191 #include <assert.h>
11192 /* Override any gcc2 internal prototype to avoid an error.  */
11193 /* We use char because int might match the return type of a gcc2
11194     builtin and then its argument prototype would still apply.  */
11195 char $ac_func();
11196
11197 int main() {
11198
11199 /* The GNU C library defines this for functions which it implements
11200     to always fail with ENOSYS.  Some functions are actually named
11201     something starting with __ and the normal name is an alias.  */
11202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11203 choke me
11204 #else
11205 $ac_func();
11206 #endif
11207
11208 ; return 0; }
11209 EOF
11210 if { (eval echo configure:11211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11211   rm -rf conftest*
11212   eval "ac_cv_func_$ac_func=yes"
11213 else
11214   echo "configure: failed program was:" >&5
11215   cat conftest.$ac_ext >&5
11216   rm -rf conftest*
11217   eval "ac_cv_func_$ac_func=no"
11218 fi
11219 rm -f conftest*
11220
11221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11222   echo "$ac_t""yes" 1>&6
11223     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11224   { test "$extra_verbose" = "yes" && cat << EOF
11225     Defining $ac_tr_func
11226 EOF
11227 cat >> confdefs.h <<EOF
11228 #define $ac_tr_func 1
11229 EOF
11230 }
11231  
11232 else
11233   echo "$ac_t""no" 1>&6
11234 fi
11235 done
11236
11237
11238 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11239 echo "configure:11240: checking for openpty" >&5
11240
11241 cat > conftest.$ac_ext <<EOF
11242 #line 11243 "configure"
11243 #include "confdefs.h"
11244 /* System header to define __stub macros and hopefully few prototypes,
11245     which can conflict with char openpty(); below.  */
11246 #include <assert.h>
11247 /* Override any gcc2 internal prototype to avoid an error.  */
11248 /* We use char because int might match the return type of a gcc2
11249     builtin and then its argument prototype would still apply.  */
11250 char openpty();
11251
11252 int main() {
11253
11254 /* The GNU C library defines this for functions which it implements
11255     to always fail with ENOSYS.  Some functions are actually named
11256     something starting with __ and the normal name is an alias.  */
11257 #if defined (__stub_openpty) || defined (__stub___openpty)
11258 choke me
11259 #else
11260 openpty();
11261 #endif
11262
11263 ; return 0; }
11264 EOF
11265 if { (eval echo configure:11266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11266   rm -rf conftest*
11267   eval "ac_cv_func_openpty=yes"
11268 else
11269   echo "configure: failed program was:" >&5
11270   cat conftest.$ac_ext >&5
11271   rm -rf conftest*
11272   eval "ac_cv_func_openpty=no"
11273 fi
11274 rm -f conftest*
11275
11276 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11277   echo "$ac_t""yes" 1>&6
11278   have_openpty=yes
11279 else
11280   echo "$ac_t""no" 1>&6
11281
11282   
11283 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11284 echo "configure:11285: checking for openpty in -lutil" >&5
11285 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11286
11287 xe_check_libs=" -lutil "
11288 cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.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 openpty();
11295
11296 int main() {
11297 openpty()
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11301   rm -rf conftest*
11302   eval "ac_cv_lib_$ac_lib_var=yes"
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_lib_$ac_lib_var=no"
11308 fi
11309 rm -f conftest*
11310 xe_check_libs=""
11311
11312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11313   echo "$ac_t""yes" 1>&6
11314   have_openpty=yes need_libutil=yes
11315 else
11316   echo "$ac_t""no" 1>&6
11317 fi
11318
11319
11320 fi
11321
11322 if test "$have_openpty" = "yes"; then
11323   { test "$extra_verbose" = "yes" && cat << \EOF
11324     Defining HAVE_OPENPTY
11325 EOF
11326 cat >> confdefs.h <<\EOF
11327 #define HAVE_OPENPTY 1
11328 EOF
11329 }
11330
11331   for ac_hdr in pty.h libutil.h util.h
11332 do
11333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11335 echo "configure:11336: checking for $ac_hdr" >&5
11336
11337 cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340 #include <$ac_hdr>
11341 EOF
11342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11343 { (eval echo configure:11344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11345 if test -z "$ac_err"; then
11346   rm -rf conftest*
11347   eval "ac_cv_header_$ac_safe=yes"
11348 else
11349   echo "$ac_err" >&5
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -rf conftest*
11353   eval "ac_cv_header_$ac_safe=no"
11354 fi
11355 rm -f conftest*
11356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11357   echo "$ac_t""yes" 1>&6
11358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11359   { test "$extra_verbose" = "yes" && cat << EOF
11360     Defining $ac_tr_hdr
11361 EOF
11362 cat >> confdefs.h <<EOF
11363 #define $ac_tr_hdr 1
11364 EOF
11365 }
11366  break
11367 else
11368   echo "$ac_t""no" 1>&6
11369 fi
11370 done
11371
11372   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11373 fi
11374
11375 for ac_hdr in stropts.h
11376 do
11377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11379 echo "configure:11380: checking for $ac_hdr" >&5
11380
11381 cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 #include <$ac_hdr>
11385 EOF
11386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11387 { (eval echo configure:11388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11389 if test -z "$ac_err"; then
11390   rm -rf conftest*
11391   eval "ac_cv_header_$ac_safe=yes"
11392 else
11393   echo "$ac_err" >&5
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -rf conftest*
11397   eval "ac_cv_header_$ac_safe=no"
11398 fi
11399 rm -f conftest*
11400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11401   echo "$ac_t""yes" 1>&6
11402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11403   { test "$extra_verbose" = "yes" && cat << EOF
11404     Defining $ac_tr_hdr
11405 EOF
11406 cat >> confdefs.h <<EOF
11407 #define $ac_tr_hdr 1
11408 EOF
11409 }
11410  
11411 else
11412   echo "$ac_t""no" 1>&6
11413 fi
11414 done
11415
11416 if test "$ac_cv_header_stropts_h" = "yes"; then
11417   for ac_func in isastream
11418 do
11419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11420 echo "configure:11421: checking for $ac_func" >&5
11421
11422 cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 /* System header to define __stub macros and hopefully few prototypes,
11426     which can conflict with char $ac_func(); below.  */
11427 #include <assert.h>
11428 /* Override any gcc2 internal prototype to avoid an error.  */
11429 /* We use char because int might match the return type of a gcc2
11430     builtin and then its argument prototype would still apply.  */
11431 char $ac_func();
11432
11433 int main() {
11434
11435 /* The GNU C library defines this for functions which it implements
11436     to always fail with ENOSYS.  Some functions are actually named
11437     something starting with __ and the normal name is an alias.  */
11438 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11439 choke me
11440 #else
11441 $ac_func();
11442 #endif
11443
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11447   rm -rf conftest*
11448   eval "ac_cv_func_$ac_func=yes"
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   eval "ac_cv_func_$ac_func=no"
11454 fi
11455 rm -f conftest*
11456
11457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11458   echo "$ac_t""yes" 1>&6
11459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11460   { test "$extra_verbose" = "yes" && cat << EOF
11461     Defining $ac_tr_func
11462 EOF
11463 cat >> confdefs.h <<EOF
11464 #define $ac_tr_func 1
11465 EOF
11466 }
11467  
11468 else
11469   echo "$ac_t""no" 1>&6
11470 fi
11471 done
11472
11473   for ac_hdr in strtio.h
11474 do
11475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11477 echo "configure:11478: checking for $ac_hdr" >&5
11478
11479 cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482 #include <$ac_hdr>
11483 EOF
11484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11485 { (eval echo configure:11486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11487 if test -z "$ac_err"; then
11488   rm -rf conftest*
11489   eval "ac_cv_header_$ac_safe=yes"
11490 else
11491   echo "$ac_err" >&5
11492   echo "configure: failed program was:" >&5
11493   cat conftest.$ac_ext >&5
11494   rm -rf conftest*
11495   eval "ac_cv_header_$ac_safe=no"
11496 fi
11497 rm -f conftest*
11498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11499   echo "$ac_t""yes" 1>&6
11500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11501   { test "$extra_verbose" = "yes" && cat << EOF
11502     Defining $ac_tr_hdr
11503 EOF
11504 cat >> confdefs.h <<EOF
11505 #define $ac_tr_hdr 1
11506 EOF
11507 }
11508  
11509 else
11510   echo "$ac_t""no" 1>&6
11511 fi
11512 done
11513  fi
11514
11515 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11516    echo "    xemacs will be linked with \"realpath.o\""
11517  fi
11518
11519 for ac_func in getloadavg
11520 do
11521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11522 echo "configure:11523: checking for $ac_func" >&5
11523
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 /* System header to define __stub macros and hopefully few prototypes,
11528     which can conflict with char $ac_func(); below.  */
11529 #include <assert.h>
11530 /* Override any gcc2 internal prototype to avoid an error.  */
11531 /* We use char because int might match the return type of a gcc2
11532     builtin and then its argument prototype would still apply.  */
11533 char $ac_func();
11534
11535 int main() {
11536
11537 /* The GNU C library defines this for functions which it implements
11538     to always fail with ENOSYS.  Some functions are actually named
11539     something starting with __ and the normal name is an alias.  */
11540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11541 choke me
11542 #else
11543 $ac_func();
11544 #endif
11545
11546 ; return 0; }
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11549   rm -rf conftest*
11550   eval "ac_cv_func_$ac_func=yes"
11551 else
11552   echo "configure: failed program was:" >&5
11553   cat conftest.$ac_ext >&5
11554   rm -rf conftest*
11555   eval "ac_cv_func_$ac_func=no"
11556 fi
11557 rm -f conftest*
11558
11559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11560   echo "$ac_t""yes" 1>&6
11561     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11562   { test "$extra_verbose" = "yes" && cat << EOF
11563     Defining $ac_tr_func
11564 EOF
11565 cat >> confdefs.h <<EOF
11566 #define $ac_tr_func 1
11567 EOF
11568 }
11569  
11570 else
11571   echo "$ac_t""no" 1>&6
11572 fi
11573 done
11574
11575
11576 if test "$ac_cv_func_getloadavg" = "yes"; then
11577         for ac_hdr in sys/loadavg.h
11578 do
11579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11581 echo "configure:11582: checking for $ac_hdr" >&5
11582
11583 cat > conftest.$ac_ext <<EOF
11584 #line 11585 "configure"
11585 #include "confdefs.h"
11586 #include <$ac_hdr>
11587 EOF
11588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11589 { (eval echo configure:11590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11591 if test -z "$ac_err"; then
11592   rm -rf conftest*
11593   eval "ac_cv_header_$ac_safe=yes"
11594 else
11595   echo "$ac_err" >&5
11596   echo "configure: failed program was:" >&5
11597   cat conftest.$ac_ext >&5
11598   rm -rf conftest*
11599   eval "ac_cv_header_$ac_safe=no"
11600 fi
11601 rm -f conftest*
11602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11603   echo "$ac_t""yes" 1>&6
11604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11605   { test "$extra_verbose" = "yes" && cat << EOF
11606     Defining $ac_tr_hdr
11607 EOF
11608 cat >> confdefs.h <<EOF
11609 #define $ac_tr_hdr 1
11610 EOF
11611 }
11612  
11613 else
11614   echo "$ac_t""no" 1>&6
11615 fi
11616 done
11617
11618 else
11619     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11620    echo "    xemacs will be linked with \"getloadavg.o\""
11621  fi
11622
11623     
11624 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11625 echo "configure:11626: checking for kstat_open in -lkstat" >&5
11626 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11627
11628 xe_check_libs=" -lkstat "
11629 cat > conftest.$ac_ext <<EOF
11630 #line 11631 "configure"
11631 #include "confdefs.h"
11632 /* Override any gcc2 internal prototype to avoid an error.  */
11633 /* We use char because int might match the return type of a gcc2
11634     builtin and then its argument prototype would still apply.  */
11635 char kstat_open();
11636
11637 int main() {
11638 kstat_open()
11639 ; return 0; }
11640 EOF
11641 if { (eval echo configure:11642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11642   rm -rf conftest*
11643   eval "ac_cv_lib_$ac_lib_var=yes"
11644 else
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   eval "ac_cv_lib_$ac_lib_var=no"
11649 fi
11650 rm -f conftest*
11651 xe_check_libs=""
11652
11653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11654   echo "$ac_t""yes" 1>&6
11655     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11656     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11657   { test "$extra_verbose" = "yes" && cat << EOF
11658     Defining $ac_tr_lib
11659 EOF
11660 cat >> confdefs.h <<EOF
11661 #define $ac_tr_lib 1
11662 EOF
11663 }
11664
11665   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11666
11667 else
11668   echo "$ac_t""no" 1>&6
11669 fi
11670
11671
11672   for ac_hdr in kstat.h
11673 do
11674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11676 echo "configure:11677: checking for $ac_hdr" >&5
11677
11678 cat > conftest.$ac_ext <<EOF
11679 #line 11680 "configure"
11680 #include "confdefs.h"
11681 #include <$ac_hdr>
11682 EOF
11683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11684 { (eval echo configure:11685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11686 if test -z "$ac_err"; then
11687   rm -rf conftest*
11688   eval "ac_cv_header_$ac_safe=yes"
11689 else
11690   echo "$ac_err" >&5
11691   echo "configure: failed program was:" >&5
11692   cat conftest.$ac_ext >&5
11693   rm -rf conftest*
11694   eval "ac_cv_header_$ac_safe=no"
11695 fi
11696 rm -f conftest*
11697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11698   echo "$ac_t""yes" 1>&6
11699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11700   { test "$extra_verbose" = "yes" && cat << EOF
11701     Defining $ac_tr_hdr
11702 EOF
11703 cat >> confdefs.h <<EOF
11704 #define $ac_tr_hdr 1
11705 EOF
11706 }
11707  
11708 else
11709   echo "$ac_t""no" 1>&6
11710 fi
11711 done
11712
11713
11714     
11715 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11716 echo "configure:11717: checking for kvm_read in -lkvm" >&5
11717 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11718
11719 xe_check_libs=" -lkvm "
11720 cat > conftest.$ac_ext <<EOF
11721 #line 11722 "configure"
11722 #include "confdefs.h"
11723 /* Override any gcc2 internal prototype to avoid an error.  */
11724 /* We use char because int might match the return type of a gcc2
11725     builtin and then its argument prototype would still apply.  */
11726 char kvm_read();
11727
11728 int main() {
11729 kvm_read()
11730 ; return 0; }
11731 EOF
11732 if { (eval echo configure:11733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11733   rm -rf conftest*
11734   eval "ac_cv_lib_$ac_lib_var=yes"
11735 else
11736   echo "configure: failed program was:" >&5
11737   cat conftest.$ac_ext >&5
11738   rm -rf conftest*
11739   eval "ac_cv_lib_$ac_lib_var=no"
11740 fi
11741 rm -f conftest*
11742 xe_check_libs=""
11743
11744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11745   echo "$ac_t""yes" 1>&6
11746     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11747     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11748   { test "$extra_verbose" = "yes" && cat << EOF
11749     Defining $ac_tr_lib
11750 EOF
11751 cat >> confdefs.h <<EOF
11752 #define $ac_tr_lib 1
11753 EOF
11754 }
11755
11756   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11757
11758 else
11759   echo "$ac_t""no" 1>&6
11760 fi
11761
11762
11763 fi
11764
11765 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11766 echo "configure:11767: checking whether netdb declares h_errno" >&5
11767 cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 #include <netdb.h>
11771 int main() {
11772 return h_errno;
11773 ; return 0; }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11776   rm -rf conftest*
11777   echo "$ac_t""yes" 1>&6
11778    { test "$extra_verbose" = "yes" && cat << \EOF
11779     Defining HAVE_H_ERRNO
11780 EOF
11781 cat >> confdefs.h <<\EOF
11782 #define HAVE_H_ERRNO 1
11783 EOF
11784 }
11785
11786 else
11787   echo "configure: failed program was:" >&5
11788   cat conftest.$ac_ext >&5
11789   rm -rf conftest*
11790   echo "$ac_t""no" 1>&6
11791 fi
11792 rm -f conftest*
11793
11794 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11795 echo "configure:11796: checking for sigsetjmp" >&5
11796 cat > conftest.$ac_ext <<EOF
11797 #line 11798 "configure"
11798 #include "confdefs.h"
11799 #include <setjmp.h>
11800 int main() {
11801 sigjmp_buf bar; sigsetjmp (bar, 0);
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11805   rm -rf conftest*
11806   echo "$ac_t""yes" 1>&6
11807    { test "$extra_verbose" = "yes" && cat << \EOF
11808     Defining HAVE_SIGSETJMP
11809 EOF
11810 cat >> confdefs.h <<\EOF
11811 #define HAVE_SIGSETJMP 1
11812 EOF
11813 }
11814
11815 else
11816   echo "configure: failed program was:" >&5
11817   cat conftest.$ac_ext >&5
11818   rm -rf conftest*
11819   echo "$ac_t""no" 1>&6
11820 fi
11821 rm -f conftest*
11822
11823 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11824 echo "configure:11825: checking whether localtime caches TZ" >&5
11825
11826 if test "$ac_cv_func_tzset" = "yes"; then
11827 cat > conftest.$ac_ext <<EOF
11828 #line 11829 "configure"
11829 #include "confdefs.h"
11830 #include <time.h>
11831 #if STDC_HEADERS
11832 # include <stdlib.h>
11833 #endif
11834 extern char **environ;
11835 unset_TZ ()
11836 {
11837   char **from, **to;
11838   for (to = from = environ; (*to = *from); from++)
11839     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11840       to++;
11841 }
11842 char TZ_GMT0[] = "TZ=GMT0";
11843 char TZ_PST8[] = "TZ=PST8";
11844 main()
11845 {
11846   time_t now = time ((time_t *) 0);
11847   int hour_GMT0, hour_unset;
11848   if (putenv (TZ_GMT0) != 0)
11849     exit (1);
11850   hour_GMT0 = localtime (&now)->tm_hour;
11851   unset_TZ ();
11852   hour_unset = localtime (&now)->tm_hour;
11853   if (putenv (TZ_PST8) != 0)
11854     exit (1);
11855   if (localtime (&now)->tm_hour == hour_GMT0)
11856     exit (1);
11857   unset_TZ ();
11858   if (localtime (&now)->tm_hour != hour_unset)
11859     exit (1);
11860   exit (0);
11861 }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11864 then
11865   emacs_cv_localtime_cache=no
11866 else
11867   conftest_rc="$?"
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -fr conftest*
11871   emacs_cv_localtime_cache=yes
11872 fi
11873 rm -fr conftest*
11874 else
11875         # If we lack tzset, report that localtime does not cache TZ,
11876         # since we can't invalidate the cache if we don't have tzset.
11877         emacs_cv_localtime_cache=no
11878 fi
11879 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11880 if test $emacs_cv_localtime_cache = yes; then
11881   { test "$extra_verbose" = "yes" && cat << \EOF
11882     Defining LOCALTIME_CACHE
11883 EOF
11884 cat >> confdefs.h <<\EOF
11885 #define LOCALTIME_CACHE 1
11886 EOF
11887 }
11888
11889 fi
11890
11891 if test "$HAVE_TIMEVAL" = "yes"; then
11892 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11893 echo "configure:11894: checking whether gettimeofday accepts one or two arguments" >&5
11894 cat > conftest.$ac_ext <<EOF
11895 #line 11896 "configure"
11896 #include "confdefs.h"
11897
11898 #ifdef TIME_WITH_SYS_TIME
11899 #include <sys/time.h>
11900 #include <time.h>
11901 #else
11902 #ifdef HAVE_SYS_TIME_H
11903 #include <sys/time.h>
11904 #else
11905 #include <time.h>
11906 #endif
11907 #endif
11908   
11909 int main() {
11910
11911   struct timeval time;
11912   gettimeofday (&time, 0);
11913
11914 ; return 0; }
11915 EOF
11916 if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11917   rm -rf conftest*
11918   echo "$ac_t""two" 1>&6
11919 else
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   echo "$ac_t""one" 1>&6
11924    { test "$extra_verbose" = "yes" && cat << \EOF
11925     Defining GETTIMEOFDAY_ONE_ARGUMENT
11926 EOF
11927 cat >> confdefs.h <<\EOF
11928 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11929 EOF
11930 }
11931
11932 fi
11933 rm -f conftest*
11934 fi
11935
11936
11937 echo $ac_n "checking for inline""... $ac_c" 1>&6
11938 echo "configure:11939: checking for inline" >&5
11939
11940 ac_cv_c_inline=no
11941 for ac_kw in inline __inline__ __inline; do
11942   cat > conftest.$ac_ext <<EOF
11943 #line 11944 "configure"
11944 #include "confdefs.h"
11945
11946 int main() {
11947 } $ac_kw foo() {
11948 ; return 0; }
11949 EOF
11950 if { (eval echo configure:11951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11951   rm -rf conftest*
11952   ac_cv_c_inline=$ac_kw; break
11953 else
11954   echo "configure: failed program was:" >&5
11955   cat conftest.$ac_ext >&5
11956 fi
11957 rm -f conftest*
11958 done
11959
11960
11961 echo "$ac_t""$ac_cv_c_inline" 1>&6
11962 case "$ac_cv_c_inline" in
11963   inline | yes) ;;
11964   no) { test "$extra_verbose" = "yes" && cat << \EOF
11965     Defining inline = 
11966 EOF
11967 cat >> confdefs.h <<\EOF
11968 #define inline 
11969 EOF
11970 }
11971  ;;
11972   *)  { test "$extra_verbose" = "yes" && cat << EOF
11973     Defining inline = $ac_cv_c_inline
11974 EOF
11975 cat >> confdefs.h <<EOF
11976 #define inline $ac_cv_c_inline
11977 EOF
11978 }
11979  ;;
11980 esac
11981
11982 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11983    echo "    xemacs will be linked with \"inline.o\""
11984  fi
11985
11986
11987 if test "$__DECC" != "yes"; then
11988   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11989 # for constant arguments.  Useless!
11990 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11991 echo "configure:11992: checking for working alloca.h" >&5
11992
11993 cat > conftest.$ac_ext <<EOF
11994 #line 11995 "configure"
11995 #include "confdefs.h"
11996 #include <alloca.h>
11997 int main() {
11998 char *p = alloca(2 * sizeof(int));
11999 ; return 0; }
12000 EOF
12001 if { (eval echo configure:12002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12002   rm -rf conftest*
12003   ac_cv_header_alloca_h=yes
12004 else
12005   echo "configure: failed program was:" >&5
12006   cat conftest.$ac_ext >&5
12007   rm -rf conftest*
12008   ac_cv_header_alloca_h=no
12009 fi
12010 rm -f conftest*
12011
12012 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12013 if test $ac_cv_header_alloca_h = yes; then
12014   { test "$extra_verbose" = "yes" && cat << \EOF
12015     Defining HAVE_ALLOCA_H
12016 EOF
12017 cat >> confdefs.h <<\EOF
12018 #define HAVE_ALLOCA_H 1
12019 EOF
12020 }
12021
12022 fi
12023
12024 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12025 echo "configure:12026: checking for alloca" >&5
12026
12027 cat > conftest.$ac_ext <<EOF
12028 #line 12029 "configure"
12029 #include "confdefs.h"
12030
12031 #ifdef __GNUC__
12032 # define alloca __builtin_alloca
12033 #else
12034 # ifdef _MSC_VER
12035 #  include <malloc.h>
12036 #  define alloca _alloca
12037 # else
12038 #  if HAVE_ALLOCA_H
12039 #   include <alloca.h>
12040 #  else
12041 #   ifdef _AIX
12042  #pragma alloca
12043 #   else
12044 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12045 char *alloca ();
12046 #    endif
12047 #   endif
12048 #  endif
12049 # endif
12050 #endif
12051
12052 int main() {
12053 char *p = (char *) alloca(1);
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   ac_cv_func_alloca_works=yes
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -rf conftest*
12063   ac_cv_func_alloca_works=no
12064 fi
12065 rm -f conftest*
12066
12067 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12068 if test $ac_cv_func_alloca_works = yes; then
12069   { test "$extra_verbose" = "yes" && cat << \EOF
12070     Defining HAVE_ALLOCA
12071 EOF
12072 cat >> confdefs.h <<\EOF
12073 #define HAVE_ALLOCA 1
12074 EOF
12075 }
12076
12077 fi
12078
12079 if test $ac_cv_func_alloca_works = no; then
12080   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12081   # that cause trouble.  Some versions do not even contain alloca or
12082   # contain a buggy version.  If you still want to use their alloca,
12083   # use ar to extract alloca.o from them instead of compiling alloca.c.
12084   ALLOCA=alloca.${ac_objext}
12085   { test "$extra_verbose" = "yes" && cat << \EOF
12086     Defining C_ALLOCA
12087 EOF
12088 cat >> confdefs.h <<\EOF
12089 #define C_ALLOCA 1
12090 EOF
12091 }
12092
12093
12094 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12095 echo "configure:12096: checking whether alloca needs Cray hooks" >&5
12096
12097 cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 #if defined(CRAY) && ! defined(CRAY2)
12101 webecray
12102 #else
12103 wenotbecray
12104 #endif
12105
12106 EOF
12107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12108   egrep "webecray" >/dev/null 2>&1; then
12109   rm -rf conftest*
12110   ac_cv_os_cray=yes
12111 else
12112   rm -rf conftest*
12113   ac_cv_os_cray=no
12114 fi
12115 rm -f conftest*
12116
12117
12118 echo "$ac_t""$ac_cv_os_cray" 1>&6
12119 if test $ac_cv_os_cray = yes; then
12120 for ac_func in _getb67 GETB67 getb67; do
12121   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12122 echo "configure:12123: checking for $ac_func" >&5
12123
12124 cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127 /* System header to define __stub macros and hopefully few prototypes,
12128     which can conflict with char $ac_func(); below.  */
12129 #include <assert.h>
12130 /* Override any gcc2 internal prototype to avoid an error.  */
12131 /* We use char because int might match the return type of a gcc2
12132     builtin and then its argument prototype would still apply.  */
12133 char $ac_func();
12134
12135 int main() {
12136
12137 /* The GNU C library defines this for functions which it implements
12138     to always fail with ENOSYS.  Some functions are actually named
12139     something starting with __ and the normal name is an alias.  */
12140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12141 choke me
12142 #else
12143 $ac_func();
12144 #endif
12145
12146 ; return 0; }
12147 EOF
12148 if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12149   rm -rf conftest*
12150   eval "ac_cv_func_$ac_func=yes"
12151 else
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -rf conftest*
12155   eval "ac_cv_func_$ac_func=no"
12156 fi
12157 rm -f conftest*
12158
12159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12160   echo "$ac_t""yes" 1>&6
12161   { test "$extra_verbose" = "yes" && cat << EOF
12162     Defining CRAY_STACKSEG_END = $ac_func
12163 EOF
12164 cat >> confdefs.h <<EOF
12165 #define CRAY_STACKSEG_END $ac_func
12166 EOF
12167 }
12168
12169   break
12170 else
12171   echo "$ac_t""no" 1>&6
12172 fi
12173
12174 done
12175 fi
12176
12177 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12178 echo "configure:12179: checking stack direction for C alloca" >&5
12179
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 find_stack_direction ()
12184 {
12185   static char *addr = 0;
12186   auto char dummy;
12187   if (addr == 0)
12188     {
12189       addr = &dummy;
12190       return find_stack_direction ();
12191     }
12192   else
12193     return (&dummy > addr) ? 1 : -1;
12194 }
12195 main ()
12196 {
12197   exit (find_stack_direction() < 0);
12198 }
12199 EOF
12200 if { (eval echo configure:12201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12201 then
12202   ac_cv_c_stack_direction=1
12203 else
12204   conftest_rc="$?"
12205   echo "configure: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   rm -fr conftest*
12208   ac_cv_c_stack_direction=-1
12209 fi
12210 rm -fr conftest*
12211
12212 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12213 { test "$extra_verbose" = "yes" && cat << EOF
12214     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12215 EOF
12216 cat >> confdefs.h <<EOF
12217 #define STACK_DIRECTION $ac_cv_c_stack_direction
12218 EOF
12219 }
12220
12221 fi
12222
12223   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12224    echo "    xemacs will be linked with \"$ALLOCA\""
12225  fi
12226 fi
12227
12228 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12229 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12230 echo "configure:12231: checking for vfork.h" >&5
12231
12232 cat > conftest.$ac_ext <<EOF
12233 #line 12234 "configure"
12234 #include "confdefs.h"
12235 #include <vfork.h>
12236 EOF
12237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12238 { (eval echo configure:12239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12240 if test -z "$ac_err"; then
12241   rm -rf conftest*
12242   eval "ac_cv_header_$ac_safe=yes"
12243 else
12244   echo "$ac_err" >&5
12245   echo "configure: failed program was:" >&5
12246   cat conftest.$ac_ext >&5
12247   rm -rf conftest*
12248   eval "ac_cv_header_$ac_safe=no"
12249 fi
12250 rm -f conftest*
12251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12252   echo "$ac_t""yes" 1>&6
12253   { test "$extra_verbose" = "yes" && cat << \EOF
12254     Defining HAVE_VFORK_H
12255 EOF
12256 cat >> confdefs.h <<\EOF
12257 #define HAVE_VFORK_H 1
12258 EOF
12259 }
12260
12261 else
12262   echo "$ac_t""no" 1>&6
12263 fi
12264
12265 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12266 echo "configure:12267: checking for working vfork" >&5
12267
12268 cat > conftest.$ac_ext <<EOF
12269 #line 12270 "configure"
12270 #include "confdefs.h"
12271 /* Thanks to Paul Eggert for this test.  */
12272 #include <stdio.h>
12273 #include <sys/types.h>
12274 #include <sys/stat.h>
12275 #ifdef HAVE_UNISTD_H
12276 #include <unistd.h>
12277 #endif
12278 #ifdef HAVE_VFORK_H
12279 #include <vfork.h>
12280 #endif
12281 /* On some sparc systems, changes by the child to local and incoming
12282    argument registers are propagated back to the parent.
12283    The compiler is told about this with #include <vfork.h>,
12284    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12285    Test for this by using a static variable whose address
12286    is put into a register that is clobbered by the vfork.  */
12287 static
12288 #ifdef __cplusplus
12289 sparc_address_test (int arg)
12290 #else
12291 sparc_address_test (arg) int arg;
12292 #endif
12293 {
12294   static pid_t child;
12295   if (!child) {
12296     child = vfork ();
12297     if (child < 0) {
12298       perror ("vfork");
12299       _exit(2);
12300     }
12301     if (!child) {
12302       arg = getpid();
12303       write(-1, "", 0);
12304       _exit (arg);
12305     }
12306   }
12307 }
12308 main() {
12309   pid_t parent = getpid ();
12310   pid_t child;
12311
12312   sparc_address_test ();
12313
12314   child = vfork ();
12315
12316   if (child == 0) {
12317     /* Here is another test for sparc vfork register problems.
12318        This test uses lots of local variables, at least
12319        as many local variables as main has allocated so far
12320        including compiler temporaries.  4 locals are enough for
12321        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12322        A buggy compiler should reuse the register of parent
12323        for one of the local variables, since it will think that
12324        parent can't possibly be used any more in this routine.
12325        Assigning to the local variable will thus munge parent
12326        in the parent process.  */
12327     pid_t
12328       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12329       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12330     /* Convince the compiler that p..p7 are live; otherwise, it might
12331        use the same hardware register for all 8 local variables.  */
12332     if (p != p1 || p != p2 || p != p3 || p != p4
12333         || p != p5 || p != p6 || p != p7)
12334       _exit(1);
12335
12336     /* On some systems (e.g. IRIX 3.3),
12337        vfork doesn't separate parent from child file descriptors.
12338        If the child closes a descriptor before it execs or exits,
12339        this munges the parent's descriptor as well.
12340        Test for this by closing stdout in the child.  */
12341     _exit(close(fileno(stdout)) != 0);
12342   } else {
12343     int status;
12344     struct stat st;
12345
12346     while (wait(&status) != child)
12347       ;
12348     exit(
12349          /* Was there some problem with vforking?  */
12350          child < 0
12351
12352          /* Did the child fail?  (This shouldn't happen.)  */
12353          || status
12354
12355          /* Did the vfork/compiler bug occur?  */
12356          || parent != getpid()
12357
12358          /* Did the file descriptor bug occur?  */
12359          || fstat(fileno(stdout), &st) != 0
12360          );
12361   }
12362 }
12363 EOF
12364 if { (eval echo configure:12365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12365 then
12366   ac_cv_func_vfork_works=yes
12367 else
12368   conftest_rc="$?"
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -fr conftest*
12372   ac_cv_func_vfork_works=no
12373 fi
12374 rm -fr conftest*
12375
12376 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12377 if test $ac_cv_func_vfork_works = no; then
12378   { test "$extra_verbose" = "yes" && cat << \EOF
12379     Defining vfork = fork
12380 EOF
12381 cat >> confdefs.h <<\EOF
12382 #define vfork fork
12383 EOF
12384 }
12385
12386 fi
12387
12388
12389 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12390 echo "configure:12391: checking for working strcoll" >&5
12391
12392 cat > conftest.$ac_ext <<EOF
12393 #line 12394 "configure"
12394 #include "confdefs.h"
12395 #include <string.h>
12396 main ()
12397 {
12398   exit (strcoll ("abc", "def") >= 0 ||
12399         strcoll ("ABC", "DEF") >= 0 ||
12400         strcoll ("123", "456") >= 0);
12401 }
12402 EOF
12403 if { (eval echo configure:12404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12404 then
12405   ac_cv_func_strcoll_works=yes
12406 else
12407   conftest_rc="$?"
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -fr conftest*
12411   ac_cv_func_strcoll_works=no
12412 fi
12413 rm -fr conftest*
12414
12415 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12416 if test $ac_cv_func_strcoll_works = yes; then
12417   { test "$extra_verbose" = "yes" && cat << \EOF
12418     Defining HAVE_STRCOLL
12419 EOF
12420 cat >> confdefs.h <<\EOF
12421 #define HAVE_STRCOLL 1
12422 EOF
12423 }
12424
12425 fi
12426
12427
12428 for ac_func in getpgrp
12429 do
12430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12431 echo "configure:12432: checking for $ac_func" >&5
12432
12433 cat > conftest.$ac_ext <<EOF
12434 #line 12435 "configure"
12435 #include "confdefs.h"
12436 /* System header to define __stub macros and hopefully few prototypes,
12437     which can conflict with char $ac_func(); below.  */
12438 #include <assert.h>
12439 /* Override any gcc2 internal prototype to avoid an error.  */
12440 /* We use char because int might match the return type of a gcc2
12441     builtin and then its argument prototype would still apply.  */
12442 char $ac_func();
12443
12444 int main() {
12445
12446 /* The GNU C library defines this for functions which it implements
12447     to always fail with ENOSYS.  Some functions are actually named
12448     something starting with __ and the normal name is an alias.  */
12449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12450 choke me
12451 #else
12452 $ac_func();
12453 #endif
12454
12455 ; return 0; }
12456 EOF
12457 if { (eval echo configure:12458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12458   rm -rf conftest*
12459   eval "ac_cv_func_$ac_func=yes"
12460 else
12461   echo "configure: failed program was:" >&5
12462   cat conftest.$ac_ext >&5
12463   rm -rf conftest*
12464   eval "ac_cv_func_$ac_func=no"
12465 fi
12466 rm -f conftest*
12467
12468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12469   echo "$ac_t""yes" 1>&6
12470     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12471   { test "$extra_verbose" = "yes" && cat << EOF
12472     Defining $ac_tr_func
12473 EOF
12474 cat >> confdefs.h <<EOF
12475 #define $ac_tr_func 1
12476 EOF
12477 }
12478  
12479 else
12480   echo "$ac_t""no" 1>&6
12481 fi
12482 done
12483
12484 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12485 echo "configure:12486: checking whether getpgrp takes no argument" >&5
12486
12487 cat > conftest.$ac_ext <<EOF
12488 #line 12489 "configure"
12489 #include "confdefs.h"
12490
12491 /*
12492  * If this system has a BSD-style getpgrp(),
12493  * which takes a pid argument, exit unsuccessfully.
12494  *
12495  * Snarfed from Chet Ramey's bash pgrp.c test program
12496  */
12497 #include <stdio.h>
12498 #include <sys/types.h>
12499
12500 int     pid;
12501 int     pg1, pg2, pg3, pg4;
12502 int     ng, np, s, child;
12503
12504 main()
12505 {
12506         pid = getpid();
12507         pg1 = getpgrp(0);
12508         pg2 = getpgrp();
12509         pg3 = getpgrp(pid);
12510         pg4 = getpgrp(1);
12511
12512         /*
12513          * If all of these values are the same, it's pretty sure that
12514          * we're on a system that ignores getpgrp's first argument.
12515          */
12516         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12517                 exit(0);
12518
12519         child = fork();
12520         if (child < 0)
12521                 exit(1);
12522         else if (child == 0) {
12523                 np = getpid();
12524                 /*
12525                  * If this is Sys V, this will not work; pgrp will be
12526                  * set to np because setpgrp just changes a pgrp to be
12527                  * the same as the pid.
12528                  */
12529                 setpgrp(np, pg1);
12530                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12531                 if (ng == pg1) {
12532                         exit(1);
12533                 } else {
12534                         exit(0);
12535                 }
12536         } else {
12537                 wait(&s);
12538                 exit(s>>8);
12539         }
12540 }
12541
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12544 then
12545   ac_cv_func_getpgrp_void=yes
12546 else
12547   conftest_rc="$?"
12548   echo "configure: failed program was:" >&5
12549   cat conftest.$ac_ext >&5
12550   rm -fr conftest*
12551   ac_cv_func_getpgrp_void=no
12552 fi
12553 rm -fr conftest*
12554
12555
12556 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12557 if test $ac_cv_func_getpgrp_void = yes; then
12558   { test "$extra_verbose" = "yes" && cat << \EOF
12559     Defining GETPGRP_VOID
12560 EOF
12561 cat >> confdefs.h <<\EOF
12562 #define GETPGRP_VOID 1
12563 EOF
12564 }
12565
12566 fi
12567
12568
12569 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12570 echo "configure:12571: checking for working mmap" >&5
12571 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12572 cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575 #include <stdio.h>
12576 #include <unistd.h>
12577 #include <fcntl.h>
12578 #include <sys/mman.h>
12579
12580 #ifndef MAP_VARIABLE
12581 #define MAP_VARIABLE 0
12582 #endif
12583
12584 #ifndef MAP_FAILED
12585 #define MAP_FAILED -1
12586 #endif
12587
12588 int main (int argc, char *argv[])
12589 {
12590   int fd = -1;
12591   caddr_t p;
12592 #ifndef MAP_ANONYMOUS
12593   fd = open ("/dev/zero", O_RDWR);
12594   if (fd < 0)
12595     return 1;
12596 #define MAP_ANONYMOUS 0
12597 #endif
12598   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12599            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12600            fd, 0) != (void *) MAP_FAILED)
12601     return 0;
12602   perror ("conftest: mmap failed");
12603   return 1;
12604 }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12607 then
12608   have_mmap=yes
12609 else
12610   conftest_rc="$?"
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -fr conftest*
12614   have_mmap=no
12615 fi
12616 rm -fr conftest* ;;
12617 esac
12618 echo "$ac_t""$have_mmap" 1>&6
12619 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12620     Defining HAVE_MMAP
12621 EOF
12622 cat >> confdefs.h <<\EOF
12623 #define HAVE_MMAP 1
12624 EOF
12625 }
12626
12627
12628 case "$opsys" in cygwin*) 
12629         test "$rel_alloc" = "default" && rel_alloc=no ;;
12630 esac
12631 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12632 if test "$rel_alloc $have_mmap" = "default yes"; then
12633   if test "$doug_lea_malloc" = "yes"; then
12634         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12635 echo "configure:12636: checking for M_MMAP_THRESHOLD" >&5
12636     cat > conftest.$ac_ext <<EOF
12637 #line 12638 "configure"
12638 #include "confdefs.h"
12639 #include <malloc.h>
12640 int main() {
12641
12642 #ifndef M_MMAP_THRESHOLD
12643 #error No M_MMAP_THRESHOLD :-(
12644 !@+$%^&*_)(_ - unlikely to compile...
12645 #endif
12646
12647 ; return 0; }
12648 EOF
12649 if { (eval echo configure:12650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12650   rm -rf conftest*
12651   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12652 else
12653   echo "configure: failed program was:" >&5
12654   cat conftest.$ac_ext >&5
12655   rm -rf conftest*
12656   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12657 fi
12658 rm -f conftest*
12659   else
12660     rel_alloc=yes
12661   fi
12662 fi
12663 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12664     Defining REL_ALLOC
12665 EOF
12666 cat >> confdefs.h <<\EOF
12667 #define REL_ALLOC 1
12668 EOF
12669 }
12670
12671
12672 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12673 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12674 echo "configure:12675: checking for termios.h" >&5
12675
12676 cat > conftest.$ac_ext <<EOF
12677 #line 12678 "configure"
12678 #include "confdefs.h"
12679 #include <termios.h>
12680 EOF
12681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12682 { (eval echo configure:12683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12684 if test -z "$ac_err"; then
12685   rm -rf conftest*
12686   eval "ac_cv_header_$ac_safe=yes"
12687 else
12688   echo "$ac_err" >&5
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -rf conftest*
12692   eval "ac_cv_header_$ac_safe=no"
12693 fi
12694 rm -f conftest*
12695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12696   echo "$ac_t""yes" 1>&6
12697   { test "$extra_verbose" = "yes" && cat << \EOF
12698     Defining HAVE_TERMIOS
12699 EOF
12700 cat >> confdefs.h <<\EOF
12701 #define HAVE_TERMIOS 1
12702 EOF
12703 }
12704
12705   { test "$extra_verbose" = "yes" && cat << \EOF
12706     Defining SIGNALS_VIA_CHARACTERS
12707 EOF
12708 cat >> confdefs.h <<\EOF
12709 #define SIGNALS_VIA_CHARACTERS 1
12710 EOF
12711 }
12712
12713   { test "$extra_verbose" = "yes" && cat << \EOF
12714     Defining NO_TERMIO
12715 EOF
12716 cat >> confdefs.h <<\EOF
12717 #define NO_TERMIO 1
12718 EOF
12719 }
12720
12721 else
12722   echo "$ac_t""no" 1>&6
12723 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12724 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12725 echo "configure:12726: checking for termio.h" >&5
12726
12727 cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 #include <termio.h>
12731 EOF
12732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12733 { (eval echo configure:12734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12735 if test -z "$ac_err"; then
12736   rm -rf conftest*
12737   eval "ac_cv_header_$ac_safe=yes"
12738 else
12739   echo "$ac_err" >&5
12740   echo "configure: failed program was:" >&5
12741   cat conftest.$ac_ext >&5
12742   rm -rf conftest*
12743   eval "ac_cv_header_$ac_safe=no"
12744 fi
12745 rm -f conftest*
12746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12747   echo "$ac_t""yes" 1>&6
12748   { test "$extra_verbose" = "yes" && cat << \EOF
12749     Defining HAVE_TERMIO
12750 EOF
12751 cat >> confdefs.h <<\EOF
12752 #define HAVE_TERMIO 1
12753 EOF
12754 }
12755
12756 else
12757   echo "$ac_t""no" 1>&6
12758 fi
12759
12760 fi
12761
12762
12763
12764 echo $ac_n "checking for socket""... $ac_c" 1>&6
12765 echo "configure:12766: checking for socket" >&5
12766
12767 cat > conftest.$ac_ext <<EOF
12768 #line 12769 "configure"
12769 #include "confdefs.h"
12770 /* System header to define __stub macros and hopefully few prototypes,
12771     which can conflict with char socket(); below.  */
12772 #include <assert.h>
12773 /* Override any gcc2 internal prototype to avoid an error.  */
12774 /* We use char because int might match the return type of a gcc2
12775     builtin and then its argument prototype would still apply.  */
12776 char socket();
12777
12778 int main() {
12779
12780 /* The GNU C library defines this for functions which it implements
12781     to always fail with ENOSYS.  Some functions are actually named
12782     something starting with __ and the normal name is an alias.  */
12783 #if defined (__stub_socket) || defined (__stub___socket)
12784 choke me
12785 #else
12786 socket();
12787 #endif
12788
12789 ; return 0; }
12790 EOF
12791 if { (eval echo configure:12792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12792   rm -rf conftest*
12793   eval "ac_cv_func_socket=yes"
12794 else
12795   echo "configure: failed program was:" >&5
12796   cat conftest.$ac_ext >&5
12797   rm -rf conftest*
12798   eval "ac_cv_func_socket=no"
12799 fi
12800 rm -f conftest*
12801
12802 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12803   echo "$ac_t""yes" 1>&6
12804   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12805 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12806 echo "configure:12807: checking for netinet/in.h" >&5
12807
12808 cat > conftest.$ac_ext <<EOF
12809 #line 12810 "configure"
12810 #include "confdefs.h"
12811 #include <netinet/in.h>
12812 EOF
12813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12814 { (eval echo configure:12815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12816 if test -z "$ac_err"; then
12817   rm -rf conftest*
12818   eval "ac_cv_header_$ac_safe=yes"
12819 else
12820   echo "$ac_err" >&5
12821   echo "configure: failed program was:" >&5
12822   cat conftest.$ac_ext >&5
12823   rm -rf conftest*
12824   eval "ac_cv_header_$ac_safe=no"
12825 fi
12826 rm -f conftest*
12827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12828   echo "$ac_t""yes" 1>&6
12829   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12830 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12831 echo "configure:12832: checking for arpa/inet.h" >&5
12832
12833 cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 #include <arpa/inet.h>
12837 EOF
12838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12839 { (eval echo configure:12840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12841 if test -z "$ac_err"; then
12842   rm -rf conftest*
12843   eval "ac_cv_header_$ac_safe=yes"
12844 else
12845   echo "$ac_err" >&5
12846   echo "configure: failed program was:" >&5
12847   cat conftest.$ac_ext >&5
12848   rm -rf conftest*
12849   eval "ac_cv_header_$ac_safe=no"
12850 fi
12851 rm -f conftest*
12852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12853   echo "$ac_t""yes" 1>&6
12854   
12855   { test "$extra_verbose" = "yes" && cat << \EOF
12856     Defining HAVE_SOCKETS
12857 EOF
12858 cat >> confdefs.h <<\EOF
12859 #define HAVE_SOCKETS 1
12860 EOF
12861 }
12862
12863       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12864 echo "configure:12865: checking "for sun_len member in struct sockaddr_un"" >&5
12865       cat > conftest.$ac_ext <<EOF
12866 #line 12867 "configure"
12867 #include "confdefs.h"
12868
12869 #include <sys/types.h>
12870 #include <sys/socket.h>
12871 #include <sys/un.h>
12872       
12873 int main() {
12874 static struct sockaddr_un x; x.sun_len = 1;
12875 ; return 0; }
12876 EOF
12877 if { (eval echo configure:12878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12878   rm -rf conftest*
12879   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12880     Defining HAVE_SOCKADDR_SUN_LEN
12881 EOF
12882 cat >> confdefs.h <<\EOF
12883 #define HAVE_SOCKADDR_SUN_LEN 1
12884 EOF
12885 }
12886
12887 else
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -rf conftest*
12891   echo "$ac_t""no" 1>&6
12892 fi
12893 rm -f conftest*
12894       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12895 echo "configure:12896: checking "for ip_mreq struct in netinet/in.h"" >&5
12896       cat > conftest.$ac_ext <<EOF
12897 #line 12898 "configure"
12898 #include "confdefs.h"
12899
12900 #include <sys/types.h>
12901 #include <netinet/in.h>
12902       
12903 int main() {
12904 static struct ip_mreq x;
12905 ; return 0; }
12906 EOF
12907 if { (eval echo configure:12908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12908   rm -rf conftest*
12909   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12910     Defining HAVE_MULTICAST
12911 EOF
12912 cat >> confdefs.h <<\EOF
12913 #define HAVE_MULTICAST 1
12914 EOF
12915 }
12916
12917 else
12918   echo "configure: failed program was:" >&5
12919   cat conftest.$ac_ext >&5
12920   rm -rf conftest*
12921   echo "$ac_t""no" 1>&6
12922 fi
12923 rm -f conftest*
12924 else
12925   echo "$ac_t""no" 1>&6
12926 fi
12927
12928 else
12929   echo "$ac_t""no" 1>&6
12930 fi
12931
12932 else
12933   echo "$ac_t""no" 1>&6
12934 fi
12935
12936
12937 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12938 echo "configure:12939: checking for msgget" >&5
12939
12940 cat > conftest.$ac_ext <<EOF
12941 #line 12942 "configure"
12942 #include "confdefs.h"
12943 /* System header to define __stub macros and hopefully few prototypes,
12944     which can conflict with char msgget(); below.  */
12945 #include <assert.h>
12946 /* Override any gcc2 internal prototype to avoid an error.  */
12947 /* We use char because int might match the return type of a gcc2
12948     builtin and then its argument prototype would still apply.  */
12949 char msgget();
12950
12951 int main() {
12952
12953 /* The GNU C library defines this for functions which it implements
12954     to always fail with ENOSYS.  Some functions are actually named
12955     something starting with __ and the normal name is an alias.  */
12956 #if defined (__stub_msgget) || defined (__stub___msgget)
12957 choke me
12958 #else
12959 msgget();
12960 #endif
12961
12962 ; return 0; }
12963 EOF
12964 if { (eval echo configure:12965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12965   rm -rf conftest*
12966   eval "ac_cv_func_msgget=yes"
12967 else
12968   echo "configure: failed program was:" >&5
12969   cat conftest.$ac_ext >&5
12970   rm -rf conftest*
12971   eval "ac_cv_func_msgget=no"
12972 fi
12973 rm -f conftest*
12974
12975 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12976   echo "$ac_t""yes" 1>&6
12977   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12978 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12979 echo "configure:12980: checking for sys/ipc.h" >&5
12980
12981 cat > conftest.$ac_ext <<EOF
12982 #line 12983 "configure"
12983 #include "confdefs.h"
12984 #include <sys/ipc.h>
12985 EOF
12986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12987 { (eval echo configure:12988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12989 if test -z "$ac_err"; then
12990   rm -rf conftest*
12991   eval "ac_cv_header_$ac_safe=yes"
12992 else
12993   echo "$ac_err" >&5
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   eval "ac_cv_header_$ac_safe=no"
12998 fi
12999 rm -f conftest*
13000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13001   echo "$ac_t""yes" 1>&6
13002   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13003 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13004 echo "configure:13005: checking for sys/msg.h" >&5
13005
13006 cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 #include <sys/msg.h>
13010 EOF
13011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13012 { (eval echo configure:13013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13014 if test -z "$ac_err"; then
13015   rm -rf conftest*
13016   eval "ac_cv_header_$ac_safe=yes"
13017 else
13018   echo "$ac_err" >&5
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   eval "ac_cv_header_$ac_safe=no"
13023 fi
13024 rm -f conftest*
13025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13026   echo "$ac_t""yes" 1>&6
13027   { test "$extra_verbose" = "yes" && cat << \EOF
13028     Defining HAVE_SYSVIPC
13029 EOF
13030 cat >> confdefs.h <<\EOF
13031 #define HAVE_SYSVIPC 1
13032 EOF
13033 }
13034
13035 else
13036   echo "$ac_t""no" 1>&6
13037 fi
13038
13039 else
13040   echo "$ac_t""no" 1>&6
13041 fi
13042
13043 else
13044   echo "$ac_t""no" 1>&6
13045 fi
13046
13047
13048 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13049 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13050 echo "configure:13051: checking for dirent.h" >&5
13051
13052 cat > conftest.$ac_ext <<EOF
13053 #line 13054 "configure"
13054 #include "confdefs.h"
13055 #include <dirent.h>
13056 EOF
13057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13058 { (eval echo configure:13059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13060 if test -z "$ac_err"; then
13061   rm -rf conftest*
13062   eval "ac_cv_header_$ac_safe=yes"
13063 else
13064   echo "$ac_err" >&5
13065   echo "configure: failed program was:" >&5
13066   cat conftest.$ac_ext >&5
13067   rm -rf conftest*
13068   eval "ac_cv_header_$ac_safe=no"
13069 fi
13070 rm -f conftest*
13071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13072   echo "$ac_t""yes" 1>&6
13073   { test "$extra_verbose" = "yes" && cat << \EOF
13074     Defining SYSV_SYSTEM_DIR
13075 EOF
13076 cat >> confdefs.h <<\EOF
13077 #define SYSV_SYSTEM_DIR 1
13078 EOF
13079 }
13080
13081 else
13082   echo "$ac_t""no" 1>&6
13083 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13084 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13085 echo "configure:13086: checking for sys/dir.h" >&5
13086
13087 cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090 #include <sys/dir.h>
13091 EOF
13092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13093 { (eval echo configure:13094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13095 if test -z "$ac_err"; then
13096   rm -rf conftest*
13097   eval "ac_cv_header_$ac_safe=yes"
13098 else
13099   echo "$ac_err" >&5
13100   echo "configure: failed program was:" >&5
13101   cat conftest.$ac_ext >&5
13102   rm -rf conftest*
13103   eval "ac_cv_header_$ac_safe=no"
13104 fi
13105 rm -f conftest*
13106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13107   echo "$ac_t""yes" 1>&6
13108   :
13109 else
13110   echo "$ac_t""no" 1>&6
13111 { test "$extra_verbose" = "yes" && cat << \EOF
13112     Defining NONSYSTEM_DIR_LIBRARY
13113 EOF
13114 cat >> confdefs.h <<\EOF
13115 #define NONSYSTEM_DIR_LIBRARY 1
13116 EOF
13117 }
13118
13119 fi
13120
13121 fi
13122
13123
13124 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13125 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13126 echo "configure:13127: checking for nlist.h" >&5
13127
13128 cat > conftest.$ac_ext <<EOF
13129 #line 13130 "configure"
13130 #include "confdefs.h"
13131 #include <nlist.h>
13132 EOF
13133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13134 { (eval echo configure:13135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13136 if test -z "$ac_err"; then
13137   rm -rf conftest*
13138   eval "ac_cv_header_$ac_safe=yes"
13139 else
13140   echo "$ac_err" >&5
13141   echo "configure: failed program was:" >&5
13142   cat conftest.$ac_ext >&5
13143   rm -rf conftest*
13144   eval "ac_cv_header_$ac_safe=no"
13145 fi
13146 rm -f conftest*
13147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13148   echo "$ac_t""yes" 1>&6
13149   { test "$extra_verbose" = "yes" && cat << \EOF
13150     Defining NLIST_STRUCT
13151 EOF
13152 cat >> confdefs.h <<\EOF
13153 #define NLIST_STRUCT 1
13154 EOF
13155 }
13156
13157 else
13158   echo "$ac_t""no" 1>&6
13159 fi
13160
13161
13162
13163 echo "checking "for sound support"" 1>&6
13164 echo "configure:13165: checking "for sound support"" >&5
13165 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13166
13167 if test "$with_native_sound" != "no"; then
13168     if test -n "$native_sound_lib"; then
13169     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13170 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13171 echo "configure:13172: checking for multimedia/audio_device.h" >&5
13172
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 #include <multimedia/audio_device.h>
13177 EOF
13178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13179 { (eval echo configure:13180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13181 if test -z "$ac_err"; then
13182   rm -rf conftest*
13183   eval "ac_cv_header_$ac_safe=yes"
13184 else
13185   echo "$ac_err" >&5
13186   echo "configure: failed program was:" >&5
13187   cat conftest.$ac_ext >&5
13188   rm -rf conftest*
13189   eval "ac_cv_header_$ac_safe=no"
13190 fi
13191 rm -f conftest*
13192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13193   echo "$ac_t""yes" 1>&6
13194   sound_found=yes sound_cflags=""
13195       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13196    echo "    xemacs will be linked with \"sunplay.o\""
13197  fi
13198 else
13199   echo "$ac_t""no" 1>&6
13200 fi
13201
13202   fi
13203
13204     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13205     if test -d "/usr/demo/SOUND/include/multimedia"; then
13206       sun_sound_cflags="-I/usr/demo/SOUND/include"
13207     elif test -d "/usr/demo/SOUND/multimedia"; then
13208       sun_sound_cflags="-I/usr/demo/SOUND"
13209     fi
13210
13211     if test -n "$native_sound_lib"; then
13212       sun_sound_lib="$native_sound_lib"
13213     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13214       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13215     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13216       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13217     fi
13218
13219     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13220       native_sound_lib="$sun_sound_lib"
13221       sound_cflags="$sun_sound_cflags"
13222       sound_found=yes
13223       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13224    echo "    xemacs will be linked with \"sunplay.o\""
13225  fi
13226     fi
13227   fi
13228
13229     if test -z "$sound_found"; then
13230     case "$canonical" in
13231     *-sgi-* )
13232       if test -z "$native_sound_lib"; then
13233         
13234 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13235 echo "configure:13236: checking for ALopenport in -laudio" >&5
13236 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13237
13238 xe_check_libs=" -laudio "
13239 cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 /* Override any gcc2 internal prototype to avoid an error.  */
13243 /* We use char because int might match the return type of a gcc2
13244     builtin and then its argument prototype would still apply.  */
13245 char ALopenport();
13246
13247 int main() {
13248 ALopenport()
13249 ; return 0; }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13252   rm -rf conftest*
13253   eval "ac_cv_lib_$ac_lib_var=yes"
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   eval "ac_cv_lib_$ac_lib_var=no"
13259 fi
13260 rm -f conftest*
13261 xe_check_libs=""
13262
13263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13264   echo "$ac_t""yes" 1>&6
13265   native_sound_lib="-laudio"
13266 else
13267   echo "$ac_t""no" 1>&6
13268 fi
13269
13270
13271       fi
13272       if test -n "$native_sound_lib"; then
13273         sound_found=yes sound_cflags=""
13274         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13275    echo "    xemacs will be linked with \"sgiplay.o\""
13276  fi
13277       fi ;;
13278     hppa*-hp-hpux* )
13279       if test -z "$native_sound_lib"; then
13280         
13281 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13282 echo "configure:13283: checking for AOpenAudio in -lAlib" >&5
13283 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13284
13285 xe_check_libs=" -lAlib "
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 /* Override any gcc2 internal prototype to avoid an error.  */
13290 /* We use char because int might match the return type of a gcc2
13291     builtin and then its argument prototype would still apply.  */
13292 char AOpenAudio();
13293
13294 int main() {
13295 AOpenAudio()
13296 ; return 0; }
13297 EOF
13298 if { (eval echo configure:13299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13299   rm -rf conftest*
13300   eval "ac_cv_lib_$ac_lib_var=yes"
13301 else
13302   echo "configure: failed program was:" >&5
13303   cat conftest.$ac_ext >&5
13304   rm -rf conftest*
13305   eval "ac_cv_lib_$ac_lib_var=no"
13306 fi
13307 rm -f conftest*
13308 xe_check_libs=""
13309
13310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13311   echo "$ac_t""yes" 1>&6
13312   native_sound_lib="-lAlib"
13313 else
13314   echo "$ac_t""no" 1>&6
13315 fi
13316
13317
13318       fi
13319       if test -n "$native_sound_lib"; then
13320         sound_found=yes
13321         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13322    echo "    xemacs will be linked with \"hpplay.o\""
13323  fi
13324         if test "$GCC" = "yes" # Kludge city
13325           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13326           else sound_cflags="+e -I/usr/audio/examples"
13327         fi
13328       fi ;;
13329     esac
13330   fi
13331
13332     if test -z "$sound_found"; then
13333     if test "$with_msw" = "yes"; then
13334     sound_found=yes
13335     native_sound_lib=
13336     fi
13337   fi
13338
13339     if test -z "$sound_found"; then
13340     for dir in "machine" "sys" "linux"; do
13341       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13342 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13343 echo "configure:13344: checking for ${dir}/soundcard.h" >&5
13344
13345 cat > conftest.$ac_ext <<EOF
13346 #line 13347 "configure"
13347 #include "confdefs.h"
13348 #include <${dir}/soundcard.h>
13349 EOF
13350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13351 { (eval echo configure:13352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13353 if test -z "$ac_err"; then
13354   rm -rf conftest*
13355   eval "ac_cv_header_$ac_safe=yes"
13356 else
13357   echo "$ac_err" >&5
13358   echo "configure: failed program was:" >&5
13359   cat conftest.$ac_ext >&5
13360   rm -rf conftest*
13361   eval "ac_cv_header_$ac_safe=no"
13362 fi
13363 rm -f conftest*
13364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13365   echo "$ac_t""yes" 1>&6
13366   sound_found=yes
13367        need_miscplay=yes
13368         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13369    echo "    xemacs will be linked with \"linuxplay.o\""
13370  fi
13371         { test "$extra_verbose" = "yes" && cat << EOF
13372     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13373 EOF
13374 cat >> confdefs.h <<EOF
13375 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13376 EOF
13377 }
13378
13379         break
13380 else
13381   echo "$ac_t""no" 1>&6
13382 fi
13383
13384     done
13385   fi
13386
13387   test "$sound_found" = "yes" && with_native_sound=yes
13388 fi
13389
13390 if test "$with_native_sound" = "yes"; then
13391   { test "$extra_verbose" = "yes" && cat << \EOF
13392     Defining HAVE_NATIVE_SOUND
13393 EOF
13394 cat >> confdefs.h <<\EOF
13395 #define HAVE_NATIVE_SOUND 1
13396 EOF
13397 }
13398
13399   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13400 fi
13401
13402 if test "$with_nas_sound" != "no"; then
13403   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13404 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13405 echo "configure:13406: checking for audio/audiolib.h" >&5
13406
13407 cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 #include <audio/audiolib.h>
13411 EOF
13412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13413 { (eval echo configure:13414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13415 if test -z "$ac_err"; then
13416   rm -rf conftest*
13417   eval "ac_cv_header_$ac_safe=yes"
13418 else
13419   echo "$ac_err" >&5
13420   echo "configure: failed program was:" >&5
13421   cat conftest.$ac_ext >&5
13422   rm -rf conftest*
13423   eval "ac_cv_header_$ac_safe=no"
13424 fi
13425 rm -f conftest*
13426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13427   echo "$ac_t""yes" 1>&6
13428   
13429     
13430 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13431 echo "configure:13432: checking for AuOpenServer in -laudio" >&5
13432 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13433
13434 xe_check_libs=" -laudio "
13435 cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438 /* Override any gcc2 internal prototype to avoid an error.  */
13439 /* We use char because int might match the return type of a gcc2
13440     builtin and then its argument prototype would still apply.  */
13441 char AuOpenServer();
13442
13443 int main() {
13444 AuOpenServer()
13445 ; return 0; }
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13448   rm -rf conftest*
13449   eval "ac_cv_lib_$ac_lib_var=yes"
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -rf conftest*
13454   eval "ac_cv_lib_$ac_lib_var=no"
13455 fi
13456 rm -f conftest*
13457 xe_check_libs=""
13458
13459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13460   echo "$ac_t""yes" 1>&6
13461   have_nas_sound=yes
13462 else
13463   echo "$ac_t""no" 1>&6
13464 fi
13465
13466
13467 else
13468   echo "$ac_t""no" 1>&6
13469 fi
13470
13471   if test "$have_nas_sound" = "yes"; then
13472     with_nas_sound=yes
13473     { test "$extra_verbose" = "yes" && cat << \EOF
13474     Defining HAVE_NAS_SOUND
13475 EOF
13476 cat >> confdefs.h <<\EOF
13477 #define HAVE_NAS_SOUND 1
13478 EOF
13479 }
13480
13481     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13482    echo "    xemacs will be linked with \"nas.o\""
13483  fi
13484     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13485             cat > conftest.$ac_ext <<EOF
13486 #line 13487 "configure"
13487 #include "confdefs.h"
13488 #include <audio/Xtutil.h>
13489 EOF
13490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13491   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13492   :
13493 else
13494   rm -rf conftest*
13495   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13496     Defining NAS_NO_ERROR_JUMP
13497 EOF
13498 cat >> confdefs.h <<\EOF
13499 #define NAS_NO_ERROR_JUMP 1
13500 EOF
13501 }
13502
13503 fi
13504 rm -f conftest*
13505
13506   else
13507     test "$with_nas_sound" = "yes" && \
13508       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13509     with_nas_sound=no
13510   fi
13511 fi
13512
13513 if test "$with_esd_sound" != "no"; then
13514   # Extract the first word of "esd-config", so it can be a program name with args.
13515 set dummy esd-config; ac_word=$2
13516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13517 echo "configure:13518: checking for $ac_word" >&5
13518
13519 if test -n "$have_esd_config"; then
13520   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13521 else
13522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13523   ac_dummy="$PATH"
13524   for ac_dir in $ac_dummy; do
13525     test -z "$ac_dir" && ac_dir=.
13526     if test -f $ac_dir/$ac_word; then
13527       ac_cv_prog_have_esd_config="yes"
13528       break
13529     fi
13530   done
13531   IFS="$ac_save_ifs"
13532   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13533 fi
13534 have_esd_config="$ac_cv_prog_have_esd_config"
13535 if test -n "$have_esd_config"; then
13536   echo "$ac_t""$have_esd_config" 1>&6
13537 else
13538   echo "$ac_t""no" 1>&6
13539 fi
13540
13541   if test "$have_esd_config" = "yes"; then
13542     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13543     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
13544     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13545     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13546 echo "configure:13547: checking for esd_play_stream" >&5
13547
13548 cat > conftest.$ac_ext <<EOF
13549 #line 13550 "configure"
13550 #include "confdefs.h"
13551 /* System header to define __stub macros and hopefully few prototypes,
13552     which can conflict with char esd_play_stream(); below.  */
13553 #include <assert.h>
13554 /* Override any gcc2 internal prototype to avoid an error.  */
13555 /* We use char because int might match the return type of a gcc2
13556     builtin and then its argument prototype would still apply.  */
13557 char esd_play_stream();
13558
13559 int main() {
13560
13561 /* The GNU C library defines this for functions which it implements
13562     to always fail with ENOSYS.  Some functions are actually named
13563     something starting with __ and the normal name is an alias.  */
13564 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13565 choke me
13566 #else
13567 esd_play_stream();
13568 #endif
13569
13570 ; return 0; }
13571 EOF
13572 if { (eval echo configure:13573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13573   rm -rf conftest*
13574   eval "ac_cv_func_esd_play_stream=yes"
13575 else
13576   echo "configure: failed program was:" >&5
13577   cat conftest.$ac_ext >&5
13578   rm -rf conftest*
13579   eval "ac_cv_func_esd_play_stream=no"
13580 fi
13581 rm -f conftest*
13582
13583 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13584   echo "$ac_t""yes" 1>&6
13585   have_esd_sound=yes
13586 else
13587   echo "$ac_t""no" 1>&6
13588 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13589 fi
13590
13591   fi
13592
13593   if test "$have_esd_sound" = "yes"; then
13594     with_esd_sound=yes
13595     need_miscplay=yes
13596     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13597    echo "    xemacs will be linked with \"esd.o\""
13598  fi
13599     { test "$extra_verbose" = "yes" && cat << \EOF
13600     Defining HAVE_ESD_SOUND
13601 EOF
13602 cat >> confdefs.h <<\EOF
13603 #define HAVE_ESD_SOUND 1
13604 EOF
13605 }
13606
13607   else
13608     test "$with_esd_sound" = "yes" && \
13609       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13610     with_esd_sound=no
13611   fi
13612 fi
13613
13614 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13615    echo "    xemacs will be linked with \"miscplay.o\""
13616  fi
13617
13618
13619 test -z "$with_tty" && with_tty=yes
13620
13621 if test "$with_tty" = "yes"  ; then
13622   echo "checking for TTY-related features" 1>&6
13623 echo "configure:13624: checking for TTY-related features" >&5
13624   { test "$extra_verbose" = "yes" && cat << \EOF
13625     Defining HAVE_TTY
13626 EOF
13627 cat >> confdefs.h <<\EOF
13628 #define HAVE_TTY 1
13629 EOF
13630 }
13631
13632   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
13633    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\""
13634  fi
13635
13636     if test -z "$with_ncurses"; then
13637     
13638 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13639 echo "configure:13640: checking for tgetent in -lncurses" >&5
13640 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13641
13642 xe_check_libs=" -lncurses "
13643 cat > conftest.$ac_ext <<EOF
13644 #line 13645 "configure"
13645 #include "confdefs.h"
13646 /* Override any gcc2 internal prototype to avoid an error.  */
13647 /* We use char because int might match the return type of a gcc2
13648     builtin and then its argument prototype would still apply.  */
13649 char tgetent();
13650
13651 int main() {
13652 tgetent()
13653 ; return 0; }
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13656   rm -rf conftest*
13657   eval "ac_cv_lib_$ac_lib_var=yes"
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -rf conftest*
13662   eval "ac_cv_lib_$ac_lib_var=no"
13663 fi
13664 rm -f conftest*
13665 xe_check_libs=""
13666
13667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13668   echo "$ac_t""yes" 1>&6
13669   with_ncurses=yes
13670 else
13671   echo "$ac_t""no" 1>&6
13672 with_ncurses=no
13673 fi
13674
13675
13676   fi
13677   if test "$with_ncurses" = "yes"; then
13678     { test "$extra_verbose" = "yes" && cat << \EOF
13679     Defining HAVE_NCURSES
13680 EOF
13681 cat >> confdefs.h <<\EOF
13682 #define HAVE_NCURSES 1
13683 EOF
13684 }
13685
13686     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13687 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13688 echo "configure:13689: checking for ncurses/curses.h" >&5
13689
13690 cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693 #include <ncurses/curses.h>
13694 EOF
13695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13696 { (eval echo configure:13697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13698 if test -z "$ac_err"; then
13699   rm -rf conftest*
13700   eval "ac_cv_header_$ac_safe=yes"
13701 else
13702   echo "$ac_err" >&5
13703   echo "configure: failed program was:" >&5
13704   cat conftest.$ac_ext >&5
13705   rm -rf conftest*
13706   eval "ac_cv_header_$ac_safe=no"
13707 fi
13708 rm -f conftest*
13709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13710   echo "$ac_t""yes" 1>&6
13711   curses_h_file=ncurses/curses.h
13712 else
13713   echo "$ac_t""no" 1>&6
13714 fi
13715
13716     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13717 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13718 echo "configure:13719: checking for ncurses/term.h" >&5
13719
13720 cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 #include <ncurses/term.h>
13724 EOF
13725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13726 { (eval echo configure:13727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13728 if test -z "$ac_err"; then
13729   rm -rf conftest*
13730   eval "ac_cv_header_$ac_safe=yes"
13731 else
13732   echo "$ac_err" >&5
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   eval "ac_cv_header_$ac_safe=no"
13737 fi
13738 rm -f conftest*
13739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13740   echo "$ac_t""yes" 1>&6
13741   term_h_file=ncurses/term.h
13742 else
13743   echo "$ac_t""no" 1>&6
13744 fi
13745
13746     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13747    echo "    xemacs will be linked with \"terminfo.o\""
13748  fi
13749     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13750
13751     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13752                         save_c_switch_site="$c_switch_site"
13753       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13754       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13755 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13756 echo "configure:13757: checking for ncurses/curses.h" >&5
13757
13758 cat > conftest.$ac_ext <<EOF
13759 #line 13760 "configure"
13760 #include "confdefs.h"
13761 #include <ncurses/curses.h>
13762 EOF
13763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13764 { (eval echo configure:13765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13766 if test -z "$ac_err"; then
13767   rm -rf conftest*
13768   eval "ac_cv_header_$ac_safe=yes"
13769 else
13770   echo "$ac_err" >&5
13771   echo "configure: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   rm -rf conftest*
13774   eval "ac_cv_header_$ac_safe=no"
13775 fi
13776 rm -f conftest*
13777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13778   echo "$ac_t""yes" 1>&6
13779   curses_h_file=ncurses/curses.h
13780 else
13781   echo "$ac_t""no" 1>&6
13782 fi
13783
13784       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13785         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13786         else c_switch_site="$save_c_switch_site"
13787       fi
13788     fi
13789   else         if test "$have_terminfo" = "yes"; then
13790       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13791    echo "    xemacs will be linked with \"terminfo.o\""
13792  fi
13793       if test -n "$libs_termcap"; then
13794         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13795       else
13796         for lib in curses termlib termcap; do
13797           
13798 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13799 echo "configure:13800: checking for tgetent in -l$lib" >&5
13800 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13801
13802 xe_check_libs=" -l$lib "
13803 cat > conftest.$ac_ext <<EOF
13804 #line 13805 "configure"
13805 #include "confdefs.h"
13806 /* Override any gcc2 internal prototype to avoid an error.  */
13807 /* We use char because int might match the return type of a gcc2
13808     builtin and then its argument prototype would still apply.  */
13809 char tgetent();
13810
13811 int main() {
13812 tgetent()
13813 ; return 0; }
13814 EOF
13815 if { (eval echo configure:13816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13816   rm -rf conftest*
13817   eval "ac_cv_lib_$ac_lib_var=yes"
13818 else
13819   echo "configure: failed program was:" >&5
13820   cat conftest.$ac_ext >&5
13821   rm -rf conftest*
13822   eval "ac_cv_lib_$ac_lib_var=no"
13823 fi
13824 rm -f conftest*
13825 xe_check_libs=""
13826
13827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13828   echo "$ac_t""yes" 1>&6
13829   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13830 else
13831   echo "$ac_t""no" 1>&6
13832 fi
13833
13834
13835         done
13836       fi
13837     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13838                                 
13839 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13840 echo "configure:13841: checking for tgoto in -ltermcap" >&5
13841 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13842
13843 xe_check_libs=" -ltermcap "
13844 cat > conftest.$ac_ext <<EOF
13845 #line 13846 "configure"
13846 #include "confdefs.h"
13847 /* Override any gcc2 internal prototype to avoid an error.  */
13848 /* We use char because int might match the return type of a gcc2
13849     builtin and then its argument prototype would still apply.  */
13850 char tgoto();
13851
13852 int main() {
13853 tgoto()
13854 ; return 0; }
13855 EOF
13856 if { (eval echo configure:13857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13857   rm -rf conftest*
13858   eval "ac_cv_lib_$ac_lib_var=yes"
13859 else
13860   echo "configure: failed program was:" >&5
13861   cat conftest.$ac_ext >&5
13862   rm -rf conftest*
13863   eval "ac_cv_lib_$ac_lib_var=no"
13864 fi
13865 rm -f conftest*
13866 xe_check_libs=""
13867
13868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13869   echo "$ac_t""yes" 1>&6
13870     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13871     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13872   { test "$extra_verbose" = "yes" && cat << EOF
13873     Defining $ac_tr_lib
13874 EOF
13875 cat >> confdefs.h <<EOF
13876 #define $ac_tr_lib 1
13877 EOF
13878 }
13879
13880   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13881
13882 else
13883   echo "$ac_t""no" 1>&6
13884 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13885    echo "    xemacs will be linked with \"tparam.o\""
13886  fi
13887 fi
13888
13889
13890       else
13891         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13892    echo "    xemacs will be linked with \"tparam.o\""
13893  fi
13894       fi
13895                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13896       if test -n "$libs_termcap"; then
13897         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13898       else
13899         
13900 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13901 echo "configure:13902: checking for tgetent in -lcurses" >&5
13902 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13903
13904 xe_check_libs=" -lcurses "
13905 cat > conftest.$ac_ext <<EOF
13906 #line 13907 "configure"
13907 #include "confdefs.h"
13908 /* Override any gcc2 internal prototype to avoid an error.  */
13909 /* We use char because int might match the return type of a gcc2
13910     builtin and then its argument prototype would still apply.  */
13911 char tgetent();
13912
13913 int main() {
13914 tgetent()
13915 ; return 0; }
13916 EOF
13917 if { (eval echo configure:13918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13918   rm -rf conftest*
13919   eval "ac_cv_lib_$ac_lib_var=yes"
13920 else
13921   echo "configure: failed program was:" >&5
13922   cat conftest.$ac_ext >&5
13923   rm -rf conftest*
13924   eval "ac_cv_lib_$ac_lib_var=no"
13925 fi
13926 rm -f conftest*
13927 xe_check_libs=""
13928
13929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13930   echo "$ac_t""yes" 1>&6
13931   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13932 else
13933   echo "$ac_t""no" 1>&6
13934 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13935 echo "configure:13936: checking for tgetent in -ltermcap" >&5
13936 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13937
13938 xe_check_libs=" -ltermcap "
13939 cat > conftest.$ac_ext <<EOF
13940 #line 13941 "configure"
13941 #include "confdefs.h"
13942 /* Override any gcc2 internal prototype to avoid an error.  */
13943 /* We use char because int might match the return type of a gcc2
13944     builtin and then its argument prototype would still apply.  */
13945 char tgetent();
13946
13947 int main() {
13948 tgetent()
13949 ; return 0; }
13950 EOF
13951 if { (eval echo configure:13952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13952   rm -rf conftest*
13953   eval "ac_cv_lib_$ac_lib_var=yes"
13954 else
13955   echo "configure: failed program was:" >&5
13956   cat conftest.$ac_ext >&5
13957   rm -rf conftest*
13958   eval "ac_cv_lib_$ac_lib_var=no"
13959 fi
13960 rm -f conftest*
13961 xe_check_libs=""
13962
13963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13964   echo "$ac_t""yes" 1>&6
13965   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13966 else
13967   echo "$ac_t""no" 1>&6
13968 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13969    echo "    xemacs will be linked with \"termcap.o\""
13970  fi
13971 fi
13972
13973
13974 fi
13975
13976
13977       fi
13978     fi
13979   fi
13980   { test "$extra_verbose" = "yes" && cat << EOF
13981     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13982 EOF
13983 cat >> confdefs.h <<EOF
13984 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13985 EOF
13986 }
13987
13988   { test "$extra_verbose" = "yes" && cat << EOF
13989     Defining TERM_H_FILE = "${term_h_file-term.h}"
13990 EOF
13991 cat >> confdefs.h <<EOF
13992 #define TERM_H_FILE "${term_h_file-term.h}"
13993 EOF
13994 }
13995
13996
13997     if test "$with_gpm" != "no"; then
13998     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13999 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14000 echo "configure:14001: checking for gpm.h" >&5
14001
14002 cat > conftest.$ac_ext <<EOF
14003 #line 14004 "configure"
14004 #include "confdefs.h"
14005 #include <gpm.h>
14006 EOF
14007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14008 { (eval echo configure:14009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14010 if test -z "$ac_err"; then
14011   rm -rf conftest*
14012   eval "ac_cv_header_$ac_safe=yes"
14013 else
14014   echo "$ac_err" >&5
14015   echo "configure: failed program was:" >&5
14016   cat conftest.$ac_ext >&5
14017   rm -rf conftest*
14018   eval "ac_cv_header_$ac_safe=no"
14019 fi
14020 rm -f conftest*
14021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14022   echo "$ac_t""yes" 1>&6
14023   
14024       
14025 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14026 echo "configure:14027: checking for Gpm_Open in -lgpm" >&5
14027 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14028
14029 xe_check_libs=" -lgpm "
14030 cat > conftest.$ac_ext <<EOF
14031 #line 14032 "configure"
14032 #include "confdefs.h"
14033 /* Override any gcc2 internal prototype to avoid an error.  */
14034 /* We use char because int might match the return type of a gcc2
14035     builtin and then its argument prototype would still apply.  */
14036 char Gpm_Open();
14037
14038 int main() {
14039 Gpm_Open()
14040 ; return 0; }
14041 EOF
14042 if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14043   rm -rf conftest*
14044   eval "ac_cv_lib_$ac_lib_var=yes"
14045 else
14046   echo "configure: failed program was:" >&5
14047   cat conftest.$ac_ext >&5
14048   rm -rf conftest*
14049   eval "ac_cv_lib_$ac_lib_var=no"
14050 fi
14051 rm -f conftest*
14052 xe_check_libs=""
14053
14054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14055   echo "$ac_t""yes" 1>&6
14056   have_gpm=yes
14057 else
14058   echo "$ac_t""no" 1>&6
14059 fi
14060
14061
14062 else
14063   echo "$ac_t""no" 1>&6
14064 fi
14065
14066     if test "$have_gpm" = "yes"; then
14067       with_gpm=yes
14068       { test "$extra_verbose" = "yes" && cat << \EOF
14069     Defining HAVE_GPM
14070 EOF
14071 cat >> confdefs.h <<\EOF
14072 #define HAVE_GPM 1
14073 EOF
14074 }
14075
14076       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14077    echo "    xemacs will be linked with \"gpmevent.o\""
14078  fi
14079       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14080     elif test "$with_gpm" = "yes"; then
14081       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14082     else
14083       with_gpm=no
14084     fi
14085   fi
14086
14087 else   for feature in ncurses gpm; do
14088     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14089       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14090     fi
14091     eval "with_${feature}=no"
14092   done
14093 fi 
14094 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
14095    echo "    xemacs will be linked with \"event-unixoid.o\""
14096  fi
14097
14098
14099 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14100   != "no no no" && echo "checking for database support" 1>&6
14101 echo "configure:14102: checking for database support" >&5
14102
14103 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14104   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14105 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14106 echo "configure:14107: checking for ndbm.h" >&5
14107
14108 cat > conftest.$ac_ext <<EOF
14109 #line 14110 "configure"
14110 #include "confdefs.h"
14111 #include <ndbm.h>
14112 EOF
14113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14114 { (eval echo configure:14115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14116 if test -z "$ac_err"; then
14117   rm -rf conftest*
14118   eval "ac_cv_header_$ac_safe=yes"
14119 else
14120   echo "$ac_err" >&5
14121   echo "configure: failed program was:" >&5
14122   cat conftest.$ac_ext >&5
14123   rm -rf conftest*
14124   eval "ac_cv_header_$ac_safe=no"
14125 fi
14126 rm -f conftest*
14127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14128   echo "$ac_t""yes" 1>&6
14129   :
14130 else
14131   echo "$ac_t""no" 1>&6
14132
14133     test "$with_database_gdbm" = "yes" -o \
14134          "$with_database_dbm"  = "yes" && \
14135       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14136     with_database_gdbm=no with_database_dbm=no
14137 fi
14138
14139 fi
14140
14141 if test "$with_database_gdbm" != "no"; then
14142   
14143 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14144 echo "configure:14145: checking for dbm_open in -lgdbm" >&5
14145 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14146
14147 xe_check_libs=" -lgdbm "
14148 cat > conftest.$ac_ext <<EOF
14149 #line 14150 "configure"
14150 #include "confdefs.h"
14151 /* Override any gcc2 internal prototype to avoid an error.  */
14152 /* We use char because int might match the return type of a gcc2
14153     builtin and then its argument prototype would still apply.  */
14154 char dbm_open();
14155
14156 int main() {
14157 dbm_open()
14158 ; return 0; }
14159 EOF
14160 if { (eval echo configure:14161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14161   rm -rf conftest*
14162   eval "ac_cv_lib_$ac_lib_var=yes"
14163 else
14164   echo "configure: failed program was:" >&5
14165   cat conftest.$ac_ext >&5
14166   rm -rf conftest*
14167   eval "ac_cv_lib_$ac_lib_var=no"
14168 fi
14169 rm -f conftest*
14170 xe_check_libs=""
14171
14172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14173   echo "$ac_t""yes" 1>&6
14174   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14175 else
14176   echo "$ac_t""no" 1>&6
14177 if test "$with_database_gdbm" = "yes"; then
14178      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14179    fi
14180    with_database_gdbm=no
14181 fi
14182
14183
14184 fi
14185
14186 if test "$with_database_dbm" != "no"; then
14187   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14188 echo "configure:14189: checking for dbm_open" >&5
14189
14190 cat > conftest.$ac_ext <<EOF
14191 #line 14192 "configure"
14192 #include "confdefs.h"
14193 /* System header to define __stub macros and hopefully few prototypes,
14194     which can conflict with char dbm_open(); below.  */
14195 #include <assert.h>
14196 /* Override any gcc2 internal prototype to avoid an error.  */
14197 /* We use char because int might match the return type of a gcc2
14198     builtin and then its argument prototype would still apply.  */
14199 char dbm_open();
14200
14201 int main() {
14202
14203 /* The GNU C library defines this for functions which it implements
14204     to always fail with ENOSYS.  Some functions are actually named
14205     something starting with __ and the normal name is an alias.  */
14206 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14207 choke me
14208 #else
14209 dbm_open();
14210 #endif
14211
14212 ; return 0; }
14213 EOF
14214 if { (eval echo configure:14215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14215   rm -rf conftest*
14216   eval "ac_cv_func_dbm_open=yes"
14217 else
14218   echo "configure: failed program was:" >&5
14219   cat conftest.$ac_ext >&5
14220   rm -rf conftest*
14221   eval "ac_cv_func_dbm_open=no"
14222 fi
14223 rm -f conftest*
14224
14225 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14226   echo "$ac_t""yes" 1>&6
14227   with_database_dbm=yes libdbm=
14228 else
14229   echo "$ac_t""no" 1>&6
14230
14231     
14232 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14233 echo "configure:14234: checking for dbm_open in -ldbm" >&5
14234 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14235
14236 xe_check_libs=" -ldbm "
14237 cat > conftest.$ac_ext <<EOF
14238 #line 14239 "configure"
14239 #include "confdefs.h"
14240 /* Override any gcc2 internal prototype to avoid an error.  */
14241 /* We use char because int might match the return type of a gcc2
14242     builtin and then its argument prototype would still apply.  */
14243 char dbm_open();
14244
14245 int main() {
14246 dbm_open()
14247 ; return 0; }
14248 EOF
14249 if { (eval echo configure:14250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14250   rm -rf conftest*
14251   eval "ac_cv_lib_$ac_lib_var=yes"
14252 else
14253   echo "configure: failed program was:" >&5
14254   cat conftest.$ac_ext >&5
14255   rm -rf conftest*
14256   eval "ac_cv_lib_$ac_lib_var=no"
14257 fi
14258 rm -f conftest*
14259 xe_check_libs=""
14260
14261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14262   echo "$ac_t""yes" 1>&6
14263   with_database_dbm=yes libdbm=-ldbm
14264 else
14265   echo "$ac_t""no" 1>&6
14266 test "$with_database_dbm" = "yes" && \
14267         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14268       with_database_dbm=no
14269 fi
14270
14271
14272 fi
14273
14274 fi
14275
14276 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14277 test "$with_database_gdbm" = "yes" -o \
14278      "$with_database_dbm"  = "yes" && \
14279   { test "$extra_verbose" = "yes" && cat << \EOF
14280     Defining HAVE_DBM
14281 EOF
14282 cat >> confdefs.h <<\EOF
14283 #define HAVE_DBM 1
14284 EOF
14285 }
14286
14287
14288 if test "$with_database_berkdb" != "no"; then
14289   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14290 echo "configure:14291: checking for Berkeley db.h" >&5
14291   for header in "db/db.h" "db.h"; do
14292     case "$opsys" in
14293         *freebsd*)
14294     cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297
14298 #include <stdlib.h>
14299 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14300 #ifdef HAVE_INTTYPES_H
14301 #define __BIT_TYPES_DEFINED__
14302 #include <inttypes.h>
14303 #endif
14304 #endif
14305 #include <$header>
14306
14307 int main() {
14308
14309 ; return 0; }
14310 EOF
14311 if { (eval echo configure:14312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14312   rm -rf conftest*
14313   db_h_file="$header"; break
14314 else
14315   echo "configure: failed program was:" >&5
14316   cat conftest.$ac_ext >&5
14317 fi
14318 rm -f conftest*
14319         ;;
14320         *)
14321     cat > conftest.$ac_ext <<EOF
14322 #line 14323 "configure"
14323 #include "confdefs.h"
14324
14325 #include <stdlib.h>
14326 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14327 #ifdef HAVE_INTTYPES_H
14328 #define __BIT_TYPES_DEFINED__
14329 #include <inttypes.h>
14330 typedef uint8_t  u_int8_t;
14331 typedef uint16_t u_int16_t;
14332 typedef uint32_t u_int32_t;
14333 #ifdef WE_DONT_NEED_QUADS
14334 typedef uint64_t u_int64_t;
14335 #endif
14336 #endif
14337 #endif
14338 #include <$header>
14339
14340 int main() {
14341
14342 ; return 0; }
14343 EOF
14344 if { (eval echo configure:14345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14345   rm -rf conftest*
14346   db_h_file="$header"; break
14347 else
14348   echo "configure: failed program was:" >&5
14349   cat conftest.$ac_ext >&5
14350 fi
14351 rm -f conftest*
14352         ;;
14353         esac
14354   done
14355   if test -z "$db_h_file"
14356   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14357   else echo "$ac_t""$db_h_file" 1>&6
14358   fi
14359
14360   if test "$with_database_berkdb" != "no"; then
14361     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14362 echo "configure:14363: checking for Berkeley DB version" >&5
14363     cat > conftest.$ac_ext <<EOF
14364 #line 14365 "configure"
14365 #include "confdefs.h"
14366 #include <$db_h_file>
14367 #if DB_VERSION_MAJOR > 1
14368 yes
14369 #endif
14370
14371 EOF
14372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14373   egrep "yes" >/dev/null 2>&1; then
14374   rm -rf conftest*
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 #include <$db_h_file>
14379 #if DB_VERSION_MAJOR > 2
14380 yes
14381 #endif
14382
14383 EOF
14384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14385   egrep "yes" >/dev/null 2>&1; then
14386   rm -rf conftest*
14387   echo "$ac_t""3" 1>&6; dbfunc=db_create
14388 else
14389   rm -rf conftest*
14390   
14391     echo "$ac_t""2" 1>&6; dbfunc=db_open
14392 fi
14393 rm -f conftest*
14394
14395 else
14396   rm -rf conftest*
14397   
14398     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14399 fi
14400 rm -f conftest*
14401
14402     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14403 echo "configure:14404: checking for $dbfunc" >&5
14404
14405 cat > conftest.$ac_ext <<EOF
14406 #line 14407 "configure"
14407 #include "confdefs.h"
14408 /* System header to define __stub macros and hopefully few prototypes,
14409     which can conflict with char $dbfunc(); below.  */
14410 #include <assert.h>
14411 /* Override any gcc2 internal prototype to avoid an error.  */
14412 /* We use char because int might match the return type of a gcc2
14413     builtin and then its argument prototype would still apply.  */
14414 char $dbfunc();
14415
14416 int main() {
14417
14418 /* The GNU C library defines this for functions which it implements
14419     to always fail with ENOSYS.  Some functions are actually named
14420     something starting with __ and the normal name is an alias.  */
14421 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14422 choke me
14423 #else
14424 $dbfunc();
14425 #endif
14426
14427 ; return 0; }
14428 EOF
14429 if { (eval echo configure:14430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14430   rm -rf conftest*
14431   eval "ac_cv_func_$dbfunc=yes"
14432 else
14433   echo "configure: failed program was:" >&5
14434   cat conftest.$ac_ext >&5
14435   rm -rf conftest*
14436   eval "ac_cv_func_$dbfunc=no"
14437 fi
14438 rm -f conftest*
14439
14440 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14441   echo "$ac_t""yes" 1>&6
14442   with_database_berkdb=yes need_libdb=no
14443 else
14444   echo "$ac_t""no" 1>&6
14445
14446     
14447 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14448 echo "configure:14449: checking for $dbfunc in -ldb" >&5
14449 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14450
14451 xe_check_libs=" -ldb "
14452 cat > conftest.$ac_ext <<EOF
14453 #line 14454 "configure"
14454 #include "confdefs.h"
14455 /* Override any gcc2 internal prototype to avoid an error.  */
14456 /* We use char because int might match the return type of a gcc2
14457     builtin and then its argument prototype would still apply.  */
14458 char $dbfunc();
14459
14460 int main() {
14461 $dbfunc()
14462 ; return 0; }
14463 EOF
14464 if { (eval echo configure:14465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14465   rm -rf conftest*
14466   eval "ac_cv_lib_$ac_lib_var=yes"
14467 else
14468   echo "configure: failed program was:" >&5
14469   cat conftest.$ac_ext >&5
14470   rm -rf conftest*
14471   eval "ac_cv_lib_$ac_lib_var=no"
14472 fi
14473 rm -f conftest*
14474 xe_check_libs=""
14475
14476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14477   echo "$ac_t""yes" 1>&6
14478   with_database_berkdb=yes need_libdb=yes
14479 else
14480   echo "$ac_t""no" 1>&6
14481 fi
14482
14483
14484 fi
14485
14486   fi
14487
14488   if test "$with_database_berkdb" = "yes"; then
14489     { test "$extra_verbose" = "yes" && cat << EOF
14490     Defining DB_H_FILE = "$db_h_file"
14491 EOF
14492 cat >> confdefs.h <<EOF
14493 #define DB_H_FILE "$db_h_file"
14494 EOF
14495 }
14496
14497     { test "$extra_verbose" = "yes" && cat << \EOF
14498     Defining HAVE_BERKELEY_DB
14499 EOF
14500 cat >> confdefs.h <<\EOF
14501 #define HAVE_BERKELEY_DB 1
14502 EOF
14503 }
14504
14505     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14506   else with_database_berkdb=no
14507   fi
14508 fi
14509
14510 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14511      != "no no no"; then
14512   { test "$extra_verbose" = "yes" && cat << \EOF
14513     Defining HAVE_DATABASE
14514 EOF
14515 cat >> confdefs.h <<\EOF
14516 #define HAVE_DATABASE 1
14517 EOF
14518 }
14519
14520   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14521    echo "    xemacs will be linked with \"database.o\""
14522  fi
14523 fi
14524
14525 if test "$with_socks" = "yes"; then
14526   
14527 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14528 echo "configure:14529: checking for SOCKSinit in -lsocks" >&5
14529 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14530
14531 xe_check_libs=" -lsocks "
14532 cat > conftest.$ac_ext <<EOF
14533 #line 14534 "configure"
14534 #include "confdefs.h"
14535 /* Override any gcc2 internal prototype to avoid an error.  */
14536 /* We use char because int might match the return type of a gcc2
14537     builtin and then its argument prototype would still apply.  */
14538 char SOCKSinit();
14539
14540 int main() {
14541 SOCKSinit()
14542 ; return 0; }
14543 EOF
14544 if { (eval echo configure:14545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14545   rm -rf conftest*
14546   eval "ac_cv_lib_$ac_lib_var=yes"
14547 else
14548   echo "configure: failed program was:" >&5
14549   cat conftest.$ac_ext >&5
14550   rm -rf conftest*
14551   eval "ac_cv_lib_$ac_lib_var=no"
14552 fi
14553 rm -f conftest*
14554 xe_check_libs=""
14555
14556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14557   echo "$ac_t""yes" 1>&6
14558     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14559     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14560   { test "$extra_verbose" = "yes" && cat << EOF
14561     Defining $ac_tr_lib
14562 EOF
14563 cat >> confdefs.h <<EOF
14564 #define $ac_tr_lib 1
14565 EOF
14566 }
14567
14568   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14569
14570 else
14571   echo "$ac_t""no" 1>&6
14572 fi
14573
14574
14575   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14576     Defining HAVE_SOCKS
14577 EOF
14578 cat >> confdefs.h <<\EOF
14579 #define HAVE_SOCKS 1
14580 EOF
14581 }
14582
14583 fi
14584
14585 if test "$usage_tracking" = "yes"; then
14586   { test "$extra_verbose" = "yes" && cat << \EOF
14587     Defining USAGE_TRACKING
14588 EOF
14589 cat >> confdefs.h <<\EOF
14590 #define USAGE_TRACKING 1
14591 EOF
14592 }
14593
14594   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14595 fi
14596
14597 if test "$with_modules" != "no"; then
14598   echo "checking for module support" 1>&6
14599 echo "configure:14600: checking for module support" >&5
14600
14601     if test "$with_msw" = "yes"; then
14602     have_dl=yes;
14603   else
14604         case "$opsys" in
14605       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14606     Defining HAVE_DYLD
14607 EOF
14608 cat >> confdefs.h <<\EOF
14609 #define HAVE_DYLD 1
14610 EOF
14611 }
14612  ;;
14613       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14614 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14615 echo "configure:14616: checking for dlfcn.h" >&5
14616
14617 cat > conftest.$ac_ext <<EOF
14618 #line 14619 "configure"
14619 #include "confdefs.h"
14620 #include <dlfcn.h>
14621 EOF
14622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14623 { (eval echo configure:14624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14625 if test -z "$ac_err"; then
14626   rm -rf conftest*
14627   eval "ac_cv_header_$ac_safe=yes"
14628 else
14629   echo "$ac_err" >&5
14630   echo "configure: failed program was:" >&5
14631   cat conftest.$ac_ext >&5
14632   rm -rf conftest*
14633   eval "ac_cv_header_$ac_safe=no"
14634 fi
14635 rm -f conftest*
14636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14637   echo "$ac_t""yes" 1>&6
14638   
14639            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14640 echo "configure:14641: checking for dlopen in -lc" >&5
14641            cat > conftest.$ac_ext <<EOF
14642 #line 14643 "configure"
14643 #include "confdefs.h"
14644 #include <dlfcn.h>
14645 int main() {
14646               dlopen ("", 0);
14647 ; return 0; }
14648 EOF
14649 if { (eval echo configure:14650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14650   rm -rf conftest*
14651    have_dl=yes 
14652 else
14653   echo "configure: failed program was:" >&5
14654   cat conftest.$ac_ext >&5
14655   rm -rf conftest*
14656   
14657                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14658 echo "configure:14659: checking for dlopen in -ldl" >&5
14659                ac_save_LIBS="$LIBS"
14660                LIBS="-ldl $LIBS"
14661                cat > conftest.$ac_ext <<EOF
14662 #line 14663 "configure"
14663 #include "confdefs.h"
14664 #include <dlfcn.h>
14665 int main() {
14666                  dlopen ("", 0);
14667 ; return 0; }
14668 EOF
14669 if { (eval echo configure:14670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14670   rm -rf conftest*
14671    have_dl=yes 
14672 else
14673   echo "configure: failed program was:" >&5
14674   cat conftest.$ac_ext >&5
14675   rm -rf conftest*
14676   LIBS="$ac_save_LIBS"
14677 fi
14678 rm -f conftest*
14679                ac_save_LIBS=
14680 fi
14681 rm -f conftest*
14682 else
14683   echo "$ac_t""no" 1>&6
14684 fi
14685
14686         if test -n "$have_dl"; then
14687            { test "$extra_verbose" = "yes" && cat << \EOF
14688     Defining HAVE_DLOPEN
14689 EOF
14690 cat >> confdefs.h <<\EOF
14691 #define HAVE_DLOPEN 1
14692 EOF
14693 }
14694
14695         else
14696            
14697 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14698 echo "configure:14699: checking for shl_load in -ldld" >&5
14699 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14700
14701 xe_check_libs=" -ldld "
14702 cat > conftest.$ac_ext <<EOF
14703 #line 14704 "configure"
14704 #include "confdefs.h"
14705 /* Override any gcc2 internal prototype to avoid an error.  */
14706 /* We use char because int might match the return type of a gcc2
14707     builtin and then its argument prototype would still apply.  */
14708 char shl_load();
14709
14710 int main() {
14711 shl_load()
14712 ; return 0; }
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14715   rm -rf conftest*
14716   eval "ac_cv_lib_$ac_lib_var=yes"
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -rf conftest*
14721   eval "ac_cv_lib_$ac_lib_var=no"
14722 fi
14723 rm -f conftest*
14724 xe_check_libs=""
14725
14726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14727   echo "$ac_t""yes" 1>&6
14728   libdl=dld have_dl=yes;
14729            { test "$extra_verbose" = "yes" && cat << \EOF
14730     Defining HAVE_SHL_LOAD
14731 EOF
14732 cat >> confdefs.h <<\EOF
14733 #define HAVE_SHL_LOAD 1
14734 EOF
14735 }
14736
14737 else
14738   echo "$ac_t""no" 1>&6
14739
14740 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14741 echo "configure:14742: checking for dld_init in -ldld" >&5
14742 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14743
14744 xe_check_libs=" -ldld "
14745 cat > conftest.$ac_ext <<EOF
14746 #line 14747 "configure"
14747 #include "confdefs.h"
14748 /* Override any gcc2 internal prototype to avoid an error.  */
14749 /* We use char because int might match the return type of a gcc2
14750     builtin and then its argument prototype would still apply.  */
14751 char dld_init();
14752
14753 int main() {
14754 dld_init()
14755 ; return 0; }
14756 EOF
14757 if { (eval echo configure:14758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14758   rm -rf conftest*
14759   eval "ac_cv_lib_$ac_lib_var=yes"
14760 else
14761   echo "configure: failed program was:" >&5
14762   cat conftest.$ac_ext >&5
14763   rm -rf conftest*
14764   eval "ac_cv_lib_$ac_lib_var=no"
14765 fi
14766 rm -f conftest*
14767 xe_check_libs=""
14768
14769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14770   echo "$ac_t""yes" 1>&6
14771   libdl=dld have_dl=yes;
14772            { test "$extra_verbose" = "yes" && cat << \EOF
14773     Defining HAVE_DLD_INIT
14774 EOF
14775 cat >> confdefs.h <<\EOF
14776 #define HAVE_DLD_INIT 1
14777 EOF
14778 }
14779
14780 else
14781   echo "$ac_t""no" 1>&6
14782 fi
14783
14784
14785 fi
14786
14787
14788         fi
14789     ;;
14790     esac
14791   fi 
14792   if test -n "$have_dl"; then
14793         
14794 dll_ld=
14795 dll_ldflags=
14796 dll_cflags=
14797 dll_post=
14798 dll_ldo="-o"
14799 ld_dynamic_link_flags=
14800 xehost=$canonical
14801 xealias=$internal_configuration
14802
14803 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14804 echo "configure:14805: checking how to build dynamic libraries for ${xehost}" >&5
14805 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14806 case "$xehost" in
14807 *-*-linux-gnu*) ;;
14808 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14809 esac
14810
14811 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14812 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14813 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14814
14815 case "$xehost_os" in
14816 aix3*)
14817   # AIX sometimes has problems with the GCC collect2 program.  For some
14818   # reason, if we set the COLLECT_NAMES environment variable, the problems
14819   # vanish in a puff of smoke.
14820   if test "${COLLECT_NAMES+set}" != set; then
14821     COLLECT_NAMES=
14822     export COLLECT_NAMES
14823   fi
14824   ;;
14825 esac
14826
14827 # Now see if the compiler is really GCC.
14828 if test "$GCC" = "yes"; then
14829   XEGCC=yes
14830 else
14831   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14832 echo "configure:14833: checking checking whether we are using GNU C" >&5
14833   cat > conftest.$ac_ext <<EOF
14834 #line 14835 "configure"
14835 #include "confdefs.h"
14836
14837 #ifdef __GNUC__
14838   yes;
14839 #endif
14840
14841 EOF
14842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14843   egrep "yes" >/dev/null 2>&1; then
14844   rm -rf conftest*
14845   XEGCC=yes
14846 else
14847   rm -rf conftest*
14848   XEGCC=no
14849 fi
14850 rm -f conftest*
14851
14852   echo "$ac_t""${XEGCC}" 1>&6
14853 fi
14854
14855 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14856 echo "configure:14857: checking how to produce PIC code" >&5
14857 wl=
14858
14859 can_build_shared=yes
14860 if test "$XEGCC" = yes -o "$__ICC" = yes; then
14861   wl='-Wl,'
14862
14863   case "$xehost_os" in
14864   aix[3-9]* | irix[5-9]* | osf[3-9])
14865     # PIC is the default for these OSes.
14866     ;;
14867
14868   os2*)
14869     # We can build DLLs from non-PIC.
14870     ;;
14871   amigaos*)
14872     # FIXME: we need at least 68020 code to build shared libraries, but
14873     # adding the `-m68020' flag to GCC prevents building anything better,
14874     # like `-m68040'.
14875     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14876     ;;
14877   *cygwin* | *mingw* )
14878     # PIC is the default
14879     ;;
14880   *)
14881     dll_cflags='-fPIC'
14882     ;;
14883   esac
14884 else
14885   # PORTME Check for PIC flags for the system compiler.
14886   case "$xehost_os" in
14887   hpux9* | hpux1[0-9]*)
14888     # Is there a better link_static_flag that works with the bundled CC?
14889     wl='-Wl,'
14890     dll_cflags='+Z'
14891     ;;
14892
14893   irix[5-9]*)
14894     wl='-Wl,'
14895     # PIC (with -KPIC) is the default.
14896     ;;
14897
14898   os2*)
14899     # We can build DLLs from non-PIC.
14900     ;;
14901
14902   osf[3-9]*)
14903     # All OSF/1 code is PIC.
14904     wl='-Wl,'
14905     ;;
14906
14907   aix[3-9]*)
14908     # All AIX code is PIC.
14909     wl='-Wl,'
14910     ;;
14911
14912   sco3.2v5*)
14913     dll_cflags='-belf -Kpic'
14914     wl='-Wl,'
14915     ;;
14916
14917   unixware*)
14918     dll_cflags="-KPIC"
14919     wl="-Wl,"
14920     ;;
14921
14922   sysv4*)
14923     dll_cflags="-KPIC"
14924     wl="-Wl,"
14925     ;;
14926
14927   sysv5*)
14928     dll_cflags="-KPIC"
14929     wl="-Wl,"
14930     ;;
14931
14932   solaris2*)
14933     dll_cflags='-KPIC'
14934     wl='-Wl,'
14935     ;;
14936
14937   sunos4*)
14938     dll_cflags='-PIC'
14939     wl='-Qoption ld '
14940     ;;
14941
14942   uts4*)
14943     dll_cflags='-pic'
14944     ;;
14945
14946   *)
14947     can_build_shared=no
14948     ;;
14949   esac
14950 fi
14951
14952 if test -n "$dll_cflags"; then
14953   echo "$ac_t""${dll_cflags}" 1>&6
14954
14955   # Check to make sure the dll_cflags actually works.
14956   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14957 echo "configure:14958: checking if PIC flag ${dll_cflags} really works" >&5
14958   save_CFLAGS="$CFLAGS"
14959   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14960   cat > conftest.$ac_ext <<EOF
14961 #line 14962 "configure"
14962 #include "confdefs.h"
14963
14964 int main() {
14965 int x=0;
14966 ; return 0; }
14967 EOF
14968 if { (eval echo configure:14969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14969   rm -rf conftest*
14970   
14971     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14972     # reports no error.  So, we need to grep stderr for (Bundled).
14973     if grep '(Bundled)' config.log >/dev/null; then
14974       echo "$ac_t""no" 1>&6
14975       can_build_shared=no
14976       dll_cflags=
14977     else
14978       echo "$ac_t""yes" 1>&6
14979     fi
14980 else
14981   echo "configure: failed program was:" >&5
14982   cat conftest.$ac_ext >&5
14983   rm -rf conftest*
14984   echo "$ac_t""no" 1>&6
14985     can_build_shared=no
14986     dll_cflags=
14987 fi
14988 rm -f conftest*
14989   CFLAGS="$save_CFLAGS"
14990 else
14991   echo "$ac_t""none" 1>&6
14992 fi
14993
14994 if test "$can_build_shared" = "yes"; then
14995 cc_produces_so=no
14996 xldf=
14997 xcldf=
14998 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14999 echo "configure:15000: checking if C compiler can produce shared libraries" >&5
15000 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15001   xcldf="-shared"
15002   xldf="-shared"
15003 else # Not using GCC
15004   case "$xehost_os" in
15005     aix[3-9]*)
15006       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15007       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15008       ;;
15009
15010     freebsd2* | netbsd* | openbsd*)
15011       xldf="-Bshareable"
15012       xcldf="${wl}-Bshareable"
15013       ;;
15014
15015     freebsd3*)
15016       xcldf="-shared"
15017       ;;
15018
15019     hpux*)
15020       xldf="-b +s"
15021       xcldf="${wl}-b ${wl}+s"
15022       ;;
15023
15024     irix[5-9]* | osf[3-9]*)
15025       xcldf="${wl}-shared"
15026       xldf="-shared"
15027       ;;
15028
15029     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15030       xcldf="-G"
15031       xldf="-G"
15032       ;;
15033
15034     sunos4*)
15035       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15036       xldf="-assert pure-text -Bstatic"
15037       ;;
15038   esac
15039 fi # End if if we are using gcc
15040
15041 if test -n "$xcldf"; then
15042   save_LDFLAGS=$LDFLAGS
15043   save_LIBS=$LIBS
15044   save_xe_libs=$xe_libs
15045   LDFLAGS="$xcldf $LDFLAGS"
15046   LIBS=
15047   xe_libs=
15048   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15049   cat > conftest.$ac_ext <<EOF
15050 #line 15051 "configure"
15051 #include "confdefs.h"
15052
15053 int main() {
15054 int x=0;
15055 ; return 0; }
15056 EOF
15057 if { (eval echo configure:15058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15058   rm -rf conftest*
15059   cc_produces_so=yes
15060 else
15061   echo "configure: failed program was:" >&5
15062   cat conftest.$ac_ext >&5
15063   rm -rf conftest*
15064   cc_produces_so=no
15065 fi
15066 rm -f conftest*
15067   LDFLAGS=$save_LDFLAGS
15068   LIBS=$save_LIBS
15069   xe_libs=$save_xe_libs
15070   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15071 else
15072   cc_produces_so=no
15073 fi
15074 echo "$ac_t""${cc_produces_so}" 1>&6
15075
15076 LTLD=$LD
15077 if test -z "$LTLD"; then
15078   ac_prog=ld
15079   if test "$XEGCC" = yes; then
15080     # Check if gcc -print-prog-name=ld gives a path.
15081     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15082 echo "configure:15083: checking for ld used by GCC" >&5
15083     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15084     case "$ac_prog" in
15085     # Accept absolute paths.
15086     /*)
15087       if test -z "$LTLD"; then
15088 #        case "$ac_prog" in
15089 #          *gcc-lib*) LTLD="$CC"
15090 #                     ;;
15091 #          *)
15092          LTLD="$ac_prog"
15093 #                     ;;
15094 #        esac
15095       fi
15096       ;;
15097     "")
15098       # If it fails, then pretend we aren't using GCC.
15099       ac_prog=ld
15100       ;;
15101     *)
15102       # If it is relative, then search for the first ld in PATH.
15103       with_gnu_ld=unknown
15104       ;;
15105     esac
15106   else
15107     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15108 echo "configure:15109: checking for GNU ld" >&5
15109   fi
15110
15111   if test -z "$LTLD"; then
15112     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15113     for ac_dir in $PATH; do
15114       test -z "$ac_dir" && ac_dir=.
15115       if test -f "$ac_dir/$ac_prog"; then
15116         LTLD="$ac_dir/$ac_prog"
15117         # Check to see if the program is GNU ld.  I'd rather use --version,
15118         # but apparently some GNU ld's only accept -v.
15119         # Break only if it was the GNU/non-GNU ld that we prefer.
15120         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15121           xe_gnu_ld=yes
15122         else
15123           xe_gnu_ld=no
15124         fi
15125       fi
15126     done
15127     IFS="$ac_save_ifs"
15128   fi
15129
15130   if test -n "$LTLD"; then
15131     echo "$ac_t""${LTLD}" 1>&6
15132   else
15133     echo "$ac_t""no" 1>&6
15134   fi
15135
15136   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15137     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15138     exit 1
15139   fi
15140 fi
15141
15142 ld_dynamic_link_flags=
15143
15144 # Check to see if it really is or isn't GNU ld.
15145 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15146 echo "configure:15147: checking if the linker is GNU ld" >&5
15147 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15148 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15149   xe_gnu_ld=yes
15150 else
15151   xe_gnu_ld=no
15152 fi
15153 echo "$ac_t""${xe_gnu_ld}" 1>&6
15154
15155 case "$xehost_os" in
15156   amigaos* | sunos4*)
15157     # On these operating systems, we should treat GNU ld like the system ld.
15158     gnu_ld_acts_native=yes
15159     ;;
15160   *)
15161     gnu_ld_acts_native=no
15162     ;;
15163 esac
15164
15165 if test "$cc_produces_so" = "yes"; then
15166   dll_ld=$CC
15167   dll_ldflags=$xcldf
15168   can_build_shared=yes
15169   ld_shlibs=yes
15170 else
15171   # OK - only NOW do we futz about with ld.
15172   # See if the linker supports building shared libraries.
15173   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15174 echo "configure:15175: checking whether the linker supports shared libraries" >&5
15175   dll_ld=$CC
15176   dll_ldflags=$LDFLAGS
15177   ld_shlibs=yes
15178   can_build_shared=yes
15179   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15180     # See if GNU ld supports shared libraries.
15181     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15182       dll_ld=$CC
15183       dll_ldflags="-shared"
15184       ld_shlibs=yes
15185     else
15186       ld_shlibs=no
15187     fi
15188   else
15189     # PORTME fill in a description of your system's linker (not GNU ld)
15190     case "$xehost_os" in
15191     aix3*)
15192       dll_ld=$LTLD
15193       dll_ldflags=$xldf
15194       ;;
15195
15196     aix[4-9]*)
15197       dll_ldflags=$xcldf
15198       ;;
15199
15200     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15201     # support.  Future versions do this automatically, but an explicit c++rt0.o
15202     # doesn't break anything, and helps significantly (at the cost of a little
15203     # extra space).
15204     freebsd2.2*)
15205       dll_ld=$LTLD
15206       dll_ldflags=$xldf
15207       dll_post="/usr/lib/c++rt0.o"
15208       ;;
15209
15210     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15211     freebsd2*)
15212       dll_ld=$LTLD
15213       dll_ldflags="-Bshareable"
15214       ;;
15215
15216     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15217     freebsd3*)
15218       dll_ldflags="-shared"
15219       ;;
15220
15221     hpux*)
15222       dll_ld=$LTLD
15223       dll_ldflags=$xldf
15224       ;;
15225
15226     irix[5-9]*)
15227       dll_ld=$LTLD
15228       dll_ldflags=$xldf
15229       ;;
15230
15231     netbsd*)
15232       # Tested with NetBSD 1.2 ld
15233       dll_ld=$LTLD
15234       dll_ldflags=$xldf
15235       ;;
15236
15237     openbsd*)
15238       dll_ld=$LTLD
15239       dll_ldflags=$xldf
15240       ;;
15241
15242     osf3* | osf4*)
15243       dll_ld=$LTLD
15244       dll_ldflags=$xldf
15245       ;;
15246
15247     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15248     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15249       dll_ld=$LTLD
15250       case "$dll_ld" in
15251         *gcc*) dll_ldflags="-shared"
15252                dll_ld=$CC
15253                ;;
15254         *)     dll_ldflags="-G"
15255                ;;
15256       esac
15257       ;;
15258
15259     sunos4*)
15260       if test "$XEGCC" = yes; then
15261         dll_ld=$CC
15262       else
15263         dll_ld=$LTLD
15264       fi
15265       dll_ldflags=$xldf
15266       ;;
15267
15268     uts4*)
15269       dll_ld=$LTLD
15270       dll_ldflags="-G"
15271       ;;
15272
15273     bsdi*)
15274       dll_ldflags="-r"
15275       dll_ld="shlicc2"
15276       ;;
15277
15278     *)
15279       ld_shlibs=no
15280       can_build_shared=no
15281       ;;
15282     esac
15283   fi
15284   echo "$ac_t""${ld_shlibs}" 1>&6
15285   if test "$ld_shlibs" = "no"; then
15286     can_build_shared=no
15287   fi
15288 fi # End of if cc_produces_so = no
15289
15290
15291 if test "$xe_gnu_ld" = yes; then
15292   if test "$ld_shlibs" = yes; then
15293     ld_dynamic_link_flags="${wl}-export-dynamic"
15294   fi
15295 fi
15296
15297 if test -z "$ld_dynamic_link_flags"; then
15298   case "$xehost_os" in
15299   aix[3-9]*)
15300     ld_dynamic_link_flags=
15301     ;;
15302
15303   freebsd2.2*)
15304     ld_dynamic_link_flags=
15305     ;;
15306
15307   freebsd2*)
15308     ld_dynamic_link_flags=
15309     ;;
15310
15311   freebsd3*)
15312     ld_dynamic_link_flags=
15313     ;;
15314
15315   hpux*)
15316     ld_dynamic_link_flags="${wl}-E"
15317     ;;
15318
15319   irix[5-9]*)
15320     ld_dynamic_link_flags=
15321     ;;
15322
15323   netbsd*)
15324     ld_dynamic_link_flags=
15325     ;;
15326
15327   openbsd*)
15328     ld_dynamic_link_flags=
15329     ;;
15330
15331   osf3* | osf4*)
15332     ld_dynamic_link_flags=
15333     ;;
15334
15335   solaris2* | solaris7*)
15336     ld_dynamic_link_flags=
15337     ;;
15338
15339   sco3.2v5* | unixware* | sysv5* | sysv4*)
15340     ld_dynamic_link_flags="${wl}-Bexport"
15341     ;;
15342
15343   sunos4*)
15344     ld_dynamic_link_flags=
15345     ;;
15346
15347   uts4*)
15348     ld_dynamic_link_flags=
15349     ;;
15350
15351   bsdi*)
15352     ld_dynamic_link_flags=
15353     ;;
15354
15355   esac
15356 fi # End of if -z ld_dynamic_link_flags
15357 fi # End of if test "$can_build_shared" = "yes"
15358
15359
15360
15361
15362
15363
15364
15365
15366   fi
15367
15368   if test "$can_build_shared" = "yes"; then
15369     { test "$extra_verbose" = "yes" && cat << \EOF
15370     Defining HAVE_SHLIB
15371 EOF
15372 cat >> confdefs.h <<\EOF
15373 #define HAVE_SHLIB 1
15374 EOF
15375 }
15376
15377     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15378    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15379  fi
15380     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15381     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15382     for ac_func in dlerror _dlerror
15383 do
15384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15385 echo "configure:15386: checking for $ac_func" >&5
15386
15387 cat > conftest.$ac_ext <<EOF
15388 #line 15389 "configure"
15389 #include "confdefs.h"
15390 /* System header to define __stub macros and hopefully few prototypes,
15391     which can conflict with char $ac_func(); below.  */
15392 #include <assert.h>
15393 /* Override any gcc2 internal prototype to avoid an error.  */
15394 /* We use char because int might match the return type of a gcc2
15395     builtin and then its argument prototype would still apply.  */
15396 char $ac_func();
15397
15398 int main() {
15399
15400 /* The GNU C library defines this for functions which it implements
15401     to always fail with ENOSYS.  Some functions are actually named
15402     something starting with __ and the normal name is an alias.  */
15403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15404 choke me
15405 #else
15406 $ac_func();
15407 #endif
15408
15409 ; return 0; }
15410 EOF
15411 if { (eval echo configure:15412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15412   rm -rf conftest*
15413   eval "ac_cv_func_$ac_func=yes"
15414 else
15415   echo "configure: failed program was:" >&5
15416   cat conftest.$ac_ext >&5
15417   rm -rf conftest*
15418   eval "ac_cv_func_$ac_func=no"
15419 fi
15420 rm -f conftest*
15421
15422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15423   echo "$ac_t""yes" 1>&6
15424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15425   { test "$extra_verbose" = "yes" && cat << EOF
15426     Defining $ac_tr_func
15427 EOF
15428 cat >> confdefs.h <<EOF
15429 #define $ac_tr_func 1
15430 EOF
15431 }
15432  
15433 else
15434   echo "$ac_t""no" 1>&6
15435 fi
15436 done
15437
15438     with_modules=yes
15439   else
15440     if test "$with_modules" = "yes"; then
15441       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15442     else
15443       echo "configure: warning: "Module support cannot be provided."" 1>&2
15444     fi
15445     with_modules=no
15446   fi
15447 fi
15448
15449 cat > conftest.$ac_ext <<EOF
15450 #line 15451 "configure"
15451 #include "confdefs.h"
15452 int main(int c,char *v[]){return 0;}
15453 EOF
15454 if { (eval echo configure:15455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15455 then
15456   :
15457 else
15458   conftest_rc="$?"
15459   echo "configure: failed program was:" >&5
15460   cat conftest.$ac_ext >&5
15461   rm -fr conftest*
15462   
15463   echo ""
15464   echo "*** PANIC *** configure forgot how to build working executables!"
15465   echo ""
15466   echo "*** This is most commonly due to an unforeseen environment, causing"
15467   echo "*** configure to incorrectly compute the sequence of libraries to link."
15468   echo "*** Please examine the tail of config.log for runtime errors."
15469   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15470   echo "*** Often adding or removing explicit options in the configure"
15471   echo "*** invocation can work around this kind of problem.  If so, please"
15472   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15473   echo "***"
15474   echo "*** Other possible causes are inability to write to the file system"
15475   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15476   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15477   echo "*** necessary.  On other systems, try telling configure where to find"
15478   echo "*** the shared libraries using the --site-runtime-libraries option."
15479   echo "***"
15480   echo "*** Another way to shoot yourself in the foot is to specify"
15481   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15482   echo "*** system.  Don't do that."
15483   exit 1
15484 fi
15485 rm -fr conftest*
15486
15487 if test "$win32_processes" = "yes"; then
15488   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15489    echo "    xemacs will be linked with \"process-nt.o\""
15490  fi
15491 else
15492   { test "$extra_verbose" = "yes" && cat << \EOF
15493     Defining HAVE_UNIX_PROCESSES
15494 EOF
15495 cat >> confdefs.h <<\EOF
15496 #define HAVE_UNIX_PROCESSES 1
15497 EOF
15498 }
15499
15500   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15501    echo "    xemacs will be linked with \"process-unix.o\""
15502  fi
15503 fi
15504
15505
15506
15507 T=""
15508 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15509 CFLAGS="$T"
15510
15511
15512 T=""
15513 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15514 extra_objs="$T"
15515
15516
15517 T=""
15518 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
15519 c_switch_general="$T"
15520
15521
15522 T=""
15523 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
15524 c_switch_window_system="$T"
15525
15526
15527 T=""
15528 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15529 c_switch_all="$T"
15530
15531
15532 T=""
15533 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
15534 ld_switch_general="$T"
15535
15536
15537 T=""
15538 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15539 ld_switch_window_system="$T"
15540
15541
15542 T=""
15543 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15544 ld_switch_all="$T"
15545
15546
15547 T=""
15548 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15549 ld_libs_general="$T"
15550
15551
15552 T=""
15553 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
15554 ld_libs_window_system="$T"
15555
15556
15557 T=""
15558 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15559 ld_libs_all="$T"
15560
15561
15562
15563 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15564 internal_makefile_list="Makefile.in"
15565 SUBDIR_MAKEFILES=''
15566 test -d lock || mkdir lock
15567 for dir in $MAKE_SUBDIR; do
15568   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15569         test -d "$d" || mkdir "$d"; cd "$d"
15570       done ) ;;
15571    * ) test -d "$dir" || mkdir "$dir" ;;
15572   esac
15573   
15574 T=""
15575 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15576 SUBDIR_MAKEFILES="$T"
15577
15578   
15579 T=""
15580 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15581 internal_makefile_list="$T"
15582
15583 done
15584
15585
15586
15587
15588 for dir in src/s src/m; do
15589   if test ! -d "$dir" ; then
15590     echo Making symbolic link to "$srcdir/$dir"
15591     ${LN_S} "$srcdir/$dir" "$dir"
15592   fi
15593 done
15594
15595 if test "$extra_verbose" = "yes"; then
15596   echo ""
15597   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
15598   echo ""
15599 fi
15600
15601
15602 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15603   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15604   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15605 fi
15606
15607 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15608   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15609   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15610 fi
15611
15612 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15613   test "$extra_verbose" = "yes" && echo "creating TAGS"
15614   echo "\f
15615 $srcdir/TAGS,include" > "TAGS"
15616 fi
15617
15618 if test "$__SUNPRO_C" = "yes"; then
15619   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15620   ( echo "# For use with Sun WorkShop's Source browser."
15621     echo "# See sbquery(1) and sbinit(4) for more information"
15622     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15623   ) > .sbinit
15624 fi
15625
15626 rm -f core
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647 PREFIX=$prefix
15648 while true; do
15649   case "$PREFIX" in
15650     *\$* ) eval "PREFIX=$PREFIX" ;;
15651     *) break ;;
15652   esac
15653 done
15654
15655
15656
15657
15658 EXEC_PREFIX=$exec_prefix
15659 while true; do
15660   case "$EXEC_PREFIX" in
15661     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15662     *) break ;;
15663   esac
15664 done
15665
15666
15667
15668
15669 INFODIR=$infodir
15670 while true; do
15671   case "$INFODIR" in
15672     *\$* ) eval "INFODIR=$INFODIR" ;;
15673     *) break ;;
15674   esac
15675 done
15676
15677
15678
15679
15680 INFOPATH=$infopath
15681 while true; do
15682   case "$INFOPATH" in
15683     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15684     *) break ;;
15685   esac
15686 done
15687
15688
15689
15690
15691 PACKAGE_PATH=$package_path
15692 while true; do
15693   case "$PACKAGE_PATH" in
15694     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15695     *) break ;;
15696   esac
15697 done
15698
15699
15700
15701
15702 LISPDIR=$lispdir
15703 while true; do
15704   case "$LISPDIR" in
15705     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15706     *) break ;;
15707   esac
15708 done
15709
15710
15711
15712
15713 MODULEDIR=$moduledir
15714 while true; do
15715   case "$MODULEDIR" in
15716     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15717     *) break ;;
15718   esac
15719 done
15720
15721
15722
15723
15724 SITELISPDIR=$sitelispdir
15725 while true; do
15726   case "$SITELISPDIR" in
15727     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15728     *) break ;;
15729   esac
15730 done
15731
15732
15733
15734
15735 SITEMODULEDIR=$sitemoduledir
15736 while true; do
15737   case "$SITEMODULEDIR" in
15738     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15739     *) break ;;
15740   esac
15741 done
15742
15743
15744
15745
15746 ETCDIR=$etcdir
15747 while true; do
15748   case "$ETCDIR" in
15749     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15750     *) break ;;
15751   esac
15752 done
15753
15754
15755
15756
15757 DOCDIR=$docdir
15758 while true; do
15759   case "$DOCDIR" in
15760     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15761     *) break ;;
15762   esac
15763 done
15764
15765
15766
15767
15768 ARCHLIBDIR=$archlibdir
15769 while true; do
15770   case "$ARCHLIBDIR" in
15771     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15772     *) break ;;
15773   esac
15774 done
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15796
15797
15798
15799
15800
15801
15802
15803 : ${XEMACS_CC:=$CC}
15804
15805
15806 if test "$with_prefix" = "yes"; then
15807   { test "$extra_verbose" = "yes" && cat << \EOF
15808     Defining PREFIX_USER_DEFINED
15809 EOF
15810 cat >> confdefs.h <<\EOF
15811 #define PREFIX_USER_DEFINED 1
15812 EOF
15813 }
15814
15815 fi
15816
15817 if test "$with_site_lisp" = "no"; then
15818   { test "$extra_verbose" = "yes" && cat << \EOF
15819     Defining INHIBIT_SITE_LISP
15820 EOF
15821 cat >> confdefs.h <<\EOF
15822 #define INHIBIT_SITE_LISP 1
15823 EOF
15824 }
15825
15826 fi
15827 if test "$with_site_modules" = "no"; then
15828   { test "$extra_verbose" = "yes" && cat << \EOF
15829     Defining INHIBIT_SITE_MODULES
15830 EOF
15831 cat >> confdefs.h <<\EOF
15832 #define INHIBIT_SITE_MODULES 1
15833 EOF
15834 }
15835
15836 fi
15837
15838
15839 T=""
15840 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15841 ac_configure_args="$T"
15842
15843 { test "$extra_verbose" = "yes" && cat << EOF
15844     Defining EMACS_CONFIGURATION = "$configuration"
15845 EOF
15846 cat >> confdefs.h <<EOF
15847 #define EMACS_CONFIGURATION "$configuration"
15848 EOF
15849 }
15850
15851 { test "$extra_verbose" = "yes" && cat << EOF
15852     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15853 EOF
15854 cat >> confdefs.h <<EOF
15855 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15856 EOF
15857 }
15858
15859
15860
15861 null_string=""
15862 { test "$extra_verbose" = "yes" && cat << EOF
15863     Defining LD_SWITCH_X_SITE = $null_string
15864 EOF
15865 cat >> confdefs.h <<EOF
15866 #define LD_SWITCH_X_SITE $null_string
15867 EOF
15868 }
15869
15870 { test "$extra_verbose" = "yes" && cat << EOF
15871     Defining LD_SWITCH_X_SITE_AUX = $null_string
15872 EOF
15873 cat >> confdefs.h <<EOF
15874 #define LD_SWITCH_X_SITE_AUX $null_string
15875 EOF
15876 }
15877
15878 { test "$extra_verbose" = "yes" && cat << EOF
15879     Defining C_SWITCH_X_SITE = $null_string
15880 EOF
15881 cat >> confdefs.h <<EOF
15882 #define C_SWITCH_X_SITE $null_string
15883 EOF
15884 }
15885
15886 { test "$extra_verbose" = "yes" && cat << EOF
15887     Defining LD_SWITCH_SITE = $null_string
15888 EOF
15889 cat >> confdefs.h <<EOF
15890 #define LD_SWITCH_SITE $null_string
15891 EOF
15892 }
15893
15894 { test "$extra_verbose" = "yes" && cat << EOF
15895     Defining C_SWITCH_SITE = $null_string
15896 EOF
15897 cat >> confdefs.h <<EOF
15898 #define C_SWITCH_SITE $null_string
15899 EOF
15900 }
15901
15902
15903
15904 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15905     Defining GNU_MALLOC
15906 EOF
15907 cat >> confdefs.h <<\EOF
15908 #define GNU_MALLOC 1
15909 EOF
15910 }
15911
15912 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15913     Defining USE_SYSTEM_MALLOC
15914 EOF
15915 cat >> confdefs.h <<\EOF
15916 #define USE_SYSTEM_MALLOC 1
15917 EOF
15918 }
15919
15920 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15921     Defining USE_DEBUG_MALLOC
15922 EOF
15923 cat >> confdefs.h <<\EOF
15924 #define USE_DEBUG_MALLOC 1
15925 EOF
15926 }
15927
15928                                               { test "$extra_verbose" = "yes" && cat << \EOF
15929     Defining USE_SYSTEM_MALLOC
15930 EOF
15931 cat >> confdefs.h <<\EOF
15932 #define USE_SYSTEM_MALLOC 1
15933 EOF
15934 }
15935
15936 fi
15937 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15938     Defining I18N3
15939 EOF
15940 cat >> confdefs.h <<\EOF
15941 #define I18N3 1
15942 EOF
15943 }
15944
15945 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15946     Defining USE_GCC
15947 EOF
15948 cat >> confdefs.h <<\EOF
15949 #define USE_GCC 1
15950 EOF
15951 }
15952
15953 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15954     Defining EXTERNAL_WIDGET
15955 EOF
15956 cat >> confdefs.h <<\EOF
15957 #define EXTERNAL_WIDGET 1
15958 EOF
15959 }
15960
15961 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15962     Defining QUICK_BUILD
15963 EOF
15964 cat >> confdefs.h <<\EOF
15965 #define QUICK_BUILD 1
15966 EOF
15967 }
15968
15969 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15970     Defining PURIFY
15971 EOF
15972 cat >> confdefs.h <<\EOF
15973 #define PURIFY 1
15974 EOF
15975 }
15976
15977 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15978     Defining QUANTIFY
15979 EOF
15980 cat >> confdefs.h <<\EOF
15981 #define QUANTIFY 1
15982 EOF
15983 }
15984
15985 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15986     Defining MAIL_USE_POP
15987 EOF
15988 cat >> confdefs.h <<\EOF
15989 #define MAIL_USE_POP 1
15990 EOF
15991 }
15992
15993 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15994     Defining KERBEROS
15995 EOF
15996 cat >> confdefs.h <<\EOF
15997 #define KERBEROS 1
15998 EOF
15999 }
16000
16001 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16002     Defining HESIOD
16003 EOF
16004 cat >> confdefs.h <<\EOF
16005 #define HESIOD 1
16006 EOF
16007 }
16008
16009 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16010     Defining USE_UNION_TYPE
16011 EOF
16012 cat >> confdefs.h <<\EOF
16013 #define USE_UNION_TYPE 1
16014 EOF
16015 }
16016
16017 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16018     Defining REGEX_MALLOC
16019 EOF
16020 cat >> confdefs.h <<\EOF
16021 #define REGEX_MALLOC 1
16022 EOF
16023 }
16024
16025 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16026     Defining PDUMP
16027 EOF
16028 cat >> confdefs.h <<\EOF
16029 #define PDUMP 1
16030 EOF
16031 }
16032
16033 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16034     Defining IPV6_CANONICALIZE
16035 EOF
16036 cat >> confdefs.h <<\EOF
16037 #define IPV6_CANONICALIZE 1
16038 EOF
16039 }
16040
16041
16042
16043 (
16044 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16045 else
16046   echo "uname -a: `uname -a`"
16047 fi
16048 echo ""
16049 echo "$0 $quoted_arguments"
16050 ) > Installation
16051
16052 if test ! -z ${emacs_beta_version} ; then
16053   if test -z "${emacs_is_beta}" ; then
16054         xemacs_betaname=".${emacs_beta_version}"
16055   else
16056         xemacs_betaname="-b${emacs_beta_version}"
16057   fi
16058 else
16059   xemacs_betaname=""
16060 fi
16061
16062 (
16063 echo "
16064
16065 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16066 "
16067 echo "
16068 Compilation / Installation:"
16069 echo "  Source code location:              $srcdir"
16070 echo "  Installation prefix:               $prefix"
16071 if test -n "$site_includes"; then
16072   echo "  Additional header files:           $site_includes"
16073 fi
16074 if test -n "$site_libraries"; then
16075   echo "  Additional libraries:              $site_libraries"
16076 fi
16077 if test -n "$site_prefixes"; then
16078   echo "  Additional prefixes:               $site_prefixes"
16079 fi
16080 if test -n "$runpath"; then
16081   echo "  Runtime library search path:       $runpath"
16082 fi
16083
16084 if test -n "$opsysfile"
16085 then echo "  Operating system description file: \`$opsysfile'"
16086 else echo "  Not using any operating system description file"
16087 fi
16088 if test -n "$machfile"
16089 then echo "  Machine description file:          \`$machfile'"
16090 else echo "  Not using any machine description file"
16091 fi
16092
16093 echo "  Compiler:                          $CC $CFLAGS"
16094 case "$CC" in
16095   gcc*) echo "  Compiler version:                  `$CC --version | head -1`"
16096         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`"
16097         ;;
16098   *) case "$canonical" in
16099         *-*-aix*   ) 
16100                   realcc=`which $CC`
16101                   if test -L $realcc ; then
16102             ccdir=`dirname $realcc`
16103             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16104                     case $ccprog in
16105                 */*) realcc=$ccprog;;
16106                 *) realcc=$ccdir/$ccprog;;
16107             esac
16108           fi
16109           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16110           if test ! -z "$lpp" ; then
16111             lppstr=`lslpp -Lqc $lpp`
16112             lpplev=`echo "$lppstr" | cut -f3 -d:`
16113             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16114           fi
16115           if test ! -z "$lpplev" ; then
16116             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16117           else
16118             echo "  Compiler version:                  (unknown version)"
16119           fi
16120         ;;
16121         
16122         *-*-solaris*)
16123           ccvers=`$CC -V 2>&1 | head -1`
16124           if test ! -z "$ccvers" ; then
16125             echo "  Compiler version:                  $ccvers"
16126           fi
16127         ;;
16128
16129         alpha*-dec-osf*)
16130           ccvers=`$CC -V | tr '\n' ' '`
16131           if test ! -z "$ccvers" ; then
16132             echo "  Compiler version:                  $ccvers"
16133           fi
16134         ;;
16135
16136         mips-sgi-irix*)
16137           ccvers=`$CC -version`
16138           if test ! -z "$ccvers" ; then
16139             echo "  Compiler version:                  $ccvers"
16140           fi
16141         ;;
16142
16143                 i[3-9]86-pc-linux)
16144           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16145           if test ! -z "$ccvers" ; then
16146             echo "  Compiler version:                  $ccvers"
16147           fi
16148         ;;
16149           
16150         *) echo "  Compiler version:                  $CC on $canonical";;
16151   esac
16152 esac
16153
16154 echo "  Relocating allocator for buffers:  $rel_alloc"
16155 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16156 case "$ld_switch_site" in
16157   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16158     - Consider configuring with --pdump." ;;
16159 esac
16160
16161 case "$canonical" in
16162         *-*-linux*) 
16163           if test -f /etc/redhat-release ; then
16164             echo "  libc:                              `rpm -q glibc`";
16165           else
16166             echo "Need to guess glibc1/2/etc here";
16167           fi
16168         ;;
16169
16170         *-*-aix*) 
16171           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16172         ;;
16173
16174         *-*-solaris*)
16175           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16176           echo "  libc:                              SUNWcsl $libc"
16177
16178         ;;
16179
16180         mips-sgi-irix*)
16181           echo "  IRIX version:                      `uname -sRm`'"
16182         ;;
16183           
16184
16185         alpha*-dec-osf*)
16186                   (cd /usr/.smdb.;
16187                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16188                 echo "  libc:                              $libc"
16189                 
16190           )
16191         ;;
16192
16193         *) echo "  libc:                              system-provided libc on $canonical" ;;
16194 esac
16195
16196
16197 echo "
16198 Window System:"
16199 if test "$with_msw" = "yes"; then
16200   echo "  Compiling in support for the Microsoft window system."
16201 fi
16202 if test "$with_x11" = "yes"; then
16203   echo "  Compiling in support for the X window system:"
16204   echo "    - X Windows headers location:                 $x_includes"
16205   echo "    - X Windows libraries location:               $x_libraries"
16206   if test "$with_xauth" != yes; then
16207     echo "    - Xau (X authority) not available."
16208   fi
16209   if test "$with_xmu" != yes; then
16210     echo "    - Xmu library not available; substituting equivalent routines."
16211   fi
16212   if test "$with_wmcommand" != no; then
16213     echo "    - Handling WM_COMMAND properly."
16214   fi
16215 fi
16216 if test "$need_motif" = "yes" ; then
16217   echo "  Compiling in support for Motif."
16218   if test "$have_lesstif" = "yes"; then
16219     echo "    - Using LessTif implementation."
16220   fi
16221   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16222   echo "             You are likely to experience slow redisplay."
16223   echo "             You may need to install vendor patches to Motif."
16224   echo "             See PROBLEMS for more information."
16225 fi
16226 if test "$need_athena" = "yes"; then
16227   echo "  Compiling in support for the Athena widget set:"
16228   echo "    - Athena headers location:                    $athena_h_path"
16229   echo "    - Athena library to link:                     $athena_lib"
16230 fi
16231 case "$with_menubars" in
16232   gtk   ) echo "  Using GTK menubars."   ;;
16233   lucid ) echo "  Using Lucid menubars." ;;
16234   motif ) echo "  Using Motif menubars."
16235           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16236           echo "             We recommend using the Lucid menubar instead."
16237           echo "             Re-run configure with --with-menubars='lucid'." ;;
16238     msw ) echo "  Using MS-Windows menubars." ;;
16239 esac
16240 case "$with_scrollbars" in
16241   gtk    ) echo "  Using GTK scrollbars."        ;;
16242   lucid  ) echo "  Using Lucid scrollbars."      ;;
16243   motif  ) echo "  Using Motif scrollbars."      ;;
16244   athena ) echo "  Using Athena scrollbars."     ;;
16245      msw ) echo "  Using MS-Windows scrollbars." ;;
16246 esac
16247 case "$with_dialogs" in
16248   gtk    ) echo "  Using GTK dialog boxes." ;;
16249   motif  ) echo "  Using Motif dialog boxes."
16250            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16251              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16252              echo "             We recommend using the Athena dialog boxes instead."
16253              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16254              echo "             Read the PROBLEMS file for more information."
16255            fi; fi ;;
16256   athena ) echo "  Using Athena dialog boxes."     ;;
16257      msw ) echo "  Using MS-Windows dialog boxes." ;;
16258 esac
16259 case "$with_widgets" in
16260   gtk    ) echo "  Using GTK native widgets."        ;;
16261   motif  ) echo "  Using Motif native widgets."      ;;
16262   athena ) echo "  Using Athena native widgets."     ;;
16263      msw ) echo "  Using MS-Windows native widgets." ;;
16264 esac
16265 if test "$with_dragndrop" = yes; then
16266   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16267   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16268 fi
16269
16270 echo "
16271 TTY:"
16272 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16273 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16274
16275 echo "
16276 Images:"
16277 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16278 if test "$with_xpm" = yes; then
16279   echo "  Compiling in support for XPM  images."
16280 elif test "$with_x11" = yes; then
16281   echo "  WARNING: -----------------------------------------------------------"
16282   echo "  WARNING: Compiling without XPM image support."
16283   if test "$xpm_problem" != ""; then
16284     echo "  Reason: $xpm_problem"
16285   fi
16286   echo "  WARNING: You should strongly consider installing XPM."
16287   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16288   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16289   echo "  WARNING: -----------------------------------------------------------"
16290 fi
16291 if test "$with_png" = yes; then
16292   echo "  Compiling in support for PNG  images."
16293 elif test "$window_system" != "none"; then
16294   echo "  WARNING: -----------------------------------------------------------"
16295   echo "  WARNING: Compiling without PNG image support."
16296   if test "$png_problem" != ""; then
16297     echo "  Reason: $png_problem"
16298   fi
16299   echo "  WARNING: You should strongly consider installing the PNG libraries."
16300   echo "  WARNING: Otherwise certain images and glyphs may not display."
16301   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16302   echo "  WARNING: -----------------------------------------------------------"
16303 fi
16304 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16305 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16306 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16307
16308 echo "
16309 Sound:"
16310 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16311 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16312 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16313 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16314
16315 echo "
16316 Databases:"
16317 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16318 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16319 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16320 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16321 if test "$with_postgresql" = yes; then
16322   echo "  Compiling in support for PostgreSQL."
16323   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16324   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16325 fi
16326
16327 echo "
16328 Internationalization:"
16329 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16330 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16331 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16332 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16333 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16334 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16335 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16336 if test "$with_wnn" = yes; then
16337   echo "  Compiling in support for the WNN input method on Mule."
16338   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16339 fi
16340 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16341
16342 echo "
16343 Mail:"
16344 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16345 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16346 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16347 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16348
16349 echo "
16350 Other Features:"
16351 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16352 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16353 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16354 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16355 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16356 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16357 if test "$use_union_type" = yes; then
16358   echo "  WARNING: ---------------------------------------------------------"
16359   echo "  Using the union type for Lisp_Objects."
16360   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16361   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16362   echo "  WARNING: ---------------------------------------------------------"
16363 fi
16364 if test "$use_regex_malloc" = no; then
16365   echo "  WARNING: -----------------------------------------------------------"
16366   echo "  Using alloca to allocate the failure stack."
16367   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16368   echo "  Do NOT use this build of XEmacs for ordinary work."
16369   echo "  WARNING: -----------------------------------------------------------"
16370 fi
16371 test "$pdump" = yes && echo "  Using the new portable dumper."
16372 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16373 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16374 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16375   != "no no no no no no"; then
16376   echo "  WARNING: ---------------------------------------------------------"
16377   echo "  WARNING: Compiling in support for runtime error checking."
16378   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16379   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16380   echo "  WARNING: ---------------------------------------------------------"
16381 fi
16382 echo ""
16383 ) | tee -a Installation
16384 echo ""
16385
16386
16387 # Remove any trailing slashes in these variables.
16388 test -n "$prefix" &&
16389   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16390 test -n "$exec_prefix" &&
16391   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16392
16393
16394 for file in $internal_makefile_list; do
16395   test "$file" = src/Makefile.in && \
16396     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16397   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16398 done
16399 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16400 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
16401
16402 trap '' 1 2 15
16403
16404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16405
16406 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16407 # Let make expand exec_prefix.
16408 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16409
16410 # Any assignment to VPATH causes Sun make to only execute
16411 # the first set of double-colon rules, so remove it if not needed.
16412 # If there is a colon in the path, we need to keep it.
16413 if test "x$srcdir" = x.; then
16414   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16415 fi
16416
16417 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16418
16419 DEFS=-DHAVE_CONFIG_H
16420
16421 # Without the "./", some shells look in PATH for config.status.
16422 : ${CONFIG_STATUS=./config.status}
16423
16424 echo creating $CONFIG_STATUS
16425 rm -f $CONFIG_STATUS
16426 cat > $CONFIG_STATUS <<EOF
16427 #! /bin/sh
16428 # Generated automatically by configure.
16429 # Run this file to recreate the current configuration.
16430 # This directory was configured as follows,
16431 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16432 #
16433 # $0 $ac_configure_args
16434 #
16435 # Compiler output produced by configure, useful for debugging
16436 # configure, is in ./config.log if it exists.
16437
16438 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16439 for ac_option
16440 do
16441   case "\$ac_option" in
16442   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16443     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16444     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16445   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16446     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16447     exit 0 ;;
16448   -help | --help | --hel | --he | --h)
16449     echo "\$ac_cs_usage"; exit 0 ;;
16450   *) echo "\$ac_cs_usage"; exit 1 ;;
16451   esac
16452 done
16453
16454 ac_given_srcdir=$srcdir
16455 ac_given_INSTALL="$INSTALL"
16456
16457 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16458 EOF
16459 cat >> $CONFIG_STATUS <<EOF
16460
16461 # Protect against being on the right side of a sed subst in config.status.
16462 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16463  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16464 $ac_vpsub
16465 $extrasub
16466 s%@SHELL@%$SHELL%g
16467 s%@CFLAGS@%$CFLAGS%g
16468 s%@CPPFLAGS@%$CPPFLAGS%g
16469 s%@CXXFLAGS@%$CXXFLAGS%g
16470 s%@FFLAGS@%$FFLAGS%g
16471 s%@DEFS@%$DEFS%g
16472 s%@LDFLAGS@%$LDFLAGS%g
16473 s%@LIBS@%$LIBS%g
16474 s%@exec_prefix@%$exec_prefix%g
16475 s%@prefix@%$prefix%g
16476 s%@program_transform_name@%$program_transform_name%g
16477 s%@bindir@%$bindir%g
16478 s%@sbindir@%$sbindir%g
16479 s%@libexecdir@%$libexecdir%g
16480 s%@datadir@%$datadir%g
16481 s%@sysconfdir@%$sysconfdir%g
16482 s%@sharedstatedir@%$sharedstatedir%g
16483 s%@localstatedir@%$localstatedir%g
16484 s%@libdir@%$libdir%g
16485 s%@includedir@%$includedir%g
16486 s%@oldincludedir@%$oldincludedir%g
16487 s%@infodir@%$infodir%g
16488 s%@mandir@%$mandir%g
16489 s%@LN_S@%$LN_S%g
16490 s%@blddir@%$blddir%g
16491 s%@CC@%$CC%g
16492 s%@CPP@%$CPP%g
16493 s%@start_flags@%$start_flags%g
16494 s%@ld_switch_shared@%$ld_switch_shared%g
16495 s%@start_files@%$start_files%g
16496 s%@ld@%$ld%g
16497 s%@lib_gcc@%$lib_gcc%g
16498 s%@RANLIB@%$RANLIB%g
16499 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16500 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16501 s%@INSTALL_DATA@%$INSTALL_DATA%g
16502 s%@YACC@%$YACC%g
16503 s%@SET_MAKE@%$SET_MAKE%g
16504 s%@GTK_CONFIG@%$GTK_CONFIG%g
16505 s%@X_CFLAGS@%$X_CFLAGS%g
16506 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16507 s%@X_LIBS@%$X_LIBS%g
16508 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16509 s%@install_pp@%$install_pp%g
16510 s%@libs_xauth@%$libs_xauth%g
16511 s%@dnd_objs@%$dnd_objs%g
16512 s%@lwlib_objs@%$lwlib_objs%g
16513 s%@ALLOCA@%$ALLOCA%g
16514 s%@have_esd_config@%$have_esd_config%g
16515 s%@dll_ld@%$dll_ld%g
16516 s%@dll_cflags@%$dll_cflags%g
16517 s%@dll_ldflags@%$dll_ldflags%g
16518 s%@dll_post@%$dll_post%g
16519 s%@dll_ldo@%$dll_ldo%g
16520 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16521 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16522 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16523 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16524 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16525 s%@PROGNAME@%$PROGNAME%g
16526 s%@version@%$version%g
16527 s%@configuration@%$configuration%g
16528 s%@canonical@%$canonical%g
16529 s%@inststaticdir@%$inststaticdir%g
16530 s%@instvardir@%$instvardir%g
16531 s%@srcdir@%$srcdir%g
16532 s%@pkgdir@%$pkgdir%g
16533 s%@statedir@%$statedir%g
16534 s%@extra_includes@%$extra_includes%g
16535 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16536 s%@PREFIX@%$PREFIX%g
16537 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16538 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16539 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16540 s%@INFODIR@%$INFODIR%g
16541 s%@infopath@%$infopath%g
16542 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16543 s%@INFOPATH@%$INFOPATH%g
16544 s%@package_path@%$package_path%g
16545 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16546 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16547 s%@lispdir@%$lispdir%g
16548 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16549 s%@LISPDIR@%$LISPDIR%g
16550 s%@moduledir@%$moduledir%g
16551 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16552 s%@MODULEDIR@%$MODULEDIR%g
16553 s%@sitelispdir@%$sitelispdir%g
16554 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16555 s%@SITELISPDIR@%$SITELISPDIR%g
16556 s%@sitemoduledir@%$sitemoduledir%g
16557 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16558 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16559 s%@etcdir@%$etcdir%g
16560 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16561 s%@ETCDIR@%$ETCDIR%g
16562 s%@docdir@%$docdir%g
16563 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16564 s%@DOCDIR@%$DOCDIR%g
16565 s%@archlibdir@%$archlibdir%g
16566 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16567 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16568 s%@bitmapdir@%$bitmapdir%g
16569 s%@extra_objs@%$extra_objs%g
16570 s%@machfile@%$machfile%g
16571 s%@opsysfile@%$opsysfile%g
16572 s%@c_switch_general@%$c_switch_general%g
16573 s%@c_switch_window_system@%$c_switch_window_system%g
16574 s%@c_switch_all@%$c_switch_all%g
16575 s%@ld_switch_general@%$ld_switch_general%g
16576 s%@ld_switch_window_system@%$ld_switch_window_system%g
16577 s%@ld_switch_all@%$ld_switch_all%g
16578 s%@ld_libs_general@%$ld_libs_general%g
16579 s%@ld_libs_window_system@%$ld_libs_window_system%g
16580 s%@ld_libs_all@%$ld_libs_all%g
16581 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
16582 s%@native_sound_lib@%$native_sound_lib%g
16583 s%@sound_cflags@%$sound_cflags%g
16584 s%@dynodump_arch@%$dynodump_arch%g
16585 s%@XEMACS_CC@%$XEMACS_CC%g
16586 s%@internal_makefile_list@%$internal_makefile_list%g
16587
16588 CEOF
16589 EOF
16590
16591 cat >> $CONFIG_STATUS <<\EOF
16592
16593 # Split the substitutions into bite-sized pieces for seds with
16594 # small command number limits, like on Digital OSF/1 and HP-UX.
16595 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16596 ac_file=1 # Number of current file.
16597 ac_beg=1 # First line for current file.
16598 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16599 ac_more_lines=:
16600 ac_sed_cmds=""
16601 while $ac_more_lines; do
16602   if test $ac_beg -gt 1; then
16603     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16604   else
16605     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16606   fi
16607   if test ! -s conftest.s$ac_file; then
16608     ac_more_lines=false
16609     rm -f conftest.s$ac_file
16610   else
16611     if test -z "$ac_sed_cmds"; then
16612       ac_sed_cmds="sed -f conftest.s$ac_file"
16613     else
16614       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16615     fi
16616     ac_file=`expr $ac_file + 1`
16617     ac_beg=$ac_end
16618     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16619   fi
16620 done
16621 if test -z "$ac_sed_cmds"; then
16622   ac_sed_cmds=cat
16623 fi
16624 EOF
16625
16626 cat >> $CONFIG_STATUS <<EOF
16627
16628 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16629 EOF
16630 cat >> $CONFIG_STATUS <<\EOF
16631 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16632   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16633   case "$ac_file" in
16634   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16635        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16636   *) ac_file_in="${ac_file}.in" ;;
16637   esac
16638
16639   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16640
16641   # Remove last slash and all that follows it.  Not all systems have dirname.
16642   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16643   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16644     # The file is in a subdirectory.
16645     test ! -d "$ac_dir" && mkdir "$ac_dir"
16646     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16647     # A "../" for each directory in $ac_dir_suffix.
16648     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16649   else
16650     ac_dir_suffix= ac_dots=
16651   fi
16652
16653   case "$ac_given_srcdir" in
16654   .)  srcdir=.
16655       if test -z "$ac_dots"; then top_srcdir=.
16656       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16657   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16658   *) # Relative path.
16659     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16660     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16661   esac
16662
16663   case "$ac_given_INSTALL" in
16664   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16665   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16666   esac
16667
16668   echo creating "$ac_file"
16669   rm -f "$ac_file"
16670   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16671   case "$ac_file" in
16672   *Makefile*) ac_comsub="1i\\
16673 # $configure_input" ;;
16674   *) ac_comsub= ;;
16675   esac
16676
16677   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16678   sed -e "$ac_comsub
16679 s%@configure_input@%$configure_input%g
16680 s%@srcdir@%$srcdir%g
16681 s%@top_srcdir@%$top_srcdir%g
16682 s%@INSTALL@%$INSTALL%g
16683 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16684 fi; done
16685 rm -f conftest.s*
16686
16687 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16688 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16689 #
16690 # ac_d sets the value in "#define NAME VALUE" lines.
16691 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16692 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16693 ac_dC='\3'
16694 ac_dD='%g'
16695 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16696 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16697 ac_uB='\([      ]\)%\1#\2define\3'
16698 ac_uC=' '
16699 ac_uD='\4%g'
16700 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16701 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16702 ac_eB='$%\1#\2define\3'
16703 ac_eC=' '
16704 ac_eD='%g'
16705
16706 if test "${CONFIG_HEADERS+set}" != set; then
16707 EOF
16708 cat >> $CONFIG_STATUS <<EOF
16709   CONFIG_HEADERS="src/config.h lwlib/config.h"
16710 EOF
16711 cat >> $CONFIG_STATUS <<\EOF
16712 fi
16713 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16714   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16715   case "$ac_file" in
16716   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16717        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16718   *) ac_file_in="${ac_file}.in" ;;
16719   esac
16720
16721   echo creating $ac_file
16722
16723   rm -f conftest.frag conftest.in conftest.out
16724   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16725   cat $ac_file_inputs > conftest.in
16726
16727 EOF
16728
16729 # Transform confdefs.h into a sed script conftest.vals that substitutes
16730 # the proper values into config.h.in to produce config.h.  And first:
16731 # Protect against being on the right side of a sed subst in config.status.
16732 # Protect against being in an unquoted here document in config.status.
16733 rm -f conftest.vals
16734 cat > conftest.hdr <<\EOF
16735 s/[\\&%]/\\&/g
16736 s%[\\$`]%\\&%g
16737 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16738 s%ac_d%ac_u%gp
16739 s%ac_u%ac_e%gp
16740 EOF
16741 sed -n -f conftest.hdr confdefs.h > conftest.vals
16742 rm -f conftest.hdr
16743
16744 # This sed command replaces #undef with comments.  This is necessary, for
16745 # example, in the case of _POSIX_SOURCE, which is predefined and required
16746 # on some systems where configure will not decide to define it.
16747 cat >> conftest.vals <<\EOF
16748 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16749 EOF
16750
16751 # Break up conftest.vals because some shells have a limit on
16752 # the size of here documents, and old seds have small limits too.
16753
16754 rm -f conftest.tail
16755 while :
16756 do
16757   ac_lines=`grep -c . conftest.vals`
16758   # grep -c gives empty output for an empty file on some AIX systems.
16759   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16760   # Write a limited-size here document to conftest.frag.
16761   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16762   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16763   echo 'CEOF
16764   sed -f conftest.frag conftest.in > conftest.out
16765   rm -f conftest.in
16766   mv conftest.out conftest.in
16767 ' >> $CONFIG_STATUS
16768   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16769   rm -f conftest.vals
16770   mv conftest.tail conftest.vals
16771 done
16772 rm -f conftest.vals
16773
16774 cat >> $CONFIG_STATUS <<\EOF
16775   rm -f conftest.frag conftest.h
16776   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16777   cat conftest.in >> conftest.h
16778   rm -f conftest.in
16779   if cmp -s $ac_file conftest.h 2>/dev/null; then
16780     echo "$ac_file is unchanged"
16781     rm -f conftest.h
16782   else
16783     # Remove last slash and all that follows it.  Not all systems have dirname.
16784       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16785       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16786       # The file is in a subdirectory.
16787       test ! -d "$ac_dir" && mkdir "$ac_dir"
16788     fi
16789     rm -f $ac_file
16790     mv conftest.h $ac_file
16791   fi
16792 fi; done
16793
16794 EOF
16795 cat >> $CONFIG_STATUS <<EOF
16796 CPP="$CPP"
16797  top_srcdir="$srcdir"
16798  MAKE_SUBDIR="$MAKE_SUBDIR"
16799
16800 EOF
16801 cat >> $CONFIG_STATUS <<\EOF
16802 for dir in . $MAKE_SUBDIR; do
16803   (
16804     cd $dir
16805     rm -f junk.c
16806     < Makefile.in \
16807       sed -e '/^# Generated/d' \
16808           -e 's%/\*\*/#.*%%' \
16809           -e 's/^ *# */#/' \
16810           -e '/^##/d' \
16811           -e '/^#/ {
16812 p
16813 d
16814 }'        \
16815           -e '/./ {
16816 s/\([\"]\)/\\\1/g
16817 s/^/"/
16818 s/$/"/
16819 }'  > junk.c;
16820
16821
16822
16823     echo creating $dir/Makefile
16824 $CPP -I. -I${top_srcdir}/src  junk.c \
16825   | sed -e 's/^\#.*//'          \
16826         -e 's/^[        ][      ]*$//'\
16827         -e 's/^ /       /'              \
16828         -e '/^[ \f]*$/d' \
16829         -e '/^\"/ {
16830         s/\\\([\"]\)/\1/g
16831         s/^[    ]*\"//
16832         s/\"[   ]*$//
16833 }' > Makefile.new
16834     chmod 444 Makefile.new
16835     mv -f Makefile.new Makefile
16836
16837     echo creating $dir/GNUmakefile
16838 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16839   | sed -e 's/^\#.*//'          \
16840         -e 's/^[        ][      ]*$//'\
16841         -e 's/^ /       /'              \
16842         -e '/^[ \f]*$/d' \
16843         -e '/^\"/ {
16844         s/\\\([\"]\)/\1/g
16845         s/^[    ]*\"//
16846         s/\"[   ]*$//
16847 }' > Makefile.new
16848     chmod 444 Makefile.new
16849     mv -f Makefile.new GNUmakefile
16850
16851     rm -f junk.c
16852   )
16853 done
16854
16855 sed < config.status >> lib-src/config.values \
16856   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16857   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16858   -e 's/^\([^ ]*\) $/\1 ""/' \
16859   -e 's/ 1$/ t/'
16860
16861
16862 exit 0
16863 EOF
16864 chmod +x $CONFIG_STATUS
16865 rm -fr confdefs* $ac_clean_files
16866 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1