21.4.14 "Reasonable Discussion".
[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 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=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1429         { test "$extra_verbose" = "yes" && cat << EOF
1430     Defining OS_RELEASE = $os_release
1431 EOF
1432 cat >> confdefs.h <<EOF
1433 #define OS_RELEASE $os_release
1434 EOF
1435 }
1436  ;;
1437
1438             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1439       *-sunos4.0*         ) opsys=sunos4-0      ;;
1440       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1441       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1442       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1443       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1444       *-mach*             ) opsys=mach-bsd4-3   ;;
1445       *                   ) opsys=bsd4-2        ;;
1446     esac
1447
1448     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1449
1450         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1451   ;;
1452
1453     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1454
1455     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1456   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1457
1458     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1459
1460     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1461
1462     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1463       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1464
1465     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1466
1467     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1468
1469     vax-dec-* )
1470     case "$canonical" in
1471       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1472       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1473       *-mach* )                         opsys=mach-bsd4-3 ;;
1474     esac
1475   ;;
1476
1477     ns16k-whitechapel-* ) machine=mg1 ;;
1478
1479     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1480
1481     i[3-9]86-*-* )
1482     machine=intel386
1483     case "$canonical" in
1484       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1485       *-isc2.2* )               opsys=isc2-2 ;;
1486       *-isc4.0* )               opsys=isc4-0 ;;
1487       *-isc4.* )                opsys=isc4-1
1488                                 GCC_TEST_OPTIONS=-posix
1489                                 NON_GCC_TEST_OPTIONS=-Xp
1490                                 ;;
1491       *-isc* )                  opsys=isc3-0 ;;
1492       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1493       *-esix* )                 opsys=esix ;;
1494       *-mach* )                 opsys=mach-bsd4-3 ;;
1495       *-xenix* )                opsys=xenix ;;
1496       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1497       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1498       *-bsdi4* )                opsys=bsdos4 ;;
1499       *-bsdi3* )                opsys=bsdos3 ;;
1500       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1501       *-bsdi2* )                opsys=bsdos2 ;;
1502       *-sco3.2v5* )             opsys=sco5 ;;
1503       *-sysv5* )                opsys=sco7 ;;
1504       *-386bsd* )               opsys=386bsd ;;
1505       *-freebsd* )              opsys=freebsd ;;
1506       *-nextstep* )             opsys=nextstep ;;
1507       *-pc-cygwin* )            opsys=cygwin32 ;;
1508       *-pc-mingw* )             opsys=mingw32 ;
1509                                 test -z "$with_tty" && with_tty="no";;
1510           esac
1511   ;;
1512
1513     m68k-*-linux* ) machine=m68k opsys=linux ;;
1514
1515 esac
1516
1517 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1518
1519 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1520
1521 if test -r "${srcdir}/src/m/${machine}.h"; then
1522   machfile="m/${machine}.h"
1523   { test "$extra_verbose" = "yes" && cat << EOF
1524     Defining config_machfile = "$machfile"
1525 EOF
1526 cat >> confdefs.h <<EOF
1527 #define config_machfile "$machfile"
1528 EOF
1529 }
1530
1531 else
1532   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1533   echo "Using configure-time autodetection only."
1534 fi
1535
1536 if test -r "${srcdir}/src/s/${opsys}.h"; then
1537   opsysfile="s/${opsys}.h"
1538   { test "$extra_verbose" = "yes" && cat << EOF
1539     Defining config_opsysfile = "$opsysfile"
1540 EOF
1541 cat >> confdefs.h <<EOF
1542 #define config_opsysfile "$opsysfile"
1543 EOF
1544 }
1545
1546 else
1547   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1548   echo "Using configure-time autodetection only."
1549 fi
1550
1551
1552 if test -z "$pdump"; then
1553   case "$opsys" in
1554     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1555   esac
1556 fi
1557
1558 if test -z "$dynamic"; then
1559   case "$opsys" in
1560     hpux* | sunos4* ) dynamic=no ;;
1561     *) dynamic=yes ;;
1562   esac
1563 fi
1564 if test "$dynamic" = "yes"; then
1565   case "$opsys" in
1566     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1567     decosf* ) ld_call_shared="-call_shared" ;;
1568     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1569     Defining DLSYM_NEEDS_UNDERSCORE
1570 EOF
1571 cat >> confdefs.h <<\EOF
1572 #define DLSYM_NEEDS_UNDERSCORE 1
1573 EOF
1574 }
1575  ;;
1576   esac
1577 else   case "$opsys" in
1578     sol2 )
1579       echo "Static linking is not supported on Solaris 2."
1580       echo "Rerun configure without specifying --dynamic=no."
1581       exit 1 ;;
1582     linux   ) ld_call_shared="-Bstatic" ;;
1583     decosf* ) ld_call_shared="-non_shared" ;;
1584   esac
1585 fi
1586
1587 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1588
1589 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1590 { test "$extra_verbose" = "yes" && cat << EOF
1591     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1592 EOF
1593 cat >> confdefs.h <<EOF
1594 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1595 EOF
1596 }
1597
1598
1599
1600 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1601 if test "$with_workshop $with_tooltalk" = "yes no"; then
1602   (echo "$progname: Usage error:"
1603 echo " " "--with-workshop requires --with-tooltalk"
1604 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1605 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1606 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1607 fi
1608
1609 if test "$with_workshop" = "yes"; then
1610   { test "$extra_verbose" = "yes" && cat << \EOF
1611     Defining SUNPRO
1612 EOF
1613 cat >> confdefs.h <<\EOF
1614 #define SUNPRO 1
1615 EOF
1616 }
1617
1618   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1619    echo "    xemacs will be linked with \"sunpro.o\""
1620  fi
1621 fi
1622
1623 if test "$with_clash_detection" != "no"; then
1624   { test "$extra_verbose" = "yes" && cat << \EOF
1625     Defining CLASH_DETECTION
1626 EOF
1627 cat >> confdefs.h <<\EOF
1628 #define CLASH_DETECTION 1
1629 EOF
1630 }
1631
1632   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1633    echo "    xemacs will be linked with \"filelock.o\""
1634  fi
1635 fi
1636
1637 test -n "$compiler" && CC="$compiler"
1638 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1639 fi
1640
1641 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1642 if test "${CFLAGS-unset}" != unset
1643   then cflags_specified=yes;
1644   else cflags_specified=no;
1645 fi
1646
1647 xe_save_CFLAGS="$CFLAGS"
1648
1649 # Extract the first word of "gcc", so it can be a program name with args.
1650 set dummy gcc; ac_word=$2
1651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1652 echo "configure:1653: checking for $ac_word" >&5
1653
1654 if test -n "$CC"; then
1655   ac_cv_prog_CC="$CC" # Let the user override the test.
1656 else
1657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1658   ac_dummy="$PATH"
1659   for ac_dir in $ac_dummy; do
1660     test -z "$ac_dir" && ac_dir=.
1661     if test -f $ac_dir/$ac_word; then
1662       ac_cv_prog_CC="gcc"
1663       break
1664     fi
1665   done
1666   IFS="$ac_save_ifs"
1667 fi
1668 CC="$ac_cv_prog_CC"
1669 if test -n "$CC"; then
1670   echo "$ac_t""$CC" 1>&6
1671 else
1672   echo "$ac_t""no" 1>&6
1673 fi
1674
1675 if test -z "$CC"; then
1676   # Extract the first word of "cc", so it can be a program name with args.
1677 set dummy cc; ac_word=$2
1678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1679 echo "configure:1680: checking for $ac_word" >&5
1680
1681 if test -n "$CC"; then
1682   ac_cv_prog_CC="$CC" # Let the user override the test.
1683 else
1684   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1685   ac_prog_rejected=no
1686   ac_dummy="$PATH"
1687   for ac_dir in $ac_dummy; do
1688     test -z "$ac_dir" && ac_dir=.
1689     if test -f $ac_dir/$ac_word; then
1690       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1691         ac_prog_rejected=yes
1692         continue
1693       fi
1694       ac_cv_prog_CC="cc"
1695       break
1696     fi
1697   done
1698   IFS="$ac_save_ifs"
1699 if test $ac_prog_rejected = yes; then
1700   # We found a bogon in the path, so make sure we never use it.
1701   set dummy $ac_cv_prog_CC
1702   shift
1703   if test $# -gt 0; then
1704     # We chose a different compiler from the bogus one.
1705     # However, it has the same basename, so the bogon will be chosen
1706     # first if we set CC to just the basename; use the full file name.
1707     shift
1708     set dummy "$ac_dir/$ac_word" "$@"
1709     shift
1710     ac_cv_prog_CC="$@"
1711   fi
1712 fi
1713 fi
1714 CC="$ac_cv_prog_CC"
1715 if test -n "$CC"; then
1716   echo "$ac_t""$CC" 1>&6
1717 else
1718   echo "$ac_t""no" 1>&6
1719 fi
1720
1721   if test -z "$CC"; then
1722     case "`uname -s`" in
1723     *win32* | *WIN32*)
1724       # Extract the first word of "cl", so it can be a program name with args.
1725 set dummy cl; ac_word=$2
1726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1727 echo "configure:1728: checking for $ac_word" >&5
1728
1729 if test -n "$CC"; then
1730   ac_cv_prog_CC="$CC" # Let the user override the test.
1731 else
1732   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1733   ac_dummy="$PATH"
1734   for ac_dir in $ac_dummy; do
1735     test -z "$ac_dir" && ac_dir=.
1736     if test -f $ac_dir/$ac_word; then
1737       ac_cv_prog_CC="cl"
1738       break
1739     fi
1740   done
1741   IFS="$ac_save_ifs"
1742 fi
1743 CC="$ac_cv_prog_CC"
1744 if test -n "$CC"; then
1745   echo "$ac_t""$CC" 1>&6
1746 else
1747   echo "$ac_t""no" 1>&6
1748 fi
1749  ;;
1750     esac
1751   fi
1752   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1753 fi
1754
1755 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1756 echo "configure:1757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1757
1758 ac_ext=c
1759 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1760 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1761 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'
1762 ac_cpp='$CPP '"$xe_cppflags"
1763 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1764 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1765 cross_compiling=no
1766
1767 cat > conftest.$ac_ext << EOF
1768
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771
1772 main(){return(0);}
1773 EOF
1774 if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1775   ac_cv_prog_cc_works=yes
1776   # If we can't run a trivial program, we are probably using a cross compiler.
1777   if (./conftest; exit) 2>/dev/null; then
1778     ac_cv_prog_cc_cross=no
1779   else
1780     ac_cv_prog_cc_cross=yes
1781   fi
1782 else
1783   echo "configure: failed program was:" >&5
1784   cat conftest.$ac_ext >&5
1785   ac_cv_prog_cc_works=no
1786 fi
1787 rm -fr conftest*
1788 ac_ext=c
1789 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1790 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1791 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'
1792 ac_cpp='$CPP '"$xe_cppflags"
1793 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1794 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1795 cross_compiling=no
1796
1797 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1798 if test $ac_cv_prog_cc_works = no; then
1799   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1800 fi
1801 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1802 echo "configure:1803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1803 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1804 cross_compiling=$ac_cv_prog_cc_cross
1805
1806 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1807 echo "configure:1808: checking whether we are using GNU C" >&5
1808
1809 cat > conftest.c <<EOF
1810 #ifdef __GNUC__
1811   yes;
1812 #endif
1813 EOF
1814 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1815   ac_cv_prog_gcc=yes
1816 else
1817   ac_cv_prog_gcc=no
1818 fi
1819
1820 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1821
1822 if test $ac_cv_prog_gcc = yes; then
1823   GCC=yes
1824 else
1825   GCC=
1826 fi
1827
1828 ac_test_CFLAGS="${CFLAGS+set}"
1829 ac_save_CFLAGS="$CFLAGS"
1830 CFLAGS=
1831 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1832 echo "configure:1833: checking whether ${CC-cc} accepts -g" >&5
1833
1834 echo 'void f(){}' > conftest.c
1835 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1836   ac_cv_prog_cc_g=yes
1837 else
1838   ac_cv_prog_cc_g=no
1839 fi
1840 rm -f conftest*
1841
1842
1843 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1844 if test "$ac_test_CFLAGS" = set; then
1845   CFLAGS="$ac_save_CFLAGS"
1846 elif test $ac_cv_prog_cc_g = yes; then
1847   if test "$GCC" = yes; then
1848     CFLAGS="-g -O2"
1849   else
1850     CFLAGS="-g"
1851   fi
1852 else
1853   if test "$GCC" = yes; then
1854     CFLAGS="-O2"
1855   else
1856     CFLAGS=
1857   fi
1858 fi
1859  
1860 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1861   CC=${NON_GNU_CC-cc}
1862   # Extract the first word of "gcc", so it can be a program name with args.
1863 set dummy gcc; ac_word=$2
1864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_word" >&5
1866
1867 if test -n "$CC"; then
1868   ac_cv_prog_CC="$CC" # Let the user override the test.
1869 else
1870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1871   ac_dummy="$PATH"
1872   for ac_dir in $ac_dummy; do
1873     test -z "$ac_dir" && ac_dir=.
1874     if test -f $ac_dir/$ac_word; then
1875       ac_cv_prog_CC="gcc"
1876       break
1877     fi
1878   done
1879   IFS="$ac_save_ifs"
1880 fi
1881 CC="$ac_cv_prog_CC"
1882 if test -n "$CC"; then
1883   echo "$ac_t""$CC" 1>&6
1884 else
1885   echo "$ac_t""no" 1>&6
1886 fi
1887
1888 if test -z "$CC"; then
1889   # Extract the first word of "cc", so it can be a program name with args.
1890 set dummy cc; ac_word=$2
1891 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1892 echo "configure:1893: checking for $ac_word" >&5
1893
1894 if test -n "$CC"; then
1895   ac_cv_prog_CC="$CC" # Let the user override the test.
1896 else
1897   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1898   ac_prog_rejected=no
1899   ac_dummy="$PATH"
1900   for ac_dir in $ac_dummy; do
1901     test -z "$ac_dir" && ac_dir=.
1902     if test -f $ac_dir/$ac_word; then
1903       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1904         ac_prog_rejected=yes
1905         continue
1906       fi
1907       ac_cv_prog_CC="cc"
1908       break
1909     fi
1910   done
1911   IFS="$ac_save_ifs"
1912 if test $ac_prog_rejected = yes; then
1913   # We found a bogon in the path, so make sure we never use it.
1914   set dummy $ac_cv_prog_CC
1915   shift
1916   if test $# -gt 0; then
1917     # We chose a different compiler from the bogus one.
1918     # However, it has the same basename, so the bogon will be chosen
1919     # first if we set CC to just the basename; use the full file name.
1920     shift
1921     set dummy "$ac_dir/$ac_word" "$@"
1922     shift
1923     ac_cv_prog_CC="$@"
1924   fi
1925 fi
1926 fi
1927 CC="$ac_cv_prog_CC"
1928 if test -n "$CC"; then
1929   echo "$ac_t""$CC" 1>&6
1930 else
1931   echo "$ac_t""no" 1>&6
1932 fi
1933
1934   if test -z "$CC"; then
1935     case "`uname -s`" in
1936     *win32* | *WIN32*)
1937       # Extract the first word of "cl", so it can be a program name with args.
1938 set dummy cl; ac_word=$2
1939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_word" >&5
1941
1942 if test -n "$CC"; then
1943   ac_cv_prog_CC="$CC" # Let the user override the test.
1944 else
1945   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1946   ac_dummy="$PATH"
1947   for ac_dir in $ac_dummy; do
1948     test -z "$ac_dir" && ac_dir=.
1949     if test -f $ac_dir/$ac_word; then
1950       ac_cv_prog_CC="cl"
1951       break
1952     fi
1953   done
1954   IFS="$ac_save_ifs"
1955 fi
1956 CC="$ac_cv_prog_CC"
1957 if test -n "$CC"; then
1958   echo "$ac_t""$CC" 1>&6
1959 else
1960   echo "$ac_t""no" 1>&6
1961 fi
1962  ;;
1963     esac
1964   fi
1965   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1966 fi
1967
1968 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1969 echo "configure:1970: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1970
1971 ac_ext=c
1972 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1973 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1974 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'
1975 ac_cpp='$CPP '"$xe_cppflags"
1976 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1977 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1978 cross_compiling=no
1979
1980 cat > conftest.$ac_ext << EOF
1981
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984
1985 main(){return(0);}
1986 EOF
1987 if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1988   ac_cv_prog_cc_works=yes
1989   # If we can't run a trivial program, we are probably using a cross compiler.
1990   if (./conftest; exit) 2>/dev/null; then
1991     ac_cv_prog_cc_cross=no
1992   else
1993     ac_cv_prog_cc_cross=yes
1994   fi
1995 else
1996   echo "configure: failed program was:" >&5
1997   cat conftest.$ac_ext >&5
1998   ac_cv_prog_cc_works=no
1999 fi
2000 rm -fr conftest*
2001 ac_ext=c
2002 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2003 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2004 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'
2005 ac_cpp='$CPP '"$xe_cppflags"
2006 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2007 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2008 cross_compiling=no
2009
2010 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2011 if test $ac_cv_prog_cc_works = no; then
2012   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2013 fi
2014 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2015 echo "configure:2016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2016 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2017 cross_compiling=$ac_cv_prog_cc_cross
2018
2019 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether we are using GNU C" >&5
2021
2022 cat > conftest.c <<EOF
2023 #ifdef __GNUC__
2024   yes;
2025 #endif
2026 EOF
2027 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2028   ac_cv_prog_gcc=yes
2029 else
2030   ac_cv_prog_gcc=no
2031 fi
2032
2033 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2034
2035 if test $ac_cv_prog_gcc = yes; then
2036   GCC=yes
2037 else
2038   GCC=
2039 fi
2040
2041 ac_test_CFLAGS="${CFLAGS+set}"
2042 ac_save_CFLAGS="$CFLAGS"
2043 CFLAGS=
2044 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2045 echo "configure:2046: checking whether ${CC-cc} accepts -g" >&5
2046
2047 echo 'void f(){}' > conftest.c
2048 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2049   ac_cv_prog_cc_g=yes
2050 else
2051   ac_cv_prog_cc_g=no
2052 fi
2053 rm -f conftest*
2054
2055
2056 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2057 if test "$ac_test_CFLAGS" = set; then
2058   CFLAGS="$ac_save_CFLAGS"
2059 elif test $ac_cv_prog_cc_g = yes; then
2060   if test "$GCC" = yes; then
2061     CFLAGS="-g -O2"
2062   else
2063     CFLAGS="-g"
2064   fi
2065 else
2066   if test "$GCC" = yes; then
2067     CFLAGS="-O2"
2068   else
2069     CFLAGS=
2070   fi
2071 fi
2072
2073 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2074   CC=gcc
2075   # Extract the first word of "gcc", so it can be a program name with args.
2076 set dummy gcc; ac_word=$2
2077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2078 echo "configure:2079: checking for $ac_word" >&5
2079
2080 if test -n "$CC"; then
2081   ac_cv_prog_CC="$CC" # Let the user override the test.
2082 else
2083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2084   ac_dummy="$PATH"
2085   for ac_dir in $ac_dummy; do
2086     test -z "$ac_dir" && ac_dir=.
2087     if test -f $ac_dir/$ac_word; then
2088       ac_cv_prog_CC="gcc"
2089       break
2090     fi
2091   done
2092   IFS="$ac_save_ifs"
2093 fi
2094 CC="$ac_cv_prog_CC"
2095 if test -n "$CC"; then
2096   echo "$ac_t""$CC" 1>&6
2097 else
2098   echo "$ac_t""no" 1>&6
2099 fi
2100
2101 if test -z "$CC"; then
2102   # Extract the first word of "cc", so it can be a program name with args.
2103 set dummy cc; ac_word=$2
2104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2105 echo "configure:2106: checking for $ac_word" >&5
2106
2107 if test -n "$CC"; then
2108   ac_cv_prog_CC="$CC" # Let the user override the test.
2109 else
2110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2111   ac_prog_rejected=no
2112   ac_dummy="$PATH"
2113   for ac_dir in $ac_dummy; do
2114     test -z "$ac_dir" && ac_dir=.
2115     if test -f $ac_dir/$ac_word; then
2116       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2117         ac_prog_rejected=yes
2118         continue
2119       fi
2120       ac_cv_prog_CC="cc"
2121       break
2122     fi
2123   done
2124   IFS="$ac_save_ifs"
2125 if test $ac_prog_rejected = yes; then
2126   # We found a bogon in the path, so make sure we never use it.
2127   set dummy $ac_cv_prog_CC
2128   shift
2129   if test $# -gt 0; then
2130     # We chose a different compiler from the bogus one.
2131     # However, it has the same basename, so the bogon will be chosen
2132     # first if we set CC to just the basename; use the full file name.
2133     shift
2134     set dummy "$ac_dir/$ac_word" "$@"
2135     shift
2136     ac_cv_prog_CC="$@"
2137   fi
2138 fi
2139 fi
2140 CC="$ac_cv_prog_CC"
2141 if test -n "$CC"; then
2142   echo "$ac_t""$CC" 1>&6
2143 else
2144   echo "$ac_t""no" 1>&6
2145 fi
2146
2147   if test -z "$CC"; then
2148     case "`uname -s`" in
2149     *win32* | *WIN32*)
2150       # Extract the first word of "cl", so it can be a program name with args.
2151 set dummy cl; ac_word=$2
2152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2153 echo "configure:2154: checking for $ac_word" >&5
2154
2155 if test -n "$CC"; then
2156   ac_cv_prog_CC="$CC" # Let the user override the test.
2157 else
2158   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2159   ac_dummy="$PATH"
2160   for ac_dir in $ac_dummy; do
2161     test -z "$ac_dir" && ac_dir=.
2162     if test -f $ac_dir/$ac_word; then
2163       ac_cv_prog_CC="cl"
2164       break
2165     fi
2166   done
2167   IFS="$ac_save_ifs"
2168 fi
2169 CC="$ac_cv_prog_CC"
2170 if test -n "$CC"; then
2171   echo "$ac_t""$CC" 1>&6
2172 else
2173   echo "$ac_t""no" 1>&6
2174 fi
2175  ;;
2176     esac
2177   fi
2178   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2179 fi
2180
2181 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2182 echo "configure:2183: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2183
2184 ac_ext=c
2185 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2186 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2187 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'
2188 ac_cpp='$CPP '"$xe_cppflags"
2189 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2190 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2191 cross_compiling=no
2192
2193 cat > conftest.$ac_ext << EOF
2194
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197
2198 main(){return(0);}
2199 EOF
2200 if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2201   ac_cv_prog_cc_works=yes
2202   # If we can't run a trivial program, we are probably using a cross compiler.
2203   if (./conftest; exit) 2>/dev/null; then
2204     ac_cv_prog_cc_cross=no
2205   else
2206     ac_cv_prog_cc_cross=yes
2207   fi
2208 else
2209   echo "configure: failed program was:" >&5
2210   cat conftest.$ac_ext >&5
2211   ac_cv_prog_cc_works=no
2212 fi
2213 rm -fr conftest*
2214 ac_ext=c
2215 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2216 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2217 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'
2218 ac_cpp='$CPP '"$xe_cppflags"
2219 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2220 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2221 cross_compiling=no
2222
2223 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2224 if test $ac_cv_prog_cc_works = no; then
2225   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2226 fi
2227 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2228 echo "configure:2229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2229 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2230 cross_compiling=$ac_cv_prog_cc_cross
2231
2232 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2233 echo "configure:2234: checking whether we are using GNU C" >&5
2234
2235 cat > conftest.c <<EOF
2236 #ifdef __GNUC__
2237   yes;
2238 #endif
2239 EOF
2240 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2241   ac_cv_prog_gcc=yes
2242 else
2243   ac_cv_prog_gcc=no
2244 fi
2245
2246 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2247
2248 if test $ac_cv_prog_gcc = yes; then
2249   GCC=yes
2250 else
2251   GCC=
2252 fi
2253
2254 ac_test_CFLAGS="${CFLAGS+set}"
2255 ac_save_CFLAGS="$CFLAGS"
2256 CFLAGS=
2257 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2258 echo "configure:2259: checking whether ${CC-cc} accepts -g" >&5
2259
2260 echo 'void f(){}' > conftest.c
2261 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2262   ac_cv_prog_cc_g=yes
2263 else
2264   ac_cv_prog_cc_g=no
2265 fi
2266 rm -f conftest*
2267
2268
2269 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2270 if test "$ac_test_CFLAGS" = set; then
2271   CFLAGS="$ac_save_CFLAGS"
2272 elif test $ac_cv_prog_cc_g = yes; then
2273   if test "$GCC" = yes; then
2274     CFLAGS="-g -O2"
2275   else
2276     CFLAGS="-g"
2277   fi
2278 else
2279   if test "$GCC" = yes; then
2280     CFLAGS="-O2"
2281   else
2282     CFLAGS=
2283   fi
2284 fi
2285
2286 fi
2287 CFLAGS="$xe_save_CFLAGS"
2288
2289
2290 test -n "$CPP" -a -d "$CPP" && CPP=
2291
2292 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2293
2294 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2295 echo "configure:2296: checking how to run the C preprocessor" >&5
2296 # On Suns, sometimes $CPP names a directory.
2297 if test -n "$CPP" && test -d "$CPP"; then
2298   CPP=
2299 fi
2300 if test -z "$CPP"; then
2301
2302   # This must be in double quotes, not single quotes, because CPP may get
2303   # substituted into the Makefile and "${CC-cc}" will confuse make.
2304   CPP="${CC-cc} -E"
2305   # On the NeXT, cc -E runs the code through the compiler's parser,
2306   # not just through cpp.
2307   cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <assert.h>
2311 Syntax Error
2312 EOF
2313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2314 { (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2316 if test -z "$ac_err"; then
2317   :
2318 else
2319   echo "$ac_err" >&5
2320   echo "configure: failed program was:" >&5
2321   cat conftest.$ac_ext >&5
2322   rm -rf conftest*
2323   CPP="${CC-cc} -E -traditional-cpp"
2324   cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <assert.h>
2328 Syntax Error
2329 EOF
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334   :
2335 else
2336   echo "$ac_err" >&5
2337   echo "configure: failed program was:" >&5
2338   cat conftest.$ac_ext >&5
2339   rm -rf conftest*
2340   CPP="${CC-cc} -nologo -E"
2341   cat > conftest.$ac_ext <<EOF
2342 #line 2343 "configure"
2343 #include "confdefs.h"
2344 #include <assert.h>
2345 Syntax Error
2346 EOF
2347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2348 { (eval echo configure:2349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2350 if test -z "$ac_err"; then
2351   :
2352 else
2353   echo "$ac_err" >&5
2354   echo "configure: failed program was:" >&5
2355   cat conftest.$ac_ext >&5
2356   rm -rf conftest*
2357   CPP=/lib/cpp
2358 fi
2359 rm -f conftest*
2360 fi
2361 rm -f conftest*
2362 fi
2363 rm -f conftest*
2364   ac_cv_prog_CPP="$CPP"
2365   CPP="$ac_cv_prog_CPP"
2366 else
2367   ac_cv_prog_CPP="$CPP"
2368 fi
2369 echo "$ac_t""$CPP" 1>&6
2370
2371
2372
2373 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2374 echo "configure:2375: checking for AIX" >&5
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 #ifdef _AIX
2379   yes
2380 #endif
2381
2382 EOF
2383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2384   egrep "yes" >/dev/null 2>&1; then
2385   rm -rf conftest*
2386   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2387     Defining _ALL_SOURCE
2388 EOF
2389 cat >> confdefs.h <<\EOF
2390 #define _ALL_SOURCE 1
2391 EOF
2392 }
2393
2394 else
2395   rm -rf conftest*
2396   echo "$ac_t""no" 1>&6
2397 fi
2398 rm -f conftest*
2399
2400  
2401
2402 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2403 echo "configure:2404: checking for GNU libc" >&5
2404 cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407 #include <features.h>
2408 int main() {
2409
2410 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2411 #error Not a GNU libc system :-(
2412 ******* ======= ******** &&&&&&&&
2413 #endif
2414
2415 ; return 0; }
2416 EOF
2417 if { (eval echo configure:2418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2418   rm -rf conftest*
2419   have_glibc=yes
2420 else
2421   echo "configure: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   rm -rf conftest*
2424   have_glibc=no
2425 fi
2426 rm -f conftest*
2427 echo "$ac_t""$have_glibc" 1>&6
2428 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2429     Defining _GNU_SOURCE
2430 EOF
2431 cat >> confdefs.h <<\EOF
2432 #define _GNU_SOURCE 1
2433 EOF
2434 }
2435
2436
2437 case "$opsys" in
2438   sol2)
2439    { test "$extra_verbose" = "yes" && cat << \EOF
2440     Defining __EXTENSIONS__
2441 EOF
2442 cat >> confdefs.h <<\EOF
2443 #define __EXTENSIONS__ 1
2444 EOF
2445 }
2446
2447       if test "$os_release" -ge 55; then
2448      { test "$extra_verbose" = "yes" && cat << \EOF
2449     Defining _XOPEN_SOURCE = 500
2450 EOF
2451 cat >> confdefs.h <<\EOF
2452 #define _XOPEN_SOURCE 500
2453 EOF
2454 }
2455
2456      { test "$extra_verbose" = "yes" && cat << \EOF
2457     Defining _XOPEN_SOURCE_EXTENDED
2458 EOF
2459 cat >> confdefs.h <<\EOF
2460 #define _XOPEN_SOURCE_EXTENDED 1
2461 EOF
2462 }
2463
2464    fi ;;
2465   linux)
2466     { test "$extra_verbose" = "yes" && cat << \EOF
2467     Defining _POSIX_C_SOURCE = 199506L
2468 EOF
2469 cat >> confdefs.h <<\EOF
2470 #define _POSIX_C_SOURCE 199506L
2471 EOF
2472 }
2473
2474     { test "$extra_verbose" = "yes" && cat << \EOF
2475     Defining _XOPEN_SOURCE = 500
2476 EOF
2477 cat >> confdefs.h <<\EOF
2478 #define _XOPEN_SOURCE 500
2479 EOF
2480 }
2481
2482     { test "$extra_verbose" = "yes" && cat << \EOF
2483     Defining _XOPEN_SOURCE_EXTENDED
2484 EOF
2485 cat >> confdefs.h <<\EOF
2486 #define _XOPEN_SOURCE_EXTENDED 1
2487 EOF
2488 }
2489
2490     ;;
2491 esac
2492
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 int main () {
2497 #if defined __SUNPRO_C
2498 return 11;
2499 #elif defined __DECC
2500 return 12;
2501 #elif defined __USLC__ && defined __SCO_VERSION__
2502 return 13;
2503 #else
2504 return 0;
2505 #endif
2506 }
2507 EOF
2508 if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2509 then
2510   :
2511 else
2512   conftest_rc="$?"
2513   echo "configure: failed program was:" >&5
2514   cat conftest.$ac_ext >&5
2515   rm -fr conftest*
2516   case "$conftest_rc" in
2517   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2518   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2519   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2520 esac
2521 fi
2522 rm -fr conftest*
2523
2524
2525
2526
2527 echo "Extracting information from the machine- and system-dependent headers..."
2528
2529 tempcname="conftest.c"
2530
2531
2532
2533 cat > $tempcname < confdefs.h
2534 cat >> $tempcname <<EOF
2535 #define NOT_C_CODE
2536 #define C_SWITCH_SITE
2537 #define C_SWITCH_X_SITE
2538 #define LD_SWITCH_SITE
2539 #define LD_SWITCH_X_SITE
2540 #define LD_SWITCH_X_SITE_AUX
2541 #define OS_RELEASE $os_release
2542
2543 #ifdef config_opsysfile
2544 #include "$srcdir/src/$opsysfile"
2545 #endif
2546
2547 #ifdef config_machfile
2548 #include "$srcdir/src/$machfile"
2549 #endif
2550
2551 #ifndef LIBS_MACHINE
2552 #define LIBS_MACHINE
2553 #endif
2554 configure___ libs_machine=LIBS_MACHINE
2555
2556 #ifndef LIBS_SYSTEM
2557 #define LIBS_SYSTEM
2558 #endif
2559 configure___ libs_system=LIBS_SYSTEM
2560
2561 #ifndef LIBS_TERMCAP
2562 #define LIBS_TERMCAP
2563 #endif
2564 configure___ libs_termcap=LIBS_TERMCAP
2565
2566 #ifndef LIB_STANDARD
2567 #define LIB_STANDARD
2568 #endif
2569 configure___ libs_standard=LIB_STANDARD
2570
2571
2572 #ifndef OBJECTS_MACHINE
2573 #define OBJECTS_MACHINE
2574 #endif
2575 configure___ objects_machine=OBJECTS_MACHINE
2576
2577 #ifndef OBJECTS_SYSTEM
2578 #define OBJECTS_SYSTEM
2579 #endif
2580 configure___ objects_system=OBJECTS_SYSTEM
2581
2582
2583 #ifndef C_SWITCH_MACHINE
2584 #define C_SWITCH_MACHINE
2585 #endif
2586 configure___ c_switch_machine=C_SWITCH_MACHINE
2587
2588 #ifndef C_SWITCH_SYSTEM
2589 #define C_SWITCH_SYSTEM
2590 #endif
2591 configure___ c_switch_system=C_SWITCH_SYSTEM
2592
2593
2594 #ifndef LD_SWITCH_MACHINE
2595 #define LD_SWITCH_MACHINE
2596 #endif
2597 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2598
2599 #ifndef LD_SWITCH_SYSTEM
2600 #define LD_SWITCH_SYSTEM
2601 #endif
2602 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2603
2604
2605 #ifndef UNEXEC
2606 #define UNEXEC "unexec.o"
2607 #endif
2608 configure___ unexec=UNEXEC
2609
2610
2611 #ifndef LD_SWITCH_SHARED
2612 #define LD_SWITCH_SHARED "-c"
2613 #endif
2614 configure___ ld_switch_shared=LD_SWITCH_SHARED
2615
2616
2617 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2618 configure___ ordinary_ld=ORDINARY_LD
2619
2620 #ifdef ORDINARY_LINK
2621 #define LD ORDINARY_LD
2622 #else /* no ORDINARY LINK */
2623 #ifdef COFF_ENCAPSULATE
2624 #define LD "\$(CC) -nostdlib"
2625 #else /* not COFF_ENCAPSULATE */
2626 #ifdef LINKER
2627 #define LD LINKER
2628 #else /* ! defined (LINKER) */
2629 #define LD "ld"
2630 #endif /* ! defined (LINKER) */
2631 #endif /* ! defined (COFF_ENCAPSULATE) */
2632 #endif /* not ORDINARY_LINK */
2633 configure___ ld=LD
2634
2635 #ifndef LIB_GCC
2636 #define LIB_GCC
2637 #endif
2638 configure___ lib_gcc=LIB_GCC
2639
2640 #ifndef LD_TEXT_START_ADDR
2641 #define LD_TEXT_START_ADDR
2642 #endif
2643 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2644
2645
2646 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2647 #ifdef NO_REMAP
2648 #ifdef COFF_ENCAPSULATE
2649 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2650 #else /* ! defined (COFF_ENCAPSULATE) */
2651 #define START_FILES "pre-crt0.o /lib/crt0.o"
2652 #endif /* ! defined (COFF_ENCAPSULATE) */
2653 #else /* ! defined (NO_REMAP) */
2654 #define START_FILES "ecrt0.o"
2655 #endif /* ! defined (NO_REMAP) */
2656 #endif /* no ORDINARY_LINK */
2657 #ifndef START_FILES
2658 #define START_FILES
2659 #endif
2660 configure___ start_files=START_FILES
2661
2662 #ifdef ORDINARY_LINK
2663 configure___ ordinary_link=yes
2664 #else
2665 configure___ ordinary_link=no
2666 #endif
2667
2668 #ifdef SYSTEM_MALLOC
2669 configure___ system_malloc=yes
2670 #else
2671 configure___ system_malloc=no
2672 #endif
2673
2674 #ifdef TERMINFO
2675 configure___ have_terminfo=yes
2676 #else
2677 configure___ have_terminfo=no
2678 #endif
2679
2680 #ifdef MAIL_USE_FLOCK
2681 configure___ mail_use_flock=yes
2682 #else
2683 configure___ mail_use_flock=no
2684 #endif
2685
2686 #ifdef MAIL_USE_LOCKF
2687 configure___ mail_use_lockf=yes
2688 #else
2689 configure___ mail_use_lockf=no
2690 #endif
2691
2692 #ifdef MAIL_USE_LOCKING
2693 configure___ mail_use_locking=yes
2694 #else
2695 configure___ mail_use_locking=no
2696 #endif
2697
2698 #ifdef HAVE_WIN32_PROCESSES
2699 configure___ win32_processes=yes
2700 #else
2701 configure___ win32_processes=no
2702 #endif
2703
2704 EOF
2705
2706 CPP=`eval "echo $CPP $CPPFLAGS"`
2707 eval `$CPP -Isrc $tempcname \
2708         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2709
2710 rm $tempcname
2711
2712 if test "$pdump" = "yes"; then
2713   ordinary_link="yes"
2714   ld="${ordinary_ld}"
2715   start_files=
2716   libs_standard=
2717   unexec=
2718   lib_gcc=
2719 fi
2720
2721 test "$extra_verbose" = "yes" && \
2722   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 ""
2723
2724 case "$opsys" in mingw* | cygwin*)
2725   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2726   cygwin_include=`eval "dirname $cygwin_include"` ;
2727   cygwin_include="-I$cygwin_include/../include" ;
2728   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2729   case "$opsys" in mingw*)
2730     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2731   esac
2732   ;;
2733 esac
2734
2735 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2736
2737
2738 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2739
2740 if test "$__USLC__" = yes; then
2741   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2742 echo "configure:2743: checking for whether the -Kalloca compiler flag is needed" >&5
2743   need_kalloca=no
2744   cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747
2748 int main() {
2749 void *x = alloca(4);
2750 ; return 0; }
2751 EOF
2752 if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2753   rm -rf conftest*
2754   :
2755 else
2756   echo "configure: failed program was:" >&5
2757   cat conftest.$ac_ext >&5
2758   rm -rf conftest*
2759   
2760     xe_save_c_switch_system="$c_switch_system"
2761     c_switch_system="$c_switch_system -Kalloca"
2762     cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765
2766 int main() {
2767 void *x = alloca(4);
2768 ; return 0; }
2769 EOF
2770 if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2771   rm -rf conftest*
2772    need_kalloca=yes 
2773 else
2774   echo "configure: failed program was:" >&5
2775   cat conftest.$ac_ext >&5
2776 fi
2777 rm -f conftest*
2778     c_switch_system="$xe_save_c_switch_system"
2779 fi
2780 rm -f conftest*
2781   echo "$ac_t""$need_kalloca" 1>&6
2782   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
2783 fi
2784
2785 if test "$cflags_specified" = "no"; then
2786       if   test "$GCC" = "yes"; then
2787     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2788         CFLAGS="$CFLAGS -Wsign-compare"
2789         case "`gcc -v --help 2>&1`" in
2790       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2791     esac
2792                 if test "$xemacs_compiler" != "g++"; then
2793       CFLAGS="$CFLAGS -Wshadow"
2794     fi
2795             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2796               elif test "$__SUNPRO_C" = "yes"; then
2797     case "$opsys" in
2798       sol2    ) CFLAGS="-v -xO4" ;;
2799       sunos4* ) CFLAGS="-xO2";;
2800     esac
2801   elif test "$__DECC" = "yes"; then
2802     CFLAGS="-O3"
2803   elif test "$CC" = "xlc"; then
2804     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2805     else
2806     CFLAGS="-O" ;  fi
2807 fi
2808
2809 if test "$GCC" = "yes"; then
2810 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2811 echo "configure:2812: checking for buggy gcc versions" >&5
2812 GCC_VERSION=`$CC --version`
2813 case `uname -s`:`uname -m`:$GCC_VERSION in
2814                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2815                         case "$CFLAGS" in
2816             *-O2*|*-O3*)
2817                 case "$CFLAGS" in
2818                     *-fno-schedule-insns*) ;;
2819                     *)
2820                         echo "$ac_t""yes" 1>&6
2821                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2822                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2823                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2824                         ;;
2825                 esac
2826                 ;;
2827         esac
2828         ;;
2829                     Linux:alpha:egcs-2.91.*)
2830         echo "$ac_t""yes" 1>&6
2831         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2832         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2833         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2834         ;;
2835     *:i*86*:2.7.2*)
2836         case "$CFLAGS" in
2837             *-O2*|*-O3*)
2838                 case "$GCC_VERSION" in
2839                     2.7.2)
2840                         case "$CFLAGS" in
2841                             *-fno-strength-reduce*) ;;
2842                             *)
2843                                 echo "$ac_t""yes" 1>&6
2844                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2845                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2846                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2847                                 ;;
2848                         esac
2849                         ;;
2850                 esac
2851                 case "$CFLAGS" in
2852                  *-fno-caller-saves*) ;;
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-caller-saves." 1>&2
2857                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2858                     ;;
2859                 esac
2860                 ;;
2861         esac
2862         ;;
2863 esac
2864 echo "$ac_t""no" 1>&6
2865 fi
2866
2867 if test "$pdump" != "yes"; then
2868   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2869 echo "configure:2870: checking for \"-z nocombreloc\" linker flag" >&5
2870   case "`ld --help 2>&1`" in
2871     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2872       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2873     *) echo "$ac_t""no" 1>&6 ;;
2874   esac
2875 fi
2876
2877
2878
2879 if test "$GCC" = "yes"; then
2880   set x $ld_switch_system; shift; ld_switch_system=""
2881   while test -n "$1"; do
2882     case $1 in
2883       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2884       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2885       -Xlinker* ) ;;
2886       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2887     esac
2888     shift
2889   done
2890 fi
2891
2892 if test "$GCC" = "yes"; then
2893   set x $ld_switch_machine; shift; ld_switch_machine=""
2894   while test -n "$1"; do
2895     case $1 in
2896       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2897       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2898       -Xlinker* ) ;;
2899       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2900     esac
2901     shift
2902   done
2903 fi
2904
2905 if test "$GCC" = "yes"; then
2906   set x $ld_switch_site; shift; ld_switch_site=""
2907   while test -n "$1"; do
2908     case $1 in
2909       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2910       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2911       -Xlinker* ) ;;
2912       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2913     esac
2914     shift
2915   done
2916 fi
2917
2918 if test "$GCC" = "yes"; then
2919   set x $LDFLAGS; shift; LDFLAGS=""
2920   while test -n "$1"; do
2921     case $1 in
2922       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2923       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2924       -Xlinker* ) ;;
2925       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2926     esac
2927     shift
2928   done
2929 fi
2930
2931 if test "$GCC" = "yes"; then
2932   set x $ld_call_shared; shift; ld_call_shared=""
2933   while test -n "$1"; do
2934     case $1 in
2935       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2936       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2937       -Xlinker* ) ;;
2938       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2939     esac
2940     shift
2941   done
2942 fi
2943
2944 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2945    echo "    xemacs will be linked with \"$objects_machine\""
2946  fi
2947 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2948    echo "    xemacs will be linked with \"$objects_system\""
2949  fi
2950 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2951    echo "    xemacs will be linked with \"$unexec\""
2952  fi
2953 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2954    echo "    xemacs will be linked with \"dumper.o\""
2955  fi
2956
2957 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2958 echo "configure:2959: checking for dynodump" >&5
2959 if test "$unexec" != "unexsol2.o"; then
2960   echo "$ac_t""no" 1>&6
2961 else
2962   echo "$ac_t""yes" 1>&6
2963   { test "$extra_verbose" = "yes" && cat << \EOF
2964     Defining DYNODUMP
2965 EOF
2966 cat >> confdefs.h <<\EOF
2967 #define DYNODUMP 1
2968 EOF
2969 }
2970
2971   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2972   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2973   case "$machine" in
2974     sparc   ) dynodump_arch=sparc ;;
2975     *86*    ) dynodump_arch=i386  ;;
2976     powerpc ) dynodump_arch=ppc   ;;
2977   esac
2978     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
2979 fi
2980
2981
2982 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2983
2984 if test "$unexec" = "unexaix.o"; then
2985   if   test "$dynamic" = "no"; then
2986   start_flags="-Wl,-bnso,-bnodelcsect"
2987   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2988   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2989     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2990   done
2991   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2992     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2993   done
2994   
2995 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2996 echo "configure:2997: checking for terminateAndUnload in -lC" >&5
2997 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2998
2999 xe_check_libs=" -lC "
3000 cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003 /* Override any gcc2 internal prototype to avoid an error.  */
3004 /* We use char because int might match the return type of a gcc2
3005     builtin and then its argument prototype would still apply.  */
3006 char terminateAndUnload();
3007
3008 int main() {
3009 terminateAndUnload()
3010 ; return 0; }
3011 EOF
3012 if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3013   rm -rf conftest*
3014   eval "ac_cv_lib_$ac_lib_var=yes"
3015 else
3016   echo "configure: failed program was:" >&5
3017   cat conftest.$ac_ext >&5
3018   rm -rf conftest*
3019   eval "ac_cv_lib_$ac_lib_var=no"
3020 fi
3021 rm -f conftest*
3022 xe_check_libs=""
3023
3024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3025   echo "$ac_t""yes" 1>&6
3026   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3027 else
3028   echo "$ac_t""no" 1>&6
3029 fi
3030
3031
3032   fi
3033 elif test -n "$ld_text_start_addr"; then
3034   start_flags="-T $ld_text_start_addr -e __start"
3035 fi
3036
3037
3038
3039
3040 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3041  test -z "$linker" &&  linker='$(CC) -nostdlib'
3042  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3043 fi
3044 test "$GCC" != "yes" && lib_gcc=
3045
3046
3047
3048
3049
3050 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3051 if test -n "$site_libraries"; then
3052   for arg in $site_libraries; do
3053     case "$arg" in
3054      -* ) ;;
3055      * ) test -d "$arg" || \
3056            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3057        arg="-L${arg}" ;;
3058     esac
3059     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3060   done
3061 fi
3062
3063 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3064 if test -n "$site_includes"; then
3065   for arg in $site_includes; do
3066     case "$arg" in
3067       -* ) ;;
3068       * ) test -d "$arg" || \
3069            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3070       arg="-I${arg}" ;;
3071     esac
3072     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3073   done
3074 fi
3075
3076 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3077 if test -n "$site_prefixes"; then
3078   for dir in $site_prefixes; do
3079     lib_dir="${dir}/lib"
3080     inc_dir="${dir}/include"
3081     if test ! -d "$dir"; then
3082       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3083     elif test ! -d "$lib_dir"; then
3084       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3085     else
3086       if test -d "$inc_dir"; then
3087         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
3088       fi
3089       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
3090     fi
3091   done
3092 fi
3093
3094
3095 for dir in "/usr/ccs/lib"; do
3096   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
3097 done
3098
3099 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3100 if test -n "$site_runtime_libraries"; then
3101   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3102   export LD_RUN_PATH
3103 fi
3104
3105
3106
3107
3108
3109 if test -n "$add_runtime_path"; then :;
3110 elif test "$dynamic" = "no"; then add_runtime_path=no
3111 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3112 else case "$opsys" in
3113        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3114        * ) add_runtime_path=no ;;
3115      esac
3116 fi
3117
3118 if test "$add_runtime_path" = "yes"; then
3119       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3120 echo "configure:3121: checking "for runtime libraries flag"" >&5
3121   case "$opsys" in
3122     sol2 ) dash_r="-R" ;;
3123     decosf* | linux* | irix*) dash_r="-rpath " ;;
3124     *)
3125       dash_r=""
3126       for try_dash_r in "-R" "-R " "-rpath "; do
3127         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3128         
3129 if test "$GCC" = "yes"; then
3130   set x $xe_check_libs; shift; xe_check_libs=""
3131   while test -n "$1"; do
3132     case $1 in
3133       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3134       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3135       -Xlinker* ) ;;
3136       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3137     esac
3138     shift
3139   done
3140 fi
3141         cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144
3145 int main() {
3146
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150   rm -rf conftest*
3151   dash_r="$try_dash_r"
3152 else
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155 fi
3156 rm -f conftest*
3157         xe_check_libs=""
3158         test -n "$dash_r" && break
3159       done ;;
3160   esac
3161   if test -n "$dash_r";
3162     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3163     else echo "$ac_t""NONE" 1>&6
3164   fi
3165 fi
3166
3167 xe_add_unique_runpath_dir='
3168   xe_add_p=yes
3169   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3170   done
3171   if test "$xe_add_p" = "yes"; then
3172     test -n "$runpath" && runpath="${runpath}:"
3173     runpath="${runpath}${xe_runpath_dir}"
3174     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3175   fi'
3176
3177
3178
3179
3180 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3181     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3182   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3183   
3184         runpath="" runpath_dirs=""
3185   if test -n "$LD_RUN_PATH"; then
3186     runpath="$LD_RUN_PATH"
3187   elif test "$GCC" = "yes"; then
3188         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3189     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3190     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3191     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3192       case "$arg" in P,* | -L* | -R* )
3193         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3194           {
3195 xe_runpath_dir="$dir"
3196   test "$xe_runpath_dir" != "/lib"     -a \
3197         "$xe_runpath_dir" != "/usr/lib" -a \
3198         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3199   eval "$xe_add_unique_runpath_dir"
3200 }
3201         done ;;
3202       esac
3203     done
3204     ld_switch_run="$ld_switch_run_save"
3205     rm -f conftest*
3206   else
3207         for arg in $ld_switch_site $ld_switch_x_site; do
3208       case "$arg" in -L*) {
3209 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3210   test "$xe_runpath_dir" != "/lib"     -a \
3211         "$xe_runpath_dir" != "/usr/lib" -a \
3212         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3213   eval "$xe_add_unique_runpath_dir"
3214 };; esac
3215     done
3216         if test "$opsys $need_motif" = "sol2 yes"; then
3217       xe_runpath_dir="/opt/SUNWdt/lib";
3218       eval "$xe_add_unique_runpath_dir";
3219     fi
3220   fi 
3221   if test -n "$runpath"; then
3222     ld_switch_run="${dash_r}${runpath}"
3223     
3224 if test "$GCC" = "yes"; then
3225   set x $ld_switch_run; shift; ld_switch_run=""
3226   while test -n "$1"; do
3227     case $1 in
3228       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3229       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3230       -Xlinker* ) ;;
3231       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3232     esac
3233     shift
3234   done
3235 fi
3236     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3237   fi
3238 fi
3239
3240
3241
3242 GNU_MALLOC=yes
3243 if test "$with_dlmalloc" != "no"; then
3244         doug_lea_malloc=yes
3245 else
3246         doug_lea_malloc=no
3247 fi
3248 after_morecore_hook_exists=yes
3249 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3250 echo "configure:3251: checking for malloc_set_state" >&5
3251
3252 cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 /* System header to define __stub macros and hopefully few prototypes,
3256     which can conflict with char malloc_set_state(); below.  */
3257 #include <assert.h>
3258 /* Override any gcc2 internal prototype to avoid an error.  */
3259 /* We use char because int might match the return type of a gcc2
3260     builtin and then its argument prototype would still apply.  */
3261 char malloc_set_state();
3262
3263 int main() {
3264
3265 /* The GNU C library defines this for functions which it implements
3266     to always fail with ENOSYS.  Some functions are actually named
3267     something starting with __ and the normal name is an alias.  */
3268 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3269 choke me
3270 #else
3271 malloc_set_state();
3272 #endif
3273
3274 ; return 0; }
3275 EOF
3276 if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3277   rm -rf conftest*
3278   eval "ac_cv_func_malloc_set_state=yes"
3279 else
3280   echo "configure: failed program was:" >&5
3281   cat conftest.$ac_ext >&5
3282   rm -rf conftest*
3283   eval "ac_cv_func_malloc_set_state=no"
3284 fi
3285 rm -f conftest*
3286
3287 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3288   echo "$ac_t""yes" 1>&6
3289   :
3290 else
3291   echo "$ac_t""no" 1>&6
3292 doug_lea_malloc=no
3293 fi
3294
3295 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3296 echo "configure:3297: checking whether __after_morecore_hook exists" >&5
3297 cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 extern void (* __after_morecore_hook)();
3301 int main() {
3302 __after_morecore_hook = 0
3303 ; return 0; }
3304 EOF
3305 if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3306   rm -rf conftest*
3307   echo "$ac_t""yes" 1>&6
3308 else
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   rm -rf conftest*
3312   echo "$ac_t""no" 1>&6
3313    after_morecore_hook_exists=no
3314 fi
3315 rm -f conftest*
3316 if test "$system_malloc" = "yes" ; then
3317   GNU_MALLOC=no
3318   GNU_MALLOC_reason="
3319     - The GNU allocators don't work with this system configuration."
3320 elif test "$with_system_malloc" = "yes" ; then
3321   GNU_MALLOC=no
3322   GNU_MALLOC_reason="
3323     - User chose not to use GNU allocators."
3324 elif test "$with_debug_malloc" = "yes" ; then
3325   GNU_MALLOC=no
3326   GNU_MALLOC_reason="
3327     - User chose to use Debugging Malloc."
3328 fi
3329
3330 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3331   GNU_MALLOC_reason="
3332     - Using Doug Lea's new malloc from the GNU C Library."
3333   { test "$extra_verbose" = "yes" && cat << \EOF
3334     Defining DOUG_LEA_MALLOC
3335 EOF
3336 cat >> confdefs.h <<\EOF
3337 #define DOUG_LEA_MALLOC 1
3338 EOF
3339 }
3340
3341   if test "$after_morecore_hook_exists" = "no" ; then
3342     GNU_MALLOC_reason="
3343     - Using Doug Lea's new malloc from the Linux C Library."
3344     { test "$extra_verbose" = "yes" && cat << \EOF
3345     Defining _NO_MALLOC_WARNING_
3346 EOF
3347 cat >> confdefs.h <<\EOF
3348 #define _NO_MALLOC_WARNING_ 1
3349 EOF
3350 }
3351
3352   fi
3353 fi
3354
3355
3356
3357
3358 # Extract the first word of "ranlib", so it can be a program name with args.
3359 set dummy ranlib; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362
3363 if test -n "$RANLIB"; then
3364   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3365 else
3366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3367   ac_dummy="$PATH"
3368   for ac_dir in $ac_dummy; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f $ac_dir/$ac_word; then
3371       ac_cv_prog_RANLIB="ranlib"
3372       break
3373     fi
3374   done
3375   IFS="$ac_save_ifs"
3376   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3377 fi
3378 RANLIB="$ac_cv_prog_RANLIB"
3379 if test -n "$RANLIB"; then
3380   echo "$ac_t""$RANLIB" 1>&6
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384
3385 ac_aux_dir=
3386 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3387   if test -f $ac_dir/install-sh; then
3388     ac_aux_dir=$ac_dir
3389     ac_install_sh="$ac_aux_dir/install-sh -c"
3390     break
3391   elif test -f $ac_dir/install.sh; then
3392     ac_aux_dir=$ac_dir
3393     ac_install_sh="$ac_aux_dir/install.sh -c"
3394     break
3395   fi
3396 done
3397 if test -z "$ac_aux_dir"; then
3398   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3399 fi
3400 ac_config_guess=$ac_aux_dir/config.guess
3401 ac_config_sub=$ac_aux_dir/config.sub
3402 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3403
3404 # Find a good install program.  We prefer a C program (faster),
3405 # so one script is as good as another.  But avoid the broken or
3406 # incompatible versions:
3407 # SysV /etc/install, /usr/sbin/install
3408 # SunOS /usr/etc/install
3409 # IRIX /sbin/install
3410 # AIX /bin/install
3411 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3412 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3413 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3414 # ./install, which can be erroneously created by make from ./install.sh.
3415 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3416 echo "configure:3417: checking for a BSD compatible install" >&5
3417 if test -z "$INSTALL"; then
3418
3419   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3420   for ac_dir in $PATH; do
3421     # Account for people who put trailing slashes in PATH elements.
3422     case "$ac_dir/" in
3423     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3424     *)
3425       # OSF1 and SCO ODT 3.0 have their own names for install.
3426       # Don't use installbsd from OSF since it installs stuff as root
3427       # by default.
3428       for ac_prog in ginstall scoinst install; do
3429         if test -f $ac_dir/$ac_prog; then
3430           if test $ac_prog = install &&
3431             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3432             # AIX install.  It has an incompatible calling convention.
3433             :
3434           else
3435             ac_cv_path_install="$ac_dir/$ac_prog -c"
3436             break 2
3437           fi
3438         fi
3439       done
3440       ;;
3441     esac
3442   done
3443   IFS="$ac_save_IFS"
3444
3445   if test "${ac_cv_path_install+set}" = set; then
3446     INSTALL="$ac_cv_path_install"
3447   else
3448     # As a last resort, use the slow shell script.  We don't cache a
3449     # path for INSTALL within a source directory, because that will
3450     # break other packages using the cache if that directory is
3451     # removed, or if the path is relative.
3452     INSTALL="$ac_install_sh"
3453   fi
3454 fi
3455 echo "$ac_t""$INSTALL" 1>&6
3456
3457 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3458 # It thinks the first close brace ends the variable substitution.
3459 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3460
3461 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3462
3463 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3464
3465 for ac_prog in 'bison -y' byacc
3466 do
3467 # Extract the first word of "$ac_prog", so it can be a program name with args.
3468 set dummy $ac_prog; ac_word=$2
3469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3470 echo "configure:3471: checking for $ac_word" >&5
3471
3472 if test -n "$YACC"; then
3473   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3474 else
3475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3476   ac_dummy="$PATH"
3477   for ac_dir in $ac_dummy; do
3478     test -z "$ac_dir" && ac_dir=.
3479     if test -f $ac_dir/$ac_word; then
3480       ac_cv_prog_YACC="$ac_prog"
3481       break
3482     fi
3483   done
3484   IFS="$ac_save_ifs"
3485 fi
3486 YACC="$ac_cv_prog_YACC"
3487 if test -n "$YACC"; then
3488   echo "$ac_t""$YACC" 1>&6
3489 else
3490   echo "$ac_t""no" 1>&6
3491 fi
3492
3493 test -n "$YACC" && break
3494 done
3495 test -n "$YACC" || YACC="yacc"
3496
3497
3498 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 
3499 do
3500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3502 echo "configure:3503: checking for $ac_hdr" >&5
3503
3504 cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507 #include <$ac_hdr>
3508 EOF
3509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3510 { (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3512 if test -z "$ac_err"; then
3513   rm -rf conftest*
3514   eval "ac_cv_header_$ac_safe=yes"
3515 else
3516   echo "$ac_err" >&5
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   eval "ac_cv_header_$ac_safe=no"
3521 fi
3522 rm -f conftest*
3523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3524   echo "$ac_t""yes" 1>&6
3525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3526   { test "$extra_verbose" = "yes" && cat << EOF
3527     Defining $ac_tr_hdr
3528 EOF
3529 cat >> confdefs.h <<EOF
3530 #define $ac_tr_hdr 1
3531 EOF
3532 }
3533  
3534 else
3535   echo "$ac_t""no" 1>&6
3536 fi
3537 done
3538
3539 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3540 echo "configure:3541: checking for sys/wait.h that is POSIX.1 compatible" >&5
3541
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 #include <sys/types.h>
3546 #include <sys/wait.h>
3547 #ifndef WEXITSTATUS
3548 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3549 #endif
3550 #ifndef WIFEXITED
3551 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3552 #endif
3553 int main() {
3554 int s;
3555 wait (&s);
3556 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3557 ; return 0; }
3558 EOF
3559 if { (eval echo configure:3560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3560   rm -rf conftest*
3561   ac_cv_header_sys_wait_h=yes
3562 else
3563   echo "configure: failed program was:" >&5
3564   cat conftest.$ac_ext >&5
3565   rm -rf conftest*
3566   ac_cv_header_sys_wait_h=no
3567 fi
3568 rm -f conftest*
3569
3570 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3571 if test $ac_cv_header_sys_wait_h = yes; then
3572   { test "$extra_verbose" = "yes" && cat << \EOF
3573     Defining HAVE_SYS_WAIT_H
3574 EOF
3575 cat >> confdefs.h <<\EOF
3576 #define HAVE_SYS_WAIT_H 1
3577 EOF
3578 }
3579
3580 fi
3581
3582 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3583 echo "configure:3584: checking for ANSI C header files" >&5
3584
3585 cat > conftest.$ac_ext <<EOF
3586 #line 3587 "configure"
3587 #include "confdefs.h"
3588 #include <stdlib.h>
3589 #include <stdarg.h>
3590 #include <string.h>
3591 #include <float.h>
3592 EOF
3593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3594 { (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3596 if test -z "$ac_err"; then
3597   rm -rf conftest*
3598   ac_cv_header_stdc=yes
3599 else
3600   echo "$ac_err" >&5
3601   echo "configure: failed program was:" >&5
3602   cat conftest.$ac_ext >&5
3603   rm -rf conftest*
3604   ac_cv_header_stdc=no
3605 fi
3606 rm -f conftest*
3607
3608 if test $ac_cv_header_stdc = yes; then
3609   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 #include <string.h>
3614 EOF
3615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3616   egrep "memchr" >/dev/null 2>&1; then
3617   :
3618 else
3619   rm -rf conftest*
3620   ac_cv_header_stdc=no
3621 fi
3622 rm -f conftest*
3623
3624 fi
3625
3626 if test $ac_cv_header_stdc = yes; then
3627   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3628 cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631 #include <stdlib.h>
3632 EOF
3633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3634   egrep "free" >/dev/null 2>&1; then
3635   :
3636 else
3637   rm -rf conftest*
3638   ac_cv_header_stdc=no
3639 fi
3640 rm -f conftest*
3641
3642 fi
3643
3644 if test $ac_cv_header_stdc = yes; then
3645   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3646 cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include <ctype.h>
3650 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3651 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3652 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3653 int main () { int i; for (i = 0; i < 256; i++)
3654 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3655 exit (0); }
3656
3657 EOF
3658 if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3659 then
3660   :
3661 else
3662   conftest_rc="$?"
3663   echo "configure: failed program was:" >&5
3664   cat conftest.$ac_ext >&5
3665   rm -fr conftest*
3666   ac_cv_header_stdc=no
3667 fi
3668 rm -fr conftest*
3669 fi
3670
3671 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3672 if test $ac_cv_header_stdc = yes; then
3673   { test "$extra_verbose" = "yes" && cat << \EOF
3674     Defining STDC_HEADERS
3675 EOF
3676 cat >> confdefs.h <<\EOF
3677 #define STDC_HEADERS 1
3678 EOF
3679 }
3680
3681 fi
3682
3683 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3684 echo "configure:3685: checking whether time.h and sys/time.h may both be included" >&5
3685
3686 cat > conftest.$ac_ext <<EOF
3687 #line 3688 "configure"
3688 #include "confdefs.h"
3689 #include <sys/types.h>
3690 #include <sys/time.h>
3691 #include <time.h>
3692 int main() {
3693 struct tm *tp;
3694 ; return 0; }
3695 EOF
3696 if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3697   rm -rf conftest*
3698   ac_cv_header_time=yes
3699 else
3700   echo "configure: failed program was:" >&5
3701   cat conftest.$ac_ext >&5
3702   rm -rf conftest*
3703   ac_cv_header_time=no
3704 fi
3705 rm -f conftest*
3706
3707 echo "$ac_t""$ac_cv_header_time" 1>&6
3708 if test $ac_cv_header_time = yes; then
3709   { test "$extra_verbose" = "yes" && cat << \EOF
3710     Defining TIME_WITH_SYS_TIME
3711 EOF
3712 cat >> confdefs.h <<\EOF
3713 #define TIME_WITH_SYS_TIME 1
3714 EOF
3715 }
3716
3717 fi
3718
3719 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3720 echo "configure:3721: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3721
3722 cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3725 #include <sys/types.h>
3726 #include <signal.h>
3727 /* NetBSD declares sys_siglist in unistd.h.  */
3728 #ifdef HAVE_UNISTD_H
3729 #include <unistd.h>
3730 #endif
3731 int main() {
3732 char *msg = *(sys_siglist + 1);
3733 ; return 0; }
3734 EOF
3735 if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3736   rm -rf conftest*
3737   ac_cv_decl_sys_siglist=yes
3738 else
3739   echo "configure: failed program was:" >&5
3740   cat conftest.$ac_ext >&5
3741   rm -rf conftest*
3742   ac_cv_decl_sys_siglist=no
3743 fi
3744 rm -f conftest*
3745
3746 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3747 if test $ac_cv_decl_sys_siglist = yes; then
3748   { test "$extra_verbose" = "yes" && cat << \EOF
3749     Defining SYS_SIGLIST_DECLARED
3750 EOF
3751 cat >> confdefs.h <<\EOF
3752 #define SYS_SIGLIST_DECLARED 1
3753 EOF
3754 }
3755
3756 fi
3757
3758
3759
3760 echo $ac_n "checking for utime""... $ac_c" 1>&6
3761 echo "configure:3762: checking for utime" >&5
3762 cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <sys/types.h>
3766 #include <utime.h>
3767 int main() {
3768 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3769 ; return 0; }
3770 EOF
3771 if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3772   rm -rf conftest*
3773   echo "$ac_t""yes" 1>&6
3774    { test "$extra_verbose" = "yes" && cat << \EOF
3775     Defining HAVE_UTIME
3776 EOF
3777 cat >> confdefs.h <<\EOF
3778 #define HAVE_UTIME 1
3779 EOF
3780 }
3781
3782 else
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   echo "$ac_t""no" 1>&6
3787       for ac_func in utimes
3788 do
3789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3790 echo "configure:3791: checking for $ac_func" >&5
3791
3792 cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 /* System header to define __stub macros and hopefully few prototypes,
3796     which can conflict with char $ac_func(); below.  */
3797 #include <assert.h>
3798 /* Override any gcc2 internal prototype to avoid an error.  */
3799 /* We use char because int might match the return type of a gcc2
3800     builtin and then its argument prototype would still apply.  */
3801 char $ac_func();
3802
3803 int main() {
3804
3805 /* The GNU C library defines this for functions which it implements
3806     to always fail with ENOSYS.  Some functions are actually named
3807     something starting with __ and the normal name is an alias.  */
3808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3809 choke me
3810 #else
3811 $ac_func();
3812 #endif
3813
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3817   rm -rf conftest*
3818   eval "ac_cv_func_$ac_func=yes"
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   eval "ac_cv_func_$ac_func=no"
3824 fi
3825 rm -f conftest*
3826
3827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3828   echo "$ac_t""yes" 1>&6
3829     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3830   { test "$extra_verbose" = "yes" && cat << EOF
3831     Defining $ac_tr_func
3832 EOF
3833 cat >> confdefs.h <<EOF
3834 #define $ac_tr_func 1
3835 EOF
3836 }
3837  
3838 else
3839   echo "$ac_t""no" 1>&6
3840 fi
3841 done
3842
3843 fi
3844 rm -f conftest*
3845
3846
3847 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3848 echo "configure:3849: checking return type of signal handlers" >&5
3849
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 #include <sys/types.h>
3854 #include <signal.h>
3855 #ifdef signal
3856 #undef signal
3857 #endif
3858 #ifdef __cplusplus
3859 extern "C" void (*signal (int, void (*)(int)))(int);
3860 #else
3861 void (*signal ()) ();
3862 #endif
3863
3864 int main() {
3865 int i;
3866 ; return 0; }
3867 EOF
3868 if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3869   rm -rf conftest*
3870   ac_cv_type_signal=void
3871 else
3872   echo "configure: failed program was:" >&5
3873   cat conftest.$ac_ext >&5
3874   rm -rf conftest*
3875   ac_cv_type_signal=int
3876 fi
3877 rm -f conftest*
3878
3879 echo "$ac_t""$ac_cv_type_signal" 1>&6
3880 { test "$extra_verbose" = "yes" && cat << EOF
3881     Defining RETSIGTYPE = $ac_cv_type_signal
3882 EOF
3883 cat >> confdefs.h <<EOF
3884 #define RETSIGTYPE $ac_cv_type_signal
3885 EOF
3886 }
3887
3888
3889 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3890 echo "configure:3891: checking for size_t" >&5
3891
3892 cat > conftest.$ac_ext <<EOF
3893 #line 3894 "configure"
3894 #include "confdefs.h"
3895 #include <sys/types.h>
3896 #if STDC_HEADERS
3897 #include <stdlib.h>
3898 #include <stddef.h>
3899 #endif
3900 EOF
3901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3902   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3903   rm -rf conftest*
3904   ac_cv_type_size_t=yes
3905 else
3906   rm -rf conftest*
3907   ac_cv_type_size_t=no
3908 fi
3909 rm -f conftest*
3910
3911 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3912 if test $ac_cv_type_size_t = no; then
3913   { test "$extra_verbose" = "yes" && cat << \EOF
3914     Defining size_t = unsigned
3915 EOF
3916 cat >> confdefs.h <<\EOF
3917 #define size_t unsigned
3918 EOF
3919 }
3920
3921 fi
3922
3923 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3924 echo "configure:3925: checking for pid_t" >&5
3925
3926 cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <sys/types.h>
3930 #if STDC_HEADERS
3931 #include <stdlib.h>
3932 #include <stddef.h>
3933 #endif
3934 EOF
3935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3936   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3937   rm -rf conftest*
3938   ac_cv_type_pid_t=yes
3939 else
3940   rm -rf conftest*
3941   ac_cv_type_pid_t=no
3942 fi
3943 rm -f conftest*
3944
3945 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3946 if test $ac_cv_type_pid_t = no; then
3947   { test "$extra_verbose" = "yes" && cat << \EOF
3948     Defining pid_t = int
3949 EOF
3950 cat >> confdefs.h <<\EOF
3951 #define pid_t int
3952 EOF
3953 }
3954
3955 fi
3956
3957 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3958 echo "configure:3959: checking for uid_t in sys/types.h" >&5
3959
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 #include <sys/types.h>
3964 EOF
3965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3966   egrep "uid_t" >/dev/null 2>&1; then
3967   rm -rf conftest*
3968   ac_cv_type_uid_t=yes
3969 else
3970   rm -rf conftest*
3971   ac_cv_type_uid_t=no
3972 fi
3973 rm -f conftest*
3974
3975
3976 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3977 if test $ac_cv_type_uid_t = no; then
3978   { test "$extra_verbose" = "yes" && cat << \EOF
3979     Defining uid_t = int
3980 EOF
3981 cat >> confdefs.h <<\EOF
3982 #define uid_t int
3983 EOF
3984 }
3985
3986   { test "$extra_verbose" = "yes" && cat << \EOF
3987     Defining gid_t = int
3988 EOF
3989 cat >> confdefs.h <<\EOF
3990 #define gid_t int
3991 EOF
3992 }
3993
3994 fi
3995
3996 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3997 echo "configure:3998: checking for mode_t" >&5
3998
3999 cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002 #include <sys/types.h>
4003 #if STDC_HEADERS
4004 #include <stdlib.h>
4005 #include <stddef.h>
4006 #endif
4007 EOF
4008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4009   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4010   rm -rf conftest*
4011   ac_cv_type_mode_t=yes
4012 else
4013   rm -rf conftest*
4014   ac_cv_type_mode_t=no
4015 fi
4016 rm -f conftest*
4017
4018 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4019 if test $ac_cv_type_mode_t = no; then
4020   { test "$extra_verbose" = "yes" && cat << \EOF
4021     Defining mode_t = int
4022 EOF
4023 cat >> confdefs.h <<\EOF
4024 #define mode_t int
4025 EOF
4026 }
4027
4028 fi
4029
4030 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4031 echo "configure:4032: checking for off_t" >&5
4032
4033 cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 #include <sys/types.h>
4037 #if STDC_HEADERS
4038 #include <stdlib.h>
4039 #include <stddef.h>
4040 #endif
4041 EOF
4042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4043   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4044   rm -rf conftest*
4045   ac_cv_type_off_t=yes
4046 else
4047   rm -rf conftest*
4048   ac_cv_type_off_t=no
4049 fi
4050 rm -f conftest*
4051
4052 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4053 if test $ac_cv_type_off_t = no; then
4054   { test "$extra_verbose" = "yes" && cat << \EOF
4055     Defining off_t = long
4056 EOF
4057 cat >> confdefs.h <<\EOF
4058 #define off_t long
4059 EOF
4060 }
4061
4062 fi
4063
4064 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4065 echo "configure:4066: checking for ssize_t" >&5
4066
4067 cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 #include <sys/types.h>
4071 #if STDC_HEADERS
4072 #include <stdlib.h>
4073 #include <stddef.h>
4074 #endif
4075 EOF
4076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4077   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4078   rm -rf conftest*
4079   ac_cv_type_ssize_t=yes
4080 else
4081   rm -rf conftest*
4082   ac_cv_type_ssize_t=no
4083 fi
4084 rm -f conftest*
4085
4086 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4087 if test $ac_cv_type_ssize_t = no; then
4088   { test "$extra_verbose" = "yes" && cat << \EOF
4089     Defining ssize_t = int
4090 EOF
4091 cat >> confdefs.h <<\EOF
4092 #define ssize_t int
4093 EOF
4094 }
4095
4096 fi
4097
4098
4099 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4100 echo "configure:4101: checking for socklen_t" >&5
4101 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 #include <sys/types.h>
4105 #include <sys/socket.h>
4106 socklen_t x;
4107
4108 int main() {
4109
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4113   rm -rf conftest*
4114   echo "$ac_t""yes" 1>&6
4115 else
4116   echo "configure: failed program was:" >&5
4117   cat conftest.$ac_ext >&5
4118   rm -rf conftest*
4119   
4120 cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <sys/types.h>
4124 #include <sys/socket.h>
4125 int accept (int, struct sockaddr *, size_t *);
4126
4127 int main() {
4128
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   
4134 echo "$ac_t""size_t" 1>&6
4135 { test "$extra_verbose" = "yes" && cat << \EOF
4136     Defining socklen_t = size_t
4137 EOF
4138 cat >> confdefs.h <<\EOF
4139 #define socklen_t size_t
4140 EOF
4141 }
4142
4143 else
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   
4148 echo "$ac_t""int" 1>&6
4149 { test "$extra_verbose" = "yes" && cat << \EOF
4150     Defining socklen_t = int
4151 EOF
4152 cat >> confdefs.h <<\EOF
4153 #define socklen_t int
4154 EOF
4155 }
4156
4157 fi
4158 rm -f conftest*
4159 fi
4160 rm -f conftest*
4161
4162 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4163 echo "configure:4164: checking for struct timeval" >&5
4164 cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167 #ifdef TIME_WITH_SYS_TIME
4168 #include <sys/time.h>
4169 #include <time.h>
4170 #else
4171 #ifdef HAVE_SYS_TIME_H
4172 #include <sys/time.h>
4173 #else
4174 #include <time.h>
4175 #endif
4176 #endif
4177 int main() {
4178 static struct timeval x; x.tv_sec = x.tv_usec;
4179 ; return 0; }
4180 EOF
4181 if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4182   rm -rf conftest*
4183   echo "$ac_t""yes" 1>&6
4184   HAVE_TIMEVAL=yes
4185   { test "$extra_verbose" = "yes" && cat << \EOF
4186     Defining HAVE_TIMEVAL
4187 EOF
4188 cat >> confdefs.h <<\EOF
4189 #define HAVE_TIMEVAL 1
4190 EOF
4191 }
4192
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   echo "$ac_t""no" 1>&6
4198    HAVE_TIMEVAL=no
4199 fi
4200 rm -f conftest*
4201
4202 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4203 echo "configure:4204: checking whether struct tm is in sys/time.h or time.h" >&5
4204
4205 cat > conftest.$ac_ext <<EOF
4206 #line 4207 "configure"
4207 #include "confdefs.h"
4208 #include <sys/types.h>
4209 #include <time.h>
4210 int main() {
4211 struct tm *tp; tp->tm_sec;
4212 ; return 0; }
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4215   rm -rf conftest*
4216   ac_cv_struct_tm=time.h
4217 else
4218   echo "configure: failed program was:" >&5
4219   cat conftest.$ac_ext >&5
4220   rm -rf conftest*
4221   ac_cv_struct_tm=sys/time.h
4222 fi
4223 rm -f conftest*
4224
4225 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4226 if test $ac_cv_struct_tm = sys/time.h; then
4227   { test "$extra_verbose" = "yes" && cat << \EOF
4228     Defining TM_IN_SYS_TIME
4229 EOF
4230 cat >> confdefs.h <<\EOF
4231 #define TM_IN_SYS_TIME 1
4232 EOF
4233 }
4234
4235 fi
4236
4237 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4238 echo "configure:4239: checking for tm_zone in struct tm" >&5
4239
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 #include <sys/types.h>
4244 #include <$ac_cv_struct_tm>
4245 int main() {
4246 struct tm tm; tm.tm_zone;
4247 ; return 0; }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4250   rm -rf conftest*
4251   ac_cv_struct_tm_zone=yes
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   ac_cv_struct_tm_zone=no
4257 fi
4258 rm -f conftest*
4259
4260 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4261 if test "$ac_cv_struct_tm_zone" = yes; then
4262   { test "$extra_verbose" = "yes" && cat << \EOF
4263     Defining HAVE_TM_ZONE
4264 EOF
4265 cat >> confdefs.h <<\EOF
4266 #define HAVE_TM_ZONE 1
4267 EOF
4268 }
4269
4270 else
4271   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4272 echo "configure:4273: checking for tzname" >&5
4273
4274 cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 #include <time.h>
4278 #ifndef tzname /* For SGI.  */
4279 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4280 #endif
4281 int main() {
4282 atoi(*tzname);
4283 ; return 0; }
4284 EOF
4285 if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4286   rm -rf conftest*
4287   ac_cv_var_tzname=yes
4288 else
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -rf conftest*
4292   ac_cv_var_tzname=no
4293 fi
4294 rm -f conftest*
4295
4296 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4297   if test $ac_cv_var_tzname = yes; then
4298     { test "$extra_verbose" = "yes" && cat << \EOF
4299     Defining HAVE_TZNAME
4300 EOF
4301 cat >> confdefs.h <<\EOF
4302 #define HAVE_TZNAME 1
4303 EOF
4304 }
4305
4306   fi
4307 fi
4308
4309
4310 echo $ac_n "checking for working const""... $ac_c" 1>&6
4311 echo "configure:4312: checking for working const" >&5
4312
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316
4317 int main() {
4318
4319 /* Ultrix mips cc rejects this.  */
4320 typedef int charset[2]; const charset x;
4321 /* SunOS 4.1.1 cc rejects this.  */
4322 char const *const *ccp;
4323 char **p;
4324 /* NEC SVR4.0.2 mips cc rejects this.  */
4325 struct point {int x, y;};
4326 static struct point const zero = {0,0};
4327 /* AIX XL C 1.02.0.0 rejects this.
4328    It does not let you subtract one const X* pointer from another in an arm
4329    of an if-expression whose if-part is not a constant expression */
4330 const char *g = "string";
4331 ccp = &g + (g ? g-g : 0);
4332 /* HPUX 7.0 cc rejects these. */
4333 ++ccp;
4334 p = (char**) ccp;
4335 ccp = (char const *const *) p;
4336 { /* SCO 3.2v4 cc rejects this.  */
4337   char *t;
4338   char const *s = 0 ? (char *) 0 : (char const *) 0;
4339
4340   *t++ = 0;
4341 }
4342 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4343   int x[] = {25, 17};
4344   const int *foo = &x[0];
4345   ++foo;
4346 }
4347 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4348   typedef const int *iptr;
4349   iptr p = 0;
4350   ++p;
4351 }
4352 { /* AIX XL C 1.02.0.0 rejects this saying
4353      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4354   struct s { int j; const int *ap[3]; };
4355   struct s *b; b->j = 5;
4356 }
4357 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4358   const int foo = 10;
4359 }
4360
4361 ; return 0; }
4362 EOF
4363 if { (eval echo configure:4364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4364   rm -rf conftest*
4365   ac_cv_c_const=yes
4366 else
4367   echo "configure: failed program was:" >&5
4368   cat conftest.$ac_ext >&5
4369   rm -rf conftest*
4370   ac_cv_c_const=no
4371 fi
4372 rm -f conftest*
4373
4374 echo "$ac_t""$ac_cv_c_const" 1>&6
4375 if test $ac_cv_c_const = no; then
4376   { test "$extra_verbose" = "yes" && cat << \EOF
4377     Defining const = 
4378 EOF
4379 cat >> confdefs.h <<\EOF
4380 #define const 
4381 EOF
4382 }
4383
4384 fi
4385
4386
4387 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4388 echo "configure:4389: checking whether ${MAKE-make} sets \${MAKE}" >&5
4389 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4390
4391 cat > conftestmake <<\EOF
4392 all:
4393         @echo 'ac_maketemp="${MAKE}"'
4394 EOF
4395 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4396 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4397 if test -n "$ac_maketemp"; then
4398   eval ac_cv_prog_make_${ac_make}_set=yes
4399 else
4400   eval ac_cv_prog_make_${ac_make}_set=no
4401 fi
4402 rm -f conftestmake
4403 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4404   echo "$ac_t""yes" 1>&6
4405   SET_MAKE=
4406 else
4407   echo "$ac_t""no" 1>&6
4408   SET_MAKE="MAKE=${MAKE-make}"
4409 fi
4410
4411
4412 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4413 echo "configure:4414: checking whether byte ordering is bigendian" >&5
4414
4415 ac_cv_c_bigendian=unknown
4416 # See if sys/param.h defines the BYTE_ORDER macro.
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <sys/types.h>
4421 #include <sys/param.h>
4422 int main() {
4423
4424 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4425  bogus endian macros
4426 #endif
4427 ; return 0; }
4428 EOF
4429 if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4430   rm -rf conftest*
4431   # It does; now see whether it defined to BIG_ENDIAN or not.
4432 cat > conftest.$ac_ext <<EOF
4433 #line 4434 "configure"
4434 #include "confdefs.h"
4435 #include <sys/types.h>
4436 #include <sys/param.h>
4437 int main() {
4438
4439 #if BYTE_ORDER != BIG_ENDIAN
4440  not big endian
4441 #endif
4442 ; return 0; }
4443 EOF
4444 if { (eval echo configure:4445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4445   rm -rf conftest*
4446   ac_cv_c_bigendian=yes
4447 else
4448   echo "configure: failed program was:" >&5
4449   cat conftest.$ac_ext >&5
4450   rm -rf conftest*
4451   ac_cv_c_bigendian=no
4452 fi
4453 rm -f conftest*
4454 else
4455   echo "configure: failed program was:" >&5
4456   cat conftest.$ac_ext >&5
4457 fi
4458 rm -f conftest*
4459 if test $ac_cv_c_bigendian = unknown; then
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 main () {
4464   /* Are we little or big endian?  From Harbison&Steele.  */
4465   union
4466   {
4467     long l;
4468     char c[sizeof (long)];
4469   } u;
4470   u.l = 1;
4471   exit (u.c[sizeof (long) - 1] == 1);
4472 }
4473 EOF
4474 if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4475 then
4476   ac_cv_c_bigendian=no
4477 else
4478   conftest_rc="$?"
4479   echo "configure: failed program was:" >&5
4480   cat conftest.$ac_ext >&5
4481   rm -fr conftest*
4482   ac_cv_c_bigendian=yes
4483 fi
4484 rm -fr conftest*
4485 fi
4486
4487 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4488 if test $ac_cv_c_bigendian = yes; then
4489   { test "$extra_verbose" = "yes" && cat << \EOF
4490     Defining WORDS_BIGENDIAN
4491 EOF
4492 cat >> confdefs.h <<\EOF
4493 #define WORDS_BIGENDIAN 1
4494 EOF
4495 }
4496
4497 fi
4498
4499
4500 echo $ac_n "checking size of short""... $ac_c" 1>&6
4501 echo "configure:4502: checking size of short" >&5
4502
4503 cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506 #include <stdio.h>
4507 main()
4508 {
4509   FILE *f=fopen("conftestval", "w");
4510   if (!f) exit(1);
4511   fprintf(f, "%d\n", sizeof(short));
4512   exit(0);
4513 }
4514 EOF
4515 if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4516 then
4517   ac_cv_sizeof_short=`cat conftestval`
4518 else
4519   conftest_rc="$?"
4520   echo "configure: failed program was:" >&5
4521   cat conftest.$ac_ext >&5
4522   rm -fr conftest*
4523   ac_cv_sizeof_short=0
4524 fi
4525 rm -fr conftest*
4526 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4527 { test "$extra_verbose" = "yes" && cat << EOF
4528     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4529 EOF
4530 cat >> confdefs.h <<EOF
4531 #define SIZEOF_SHORT $ac_cv_sizeof_short
4532 EOF
4533 }
4534
4535
4536 if test "$ac_cv_sizeof_short" = 0; then
4537   echo ""
4538   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4539   echo "*** PANIC *** Please examine config.log for compilation errors."
4540   exit 1
4541 fi
4542 echo $ac_n "checking size of int""... $ac_c" 1>&6
4543 echo "configure:4544: checking size of int" >&5
4544
4545 cat > conftest.$ac_ext <<EOF
4546 #line 4547 "configure"
4547 #include "confdefs.h"
4548 #include <stdio.h>
4549 main()
4550 {
4551   FILE *f=fopen("conftestval", "w");
4552   if (!f) exit(1);
4553   fprintf(f, "%d\n", sizeof(int));
4554   exit(0);
4555 }
4556 EOF
4557 if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4558 then
4559   ac_cv_sizeof_int=`cat conftestval`
4560 else
4561   conftest_rc="$?"
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -fr conftest*
4565   ac_cv_sizeof_int=0
4566 fi
4567 rm -fr conftest*
4568 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4569 { test "$extra_verbose" = "yes" && cat << EOF
4570     Defining SIZEOF_INT = $ac_cv_sizeof_int
4571 EOF
4572 cat >> confdefs.h <<EOF
4573 #define SIZEOF_INT $ac_cv_sizeof_int
4574 EOF
4575 }
4576
4577
4578 echo $ac_n "checking size of long""... $ac_c" 1>&6
4579 echo "configure:4580: checking size of long" >&5
4580
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 #include <stdio.h>
4585 main()
4586 {
4587   FILE *f=fopen("conftestval", "w");
4588   if (!f) exit(1);
4589   fprintf(f, "%d\n", sizeof(long));
4590   exit(0);
4591 }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4594 then
4595   ac_cv_sizeof_long=`cat conftestval`
4596 else
4597   conftest_rc="$?"
4598   echo "configure: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   rm -fr conftest*
4601   ac_cv_sizeof_long=0
4602 fi
4603 rm -fr conftest*
4604 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4605 { test "$extra_verbose" = "yes" && cat << EOF
4606     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4607 EOF
4608 cat >> confdefs.h <<EOF
4609 #define SIZEOF_LONG $ac_cv_sizeof_long
4610 EOF
4611 }
4612
4613
4614 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4615 echo "configure:4616: checking size of long long" >&5
4616
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <stdio.h>
4621 main()
4622 {
4623   FILE *f=fopen("conftestval", "w");
4624   if (!f) exit(1);
4625   fprintf(f, "%d\n", sizeof(long long));
4626   exit(0);
4627 }
4628 EOF
4629 if { (eval echo configure:4630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4630 then
4631   ac_cv_sizeof_long_long=`cat conftestval`
4632 else
4633   conftest_rc="$?"
4634   echo "configure: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   rm -fr conftest*
4637   ac_cv_sizeof_long_long=0
4638 fi
4639 rm -fr conftest*
4640 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4641 { test "$extra_verbose" = "yes" && cat << EOF
4642     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4643 EOF
4644 cat >> confdefs.h <<EOF
4645 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4646 EOF
4647 }
4648
4649
4650 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4651 echo "configure:4652: checking size of void *" >&5
4652
4653 cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 #include <stdio.h>
4657 main()
4658 {
4659   FILE *f=fopen("conftestval", "w");
4660   if (!f) exit(1);
4661   fprintf(f, "%d\n", sizeof(void *));
4662   exit(0);
4663 }
4664 EOF
4665 if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4666 then
4667   ac_cv_sizeof_void_p=`cat conftestval`
4668 else
4669   conftest_rc="$?"
4670   echo "configure: failed program was:" >&5
4671   cat conftest.$ac_ext >&5
4672   rm -fr conftest*
4673   ac_cv_sizeof_void_p=0
4674 fi
4675 rm -fr conftest*
4676 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4677 { test "$extra_verbose" = "yes" && cat << EOF
4678     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4679 EOF
4680 cat >> confdefs.h <<EOF
4681 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4682 EOF
4683 }
4684
4685
4686
4687 case $opsys in
4688   cygwin* ) cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 #include <cygwin/types.h>
4692 EOF
4693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4694   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4695   rm -rf conftest*
4696   echo "$ac_t""yes" 1>&6
4697                              { test "$extra_verbose" = "yes" && cat << \EOF
4698     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4699 EOF
4700 cat >> confdefs.h <<\EOF
4701 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4702 EOF
4703 }
4704
4705 else
4706   rm -rf conftest*
4707   echo "$ac_t""no" 1>&6
4708 fi
4709 rm -f conftest*
4710  ;;
4711 esac
4712
4713 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4714 echo "configure:4715: checking for long file names" >&5
4715
4716 ac_cv_sys_long_file_names=yes
4717 # Test for long file names in all the places we know might matter:
4718 #      .                the current directory, where building will happen
4719 #      $prefix/lib      where we will be installing things
4720 #      $exec_prefix/lib likewise
4721 # eval it to expand exec_prefix.
4722 #      $TMPDIR          if set, where it might want to write temporary files
4723 # if $TMPDIR is not set:
4724 #      /tmp             where it might want to write temporary files
4725 #      /var/tmp         likewise
4726 #      /usr/tmp         likewise
4727 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4728   ac_tmpdirs="$TMPDIR"
4729 else
4730   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4731 fi
4732 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4733   test -d $ac_dir || continue
4734   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4735   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4736   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4737   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4738   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4739     ac_cv_sys_long_file_names=no
4740     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4741     break
4742   fi
4743   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4744 done
4745
4746 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4747 if test $ac_cv_sys_long_file_names = yes; then
4748   { test "$extra_verbose" = "yes" && cat << \EOF
4749     Defining HAVE_LONG_FILE_NAMES
4750 EOF
4751 cat >> confdefs.h <<\EOF
4752 #define HAVE_LONG_FILE_NAMES 1
4753 EOF
4754 }
4755
4756 fi
4757
4758
4759 echo $ac_n "checking for sin""... $ac_c" 1>&6
4760 echo "configure:4761: checking for sin" >&5
4761
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 /* System header to define __stub macros and hopefully few prototypes,
4766     which can conflict with char sin(); below.  */
4767 #include <assert.h>
4768 /* Override any gcc2 internal prototype to avoid an error.  */
4769 /* We use char because int might match the return type of a gcc2
4770     builtin and then its argument prototype would still apply.  */
4771 char sin();
4772
4773 int main() {
4774
4775 /* The GNU C library defines this for functions which it implements
4776     to always fail with ENOSYS.  Some functions are actually named
4777     something starting with __ and the normal name is an alias.  */
4778 #if defined (__stub_sin) || defined (__stub___sin)
4779 choke me
4780 #else
4781 sin();
4782 #endif
4783
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_func_sin=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_func_sin=no"
4794 fi
4795 rm -f conftest*
4796
4797 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4798   echo "$ac_t""yes" 1>&6
4799   :
4800 else
4801   echo "$ac_t""no" 1>&6
4802
4803 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4804 echo "configure:4805: checking for sin in -lm" >&5
4805 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4806
4807 xe_check_libs=" -lm "
4808 cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811 /* Override any gcc2 internal prototype to avoid an error.  */
4812 /* We use char because int might match the return type of a gcc2
4813     builtin and then its argument prototype would still apply.  */
4814 char sin();
4815
4816 int main() {
4817 sin()
4818 ; return 0; }
4819 EOF
4820 if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4821   rm -rf conftest*
4822   eval "ac_cv_lib_$ac_lib_var=yes"
4823 else
4824   echo "configure: failed program was:" >&5
4825   cat conftest.$ac_ext >&5
4826   rm -rf conftest*
4827   eval "ac_cv_lib_$ac_lib_var=no"
4828 fi
4829 rm -f conftest*
4830 xe_check_libs=""
4831
4832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4833   echo "$ac_t""yes" 1>&6
4834     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4835     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4836   { test "$extra_verbose" = "yes" && cat << EOF
4837     Defining $ac_tr_lib
4838 EOF
4839 cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4841 EOF
4842 }
4843
4844   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4845
4846 else
4847   echo "$ac_t""no" 1>&6
4848 fi
4849
4850
4851 fi
4852
4853
4854 { test "$extra_verbose" = "yes" && cat << \EOF
4855     Defining LISP_FLOAT_TYPE
4856 EOF
4857 cat >> confdefs.h <<\EOF
4858 #define LISP_FLOAT_TYPE 1
4859 EOF
4860 }
4861
4862
4863 cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 #include <math.h>
4867 int main() {
4868 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4869 ; return 0; }
4870 EOF
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872   rm -rf conftest*
4873   { test "$extra_verbose" = "yes" && cat << \EOF
4874     Defining HAVE_INVERSE_HYPERBOLIC
4875 EOF
4876 cat >> confdefs.h <<\EOF
4877 #define HAVE_INVERSE_HYPERBOLIC 1
4878 EOF
4879 }
4880
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884 fi
4885 rm -f conftest*
4886
4887 echo "checking type of mail spool file locking" 1>&6
4888 echo "configure:4889: checking type of mail spool file locking" >&5
4889 for ac_func in lockf flock
4890 do
4891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4892 echo "configure:4893: checking for $ac_func" >&5
4893
4894 cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897 /* System header to define __stub macros and hopefully few prototypes,
4898     which can conflict with char $ac_func(); below.  */
4899 #include <assert.h>
4900 /* Override any gcc2 internal prototype to avoid an error.  */
4901 /* We use char because int might match the return type of a gcc2
4902     builtin and then its argument prototype would still apply.  */
4903 char $ac_func();
4904
4905 int main() {
4906
4907 /* The GNU C library defines this for functions which it implements
4908     to always fail with ENOSYS.  Some functions are actually named
4909     something starting with __ and the normal name is an alias.  */
4910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4911 choke me
4912 #else
4913 $ac_func();
4914 #endif
4915
4916 ; return 0; }
4917 EOF
4918 if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4919   rm -rf conftest*
4920   eval "ac_cv_func_$ac_func=yes"
4921 else
4922   echo "configure: failed program was:" >&5
4923   cat conftest.$ac_ext >&5
4924   rm -rf conftest*
4925   eval "ac_cv_func_$ac_func=no"
4926 fi
4927 rm -f conftest*
4928
4929 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4930   echo "$ac_t""yes" 1>&6
4931     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4932   { test "$extra_verbose" = "yes" && cat << EOF
4933     Defining $ac_tr_func
4934 EOF
4935 cat >> confdefs.h <<EOF
4936 #define $ac_tr_func 1
4937 EOF
4938 }
4939  
4940 else
4941   echo "$ac_t""no" 1>&6
4942 fi
4943 done
4944
4945 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4946 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4947 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4948 if   test -z "$mail_locking"; then
4949   case "$opsys" in cygwin* | mingw*)
4950     mail_locking=pop ;;
4951   esac
4952 fi
4953
4954 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4955     Defining MAIL_LOCK_LOCKF
4956 EOF
4957 cat >> confdefs.h <<\EOF
4958 #define MAIL_LOCK_LOCKF 1
4959 EOF
4960 }
4961
4962 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4963     Defining MAIL_LOCK_FLOCK
4964 EOF
4965 cat >> confdefs.h <<\EOF
4966 #define MAIL_LOCK_FLOCK 1
4967 EOF
4968 }
4969
4970 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4971     Defining MAIL_LOCK_LOCKING
4972 EOF
4973 cat >> confdefs.h <<\EOF
4974 #define MAIL_LOCK_LOCKING 1
4975 EOF
4976 }
4977
4978 elif test "$mail_locking" = "pop"; then
4979   with_pop=yes
4980   mail_locking=
4981 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4982     Defining MAIL_LOCK_DOT
4983 EOF
4984 cat >> confdefs.h <<\EOF
4985 #define MAIL_LOCK_DOT 1
4986 EOF
4987 }
4988
4989 fi
4990 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4991   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4992 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4993   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4994 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4995   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4996
4997 case "$opsys" in decosf*)
4998   
4999 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5000 echo "configure:5001: checking for cma_open in -lpthreads" >&5
5001 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5002
5003 xe_check_libs=" -lpthreads "
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* Override any gcc2 internal prototype to avoid an error.  */
5008 /* We use char because int might match the return type of a gcc2
5009     builtin and then its argument prototype would still apply.  */
5010 char cma_open();
5011
5012 int main() {
5013 cma_open()
5014 ; return 0; }
5015 EOF
5016 if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=yes"
5019 else
5020   echo "configure: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=no"
5024 fi
5025 rm -f conftest*
5026 xe_check_libs=""
5027
5028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5029   echo "$ac_t""yes" 1>&6
5030     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5031     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5032   { test "$extra_verbose" = "yes" && cat << EOF
5033     Defining $ac_tr_lib
5034 EOF
5035 cat >> confdefs.h <<EOF
5036 #define $ac_tr_lib 1
5037 EOF
5038 }
5039
5040   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5041
5042 else
5043   echo "$ac_t""no" 1>&6
5044 fi
5045
5046
5047   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5048     c_switch_site="$c_switch_site -threads" ;;
5049 esac
5050
5051
5052 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5053 echo "configure:5054: checking whether the -xildoff compiler flag is required" >&5
5054 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5055   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5056     then echo "$ac_t""no" 1>&6;
5057     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
5058   fi
5059   else echo "$ac_t""no" 1>&6
5060 fi
5061
5062 if test "$opsys" = "sol2"; then
5063   if test "$os_release" -ge 56; then
5064     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5065 echo "configure:5066: checking for \"-z ignore\" linker flag" >&5
5066     case "`ld -h 2>&1`" in
5067       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5068         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5069       *) echo "$ac_t""no" 1>&6 ;;
5070     esac
5071   fi
5072 fi
5073
5074
5075 echo "checking "for specified window system"" 1>&6
5076 echo "configure:5077: checking "for specified window system"" >&5
5077
5078
5079 GNOME_CONFIG=no
5080 GTK_CONFIG=no
5081
5082 if test "$with_gnome" != "no"; then
5083    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5084 echo "configure:5085: checking for GNOME configuration script" >&5
5085    for possible in gnome-config
5086    do
5087       possible_version=`${possible} --version 2> /dev/null`
5088       if test "x${possible_version}" != "x"; then
5089               GNOME_CONFIG="${possible}"
5090               with_gnome=yes
5091               with_gtk=yes
5092               break
5093       fi
5094    done
5095    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5096 fi
5097
5098 if test "${GNOME_CONFIG}" != "no"; then
5099       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5100       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5101       { test "$extra_verbose" = "yes" && cat << \EOF
5102     Defining HAVE_GNOME
5103 EOF
5104 cat >> confdefs.h <<\EOF
5105 #define HAVE_GNOME 1
5106 EOF
5107 }
5108
5109       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5110       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5111 fi
5112
5113 if test "$with_gtk" != "no";then
5114    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5115 echo "configure:5116: checking for GTK configuration script" >&5
5116    for possible in gtk12-config gtk14-config gtk-config
5117    do
5118       possible_version=`${possible} --version 2> /dev/null`
5119       if test "x${possible_version}" != "x"; then
5120               GTK_CONFIG="${possible}"
5121       fi
5122       case "${possible_version}" in
5123         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5124         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5125         1.2.*)
5126                 with_gtk=yes
5127                 break
5128                 ;;
5129         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5130       esac
5131    done
5132    echo "$ac_t""${GTK_CONFIG}" 1>&6
5133 fi
5134
5135 if test "${GTK_CONFIG}" != "no"; then
5136       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5137 echo "configure:5138: checking gtk version" >&5
5138       GTK_VERSION=`${GTK_CONFIG} --version`
5139       echo "$ac_t""${GTK_VERSION}" 1>&6
5140
5141       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5142 echo "configure:5143: checking gtk libs" >&5
5143       GTK_LIBS=`${GTK_CONFIG} --libs`
5144       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5145       echo "$ac_t""${GTK_LIBS}" 1>&6
5146
5147       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5148 echo "configure:5149: checking gtk cflags" >&5
5149       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5150       if test "$GCC" = "yes"; then
5151         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5152       fi
5153       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5154       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5155
5156       
5157 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5158 echo "configure:5159: checking for main in -lgdk_imlib" >&5
5159 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5160
5161 xe_check_libs=" -lgdk_imlib "
5162 cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165
5166 int main() {
5167 main()
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=no"
5178 fi
5179 rm -f conftest*
5180 xe_check_libs=""
5181
5182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5183   echo "$ac_t""yes" 1>&6
5184   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5185 else
5186   echo "$ac_t""no" 1>&6
5187 fi
5188
5189
5190       
5191 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5192 echo "configure:5193: checking for Imlib_init in -lImlib" >&5
5193 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5194
5195 xe_check_libs=" -lImlib "
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* Override any gcc2 internal prototype to avoid an error.  */
5200 /* We use char because int might match the return type of a gcc2
5201     builtin and then its argument prototype would still apply.  */
5202 char Imlib_init();
5203
5204 int main() {
5205 Imlib_init()
5206 ; return 0; }
5207 EOF
5208 if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209   rm -rf conftest*
5210   eval "ac_cv_lib_$ac_lib_var=yes"
5211 else
5212   echo "configure: failed program was:" >&5
5213   cat conftest.$ac_ext >&5
5214   rm -rf conftest*
5215   eval "ac_cv_lib_$ac_lib_var=no"
5216 fi
5217 rm -f conftest*
5218 xe_check_libs=""
5219
5220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5221   echo "$ac_t""yes" 1>&6
5222   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5223 else
5224   echo "$ac_t""no" 1>&6
5225 fi
5226
5227
5228       for ac_func in gdk_imlib_init
5229 do
5230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5231 echo "configure:5232: checking for $ac_func" >&5
5232
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* System header to define __stub macros and hopefully few prototypes,
5237     which can conflict with char $ac_func(); below.  */
5238 #include <assert.h>
5239 /* Override any gcc2 internal prototype to avoid an error.  */
5240 /* We use char because int might match the return type of a gcc2
5241     builtin and then its argument prototype would still apply.  */
5242 char $ac_func();
5243
5244 int main() {
5245
5246 /* The GNU C library defines this for functions which it implements
5247     to always fail with ENOSYS.  Some functions are actually named
5248     something starting with __ and the normal name is an alias.  */
5249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5250 choke me
5251 #else
5252 $ac_func();
5253 #endif
5254
5255 ; return 0; }
5256 EOF
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5258   rm -rf conftest*
5259   eval "ac_cv_func_$ac_func=yes"
5260 else
5261   echo "configure: failed program was:" >&5
5262   cat conftest.$ac_ext >&5
5263   rm -rf conftest*
5264   eval "ac_cv_func_$ac_func=no"
5265 fi
5266 rm -f conftest*
5267
5268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5269   echo "$ac_t""yes" 1>&6
5270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5271   { test "$extra_verbose" = "yes" && cat << EOF
5272     Defining $ac_tr_func
5273 EOF
5274 cat >> confdefs.h <<EOF
5275 #define $ac_tr_func 1
5276 EOF
5277 }
5278  
5279 else
5280   echo "$ac_t""no" 1>&6
5281 fi
5282 done
5283
5284
5285       { test "$extra_verbose" = "yes" && cat << \EOF
5286     Defining HAVE_XPM
5287 EOF
5288 cat >> confdefs.h <<\EOF
5289 #define HAVE_XPM 1
5290 EOF
5291 }
5292
5293       { test "$extra_verbose" = "yes" && cat << \EOF
5294     Defining HAVE_GTK
5295 EOF
5296 cat >> confdefs.h <<\EOF
5297 #define HAVE_GTK 1
5298 EOF
5299 }
5300
5301       
5302
5303       window_system=gtk
5304       with_gtk=yes
5305       with_x11=no
5306
5307       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5308       test "${with_toolbars}" != no && with_toolbars=gtk
5309       test "${with_menubars}" != "no" && with_menubars=gtk
5310       test "${with_dialogs}" != "no" && with_dialogs=gtk
5311       test "${with_widgets}" != "no" && with_widgets=gtk
5312
5313       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5314    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5315  fi
5316       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5317    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5318  fi
5319       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5320    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5321  fi
5322       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5323    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5324  fi
5325
5326             OLD_CFLAGS="${CFLAGS}"
5327       OLD_CPPFLAGS="${CPPFLAGS}"
5328       OLD_LDFLAGS="${LDFLAGS}"
5329       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5330       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5331       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5332       for ac_hdr in glade/glade.h glade.h
5333 do
5334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5336 echo "configure:5337: checking for $ac_hdr" >&5
5337
5338 cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341 #include <$ac_hdr>
5342 EOF
5343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5344 { (eval echo configure:5345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5346 if test -z "$ac_err"; then
5347   rm -rf conftest*
5348   eval "ac_cv_header_$ac_safe=yes"
5349 else
5350   echo "$ac_err" >&5
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -rf conftest*
5354   eval "ac_cv_header_$ac_safe=no"
5355 fi
5356 rm -f conftest*
5357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5358   echo "$ac_t""yes" 1>&6
5359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5360   { test "$extra_verbose" = "yes" && cat << EOF
5361     Defining $ac_tr_hdr
5362 EOF
5363 cat >> confdefs.h <<EOF
5364 #define $ac_tr_hdr 1
5365 EOF
5366 }
5367  
5368 else
5369   echo "$ac_t""no" 1>&6
5370 fi
5371 done
5372
5373       
5374 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5375 echo "configure:5376: checking for main in -lxml" >&5
5376 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5377
5378 xe_check_libs=" -lxml "
5379 cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382
5383 int main() {
5384 main()
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=yes"
5390 else
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_lib_$ac_lib_var=no"
5395 fi
5396 rm -f conftest*
5397 xe_check_libs=""
5398
5399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5400   echo "$ac_t""yes" 1>&6
5401   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5402 else
5403   echo "$ac_t""no" 1>&6
5404 fi
5405
5406
5407       
5408 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5409 echo "configure:5410: checking for main in -lglade" >&5
5410 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5411
5412 xe_check_libs=" -lglade "
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416
5417 int main() {
5418 main()
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_lib_$ac_lib_var=no"
5429 fi
5430 rm -f conftest*
5431 xe_check_libs=""
5432
5433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5434   echo "$ac_t""yes" 1>&6
5435   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5436 else
5437   echo "$ac_t""no" 1>&6
5438 fi
5439
5440
5441       
5442 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5443 echo "configure:5444: checking for main in -lglade-gnome" >&5
5444 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5445
5446 xe_check_libs=" -lglade-gnome "
5447 cat > conftest.$ac_ext <<EOF
5448 #line 5449 "configure"
5449 #include "confdefs.h"
5450
5451 int main() {
5452 main()
5453 ; return 0; }
5454 EOF
5455 if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=yes"
5458 else
5459   echo "configure: failed program was:" >&5
5460   cat conftest.$ac_ext >&5
5461   rm -rf conftest*
5462   eval "ac_cv_lib_$ac_lib_var=no"
5463 fi
5464 rm -f conftest*
5465 xe_check_libs=""
5466
5467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5468   echo "$ac_t""yes" 1>&6
5469   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5470 else
5471   echo "$ac_t""no" 1>&6
5472 fi
5473
5474
5475       cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 #include <glade/glade-xml.h>
5479 EOF
5480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5482   rm -rf conftest*
5483   echo "$ac_t""yes" 1>&6
5484                        { test "$extra_verbose" = "yes" && cat << \EOF
5485     Defining LIBGLADE_XML_TXTDOMAIN = 1
5486 EOF
5487 cat >> confdefs.h <<\EOF
5488 #define LIBGLADE_XML_TXTDOMAIN 1
5489 EOF
5490 }
5491
5492 else
5493   rm -rf conftest*
5494   echo "$ac_t""no" 1>&6
5495 fi
5496 rm -f conftest*
5497
5498       CFLAGS="${OLD_CFLAGS}"
5499       CPPFLAGS="${OLD_CPPFLAGS}"
5500       LDFLAGS="${OLD_LDFLAGS}"
5501 fi
5502
5503
5504 if test "$with_x11" != "no"; then
5505     test "$x_includes $x_libraries" != "NONE NONE" && \
5506    window_system=x11 with_x11=yes
5507
5508         
5509       if test "$x_includes $x_libraries" = "NONE NONE" \
5510     -a -n "$OPENWINHOME" \
5511     -a "$OPENWINHOME" != "/usr/openwin" \
5512     -a -d "$OPENWINHOME"; then
5513       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5514       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5515       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5516   fi
5517
5518   if test "$x_includes" = "NONE"; then
5519                     for dir in "/usr/X11" "/usr/X11R6"; do
5520       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5521     done
5522   fi
5523
5524   if test "$x_libraries" = "NONE"; then
5525     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5526       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5527     done
5528   fi
5529
5530   # If we find X, set shell vars x_includes and x_libraries to the
5531 # paths, otherwise set no_x=yes.
5532 # Uses ac_ vars as temps to allow command line to override cache and checks.
5533 # --without-x overrides everything else, but does not touch the cache.
5534 echo $ac_n "checking for X""... $ac_c" 1>&6
5535 echo "configure:5536: checking for X" >&5
5536
5537 # Check whether --with-x or --without-x was given.
5538 if test "${with_x+set}" = set; then
5539   withval="$with_x"
5540   :
5541 fi
5542
5543 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5544 if test "x$with_x" = xno; then
5545   # The user explicitly disabled X.
5546   have_x=disabled
5547 else
5548   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5549     # Both variables are already set.
5550     have_x=yes
5551   else
5552
5553 # One or both of the vars are not set, and there is no cached value.
5554 ac_x_includes=NO ac_x_libraries=NO
5555 rm -fr conftestdir
5556 if mkdir conftestdir; then
5557   cd conftestdir
5558   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5559   cat > Imakefile <<'EOF'
5560 acfindx:
5561         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5562 EOF
5563   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5564     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5565     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5566     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5567     for ac_extension in a so sl; do
5568       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5569         test -f $ac_im_libdir/libX11.$ac_extension; then
5570         ac_im_usrlibdir=$ac_im_libdir; break
5571       fi
5572     done
5573     # Screen out bogus values from the imake configuration.  They are
5574     # bogus both because they are the default anyway, and because
5575     # using them would break gcc on systems where it needs fixed includes.
5576     case "$ac_im_incroot" in
5577         /usr/include) ;;
5578         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5579     esac
5580     case "$ac_im_usrlibdir" in
5581         /usr/lib | /lib) ;;
5582         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5583     esac
5584   fi
5585   cd ..
5586   rm -fr conftestdir
5587 fi
5588
5589 if test "$ac_x_includes" = NO; then
5590   # Guess where to find include files, by looking for this one X11 .h file.
5591   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5592
5593   # First, try using that file with no special directory specified.
5594 cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 #include <$x_direct_test_include>
5598 EOF
5599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5600 { (eval echo configure:5601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5602 if test -z "$ac_err"; then
5603   rm -rf conftest*
5604   # We can compile using X headers with no special include directory.
5605 ac_x_includes=
5606 else
5607   echo "$ac_err" >&5
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -rf conftest*
5611   # Look for the header file in a standard set of common directories.
5612 # Check X11 before X11Rn because it is often a symlink to the current release.
5613   for ac_dir in               \
5614     /usr/X11/include          \
5615     /usr/X11R6/include        \
5616     /usr/X11R5/include        \
5617     /usr/X11R4/include        \
5618                               \
5619     /usr/include/X11          \
5620     /usr/include/X11R6        \
5621     /usr/include/X11R5        \
5622     /usr/include/X11R4        \
5623                               \
5624     /usr/local/X11/include    \
5625     /usr/local/X11R6/include  \
5626     /usr/local/X11R5/include  \
5627     /usr/local/X11R4/include  \
5628                               \
5629     /usr/local/include/X11    \
5630     /usr/local/include/X11R6  \
5631     /usr/local/include/X11R5  \
5632     /usr/local/include/X11R4  \
5633                               \
5634     /usr/X386/include         \
5635     /usr/x386/include         \
5636     /usr/XFree86/include/X11  \
5637                               \
5638     /usr/include              \
5639     /usr/local/include        \
5640     /usr/unsupported/include  \
5641     /usr/athena/include       \
5642     /usr/local/x11r5/include  \
5643     /usr/lpp/Xamples/include  \
5644                               \
5645     /usr/openwin/include      \
5646     /usr/openwin/share/include \
5647     ; \
5648   do
5649     if test -r "$ac_dir/$x_direct_test_include"; then
5650       ac_x_includes=$ac_dir
5651       break
5652     fi
5653   done
5654 fi
5655 rm -f conftest*
5656 fi # $ac_x_includes = NO
5657
5658 if test "$ac_x_libraries" = NO; then
5659   # Check for the libraries.
5660
5661   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5662   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5663
5664   # See if we find them without any special options.
5665   # Don't add to $LIBS permanently.
5666   ac_save_LIBS="$LIBS"
5667   LIBS="-l$x_direct_test_library $LIBS"
5668 cat > conftest.$ac_ext <<EOF
5669 #line 5670 "configure"
5670 #include "confdefs.h"
5671
5672 int main() {
5673 ${x_direct_test_function}()
5674 ; return 0; }
5675 EOF
5676 if { (eval echo configure:5677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5677   rm -rf conftest*
5678   LIBS="$ac_save_LIBS"
5679 # We can link X programs with no special library path.
5680 ac_x_libraries=
5681 else
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   LIBS="$ac_save_LIBS"
5686 # First see if replacing the include by lib works.
5687 # Check X11 before X11Rn because it is often a symlink to the current release.
5688 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5689     /usr/X11/lib          \
5690     /usr/X11R6/lib        \
5691     /usr/X11R5/lib        \
5692     /usr/X11R4/lib        \
5693                           \
5694     /usr/lib/X11          \
5695     /usr/lib/X11R6        \
5696     /usr/lib/X11R5        \
5697     /usr/lib/X11R4        \
5698                           \
5699     /usr/local/X11/lib    \
5700     /usr/local/X11R6/lib  \
5701     /usr/local/X11R5/lib  \
5702     /usr/local/X11R4/lib  \
5703                           \
5704     /usr/local/lib/X11    \
5705     /usr/local/lib/X11R6  \
5706     /usr/local/lib/X11R5  \
5707     /usr/local/lib/X11R4  \
5708                           \
5709     /usr/X386/lib         \
5710     /usr/x386/lib         \
5711     /usr/XFree86/lib/X11  \
5712                           \
5713     /usr/lib              \
5714     /usr/local/lib        \
5715     /usr/unsupported/lib  \
5716     /usr/athena/lib       \
5717     /usr/local/x11r5/lib  \
5718     /usr/lpp/Xamples/lib  \
5719     /lib/usr/lib/X11      \
5720                           \
5721     /usr/openwin/lib      \
5722     /usr/openwin/share/lib \
5723     ; \
5724 do
5725   for ac_extension in a so sl; do
5726     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5727       ac_x_libraries=$ac_dir
5728       break 2
5729     fi
5730   done
5731 done
5732 fi
5733 rm -f conftest*
5734 fi # $ac_x_libraries = NO
5735
5736 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5737   # Didn't find X anywhere.  Cache the known absence of X.
5738   ac_cv_have_x="have_x=no"
5739 else
5740   # Record where we found X for the cache.
5741   ac_cv_have_x="have_x=yes \
5742                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5743 fi
5744   fi
5745   eval "$ac_cv_have_x"
5746 fi # $with_x != no
5747
5748 if test "$have_x" != yes; then
5749   echo "$ac_t""$have_x" 1>&6
5750   no_x=yes
5751 else
5752   # If each of the values was on the command line, it overrides each guess.
5753   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5754   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5755   # Update the cache value to reflect the command line values.
5756   ac_cv_have_x="have_x=yes \
5757                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5758   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5759 fi
5760
5761 if test "$no_x" = yes; then
5762   # Not all programs may use this symbol, but it does not hurt to define it.
5763   { test "$extra_verbose" = "yes" && cat << \EOF
5764     Defining X_DISPLAY_MISSING
5765 EOF
5766 cat >> confdefs.h <<\EOF
5767 #define X_DISPLAY_MISSING 1
5768 EOF
5769 }
5770
5771   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5772 else
5773   if test -n "$x_includes"; then
5774     X_CFLAGS="$X_CFLAGS -I$x_includes"
5775   fi
5776
5777   # It would also be nice to do this for all -L options, not just this one.
5778   if test -n "$x_libraries"; then
5779     X_LIBS="$X_LIBS -L$x_libraries"
5780     # For Solaris; some versions of Sun CC require a space after -R and
5781     # others require no space.  Words are not sufficient . . . .
5782     case "`(uname -sr) 2>/dev/null`" in
5783     "SunOS 5"*)
5784       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5785 echo "configure:5786: checking whether -R must be followed by a space" >&5
5786       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5787       cat > conftest.$ac_ext <<EOF
5788 #line 5789 "configure"
5789 #include "confdefs.h"
5790
5791 int main() {
5792
5793 ; return 0; }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5796   rm -rf conftest*
5797   ac_R_nospace=yes
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -rf conftest*
5802   ac_R_nospace=no
5803 fi
5804 rm -f conftest*
5805       if test $ac_R_nospace = yes; then
5806         echo "$ac_t""no" 1>&6
5807         X_LIBS="$X_LIBS -R$x_libraries"
5808       else
5809         LIBS="$ac_xsave_LIBS -R $x_libraries"
5810         cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813
5814 int main() {
5815
5816 ; return 0; }
5817 EOF
5818 if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819   rm -rf conftest*
5820   ac_R_space=yes
5821 else
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   ac_R_space=no
5826 fi
5827 rm -f conftest*
5828         if test $ac_R_space = yes; then
5829           echo "$ac_t""yes" 1>&6
5830           X_LIBS="$X_LIBS -R $x_libraries"
5831         else
5832           echo "$ac_t""neither works" 1>&6
5833         fi
5834       fi
5835       LIBS="$ac_xsave_LIBS"
5836     esac
5837   fi
5838
5839   # Check for system-dependent libraries X programs must link with.
5840   # Do this before checking for the system-independent R6 libraries
5841   # (-lICE), since we may need -lsocket or whatever for X linking.
5842
5843   if test "$ISC" = yes; then
5844     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5845   else
5846     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5847     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5848     # the Alpha needs dnet_stub (dnet does not exist).
5849     if test "$with_dnet" = "no" ; then
5850 ac_cv_lib_dnet_dnet_ntoa=no
5851 else
5852
5853 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5854 echo "configure:5855: checking for dnet_ntoa in -ldnet" >&5
5855 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5856
5857 xe_check_libs=" -ldnet "
5858 cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5861 /* Override any gcc2 internal prototype to avoid an error.  */
5862 /* We use char because int might match the return type of a gcc2
5863     builtin and then its argument prototype would still apply.  */
5864 char dnet_ntoa();
5865
5866 int main() {
5867 dnet_ntoa()
5868 ; return 0; }
5869 EOF
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871   rm -rf conftest*
5872   eval "ac_cv_lib_$ac_lib_var=yes"
5873 else
5874   echo "configure: failed program was:" >&5
5875   cat conftest.$ac_ext >&5
5876   rm -rf conftest*
5877   eval "ac_cv_lib_$ac_lib_var=no"
5878 fi
5879 rm -f conftest*
5880 xe_check_libs=""
5881
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5883   echo "$ac_t""yes" 1>&6
5884   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5885 else
5886   echo "$ac_t""no" 1>&6
5887 fi
5888
5889 fi
5890
5891     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5892       
5893 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5894 echo "configure:5895: checking for dnet_ntoa in -ldnet_stub" >&5
5895 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5896
5897 xe_check_libs=" -ldnet_stub "
5898 cat > conftest.$ac_ext <<EOF
5899 #line 5900 "configure"
5900 #include "confdefs.h"
5901 /* Override any gcc2 internal prototype to avoid an error.  */
5902 /* We use char because int might match the return type of a gcc2
5903     builtin and then its argument prototype would still apply.  */
5904 char dnet_ntoa();
5905
5906 int main() {
5907 dnet_ntoa()
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=no"
5918 fi
5919 rm -f conftest*
5920 xe_check_libs=""
5921
5922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5923   echo "$ac_t""yes" 1>&6
5924   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5925 else
5926   echo "$ac_t""no" 1>&6
5927 fi
5928
5929
5930     fi
5931
5932     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5933     # to get the SysV transport functions.
5934     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5935     # needs -lnsl.
5936     # The nsl library prevents programs from opening the X display
5937     # on Irix 5.2, according to dickey@clark.net.
5938     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5939 echo "configure:5940: checking for gethostbyname" >&5
5940
5941 cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char gethostbyname(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char gethostbyname();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5958 choke me
5959 #else
5960 gethostbyname();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_gethostbyname=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_gethostbyname=no"
5973 fi
5974 rm -f conftest*
5975
5976 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5977   echo "$ac_t""yes" 1>&6
5978   :
5979 else
5980   echo "$ac_t""no" 1>&6
5981 fi
5982
5983     if test $ac_cv_func_gethostbyname = no; then
5984       
5985 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5986 echo "configure:5987: checking for gethostbyname in -lnsl" >&5
5987 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5988
5989 xe_check_libs=" -lnsl "
5990 cat > conftest.$ac_ext <<EOF
5991 #line 5992 "configure"
5992 #include "confdefs.h"
5993 /* Override any gcc2 internal prototype to avoid an error.  */
5994 /* We use char because int might match the return type of a gcc2
5995     builtin and then its argument prototype would still apply.  */
5996 char gethostbyname();
5997
5998 int main() {
5999 gethostbyname()
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6003   rm -rf conftest*
6004   eval "ac_cv_lib_$ac_lib_var=yes"
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   eval "ac_cv_lib_$ac_lib_var=no"
6010 fi
6011 rm -f conftest*
6012 xe_check_libs=""
6013
6014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6015   echo "$ac_t""yes" 1>&6
6016   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6017 else
6018   echo "$ac_t""no" 1>&6
6019 fi
6020
6021
6022     fi
6023
6024     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6025     # socket/setsockopt and other routines are undefined under SCO ODT
6026     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6027     # on later versions), says simon@lia.di.epfl.ch: it contains
6028     # gethostby* variants that don't use the nameserver (or something).
6029     # -lsocket must be given before -lnsl if both are needed.
6030     # We assume that if connect needs -lnsl, so does gethostbyname.
6031     echo $ac_n "checking for connect""... $ac_c" 1>&6
6032 echo "configure:6033: checking for connect" >&5
6033
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 /* System header to define __stub macros and hopefully few prototypes,
6038     which can conflict with char connect(); below.  */
6039 #include <assert.h>
6040 /* Override any gcc2 internal prototype to avoid an error.  */
6041 /* We use char because int might match the return type of a gcc2
6042     builtin and then its argument prototype would still apply.  */
6043 char connect();
6044
6045 int main() {
6046
6047 /* The GNU C library defines this for functions which it implements
6048     to always fail with ENOSYS.  Some functions are actually named
6049     something starting with __ and the normal name is an alias.  */
6050 #if defined (__stub_connect) || defined (__stub___connect)
6051 choke me
6052 #else
6053 connect();
6054 #endif
6055
6056 ; return 0; }
6057 EOF
6058 if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6059   rm -rf conftest*
6060   eval "ac_cv_func_connect=yes"
6061 else
6062   echo "configure: failed program was:" >&5
6063   cat conftest.$ac_ext >&5
6064   rm -rf conftest*
6065   eval "ac_cv_func_connect=no"
6066 fi
6067 rm -f conftest*
6068
6069 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   :
6072 else
6073   echo "$ac_t""no" 1>&6
6074 fi
6075
6076     if test $ac_cv_func_connect = no; then
6077       
6078 xe_msg_checking="for connect in -lsocket"
6079 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6080 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6081 echo "configure:6082: checking "$xe_msg_checking"" >&5
6082 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6083
6084 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6085 cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* Override any gcc2 internal prototype to avoid an error.  */
6089 /* We use char because int might match the return type of a gcc2
6090     builtin and then its argument prototype would still apply.  */
6091 char connect();
6092
6093 int main() {
6094 connect()
6095 ; return 0; }
6096 EOF
6097 if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=yes"
6100 else
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103   rm -rf conftest*
6104   eval "ac_cv_lib_$ac_lib_var=no"
6105 fi
6106 rm -f conftest*
6107 xe_check_libs=""
6108
6109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6110   echo "$ac_t""yes" 1>&6
6111   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6112 else
6113   echo "$ac_t""no" 1>&6
6114 fi
6115
6116
6117     fi
6118
6119     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6120     echo $ac_n "checking for remove""... $ac_c" 1>&6
6121 echo "configure:6122: checking for remove" >&5
6122
6123 cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126 /* System header to define __stub macros and hopefully few prototypes,
6127     which can conflict with char remove(); below.  */
6128 #include <assert.h>
6129 /* Override any gcc2 internal prototype to avoid an error.  */
6130 /* We use char because int might match the return type of a gcc2
6131     builtin and then its argument prototype would still apply.  */
6132 char remove();
6133
6134 int main() {
6135
6136 /* The GNU C library defines this for functions which it implements
6137     to always fail with ENOSYS.  Some functions are actually named
6138     something starting with __ and the normal name is an alias.  */
6139 #if defined (__stub_remove) || defined (__stub___remove)
6140 choke me
6141 #else
6142 remove();
6143 #endif
6144
6145 ; return 0; }
6146 EOF
6147 if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6148   rm -rf conftest*
6149   eval "ac_cv_func_remove=yes"
6150 else
6151   echo "configure: failed program was:" >&5
6152   cat conftest.$ac_ext >&5
6153   rm -rf conftest*
6154   eval "ac_cv_func_remove=no"
6155 fi
6156 rm -f conftest*
6157
6158 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6159   echo "$ac_t""yes" 1>&6
6160   :
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164
6165     if test $ac_cv_func_remove = no; then
6166       
6167 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6168 echo "configure:6169: checking for remove in -lposix" >&5
6169 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6170
6171 xe_check_libs=" -lposix "
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* Override any gcc2 internal prototype to avoid an error.  */
6176 /* We use char because int might match the return type of a gcc2
6177     builtin and then its argument prototype would still apply.  */
6178 char remove();
6179
6180 int main() {
6181 remove()
6182 ; return 0; }
6183 EOF
6184 if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6185   rm -rf conftest*
6186   eval "ac_cv_lib_$ac_lib_var=yes"
6187 else
6188   echo "configure: failed program was:" >&5
6189   cat conftest.$ac_ext >&5
6190   rm -rf conftest*
6191   eval "ac_cv_lib_$ac_lib_var=no"
6192 fi
6193 rm -f conftest*
6194 xe_check_libs=""
6195
6196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6197   echo "$ac_t""yes" 1>&6
6198   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6199 else
6200   echo "$ac_t""no" 1>&6
6201 fi
6202
6203
6204     fi
6205
6206     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6207     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6208 echo "configure:6209: checking for shmat" >&5
6209
6210 cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 /* System header to define __stub macros and hopefully few prototypes,
6214     which can conflict with char shmat(); below.  */
6215 #include <assert.h>
6216 /* Override any gcc2 internal prototype to avoid an error.  */
6217 /* We use char because int might match the return type of a gcc2
6218     builtin and then its argument prototype would still apply.  */
6219 char shmat();
6220
6221 int main() {
6222
6223 /* The GNU C library defines this for functions which it implements
6224     to always fail with ENOSYS.  Some functions are actually named
6225     something starting with __ and the normal name is an alias.  */
6226 #if defined (__stub_shmat) || defined (__stub___shmat)
6227 choke me
6228 #else
6229 shmat();
6230 #endif
6231
6232 ; return 0; }
6233 EOF
6234 if { (eval echo configure:6235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6235   rm -rf conftest*
6236   eval "ac_cv_func_shmat=yes"
6237 else
6238   echo "configure: failed program was:" >&5
6239   cat conftest.$ac_ext >&5
6240   rm -rf conftest*
6241   eval "ac_cv_func_shmat=no"
6242 fi
6243 rm -f conftest*
6244
6245 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6246   echo "$ac_t""yes" 1>&6
6247   :
6248 else
6249   echo "$ac_t""no" 1>&6
6250 fi
6251
6252     if test $ac_cv_func_shmat = no; then
6253       
6254 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6255 echo "configure:6256: checking for shmat in -lipc" >&5
6256 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6257
6258 xe_check_libs=" -lipc "
6259 cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262 /* Override any gcc2 internal prototype to avoid an error.  */
6263 /* We use char because int might match the return type of a gcc2
6264     builtin and then its argument prototype would still apply.  */
6265 char shmat();
6266
6267 int main() {
6268 shmat()
6269 ; return 0; }
6270 EOF
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6272   rm -rf conftest*
6273   eval "ac_cv_lib_$ac_lib_var=yes"
6274 else
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   eval "ac_cv_lib_$ac_lib_var=no"
6279 fi
6280 rm -f conftest*
6281 xe_check_libs=""
6282
6283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6284   echo "$ac_t""yes" 1>&6
6285   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6286 else
6287   echo "$ac_t""no" 1>&6
6288 fi
6289
6290
6291     fi
6292   fi
6293
6294   # Check for libraries that X11R6 Xt/Xaw programs need.
6295   ac_save_LDFLAGS="$LDFLAGS"
6296   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6297   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6298   # check for ICE first), but we must link in the order -lSM -lICE or
6299   # we get undefined symbols.  So assume we have SM if we have ICE.
6300   # These have to be linked with before -lX11, unlike the other
6301   # libraries we check for below, so use a different variable.
6302   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6303   
6304 xe_msg_checking="for IceConnectionNumber in -lICE"
6305 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6306 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6307 echo "configure:6308: checking "$xe_msg_checking"" >&5
6308 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6309
6310 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6311 cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314 /* Override any gcc2 internal prototype to avoid an error.  */
6315 /* We use char because int might match the return type of a gcc2
6316     builtin and then its argument prototype would still apply.  */
6317 char IceConnectionNumber();
6318
6319 int main() {
6320 IceConnectionNumber()
6321 ; return 0; }
6322 EOF
6323 if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6324   rm -rf conftest*
6325   eval "ac_cv_lib_$ac_lib_var=yes"
6326 else
6327   echo "configure: failed program was:" >&5
6328   cat conftest.$ac_ext >&5
6329   rm -rf conftest*
6330   eval "ac_cv_lib_$ac_lib_var=no"
6331 fi
6332 rm -f conftest*
6333 xe_check_libs=""
6334
6335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6336   echo "$ac_t""yes" 1>&6
6337   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6338 else
6339   echo "$ac_t""no" 1>&6
6340 fi
6341
6342
6343   LDFLAGS="$ac_save_LDFLAGS"
6344
6345 fi
6346  # Autoconf claims to find X library and include dirs for us.
6347   if test "$no_x" = "yes"
6348   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6349   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6350   fi
6351 fi
6352
6353
6354 if test "$with_x11" = "yes"; then
6355   { test "$extra_verbose" = "yes" && cat << \EOF
6356     Defining HAVE_X_WINDOWS
6357 EOF
6358 cat >> confdefs.h <<\EOF
6359 #define HAVE_X_WINDOWS 1
6360 EOF
6361 }
6362
6363   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6364   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6365
6366
6367     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6368 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6369 echo "configure:6370: checking for Xm/Xm.h" >&5
6370
6371 cat > conftest.$ac_ext <<EOF
6372 #line 6373 "configure"
6373 #include "confdefs.h"
6374 #include <Xm/Xm.h>
6375 EOF
6376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6377 { (eval echo configure:6378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6379 if test -z "$ac_err"; then
6380   rm -rf conftest*
6381   eval "ac_cv_header_$ac_safe=yes"
6382 else
6383   echo "$ac_err" >&5
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   eval "ac_cv_header_$ac_safe=no"
6388 fi
6389 rm -f conftest*
6390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6391   echo "$ac_t""yes" 1>&6
6392   
6393 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6394 echo "configure:6395: checking for XmStringFree in -lXm" >&5
6395 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6396
6397 xe_check_libs=" -lXm "
6398 cat > conftest.$ac_ext <<EOF
6399 #line 6400 "configure"
6400 #include "confdefs.h"
6401 /* Override any gcc2 internal prototype to avoid an error.  */
6402 /* We use char because int might match the return type of a gcc2
6403     builtin and then its argument prototype would still apply.  */
6404 char XmStringFree();
6405
6406 int main() {
6407 XmStringFree()
6408 ; return 0; }
6409 EOF
6410 if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=yes"
6413 else
6414   echo "configure: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=no"
6418 fi
6419 rm -f conftest*
6420 xe_check_libs=""
6421
6422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6423   echo "$ac_t""yes" 1>&6
6424   got_motif=yes
6425 else
6426   echo "$ac_t""no" 1>&6
6427 fi
6428
6429
6430 else
6431   echo "$ac_t""no" 1>&6
6432 fi
6433
6434
6435   if test "$got_motif" != "yes"; then
6436             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6437                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6438       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6439       if test -d "$lib_dir" -a -d "$inc_dir"; then
6440         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6441           x_libraries="$lib_dir $x_libraries"
6442           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6443         esac
6444         case "$x_includes" in "$inc_dir"* ) ;; *)
6445           x_includes="$inc_dir $x_includes"
6446           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6447         esac
6448         break;  fi
6449     done
6450   fi
6451
6452     for rel in "X11R6" "X11R5" "X11R4"; do
6453     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6454     if test -d "$lib_dir" -a -d "$inc_dir"; then
6455       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6456         x_libraries="$x_libraries $lib_dir"
6457         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6458       esac
6459       case "$x_includes" in "$inc_dir"* ) ;; *)
6460         x_includes="$x_includes $inc_dir"
6461         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6462       esac
6463       break;     fi
6464   done
6465
6466     case "$opsys" in
6467   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 ;;
6468   esac
6469
6470   ld_switch_x_site="$X_LIBS"
6471
6472   
6473 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6474     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6475   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6476   
6477         runpath="" runpath_dirs=""
6478   if test -n "$LD_RUN_PATH"; then
6479     runpath="$LD_RUN_PATH"
6480   elif test "$GCC" = "yes"; then
6481         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6482     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6483     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6484     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6485       case "$arg" in P,* | -L* | -R* )
6486         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6487           {
6488 xe_runpath_dir="$dir"
6489   test "$xe_runpath_dir" != "/lib"     -a \
6490         "$xe_runpath_dir" != "/usr/lib" -a \
6491         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6492   eval "$xe_add_unique_runpath_dir"
6493 }
6494         done ;;
6495       esac
6496     done
6497     ld_switch_run="$ld_switch_run_save"
6498     rm -f conftest*
6499   else
6500         for arg in $ld_switch_site $ld_switch_x_site; do
6501       case "$arg" in -L*) {
6502 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6503   test "$xe_runpath_dir" != "/lib"     -a \
6504         "$xe_runpath_dir" != "/usr/lib" -a \
6505         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6506   eval "$xe_add_unique_runpath_dir"
6507 };; esac
6508     done
6509         if test "$opsys $need_motif" = "sol2 yes"; then
6510       xe_runpath_dir="/opt/SUNWdt/lib";
6511       eval "$xe_add_unique_runpath_dir";
6512     fi
6513   fi 
6514   if test -n "$runpath"; then
6515     ld_switch_run="${dash_r}${runpath}"
6516     
6517 if test "$GCC" = "yes"; then
6518   set x $ld_switch_run; shift; ld_switch_run=""
6519   while test -n "$1"; do
6520     case $1 in
6521       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6522       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6523       -Xlinker* ) ;;
6524       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6525     esac
6526     shift
6527   done
6528 fi
6529     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6530   fi
6531 fi
6532
6533
6534   if test "$extra_verbose" = "yes"; then
6535     echo; echo "X11 compilation variables:"
6536     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6537     echo
6538   fi
6539
6540             bitmapdirs=
6541   if test "$x_includes" != NONE; then
6542     for i in $x_includes; do
6543       if test -d "$i/bitmaps"; then
6544         bitmapdirs="$i/bitmaps:$bitmapdirs"
6545       fi
6546       if test -d "$i/X11/bitmaps"; then
6547         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6548       fi
6549     done
6550     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6551   fi
6552   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6553     Defining BITMAPDIR = "$bitmapdirs"
6554 EOF
6555 cat >> confdefs.h <<EOF
6556 #define BITMAPDIR "$bitmapdirs"
6557 EOF
6558 }
6559
6560
6561     echo "checking for X defines extracted by xmkmf" 1>&6
6562 echo "configure:6563: checking for X defines extracted by xmkmf" >&5
6563   rm -fr conftestdir
6564   if mkdir conftestdir; then
6565     cd conftestdir
6566     cat > Imakefile <<'EOF'
6567 xetest:
6568         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6569 EOF
6570     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6571       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6572       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6573     fi
6574     cd ..
6575     rm -fr conftestdir
6576     for word in $xmkmf_defines; do
6577       case "$word" in 
6578       -D__STDC__*) ;;
6579       -D* )
6580         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6581         case "$word" in
6582           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6583           *     ) val=1 ;;
6584         esac
6585         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6586           if test "$val" = "1"
6587             then { test "$extra_verbose" = "yes" && cat << EOF
6588     Defining $sym
6589 EOF
6590 cat >> confdefs.h <<EOF
6591 #define $sym 1
6592 EOF
6593 }
6594
6595             else { test "$extra_verbose" = "yes" && cat << EOF
6596     Defining $sym = $val
6597 EOF
6598 cat >> confdefs.h <<EOF
6599 #define $sym $val
6600 EOF
6601 }
6602
6603           fi
6604         fi  ;;
6605       esac
6606     done
6607   fi
6608
6609     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6610 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6611 echo "configure:6612: checking for X11/Intrinsic.h" >&5
6612
6613 cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 #include <X11/Intrinsic.h>
6617 EOF
6618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6619 { (eval echo configure:6620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6621 if test -z "$ac_err"; then
6622   rm -rf conftest*
6623   eval "ac_cv_header_$ac_safe=yes"
6624 else
6625   echo "$ac_err" >&5
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_header_$ac_safe=no"
6630 fi
6631 rm -f conftest*
6632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6633   echo "$ac_t""yes" 1>&6
6634   :
6635 else
6636   echo "$ac_t""no" 1>&6
6637 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6638 fi
6639
6640
6641       
6642 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6643 echo "configure:6644: checking for XOpenDisplay in -lX11" >&5
6644 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6645
6646 xe_check_libs=" -lX11 "
6647 cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 /* Override any gcc2 internal prototype to avoid an error.  */
6651 /* We use char because int might match the return type of a gcc2
6652     builtin and then its argument prototype would still apply.  */
6653 char XOpenDisplay();
6654
6655 int main() {
6656 XOpenDisplay()
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660   rm -rf conftest*
6661   eval "ac_cv_lib_$ac_lib_var=yes"
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=no"
6667 fi
6668 rm -f conftest*
6669 xe_check_libs=""
6670
6671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6672   echo "$ac_t""yes" 1>&6
6673   have_lib_x11=yes
6674 else
6675   echo "$ac_t""no" 1>&6
6676 fi
6677
6678
6679   if test "$have_lib_x11" != "yes"; then
6680     
6681 xe_msg_checking="for XGetFontProperty in -lX11"
6682 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6683 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6684 echo "configure:6685: checking "$xe_msg_checking"" >&5
6685 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6686
6687 xe_check_libs=" -lX11 -b i486-linuxaout"
6688 cat > conftest.$ac_ext <<EOF
6689 #line 6690 "configure"
6690 #include "confdefs.h"
6691 /* Override any gcc2 internal prototype to avoid an error.  */
6692 /* We use char because int might match the return type of a gcc2
6693     builtin and then its argument prototype would still apply.  */
6694 char XGetFontProperty();
6695
6696 int main() {
6697 XGetFontProperty()
6698 ; return 0; }
6699 EOF
6700 if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6701   rm -rf conftest*
6702   eval "ac_cv_lib_$ac_lib_var=yes"
6703 else
6704   echo "configure: failed program was:" >&5
6705   cat conftest.$ac_ext >&5
6706   rm -rf conftest*
6707   eval "ac_cv_lib_$ac_lib_var=no"
6708 fi
6709 rm -f conftest*
6710 xe_check_libs=""
6711
6712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6713   echo "$ac_t""yes" 1>&6
6714   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6715 else
6716   echo "$ac_t""no" 1>&6
6717 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6718 fi
6719
6720
6721   fi
6722   libs_x="-lX11"
6723   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6724
6725     
6726 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6727 echo "configure:6728: checking for XShapeSelectInput in -lXext" >&5
6728 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6729
6730 xe_check_libs=" -lXext "
6731 cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 /* Override any gcc2 internal prototype to avoid an error.  */
6735 /* We use char because int might match the return type of a gcc2
6736     builtin and then its argument prototype would still apply.  */
6737 char XShapeSelectInput();
6738
6739 int main() {
6740 XShapeSelectInput()
6741 ; return 0; }
6742 EOF
6743 if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6744   rm -rf conftest*
6745   eval "ac_cv_lib_$ac_lib_var=yes"
6746 else
6747   echo "configure: failed program was:" >&5
6748   cat conftest.$ac_ext >&5
6749   rm -rf conftest*
6750   eval "ac_cv_lib_$ac_lib_var=no"
6751 fi
6752 rm -f conftest*
6753 xe_check_libs=""
6754
6755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6756   echo "$ac_t""yes" 1>&6
6757   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6758 else
6759   echo "$ac_t""no" 1>&6
6760 fi
6761
6762
6763
6764     
6765 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6766 echo "configure:6767: checking for XtOpenDisplay in -lXt" >&5
6767 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6768
6769 xe_check_libs=" -lXt "
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* Override any gcc2 internal prototype to avoid an error.  */
6774 /* We use char because int might match the return type of a gcc2
6775     builtin and then its argument prototype would still apply.  */
6776 char XtOpenDisplay();
6777
6778 int main() {
6779 XtOpenDisplay()
6780 ; return 0; }
6781 EOF
6782 if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6783   rm -rf conftest*
6784   eval "ac_cv_lib_$ac_lib_var=yes"
6785 else
6786   echo "configure: failed program was:" >&5
6787   cat conftest.$ac_ext >&5
6788   rm -rf conftest*
6789   eval "ac_cv_lib_$ac_lib_var=no"
6790 fi
6791 rm -f conftest*
6792 xe_check_libs=""
6793
6794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6795   echo "$ac_t""yes" 1>&6
6796   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6797 else
6798   echo "$ac_t""no" 1>&6
6799 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6800 fi
6801
6802
6803
6804   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6805 echo "configure:6806: checking the version of X11 being used" >&5
6806   cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 #include <X11/Intrinsic.h>
6810     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6813 then
6814   ./conftest foobar; x11_release=$?
6815 else
6816   conftest_rc="$?"
6817   echo "configure: failed program was:" >&5
6818   cat conftest.$ac_ext >&5
6819   rm -fr conftest*
6820   x11_release=4
6821 fi
6822 rm -fr conftest*
6823   echo "$ac_t""R${x11_release}" 1>&6
6824   { test "$extra_verbose" = "yes" && cat << EOF
6825     Defining THIS_IS_X11R${x11_release}
6826 EOF
6827 cat >> confdefs.h <<EOF
6828 #define THIS_IS_X11R${x11_release} 1
6829 EOF
6830 }
6831
6832
6833   if test "${x11_release}" = "4"; then
6834     case "$with_widgets" in
6835       "" | "no") with_widgets=no ;;
6836       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6837     esac
6838   fi
6839
6840   for ac_func in XConvertCase
6841 do
6842 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6843 echo "configure:6844: checking for $ac_func" >&5
6844
6845 cat > conftest.$ac_ext <<EOF
6846 #line 6847 "configure"
6847 #include "confdefs.h"
6848 /* System header to define __stub macros and hopefully few prototypes,
6849     which can conflict with char $ac_func(); below.  */
6850 #include <assert.h>
6851 /* Override any gcc2 internal prototype to avoid an error.  */
6852 /* We use char because int might match the return type of a gcc2
6853     builtin and then its argument prototype would still apply.  */
6854 char $ac_func();
6855
6856 int main() {
6857
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862 choke me
6863 #else
6864 $ac_func();
6865 #endif
6866
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_func_$ac_func=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_func_$ac_func=no"
6877 fi
6878 rm -f conftest*
6879
6880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6881   echo "$ac_t""yes" 1>&6
6882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6883   { test "$extra_verbose" = "yes" && cat << EOF
6884     Defining $ac_tr_func
6885 EOF
6886 cat >> confdefs.h <<EOF
6887 #define $ac_tr_func 1
6888 EOF
6889 }
6890  
6891 else
6892   echo "$ac_t""no" 1>&6
6893 fi
6894 done
6895
6896
6897   for ac_hdr in X11/Xlocale.h
6898 do
6899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6901 echo "configure:6902: checking for $ac_hdr" >&5
6902
6903 cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <$ac_hdr>
6907 EOF
6908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6909 { (eval echo configure:6910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6911 if test -z "$ac_err"; then
6912   rm -rf conftest*
6913   eval "ac_cv_header_$ac_safe=yes"
6914 else
6915   echo "$ac_err" >&5
6916   echo "configure: failed program was:" >&5
6917   cat conftest.$ac_ext >&5
6918   rm -rf conftest*
6919   eval "ac_cv_header_$ac_safe=no"
6920 fi
6921 rm -f conftest*
6922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6923   echo "$ac_t""yes" 1>&6
6924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6925   { test "$extra_verbose" = "yes" && cat << EOF
6926     Defining $ac_tr_hdr
6927 EOF
6928 cat >> confdefs.h <<EOF
6929 #define $ac_tr_hdr 1
6930 EOF
6931 }
6932  
6933 else
6934   echo "$ac_t""no" 1>&6
6935 fi
6936 done
6937
6938
6939     for ac_func in XRegisterIMInstantiateCallback
6940 do
6941 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6942 echo "configure:6943: checking for $ac_func" >&5
6943
6944 cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947 /* System header to define __stub macros and hopefully few prototypes,
6948     which can conflict with char $ac_func(); below.  */
6949 #include <assert.h>
6950 /* Override any gcc2 internal prototype to avoid an error.  */
6951 /* We use char because int might match the return type of a gcc2
6952     builtin and then its argument prototype would still apply.  */
6953 char $ac_func();
6954
6955 int main() {
6956
6957 /* The GNU C library defines this for functions which it implements
6958     to always fail with ENOSYS.  Some functions are actually named
6959     something starting with __ and the normal name is an alias.  */
6960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6961 choke me
6962 #else
6963 $ac_func();
6964 #endif
6965
6966 ; return 0; }
6967 EOF
6968 if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6969   rm -rf conftest*
6970   eval "ac_cv_func_$ac_func=yes"
6971 else
6972   echo "configure: failed program was:" >&5
6973   cat conftest.$ac_ext >&5
6974   rm -rf conftest*
6975   eval "ac_cv_func_$ac_func=no"
6976 fi
6977 rm -f conftest*
6978
6979 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6980   echo "$ac_t""yes" 1>&6
6981     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6982   { test "$extra_verbose" = "yes" && cat << EOF
6983     Defining $ac_tr_func
6984 EOF
6985 cat >> confdefs.h <<EOF
6986 #define $ac_tr_func 1
6987 EOF
6988 }
6989  
6990 else
6991   echo "$ac_t""no" 1>&6
6992 fi
6993 done
6994
6995   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6996 echo "configure:6997: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6997   cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000
7001 #define NeedFunctionPrototypes 1
7002 #include <X11/Xlib.h>
7003 extern Bool XRegisterIMInstantiateCallback(
7004    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7005
7006 int main() {
7007
7008 ; return 0; }
7009 EOF
7010 if { (eval echo configure:7011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7011   rm -rf conftest*
7012   echo "$ac_t""yes" 1>&6
7013 else
7014   echo "configure: failed program was:" >&5
7015   cat conftest.$ac_ext >&5
7016   rm -rf conftest*
7017   echo "$ac_t""no" 1>&6
7018    { test "$extra_verbose" = "yes" && cat << \EOF
7019     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7020 EOF
7021 cat >> confdefs.h <<\EOF
7022 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7023 EOF
7024 }
7025
7026 fi
7027 rm -f conftest*
7028
7029     test -z "$with_xmu" && { 
7030 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7031 echo "configure:7032: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7032 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7033
7034 xe_check_libs=" -lXmu "
7035 cat > conftest.$ac_ext <<EOF
7036 #line 7037 "configure"
7037 #include "confdefs.h"
7038 /* Override any gcc2 internal prototype to avoid an error.  */
7039 /* We use char because int might match the return type of a gcc2
7040     builtin and then its argument prototype would still apply.  */
7041 char XmuReadBitmapDataFromFile();
7042
7043 int main() {
7044 XmuReadBitmapDataFromFile()
7045 ; return 0; }
7046 EOF
7047 if { (eval echo configure:7048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7048   rm -rf conftest*
7049   eval "ac_cv_lib_$ac_lib_var=yes"
7050 else
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -rf conftest*
7054   eval "ac_cv_lib_$ac_lib_var=no"
7055 fi
7056 rm -f conftest*
7057 xe_check_libs=""
7058
7059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7060   echo "$ac_t""yes" 1>&6
7061   with_xmu=yes
7062 else
7063   echo "$ac_t""no" 1>&6
7064 with_xmu=no
7065 fi
7066
7067  }
7068   if test "$with_xmu" = "no"; then
7069     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7070    echo "    xemacs will be linked with \"xmu.o\""
7071  fi
7072   else
7073     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7074     { test "$extra_verbose" = "yes" && cat << \EOF
7075     Defining HAVE_XMU
7076 EOF
7077 cat >> confdefs.h <<\EOF
7078 #define HAVE_XMU 1
7079 EOF
7080 }
7081
7082   fi
7083
7084       
7085 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7086 echo "configure:7087: checking for main in -lXbsd" >&5
7087 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7088
7089 xe_check_libs=" -lXbsd "
7090 cat > conftest.$ac_ext <<EOF
7091 #line 7092 "configure"
7092 #include "confdefs.h"
7093
7094 int main() {
7095 main()
7096 ; return 0; }
7097 EOF
7098 if { (eval echo configure:7099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7099   rm -rf conftest*
7100   eval "ac_cv_lib_$ac_lib_var=yes"
7101 else
7102   echo "configure: failed program was:" >&5
7103   cat conftest.$ac_ext >&5
7104   rm -rf conftest*
7105   eval "ac_cv_lib_$ac_lib_var=no"
7106 fi
7107 rm -f conftest*
7108 xe_check_libs=""
7109
7110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7111   echo "$ac_t""yes" 1>&6
7112   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7113 else
7114   echo "$ac_t""no" 1>&6
7115 fi
7116
7117
7118
7119     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7120         if test "$GCC" = "yes"; then
7121                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7122 echo "configure:7123: checking for name of AIX gcc threads option" >&5
7123       case `$CC -v --help 2>&1` in
7124         *-mthreads*) aix_threads=-mthreads ;;
7125                   *) aix_threads=-pthread  ;;
7126       esac
7127       echo "$ac_t""$aix_threads" 1>&6
7128       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7129       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7130     else
7131             case "$CC" in *_r) : ;;
7132         *)
7133          xe_save_CC="$CC"
7134          CC="${CC}_r"
7135          echo $ac_n "checking size of short""... $ac_c" 1>&6
7136 echo "configure:7137: checking size of short" >&5
7137
7138 cat > conftest.$ac_ext <<EOF
7139 #line 7140 "configure"
7140 #include "confdefs.h"
7141 #include <stdio.h>
7142 main()
7143 {
7144   FILE *f=fopen("conftestval", "w");
7145   if (!f) exit(1);
7146   fprintf(f, "%d\n", sizeof(short));
7147   exit(0);
7148 }
7149 EOF
7150 if { (eval echo configure:7151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7151 then
7152   ac_cv_sizeof_short=`cat conftestval`
7153 else
7154   conftest_rc="$?"
7155   echo "configure: failed program was:" >&5
7156   cat conftest.$ac_ext >&5
7157   rm -fr conftest*
7158   ac_cv_sizeof_short=0
7159 fi
7160 rm -fr conftest*
7161 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7162 { test "$extra_verbose" = "yes" && cat << EOF
7163     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7164 EOF
7165 cat >> confdefs.h <<EOF
7166 #define SIZEOF_SHORT $ac_cv_sizeof_short
7167 EOF
7168 }
7169
7170
7171          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7172       esac
7173     fi
7174   fi
7175
7176 fi 
7177 if test "$with_msw" != "no"; then
7178   echo "checking for MS-Windows" 1>&6
7179 echo "configure:7180: checking for MS-Windows" >&5
7180   
7181 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7182 echo "configure:7183: checking for main in -lgdi32" >&5
7183 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7184
7185 xe_check_libs=" -lgdi32 "
7186 cat > conftest.$ac_ext <<EOF
7187 #line 7188 "configure"
7188 #include "confdefs.h"
7189
7190 int main() {
7191 main()
7192 ; return 0; }
7193 EOF
7194 if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7195   rm -rf conftest*
7196   eval "ac_cv_lib_$ac_lib_var=yes"
7197 else
7198   echo "configure: failed program was:" >&5
7199   cat conftest.$ac_ext >&5
7200   rm -rf conftest*
7201   eval "ac_cv_lib_$ac_lib_var=no"
7202 fi
7203 rm -f conftest*
7204 xe_check_libs=""
7205
7206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7207   echo "$ac_t""yes" 1>&6
7208   with_msw=yes
7209 else
7210   echo "$ac_t""no" 1>&6
7211 fi
7212
7213
7214   if test "$with_msw" = "yes"; then
7215     { test "$extra_verbose" = "yes" && cat << \EOF
7216     Defining HAVE_MS_WINDOWS
7217 EOF
7218 cat >> confdefs.h <<\EOF
7219 #define HAVE_MS_WINDOWS 1
7220 EOF
7221 }
7222
7223
7224         if test "$with_netinstall" = "yes"; then
7225       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7226       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7227       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7228     fi
7229
7230     install_pp="$blddir/lib-src/installexe.sh"
7231     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
7232     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7233     if test "$window_system" != x11; then
7234         window_system=msw
7235         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7236             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7237    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7238  fi
7239         test "$with_menubars"   != "no" && with_menubars=msw \
7240             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7241    echo "    xemacs will be linked with \"menubar-msw.o\""
7242  fi
7243         test "$with_toolbars"   != "no" && with_toolbars=msw \
7244             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7245    echo "    xemacs will be linked with \"toolbar-msw.o\""
7246  fi
7247         test "$with_dialogs"   != "no" && with_dialogs=msw \
7248             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7249    echo "    xemacs will be linked with \"dialog-msw.o\""
7250  fi
7251         test "$with_widgets"   != "no" && with_widgets=msw
7252     else
7253         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7254    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7255  fi
7256         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7257    echo "    xemacs will be linked with \"menubar-msw.o\""
7258  fi
7259         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7260    echo "    xemacs will be linked with \"toolbar-msw.o\""
7261  fi
7262         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7263    echo "    xemacs will be linked with \"dialog-msw.o\""
7264  fi
7265     fi
7266         cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 #include <fcntl.h>
7270     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7273 then
7274   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7275     Defining HAVE_MSG_SELECT
7276 EOF
7277 cat >> confdefs.h <<\EOF
7278 #define HAVE_MSG_SELECT 1
7279 EOF
7280 }
7281
7282 else
7283   conftest_rc="$?"
7284   echo "configure: failed program was:" >&5
7285   cat conftest.$ac_ext >&5
7286 fi
7287 rm -fr conftest*
7288     with_file_coding=yes
7289     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
7290    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\""
7291  fi
7292   fi
7293 fi
7294
7295
7296
7297 test -z "$window_system" && window_system="none"
7298
7299 if test "$window_system" = "none"; then
7300   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7301   do
7302     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7303        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7304     fi
7305     eval "with_${feature}=no"
7306   done
7307 else
7308   test -z "$with_toolbars" && with_toolbars=yes
7309 fi
7310
7311 if test "$with_msw" != "yes"; then
7312   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7313   do
7314     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7315        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7316     fi
7317     eval "with_${feature}=no"
7318   done
7319 else
7320   :
7321 fi
7322
7323 if test "$with_x11" != "yes"; then
7324             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7325   do
7326     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7327        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7328     fi
7329     eval "with_${feature}=no"
7330   done
7331 fi
7332
7333 if test "$with_x11" = "yes"; then
7334   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7335 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7336 echo "configure:7337: checking for X11/extensions/shape.h" >&5
7337
7338 cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341 #include <X11/extensions/shape.h>
7342 EOF
7343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7344 { (eval echo configure:7345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7346 if test -z "$ac_err"; then
7347   rm -rf conftest*
7348   eval "ac_cv_header_$ac_safe=yes"
7349 else
7350   echo "$ac_err" >&5
7351   echo "configure: failed program was:" >&5
7352   cat conftest.$ac_ext >&5
7353   rm -rf conftest*
7354   eval "ac_cv_header_$ac_safe=no"
7355 fi
7356 rm -f conftest*
7357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7358   echo "$ac_t""yes" 1>&6
7359   
7360    { test "$extra_verbose" = "yes" && cat << \EOF
7361     Defining HAVE_BALLOON_HELP
7362 EOF
7363 cat >> confdefs.h <<\EOF
7364 #define HAVE_BALLOON_HELP 1
7365 EOF
7366 }
7367
7368    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7369    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7370  fi
7371 else
7372   echo "$ac_t""no" 1>&6
7373 fi
7374
7375 fi
7376
7377 bitmapdir=
7378
7379 case "$window_system" in
7380   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7381   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7382   gtk  )
7383        HAVE_X_WINDOWS=no
7384        test "$with_gnome" = "yes" && echo "  Using GNOME."
7385        test "$with_gnome" = "no" && echo "  Using GTK."
7386        ;;
7387   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7388 esac
7389
7390 case "$x_libraries" in *X11R4* )
7391   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7392   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7393 esac
7394
7395 echo "checking for WM_COMMAND option" 1>&6
7396 echo "configure:7397: checking for WM_COMMAND option" >&5;
7397 if test "$with_wmcommand" != "no"; then
7398   { test "$extra_verbose" = "yes" && cat << \EOF
7399     Defining HAVE_WMCOMMAND
7400 EOF
7401 cat >> confdefs.h <<\EOF
7402 #define HAVE_WMCOMMAND 1
7403 EOF
7404 }
7405
7406 fi
7407
7408 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7409 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7410 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7411 echo "configure:7412: checking for X11/Xauth.h" >&5
7412
7413 cat > conftest.$ac_ext <<EOF
7414 #line 7415 "configure"
7415 #include "confdefs.h"
7416 #include <X11/Xauth.h>
7417 EOF
7418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7419 { (eval echo configure:7420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7421 if test -z "$ac_err"; then
7422   rm -rf conftest*
7423   eval "ac_cv_header_$ac_safe=yes"
7424 else
7425   echo "$ac_err" >&5
7426   echo "configure: failed program was:" >&5
7427   cat conftest.$ac_ext >&5
7428   rm -rf conftest*
7429   eval "ac_cv_header_$ac_safe=no"
7430 fi
7431 rm -f conftest*
7432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434   :
7435 else
7436   echo "$ac_t""no" 1>&6
7437 with_xauth=no
7438 fi
7439  }
7440 test -z "$with_xauth" && { 
7441 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7442 echo "configure:7443: checking for XauGetAuthByAddr in -lXau" >&5
7443 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7444
7445 xe_check_libs=" -lXau "
7446 cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 /* Override any gcc2 internal prototype to avoid an error.  */
7450 /* We use char because int might match the return type of a gcc2
7451     builtin and then its argument prototype would still apply.  */
7452 char XauGetAuthByAddr();
7453
7454 int main() {
7455 XauGetAuthByAddr()
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7459   rm -rf conftest*
7460   eval "ac_cv_lib_$ac_lib_var=yes"
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   eval "ac_cv_lib_$ac_lib_var=no"
7466 fi
7467 rm -f conftest*
7468 xe_check_libs=""
7469
7470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7471   echo "$ac_t""yes" 1>&6
7472   :
7473 else
7474   echo "$ac_t""no" 1>&6
7475 with_xauth=no
7476 fi
7477
7478  }
7479 test -z "$with_xauth" && with_xauth=yes
7480 if test "$with_xauth" = "yes"; then
7481   { test "$extra_verbose" = "yes" && cat << \EOF
7482     Defining HAVE_XAUTH
7483 EOF
7484 cat >> confdefs.h <<\EOF
7485 #define HAVE_XAUTH 1
7486 EOF
7487 }
7488
7489   
7490 T=""
7491 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
7492 libs_xauth="$T"
7493
7494 fi
7495
7496
7497
7498
7499 if test "$with_tooltalk" != "no" ; then
7500       for dir in "" "Tt/" "desktop/" ; do
7501     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7502 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7503 echo "configure:7504: checking for ${dir}tt_c.h" >&5
7504
7505 cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 #include <${dir}tt_c.h>
7509 EOF
7510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7511 { (eval echo configure:7512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7513 if test -z "$ac_err"; then
7514   rm -rf conftest*
7515   eval "ac_cv_header_$ac_safe=yes"
7516 else
7517   echo "$ac_err" >&5
7518   echo "configure: failed program was:" >&5
7519   cat conftest.$ac_ext >&5
7520   rm -rf conftest*
7521   eval "ac_cv_header_$ac_safe=no"
7522 fi
7523 rm -f conftest*
7524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7525   echo "$ac_t""yes" 1>&6
7526   tt_c_h_file="${dir}tt_c.h"; break
7527 else
7528   echo "$ac_t""no" 1>&6
7529 fi
7530
7531   done
7532   if test -z "$tt_c_h_file"; then
7533     if test "$with_tooltalk" = "yes"; then
7534       (echo "$progname: Usage error:"
7535 echo " " "Unable to find required tooltalk header files."
7536 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7537     fi
7538     with_tooltalk=no
7539   fi
7540 fi
7541 if test "$with_tooltalk" != "no" ; then
7542   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7543     
7544 xe_msg_checking="for tt_message_create in -ltt"
7545 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7546 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7547 echo "configure:7548: checking "$xe_msg_checking"" >&5
7548 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7549
7550 xe_check_libs=" -ltt $extra_libs"
7551 cat > conftest.$ac_ext <<EOF
7552 #line 7553 "configure"
7553 #include "confdefs.h"
7554 /* Override any gcc2 internal prototype to avoid an error.  */
7555 /* We use char because int might match the return type of a gcc2
7556     builtin and then its argument prototype would still apply.  */
7557 char tt_message_create();
7558
7559 int main() {
7560 tt_message_create()
7561 ; return 0; }
7562 EOF
7563 if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7564   rm -rf conftest*
7565   eval "ac_cv_lib_$ac_lib_var=yes"
7566 else
7567   echo "configure: failed program was:" >&5
7568   cat conftest.$ac_ext >&5
7569   rm -rf conftest*
7570   eval "ac_cv_lib_$ac_lib_var=no"
7571 fi
7572 rm -f conftest*
7573 xe_check_libs=""
7574
7575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7576   echo "$ac_t""yes" 1>&6
7577   tt_libs="-ltt $extra_libs"; break
7578 else
7579   echo "$ac_t""no" 1>&6
7580 :
7581 fi
7582
7583
7584   done
7585   if test -z "$tt_libs"; then
7586     if test "$with_tooltalk" = "yes"; then
7587       (echo "$progname: Usage error:"
7588 echo " " "Unable to find required tooltalk libraries."
7589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7590     fi
7591     with_tooltalk=no
7592   fi
7593 fi
7594 test -z "$with_tooltalk" && with_tooltalk=yes
7595 if test "$with_tooltalk" = "yes"; then
7596   { test "$extra_verbose" = "yes" && cat << \EOF
7597     Defining TOOLTALK
7598 EOF
7599 cat >> confdefs.h <<\EOF
7600 #define TOOLTALK 1
7601 EOF
7602 }
7603
7604   { test "$extra_verbose" = "yes" && cat << EOF
7605     Defining TT_C_H_FILE = "$tt_c_h_file"
7606 EOF
7607 cat >> confdefs.h <<EOF
7608 #define TT_C_H_FILE "$tt_c_h_file"
7609 EOF
7610 }
7611
7612   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7613   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7614    echo "    xemacs will be linked with \"tooltalk.o\""
7615  fi
7616 fi
7617
7618 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7619 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7620 echo "configure:7621: checking for Dt/Dt.h" >&5
7621
7622 cat > conftest.$ac_ext <<EOF
7623 #line 7624 "configure"
7624 #include "confdefs.h"
7625 #include <Dt/Dt.h>
7626 EOF
7627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7628 { (eval echo configure:7629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7630 if test -z "$ac_err"; then
7631   rm -rf conftest*
7632   eval "ac_cv_header_$ac_safe=yes"
7633 else
7634   echo "$ac_err" >&5
7635   echo "configure: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   rm -rf conftest*
7638   eval "ac_cv_header_$ac_safe=no"
7639 fi
7640 rm -f conftest*
7641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7642   echo "$ac_t""yes" 1>&6
7643   :
7644 else
7645   echo "$ac_t""no" 1>&6
7646 with_cde=no
7647 fi
7648  }
7649 test -z "$with_cde" && { 
7650 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7651 echo "configure:7652: checking for DtDndDragStart in -lDtSvc" >&5
7652 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7653
7654 xe_check_libs=" -lDtSvc "
7655 cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* Override any gcc2 internal prototype to avoid an error.  */
7659 /* We use char because int might match the return type of a gcc2
7660     builtin and then its argument prototype would still apply.  */
7661 char DtDndDragStart();
7662
7663 int main() {
7664 DtDndDragStart()
7665 ; return 0; }
7666 EOF
7667 if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7668   rm -rf conftest*
7669   eval "ac_cv_lib_$ac_lib_var=yes"
7670 else
7671   echo "configure: failed program was:" >&5
7672   cat conftest.$ac_ext >&5
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=no"
7675 fi
7676 rm -f conftest*
7677 xe_check_libs=""
7678
7679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7680   echo "$ac_t""yes" 1>&6
7681   :
7682 else
7683   echo "$ac_t""no" 1>&6
7684 with_cde=no
7685 fi
7686
7687  }
7688 test -z "$with_cde" && with_cde=yes
7689 if test "$with_dragndrop" = no; then
7690   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7691   with_cde=no
7692 fi
7693 if test "$with_cde" = "yes" ; then
7694   { test "$extra_verbose" = "yes" && cat << \EOF
7695     Defining HAVE_CDE
7696 EOF
7697 cat >> confdefs.h <<\EOF
7698 #define HAVE_CDE 1
7699 EOF
7700 }
7701
7702   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7703   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7704   with_tooltalk=yes # CDE requires Tooltalk
7705   need_motif=yes    # CDE requires Motif
7706 fi
7707
7708 test "$window_system" != "x11" && with_offix=no
7709 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7710   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7711   with_offix=no
7712 fi
7713 if test "$with_dragndrop" = no; then
7714   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7715   with_offix=no
7716 fi
7717 if test "$with_cde" = yes; then
7718   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7719   with_offix=no
7720 fi
7721 test -z "$with_offix" && with_offix=no
7722 if test "$with_offix" = "yes"; then
7723   { test "$extra_verbose" = "yes" && cat << \EOF
7724     Defining HAVE_OFFIX_DND
7725 EOF
7726 cat >> confdefs.h <<\EOF
7727 #define HAVE_OFFIX_DND 1
7728 EOF
7729 }
7730
7731   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7732   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7733 fi
7734 if test "$with_gtk" = "yes"; then
7735    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7736 fi
7737
7738 if test "$with_dragndrop" != "no" ; then
7739   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7740 echo "configure:7741: checking if drag and drop API is needed" >&5
7741   if test -n "$dragndrop_proto" ; then
7742     with_dragndrop=yes
7743     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7744     { test "$extra_verbose" = "yes" && cat << \EOF
7745     Defining HAVE_DRAGNDROP
7746 EOF
7747 cat >> confdefs.h <<\EOF
7748 #define HAVE_DRAGNDROP 1
7749 EOF
7750 }
7751
7752     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7753   else
7754     with_dragndrop=no
7755     echo "$ac_t""no" 1>&6
7756   fi
7757 fi
7758
7759 echo "checking for LDAP" 1>&6
7760 echo "configure:7761: checking for LDAP" >&5
7761 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7762 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7763 echo "configure:7764: checking for ldap.h" >&5
7764
7765 cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 #include <ldap.h>
7769 EOF
7770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7771 { (eval echo configure:7772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7773 if test -z "$ac_err"; then
7774   rm -rf conftest*
7775   eval "ac_cv_header_$ac_safe=yes"
7776 else
7777   echo "$ac_err" >&5
7778   echo "configure: failed program was:" >&5
7779   cat conftest.$ac_ext >&5
7780   rm -rf conftest*
7781   eval "ac_cv_header_$ac_safe=no"
7782 fi
7783 rm -f conftest*
7784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7785   echo "$ac_t""yes" 1>&6
7786   :
7787 else
7788   echo "$ac_t""no" 1>&6
7789 with_ldap=no
7790 fi
7791  }
7792 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7793 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7794 echo "configure:7795: checking for lber.h" >&5
7795
7796 cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799 #include <lber.h>
7800 EOF
7801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7802 { (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7804 if test -z "$ac_err"; then
7805   rm -rf conftest*
7806   eval "ac_cv_header_$ac_safe=yes"
7807 else
7808   echo "$ac_err" >&5
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_header_$ac_safe=no"
7813 fi
7814 rm -f conftest*
7815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7816   echo "$ac_t""yes" 1>&6
7817   :
7818 else
7819   echo "$ac_t""no" 1>&6
7820 with_ldap=no
7821 fi
7822  }
7823 if test "$with_ldap" != "no"; then
7824   
7825 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7826 echo "configure:7827: checking for ldap_search in -lldap" >&5
7827 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7828
7829 xe_check_libs=" -lldap "
7830 cat > conftest.$ac_ext <<EOF
7831 #line 7832 "configure"
7832 #include "confdefs.h"
7833 /* Override any gcc2 internal prototype to avoid an error.  */
7834 /* We use char because int might match the return type of a gcc2
7835     builtin and then its argument prototype would still apply.  */
7836 char ldap_search();
7837
7838 int main() {
7839 ldap_search()
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7843   rm -rf conftest*
7844   eval "ac_cv_lib_$ac_lib_var=yes"
7845 else
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849   eval "ac_cv_lib_$ac_lib_var=no"
7850 fi
7851 rm -f conftest*
7852 xe_check_libs=""
7853
7854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7855   echo "$ac_t""yes" 1>&6
7856   with_ldap_nolber=yes
7857 else
7858   echo "$ac_t""no" 1>&6
7859 with_ldap_nolber=no
7860 fi
7861
7862
7863   test "$with_ldap_nolber" = "no" && { 
7864 xe_msg_checking="for ldap_open in -lldap"
7865 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7866 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7867 echo "configure:7868: checking "$xe_msg_checking"" >&5
7868 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7869
7870 xe_check_libs=" -lldap -llber"
7871 cat > conftest.$ac_ext <<EOF
7872 #line 7873 "configure"
7873 #include "confdefs.h"
7874 /* Override any gcc2 internal prototype to avoid an error.  */
7875 /* We use char because int might match the return type of a gcc2
7876     builtin and then its argument prototype would still apply.  */
7877 char ldap_open();
7878
7879 int main() {
7880 ldap_open()
7881 ; return 0; }
7882 EOF
7883 if { (eval echo configure:7884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7884   rm -rf conftest*
7885   eval "ac_cv_lib_$ac_lib_var=yes"
7886 else
7887   echo "configure: failed program was:" >&5
7888   cat conftest.$ac_ext >&5
7889   rm -rf conftest*
7890   eval "ac_cv_lib_$ac_lib_var=no"
7891 fi
7892 rm -f conftest*
7893 xe_check_libs=""
7894
7895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7896   echo "$ac_t""yes" 1>&6
7897   with_ldap_lber=yes
7898 else
7899   echo "$ac_t""no" 1>&6
7900 with_ldap_lber=no
7901 fi
7902
7903  }
7904   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7905 xe_msg_checking="for ldap_open in -lldap"
7906 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7907 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7908 echo "configure:7909: checking "$xe_msg_checking"" >&5
7909 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7910
7911 xe_check_libs=" -lldap -llber -lkrb"
7912 cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* Override any gcc2 internal prototype to avoid an error.  */
7916 /* We use char because int might match the return type of a gcc2
7917     builtin and then its argument prototype would still apply.  */
7918 char ldap_open();
7919
7920 int main() {
7921 ldap_open()
7922 ; return 0; }
7923 EOF
7924 if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7925   rm -rf conftest*
7926   eval "ac_cv_lib_$ac_lib_var=yes"
7927 else
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -rf conftest*
7931   eval "ac_cv_lib_$ac_lib_var=no"
7932 fi
7933 rm -f conftest*
7934 xe_check_libs=""
7935
7936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7937   echo "$ac_t""yes" 1>&6
7938   with_ldap_krb=yes
7939 else
7940   echo "$ac_t""no" 1>&6
7941 with_ldap_krb=no
7942 fi
7943
7944  }
7945   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7946 xe_msg_checking="for ldap_open in -lldap"
7947 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7948 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7949 echo "configure:7950: checking "$xe_msg_checking"" >&5
7950 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7951
7952 xe_check_libs=" -lldap -llber -lkrb -ldes"
7953 cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956 /* Override any gcc2 internal prototype to avoid an error.  */
7957 /* We use char because int might match the return type of a gcc2
7958     builtin and then its argument prototype would still apply.  */
7959 char ldap_open();
7960
7961 int main() {
7962 ldap_open()
7963 ; return 0; }
7964 EOF
7965 if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=yes"
7968 else
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=no"
7973 fi
7974 rm -f conftest*
7975 xe_check_libs=""
7976
7977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7978   echo "$ac_t""yes" 1>&6
7979   with_ldap_krbdes=yes
7980 else
7981   echo "$ac_t""no" 1>&6
7982 with_ldap_krbdes=no
7983 fi
7984
7985  }
7986   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
7987 fi
7988 if test "$with_ldap" = "yes"; then
7989   { test "$extra_verbose" = "yes" && cat << \EOF
7990     Defining HAVE_LDAP
7991 EOF
7992 cat >> confdefs.h <<\EOF
7993 #define HAVE_LDAP 1
7994 EOF
7995 }
7996
7997   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7998    echo "    xemacs will be linked with \"eldap.o\""
7999  fi
8000   if test "$with_ldap_nolber" = "yes" ; then
8001     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8002   else
8003     if test "$with_ldap_krb" = "yes" ; then
8004       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8005     fi
8006     if test "$with_ldap_krbdes" = "yes" ; then
8007       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8008       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8009     fi
8010     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8011     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8012   fi
8013   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8014 do
8015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8016 echo "configure:8017: checking for $ac_func" >&5
8017
8018 cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 /* System header to define __stub macros and hopefully few prototypes,
8022     which can conflict with char $ac_func(); below.  */
8023 #include <assert.h>
8024 /* Override any gcc2 internal prototype to avoid an error.  */
8025 /* We use char because int might match the return type of a gcc2
8026     builtin and then its argument prototype would still apply.  */
8027 char $ac_func();
8028
8029 int main() {
8030
8031 /* The GNU C library defines this for functions which it implements
8032     to always fail with ENOSYS.  Some functions are actually named
8033     something starting with __ and the normal name is an alias.  */
8034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8035 choke me
8036 #else
8037 $ac_func();
8038 #endif
8039
8040 ; return 0; }
8041 EOF
8042 if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8043   rm -rf conftest*
8044   eval "ac_cv_func_$ac_func=yes"
8045 else
8046   echo "configure: failed program was:" >&5
8047   cat conftest.$ac_ext >&5
8048   rm -rf conftest*
8049   eval "ac_cv_func_$ac_func=no"
8050 fi
8051 rm -f conftest*
8052
8053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8054   echo "$ac_t""yes" 1>&6
8055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8056   { test "$extra_verbose" = "yes" && cat << EOF
8057     Defining $ac_tr_func
8058 EOF
8059 cat >> confdefs.h <<EOF
8060 #define $ac_tr_func 1
8061 EOF
8062 }
8063  
8064 else
8065   echo "$ac_t""no" 1>&6
8066 fi
8067 done
8068
8069 fi
8070
8071 if test "$with_postgresql" != "no"; then
8072   echo "checking for PostgreSQL" 1>&6
8073 echo "configure:8074: checking for PostgreSQL" >&5
8074
8075   for header_dir in "" "pgsql/" "postgresql/"; do
8076     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8077 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8078 echo "configure:8079: checking for ${header_dir}libpq-fe.h" >&5
8079
8080 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <${header_dir}libpq-fe.h>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   eval "ac_cv_header_$ac_safe=yes"
8091 else
8092   echo "$ac_err" >&5
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=no"
8097 fi
8098 rm -f conftest*
8099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8100   echo "$ac_t""yes" 1>&6
8101   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8102 else
8103   echo "$ac_t""no" 1>&6
8104 fi
8105
8106   done
8107
8108   test -n "$libpq_fe_h_file" && { 
8109 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8110 echo "configure:8111: checking for PQconnectdb in -lpq" >&5
8111 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8112
8113 xe_check_libs=" -lpq "
8114 cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 /* Override any gcc2 internal prototype to avoid an error.  */
8118 /* We use char because int might match the return type of a gcc2
8119     builtin and then its argument prototype would still apply.  */
8120 char PQconnectdb();
8121
8122 int main() {
8123 PQconnectdb()
8124 ; return 0; }
8125 EOF
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=yes"
8129 else
8130   echo "configure: failed program was:" >&5
8131   cat conftest.$ac_ext >&5
8132   rm -rf conftest*
8133   eval "ac_cv_lib_$ac_lib_var=no"
8134 fi
8135 rm -f conftest*
8136 xe_check_libs=""
8137
8138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8139   echo "$ac_t""yes" 1>&6
8140   have_libpq=yes
8141 else
8142   echo "$ac_t""no" 1>&6
8143 fi
8144
8145  }
8146
8147   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8148     with_postgresql=yes
8149     { test "$extra_verbose" = "yes" && cat << \EOF
8150     Defining HAVE_POSTGRESQL
8151 EOF
8152 cat >> confdefs.h <<\EOF
8153 #define HAVE_POSTGRESQL 1
8154 EOF
8155 }
8156
8157     
8158 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8159 echo "configure:8160: checking for PQconnectStart in -lpq" >&5
8160 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8161
8162 xe_check_libs=" -lpq "
8163 cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 /* Override any gcc2 internal prototype to avoid an error.  */
8167 /* We use char because int might match the return type of a gcc2
8168     builtin and then its argument prototype would still apply.  */
8169 char PQconnectStart();
8170
8171 int main() {
8172 PQconnectStart()
8173 ; return 0; }
8174 EOF
8175 if { (eval echo configure:8176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8176   rm -rf conftest*
8177   eval "ac_cv_lib_$ac_lib_var=yes"
8178 else
8179   echo "configure: failed program was:" >&5
8180   cat conftest.$ac_ext >&5
8181   rm -rf conftest*
8182   eval "ac_cv_lib_$ac_lib_var=no"
8183 fi
8184 rm -f conftest*
8185 xe_check_libs=""
8186
8187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8188   echo "$ac_t""yes" 1>&6
8189   with_postgresqlv7=yes;
8190                  { test "$extra_verbose" = "yes" && cat << \EOF
8191     Defining HAVE_POSTGRESQLV7
8192 EOF
8193 cat >> confdefs.h <<\EOF
8194 #define HAVE_POSTGRESQLV7 1
8195 EOF
8196 }
8197
8198 else
8199   echo "$ac_t""no" 1>&6
8200 fi
8201
8202
8203     { test "$extra_verbose" = "yes" && cat << EOF
8204     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8205 EOF
8206 cat >> confdefs.h <<EOF
8207 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8208 EOF
8209 }
8210
8211     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8212     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8213    echo "    xemacs will be linked with \"postgresql.o\""
8214  fi
8215   elif test "$with_postgresql" = "yes"; then
8216     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8217   fi
8218 fi
8219
8220
8221 if test "$window_system" != "none"; then
8222   echo "checking for graphics libraries" 1>&6
8223 echo "configure:8224: checking for graphics libraries" >&5
8224
8225       libpath_xpm=
8226   incpath_xpm=
8227   case "$opsys" in 
8228     cygwin*)
8229       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8230       cygwin_top=`eval "dirname ${cygwin_top}"`;
8231       cygwin_top="${cygwin_top}/..";
8232       case "$window_system" in
8233                 x11)  ;;
8234                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8235              incpath_xpm="-I${cygwin_top}/include/noX"
8236               ;;
8237                 gtk)  ;;
8238                 none) ;;
8239                 *)    ;;
8240       esac
8241       ;;
8242         *) ;;
8243   esac
8244     xpm_problem=""
8245   if test -z "$with_xpm"; then
8246     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8247     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8248     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8249 echo "configure:8250: checking for Xpm - no older than 3.4f" >&5
8250     xe_check_libs=-lXpm
8251     cat > conftest.$ac_ext <<EOF
8252 #line 8253 "configure"
8253 #include "confdefs.h"
8254 #define XPM_NUMBERS
8255 #include <X11/xpm.h>
8256     int main(int c, char **v) {
8257     return c == 1 ? 0 :
8258       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8259       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8262 then
8263   ./conftest dummy_arg; xpm_status=$?;
8264       if test "$xpm_status" = "0"; then
8265         with_xpm=yes;
8266       else
8267         with_xpm=no;
8268         if test "$xpm_status" = "1"; then
8269           xpm_problem="Xpm library version and header file version don't match!"
8270         elif test "$xpm_status" = "2"; then
8271           xpm_problem="Xpm library version is too old!"
8272         else
8273           xpm_problem="Internal xpm detection logic error!"
8274         fi
8275         echo "
8276 *** WARNING *** $xpm_problem
8277   I'm not touching that with a 10-foot pole!
8278   If you really want to use the installed version of Xpm, rerun
8279   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8280     fi
8281 else
8282   conftest_rc="$?"
8283   echo "configure: failed program was:" >&5
8284   cat conftest.$ac_ext >&5
8285   rm -fr conftest*
8286   with_xpm=no
8287 fi
8288 rm -fr conftest*
8289     xe_check_libs=
8290     echo "$ac_t""$with_xpm" 1>&6
8291   fi
8292   if test "$with_xpm" = "yes"; then
8293                 { test "$extra_verbose" = "yes" && cat << \EOF
8294     Defining HAVE_XPM
8295 EOF
8296 cat >> confdefs.h <<\EOF
8297 #define HAVE_XPM 1
8298 EOF
8299 }
8300
8301     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8302     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8303     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8304     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8305 echo "configure:8306: checking for \"FOR_MSW\" xpm" >&5
8306     xe_check_libs=-lXpm
8307     cat > conftest.$ac_ext <<EOF
8308 #line 8309 "configure"
8309 #include "confdefs.h"
8310
8311 int main() {
8312 XpmCreatePixmapFromData()
8313 ; return 0; }
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8316   rm -rf conftest*
8317   xpm_for_msw=no
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -rf conftest*
8322   xpm_for_msw=yes
8323 fi
8324 rm -f conftest*
8325     xe_check_libs=
8326     echo "$ac_t""$xpm_for_msw" 1>&6
8327     if test "$xpm_for_msw" = "yes"; then
8328       { test "$extra_verbose" = "yes" && cat << \EOF
8329     Defining FOR_MSW
8330 EOF
8331 cat >> confdefs.h <<\EOF
8332 #define FOR_MSW 1
8333 EOF
8334 }
8335
8336     fi
8337   fi
8338
8339     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8340 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8341 echo "configure:8342: checking for compface.h" >&5
8342
8343 cat > conftest.$ac_ext <<EOF
8344 #line 8345 "configure"
8345 #include "confdefs.h"
8346 #include <compface.h>
8347 EOF
8348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8349 { (eval echo configure:8350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8351 if test -z "$ac_err"; then
8352   rm -rf conftest*
8353   eval "ac_cv_header_$ac_safe=yes"
8354 else
8355   echo "$ac_err" >&5
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   eval "ac_cv_header_$ac_safe=no"
8360 fi
8361 rm -f conftest*
8362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8363   echo "$ac_t""yes" 1>&6
8364   :
8365 else
8366   echo "$ac_t""no" 1>&6
8367 with_xface=no
8368 fi
8369  }
8370   test -z "$with_xface" && { 
8371 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8372 echo "configure:8373: checking for UnGenFace in -lcompface" >&5
8373 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8374
8375 xe_check_libs=" -lcompface "
8376 cat > conftest.$ac_ext <<EOF
8377 #line 8378 "configure"
8378 #include "confdefs.h"
8379 /* Override any gcc2 internal prototype to avoid an error.  */
8380 /* We use char because int might match the return type of a gcc2
8381     builtin and then its argument prototype would still apply.  */
8382 char UnGenFace();
8383
8384 int main() {
8385 UnGenFace()
8386 ; return 0; }
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8389   rm -rf conftest*
8390   eval "ac_cv_lib_$ac_lib_var=yes"
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -rf conftest*
8395   eval "ac_cv_lib_$ac_lib_var=no"
8396 fi
8397 rm -f conftest*
8398 xe_check_libs=""
8399
8400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8401   echo "$ac_t""yes" 1>&6
8402   : 
8403 else
8404   echo "$ac_t""no" 1>&6
8405 with_xface=no
8406 fi
8407
8408  }
8409   test -z "$with_xface" && with_xface=yes
8410   if test "$with_xface" = "yes"; then
8411     { test "$extra_verbose" = "yes" && cat << \EOF
8412     Defining HAVE_XFACE
8413 EOF
8414 cat >> confdefs.h <<\EOF
8415 #define HAVE_XFACE 1
8416 EOF
8417 }
8418
8419     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8420   fi
8421
8422         if test "$with_gif" != "no"; then
8423     with_gif="yes"
8424     { test "$extra_verbose" = "yes" && cat << \EOF
8425     Defining HAVE_GIF
8426 EOF
8427 cat >> confdefs.h <<\EOF
8428 #define HAVE_GIF 1
8429 EOF
8430 }
8431
8432     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8433    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8434  fi
8435   fi
8436
8437       if test "$with_png $with_tiff" != "no no"; then
8438     
8439 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8440 echo "configure:8441: checking for inflate in -lc" >&5
8441 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8442
8443 xe_check_libs=" -lc "
8444 cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 /* Override any gcc2 internal prototype to avoid an error.  */
8448 /* We use char because int might match the return type of a gcc2
8449     builtin and then its argument prototype would still apply.  */
8450 char inflate();
8451
8452 int main() {
8453 inflate()
8454 ; return 0; }
8455 EOF
8456 if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8457   rm -rf conftest*
8458   eval "ac_cv_lib_$ac_lib_var=yes"
8459 else
8460   echo "configure: failed program was:" >&5
8461   cat conftest.$ac_ext >&5
8462   rm -rf conftest*
8463   eval "ac_cv_lib_$ac_lib_var=no"
8464 fi
8465 rm -f conftest*
8466 xe_check_libs=""
8467
8468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8469   echo "$ac_t""yes" 1>&6
8470   :
8471 else
8472   echo "$ac_t""no" 1>&6
8473
8474 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8475 echo "configure:8476: checking for inflate in -lz" >&5
8476 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8477
8478 xe_check_libs=" -lz "
8479 cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 /* Override any gcc2 internal prototype to avoid an error.  */
8483 /* We use char because int might match the return type of a gcc2
8484     builtin and then its argument prototype would still apply.  */
8485 char inflate();
8486
8487 int main() {
8488 inflate()
8489 ; return 0; }
8490 EOF
8491 if { (eval echo configure:8492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8492   rm -rf conftest*
8493   eval "ac_cv_lib_$ac_lib_var=yes"
8494 else
8495   echo "configure: failed program was:" >&5
8496   cat conftest.$ac_ext >&5
8497   rm -rf conftest*
8498   eval "ac_cv_lib_$ac_lib_var=no"
8499 fi
8500 rm -f conftest*
8501 xe_check_libs=""
8502
8503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8504   echo "$ac_t""yes" 1>&6
8505   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8506 else
8507   echo "$ac_t""no" 1>&6
8508
8509 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8510 echo "configure:8511: checking for inflate in -lgz" >&5
8511 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8512
8513 xe_check_libs=" -lgz "
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 /* Override any gcc2 internal prototype to avoid an error.  */
8518 /* We use char because int might match the return type of a gcc2
8519     builtin and then its argument prototype would still apply.  */
8520 char inflate();
8521
8522 int main() {
8523 inflate()
8524 ; return 0; }
8525 EOF
8526 if { (eval echo configure:8527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8527   rm -rf conftest*
8528   eval "ac_cv_lib_$ac_lib_var=yes"
8529 else
8530   echo "configure: failed program was:" >&5
8531   cat conftest.$ac_ext >&5
8532   rm -rf conftest*
8533   eval "ac_cv_lib_$ac_lib_var=no"
8534 fi
8535 rm -f conftest*
8536 xe_check_libs=""
8537
8538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8539   echo "$ac_t""yes" 1>&6
8540   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8541 else
8542   echo "$ac_t""no" 1>&6
8543 fi
8544
8545
8546 fi
8547
8548
8549 fi
8550
8551
8552   fi
8553
8554     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8555 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8556 echo "configure:8557: checking for jpeglib.h" >&5
8557
8558 cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 #include <jpeglib.h>
8562 EOF
8563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8564 { (eval echo configure:8565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8566 if test -z "$ac_err"; then
8567   rm -rf conftest*
8568   eval "ac_cv_header_$ac_safe=yes"
8569 else
8570   echo "$ac_err" >&5
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   eval "ac_cv_header_$ac_safe=no"
8575 fi
8576 rm -f conftest*
8577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8578   echo "$ac_t""yes" 1>&6
8579   :
8580 else
8581   echo "$ac_t""no" 1>&6
8582 with_jpeg=no
8583 fi
8584  }
8585   test -z "$with_jpeg" && { 
8586 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8587 echo "configure:8588: checking for jpeg_destroy_decompress in -ljpeg" >&5
8588 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8589
8590 xe_check_libs=" -ljpeg "
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char jpeg_destroy_decompress();
8598
8599 int main() {
8600 jpeg_destroy_decompress()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 xe_check_libs=""
8614
8615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8616   echo "$ac_t""yes" 1>&6
8617   :
8618 else
8619   echo "$ac_t""no" 1>&6
8620 with_jpeg=no
8621 fi
8622
8623  }
8624   test -z "$with_jpeg" && with_jpeg=yes
8625   if test "$with_jpeg" = "yes"; then
8626     { test "$extra_verbose" = "yes" && cat << \EOF
8627     Defining HAVE_JPEG
8628 EOF
8629 cat >> confdefs.h <<\EOF
8630 #define HAVE_JPEG 1
8631 EOF
8632 }
8633
8634     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8635   fi
8636
8637     png_problem=""
8638   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8639 echo "configure:8640: checking for pow" >&5
8640
8641 cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 /* System header to define __stub macros and hopefully few prototypes,
8645     which can conflict with char pow(); below.  */
8646 #include <assert.h>
8647 /* Override any gcc2 internal prototype to avoid an error.  */
8648 /* We use char because int might match the return type of a gcc2
8649     builtin and then its argument prototype would still apply.  */
8650 char pow();
8651
8652 int main() {
8653
8654 /* The GNU C library defines this for functions which it implements
8655     to always fail with ENOSYS.  Some functions are actually named
8656     something starting with __ and the normal name is an alias.  */
8657 #if defined (__stub_pow) || defined (__stub___pow)
8658 choke me
8659 #else
8660 pow();
8661 #endif
8662
8663 ; return 0; }
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8666   rm -rf conftest*
8667   eval "ac_cv_func_pow=yes"
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_func_pow=no"
8673 fi
8674 rm -f conftest*
8675
8676 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8677   echo "$ac_t""yes" 1>&6
8678   :
8679 else
8680   echo "$ac_t""no" 1>&6
8681 with_png=no
8682 fi
8683  }
8684   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8685 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8686 echo "configure:8687: checking for png.h" >&5
8687
8688 cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691 #include <png.h>
8692 EOF
8693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8694 { (eval echo configure:8695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8696 if test -z "$ac_err"; then
8697   rm -rf conftest*
8698   eval "ac_cv_header_$ac_safe=yes"
8699 else
8700   echo "$ac_err" >&5
8701   echo "configure: failed program was:" >&5
8702   cat conftest.$ac_ext >&5
8703   rm -rf conftest*
8704   eval "ac_cv_header_$ac_safe=no"
8705 fi
8706 rm -f conftest*
8707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8708   echo "$ac_t""yes" 1>&6
8709   :
8710 else
8711   echo "$ac_t""no" 1>&6
8712 with_png=no
8713 fi
8714  }
8715   test -z "$with_png" && { 
8716 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8717 echo "configure:8718: checking for png_read_image in -lpng" >&5
8718 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8719
8720 xe_check_libs=" -lpng "
8721 cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8724 /* Override any gcc2 internal prototype to avoid an error.  */
8725 /* We use char because int might match the return type of a gcc2
8726     builtin and then its argument prototype would still apply.  */
8727 char png_read_image();
8728
8729 int main() {
8730 png_read_image()
8731 ; return 0; }
8732 EOF
8733 if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8734   rm -rf conftest*
8735   eval "ac_cv_lib_$ac_lib_var=yes"
8736 else
8737   echo "configure: failed program was:" >&5
8738   cat conftest.$ac_ext >&5
8739   rm -rf conftest*
8740   eval "ac_cv_lib_$ac_lib_var=no"
8741 fi
8742 rm -f conftest*
8743 xe_check_libs=""
8744
8745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8746   echo "$ac_t""yes" 1>&6
8747   :
8748 else
8749   echo "$ac_t""no" 1>&6
8750 with_png=no
8751 fi
8752
8753  }
8754   if test -z "$with_png"; then
8755     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8756 echo "configure:8757: checking for workable png version information" >&5
8757     xe_check_libs="-lpng -lz"
8758     cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 #include <png.h>
8762     int main(int c, char **v) {
8763     if (c == 1) return 0;
8764     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8765     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8766 EOF
8767 if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8768 then
8769   ./conftest dummy_arg; png_status=$?;
8770       if test "$png_status" = "0"; then
8771         with_png=yes;
8772       else
8773         with_png=no;
8774         if test "$png_status" = "1"; then
8775           png_problem="PNG library version and header file don't match!"
8776         elif test "$png_status" = "2"; then
8777           png_problem="PNG library version too old (pre 1.0.2)!"
8778         fi
8779         echo "
8780 *** WARNING *** $png_problem
8781   I'm not touching that with a 10-foot pole!
8782   If you really want to use the installed version of libPNG, rerun
8783   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8784     fi
8785 else
8786   conftest_rc="$?"
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -fr conftest*
8790   with_png=no
8791 fi
8792 rm -fr conftest*
8793     xe_check_libs=
8794     echo "$ac_t""$with_png" 1>&6
8795   fi
8796   if test "$with_png" = "yes"; then
8797     { test "$extra_verbose" = "yes" && cat << \EOF
8798     Defining HAVE_PNG
8799 EOF
8800 cat >> confdefs.h <<\EOF
8801 #define HAVE_PNG 1
8802 EOF
8803 }
8804
8805     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8806   fi
8807
8808     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8809 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8810 echo "configure:8811: checking for tiffio.h" >&5
8811
8812 cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <tiffio.h>
8816 EOF
8817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8818 { (eval echo configure:8819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8820 if test -z "$ac_err"; then
8821   rm -rf conftest*
8822   eval "ac_cv_header_$ac_safe=yes"
8823 else
8824   echo "$ac_err" >&5
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_header_$ac_safe=no"
8829 fi
8830 rm -f conftest*
8831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8832   echo "$ac_t""yes" 1>&6
8833   :
8834 else
8835   echo "$ac_t""no" 1>&6
8836 with_tiff=no
8837 fi
8838  }
8839   test -z "$with_tiff" && { 
8840 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8841 echo "configure:8842: checking for TIFFClientOpen in -ltiff" >&5
8842 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8843
8844 xe_check_libs=" -ltiff "
8845 cat > conftest.$ac_ext <<EOF
8846 #line 8847 "configure"
8847 #include "confdefs.h"
8848 /* Override any gcc2 internal prototype to avoid an error.  */
8849 /* We use char because int might match the return type of a gcc2
8850     builtin and then its argument prototype would still apply.  */
8851 char TIFFClientOpen();
8852
8853 int main() {
8854 TIFFClientOpen()
8855 ; return 0; }
8856 EOF
8857 if { (eval echo configure:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8858   rm -rf conftest*
8859   eval "ac_cv_lib_$ac_lib_var=yes"
8860 else
8861   echo "configure: failed program was:" >&5
8862   cat conftest.$ac_ext >&5
8863   rm -rf conftest*
8864   eval "ac_cv_lib_$ac_lib_var=no"
8865 fi
8866 rm -f conftest*
8867 xe_check_libs=""
8868
8869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8870   echo "$ac_t""yes" 1>&6
8871   :
8872 else
8873   echo "$ac_t""no" 1>&6
8874 with_tiff=no
8875 fi
8876
8877  }
8878   test -z "$with_tiff" && with_tiff=yes
8879   if test "$with_tiff" = "yes"; then
8880     { test "$extra_verbose" = "yes" && cat << \EOF
8881     Defining HAVE_TIFF
8882 EOF
8883 cat >> confdefs.h <<\EOF
8884 #define HAVE_TIFF 1
8885 EOF
8886 }
8887
8888     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8889   fi
8890 fi
8891
8892
8893 if test "$with_gtk" = "yes"; then
8894     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8895 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8896 echo "configure:8897: checking for compface.h" >&5
8897
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 #include <compface.h>
8902 EOF
8903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8904 { (eval echo configure:8905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8906 if test -z "$ac_err"; then
8907   rm -rf conftest*
8908   eval "ac_cv_header_$ac_safe=yes"
8909 else
8910   echo "$ac_err" >&5
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=no"
8915 fi
8916 rm -f conftest*
8917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8918   echo "$ac_t""yes" 1>&6
8919   :
8920 else
8921   echo "$ac_t""no" 1>&6
8922 with_xface=no
8923 fi
8924  }
8925   test -z "$with_xface" && { 
8926 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8927 echo "configure:8928: checking for UnGenFace in -lcompface" >&5
8928 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8929
8930 xe_check_libs=" -lcompface "
8931 cat > conftest.$ac_ext <<EOF
8932 #line 8933 "configure"
8933 #include "confdefs.h"
8934 /* Override any gcc2 internal prototype to avoid an error.  */
8935 /* We use char because int might match the return type of a gcc2
8936     builtin and then its argument prototype would still apply.  */
8937 char UnGenFace();
8938
8939 int main() {
8940 UnGenFace()
8941 ; return 0; }
8942 EOF
8943 if { (eval echo configure:8944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8944   rm -rf conftest*
8945   eval "ac_cv_lib_$ac_lib_var=yes"
8946 else
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -rf conftest*
8950   eval "ac_cv_lib_$ac_lib_var=no"
8951 fi
8952 rm -f conftest*
8953 xe_check_libs=""
8954
8955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8956   echo "$ac_t""yes" 1>&6
8957   : 
8958 else
8959   echo "$ac_t""no" 1>&6
8960 with_xface=no
8961 fi
8962
8963  }
8964   test -z "$with_xface" && with_xface=yes
8965   if test "$with_xface" = "yes"; then
8966     { test "$extra_verbose" = "yes" && cat << \EOF
8967     Defining HAVE_XFACE
8968 EOF
8969 cat >> confdefs.h <<\EOF
8970 #define HAVE_XFACE 1
8971 EOF
8972 }
8973
8974     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8975   fi
8976 fi
8977
8978
8979
8980 if test "$with_x11" = "yes"; then
8981   echo "checking for X11 graphics libraries" 1>&6
8982 echo "configure:8983: checking for X11 graphics libraries" >&5
8983 fi
8984
8985 if test "$with_x11" = "yes"; then
8986   echo "checking for the Athena widgets" 1>&6
8987 echo "configure:8988: checking for the Athena widgets" >&5
8988
8989     case "$with_athena" in
8990         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8991     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8992     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8993     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8994     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8995     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8996   esac
8997
8998   athena_3d_function=Xaw3dComputeBottomShadowRGB
8999
9000     if test "$athena_3d" = "no"; then
9001     
9002 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9003 echo "configure:9004: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9004 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9005
9006 xe_check_libs=" -l$athena_variant "
9007 cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* Override any gcc2 internal prototype to avoid an error.  */
9011 /* We use char because int might match the return type of a gcc2
9012     builtin and then its argument prototype would still apply.  */
9013 char XawScrollbarSetThumb();
9014
9015 int main() {
9016 XawScrollbarSetThumb()
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=no"
9027 fi
9028 rm -f conftest*
9029 xe_check_libs=""
9030
9031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9032   echo "$ac_t""yes" 1>&6
9033           
9034 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9035 echo "configure:9036: checking for $athena_3d_function in -l$athena_variant" >&5
9036 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9037
9038 xe_check_libs=" -l$athena_variant "
9039 cat > conftest.$ac_ext <<EOF
9040 #line 9041 "configure"
9041 #include "confdefs.h"
9042 /* Override any gcc2 internal prototype to avoid an error.  */
9043 /* We use char because int might match the return type of a gcc2
9044     builtin and then its argument prototype would still apply.  */
9045 char $athena_3d_function();
9046
9047 int main() {
9048 $athena_3d_function()
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=no"
9059 fi
9060 rm -f conftest*
9061 xe_check_libs=""
9062
9063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9064   echo "$ac_t""yes" 1>&6
9065   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9066 else
9067   echo "$ac_t""no" 1>&6
9068 athena_lib=$athena_variant
9069 fi
9070
9071
9072       
9073 else
9074   echo "$ac_t""no" 1>&6
9075 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9076 fi
9077
9078
9079   else
9080         
9081 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9082 echo "configure:9083: checking for $athena_3d_function in -l$athena_variant" >&5
9083 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9084
9085 xe_check_libs=" -l$athena_variant "
9086 cat > conftest.$ac_ext <<EOF
9087 #line 9088 "configure"
9088 #include "confdefs.h"
9089 /* Override any gcc2 internal prototype to avoid an error.  */
9090 /* We use char because int might match the return type of a gcc2
9091     builtin and then its argument prototype would still apply.  */
9092 char $athena_3d_function();
9093
9094 int main() {
9095 $athena_3d_function()
9096 ; return 0; }
9097 EOF
9098 if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9099   rm -rf conftest*
9100   eval "ac_cv_lib_$ac_lib_var=yes"
9101 else
9102   echo "configure: failed program was:" >&5
9103   cat conftest.$ac_ext >&5
9104   rm -rf conftest*
9105   eval "ac_cv_lib_$ac_lib_var=no"
9106 fi
9107 rm -f conftest*
9108 xe_check_libs=""
9109
9110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9111   echo "$ac_t""yes" 1>&6
9112   athena_lib=$athena_variant
9113 else
9114   echo "$ac_t""no" 1>&6
9115 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9116 echo "configure:9117: checking for $athena_3d_function in -lXaw" >&5
9117 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9118
9119 xe_check_libs=" -lXaw "
9120 cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123 /* Override any gcc2 internal prototype to avoid an error.  */
9124 /* We use char because int might match the return type of a gcc2
9125     builtin and then its argument prototype would still apply.  */
9126 char $athena_3d_function();
9127
9128 int main() {
9129 $athena_3d_function()
9130 ; return 0; }
9131 EOF
9132 if { (eval echo configure:9133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=yes"
9135 else
9136   echo "configure: failed program was:" >&5
9137   cat conftest.$ac_ext >&5
9138   rm -rf conftest*
9139   eval "ac_cv_lib_$ac_lib_var=no"
9140 fi
9141 rm -f conftest*
9142 xe_check_libs=""
9143
9144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9145   echo "$ac_t""yes" 1>&6
9146   athena_lib=Xaw;
9147           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9148         
9149 else
9150   echo "$ac_t""no" 1>&6
9151 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9152 fi
9153
9154
9155 fi
9156
9157
9158   fi
9159
9160     if test "$athena_3d" = "no"; then
9161     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9162 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9163 echo "configure:9164: checking for X11/Xaw/ThreeD.h" >&5
9164
9165 cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 #include <X11/Xaw/ThreeD.h>
9169 EOF
9170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9171 { (eval echo configure:9172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9173 if test -z "$ac_err"; then
9174   rm -rf conftest*
9175   eval "ac_cv_header_$ac_safe=yes"
9176 else
9177   echo "$ac_err" >&5
9178   echo "configure: failed program was:" >&5
9179   cat conftest.$ac_ext >&5
9180   rm -rf conftest*
9181   eval "ac_cv_header_$ac_safe=no"
9182 fi
9183 rm -f conftest*
9184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9185   echo "$ac_t""yes" 1>&6
9186   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9187 else
9188   echo "$ac_t""no" 1>&6
9189 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9190 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9191 echo "configure:9192: checking for X11/Xaw/XawInit.h" >&5
9192
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <X11/Xaw/XawInit.h>
9197 EOF
9198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9199 { (eval echo configure:9200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9201 if test -z "$ac_err"; then
9202   rm -rf conftest*
9203   eval "ac_cv_header_$ac_safe=yes"
9204 else
9205   echo "$ac_err" >&5
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   eval "ac_cv_header_$ac_safe=no"
9210 fi
9211 rm -f conftest*
9212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214   athena_h_path=X11/Xaw
9215 else
9216   echo "$ac_t""no" 1>&6
9217 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9218 fi
9219
9220 fi
9221
9222   else
9223             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9224 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9225 echo "configure:9226: checking for X11/$athena_variant/XawInit.h" >&5
9226
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 #include <X11/$athena_variant/XawInit.h>
9231 EOF
9232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9233 { (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9235 if test -z "$ac_err"; then
9236   rm -rf conftest*
9237   eval "ac_cv_header_$ac_safe=yes"
9238 else
9239   echo "$ac_err" >&5
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_header_$ac_safe=no"
9244 fi
9245 rm -f conftest*
9246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9249 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9250 echo "configure:9251: checking for X11/$athena_variant/ThreeD.h" >&5
9251
9252 cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 #include <X11/$athena_variant/ThreeD.h>
9256 EOF
9257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9258 { (eval echo configure:9259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9260 if test -z "$ac_err"; then
9261   rm -rf conftest*
9262   eval "ac_cv_header_$ac_safe=yes"
9263 else
9264   echo "$ac_err" >&5
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -rf conftest*
9268   eval "ac_cv_header_$ac_safe=no"
9269 fi
9270 rm -f conftest*
9271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273   athena_h_path=X11/$athena_variant
9274 else
9275   echo "$ac_t""no" 1>&6
9276 fi
9277
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282
9283         if test -z "$athena_h_path"; then
9284       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9285 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9286 echo "configure:9287: checking for $athena_variant/XawInit.h" >&5
9287
9288 cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291 #include <$athena_variant/XawInit.h>
9292 EOF
9293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9294 { (eval echo configure:9295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9296 if test -z "$ac_err"; then
9297   rm -rf conftest*
9298   eval "ac_cv_header_$ac_safe=yes"
9299 else
9300   echo "$ac_err" >&5
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -rf conftest*
9304   eval "ac_cv_header_$ac_safe=no"
9305 fi
9306 rm -f conftest*
9307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9308   echo "$ac_t""yes" 1>&6
9309   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9310 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9311 echo "configure:9312: checking for $athena_variant/ThreeD.h" >&5
9312
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316 #include <$athena_variant/ThreeD.h>
9317 EOF
9318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9319 { (eval echo configure:9320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9321 if test -z "$ac_err"; then
9322   rm -rf conftest*
9323   eval "ac_cv_header_$ac_safe=yes"
9324 else
9325   echo "$ac_err" >&5
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_header_$ac_safe=no"
9330 fi
9331 rm -f conftest*
9332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9333   echo "$ac_t""yes" 1>&6
9334   athena_h_path=$athena_variant
9335 else
9336   echo "$ac_t""no" 1>&6
9337 fi
9338
9339 else
9340   echo "$ac_t""no" 1>&6
9341 fi
9342
9343     fi
9344
9345         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9346       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9347 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9348 echo "configure:9349: checking for X11/Xaw3d/XawInit.h" >&5
9349
9350 cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353 #include <X11/Xaw3d/XawInit.h>
9354 EOF
9355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9356 { (eval echo configure:9357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9358 if test -z "$ac_err"; then
9359   rm -rf conftest*
9360   eval "ac_cv_header_$ac_safe=yes"
9361 else
9362   echo "$ac_err" >&5
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -rf conftest*
9366   eval "ac_cv_header_$ac_safe=no"
9367 fi
9368 rm -f conftest*
9369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9372 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9373 echo "configure:9374: checking for X11/Xaw3d/ThreeD.h" >&5
9374
9375 cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 #include <X11/Xaw3d/ThreeD.h>
9379 EOF
9380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9381 { (eval echo configure:9382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9383 if test -z "$ac_err"; then
9384   rm -rf conftest*
9385   eval "ac_cv_header_$ac_safe=yes"
9386 else
9387   echo "$ac_err" >&5
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_header_$ac_safe=no"
9392 fi
9393 rm -f conftest*
9394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396   
9397             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9398             athena_h_path=X11/Xaw3d
9399           
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404 else
9405   echo "$ac_t""no" 1>&6
9406 fi
9407
9408     fi
9409
9410         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9411       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9412 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9413 echo "configure:9414: checking for Xaw3d/XawInit.h" >&5
9414
9415 cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418 #include <Xaw3d/XawInit.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   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9437 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9438 echo "configure:9439: checking for Xaw3d/ThreeD.h" >&5
9439
9440 cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443 #include <Xaw3d/ThreeD.h>
9444 EOF
9445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9446 { (eval echo configure:9447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9448 if test -z "$ac_err"; then
9449   rm -rf conftest*
9450   eval "ac_cv_header_$ac_safe=yes"
9451 else
9452   echo "$ac_err" >&5
9453   echo "configure: failed program was:" >&5
9454   cat conftest.$ac_ext >&5
9455   rm -rf conftest*
9456   eval "ac_cv_header_$ac_safe=no"
9457 fi
9458 rm -f conftest*
9459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9460   echo "$ac_t""yes" 1>&6
9461   
9462             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9463             athena_h_path=Xaw3d
9464           
9465 else
9466   echo "$ac_t""no" 1>&6
9467 fi
9468
9469 else
9470   echo "$ac_t""no" 1>&6
9471 fi
9472
9473     fi
9474
9475             if test -z "$athena_h_path"; then
9476       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9477 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9478 echo "configure:9479: checking for X11/Xaw/ThreeD.h" >&5
9479
9480 cat > conftest.$ac_ext <<EOF
9481 #line 9482 "configure"
9482 #include "confdefs.h"
9483 #include <X11/Xaw/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 X11/Xaw headers are suitable for $athena_variant."" 1>&2
9503           athena_h_path=X11/Xaw
9504         
9505 else
9506   echo "$ac_t""no" 1>&6
9507 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9508 fi
9509
9510     fi
9511   fi
9512
9513     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9514     have_xaw=yes
9515   else
9516     have_xaw=no
9517   fi
9518
9519 else
9520   have_xaw=no
9521 fi 
9522 if test "$with_x11" = "yes"; then
9523     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9524 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9525 echo "configure:9526: checking for Xm/Xm.h" >&5
9526
9527 cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 #include <Xm/Xm.h>
9531 EOF
9532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9533 { (eval echo configure:9534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9535 if test -z "$ac_err"; then
9536   rm -rf conftest*
9537   eval "ac_cv_header_$ac_safe=yes"
9538 else
9539   echo "$ac_err" >&5
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -rf conftest*
9543   eval "ac_cv_header_$ac_safe=no"
9544 fi
9545 rm -f conftest*
9546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9547   echo "$ac_t""yes" 1>&6
9548   
9549 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9550 echo "configure:9551: checking for XmStringFree in -lXm" >&5
9551 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9552
9553 xe_check_libs=" -lXm "
9554 cat > conftest.$ac_ext <<EOF
9555 #line 9556 "configure"
9556 #include "confdefs.h"
9557 /* Override any gcc2 internal prototype to avoid an error.  */
9558 /* We use char because int might match the return type of a gcc2
9559     builtin and then its argument prototype would still apply.  */
9560 char XmStringFree();
9561
9562 int main() {
9563 XmStringFree()
9564 ; return 0; }
9565 EOF
9566 if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9567   rm -rf conftest*
9568   eval "ac_cv_lib_$ac_lib_var=yes"
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -rf conftest*
9573   eval "ac_cv_lib_$ac_lib_var=no"
9574 fi
9575 rm -f conftest*
9576 xe_check_libs=""
9577
9578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9579   echo "$ac_t""yes" 1>&6
9580   have_motif=yes
9581 else
9582   echo "$ac_t""no" 1>&6
9583 have_motif=no
9584 fi
9585
9586
9587 else
9588   echo "$ac_t""no" 1>&6
9589 have_motif=no
9590 fi
9591
9592
9593   if test "$have_motif" = "yes"; then
9594         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9595 echo "configure:9596: checking for Lesstif" >&5
9596     cat > conftest.$ac_ext <<EOF
9597 #line 9598 "configure"
9598 #include "confdefs.h"
9599 #include <Xm/Xm.h>
9600 #ifdef LESSTIF_VERSION
9601 yes
9602 #endif
9603
9604 EOF
9605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9606   egrep "yes" >/dev/null 2>&1; then
9607   rm -rf conftest*
9608   have_lesstif=yes
9609 else
9610   rm -rf conftest*
9611   have_lesstif=no
9612 fi
9613 rm -f conftest*
9614
9615   echo "$ac_t""$have_lesstif" 1>&6
9616   fi
9617
9618 fi 
9619
9620 case "$with_menubars" in "" | "yes" | "athena" )
9621   with_menubars="lucid" ;;
9622 esac
9623 case "$with_dialogs" in "" | "yes" | "lucid" )
9624   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9625   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9626   else with_dialogs=no
9627   fi ;;
9628 esac
9629 case "$with_scrollbars" in "" | "yes" )
9630   with_scrollbars="lucid" ;;
9631 esac
9632 case "$with_widgets" in
9633   "yes" | "lucid")
9634     if   test "$have_motif" = "yes"; then with_widgets="motif"
9635     elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9636     else with_widgets=no
9637     fi ;;
9638   "" )
9639     with_widgets=no ;;
9640 esac
9641
9642 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9643
9644 case "$all_widgets" in
9645   *athena* )
9646     if test "$have_xaw" != "yes"; then
9647       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9648     fi
9649
9650         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9651
9652         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9653
9654                     { test "$extra_verbose" = "yes" && cat << EOF
9655     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9656 EOF
9657 cat >> confdefs.h <<EOF
9658 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9659 EOF
9660 }
9661
9662     { test "$extra_verbose" = "yes" && cat << EOF
9663     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9664 EOF
9665 cat >> confdefs.h <<EOF
9666 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9667 EOF
9668 }
9669
9670     { test "$extra_verbose" = "yes" && cat << EOF
9671     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9672 EOF
9673 cat >> confdefs.h <<EOF
9674 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9675 EOF
9676 }
9677
9678     { test "$extra_verbose" = "yes" && cat << EOF
9679     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9680 EOF
9681 cat >> confdefs.h <<EOF
9682 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9683 EOF
9684 }
9685
9686     { test "$extra_verbose" = "yes" && cat << EOF
9687     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9688 EOF
9689 cat >> confdefs.h <<EOF
9690 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9691 EOF
9692 }
9693
9694     { test "$extra_verbose" = "yes" && cat << EOF
9695     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9696 EOF
9697 cat >> confdefs.h <<EOF
9698 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9699 EOF
9700 }
9701
9702     { test "$extra_verbose" = "yes" && cat << EOF
9703     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9704 EOF
9705 cat >> confdefs.h <<EOF
9706 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9707 EOF
9708 }
9709
9710     { test "$extra_verbose" = "yes" && cat << EOF
9711     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9712 EOF
9713 cat >> confdefs.h <<EOF
9714 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9715 EOF
9716 }
9717
9718     { test "$extra_verbose" = "yes" && cat << EOF
9719     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9720 EOF
9721 cat >> confdefs.h <<EOF
9722 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9723 EOF
9724 }
9725
9726     { test "$extra_verbose" = "yes" && cat << EOF
9727     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9728 EOF
9729 cat >> confdefs.h <<EOF
9730 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9731 EOF
9732 }
9733
9734
9735     { test "$extra_verbose" = "yes" && cat << \EOF
9736     Defining LWLIB_USES_ATHENA
9737 EOF
9738 cat >> confdefs.h <<\EOF
9739 #define LWLIB_USES_ATHENA 1
9740 EOF
9741 }
9742
9743     { test "$extra_verbose" = "yes" && cat << \EOF
9744     Defining NEED_ATHENA
9745 EOF
9746 cat >> confdefs.h <<\EOF
9747 #define NEED_ATHENA 1
9748 EOF
9749 }
9750
9751     need_athena="yes"
9752
9753     if test "$athena_3d" = "yes"; then
9754       { test "$extra_verbose" = "yes" && cat << \EOF
9755     Defining HAVE_ATHENA_3D
9756 EOF
9757 cat >> confdefs.h <<\EOF
9758 #define HAVE_ATHENA_3D 1
9759 EOF
9760 }
9761
9762     fi
9763   ;;
9764 esac
9765
9766 case "$all_widgets" in *motif* )
9767   { test "$extra_verbose" = "yes" && cat << \EOF
9768     Defining LWLIB_USES_MOTIF
9769 EOF
9770 cat >> confdefs.h <<\EOF
9771 #define LWLIB_USES_MOTIF 1
9772 EOF
9773 }
9774
9775   { test "$extra_verbose" = "yes" && cat << \EOF
9776     Defining NEED_MOTIF
9777 EOF
9778 cat >> confdefs.h <<\EOF
9779 #define NEED_MOTIF 1
9780 EOF
9781 }
9782
9783   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9784   need_motif=yes ;;
9785 esac
9786
9787 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9788 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9789 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9790 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9791         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9792 case "$with_widgets" in athena* )
9793         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;;
9794 esac
9795 case "$all_widgets" in *lucid* )
9796   { test "$extra_verbose" = "yes" && cat << \EOF
9797     Defining NEED_LUCID
9798 EOF
9799 cat >> confdefs.h <<\EOF
9800 #define NEED_LUCID 1
9801 EOF
9802 }
9803
9804   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9805 esac
9806
9807
9808
9809 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9810     Defining LWLIB_SCROLLBARS_ATHENA
9811 EOF
9812 cat >> confdefs.h <<\EOF
9813 #define LWLIB_SCROLLBARS_ATHENA 1
9814 EOF
9815 }
9816
9817 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9818     Defining LWLIB_DIALOGS_ATHENA
9819 EOF
9820 cat >> confdefs.h <<\EOF
9821 #define LWLIB_DIALOGS_ATHENA 1
9822 EOF
9823 }
9824
9825
9826 if test "$athena_3d" = "yes"; then
9827   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9828     Defining LWLIB_SCROLLBARS_ATHENA3D
9829 EOF
9830 cat >> confdefs.h <<\EOF
9831 #define LWLIB_SCROLLBARS_ATHENA3D 1
9832 EOF
9833 }
9834
9835   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9836     Defining LWLIB_DIALOGS_ATHENA3D
9837 EOF
9838 cat >> confdefs.h <<\EOF
9839 #define LWLIB_DIALOGS_ATHENA3D 1
9840 EOF
9841 }
9842
9843 fi
9844
9845 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9846     Defining LWLIB_WIDGETS_ATHENA
9847 EOF
9848 cat >> confdefs.h <<\EOF
9849 #define LWLIB_WIDGETS_ATHENA 1
9850 EOF
9851 }
9852 ;; esac
9853 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9854         { test "$extra_verbose" = "yes" && cat << \EOF
9855     Defining LWLIB_TABS_LUCID
9856 EOF
9857 cat >> confdefs.h <<\EOF
9858 #define LWLIB_TABS_LUCID 1
9859 EOF
9860 }
9861
9862
9863 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9864     Defining HAVE_MENUBARS
9865 EOF
9866 cat >> confdefs.h <<\EOF
9867 #define HAVE_MENUBARS 1
9868 EOF
9869 }
9870
9871 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining HAVE_SCROLLBARS
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define HAVE_SCROLLBARS 1
9876 EOF
9877 }
9878
9879 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9880     Defining HAVE_DIALOGS
9881 EOF
9882 cat >> confdefs.h <<\EOF
9883 #define HAVE_DIALOGS 1
9884 EOF
9885 }
9886
9887 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9888     Defining HAVE_TOOLBARS
9889 EOF
9890 cat >> confdefs.h <<\EOF
9891 #define HAVE_TOOLBARS 1
9892 EOF
9893 }
9894
9895 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9896     Defining HAVE_WIDGETS
9897 EOF
9898 cat >> confdefs.h <<\EOF
9899 #define HAVE_WIDGETS 1
9900 EOF
9901 }
9902
9903
9904 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9905     Defining LWLIB_MENUBARS_LUCID
9906 EOF
9907 cat >> confdefs.h <<\EOF
9908 #define LWLIB_MENUBARS_LUCID 1
9909 EOF
9910 }
9911
9912 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9913     Defining LWLIB_SCROLLBARS_LUCID
9914 EOF
9915 cat >> confdefs.h <<\EOF
9916 #define LWLIB_SCROLLBARS_LUCID 1
9917 EOF
9918 }
9919
9920
9921 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9922     Defining LWLIB_MENUBARS_MOTIF
9923 EOF
9924 cat >> confdefs.h <<\EOF
9925 #define LWLIB_MENUBARS_MOTIF 1
9926 EOF
9927 }
9928
9929 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9930     Defining LWLIB_SCROLLBARS_MOTIF
9931 EOF
9932 cat >> confdefs.h <<\EOF
9933 #define LWLIB_SCROLLBARS_MOTIF 1
9934 EOF
9935 }
9936
9937 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9938     Defining LWLIB_DIALOGS_MOTIF
9939 EOF
9940 cat >> confdefs.h <<\EOF
9941 #define LWLIB_DIALOGS_MOTIF 1
9942 EOF
9943 }
9944
9945 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9946     Defining LWLIB_WIDGETS_MOTIF
9947 EOF
9948 cat >> confdefs.h <<\EOF
9949 #define LWLIB_WIDGETS_MOTIF 1
9950 EOF
9951 }
9952
9953
9954 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9955    echo "    xemacs will be linked with \"menubar.o\""
9956  fi
9957 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9958    echo "    xemacs will be linked with \"scrollbar.o\""
9959  fi
9960 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9961    echo "    xemacs will be linked with \"dialog.o\""
9962  fi
9963 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9964    echo "    xemacs will be linked with \"toolbar.o\""
9965  fi
9966
9967 if test "$with_gtk" = "yes"; then
9968   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9969    echo "    xemacs will be linked with \"menubar-gtk.o\""
9970  fi
9971   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9972    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9973  fi
9974   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9975    echo "    xemacs will be linked with \"dialog-gtk.o\""
9976  fi
9977   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9978    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9979  fi
9980   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9981    echo "    xemacs will be linked with \"gui-gtk.o\""
9982  fi
9983 fi
9984
9985 if test "$with_x11" = "yes"; then
9986   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9987    echo "    xemacs will be linked with \"menubar-x.o\""
9988  fi
9989   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9990    echo "    xemacs will be linked with \"scrollbar-x.o\""
9991  fi
9992   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9993    echo "    xemacs will be linked with \"dialog-x.o\""
9994  fi
9995   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9996    echo "    xemacs will be linked with \"toolbar-x.o\""
9997  fi
9998   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9999    echo "    xemacs will be linked with \"gui-x.o\""
10000  fi
10001 fi
10002
10003
10004 test -z "$with_mule" && with_mule=no
10005 test -z "$with_file_coding" && with_file_coding=no
10006
10007
10008 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10009   { test "$extra_verbose" = "yes" && cat << \EOF
10010     Defining FILE_CODING
10011 EOF
10012 cat >> confdefs.h <<\EOF
10013 #define FILE_CODING 1
10014 EOF
10015 }
10016
10017   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10018    echo "    xemacs will be linked with \"file-coding.o\""
10019  fi
10020 fi
10021
10022 if test "$with_mule" = "yes" ; then
10023   echo "checking for Mule-related features" 1>&6
10024 echo "configure:10025: checking for Mule-related features" >&5
10025   { test "$extra_verbose" = "yes" && cat << \EOF
10026     Defining MULE
10027 EOF
10028 cat >> confdefs.h <<\EOF
10029 #define MULE 1
10030 EOF
10031 }
10032
10033   { test "$extra_verbose" = "yes" && cat << \EOF
10034     Defining FILE_CODING
10035 EOF
10036 cat >> confdefs.h <<\EOF
10037 #define FILE_CODING 1
10038 EOF
10039 }
10040
10041   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10042    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
10043  fi
10044
10045     for ac_hdr in libintl.h
10046 do
10047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10049 echo "configure:10050: checking for $ac_hdr" >&5
10050
10051 cat > conftest.$ac_ext <<EOF
10052 #line 10053 "configure"
10053 #include "confdefs.h"
10054 #include <$ac_hdr>
10055 EOF
10056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10057 { (eval echo configure:10058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10059 if test -z "$ac_err"; then
10060   rm -rf conftest*
10061   eval "ac_cv_header_$ac_safe=yes"
10062 else
10063   echo "$ac_err" >&5
10064   echo "configure: failed program was:" >&5
10065   cat conftest.$ac_ext >&5
10066   rm -rf conftest*
10067   eval "ac_cv_header_$ac_safe=no"
10068 fi
10069 rm -f conftest*
10070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10071   echo "$ac_t""yes" 1>&6
10072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10073   { test "$extra_verbose" = "yes" && cat << EOF
10074     Defining $ac_tr_hdr
10075 EOF
10076 cat >> confdefs.h <<EOF
10077 #define $ac_tr_hdr 1
10078 EOF
10079 }
10080  
10081 else
10082   echo "$ac_t""no" 1>&6
10083 fi
10084 done
10085
10086   
10087 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10088 echo "configure:10089: checking for strerror in -lintl" >&5
10089 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10090
10091 xe_check_libs=" -lintl "
10092 cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10095 /* Override any gcc2 internal prototype to avoid an error.  */
10096 /* We use char because int might match the return type of a gcc2
10097     builtin and then its argument prototype would still apply.  */
10098 char strerror();
10099
10100 int main() {
10101 strerror()
10102 ; return 0; }
10103 EOF
10104 if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10105   rm -rf conftest*
10106   eval "ac_cv_lib_$ac_lib_var=yes"
10107 else
10108   echo "configure: failed program was:" >&5
10109   cat conftest.$ac_ext >&5
10110   rm -rf conftest*
10111   eval "ac_cv_lib_$ac_lib_var=no"
10112 fi
10113 rm -f conftest*
10114 xe_check_libs=""
10115
10116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10117   echo "$ac_t""yes" 1>&6
10118     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10119     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10120   { test "$extra_verbose" = "yes" && cat << EOF
10121     Defining $ac_tr_lib
10122 EOF
10123 cat >> confdefs.h <<EOF
10124 #define $ac_tr_lib 1
10125 EOF
10126 }
10127
10128   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10129
10130 else
10131   echo "$ac_t""no" 1>&6
10132 fi
10133
10134
10135
10136   echo "checking for Mule input methods" 1>&6
10137 echo "configure:10138: checking for Mule input methods" >&5
10138         case "$with_xim" in "" | "yes" )
10139     echo "checking for XIM" 1>&6
10140 echo "configure:10141: checking for XIM" >&5
10141     
10142 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10143 echo "configure:10144: checking for XOpenIM in -lX11" >&5
10144 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10145
10146 xe_check_libs=" -lX11 "
10147 cat > conftest.$ac_ext <<EOF
10148 #line 10149 "configure"
10149 #include "confdefs.h"
10150 /* Override any gcc2 internal prototype to avoid an error.  */
10151 /* We use char because int might match the return type of a gcc2
10152     builtin and then its argument prototype would still apply.  */
10153 char XOpenIM();
10154
10155 int main() {
10156 XOpenIM()
10157 ; return 0; }
10158 EOF
10159 if { (eval echo configure:10160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10160   rm -rf conftest*
10161   eval "ac_cv_lib_$ac_lib_var=yes"
10162 else
10163   echo "configure: failed program was:" >&5
10164   cat conftest.$ac_ext >&5
10165   rm -rf conftest*
10166   eval "ac_cv_lib_$ac_lib_var=no"
10167 fi
10168 rm -f conftest*
10169 xe_check_libs=""
10170
10171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10172   echo "$ac_t""yes" 1>&6
10173   with_xim=xlib
10174 else
10175   echo "$ac_t""no" 1>&6
10176 with_xim=no
10177 fi
10178
10179
10180         if test "$have_motif $have_lesstif" = "yes no"; then
10181       
10182 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10183 echo "configure:10184: checking for XmImMbLookupString in -lXm" >&5
10184 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10185
10186 xe_check_libs=" -lXm "
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 /* Override any gcc2 internal prototype to avoid an error.  */
10191 /* We use char because int might match the return type of a gcc2
10192     builtin and then its argument prototype would still apply.  */
10193 char XmImMbLookupString();
10194
10195 int main() {
10196 XmImMbLookupString()
10197 ; return 0; }
10198 EOF
10199 if { (eval echo configure:10200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10200   rm -rf conftest*
10201   eval "ac_cv_lib_$ac_lib_var=yes"
10202 else
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205   rm -rf conftest*
10206   eval "ac_cv_lib_$ac_lib_var=no"
10207 fi
10208 rm -f conftest*
10209 xe_check_libs=""
10210
10211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10212   echo "$ac_t""yes" 1>&6
10213   with_xim=motif
10214 else
10215   echo "$ac_t""no" 1>&6
10216 fi
10217
10218
10219     fi ;;
10220   esac
10221   if test "$with_xim" != "no"; then
10222     { test "$extra_verbose" = "yes" && cat << \EOF
10223     Defining HAVE_XIM
10224 EOF
10225 cat >> confdefs.h <<\EOF
10226 #define HAVE_XIM 1
10227 EOF
10228 }
10229
10230     if test "$with_xim" = "xlib"; then
10231       { test "$extra_verbose" = "yes" && cat << \EOF
10232     Defining XIM_XLIB
10233 EOF
10234 cat >> confdefs.h <<\EOF
10235 #define XIM_XLIB 1
10236 EOF
10237 }
10238
10239       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10240    echo "    xemacs will be linked with \"input-method-xlib.o\""
10241  fi
10242     fi
10243     if test "$with_xim" = "motif"; then
10244       { test "$extra_verbose" = "yes" && cat << \EOF
10245     Defining XIM_MOTIF
10246 EOF
10247 cat >> confdefs.h <<\EOF
10248 #define XIM_MOTIF 1
10249 EOF
10250 }
10251
10252       need_motif=yes
10253       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10254    echo "    xemacs will be linked with \"input-method-motif.o\""
10255  fi
10256     fi
10257     if test "$with_xim" = "motif"; then
10258       with_xfs=no
10259     fi
10260   fi
10261
10262     if test "$with_xfs" = "yes" ; then
10263     echo "checking for XFontSet" 1>&6
10264 echo "configure:10265: checking for XFontSet" >&5
10265     
10266 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10267 echo "configure:10268: checking for XmbDrawString in -lX11" >&5
10268 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10269
10270 xe_check_libs=" -lX11 "
10271 cat > conftest.$ac_ext <<EOF
10272 #line 10273 "configure"
10273 #include "confdefs.h"
10274 /* Override any gcc2 internal prototype to avoid an error.  */
10275 /* We use char because int might match the return type of a gcc2
10276     builtin and then its argument prototype would still apply.  */
10277 char XmbDrawString();
10278
10279 int main() {
10280 XmbDrawString()
10281 ; return 0; }
10282 EOF
10283 if { (eval echo configure:10284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10284   rm -rf conftest*
10285   eval "ac_cv_lib_$ac_lib_var=yes"
10286 else
10287   echo "configure: failed program was:" >&5
10288   cat conftest.$ac_ext >&5
10289   rm -rf conftest*
10290   eval "ac_cv_lib_$ac_lib_var=no"
10291 fi
10292 rm -f conftest*
10293 xe_check_libs=""
10294
10295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10296   echo "$ac_t""yes" 1>&6
10297   :
10298 else
10299   echo "$ac_t""no" 1>&6
10300 with_xfs=no
10301 fi
10302
10303
10304     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10305       { test "$extra_verbose" = "yes" && cat << \EOF
10306     Defining USE_XFONTSET
10307 EOF
10308 cat >> confdefs.h <<\EOF
10309 #define USE_XFONTSET 1
10310 EOF
10311 }
10312
10313       if test "$with_xim" = "no" ; then
10314         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10315    echo "    xemacs will be linked with \"input-method-xlib.o\""
10316  fi
10317       fi
10318     fi
10319   fi 
10320     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10321   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10322 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10323 echo "configure:10324: checking for wnn/jllib.h" >&5
10324
10325 cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <wnn/jllib.h>
10329 EOF
10330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10331 { (eval echo configure:10332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10333 if test -z "$ac_err"; then
10334   rm -rf conftest*
10335   eval "ac_cv_header_$ac_safe=yes"
10336 else
10337   echo "$ac_err" >&5
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=no"
10342 fi
10343 rm -f conftest*
10344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10345   echo "$ac_t""yes" 1>&6
10346   :
10347 else
10348   echo "$ac_t""no" 1>&6
10349 with_wnn=no
10350 fi
10351  }
10352     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10353 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10354 echo "configure:10355: checking for wnn/commonhd.h" >&5
10355
10356 cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359 #include <wnn/commonhd.h>
10360 EOF
10361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10362 { (eval echo configure:10363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10364 if test -z "$ac_err"; then
10365   rm -rf conftest*
10366   eval "ac_cv_header_$ac_safe=yes"
10367 else
10368   echo "$ac_err" >&5
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   eval "ac_cv_header_$ac_safe=no"
10373 fi
10374 rm -f conftest*
10375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10376   echo "$ac_t""yes" 1>&6
10377   :
10378 else
10379   echo "$ac_t""no" 1>&6
10380 with_wnn=no
10381 fi
10382  }
10383     if test "$with_wnn" != "no"; then
10384     for ac_func in crypt
10385 do
10386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10387 echo "configure:10388: checking for $ac_func" >&5
10388
10389 cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 /* System header to define __stub macros and hopefully few prototypes,
10393     which can conflict with char $ac_func(); below.  */
10394 #include <assert.h>
10395 /* Override any gcc2 internal prototype to avoid an error.  */
10396 /* We use char because int might match the return type of a gcc2
10397     builtin and then its argument prototype would still apply.  */
10398 char $ac_func();
10399
10400 int main() {
10401
10402 /* The GNU C library defines this for functions which it implements
10403     to always fail with ENOSYS.  Some functions are actually named
10404     something starting with __ and the normal name is an alias.  */
10405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10406 choke me
10407 #else
10408 $ac_func();
10409 #endif
10410
10411 ; return 0; }
10412 EOF
10413 if { (eval echo configure:10414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10414   rm -rf conftest*
10415   eval "ac_cv_func_$ac_func=yes"
10416 else
10417   echo "configure: failed program was:" >&5
10418   cat conftest.$ac_ext >&5
10419   rm -rf conftest*
10420   eval "ac_cv_func_$ac_func=no"
10421 fi
10422 rm -f conftest*
10423
10424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10425   echo "$ac_t""yes" 1>&6
10426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10427   { test "$extra_verbose" = "yes" && cat << EOF
10428     Defining $ac_tr_func
10429 EOF
10430 cat >> confdefs.h <<EOF
10431 #define $ac_tr_func 1
10432 EOF
10433 }
10434  
10435 else
10436   echo "$ac_t""no" 1>&6
10437 fi
10438 done
10439
10440     test "$ac_cv_func_crypt" != "yes" && { 
10441 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10442 echo "configure:10443: checking for crypt in -lcrypt" >&5
10443 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10444
10445 xe_check_libs=" -lcrypt "
10446 cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 /* Override any gcc2 internal prototype to avoid an error.  */
10450 /* We use char because int might match the return type of a gcc2
10451     builtin and then its argument prototype would still apply.  */
10452 char crypt();
10453
10454 int main() {
10455 crypt()
10456 ; return 0; }
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10459   rm -rf conftest*
10460   eval "ac_cv_lib_$ac_lib_var=yes"
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_lib_$ac_lib_var=no"
10466 fi
10467 rm -f conftest*
10468 xe_check_libs=""
10469
10470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10471   echo "$ac_t""yes" 1>&6
10472     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10473     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10474   { test "$extra_verbose" = "yes" && cat << EOF
10475     Defining $ac_tr_lib
10476 EOF
10477 cat >> confdefs.h <<EOF
10478 #define $ac_tr_lib 1
10479 EOF
10480 }
10481
10482   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10483
10484 else
10485   echo "$ac_t""no" 1>&6
10486 fi
10487
10488  }
10489   fi
10490     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10491     
10492 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10493 echo "configure:10494: checking for jl_dic_list_e in -lwnn" >&5
10494 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10495
10496 xe_check_libs=" -lwnn "
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 /* Override any gcc2 internal prototype to avoid an error.  */
10501 /* We use char because int might match the return type of a gcc2
10502     builtin and then its argument prototype would still apply.  */
10503 char jl_dic_list_e();
10504
10505 int main() {
10506 jl_dic_list_e()
10507 ; return 0; }
10508 EOF
10509 if { (eval echo configure:10510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10510   rm -rf conftest*
10511   eval "ac_cv_lib_$ac_lib_var=yes"
10512 else
10513   echo "configure: failed program was:" >&5
10514   cat conftest.$ac_ext >&5
10515   rm -rf conftest*
10516   eval "ac_cv_lib_$ac_lib_var=no"
10517 fi
10518 rm -f conftest*
10519 xe_check_libs=""
10520
10521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10522   echo "$ac_t""yes" 1>&6
10523   libwnn=wnn
10524 else
10525   echo "$ac_t""no" 1>&6
10526 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10527 echo "configure:10528: checking for jl_dic_list_e in -lwnn4" >&5
10528 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10529
10530 xe_check_libs=" -lwnn4 "
10531 cat > conftest.$ac_ext <<EOF
10532 #line 10533 "configure"
10533 #include "confdefs.h"
10534 /* Override any gcc2 internal prototype to avoid an error.  */
10535 /* We use char because int might match the return type of a gcc2
10536     builtin and then its argument prototype would still apply.  */
10537 char jl_dic_list_e();
10538
10539 int main() {
10540 jl_dic_list_e()
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_lib_$ac_lib_var=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=no"
10551 fi
10552 rm -f conftest*
10553 xe_check_libs=""
10554
10555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10556   echo "$ac_t""yes" 1>&6
10557   libwnn=wnn4
10558 else
10559   echo "$ac_t""no" 1>&6
10560 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10561 echo "configure:10562: checking for jl_dic_list_e in -lwnn6" >&5
10562 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10563
10564 xe_check_libs=" -lwnn6 "
10565 cat > conftest.$ac_ext <<EOF
10566 #line 10567 "configure"
10567 #include "confdefs.h"
10568 /* Override any gcc2 internal prototype to avoid an error.  */
10569 /* We use char because int might match the return type of a gcc2
10570     builtin and then its argument prototype would still apply.  */
10571 char jl_dic_list_e();
10572
10573 int main() {
10574 jl_dic_list_e()
10575 ; return 0; }
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10578   rm -rf conftest*
10579   eval "ac_cv_lib_$ac_lib_var=yes"
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_lib_$ac_lib_var=no"
10585 fi
10586 rm -f conftest*
10587 xe_check_libs=""
10588
10589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10590   echo "$ac_t""yes" 1>&6
10591   libwnn=wnn6
10592 else
10593   echo "$ac_t""no" 1>&6
10594 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10595 echo "configure:10596: checking for dic_list_e in -lwnn6_fromsrc" >&5
10596 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10597
10598 xe_check_libs=" -lwnn6_fromsrc "
10599 cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 /* Override any gcc2 internal prototype to avoid an error.  */
10603 /* We use char because int might match the return type of a gcc2
10604     builtin and then its argument prototype would still apply.  */
10605 char dic_list_e();
10606
10607 int main() {
10608 dic_list_e()
10609 ; return 0; }
10610 EOF
10611 if { (eval echo configure:10612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10612   rm -rf conftest*
10613   eval "ac_cv_lib_$ac_lib_var=yes"
10614 else
10615   echo "configure: failed program was:" >&5
10616   cat conftest.$ac_ext >&5
10617   rm -rf conftest*
10618   eval "ac_cv_lib_$ac_lib_var=no"
10619 fi
10620 rm -f conftest*
10621 xe_check_libs=""
10622
10623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10624   echo "$ac_t""yes" 1>&6
10625   libwnn=wnn6_fromsrc
10626 else
10627   echo "$ac_t""no" 1>&6
10628 with_wnn=no
10629 fi
10630
10631
10632 fi
10633
10634
10635 fi
10636
10637
10638 fi
10639
10640
10641   fi
10642   test -z "$with_wnn" && with_wnn=yes
10643   if test "$with_wnn" = "yes"; then
10644     { test "$extra_verbose" = "yes" && cat << \EOF
10645     Defining HAVE_WNN
10646 EOF
10647 cat >> confdefs.h <<\EOF
10648 #define HAVE_WNN 1
10649 EOF
10650 }
10651
10652     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10653     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10654    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10655  fi
10656     if test "$with_wnn6" != "no"; then
10657       
10658 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10659 echo "configure:10660: checking for jl_fi_dic_list in -l$libwnn" >&5
10660 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10661
10662 xe_check_libs=" -l$libwnn "
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_fi_dic_list();
10670
10671 int main() {
10672 jl_fi_dic_list()
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   with_wnn6=yes
10690 else
10691   echo "$ac_t""no" 1>&6
10692 fi
10693
10694
10695       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10696     Defining WNN6
10697 EOF
10698 cat >> confdefs.h <<\EOF
10699 #define WNN6 1
10700 EOF
10701 }
10702
10703     fi
10704   fi
10705
10706     canna_includes_found=no
10707   if test "$with_canna" != "no"; then
10708     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10709 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10710 echo "configure:10711: checking for canna/jrkanji.h" >&5
10711
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715 #include <canna/jrkanji.h>
10716 EOF
10717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10718 { (eval echo configure:10719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10720 if test -z "$ac_err"; then
10721   rm -rf conftest*
10722   eval "ac_cv_header_$ac_safe=yes"
10723 else
10724   echo "$ac_err" >&5
10725   echo "configure: failed program was:" >&5
10726   cat conftest.$ac_ext >&5
10727   rm -rf conftest*
10728   eval "ac_cv_header_$ac_safe=no"
10729 fi
10730 rm -f conftest*
10731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10732   echo "$ac_t""yes" 1>&6
10733   canna_includes_found=yes
10734 else
10735   echo "$ac_t""no" 1>&6
10736 fi
10737
10738   fi
10739   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10740       -d "/usr/local/canna/include"; then
10741     save_c_switch_site="$c_switch_site"
10742     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10743     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10744 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10745 echo "configure:10746: checking for canna/jrkanji.h" >&5
10746
10747 cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750 #include <canna/jrkanji.h>
10751 EOF
10752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10753 { (eval echo configure:10754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10755 if test -z "$ac_err"; then
10756   rm -rf conftest*
10757   eval "ac_cv_header_$ac_safe=yes"
10758 else
10759   echo "$ac_err" >&5
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   eval "ac_cv_header_$ac_safe=no"
10764 fi
10765 rm -f conftest*
10766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10767   echo "$ac_t""yes" 1>&6
10768   canna_includes_found=yes
10769 else
10770   echo "$ac_t""no" 1>&6
10771 fi
10772
10773     if test "$canna_includes_found" != "yes"; then
10774       c_switch_site="$save_c_switch_site"
10775       with_canna="no"
10776     fi
10777   fi
10778
10779   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10780 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10781 echo "configure:10782: checking for canna/RK.h" >&5
10782
10783 cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <canna/RK.h>
10787 EOF
10788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10789 { (eval echo configure:10790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10791 if test -z "$ac_err"; then
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=yes"
10794 else
10795   echo "$ac_err" >&5
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   eval "ac_cv_header_$ac_safe=no"
10800 fi
10801 rm -f conftest*
10802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804   :
10805 else
10806   echo "$ac_t""no" 1>&6
10807 with_canna=no
10808 fi
10809  }
10810   test -z "$with_canna" && { 
10811 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10812 echo "configure:10813: checking for RkBgnBun in -lRKC" >&5
10813 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10814
10815 xe_check_libs=" -lRKC "
10816 cat > conftest.$ac_ext <<EOF
10817 #line 10818 "configure"
10818 #include "confdefs.h"
10819 /* Override any gcc2 internal prototype to avoid an error.  */
10820 /* We use char because int might match the return type of a gcc2
10821     builtin and then its argument prototype would still apply.  */
10822 char RkBgnBun();
10823
10824 int main() {
10825 RkBgnBun()
10826 ; return 0; }
10827 EOF
10828 if { (eval echo configure:10829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10829   rm -rf conftest*
10830   eval "ac_cv_lib_$ac_lib_var=yes"
10831 else
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   eval "ac_cv_lib_$ac_lib_var=no"
10836 fi
10837 rm -f conftest*
10838 xe_check_libs=""
10839
10840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10841   echo "$ac_t""yes" 1>&6
10842   :
10843 else
10844   echo "$ac_t""no" 1>&6
10845 with_canna=no
10846 fi
10847
10848  }
10849   test -z "$with_canna" && { 
10850 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10851 echo "configure:10852: checking for jrKanjiControl in -lcanna" >&5
10852 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10853
10854 xe_check_libs=" -lcanna "
10855 cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 /* Override any gcc2 internal prototype to avoid an error.  */
10859 /* We use char because int might match the return type of a gcc2
10860     builtin and then its argument prototype would still apply.  */
10861 char jrKanjiControl();
10862
10863 int main() {
10864 jrKanjiControl()
10865 ; return 0; }
10866 EOF
10867 if { (eval echo configure:10868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10868   rm -rf conftest*
10869   eval "ac_cv_lib_$ac_lib_var=yes"
10870 else
10871   echo "configure: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   rm -rf conftest*
10874   eval "ac_cv_lib_$ac_lib_var=no"
10875 fi
10876 rm -f conftest*
10877 xe_check_libs=""
10878
10879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10880   echo "$ac_t""yes" 1>&6
10881   :
10882 else
10883   echo "$ac_t""no" 1>&6
10884 with_canna=no
10885 fi
10886
10887  }
10888   test -z "$with_canna" && with_canna=yes
10889   if test "$with_canna" = "yes"; then
10890     { test "$extra_verbose" = "yes" && cat << \EOF
10891     Defining HAVE_CANNA
10892 EOF
10893 cat >> confdefs.h <<\EOF
10894 #define HAVE_CANNA 1
10895 EOF
10896 }
10897
10898     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10899     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10900    echo "    xemacs will be linked with \"mule-canna.o\""
10901  fi
10902   fi
10903
10904 else   for feature in xim canna wnn; do
10905     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10906       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10907     fi
10908     eval "with_${feature}=no"
10909   done
10910 fi 
10911
10912 if test "$need_motif" = "yes" ; then
10913   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10914     
10915 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10916 echo "configure:10917: checking for layout_object_getvalue in -li18n" >&5
10917 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10918
10919 xe_check_libs=" -li18n "
10920 cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923 /* Override any gcc2 internal prototype to avoid an error.  */
10924 /* We use char because int might match the return type of a gcc2
10925     builtin and then its argument prototype would still apply.  */
10926 char layout_object_getvalue();
10927
10928 int main() {
10929 layout_object_getvalue()
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10933   rm -rf conftest*
10934   eval "ac_cv_lib_$ac_lib_var=yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_lib_$ac_lib_var=no"
10940 fi
10941 rm -f conftest*
10942 xe_check_libs=""
10943
10944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10945   echo "$ac_t""yes" 1>&6
10946   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10947 else
10948   echo "$ac_t""no" 1>&6
10949 fi
10950
10951
10952   
10953 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10954     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10955   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10956   
10957         runpath="" runpath_dirs=""
10958   if test -n "$LD_RUN_PATH"; then
10959     runpath="$LD_RUN_PATH"
10960   elif test "$GCC" = "yes"; then
10961         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10962     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10963     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10964     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10965       case "$arg" in P,* | -L* | -R* )
10966         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10967           {
10968 xe_runpath_dir="$dir"
10969   test "$xe_runpath_dir" != "/lib"     -a \
10970         "$xe_runpath_dir" != "/usr/lib" -a \
10971         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10972   eval "$xe_add_unique_runpath_dir"
10973 }
10974         done ;;
10975       esac
10976     done
10977     ld_switch_run="$ld_switch_run_save"
10978     rm -f conftest*
10979   else
10980         for arg in $ld_switch_site $ld_switch_x_site; do
10981       case "$arg" in -L*) {
10982 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10983   test "$xe_runpath_dir" != "/lib"     -a \
10984         "$xe_runpath_dir" != "/usr/lib" -a \
10985         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10986   eval "$xe_add_unique_runpath_dir"
10987 };; esac
10988     done
10989         if test "$opsys $need_motif" = "sol2 yes"; then
10990       xe_runpath_dir="/opt/SUNWdt/lib";
10991       eval "$xe_add_unique_runpath_dir";
10992     fi
10993   fi 
10994   if test -n "$runpath"; then
10995     ld_switch_run="${dash_r}${runpath}"
10996     
10997 if test "$GCC" = "yes"; then
10998   set x $ld_switch_run; shift; ld_switch_run=""
10999   while test -n "$1"; do
11000     case $1 in
11001       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11002       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11003       -Xlinker* ) ;;
11004       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11005     esac
11006     shift
11007   done
11008 fi
11009     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11010   fi
11011 fi
11012
11013 fi
11014
11015
11016 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
11017 do
11018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11019 echo "configure:11020: checking for $ac_func" >&5
11020
11021 cat > conftest.$ac_ext <<EOF
11022 #line 11023 "configure"
11023 #include "confdefs.h"
11024 /* System header to define __stub macros and hopefully few prototypes,
11025     which can conflict with char $ac_func(); below.  */
11026 #include <assert.h>
11027 /* Override any gcc2 internal prototype to avoid an error.  */
11028 /* We use char because int might match the return type of a gcc2
11029     builtin and then its argument prototype would still apply.  */
11030 char $ac_func();
11031
11032 int main() {
11033
11034 /* The GNU C library defines this for functions which it implements
11035     to always fail with ENOSYS.  Some functions are actually named
11036     something starting with __ and the normal name is an alias.  */
11037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11038 choke me
11039 #else
11040 $ac_func();
11041 #endif
11042
11043 ; return 0; }
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11046   rm -rf conftest*
11047   eval "ac_cv_func_$ac_func=yes"
11048 else
11049   echo "configure: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   rm -rf conftest*
11052   eval "ac_cv_func_$ac_func=no"
11053 fi
11054 rm -f conftest*
11055
11056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11057   echo "$ac_t""yes" 1>&6
11058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11059   { test "$extra_verbose" = "yes" && cat << EOF
11060     Defining $ac_tr_func
11061 EOF
11062 cat >> confdefs.h <<EOF
11063 #define $ac_tr_func 1
11064 EOF
11065 }
11066  
11067 else
11068   echo "$ac_t""no" 1>&6
11069 fi
11070 done
11071
11072
11073 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11074   case "$opsys" in
11075     hpux11* )
11076       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11077       ac_cv_func_getaddrinfo=no
11078       ;;
11079   esac
11080 fi
11081
11082
11083 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11084 do
11085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11086 echo "configure:11087: checking for $ac_func" >&5
11087
11088 cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 /* System header to define __stub macros and hopefully few prototypes,
11092     which can conflict with char $ac_func(); below.  */
11093 #include <assert.h>
11094 /* Override any gcc2 internal prototype to avoid an error.  */
11095 /* We use char because int might match the return type of a gcc2
11096     builtin and then its argument prototype would still apply.  */
11097 char $ac_func();
11098
11099 int main() {
11100
11101 /* The GNU C library defines this for functions which it implements
11102     to always fail with ENOSYS.  Some functions are actually named
11103     something starting with __ and the normal name is an alias.  */
11104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11105 choke me
11106 #else
11107 $ac_func();
11108 #endif
11109
11110 ; return 0; }
11111 EOF
11112 if { (eval echo configure:11113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11113   rm -rf conftest*
11114   eval "ac_cv_func_$ac_func=yes"
11115 else
11116   echo "configure: failed program was:" >&5
11117   cat conftest.$ac_ext >&5
11118   rm -rf conftest*
11119   eval "ac_cv_func_$ac_func=no"
11120 fi
11121 rm -f conftest*
11122
11123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11124   echo "$ac_t""yes" 1>&6
11125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11126   { test "$extra_verbose" = "yes" && cat << EOF
11127     Defining $ac_tr_func
11128 EOF
11129 cat >> confdefs.h <<EOF
11130 #define $ac_tr_func 1
11131 EOF
11132 }
11133  
11134 else
11135   echo "$ac_t""no" 1>&6
11136 fi
11137 done
11138
11139
11140 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11141 echo "configure:11142: checking for openpty" >&5
11142
11143 cat > conftest.$ac_ext <<EOF
11144 #line 11145 "configure"
11145 #include "confdefs.h"
11146 /* System header to define __stub macros and hopefully few prototypes,
11147     which can conflict with char openpty(); below.  */
11148 #include <assert.h>
11149 /* Override any gcc2 internal prototype to avoid an error.  */
11150 /* We use char because int might match the return type of a gcc2
11151     builtin and then its argument prototype would still apply.  */
11152 char openpty();
11153
11154 int main() {
11155
11156 /* The GNU C library defines this for functions which it implements
11157     to always fail with ENOSYS.  Some functions are actually named
11158     something starting with __ and the normal name is an alias.  */
11159 #if defined (__stub_openpty) || defined (__stub___openpty)
11160 choke me
11161 #else
11162 openpty();
11163 #endif
11164
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   eval "ac_cv_func_openpty=yes"
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_func_openpty=no"
11175 fi
11176 rm -f conftest*
11177
11178 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11179   echo "$ac_t""yes" 1>&6
11180   have_openpty=yes
11181 else
11182   echo "$ac_t""no" 1>&6
11183
11184   
11185 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11186 echo "configure:11187: checking for openpty in -lutil" >&5
11187 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11188
11189 xe_check_libs=" -lutil "
11190 cat > conftest.$ac_ext <<EOF
11191 #line 11192 "configure"
11192 #include "confdefs.h"
11193 /* Override any gcc2 internal prototype to avoid an error.  */
11194 /* We use char because int might match the return type of a gcc2
11195     builtin and then its argument prototype would still apply.  */
11196 char openpty();
11197
11198 int main() {
11199 openpty()
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11203   rm -rf conftest*
11204   eval "ac_cv_lib_$ac_lib_var=yes"
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   eval "ac_cv_lib_$ac_lib_var=no"
11210 fi
11211 rm -f conftest*
11212 xe_check_libs=""
11213
11214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11215   echo "$ac_t""yes" 1>&6
11216   have_openpty=yes need_libutil=yes
11217 else
11218   echo "$ac_t""no" 1>&6
11219 fi
11220
11221
11222 fi
11223
11224 if test "$have_openpty" = "yes"; then
11225   { test "$extra_verbose" = "yes" && cat << \EOF
11226     Defining HAVE_OPENPTY
11227 EOF
11228 cat >> confdefs.h <<\EOF
11229 #define HAVE_OPENPTY 1
11230 EOF
11231 }
11232
11233   for ac_hdr in pty.h libutil.h util.h
11234 do
11235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11237 echo "configure:11238: checking for $ac_hdr" >&5
11238
11239 cat > conftest.$ac_ext <<EOF
11240 #line 11241 "configure"
11241 #include "confdefs.h"
11242 #include <$ac_hdr>
11243 EOF
11244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11245 { (eval echo configure:11246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11247 if test -z "$ac_err"; then
11248   rm -rf conftest*
11249   eval "ac_cv_header_$ac_safe=yes"
11250 else
11251   echo "$ac_err" >&5
11252   echo "configure: failed program was:" >&5
11253   cat conftest.$ac_ext >&5
11254   rm -rf conftest*
11255   eval "ac_cv_header_$ac_safe=no"
11256 fi
11257 rm -f conftest*
11258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11259   echo "$ac_t""yes" 1>&6
11260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11261   { test "$extra_verbose" = "yes" && cat << EOF
11262     Defining $ac_tr_hdr
11263 EOF
11264 cat >> confdefs.h <<EOF
11265 #define $ac_tr_hdr 1
11266 EOF
11267 }
11268  break
11269 else
11270   echo "$ac_t""no" 1>&6
11271 fi
11272 done
11273
11274   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11275 fi
11276
11277 for ac_hdr in stropts.h
11278 do
11279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11281 echo "configure:11282: checking for $ac_hdr" >&5
11282
11283 cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286 #include <$ac_hdr>
11287 EOF
11288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11289 { (eval echo configure:11290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11291 if test -z "$ac_err"; then
11292   rm -rf conftest*
11293   eval "ac_cv_header_$ac_safe=yes"
11294 else
11295   echo "$ac_err" >&5
11296   echo "configure: failed program was:" >&5
11297   cat conftest.$ac_ext >&5
11298   rm -rf conftest*
11299   eval "ac_cv_header_$ac_safe=no"
11300 fi
11301 rm -f conftest*
11302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11303   echo "$ac_t""yes" 1>&6
11304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11305   { test "$extra_verbose" = "yes" && cat << EOF
11306     Defining $ac_tr_hdr
11307 EOF
11308 cat >> confdefs.h <<EOF
11309 #define $ac_tr_hdr 1
11310 EOF
11311 }
11312  
11313 else
11314   echo "$ac_t""no" 1>&6
11315 fi
11316 done
11317
11318 if test "$ac_cv_header_stropts_h" = "yes"; then
11319   for ac_func in isastream
11320 do
11321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11322 echo "configure:11323: checking for $ac_func" >&5
11323
11324 cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327 /* System header to define __stub macros and hopefully few prototypes,
11328     which can conflict with char $ac_func(); below.  */
11329 #include <assert.h>
11330 /* Override any gcc2 internal prototype to avoid an error.  */
11331 /* We use char because int might match the return type of a gcc2
11332     builtin and then its argument prototype would still apply.  */
11333 char $ac_func();
11334
11335 int main() {
11336
11337 /* The GNU C library defines this for functions which it implements
11338     to always fail with ENOSYS.  Some functions are actually named
11339     something starting with __ and the normal name is an alias.  */
11340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11341 choke me
11342 #else
11343 $ac_func();
11344 #endif
11345
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   eval "ac_cv_func_$ac_func=yes"
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_func_$ac_func=no"
11356 fi
11357 rm -f conftest*
11358
11359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11360   echo "$ac_t""yes" 1>&6
11361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11362   { test "$extra_verbose" = "yes" && cat << EOF
11363     Defining $ac_tr_func
11364 EOF
11365 cat >> confdefs.h <<EOF
11366 #define $ac_tr_func 1
11367 EOF
11368 }
11369  
11370 else
11371   echo "$ac_t""no" 1>&6
11372 fi
11373 done
11374
11375   for ac_hdr in strtio.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  fi
11416
11417 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11418    echo "    xemacs will be linked with \"realpath.o\""
11419  fi
11420
11421 for ac_func in getloadavg
11422 do
11423 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_func" >&5
11425
11426 cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429 /* System header to define __stub macros and hopefully few prototypes,
11430     which can conflict with char $ac_func(); below.  */
11431 #include <assert.h>
11432 /* Override any gcc2 internal prototype to avoid an error.  */
11433 /* We use char because int might match the return type of a gcc2
11434     builtin and then its argument prototype would still apply.  */
11435 char $ac_func();
11436
11437 int main() {
11438
11439 /* The GNU C library defines this for functions which it implements
11440     to always fail with ENOSYS.  Some functions are actually named
11441     something starting with __ and the normal name is an alias.  */
11442 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11443 choke me
11444 #else
11445 $ac_func();
11446 #endif
11447
11448 ; return 0; }
11449 EOF
11450 if { (eval echo configure:11451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11451   rm -rf conftest*
11452   eval "ac_cv_func_$ac_func=yes"
11453 else
11454   echo "configure: failed program was:" >&5
11455   cat conftest.$ac_ext >&5
11456   rm -rf conftest*
11457   eval "ac_cv_func_$ac_func=no"
11458 fi
11459 rm -f conftest*
11460
11461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11462   echo "$ac_t""yes" 1>&6
11463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11464   { test "$extra_verbose" = "yes" && cat << EOF
11465     Defining $ac_tr_func
11466 EOF
11467 cat >> confdefs.h <<EOF
11468 #define $ac_tr_func 1
11469 EOF
11470 }
11471  
11472 else
11473   echo "$ac_t""no" 1>&6
11474 fi
11475 done
11476
11477
11478 if test "$ac_cv_func_getloadavg" = "yes"; then
11479         for ac_hdr in sys/loadavg.h
11480 do
11481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11483 echo "configure:11484: checking for $ac_hdr" >&5
11484
11485 cat > conftest.$ac_ext <<EOF
11486 #line 11487 "configure"
11487 #include "confdefs.h"
11488 #include <$ac_hdr>
11489 EOF
11490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11491 { (eval echo configure:11492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11493 if test -z "$ac_err"; then
11494   rm -rf conftest*
11495   eval "ac_cv_header_$ac_safe=yes"
11496 else
11497   echo "$ac_err" >&5
11498   echo "configure: failed program was:" >&5
11499   cat conftest.$ac_ext >&5
11500   rm -rf conftest*
11501   eval "ac_cv_header_$ac_safe=no"
11502 fi
11503 rm -f conftest*
11504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11505   echo "$ac_t""yes" 1>&6
11506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11507   { test "$extra_verbose" = "yes" && cat << EOF
11508     Defining $ac_tr_hdr
11509 EOF
11510 cat >> confdefs.h <<EOF
11511 #define $ac_tr_hdr 1
11512 EOF
11513 }
11514  
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518 done
11519
11520 else
11521     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11522    echo "    xemacs will be linked with \"getloadavg.o\""
11523  fi
11524
11525     
11526 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11527 echo "configure:11528: checking for kstat_open in -lkstat" >&5
11528 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11529
11530 xe_check_libs=" -lkstat "
11531 cat > conftest.$ac_ext <<EOF
11532 #line 11533 "configure"
11533 #include "confdefs.h"
11534 /* Override any gcc2 internal prototype to avoid an error.  */
11535 /* We use char because int might match the return type of a gcc2
11536     builtin and then its argument prototype would still apply.  */
11537 char kstat_open();
11538
11539 int main() {
11540 kstat_open()
11541 ; return 0; }
11542 EOF
11543 if { (eval echo configure:11544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11544   rm -rf conftest*
11545   eval "ac_cv_lib_$ac_lib_var=yes"
11546 else
11547   echo "configure: failed program was:" >&5
11548   cat conftest.$ac_ext >&5
11549   rm -rf conftest*
11550   eval "ac_cv_lib_$ac_lib_var=no"
11551 fi
11552 rm -f conftest*
11553 xe_check_libs=""
11554
11555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11556   echo "$ac_t""yes" 1>&6
11557     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11559   { test "$extra_verbose" = "yes" && cat << EOF
11560     Defining $ac_tr_lib
11561 EOF
11562 cat >> confdefs.h <<EOF
11563 #define $ac_tr_lib 1
11564 EOF
11565 }
11566
11567   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11568
11569 else
11570   echo "$ac_t""no" 1>&6
11571 fi
11572
11573
11574   for ac_hdr in kstat.h
11575 do
11576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11578 echo "configure:11579: checking for $ac_hdr" >&5
11579
11580 cat > conftest.$ac_ext <<EOF
11581 #line 11582 "configure"
11582 #include "confdefs.h"
11583 #include <$ac_hdr>
11584 EOF
11585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11586 { (eval echo configure:11587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11588 if test -z "$ac_err"; then
11589   rm -rf conftest*
11590   eval "ac_cv_header_$ac_safe=yes"
11591 else
11592   echo "$ac_err" >&5
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -rf conftest*
11596   eval "ac_cv_header_$ac_safe=no"
11597 fi
11598 rm -f conftest*
11599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11600   echo "$ac_t""yes" 1>&6
11601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11602   { test "$extra_verbose" = "yes" && cat << EOF
11603     Defining $ac_tr_hdr
11604 EOF
11605 cat >> confdefs.h <<EOF
11606 #define $ac_tr_hdr 1
11607 EOF
11608 }
11609  
11610 else
11611   echo "$ac_t""no" 1>&6
11612 fi
11613 done
11614
11615
11616     
11617 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11618 echo "configure:11619: checking for kvm_read in -lkvm" >&5
11619 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11620
11621 xe_check_libs=" -lkvm "
11622 cat > conftest.$ac_ext <<EOF
11623 #line 11624 "configure"
11624 #include "confdefs.h"
11625 /* Override any gcc2 internal prototype to avoid an error.  */
11626 /* We use char because int might match the return type of a gcc2
11627     builtin and then its argument prototype would still apply.  */
11628 char kvm_read();
11629
11630 int main() {
11631 kvm_read()
11632 ; return 0; }
11633 EOF
11634 if { (eval echo configure:11635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11635   rm -rf conftest*
11636   eval "ac_cv_lib_$ac_lib_var=yes"
11637 else
11638   echo "configure: failed program was:" >&5
11639   cat conftest.$ac_ext >&5
11640   rm -rf conftest*
11641   eval "ac_cv_lib_$ac_lib_var=no"
11642 fi
11643 rm -f conftest*
11644 xe_check_libs=""
11645
11646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11647   echo "$ac_t""yes" 1>&6
11648     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11650   { test "$extra_verbose" = "yes" && cat << EOF
11651     Defining $ac_tr_lib
11652 EOF
11653 cat >> confdefs.h <<EOF
11654 #define $ac_tr_lib 1
11655 EOF
11656 }
11657
11658   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11659
11660 else
11661   echo "$ac_t""no" 1>&6
11662 fi
11663
11664
11665 fi
11666
11667 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11668 echo "configure:11669: checking whether netdb declares h_errno" >&5
11669 cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672 #include <netdb.h>
11673 int main() {
11674 return h_errno;
11675 ; return 0; }
11676 EOF
11677 if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11678   rm -rf conftest*
11679   echo "$ac_t""yes" 1>&6
11680    { test "$extra_verbose" = "yes" && cat << \EOF
11681     Defining HAVE_H_ERRNO
11682 EOF
11683 cat >> confdefs.h <<\EOF
11684 #define HAVE_H_ERRNO 1
11685 EOF
11686 }
11687
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -rf conftest*
11692   echo "$ac_t""no" 1>&6
11693 fi
11694 rm -f conftest*
11695
11696 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11697 echo "configure:11698: checking for sigsetjmp" >&5
11698 cat > conftest.$ac_ext <<EOF
11699 #line 11700 "configure"
11700 #include "confdefs.h"
11701 #include <setjmp.h>
11702 int main() {
11703 sigjmp_buf bar; sigsetjmp (bar, 0);
11704 ; return 0; }
11705 EOF
11706 if { (eval echo configure:11707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11707   rm -rf conftest*
11708   echo "$ac_t""yes" 1>&6
11709    { test "$extra_verbose" = "yes" && cat << \EOF
11710     Defining HAVE_SIGSETJMP
11711 EOF
11712 cat >> confdefs.h <<\EOF
11713 #define HAVE_SIGSETJMP 1
11714 EOF
11715 }
11716
11717 else
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -rf conftest*
11721   echo "$ac_t""no" 1>&6
11722 fi
11723 rm -f conftest*
11724
11725 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11726 echo "configure:11727: checking whether localtime caches TZ" >&5
11727
11728 if test "$ac_cv_func_tzset" = "yes"; then
11729 cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732 #include <time.h>
11733 #if STDC_HEADERS
11734 # include <stdlib.h>
11735 #endif
11736 extern char **environ;
11737 unset_TZ ()
11738 {
11739   char **from, **to;
11740   for (to = from = environ; (*to = *from); from++)
11741     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11742       to++;
11743 }
11744 char TZ_GMT0[] = "TZ=GMT0";
11745 char TZ_PST8[] = "TZ=PST8";
11746 main()
11747 {
11748   time_t now = time ((time_t *) 0);
11749   int hour_GMT0, hour_unset;
11750   if (putenv (TZ_GMT0) != 0)
11751     exit (1);
11752   hour_GMT0 = localtime (&now)->tm_hour;
11753   unset_TZ ();
11754   hour_unset = localtime (&now)->tm_hour;
11755   if (putenv (TZ_PST8) != 0)
11756     exit (1);
11757   if (localtime (&now)->tm_hour == hour_GMT0)
11758     exit (1);
11759   unset_TZ ();
11760   if (localtime (&now)->tm_hour != hour_unset)
11761     exit (1);
11762   exit (0);
11763 }
11764 EOF
11765 if { (eval echo configure:11766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11766 then
11767   emacs_cv_localtime_cache=no
11768 else
11769   conftest_rc="$?"
11770   echo "configure: failed program was:" >&5
11771   cat conftest.$ac_ext >&5
11772   rm -fr conftest*
11773   emacs_cv_localtime_cache=yes
11774 fi
11775 rm -fr conftest*
11776 else
11777         # If we lack tzset, report that localtime does not cache TZ,
11778         # since we can't invalidate the cache if we don't have tzset.
11779         emacs_cv_localtime_cache=no
11780 fi
11781 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11782 if test $emacs_cv_localtime_cache = yes; then
11783   { test "$extra_verbose" = "yes" && cat << \EOF
11784     Defining LOCALTIME_CACHE
11785 EOF
11786 cat >> confdefs.h <<\EOF
11787 #define LOCALTIME_CACHE 1
11788 EOF
11789 }
11790
11791 fi
11792
11793 if test "$HAVE_TIMEVAL" = "yes"; then
11794 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11795 echo "configure:11796: checking whether gettimeofday accepts one or two arguments" >&5
11796 cat > conftest.$ac_ext <<EOF
11797 #line 11798 "configure"
11798 #include "confdefs.h"
11799
11800 #ifdef TIME_WITH_SYS_TIME
11801 #include <sys/time.h>
11802 #include <time.h>
11803 #else
11804 #ifdef HAVE_SYS_TIME_H
11805 #include <sys/time.h>
11806 #else
11807 #include <time.h>
11808 #endif
11809 #endif
11810   
11811 int main() {
11812
11813   struct timeval time;
11814   gettimeofday (&time, 0);
11815
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11819   rm -rf conftest*
11820   echo "$ac_t""two" 1>&6
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   echo "$ac_t""one" 1>&6
11826    { test "$extra_verbose" = "yes" && cat << \EOF
11827     Defining GETTIMEOFDAY_ONE_ARGUMENT
11828 EOF
11829 cat >> confdefs.h <<\EOF
11830 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11831 EOF
11832 }
11833
11834 fi
11835 rm -f conftest*
11836 fi
11837
11838
11839 echo $ac_n "checking for inline""... $ac_c" 1>&6
11840 echo "configure:11841: checking for inline" >&5
11841
11842 ac_cv_c_inline=no
11843 for ac_kw in inline __inline__ __inline; do
11844   cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847
11848 int main() {
11849 } $ac_kw foo() {
11850 ; return 0; }
11851 EOF
11852 if { (eval echo configure:11853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11853   rm -rf conftest*
11854   ac_cv_c_inline=$ac_kw; break
11855 else
11856   echo "configure: failed program was:" >&5
11857   cat conftest.$ac_ext >&5
11858 fi
11859 rm -f conftest*
11860 done
11861
11862
11863 echo "$ac_t""$ac_cv_c_inline" 1>&6
11864 case "$ac_cv_c_inline" in
11865   inline | yes) ;;
11866   no) { test "$extra_verbose" = "yes" && cat << \EOF
11867     Defining inline = 
11868 EOF
11869 cat >> confdefs.h <<\EOF
11870 #define inline 
11871 EOF
11872 }
11873  ;;
11874   *)  { test "$extra_verbose" = "yes" && cat << EOF
11875     Defining inline = $ac_cv_c_inline
11876 EOF
11877 cat >> confdefs.h <<EOF
11878 #define inline $ac_cv_c_inline
11879 EOF
11880 }
11881  ;;
11882 esac
11883
11884 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11885    echo "    xemacs will be linked with \"inline.o\""
11886  fi
11887
11888
11889 if test "$__DECC" != "yes"; then
11890   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11891 # for constant arguments.  Useless!
11892 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11893 echo "configure:11894: checking for working alloca.h" >&5
11894
11895 cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898 #include <alloca.h>
11899 int main() {
11900 char *p = alloca(2 * sizeof(int));
11901 ; return 0; }
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11904   rm -rf conftest*
11905   ac_cv_header_alloca_h=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -rf conftest*
11910   ac_cv_header_alloca_h=no
11911 fi
11912 rm -f conftest*
11913
11914 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11915 if test $ac_cv_header_alloca_h = yes; then
11916   { test "$extra_verbose" = "yes" && cat << \EOF
11917     Defining HAVE_ALLOCA_H
11918 EOF
11919 cat >> confdefs.h <<\EOF
11920 #define HAVE_ALLOCA_H 1
11921 EOF
11922 }
11923
11924 fi
11925
11926 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11927 echo "configure:11928: checking for alloca" >&5
11928
11929 cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11932
11933 #ifdef __GNUC__
11934 # define alloca __builtin_alloca
11935 #else
11936 # ifdef _MSC_VER
11937 #  include <malloc.h>
11938 #  define alloca _alloca
11939 # else
11940 #  if HAVE_ALLOCA_H
11941 #   include <alloca.h>
11942 #  else
11943 #   ifdef _AIX
11944  #pragma alloca
11945 #   else
11946 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11947 char *alloca ();
11948 #    endif
11949 #   endif
11950 #  endif
11951 # endif
11952 #endif
11953
11954 int main() {
11955 char *p = (char *) alloca(1);
11956 ; return 0; }
11957 EOF
11958 if { (eval echo configure:11959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11959   rm -rf conftest*
11960   ac_cv_func_alloca_works=yes
11961 else
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -rf conftest*
11965   ac_cv_func_alloca_works=no
11966 fi
11967 rm -f conftest*
11968
11969 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11970 if test $ac_cv_func_alloca_works = yes; then
11971   { test "$extra_verbose" = "yes" && cat << \EOF
11972     Defining HAVE_ALLOCA
11973 EOF
11974 cat >> confdefs.h <<\EOF
11975 #define HAVE_ALLOCA 1
11976 EOF
11977 }
11978
11979 fi
11980
11981 if test $ac_cv_func_alloca_works = no; then
11982   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11983   # that cause trouble.  Some versions do not even contain alloca or
11984   # contain a buggy version.  If you still want to use their alloca,
11985   # use ar to extract alloca.o from them instead of compiling alloca.c.
11986   ALLOCA=alloca.${ac_objext}
11987   { test "$extra_verbose" = "yes" && cat << \EOF
11988     Defining C_ALLOCA
11989 EOF
11990 cat >> confdefs.h <<\EOF
11991 #define C_ALLOCA 1
11992 EOF
11993 }
11994
11995
11996 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11997 echo "configure:11998: checking whether alloca needs Cray hooks" >&5
11998
11999 cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 #if defined(CRAY) && ! defined(CRAY2)
12003 webecray
12004 #else
12005 wenotbecray
12006 #endif
12007
12008 EOF
12009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12010   egrep "webecray" >/dev/null 2>&1; then
12011   rm -rf conftest*
12012   ac_cv_os_cray=yes
12013 else
12014   rm -rf conftest*
12015   ac_cv_os_cray=no
12016 fi
12017 rm -f conftest*
12018
12019
12020 echo "$ac_t""$ac_cv_os_cray" 1>&6
12021 if test $ac_cv_os_cray = yes; then
12022 for ac_func in _getb67 GETB67 getb67; do
12023   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12024 echo "configure:12025: checking for $ac_func" >&5
12025
12026 cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029 /* System header to define __stub macros and hopefully few prototypes,
12030     which can conflict with char $ac_func(); below.  */
12031 #include <assert.h>
12032 /* Override any gcc2 internal prototype to avoid an error.  */
12033 /* We use char because int might match the return type of a gcc2
12034     builtin and then its argument prototype would still apply.  */
12035 char $ac_func();
12036
12037 int main() {
12038
12039 /* The GNU C library defines this for functions which it implements
12040     to always fail with ENOSYS.  Some functions are actually named
12041     something starting with __ and the normal name is an alias.  */
12042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12043 choke me
12044 #else
12045 $ac_func();
12046 #endif
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   eval "ac_cv_func_$ac_func=yes"
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   eval "ac_cv_func_$ac_func=no"
12058 fi
12059 rm -f conftest*
12060
12061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12062   echo "$ac_t""yes" 1>&6
12063   { test "$extra_verbose" = "yes" && cat << EOF
12064     Defining CRAY_STACKSEG_END = $ac_func
12065 EOF
12066 cat >> confdefs.h <<EOF
12067 #define CRAY_STACKSEG_END $ac_func
12068 EOF
12069 }
12070
12071   break
12072 else
12073   echo "$ac_t""no" 1>&6
12074 fi
12075
12076 done
12077 fi
12078
12079 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12080 echo "configure:12081: checking stack direction for C alloca" >&5
12081
12082 cat > conftest.$ac_ext <<EOF
12083 #line 12084 "configure"
12084 #include "confdefs.h"
12085 find_stack_direction ()
12086 {
12087   static char *addr = 0;
12088   auto char dummy;
12089   if (addr == 0)
12090     {
12091       addr = &dummy;
12092       return find_stack_direction ();
12093     }
12094   else
12095     return (&dummy > addr) ? 1 : -1;
12096 }
12097 main ()
12098 {
12099   exit (find_stack_direction() < 0);
12100 }
12101 EOF
12102 if { (eval echo configure:12103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12103 then
12104   ac_cv_c_stack_direction=1
12105 else
12106   conftest_rc="$?"
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -fr conftest*
12110   ac_cv_c_stack_direction=-1
12111 fi
12112 rm -fr conftest*
12113
12114 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12115 { test "$extra_verbose" = "yes" && cat << EOF
12116     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12117 EOF
12118 cat >> confdefs.h <<EOF
12119 #define STACK_DIRECTION $ac_cv_c_stack_direction
12120 EOF
12121 }
12122
12123 fi
12124
12125   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12126    echo "    xemacs will be linked with \"$ALLOCA\""
12127  fi
12128 fi
12129
12130 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12131 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12132 echo "configure:12133: checking for vfork.h" >&5
12133
12134 cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 #include <vfork.h>
12138 EOF
12139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12140 { (eval echo configure:12141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12142 if test -z "$ac_err"; then
12143   rm -rf conftest*
12144   eval "ac_cv_header_$ac_safe=yes"
12145 else
12146   echo "$ac_err" >&5
12147   echo "configure: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   rm -rf conftest*
12150   eval "ac_cv_header_$ac_safe=no"
12151 fi
12152 rm -f conftest*
12153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12154   echo "$ac_t""yes" 1>&6
12155   { test "$extra_verbose" = "yes" && cat << \EOF
12156     Defining HAVE_VFORK_H
12157 EOF
12158 cat >> confdefs.h <<\EOF
12159 #define HAVE_VFORK_H 1
12160 EOF
12161 }
12162
12163 else
12164   echo "$ac_t""no" 1>&6
12165 fi
12166
12167 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12168 echo "configure:12169: checking for working vfork" >&5
12169
12170 cat > conftest.$ac_ext <<EOF
12171 #line 12172 "configure"
12172 #include "confdefs.h"
12173 /* Thanks to Paul Eggert for this test.  */
12174 #include <stdio.h>
12175 #include <sys/types.h>
12176 #include <sys/stat.h>
12177 #ifdef HAVE_UNISTD_H
12178 #include <unistd.h>
12179 #endif
12180 #ifdef HAVE_VFORK_H
12181 #include <vfork.h>
12182 #endif
12183 /* On some sparc systems, changes by the child to local and incoming
12184    argument registers are propagated back to the parent.
12185    The compiler is told about this with #include <vfork.h>,
12186    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12187    Test for this by using a static variable whose address
12188    is put into a register that is clobbered by the vfork.  */
12189 static
12190 #ifdef __cplusplus
12191 sparc_address_test (int arg)
12192 #else
12193 sparc_address_test (arg) int arg;
12194 #endif
12195 {
12196   static pid_t child;
12197   if (!child) {
12198     child = vfork ();
12199     if (child < 0) {
12200       perror ("vfork");
12201       _exit(2);
12202     }
12203     if (!child) {
12204       arg = getpid();
12205       write(-1, "", 0);
12206       _exit (arg);
12207     }
12208   }
12209 }
12210 main() {
12211   pid_t parent = getpid ();
12212   pid_t child;
12213
12214   sparc_address_test ();
12215
12216   child = vfork ();
12217
12218   if (child == 0) {
12219     /* Here is another test for sparc vfork register problems.
12220        This test uses lots of local variables, at least
12221        as many local variables as main has allocated so far
12222        including compiler temporaries.  4 locals are enough for
12223        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12224        A buggy compiler should reuse the register of parent
12225        for one of the local variables, since it will think that
12226        parent can't possibly be used any more in this routine.
12227        Assigning to the local variable will thus munge parent
12228        in the parent process.  */
12229     pid_t
12230       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12231       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12232     /* Convince the compiler that p..p7 are live; otherwise, it might
12233        use the same hardware register for all 8 local variables.  */
12234     if (p != p1 || p != p2 || p != p3 || p != p4
12235         || p != p5 || p != p6 || p != p7)
12236       _exit(1);
12237
12238     /* On some systems (e.g. IRIX 3.3),
12239        vfork doesn't separate parent from child file descriptors.
12240        If the child closes a descriptor before it execs or exits,
12241        this munges the parent's descriptor as well.
12242        Test for this by closing stdout in the child.  */
12243     _exit(close(fileno(stdout)) != 0);
12244   } else {
12245     int status;
12246     struct stat st;
12247
12248     while (wait(&status) != child)
12249       ;
12250     exit(
12251          /* Was there some problem with vforking?  */
12252          child < 0
12253
12254          /* Did the child fail?  (This shouldn't happen.)  */
12255          || status
12256
12257          /* Did the vfork/compiler bug occur?  */
12258          || parent != getpid()
12259
12260          /* Did the file descriptor bug occur?  */
12261          || fstat(fileno(stdout), &st) != 0
12262          );
12263   }
12264 }
12265 EOF
12266 if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12267 then
12268   ac_cv_func_vfork_works=yes
12269 else
12270   conftest_rc="$?"
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -fr conftest*
12274   ac_cv_func_vfork_works=no
12275 fi
12276 rm -fr conftest*
12277
12278 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12279 if test $ac_cv_func_vfork_works = no; then
12280   { test "$extra_verbose" = "yes" && cat << \EOF
12281     Defining vfork = fork
12282 EOF
12283 cat >> confdefs.h <<\EOF
12284 #define vfork fork
12285 EOF
12286 }
12287
12288 fi
12289
12290
12291 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12292 echo "configure:12293: checking for working strcoll" >&5
12293
12294 cat > conftest.$ac_ext <<EOF
12295 #line 12296 "configure"
12296 #include "confdefs.h"
12297 #include <string.h>
12298 main ()
12299 {
12300   exit (strcoll ("abc", "def") >= 0 ||
12301         strcoll ("ABC", "DEF") >= 0 ||
12302         strcoll ("123", "456") >= 0);
12303 }
12304 EOF
12305 if { (eval echo configure:12306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12306 then
12307   ac_cv_func_strcoll_works=yes
12308 else
12309   conftest_rc="$?"
12310   echo "configure: failed program was:" >&5
12311   cat conftest.$ac_ext >&5
12312   rm -fr conftest*
12313   ac_cv_func_strcoll_works=no
12314 fi
12315 rm -fr conftest*
12316
12317 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12318 if test $ac_cv_func_strcoll_works = yes; then
12319   { test "$extra_verbose" = "yes" && cat << \EOF
12320     Defining HAVE_STRCOLL
12321 EOF
12322 cat >> confdefs.h <<\EOF
12323 #define HAVE_STRCOLL 1
12324 EOF
12325 }
12326
12327 fi
12328
12329
12330 for ac_func in getpgrp
12331 do
12332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12333 echo "configure:12334: checking for $ac_func" >&5
12334
12335 cat > conftest.$ac_ext <<EOF
12336 #line 12337 "configure"
12337 #include "confdefs.h"
12338 /* System header to define __stub macros and hopefully few prototypes,
12339     which can conflict with char $ac_func(); below.  */
12340 #include <assert.h>
12341 /* Override any gcc2 internal prototype to avoid an error.  */
12342 /* We use char because int might match the return type of a gcc2
12343     builtin and then its argument prototype would still apply.  */
12344 char $ac_func();
12345
12346 int main() {
12347
12348 /* The GNU C library defines this for functions which it implements
12349     to always fail with ENOSYS.  Some functions are actually named
12350     something starting with __ and the normal name is an alias.  */
12351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12352 choke me
12353 #else
12354 $ac_func();
12355 #endif
12356
12357 ; return 0; }
12358 EOF
12359 if { (eval echo configure:12360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12360   rm -rf conftest*
12361   eval "ac_cv_func_$ac_func=yes"
12362 else
12363   echo "configure: failed program was:" >&5
12364   cat conftest.$ac_ext >&5
12365   rm -rf conftest*
12366   eval "ac_cv_func_$ac_func=no"
12367 fi
12368 rm -f conftest*
12369
12370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12371   echo "$ac_t""yes" 1>&6
12372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12373   { test "$extra_verbose" = "yes" && cat << EOF
12374     Defining $ac_tr_func
12375 EOF
12376 cat >> confdefs.h <<EOF
12377 #define $ac_tr_func 1
12378 EOF
12379 }
12380  
12381 else
12382   echo "$ac_t""no" 1>&6
12383 fi
12384 done
12385
12386 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12387 echo "configure:12388: checking whether getpgrp takes no argument" >&5
12388
12389 cat > conftest.$ac_ext <<EOF
12390 #line 12391 "configure"
12391 #include "confdefs.h"
12392
12393 /*
12394  * If this system has a BSD-style getpgrp(),
12395  * which takes a pid argument, exit unsuccessfully.
12396  *
12397  * Snarfed from Chet Ramey's bash pgrp.c test program
12398  */
12399 #include <stdio.h>
12400 #include <sys/types.h>
12401
12402 int     pid;
12403 int     pg1, pg2, pg3, pg4;
12404 int     ng, np, s, child;
12405
12406 main()
12407 {
12408         pid = getpid();
12409         pg1 = getpgrp(0);
12410         pg2 = getpgrp();
12411         pg3 = getpgrp(pid);
12412         pg4 = getpgrp(1);
12413
12414         /*
12415          * If all of these values are the same, it's pretty sure that
12416          * we're on a system that ignores getpgrp's first argument.
12417          */
12418         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12419                 exit(0);
12420
12421         child = fork();
12422         if (child < 0)
12423                 exit(1);
12424         else if (child == 0) {
12425                 np = getpid();
12426                 /*
12427                  * If this is Sys V, this will not work; pgrp will be
12428                  * set to np because setpgrp just changes a pgrp to be
12429                  * the same as the pid.
12430                  */
12431                 setpgrp(np, pg1);
12432                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12433                 if (ng == pg1) {
12434                         exit(1);
12435                 } else {
12436                         exit(0);
12437                 }
12438         } else {
12439                 wait(&s);
12440                 exit(s>>8);
12441         }
12442 }
12443
12444 EOF
12445 if { (eval echo configure:12446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12446 then
12447   ac_cv_func_getpgrp_void=yes
12448 else
12449   conftest_rc="$?"
12450   echo "configure: failed program was:" >&5
12451   cat conftest.$ac_ext >&5
12452   rm -fr conftest*
12453   ac_cv_func_getpgrp_void=no
12454 fi
12455 rm -fr conftest*
12456
12457
12458 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12459 if test $ac_cv_func_getpgrp_void = yes; then
12460   { test "$extra_verbose" = "yes" && cat << \EOF
12461     Defining GETPGRP_VOID
12462 EOF
12463 cat >> confdefs.h <<\EOF
12464 #define GETPGRP_VOID 1
12465 EOF
12466 }
12467
12468 fi
12469
12470
12471 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12472 echo "configure:12473: checking for working mmap" >&5
12473 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12474 cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 #include <stdio.h>
12478 #include <unistd.h>
12479 #include <fcntl.h>
12480 #include <sys/mman.h>
12481
12482 #ifndef MAP_VARIABLE
12483 #define MAP_VARIABLE 0
12484 #endif
12485
12486 #ifndef MAP_FAILED
12487 #define MAP_FAILED -1
12488 #endif
12489
12490 int main (int argc, char *argv[])
12491 {
12492   int fd = -1;
12493   caddr_t p;
12494 #ifndef MAP_ANONYMOUS
12495   fd = open ("/dev/zero", O_RDWR);
12496   if (fd < 0)
12497     return 1;
12498 #define MAP_ANONYMOUS 0
12499 #endif
12500   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12501            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12502            fd, 0) != (void *) MAP_FAILED)
12503     return 0;
12504   perror ("conftest: mmap failed");
12505   return 1;
12506 }
12507 EOF
12508 if { (eval echo configure:12509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12509 then
12510   have_mmap=yes
12511 else
12512   conftest_rc="$?"
12513   echo "configure: failed program was:" >&5
12514   cat conftest.$ac_ext >&5
12515   rm -fr conftest*
12516   have_mmap=no
12517 fi
12518 rm -fr conftest* ;;
12519 esac
12520 echo "$ac_t""$have_mmap" 1>&6
12521 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12522     Defining HAVE_MMAP
12523 EOF
12524 cat >> confdefs.h <<\EOF
12525 #define HAVE_MMAP 1
12526 EOF
12527 }
12528
12529
12530 case "$opsys" in cygwin*) 
12531         test "$rel_alloc" = "default" && rel_alloc=no ;;
12532 esac
12533 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12534 if test "$rel_alloc $have_mmap" = "default yes"; then
12535   if test "$doug_lea_malloc" = "yes"; then
12536         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12537 echo "configure:12538: checking for M_MMAP_THRESHOLD" >&5
12538     cat > conftest.$ac_ext <<EOF
12539 #line 12540 "configure"
12540 #include "confdefs.h"
12541 #include <malloc.h>
12542 int main() {
12543
12544 #ifndef M_MMAP_THRESHOLD
12545 #error No M_MMAP_THRESHOLD :-(
12546 !@+$%^&*_)(_ - unlikely to compile...
12547 #endif
12548
12549 ; return 0; }
12550 EOF
12551 if { (eval echo configure:12552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12552   rm -rf conftest*
12553   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12554 else
12555   echo "configure: failed program was:" >&5
12556   cat conftest.$ac_ext >&5
12557   rm -rf conftest*
12558   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12559 fi
12560 rm -f conftest*
12561   else
12562     rel_alloc=yes
12563   fi
12564 fi
12565 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12566     Defining REL_ALLOC
12567 EOF
12568 cat >> confdefs.h <<\EOF
12569 #define REL_ALLOC 1
12570 EOF
12571 }
12572
12573
12574 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12575 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12576 echo "configure:12577: checking for termios.h" >&5
12577
12578 cat > conftest.$ac_ext <<EOF
12579 #line 12580 "configure"
12580 #include "confdefs.h"
12581 #include <termios.h>
12582 EOF
12583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12584 { (eval echo configure:12585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12586 if test -z "$ac_err"; then
12587   rm -rf conftest*
12588   eval "ac_cv_header_$ac_safe=yes"
12589 else
12590   echo "$ac_err" >&5
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -rf conftest*
12594   eval "ac_cv_header_$ac_safe=no"
12595 fi
12596 rm -f conftest*
12597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12598   echo "$ac_t""yes" 1>&6
12599   { test "$extra_verbose" = "yes" && cat << \EOF
12600     Defining HAVE_TERMIOS
12601 EOF
12602 cat >> confdefs.h <<\EOF
12603 #define HAVE_TERMIOS 1
12604 EOF
12605 }
12606
12607   { test "$extra_verbose" = "yes" && cat << \EOF
12608     Defining SIGNALS_VIA_CHARACTERS
12609 EOF
12610 cat >> confdefs.h <<\EOF
12611 #define SIGNALS_VIA_CHARACTERS 1
12612 EOF
12613 }
12614
12615   { test "$extra_verbose" = "yes" && cat << \EOF
12616     Defining NO_TERMIO
12617 EOF
12618 cat >> confdefs.h <<\EOF
12619 #define NO_TERMIO 1
12620 EOF
12621 }
12622
12623 else
12624   echo "$ac_t""no" 1>&6
12625 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12626 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12627 echo "configure:12628: checking for termio.h" >&5
12628
12629 cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 #include <termio.h>
12633 EOF
12634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12635 { (eval echo configure:12636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12637 if test -z "$ac_err"; then
12638   rm -rf conftest*
12639   eval "ac_cv_header_$ac_safe=yes"
12640 else
12641   echo "$ac_err" >&5
12642   echo "configure: failed program was:" >&5
12643   cat conftest.$ac_ext >&5
12644   rm -rf conftest*
12645   eval "ac_cv_header_$ac_safe=no"
12646 fi
12647 rm -f conftest*
12648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12649   echo "$ac_t""yes" 1>&6
12650   { test "$extra_verbose" = "yes" && cat << \EOF
12651     Defining HAVE_TERMIO
12652 EOF
12653 cat >> confdefs.h <<\EOF
12654 #define HAVE_TERMIO 1
12655 EOF
12656 }
12657
12658 else
12659   echo "$ac_t""no" 1>&6
12660 fi
12661
12662 fi
12663
12664
12665
12666 echo $ac_n "checking for socket""... $ac_c" 1>&6
12667 echo "configure:12668: checking for socket" >&5
12668
12669 cat > conftest.$ac_ext <<EOF
12670 #line 12671 "configure"
12671 #include "confdefs.h"
12672 /* System header to define __stub macros and hopefully few prototypes,
12673     which can conflict with char socket(); below.  */
12674 #include <assert.h>
12675 /* Override any gcc2 internal prototype to avoid an error.  */
12676 /* We use char because int might match the return type of a gcc2
12677     builtin and then its argument prototype would still apply.  */
12678 char socket();
12679
12680 int main() {
12681
12682 /* The GNU C library defines this for functions which it implements
12683     to always fail with ENOSYS.  Some functions are actually named
12684     something starting with __ and the normal name is an alias.  */
12685 #if defined (__stub_socket) || defined (__stub___socket)
12686 choke me
12687 #else
12688 socket();
12689 #endif
12690
12691 ; return 0; }
12692 EOF
12693 if { (eval echo configure:12694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12694   rm -rf conftest*
12695   eval "ac_cv_func_socket=yes"
12696 else
12697   echo "configure: failed program was:" >&5
12698   cat conftest.$ac_ext >&5
12699   rm -rf conftest*
12700   eval "ac_cv_func_socket=no"
12701 fi
12702 rm -f conftest*
12703
12704 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12705   echo "$ac_t""yes" 1>&6
12706   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12707 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12708 echo "configure:12709: checking for netinet/in.h" >&5
12709
12710 cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 #include <netinet/in.h>
12714 EOF
12715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12716 { (eval echo configure:12717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12718 if test -z "$ac_err"; then
12719   rm -rf conftest*
12720   eval "ac_cv_header_$ac_safe=yes"
12721 else
12722   echo "$ac_err" >&5
12723   echo "configure: failed program was:" >&5
12724   cat conftest.$ac_ext >&5
12725   rm -rf conftest*
12726   eval "ac_cv_header_$ac_safe=no"
12727 fi
12728 rm -f conftest*
12729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12730   echo "$ac_t""yes" 1>&6
12731   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12732 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12733 echo "configure:12734: checking for arpa/inet.h" >&5
12734
12735 cat > conftest.$ac_ext <<EOF
12736 #line 12737 "configure"
12737 #include "confdefs.h"
12738 #include <arpa/inet.h>
12739 EOF
12740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12741 { (eval echo configure:12742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12743 if test -z "$ac_err"; then
12744   rm -rf conftest*
12745   eval "ac_cv_header_$ac_safe=yes"
12746 else
12747   echo "$ac_err" >&5
12748   echo "configure: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   rm -rf conftest*
12751   eval "ac_cv_header_$ac_safe=no"
12752 fi
12753 rm -f conftest*
12754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12755   echo "$ac_t""yes" 1>&6
12756   
12757   { test "$extra_verbose" = "yes" && cat << \EOF
12758     Defining HAVE_SOCKETS
12759 EOF
12760 cat >> confdefs.h <<\EOF
12761 #define HAVE_SOCKETS 1
12762 EOF
12763 }
12764
12765       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12766 echo "configure:12767: checking "for sun_len member in struct sockaddr_un"" >&5
12767       cat > conftest.$ac_ext <<EOF
12768 #line 12769 "configure"
12769 #include "confdefs.h"
12770
12771 #include <sys/types.h>
12772 #include <sys/socket.h>
12773 #include <sys/un.h>
12774       
12775 int main() {
12776 static struct sockaddr_un x; x.sun_len = 1;
12777 ; return 0; }
12778 EOF
12779 if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12780   rm -rf conftest*
12781   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12782     Defining HAVE_SOCKADDR_SUN_LEN
12783 EOF
12784 cat >> confdefs.h <<\EOF
12785 #define HAVE_SOCKADDR_SUN_LEN 1
12786 EOF
12787 }
12788
12789 else
12790   echo "configure: failed program was:" >&5
12791   cat conftest.$ac_ext >&5
12792   rm -rf conftest*
12793   echo "$ac_t""no" 1>&6
12794 fi
12795 rm -f conftest*
12796       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12797 echo "configure:12798: checking "for ip_mreq struct in netinet/in.h"" >&5
12798       cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801
12802 #include <sys/types.h>
12803 #include <netinet/in.h>
12804       
12805 int main() {
12806 static struct ip_mreq x;
12807 ; return 0; }
12808 EOF
12809 if { (eval echo configure:12810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12810   rm -rf conftest*
12811   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12812     Defining HAVE_MULTICAST
12813 EOF
12814 cat >> confdefs.h <<\EOF
12815 #define HAVE_MULTICAST 1
12816 EOF
12817 }
12818
12819 else
12820   echo "configure: failed program was:" >&5
12821   cat conftest.$ac_ext >&5
12822   rm -rf conftest*
12823   echo "$ac_t""no" 1>&6
12824 fi
12825 rm -f conftest*
12826 else
12827   echo "$ac_t""no" 1>&6
12828 fi
12829
12830 else
12831   echo "$ac_t""no" 1>&6
12832 fi
12833
12834 else
12835   echo "$ac_t""no" 1>&6
12836 fi
12837
12838
12839 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12840 echo "configure:12841: checking for msgget" >&5
12841
12842 cat > conftest.$ac_ext <<EOF
12843 #line 12844 "configure"
12844 #include "confdefs.h"
12845 /* System header to define __stub macros and hopefully few prototypes,
12846     which can conflict with char msgget(); below.  */
12847 #include <assert.h>
12848 /* Override any gcc2 internal prototype to avoid an error.  */
12849 /* We use char because int might match the return type of a gcc2
12850     builtin and then its argument prototype would still apply.  */
12851 char msgget();
12852
12853 int main() {
12854
12855 /* The GNU C library defines this for functions which it implements
12856     to always fail with ENOSYS.  Some functions are actually named
12857     something starting with __ and the normal name is an alias.  */
12858 #if defined (__stub_msgget) || defined (__stub___msgget)
12859 choke me
12860 #else
12861 msgget();
12862 #endif
12863
12864 ; return 0; }
12865 EOF
12866 if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12867   rm -rf conftest*
12868   eval "ac_cv_func_msgget=yes"
12869 else
12870   echo "configure: failed program was:" >&5
12871   cat conftest.$ac_ext >&5
12872   rm -rf conftest*
12873   eval "ac_cv_func_msgget=no"
12874 fi
12875 rm -f conftest*
12876
12877 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12878   echo "$ac_t""yes" 1>&6
12879   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12880 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12881 echo "configure:12882: checking for sys/ipc.h" >&5
12882
12883 cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886 #include <sys/ipc.h>
12887 EOF
12888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12889 { (eval echo configure:12890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12891 if test -z "$ac_err"; then
12892   rm -rf conftest*
12893   eval "ac_cv_header_$ac_safe=yes"
12894 else
12895   echo "$ac_err" >&5
12896   echo "configure: failed program was:" >&5
12897   cat conftest.$ac_ext >&5
12898   rm -rf conftest*
12899   eval "ac_cv_header_$ac_safe=no"
12900 fi
12901 rm -f conftest*
12902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12903   echo "$ac_t""yes" 1>&6
12904   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12905 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12906 echo "configure:12907: checking for sys/msg.h" >&5
12907
12908 cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 #include <sys/msg.h>
12912 EOF
12913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12914 { (eval echo configure:12915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12916 if test -z "$ac_err"; then
12917   rm -rf conftest*
12918   eval "ac_cv_header_$ac_safe=yes"
12919 else
12920   echo "$ac_err" >&5
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   eval "ac_cv_header_$ac_safe=no"
12925 fi
12926 rm -f conftest*
12927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12928   echo "$ac_t""yes" 1>&6
12929   { test "$extra_verbose" = "yes" && cat << \EOF
12930     Defining HAVE_SYSVIPC
12931 EOF
12932 cat >> confdefs.h <<\EOF
12933 #define HAVE_SYSVIPC 1
12934 EOF
12935 }
12936
12937 else
12938   echo "$ac_t""no" 1>&6
12939 fi
12940
12941 else
12942   echo "$ac_t""no" 1>&6
12943 fi
12944
12945 else
12946   echo "$ac_t""no" 1>&6
12947 fi
12948
12949
12950 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12951 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12952 echo "configure:12953: checking for dirent.h" >&5
12953
12954 cat > conftest.$ac_ext <<EOF
12955 #line 12956 "configure"
12956 #include "confdefs.h"
12957 #include <dirent.h>
12958 EOF
12959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12960 { (eval echo configure:12961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12962 if test -z "$ac_err"; then
12963   rm -rf conftest*
12964   eval "ac_cv_header_$ac_safe=yes"
12965 else
12966   echo "$ac_err" >&5
12967   echo "configure: failed program was:" >&5
12968   cat conftest.$ac_ext >&5
12969   rm -rf conftest*
12970   eval "ac_cv_header_$ac_safe=no"
12971 fi
12972 rm -f conftest*
12973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12974   echo "$ac_t""yes" 1>&6
12975   { test "$extra_verbose" = "yes" && cat << \EOF
12976     Defining SYSV_SYSTEM_DIR
12977 EOF
12978 cat >> confdefs.h <<\EOF
12979 #define SYSV_SYSTEM_DIR 1
12980 EOF
12981 }
12982
12983 else
12984   echo "$ac_t""no" 1>&6
12985 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12986 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12987 echo "configure:12988: checking for sys/dir.h" >&5
12988
12989 cat > conftest.$ac_ext <<EOF
12990 #line 12991 "configure"
12991 #include "confdefs.h"
12992 #include <sys/dir.h>
12993 EOF
12994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12995 { (eval echo configure:12996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12997 if test -z "$ac_err"; then
12998   rm -rf conftest*
12999   eval "ac_cv_header_$ac_safe=yes"
13000 else
13001   echo "$ac_err" >&5
13002   echo "configure: failed program was:" >&5
13003   cat conftest.$ac_ext >&5
13004   rm -rf conftest*
13005   eval "ac_cv_header_$ac_safe=no"
13006 fi
13007 rm -f conftest*
13008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13009   echo "$ac_t""yes" 1>&6
13010   :
13011 else
13012   echo "$ac_t""no" 1>&6
13013 { test "$extra_verbose" = "yes" && cat << \EOF
13014     Defining NONSYSTEM_DIR_LIBRARY
13015 EOF
13016 cat >> confdefs.h <<\EOF
13017 #define NONSYSTEM_DIR_LIBRARY 1
13018 EOF
13019 }
13020
13021 fi
13022
13023 fi
13024
13025
13026 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13027 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13028 echo "configure:13029: checking for nlist.h" >&5
13029
13030 cat > conftest.$ac_ext <<EOF
13031 #line 13032 "configure"
13032 #include "confdefs.h"
13033 #include <nlist.h>
13034 EOF
13035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13036 { (eval echo configure:13037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13038 if test -z "$ac_err"; then
13039   rm -rf conftest*
13040   eval "ac_cv_header_$ac_safe=yes"
13041 else
13042   echo "$ac_err" >&5
13043   echo "configure: failed program was:" >&5
13044   cat conftest.$ac_ext >&5
13045   rm -rf conftest*
13046   eval "ac_cv_header_$ac_safe=no"
13047 fi
13048 rm -f conftest*
13049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13050   echo "$ac_t""yes" 1>&6
13051   { test "$extra_verbose" = "yes" && cat << \EOF
13052     Defining NLIST_STRUCT
13053 EOF
13054 cat >> confdefs.h <<\EOF
13055 #define NLIST_STRUCT 1
13056 EOF
13057 }
13058
13059 else
13060   echo "$ac_t""no" 1>&6
13061 fi
13062
13063
13064
13065 echo "checking "for sound support"" 1>&6
13066 echo "configure:13067: checking "for sound support"" >&5
13067 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13068
13069 if test "$with_native_sound" != "no"; then
13070     if test -n "$native_sound_lib"; then
13071     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13072 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13073 echo "configure:13074: checking for multimedia/audio_device.h" >&5
13074
13075 cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 #include <multimedia/audio_device.h>
13079 EOF
13080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13081 { (eval echo configure:13082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13083 if test -z "$ac_err"; then
13084   rm -rf conftest*
13085   eval "ac_cv_header_$ac_safe=yes"
13086 else
13087   echo "$ac_err" >&5
13088   echo "configure: failed program was:" >&5
13089   cat conftest.$ac_ext >&5
13090   rm -rf conftest*
13091   eval "ac_cv_header_$ac_safe=no"
13092 fi
13093 rm -f conftest*
13094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13095   echo "$ac_t""yes" 1>&6
13096   sound_found=yes sound_cflags=""
13097       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13098    echo "    xemacs will be linked with \"sunplay.o\""
13099  fi
13100 else
13101   echo "$ac_t""no" 1>&6
13102 fi
13103
13104   fi
13105
13106     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13107     sound_found=yes
13108     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13109    echo "    xemacs will be linked with \"sunplay.o\""
13110  fi
13111     if test -d "/usr/demo/SOUND/include"
13112       then sound_cflags="-I/usr/demo/SOUND/include"
13113       else sound_cflags="-I/usr/demo/SOUND"
13114     fi
13115     if test -z "$native_sound_lib" ; then
13116       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13117         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13118         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13119       fi
13120     fi
13121   fi
13122
13123     if test -z "$sound_found"; then
13124     case "$canonical" in
13125     *-sgi-* )
13126       if test -z "$native_sound_lib"; then
13127         
13128 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13129 echo "configure:13130: checking for ALopenport in -laudio" >&5
13130 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13131
13132 xe_check_libs=" -laudio "
13133 cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 /* Override any gcc2 internal prototype to avoid an error.  */
13137 /* We use char because int might match the return type of a gcc2
13138     builtin and then its argument prototype would still apply.  */
13139 char ALopenport();
13140
13141 int main() {
13142 ALopenport()
13143 ; return 0; }
13144 EOF
13145 if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13146   rm -rf conftest*
13147   eval "ac_cv_lib_$ac_lib_var=yes"
13148 else
13149   echo "configure: failed program was:" >&5
13150   cat conftest.$ac_ext >&5
13151   rm -rf conftest*
13152   eval "ac_cv_lib_$ac_lib_var=no"
13153 fi
13154 rm -f conftest*
13155 xe_check_libs=""
13156
13157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13158   echo "$ac_t""yes" 1>&6
13159   native_sound_lib="-laudio"
13160 else
13161   echo "$ac_t""no" 1>&6
13162 fi
13163
13164
13165       fi
13166       if test -n "$native_sound_lib"; then
13167         sound_found=yes sound_cflags=""
13168         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13169    echo "    xemacs will be linked with \"sgiplay.o\""
13170  fi
13171       fi ;;
13172     hppa*-hp-hpux* )
13173       if test -z "$native_sound_lib"; then
13174         
13175 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13176 echo "configure:13177: checking for AOpenAudio in -lAlib" >&5
13177 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13178
13179 xe_check_libs=" -lAlib "
13180 cat > conftest.$ac_ext <<EOF
13181 #line 13182 "configure"
13182 #include "confdefs.h"
13183 /* Override any gcc2 internal prototype to avoid an error.  */
13184 /* We use char because int might match the return type of a gcc2
13185     builtin and then its argument prototype would still apply.  */
13186 char AOpenAudio();
13187
13188 int main() {
13189 AOpenAudio()
13190 ; return 0; }
13191 EOF
13192 if { (eval echo configure:13193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13193   rm -rf conftest*
13194   eval "ac_cv_lib_$ac_lib_var=yes"
13195 else
13196   echo "configure: failed program was:" >&5
13197   cat conftest.$ac_ext >&5
13198   rm -rf conftest*
13199   eval "ac_cv_lib_$ac_lib_var=no"
13200 fi
13201 rm -f conftest*
13202 xe_check_libs=""
13203
13204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13205   echo "$ac_t""yes" 1>&6
13206   native_sound_lib="-lAlib"
13207 else
13208   echo "$ac_t""no" 1>&6
13209 fi
13210
13211
13212       fi
13213       if test -n "$native_sound_lib"; then
13214         sound_found=yes
13215         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13216    echo "    xemacs will be linked with \"hpplay.o\""
13217  fi
13218         if test "$GCC" = "yes" # Kludge city
13219           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13220           else sound_cflags="+e -I/usr/audio/examples"
13221         fi
13222       fi ;;
13223     esac
13224   fi
13225
13226     if test -z "$sound_found"; then
13227     if test "$with_msw" = "yes"; then
13228     sound_found=yes
13229     native_sound_lib=
13230     fi
13231   fi
13232
13233     if test -z "$sound_found"; then
13234     for dir in "machine" "sys" "linux"; do
13235       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13236 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13237 echo "configure:13238: checking for ${dir}/soundcard.h" >&5
13238
13239 cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 #include <${dir}/soundcard.h>
13243 EOF
13244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13245 { (eval echo configure:13246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13247 if test -z "$ac_err"; then
13248   rm -rf conftest*
13249   eval "ac_cv_header_$ac_safe=yes"
13250 else
13251   echo "$ac_err" >&5
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_header_$ac_safe=no"
13256 fi
13257 rm -f conftest*
13258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13259   echo "$ac_t""yes" 1>&6
13260   sound_found=yes
13261        need_miscplay=yes
13262         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13263    echo "    xemacs will be linked with \"linuxplay.o\""
13264  fi
13265         { test "$extra_verbose" = "yes" && cat << EOF
13266     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13267 EOF
13268 cat >> confdefs.h <<EOF
13269 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13270 EOF
13271 }
13272
13273         break
13274 else
13275   echo "$ac_t""no" 1>&6
13276 fi
13277
13278     done
13279   fi
13280
13281   test "$sound_found" = "yes" && with_native_sound=yes
13282 fi
13283
13284 if test "$with_native_sound" = "yes"; then
13285   { test "$extra_verbose" = "yes" && cat << \EOF
13286     Defining HAVE_NATIVE_SOUND
13287 EOF
13288 cat >> confdefs.h <<\EOF
13289 #define HAVE_NATIVE_SOUND 1
13290 EOF
13291 }
13292
13293   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13294 fi
13295
13296 if test "$with_nas_sound" != "no"; then
13297   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13298 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13299 echo "configure:13300: checking for audio/audiolib.h" >&5
13300
13301 cat > conftest.$ac_ext <<EOF
13302 #line 13303 "configure"
13303 #include "confdefs.h"
13304 #include <audio/audiolib.h>
13305 EOF
13306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13307 { (eval echo configure:13308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13309 if test -z "$ac_err"; then
13310   rm -rf conftest*
13311   eval "ac_cv_header_$ac_safe=yes"
13312 else
13313   echo "$ac_err" >&5
13314   echo "configure: failed program was:" >&5
13315   cat conftest.$ac_ext >&5
13316   rm -rf conftest*
13317   eval "ac_cv_header_$ac_safe=no"
13318 fi
13319 rm -f conftest*
13320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13321   echo "$ac_t""yes" 1>&6
13322   
13323     
13324 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13325 echo "configure:13326: checking for AuOpenServer in -laudio" >&5
13326 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13327
13328 xe_check_libs=" -laudio "
13329 cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 /* Override any gcc2 internal prototype to avoid an error.  */
13333 /* We use char because int might match the return type of a gcc2
13334     builtin and then its argument prototype would still apply.  */
13335 char AuOpenServer();
13336
13337 int main() {
13338 AuOpenServer()
13339 ; return 0; }
13340 EOF
13341 if { (eval echo configure:13342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13342   rm -rf conftest*
13343   eval "ac_cv_lib_$ac_lib_var=yes"
13344 else
13345   echo "configure: failed program was:" >&5
13346   cat conftest.$ac_ext >&5
13347   rm -rf conftest*
13348   eval "ac_cv_lib_$ac_lib_var=no"
13349 fi
13350 rm -f conftest*
13351 xe_check_libs=""
13352
13353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13354   echo "$ac_t""yes" 1>&6
13355   have_nas_sound=yes
13356 else
13357   echo "$ac_t""no" 1>&6
13358 fi
13359
13360
13361 else
13362   echo "$ac_t""no" 1>&6
13363 fi
13364
13365   if test "$have_nas_sound" = "yes"; then
13366     with_nas_sound=yes
13367     { test "$extra_verbose" = "yes" && cat << \EOF
13368     Defining HAVE_NAS_SOUND
13369 EOF
13370 cat >> confdefs.h <<\EOF
13371 #define HAVE_NAS_SOUND 1
13372 EOF
13373 }
13374
13375     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13376    echo "    xemacs will be linked with \"nas.o\""
13377  fi
13378     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13379             cat > conftest.$ac_ext <<EOF
13380 #line 13381 "configure"
13381 #include "confdefs.h"
13382 #include <audio/Xtutil.h>
13383 EOF
13384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13385   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13386   :
13387 else
13388   rm -rf conftest*
13389   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13390     Defining NAS_NO_ERROR_JUMP
13391 EOF
13392 cat >> confdefs.h <<\EOF
13393 #define NAS_NO_ERROR_JUMP 1
13394 EOF
13395 }
13396
13397 fi
13398 rm -f conftest*
13399
13400   else
13401     test "$with_nas_sound" = "yes" && \
13402       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13403     with_nas_sound=no
13404   fi
13405 fi
13406
13407 if test "$with_esd_sound" != "no"; then
13408   # Extract the first word of "esd-config", so it can be a program name with args.
13409 set dummy esd-config; ac_word=$2
13410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13411 echo "configure:13412: checking for $ac_word" >&5
13412
13413 if test -n "$have_esd_config"; then
13414   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13415 else
13416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13417   ac_dummy="$PATH"
13418   for ac_dir in $ac_dummy; do
13419     test -z "$ac_dir" && ac_dir=.
13420     if test -f $ac_dir/$ac_word; then
13421       ac_cv_prog_have_esd_config="yes"
13422       break
13423     fi
13424   done
13425   IFS="$ac_save_ifs"
13426   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13427 fi
13428 have_esd_config="$ac_cv_prog_have_esd_config"
13429 if test -n "$have_esd_config"; then
13430   echo "$ac_t""$have_esd_config" 1>&6
13431 else
13432   echo "$ac_t""no" 1>&6
13433 fi
13434
13435   if test "$have_esd_config" = "yes"; then
13436     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13437     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
13438     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13439     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13440 echo "configure:13441: checking for esd_play_stream" >&5
13441
13442 cat > conftest.$ac_ext <<EOF
13443 #line 13444 "configure"
13444 #include "confdefs.h"
13445 /* System header to define __stub macros and hopefully few prototypes,
13446     which can conflict with char esd_play_stream(); below.  */
13447 #include <assert.h>
13448 /* Override any gcc2 internal prototype to avoid an error.  */
13449 /* We use char because int might match the return type of a gcc2
13450     builtin and then its argument prototype would still apply.  */
13451 char esd_play_stream();
13452
13453 int main() {
13454
13455 /* The GNU C library defines this for functions which it implements
13456     to always fail with ENOSYS.  Some functions are actually named
13457     something starting with __ and the normal name is an alias.  */
13458 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13459 choke me
13460 #else
13461 esd_play_stream();
13462 #endif
13463
13464 ; return 0; }
13465 EOF
13466 if { (eval echo configure:13467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13467   rm -rf conftest*
13468   eval "ac_cv_func_esd_play_stream=yes"
13469 else
13470   echo "configure: failed program was:" >&5
13471   cat conftest.$ac_ext >&5
13472   rm -rf conftest*
13473   eval "ac_cv_func_esd_play_stream=no"
13474 fi
13475 rm -f conftest*
13476
13477 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13478   echo "$ac_t""yes" 1>&6
13479   have_esd_sound=yes
13480 else
13481   echo "$ac_t""no" 1>&6
13482 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13483 fi
13484
13485   fi
13486
13487   if test "$have_esd_sound" = "yes"; then
13488     with_esd_sound=yes
13489     need_miscplay=yes
13490     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13491    echo "    xemacs will be linked with \"esd.o\""
13492  fi
13493     { test "$extra_verbose" = "yes" && cat << \EOF
13494     Defining HAVE_ESD_SOUND
13495 EOF
13496 cat >> confdefs.h <<\EOF
13497 #define HAVE_ESD_SOUND 1
13498 EOF
13499 }
13500
13501   else
13502     test "$with_esd_sound" = "yes" && \
13503       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13504     with_esd_sound=no
13505   fi
13506 fi
13507
13508 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13509    echo "    xemacs will be linked with \"miscplay.o\""
13510  fi
13511
13512
13513 test -z "$with_tty" && with_tty=yes
13514
13515 if test "$with_tty" = "yes"  ; then
13516   echo "checking for TTY-related features" 1>&6
13517 echo "configure:13518: checking for TTY-related features" >&5
13518   { test "$extra_verbose" = "yes" && cat << \EOF
13519     Defining HAVE_TTY
13520 EOF
13521 cat >> confdefs.h <<\EOF
13522 #define HAVE_TTY 1
13523 EOF
13524 }
13525
13526   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
13527    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\""
13528  fi
13529
13530     if test -z "$with_ncurses"; then
13531     
13532 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13533 echo "configure:13534: checking for tgetent in -lncurses" >&5
13534 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13535
13536 xe_check_libs=" -lncurses "
13537 cat > conftest.$ac_ext <<EOF
13538 #line 13539 "configure"
13539 #include "confdefs.h"
13540 /* Override any gcc2 internal prototype to avoid an error.  */
13541 /* We use char because int might match the return type of a gcc2
13542     builtin and then its argument prototype would still apply.  */
13543 char tgetent();
13544
13545 int main() {
13546 tgetent()
13547 ; return 0; }
13548 EOF
13549 if { (eval echo configure:13550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13550   rm -rf conftest*
13551   eval "ac_cv_lib_$ac_lib_var=yes"
13552 else
13553   echo "configure: failed program was:" >&5
13554   cat conftest.$ac_ext >&5
13555   rm -rf conftest*
13556   eval "ac_cv_lib_$ac_lib_var=no"
13557 fi
13558 rm -f conftest*
13559 xe_check_libs=""
13560
13561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13562   echo "$ac_t""yes" 1>&6
13563   with_ncurses=yes
13564 else
13565   echo "$ac_t""no" 1>&6
13566 with_ncurses=no
13567 fi
13568
13569
13570   fi
13571   if test "$with_ncurses" = "yes"; then
13572     { test "$extra_verbose" = "yes" && cat << \EOF
13573     Defining HAVE_NCURSES
13574 EOF
13575 cat >> confdefs.h <<\EOF
13576 #define HAVE_NCURSES 1
13577 EOF
13578 }
13579
13580     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13581 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13582 echo "configure:13583: checking for ncurses/curses.h" >&5
13583
13584 cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587 #include <ncurses/curses.h>
13588 EOF
13589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13590 { (eval echo configure:13591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13592 if test -z "$ac_err"; then
13593   rm -rf conftest*
13594   eval "ac_cv_header_$ac_safe=yes"
13595 else
13596   echo "$ac_err" >&5
13597   echo "configure: failed program was:" >&5
13598   cat conftest.$ac_ext >&5
13599   rm -rf conftest*
13600   eval "ac_cv_header_$ac_safe=no"
13601 fi
13602 rm -f conftest*
13603 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13604   echo "$ac_t""yes" 1>&6
13605   curses_h_file=ncurses/curses.h
13606 else
13607   echo "$ac_t""no" 1>&6
13608 fi
13609
13610     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13611 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13612 echo "configure:13613: checking for ncurses/term.h" >&5
13613
13614 cat > conftest.$ac_ext <<EOF
13615 #line 13616 "configure"
13616 #include "confdefs.h"
13617 #include <ncurses/term.h>
13618 EOF
13619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13620 { (eval echo configure:13621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13622 if test -z "$ac_err"; then
13623   rm -rf conftest*
13624   eval "ac_cv_header_$ac_safe=yes"
13625 else
13626   echo "$ac_err" >&5
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -rf conftest*
13630   eval "ac_cv_header_$ac_safe=no"
13631 fi
13632 rm -f conftest*
13633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13634   echo "$ac_t""yes" 1>&6
13635   term_h_file=ncurses/term.h
13636 else
13637   echo "$ac_t""no" 1>&6
13638 fi
13639
13640     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13641    echo "    xemacs will be linked with \"terminfo.o\""
13642  fi
13643     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13644
13645     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13646                         save_c_switch_site="$c_switch_site"
13647       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13648       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13649 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13650 echo "configure:13651: checking for ncurses/curses.h" >&5
13651
13652 cat > conftest.$ac_ext <<EOF
13653 #line 13654 "configure"
13654 #include "confdefs.h"
13655 #include <ncurses/curses.h>
13656 EOF
13657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13658 { (eval echo configure:13659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13660 if test -z "$ac_err"; then
13661   rm -rf conftest*
13662   eval "ac_cv_header_$ac_safe=yes"
13663 else
13664   echo "$ac_err" >&5
13665   echo "configure: failed program was:" >&5
13666   cat conftest.$ac_ext >&5
13667   rm -rf conftest*
13668   eval "ac_cv_header_$ac_safe=no"
13669 fi
13670 rm -f conftest*
13671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13672   echo "$ac_t""yes" 1>&6
13673   curses_h_file=ncurses/curses.h
13674 else
13675   echo "$ac_t""no" 1>&6
13676 fi
13677
13678       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13679         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13680         else c_switch_site="$save_c_switch_site"
13681       fi
13682     fi
13683   else         if test "$have_terminfo" = "yes"; then
13684       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13685    echo "    xemacs will be linked with \"terminfo.o\""
13686  fi
13687       if test -n "$libs_termcap"; then
13688         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13689       else
13690         for lib in curses termlib termcap; do
13691           
13692 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13693 echo "configure:13694: checking for tgetent in -l$lib" >&5
13694 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13695
13696 xe_check_libs=" -l$lib "
13697 cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 /* Override any gcc2 internal prototype to avoid an error.  */
13701 /* We use char because int might match the return type of a gcc2
13702     builtin and then its argument prototype would still apply.  */
13703 char tgetent();
13704
13705 int main() {
13706 tgetent()
13707 ; return 0; }
13708 EOF
13709 if { (eval echo configure:13710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13710   rm -rf conftest*
13711   eval "ac_cv_lib_$ac_lib_var=yes"
13712 else
13713   echo "configure: failed program was:" >&5
13714   cat conftest.$ac_ext >&5
13715   rm -rf conftest*
13716   eval "ac_cv_lib_$ac_lib_var=no"
13717 fi
13718 rm -f conftest*
13719 xe_check_libs=""
13720
13721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13722   echo "$ac_t""yes" 1>&6
13723   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13724 else
13725   echo "$ac_t""no" 1>&6
13726 fi
13727
13728
13729         done
13730       fi
13731     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13732                                 
13733 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13734 echo "configure:13735: checking for tgoto in -ltermcap" >&5
13735 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13736
13737 xe_check_libs=" -ltermcap "
13738 cat > conftest.$ac_ext <<EOF
13739 #line 13740 "configure"
13740 #include "confdefs.h"
13741 /* Override any gcc2 internal prototype to avoid an error.  */
13742 /* We use char because int might match the return type of a gcc2
13743     builtin and then its argument prototype would still apply.  */
13744 char tgoto();
13745
13746 int main() {
13747 tgoto()
13748 ; return 0; }
13749 EOF
13750 if { (eval echo configure:13751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13751   rm -rf conftest*
13752   eval "ac_cv_lib_$ac_lib_var=yes"
13753 else
13754   echo "configure: failed program was:" >&5
13755   cat conftest.$ac_ext >&5
13756   rm -rf conftest*
13757   eval "ac_cv_lib_$ac_lib_var=no"
13758 fi
13759 rm -f conftest*
13760 xe_check_libs=""
13761
13762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13763   echo "$ac_t""yes" 1>&6
13764     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13765     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13766   { test "$extra_verbose" = "yes" && cat << EOF
13767     Defining $ac_tr_lib
13768 EOF
13769 cat >> confdefs.h <<EOF
13770 #define $ac_tr_lib 1
13771 EOF
13772 }
13773
13774   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13775
13776 else
13777   echo "$ac_t""no" 1>&6
13778 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13779    echo "    xemacs will be linked with \"tparam.o\""
13780  fi
13781 fi
13782
13783
13784       else
13785         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13786    echo "    xemacs will be linked with \"tparam.o\""
13787  fi
13788       fi
13789                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13790       if test -n "$libs_termcap"; then
13791         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13792       else
13793         
13794 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13795 echo "configure:13796: checking for tgetent in -lcurses" >&5
13796 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13797
13798 xe_check_libs=" -lcurses "
13799 cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802 /* Override any gcc2 internal prototype to avoid an error.  */
13803 /* We use char because int might match the return type of a gcc2
13804     builtin and then its argument prototype would still apply.  */
13805 char tgetent();
13806
13807 int main() {
13808 tgetent()
13809 ; return 0; }
13810 EOF
13811 if { (eval echo configure:13812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13812   rm -rf conftest*
13813   eval "ac_cv_lib_$ac_lib_var=yes"
13814 else
13815   echo "configure: failed program was:" >&5
13816   cat conftest.$ac_ext >&5
13817   rm -rf conftest*
13818   eval "ac_cv_lib_$ac_lib_var=no"
13819 fi
13820 rm -f conftest*
13821 xe_check_libs=""
13822
13823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13824   echo "$ac_t""yes" 1>&6
13825   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13826 else
13827   echo "$ac_t""no" 1>&6
13828 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13829 echo "configure:13830: checking for tgetent in -ltermcap" >&5
13830 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13831
13832 xe_check_libs=" -ltermcap "
13833 cat > conftest.$ac_ext <<EOF
13834 #line 13835 "configure"
13835 #include "confdefs.h"
13836 /* Override any gcc2 internal prototype to avoid an error.  */
13837 /* We use char because int might match the return type of a gcc2
13838     builtin and then its argument prototype would still apply.  */
13839 char tgetent();
13840
13841 int main() {
13842 tgetent()
13843 ; return 0; }
13844 EOF
13845 if { (eval echo configure:13846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13846   rm -rf conftest*
13847   eval "ac_cv_lib_$ac_lib_var=yes"
13848 else
13849   echo "configure: failed program was:" >&5
13850   cat conftest.$ac_ext >&5
13851   rm -rf conftest*
13852   eval "ac_cv_lib_$ac_lib_var=no"
13853 fi
13854 rm -f conftest*
13855 xe_check_libs=""
13856
13857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13858   echo "$ac_t""yes" 1>&6
13859   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13860 else
13861   echo "$ac_t""no" 1>&6
13862 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13863    echo "    xemacs will be linked with \"termcap.o\""
13864  fi
13865 fi
13866
13867
13868 fi
13869
13870
13871       fi
13872     fi
13873   fi
13874   { test "$extra_verbose" = "yes" && cat << EOF
13875     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13876 EOF
13877 cat >> confdefs.h <<EOF
13878 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13879 EOF
13880 }
13881
13882   { test "$extra_verbose" = "yes" && cat << EOF
13883     Defining TERM_H_FILE = "${term_h_file-term.h}"
13884 EOF
13885 cat >> confdefs.h <<EOF
13886 #define TERM_H_FILE "${term_h_file-term.h}"
13887 EOF
13888 }
13889
13890
13891     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13892 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13893 echo "configure:13894: checking for gpm.h" >&5
13894
13895 cat > conftest.$ac_ext <<EOF
13896 #line 13897 "configure"
13897 #include "confdefs.h"
13898 #include <gpm.h>
13899 EOF
13900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13901 { (eval echo configure:13902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13903 if test -z "$ac_err"; then
13904   rm -rf conftest*
13905   eval "ac_cv_header_$ac_safe=yes"
13906 else
13907   echo "$ac_err" >&5
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910   rm -rf conftest*
13911   eval "ac_cv_header_$ac_safe=no"
13912 fi
13913 rm -f conftest*
13914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13915   echo "$ac_t""yes" 1>&6
13916   :
13917 else
13918   echo "$ac_t""no" 1>&6
13919 with_gpm=no
13920 fi
13921  }
13922   test -z "$with_gpm" && { 
13923 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13924 echo "configure:13925: checking for Gpm_Open in -lgpm" >&5
13925 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13926
13927 xe_check_libs=" -lgpm "
13928 cat > conftest.$ac_ext <<EOF
13929 #line 13930 "configure"
13930 #include "confdefs.h"
13931 /* Override any gcc2 internal prototype to avoid an error.  */
13932 /* We use char because int might match the return type of a gcc2
13933     builtin and then its argument prototype would still apply.  */
13934 char Gpm_Open();
13935
13936 int main() {
13937 Gpm_Open()
13938 ; return 0; }
13939 EOF
13940 if { (eval echo configure:13941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13941   rm -rf conftest*
13942   eval "ac_cv_lib_$ac_lib_var=yes"
13943 else
13944   echo "configure: failed program was:" >&5
13945   cat conftest.$ac_ext >&5
13946   rm -rf conftest*
13947   eval "ac_cv_lib_$ac_lib_var=no"
13948 fi
13949 rm -f conftest*
13950 xe_check_libs=""
13951
13952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13953   echo "$ac_t""yes" 1>&6
13954   with_gpm=yes
13955 else
13956   echo "$ac_t""no" 1>&6
13957 with_gpm=no
13958 fi
13959
13960  }
13961   if test "$with_gpm" = "yes"; then
13962     { test "$extra_verbose" = "yes" && cat << \EOF
13963     Defining HAVE_GPM
13964 EOF
13965 cat >> confdefs.h <<\EOF
13966 #define HAVE_GPM 1
13967 EOF
13968 }
13969
13970     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13971    echo "    xemacs will be linked with \"gpmevent.o\""
13972  fi
13973     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13974   fi
13975
13976 else   for feature in ncurses gpm; do
13977     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13978       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13979     fi
13980     eval "with_${feature}=no"
13981   done
13982 fi 
13983 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
13984    echo "    xemacs will be linked with \"event-unixoid.o\""
13985  fi
13986
13987
13988 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13989   != "no no no" && echo "checking for database support" 1>&6
13990 echo "configure:13991: checking for database support" >&5
13991
13992 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13993   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13994 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13995 echo "configure:13996: checking for ndbm.h" >&5
13996
13997 cat > conftest.$ac_ext <<EOF
13998 #line 13999 "configure"
13999 #include "confdefs.h"
14000 #include <ndbm.h>
14001 EOF
14002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14003 { (eval echo configure:14004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14005 if test -z "$ac_err"; then
14006   rm -rf conftest*
14007   eval "ac_cv_header_$ac_safe=yes"
14008 else
14009   echo "$ac_err" >&5
14010   echo "configure: failed program was:" >&5
14011   cat conftest.$ac_ext >&5
14012   rm -rf conftest*
14013   eval "ac_cv_header_$ac_safe=no"
14014 fi
14015 rm -f conftest*
14016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14017   echo "$ac_t""yes" 1>&6
14018   :
14019 else
14020   echo "$ac_t""no" 1>&6
14021
14022     test "$with_database_gdbm" = "yes" -o \
14023          "$with_database_dbm"  = "yes" && \
14024       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14025     with_database_gdbm=no with_database_dbm=no
14026 fi
14027
14028 fi
14029
14030 if test "$with_database_gdbm" != "no"; then
14031   
14032 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14033 echo "configure:14034: checking for dbm_open in -lgdbm" >&5
14034 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14035
14036 xe_check_libs=" -lgdbm "
14037 cat > conftest.$ac_ext <<EOF
14038 #line 14039 "configure"
14039 #include "confdefs.h"
14040 /* Override any gcc2 internal prototype to avoid an error.  */
14041 /* We use char because int might match the return type of a gcc2
14042     builtin and then its argument prototype would still apply.  */
14043 char dbm_open();
14044
14045 int main() {
14046 dbm_open()
14047 ; return 0; }
14048 EOF
14049 if { (eval echo configure:14050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14050   rm -rf conftest*
14051   eval "ac_cv_lib_$ac_lib_var=yes"
14052 else
14053   echo "configure: failed program was:" >&5
14054   cat conftest.$ac_ext >&5
14055   rm -rf conftest*
14056   eval "ac_cv_lib_$ac_lib_var=no"
14057 fi
14058 rm -f conftest*
14059 xe_check_libs=""
14060
14061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14062   echo "$ac_t""yes" 1>&6
14063   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14064 else
14065   echo "$ac_t""no" 1>&6
14066 if test "$with_database_gdbm" = "yes"; then
14067      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14068    fi
14069    with_database_gdbm=no
14070 fi
14071
14072
14073 fi
14074
14075 if test "$with_database_dbm" != "no"; then
14076   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14077 echo "configure:14078: checking for dbm_open" >&5
14078
14079 cat > conftest.$ac_ext <<EOF
14080 #line 14081 "configure"
14081 #include "confdefs.h"
14082 /* System header to define __stub macros and hopefully few prototypes,
14083     which can conflict with char dbm_open(); below.  */
14084 #include <assert.h>
14085 /* Override any gcc2 internal prototype to avoid an error.  */
14086 /* We use char because int might match the return type of a gcc2
14087     builtin and then its argument prototype would still apply.  */
14088 char dbm_open();
14089
14090 int main() {
14091
14092 /* The GNU C library defines this for functions which it implements
14093     to always fail with ENOSYS.  Some functions are actually named
14094     something starting with __ and the normal name is an alias.  */
14095 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14096 choke me
14097 #else
14098 dbm_open();
14099 #endif
14100
14101 ; return 0; }
14102 EOF
14103 if { (eval echo configure:14104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14104   rm -rf conftest*
14105   eval "ac_cv_func_dbm_open=yes"
14106 else
14107   echo "configure: failed program was:" >&5
14108   cat conftest.$ac_ext >&5
14109   rm -rf conftest*
14110   eval "ac_cv_func_dbm_open=no"
14111 fi
14112 rm -f conftest*
14113
14114 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14115   echo "$ac_t""yes" 1>&6
14116   with_database_dbm=yes libdbm=
14117 else
14118   echo "$ac_t""no" 1>&6
14119
14120     
14121 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14122 echo "configure:14123: checking for dbm_open in -ldbm" >&5
14123 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14124
14125 xe_check_libs=" -ldbm "
14126 cat > conftest.$ac_ext <<EOF
14127 #line 14128 "configure"
14128 #include "confdefs.h"
14129 /* Override any gcc2 internal prototype to avoid an error.  */
14130 /* We use char because int might match the return type of a gcc2
14131     builtin and then its argument prototype would still apply.  */
14132 char dbm_open();
14133
14134 int main() {
14135 dbm_open()
14136 ; return 0; }
14137 EOF
14138 if { (eval echo configure:14139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14139   rm -rf conftest*
14140   eval "ac_cv_lib_$ac_lib_var=yes"
14141 else
14142   echo "configure: failed program was:" >&5
14143   cat conftest.$ac_ext >&5
14144   rm -rf conftest*
14145   eval "ac_cv_lib_$ac_lib_var=no"
14146 fi
14147 rm -f conftest*
14148 xe_check_libs=""
14149
14150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14151   echo "$ac_t""yes" 1>&6
14152   with_database_dbm=yes libdbm=-ldbm
14153 else
14154   echo "$ac_t""no" 1>&6
14155 test "$with_database_dbm" = "yes" && \
14156         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14157       with_database_dbm=no
14158 fi
14159
14160
14161 fi
14162
14163 fi
14164
14165 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14166 test "$with_database_gdbm" = "yes" -o \
14167      "$with_database_dbm"  = "yes" && \
14168   { test "$extra_verbose" = "yes" && cat << \EOF
14169     Defining HAVE_DBM
14170 EOF
14171 cat >> confdefs.h <<\EOF
14172 #define HAVE_DBM 1
14173 EOF
14174 }
14175
14176
14177 if test "$with_database_berkdb" != "no"; then
14178   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14179 echo "configure:14180: checking for Berkeley db.h" >&5
14180   for header in "db/db.h" "db.h"; do
14181     case "$opsys" in
14182         *freebsd*)
14183     cat > conftest.$ac_ext <<EOF
14184 #line 14185 "configure"
14185 #include "confdefs.h"
14186
14187 #include <stdlib.h>
14188 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14189 #ifdef HAVE_INTTYPES_H
14190 #define __BIT_TYPES_DEFINED__
14191 #include <inttypes.h>
14192 #endif
14193 #endif
14194 #include <$header>
14195
14196 int main() {
14197
14198 ; return 0; }
14199 EOF
14200 if { (eval echo configure:14201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14201   rm -rf conftest*
14202   db_h_file="$header"; break
14203 else
14204   echo "configure: failed program was:" >&5
14205   cat conftest.$ac_ext >&5
14206 fi
14207 rm -f conftest*
14208         ;;
14209         *)
14210     cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213
14214 #include <stdlib.h>
14215 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14216 #ifdef HAVE_INTTYPES_H
14217 #define __BIT_TYPES_DEFINED__
14218 #include <inttypes.h>
14219 typedef uint8_t  u_int8_t;
14220 typedef uint16_t u_int16_t;
14221 typedef uint32_t u_int32_t;
14222 #ifdef WE_DONT_NEED_QUADS
14223 typedef uint64_t u_int64_t;
14224 #endif
14225 #endif
14226 #endif
14227 #include <$header>
14228
14229 int main() {
14230
14231 ; return 0; }
14232 EOF
14233 if { (eval echo configure:14234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14234   rm -rf conftest*
14235   db_h_file="$header"; break
14236 else
14237   echo "configure: failed program was:" >&5
14238   cat conftest.$ac_ext >&5
14239 fi
14240 rm -f conftest*
14241         ;;
14242         esac
14243   done
14244   if test -z "$db_h_file"
14245   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14246   else echo "$ac_t""$db_h_file" 1>&6
14247   fi
14248
14249   if test "$with_database_berkdb" != "no"; then
14250     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14251 echo "configure:14252: checking for Berkeley DB version" >&5
14252     cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 #include <$db_h_file>
14256 #if DB_VERSION_MAJOR > 1
14257 yes
14258 #endif
14259
14260 EOF
14261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14262   egrep "yes" >/dev/null 2>&1; then
14263   rm -rf conftest*
14264   cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 #include <$db_h_file>
14268 #if DB_VERSION_MAJOR > 2
14269 yes
14270 #endif
14271
14272 EOF
14273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14274   egrep "yes" >/dev/null 2>&1; then
14275   rm -rf conftest*
14276   echo "$ac_t""3" 1>&6; dbfunc=db_create
14277 else
14278   rm -rf conftest*
14279   
14280     echo "$ac_t""2" 1>&6; dbfunc=db_open
14281 fi
14282 rm -f conftest*
14283
14284 else
14285   rm -rf conftest*
14286   
14287     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14288 fi
14289 rm -f conftest*
14290
14291     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14292 echo "configure:14293: checking for $dbfunc" >&5
14293
14294 cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297 /* System header to define __stub macros and hopefully few prototypes,
14298     which can conflict with char $dbfunc(); below.  */
14299 #include <assert.h>
14300 /* Override any gcc2 internal prototype to avoid an error.  */
14301 /* We use char because int might match the return type of a gcc2
14302     builtin and then its argument prototype would still apply.  */
14303 char $dbfunc();
14304
14305 int main() {
14306
14307 /* The GNU C library defines this for functions which it implements
14308     to always fail with ENOSYS.  Some functions are actually named
14309     something starting with __ and the normal name is an alias.  */
14310 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14311 choke me
14312 #else
14313 $dbfunc();
14314 #endif
14315
14316 ; return 0; }
14317 EOF
14318 if { (eval echo configure:14319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14319   rm -rf conftest*
14320   eval "ac_cv_func_$dbfunc=yes"
14321 else
14322   echo "configure: failed program was:" >&5
14323   cat conftest.$ac_ext >&5
14324   rm -rf conftest*
14325   eval "ac_cv_func_$dbfunc=no"
14326 fi
14327 rm -f conftest*
14328
14329 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14330   echo "$ac_t""yes" 1>&6
14331   with_database_berkdb=yes need_libdb=no
14332 else
14333   echo "$ac_t""no" 1>&6
14334
14335     
14336 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14337 echo "configure:14338: checking for $dbfunc in -ldb" >&5
14338 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14339
14340 xe_check_libs=" -ldb "
14341 cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 /* Override any gcc2 internal prototype to avoid an error.  */
14345 /* We use char because int might match the return type of a gcc2
14346     builtin and then its argument prototype would still apply.  */
14347 char $dbfunc();
14348
14349 int main() {
14350 $dbfunc()
14351 ; return 0; }
14352 EOF
14353 if { (eval echo configure:14354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14354   rm -rf conftest*
14355   eval "ac_cv_lib_$ac_lib_var=yes"
14356 else
14357   echo "configure: failed program was:" >&5
14358   cat conftest.$ac_ext >&5
14359   rm -rf conftest*
14360   eval "ac_cv_lib_$ac_lib_var=no"
14361 fi
14362 rm -f conftest*
14363 xe_check_libs=""
14364
14365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14366   echo "$ac_t""yes" 1>&6
14367   with_database_berkdb=yes need_libdb=yes
14368 else
14369   echo "$ac_t""no" 1>&6
14370 fi
14371
14372
14373 fi
14374
14375   fi
14376
14377   if test "$with_database_berkdb" = "yes"; then
14378     { test "$extra_verbose" = "yes" && cat << EOF
14379     Defining DB_H_FILE = "$db_h_file"
14380 EOF
14381 cat >> confdefs.h <<EOF
14382 #define DB_H_FILE "$db_h_file"
14383 EOF
14384 }
14385
14386     { test "$extra_verbose" = "yes" && cat << \EOF
14387     Defining HAVE_BERKELEY_DB
14388 EOF
14389 cat >> confdefs.h <<\EOF
14390 #define HAVE_BERKELEY_DB 1
14391 EOF
14392 }
14393
14394     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14395   else with_database_berkdb=no
14396   fi
14397 fi
14398
14399 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14400      != "no no no"; then
14401   { test "$extra_verbose" = "yes" && cat << \EOF
14402     Defining HAVE_DATABASE
14403 EOF
14404 cat >> confdefs.h <<\EOF
14405 #define HAVE_DATABASE 1
14406 EOF
14407 }
14408
14409   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14410    echo "    xemacs will be linked with \"database.o\""
14411  fi
14412 fi
14413
14414 if test "$with_socks" = "yes"; then
14415   
14416 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14417 echo "configure:14418: checking for SOCKSinit in -lsocks" >&5
14418 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14419
14420 xe_check_libs=" -lsocks "
14421 cat > conftest.$ac_ext <<EOF
14422 #line 14423 "configure"
14423 #include "confdefs.h"
14424 /* Override any gcc2 internal prototype to avoid an error.  */
14425 /* We use char because int might match the return type of a gcc2
14426     builtin and then its argument prototype would still apply.  */
14427 char SOCKSinit();
14428
14429 int main() {
14430 SOCKSinit()
14431 ; return 0; }
14432 EOF
14433 if { (eval echo configure:14434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14434   rm -rf conftest*
14435   eval "ac_cv_lib_$ac_lib_var=yes"
14436 else
14437   echo "configure: failed program was:" >&5
14438   cat conftest.$ac_ext >&5
14439   rm -rf conftest*
14440   eval "ac_cv_lib_$ac_lib_var=no"
14441 fi
14442 rm -f conftest*
14443 xe_check_libs=""
14444
14445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14446   echo "$ac_t""yes" 1>&6
14447     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14449   { test "$extra_verbose" = "yes" && cat << EOF
14450     Defining $ac_tr_lib
14451 EOF
14452 cat >> confdefs.h <<EOF
14453 #define $ac_tr_lib 1
14454 EOF
14455 }
14456
14457   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14458
14459 else
14460   echo "$ac_t""no" 1>&6
14461 fi
14462
14463
14464   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14465     Defining HAVE_SOCKS
14466 EOF
14467 cat >> confdefs.h <<\EOF
14468 #define HAVE_SOCKS 1
14469 EOF
14470 }
14471
14472 fi
14473
14474 if test "$usage_tracking" = "yes"; then
14475   { test "$extra_verbose" = "yes" && cat << \EOF
14476     Defining USAGE_TRACKING
14477 EOF
14478 cat >> confdefs.h <<\EOF
14479 #define USAGE_TRACKING 1
14480 EOF
14481 }
14482
14483   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14484 fi
14485
14486 if test "$with_modules" != "no"; then
14487   echo "checking for module support" 1>&6
14488 echo "configure:14489: checking for module support" >&5
14489
14490     if test "$with_msw" = "yes"; then
14491     have_dl=yes;
14492   else
14493         case "$opsys" in
14494       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14495     Defining HAVE_DYLD
14496 EOF
14497 cat >> confdefs.h <<\EOF
14498 #define HAVE_DYLD 1
14499 EOF
14500 }
14501  ;;
14502       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14503 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14504 echo "configure:14505: checking for dlfcn.h" >&5
14505
14506 cat > conftest.$ac_ext <<EOF
14507 #line 14508 "configure"
14508 #include "confdefs.h"
14509 #include <dlfcn.h>
14510 EOF
14511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14512 { (eval echo configure:14513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14514 if test -z "$ac_err"; then
14515   rm -rf conftest*
14516   eval "ac_cv_header_$ac_safe=yes"
14517 else
14518   echo "$ac_err" >&5
14519   echo "configure: failed program was:" >&5
14520   cat conftest.$ac_ext >&5
14521   rm -rf conftest*
14522   eval "ac_cv_header_$ac_safe=no"
14523 fi
14524 rm -f conftest*
14525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14526   echo "$ac_t""yes" 1>&6
14527   
14528            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14529 echo "configure:14530: checking for dlopen in -lc" >&5
14530            cat > conftest.$ac_ext <<EOF
14531 #line 14532 "configure"
14532 #include "confdefs.h"
14533 #include <dlfcn.h>
14534 int main() {
14535               dlopen ("", 0);
14536 ; return 0; }
14537 EOF
14538 if { (eval echo configure:14539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14539   rm -rf conftest*
14540    have_dl=yes 
14541 else
14542   echo "configure: failed program was:" >&5
14543   cat conftest.$ac_ext >&5
14544   rm -rf conftest*
14545   
14546                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14547 echo "configure:14548: checking for dlopen in -ldl" >&5
14548                ac_save_LIBS="$LIBS"
14549                LIBS="-ldl $LIBS"
14550                cat > conftest.$ac_ext <<EOF
14551 #line 14552 "configure"
14552 #include "confdefs.h"
14553 #include <dlfcn.h>
14554 int main() {
14555                  dlopen ("", 0);
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14559   rm -rf conftest*
14560    have_dl=yes 
14561 else
14562   echo "configure: failed program was:" >&5
14563   cat conftest.$ac_ext >&5
14564   rm -rf conftest*
14565   LIBS="$ac_save_LIBS"
14566 fi
14567 rm -f conftest*
14568                ac_save_LIBS=
14569 fi
14570 rm -f conftest*
14571 else
14572   echo "$ac_t""no" 1>&6
14573 fi
14574
14575         if test -n "$have_dl"; then
14576            { test "$extra_verbose" = "yes" && cat << \EOF
14577     Defining HAVE_DLOPEN
14578 EOF
14579 cat >> confdefs.h <<\EOF
14580 #define HAVE_DLOPEN 1
14581 EOF
14582 }
14583
14584         else
14585            
14586 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14587 echo "configure:14588: checking for shl_load in -ldld" >&5
14588 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14589
14590 xe_check_libs=" -ldld "
14591 cat > conftest.$ac_ext <<EOF
14592 #line 14593 "configure"
14593 #include "confdefs.h"
14594 /* Override any gcc2 internal prototype to avoid an error.  */
14595 /* We use char because int might match the return type of a gcc2
14596     builtin and then its argument prototype would still apply.  */
14597 char shl_load();
14598
14599 int main() {
14600 shl_load()
14601 ; return 0; }
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14604   rm -rf conftest*
14605   eval "ac_cv_lib_$ac_lib_var=yes"
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -rf conftest*
14610   eval "ac_cv_lib_$ac_lib_var=no"
14611 fi
14612 rm -f conftest*
14613 xe_check_libs=""
14614
14615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14616   echo "$ac_t""yes" 1>&6
14617   libdl=dld have_dl=yes;
14618            { test "$extra_verbose" = "yes" && cat << \EOF
14619     Defining HAVE_SHL_LOAD
14620 EOF
14621 cat >> confdefs.h <<\EOF
14622 #define HAVE_SHL_LOAD 1
14623 EOF
14624 }
14625
14626 else
14627   echo "$ac_t""no" 1>&6
14628
14629 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14630 echo "configure:14631: checking for dld_init in -ldld" >&5
14631 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14632
14633 xe_check_libs=" -ldld "
14634 cat > conftest.$ac_ext <<EOF
14635 #line 14636 "configure"
14636 #include "confdefs.h"
14637 /* Override any gcc2 internal prototype to avoid an error.  */
14638 /* We use char because int might match the return type of a gcc2
14639     builtin and then its argument prototype would still apply.  */
14640 char dld_init();
14641
14642 int main() {
14643 dld_init()
14644 ; return 0; }
14645 EOF
14646 if { (eval echo configure:14647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14647   rm -rf conftest*
14648   eval "ac_cv_lib_$ac_lib_var=yes"
14649 else
14650   echo "configure: failed program was:" >&5
14651   cat conftest.$ac_ext >&5
14652   rm -rf conftest*
14653   eval "ac_cv_lib_$ac_lib_var=no"
14654 fi
14655 rm -f conftest*
14656 xe_check_libs=""
14657
14658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14659   echo "$ac_t""yes" 1>&6
14660   libdl=dld have_dl=yes;
14661            { test "$extra_verbose" = "yes" && cat << \EOF
14662     Defining HAVE_DLD_INIT
14663 EOF
14664 cat >> confdefs.h <<\EOF
14665 #define HAVE_DLD_INIT 1
14666 EOF
14667 }
14668
14669 else
14670   echo "$ac_t""no" 1>&6
14671 fi
14672
14673
14674 fi
14675
14676
14677         fi
14678     ;;
14679     esac
14680   fi 
14681   if test -n "$have_dl"; then
14682         
14683 dll_ld=
14684 dll_ldflags=
14685 dll_cflags=
14686 dll_post=
14687 dll_ldo="-o"
14688 ld_dynamic_link_flags=
14689 xehost=$canonical
14690 xealias=$internal_configuration
14691
14692 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14693 echo "configure:14694: checking how to build dynamic libraries for ${xehost}" >&5
14694 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14695 case "$xehost" in
14696 *-*-linux-gnu*) ;;
14697 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14698 esac
14699
14700 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14701 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14702 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14703
14704 case "$xehost_os" in
14705 aix3*)
14706   # AIX sometimes has problems with the GCC collect2 program.  For some
14707   # reason, if we set the COLLECT_NAMES environment variable, the problems
14708   # vanish in a puff of smoke.
14709   if test "${COLLECT_NAMES+set}" != set; then
14710     COLLECT_NAMES=
14711     export COLLECT_NAMES
14712   fi
14713   ;;
14714 esac
14715
14716 # Now see if the compiler is really GCC.
14717 if test "$GCC" = "yes"; then
14718   XEGCC=yes
14719 else
14720   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14721 echo "configure:14722: checking checking whether we are using GNU C" >&5
14722   cat > conftest.$ac_ext <<EOF
14723 #line 14724 "configure"
14724 #include "confdefs.h"
14725
14726 #ifdef __GNUC__
14727   yes;
14728 #endif
14729
14730 EOF
14731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14732   egrep "yes" >/dev/null 2>&1; then
14733   rm -rf conftest*
14734   XEGCC=yes
14735 else
14736   rm -rf conftest*
14737   XEGCC=no
14738 fi
14739 rm -f conftest*
14740
14741   echo "$ac_t""${XEGCC}" 1>&6
14742 fi
14743
14744 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14745 echo "configure:14746: checking how to produce PIC code" >&5
14746 wl=
14747
14748 can_build_shared=yes
14749 if test "$XEGCC" = yes; then
14750   wl='-Wl,'
14751
14752   case "$xehost_os" in
14753   aix[3-9]* | irix[5-9]* | osf[3-9])
14754     # PIC is the default for these OSes.
14755     ;;
14756
14757   os2*)
14758     # We can build DLLs from non-PIC.
14759     ;;
14760   amigaos*)
14761     # FIXME: we need at least 68020 code to build shared libraries, but
14762     # adding the `-m68020' flag to GCC prevents building anything better,
14763     # like `-m68040'.
14764     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14765     ;;
14766   *cygwin* | *mingw* )
14767     # PIC is the default
14768     ;;
14769   *)
14770     dll_cflags='-fPIC'
14771     ;;
14772   esac
14773 else
14774   # PORTME Check for PIC flags for the system compiler.
14775   case "$xehost_os" in
14776   hpux9* | hpux1[0-9]*)
14777     # Is there a better link_static_flag that works with the bundled CC?
14778     wl='-Wl,'
14779     dll_cflags='+Z'
14780     ;;
14781
14782   irix[5-9]*)
14783     wl='-Wl,'
14784     # PIC (with -KPIC) is the default.
14785     ;;
14786
14787   os2*)
14788     # We can build DLLs from non-PIC.
14789     ;;
14790
14791   osf[3-9]*)
14792     # All OSF/1 code is PIC.
14793     wl='-Wl,'
14794     ;;
14795
14796   aix[3-9]*)
14797     # All AIX code is PIC.
14798     wl='-Wl,'
14799     ;;
14800
14801   sco3.2v5*)
14802     dll_cflags='-belf -Kpic'
14803     wl='-Wl,'
14804     ;;
14805
14806   unixware*)
14807     dll_cflags="-KPIC"
14808     wl="-Wl,"
14809     ;;
14810
14811   sysv4*)
14812     dll_cflags="-KPIC"
14813     wl="-Wl,"
14814     ;;
14815
14816   sysv5*)
14817     dll_cflags="-KPIC"
14818     wl="-Wl,"
14819     ;;
14820
14821   solaris2*)
14822     dll_cflags='-KPIC'
14823     wl='-Wl,'
14824     ;;
14825
14826   sunos4*)
14827     dll_cflags='-PIC'
14828     wl='-Qoption ld '
14829     ;;
14830
14831   uts4*)
14832     dll_cflags='-pic'
14833     ;;
14834
14835   *)
14836     can_build_shared=no
14837     ;;
14838   esac
14839 fi
14840
14841 if test -n "$dll_cflags"; then
14842   echo "$ac_t""${dll_cflags}" 1>&6
14843
14844   # Check to make sure the dll_cflags actually works.
14845   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14846 echo "configure:14847: checking if PIC flag ${dll_cflags} really works" >&5
14847   save_CFLAGS="$CFLAGS"
14848   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14849   cat > conftest.$ac_ext <<EOF
14850 #line 14851 "configure"
14851 #include "confdefs.h"
14852
14853 int main() {
14854 int x=0;
14855 ; return 0; }
14856 EOF
14857 if { (eval echo configure:14858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14858   rm -rf conftest*
14859   
14860     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14861     # reports no error.  So, we need to grep stderr for (Bundled).
14862     if grep '(Bundled)' config.log >/dev/null; then
14863       echo "$ac_t""no" 1>&6
14864       can_build_shared=no
14865       dll_cflags=
14866     else
14867       echo "$ac_t""yes" 1>&6
14868     fi
14869 else
14870   echo "configure: failed program was:" >&5
14871   cat conftest.$ac_ext >&5
14872   rm -rf conftest*
14873   echo "$ac_t""no" 1>&6
14874     can_build_shared=no
14875     dll_cflags=
14876 fi
14877 rm -f conftest*
14878   CFLAGS="$save_CFLAGS"
14879 else
14880   echo "$ac_t""none" 1>&6
14881 fi
14882
14883 if test "$can_build_shared" = "yes"; then
14884 cc_produces_so=no
14885 xldf=
14886 xcldf=
14887 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14888 echo "configure:14889: checking if C compiler can produce shared libraries" >&5
14889 if test "$XEGCC" = yes; then
14890   xcldf="-shared"
14891   xldf="-shared"
14892 else # Not using GCC
14893   case "$xehost_os" in
14894     aix[3-9]*)
14895       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14896       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14897       ;;
14898
14899     freebsd2* | netbsd* | openbsd*)
14900       xldf="-Bshareable"
14901       xcldf="${wl}-Bshareable"
14902       ;;
14903
14904     freebsd3*)
14905       xcldf="-shared"
14906       ;;
14907
14908     hpux*)
14909       xldf="-b +s"
14910       xcldf="${wl}-b ${wl}+s"
14911       ;;
14912
14913     irix[5-9]* | osf[3-9]*)
14914       xcldf="${wl}-shared"
14915       xldf="-shared"
14916       ;;
14917
14918     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14919       xcldf="-G"
14920       xldf="-G"
14921       ;;
14922
14923     sunos4*)
14924       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14925       xldf="-assert pure-text -Bstatic"
14926       ;;
14927   esac
14928 fi # End if if we are using gcc
14929
14930 if test -n "$xcldf"; then
14931   save_LDFLAGS=$LDFLAGS
14932   save_LIBS=$LIBS
14933   save_xe_libs=$xe_libs
14934   LDFLAGS="$xcldf $LDFLAGS"
14935   LIBS=
14936   xe_libs=
14937   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14938   cat > conftest.$ac_ext <<EOF
14939 #line 14940 "configure"
14940 #include "confdefs.h"
14941
14942 int main() {
14943 int x=0;
14944 ; return 0; }
14945 EOF
14946 if { (eval echo configure:14947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14947   rm -rf conftest*
14948   cc_produces_so=yes
14949 else
14950   echo "configure: failed program was:" >&5
14951   cat conftest.$ac_ext >&5
14952   rm -rf conftest*
14953   cc_produces_so=no
14954 fi
14955 rm -f conftest*
14956   LDFLAGS=$save_LDFLAGS
14957   LIBS=$save_LIBS
14958   xe_libs=$save_xe_libs
14959   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14960 else
14961   cc_produces_so=no
14962 fi
14963 echo "$ac_t""${cc_produces_so}" 1>&6
14964
14965 LTLD=$LD
14966 if test -z "$LTLD"; then
14967   ac_prog=ld
14968   if test "$XEGCC" = yes; then
14969     # Check if gcc -print-prog-name=ld gives a path.
14970     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14971 echo "configure:14972: checking for ld used by GCC" >&5
14972     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14973     case "$ac_prog" in
14974     # Accept absolute paths.
14975     /*)
14976       if test -z "$LTLD"; then
14977 #        case "$ac_prog" in
14978 #          *gcc-lib*) LTLD="$CC"
14979 #                     ;;
14980 #          *)
14981          LTLD="$ac_prog"
14982 #                     ;;
14983 #        esac
14984       fi
14985       ;;
14986     "")
14987       # If it fails, then pretend we aren't using GCC.
14988       ac_prog=ld
14989       ;;
14990     *)
14991       # If it is relative, then search for the first ld in PATH.
14992       with_gnu_ld=unknown
14993       ;;
14994     esac
14995   else
14996     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14997 echo "configure:14998: checking for GNU ld" >&5
14998   fi
14999
15000   if test -z "$LTLD"; then
15001     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15002     for ac_dir in $PATH; do
15003       test -z "$ac_dir" && ac_dir=.
15004       if test -f "$ac_dir/$ac_prog"; then
15005         LTLD="$ac_dir/$ac_prog"
15006         # Check to see if the program is GNU ld.  I'd rather use --version,
15007         # but apparently some GNU ld's only accept -v.
15008         # Break only if it was the GNU/non-GNU ld that we prefer.
15009         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15010           xe_gnu_ld=yes
15011         else
15012           xe_gnu_ld=no
15013         fi
15014       fi
15015     done
15016     IFS="$ac_save_ifs"
15017   fi
15018
15019   if test -n "$LTLD"; then
15020     echo "$ac_t""${LTLD}" 1>&6
15021   else
15022     echo "$ac_t""no" 1>&6
15023   fi
15024
15025   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15026     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15027     exit 1
15028   fi
15029 fi
15030
15031 ld_dynamic_link_flags=
15032
15033 # Check to see if it really is or isn't GNU ld.
15034 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15035 echo "configure:15036: checking if the linker is GNU ld" >&5
15036 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15037 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15038   xe_gnu_ld=yes
15039 else
15040   xe_gnu_ld=no
15041 fi
15042 echo "$ac_t""${xe_gnu_ld}" 1>&6
15043
15044 case "$xehost_os" in
15045   amigaos* | sunos4*)
15046     # On these operating systems, we should treat GNU ld like the system ld.
15047     gnu_ld_acts_native=yes
15048     ;;
15049   *)
15050     gnu_ld_acts_native=no
15051     ;;
15052 esac
15053
15054 if test "$cc_produces_so" = "yes"; then
15055   dll_ld=$CC
15056   dll_ldflags=$xcldf
15057   can_build_shared=yes
15058   ld_shlibs=yes
15059 else
15060   # OK - only NOW do we futz about with ld.
15061   # See if the linker supports building shared libraries.
15062   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15063 echo "configure:15064: checking whether the linker supports shared libraries" >&5
15064   dll_ld=$CC
15065   dll_ldflags=$LDFLAGS
15066   ld_shlibs=yes
15067   can_build_shared=yes
15068   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15069     # See if GNU ld supports shared libraries.
15070     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15071       dll_ld=$CC
15072       dll_ldflags="-shared"
15073       ld_shlibs=yes
15074     else
15075       ld_shlibs=no
15076     fi
15077   else
15078     # PORTME fill in a description of your system's linker (not GNU ld)
15079     case "$xehost_os" in
15080     aix3*)
15081       dll_ld=$LTLD
15082       dll_ldflags=$xldf
15083       ;;
15084
15085     aix[4-9]*)
15086       dll_ldflags=$xcldf
15087       ;;
15088
15089     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15090     # support.  Future versions do this automatically, but an explicit c++rt0.o
15091     # doesn't break anything, and helps significantly (at the cost of a little
15092     # extra space).
15093     freebsd2.2*)
15094       dll_ld=$LTLD
15095       dll_ldflags=$xldf
15096       dll_post="/usr/lib/c++rt0.o"
15097       ;;
15098
15099     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15100     freebsd2*)
15101       dll_ld=$LTLD
15102       dll_ldflags="-Bshareable"
15103       ;;
15104
15105     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15106     freebsd3*)
15107       dll_ldflags="-shared"
15108       ;;
15109
15110     hpux*)
15111       dll_ld=$LTLD
15112       dll_ldflags=$xldf
15113       ;;
15114
15115     irix[5-9]*)
15116       dll_ld=$LTLD
15117       dll_ldflags=$xldf
15118       ;;
15119
15120     netbsd*)
15121       # Tested with NetBSD 1.2 ld
15122       dll_ld=$LTLD
15123       dll_ldflags=$xldf
15124       ;;
15125
15126     openbsd*)
15127       dll_ld=$LTLD
15128       dll_ldflags=$xldf
15129       ;;
15130
15131     osf3* | osf4*)
15132       dll_ld=$LTLD
15133       dll_ldflags=$xldf
15134       ;;
15135
15136     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15137     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15138       dll_ld=$LTLD
15139       case "$dll_ld" in
15140         *gcc*) dll_ldflags="-shared"
15141                dll_ld=$CC
15142                ;;
15143         *)     dll_ldflags="-G"
15144                ;;
15145       esac
15146       ;;
15147
15148     sunos4*)
15149       if test "$XEGCC" = yes; then
15150         dll_ld=$CC
15151       else
15152         dll_ld=$LTLD
15153       fi
15154       dll_ldflags=$xldf
15155       ;;
15156
15157     uts4*)
15158       dll_ld=$LTLD
15159       dll_ldflags="-G"
15160       ;;
15161
15162     bsdi*)
15163       dll_ldflags="-r"
15164       dll_ld="shlicc2"
15165       ;;
15166
15167     *)
15168       ld_shlibs=no
15169       can_build_shared=no
15170       ;;
15171     esac
15172   fi
15173   echo "$ac_t""${ld_shlibs}" 1>&6
15174   if test "$ld_shlibs" = "no"; then
15175     can_build_shared=no
15176   fi
15177 fi # End of if cc_produces_so = no
15178
15179
15180 if test "$xe_gnu_ld" = yes; then
15181   if test "$ld_shlibs" = yes; then
15182     ld_dynamic_link_flags="${wl}-export-dynamic"
15183   fi
15184 fi
15185
15186 if test -z "$ld_dynamic_link_flags"; then
15187   case "$xehost_os" in
15188   aix[3-9]*)
15189     ld_dynamic_link_flags=
15190     ;;
15191
15192   freebsd2.2*)
15193     ld_dynamic_link_flags=
15194     ;;
15195
15196   freebsd2*)
15197     ld_dynamic_link_flags=
15198     ;;
15199
15200   freebsd3*)
15201     ld_dynamic_link_flags=
15202     ;;
15203
15204   hpux*)
15205     ld_dynamic_link_flags="${wl}-E"
15206     ;;
15207
15208   irix[5-9]*)
15209     ld_dynamic_link_flags=
15210     ;;
15211
15212   netbsd*)
15213     ld_dynamic_link_flags=
15214     ;;
15215
15216   openbsd*)
15217     ld_dynamic_link_flags=
15218     ;;
15219
15220   osf3* | osf4*)
15221     ld_dynamic_link_flags=
15222     ;;
15223
15224   solaris2* | solaris7*)
15225     ld_dynamic_link_flags=
15226     ;;
15227
15228   sco3.2v5* | unixware* | sysv5* | sysv4*)
15229     ld_dynamic_link_flags="${wl}-Bexport"
15230     ;;
15231
15232   sunos4*)
15233     ld_dynamic_link_flags=
15234     ;;
15235
15236   uts4*)
15237     ld_dynamic_link_flags=
15238     ;;
15239
15240   bsdi*)
15241     ld_dynamic_link_flags=
15242     ;;
15243
15244   esac
15245 fi # End of if -z ld_dynamic_link_flags
15246 fi # End of if test "$can_build_shared" = "yes"
15247
15248
15249
15250
15251
15252
15253
15254
15255   fi
15256
15257   if test "$can_build_shared" = "yes"; then
15258     { test "$extra_verbose" = "yes" && cat << \EOF
15259     Defining HAVE_SHLIB
15260 EOF
15261 cat >> confdefs.h <<\EOF
15262 #define HAVE_SHLIB 1
15263 EOF
15264 }
15265
15266     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15267    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15268  fi
15269     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15270     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15271     for ac_func in dlerror _dlerror
15272 do
15273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15274 echo "configure:15275: checking for $ac_func" >&5
15275
15276 cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279 /* System header to define __stub macros and hopefully few prototypes,
15280     which can conflict with char $ac_func(); below.  */
15281 #include <assert.h>
15282 /* Override any gcc2 internal prototype to avoid an error.  */
15283 /* We use char because int might match the return type of a gcc2
15284     builtin and then its argument prototype would still apply.  */
15285 char $ac_func();
15286
15287 int main() {
15288
15289 /* The GNU C library defines this for functions which it implements
15290     to always fail with ENOSYS.  Some functions are actually named
15291     something starting with __ and the normal name is an alias.  */
15292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15293 choke me
15294 #else
15295 $ac_func();
15296 #endif
15297
15298 ; return 0; }
15299 EOF
15300 if { (eval echo configure:15301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15301   rm -rf conftest*
15302   eval "ac_cv_func_$ac_func=yes"
15303 else
15304   echo "configure: failed program was:" >&5
15305   cat conftest.$ac_ext >&5
15306   rm -rf conftest*
15307   eval "ac_cv_func_$ac_func=no"
15308 fi
15309 rm -f conftest*
15310
15311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15312   echo "$ac_t""yes" 1>&6
15313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15314   { test "$extra_verbose" = "yes" && cat << EOF
15315     Defining $ac_tr_func
15316 EOF
15317 cat >> confdefs.h <<EOF
15318 #define $ac_tr_func 1
15319 EOF
15320 }
15321  
15322 else
15323   echo "$ac_t""no" 1>&6
15324 fi
15325 done
15326
15327     with_modules=yes
15328   else
15329     if test "$with_modules" = "yes"; then
15330       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15331     else
15332       echo "configure: warning: "Module support cannot be provided."" 1>&2
15333     fi
15334     with_modules=no
15335   fi
15336 fi
15337
15338 cat > conftest.$ac_ext <<EOF
15339 #line 15340 "configure"
15340 #include "confdefs.h"
15341 int main(int c,char *v[]){return 0;}
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15344 then
15345   :
15346 else
15347   conftest_rc="$?"
15348   echo "configure: failed program was:" >&5
15349   cat conftest.$ac_ext >&5
15350   rm -fr conftest*
15351   
15352   echo ""
15353   echo "*** PANIC *** configure forgot how to build working executables!"
15354   echo ""
15355   echo "*** This is most commonly due to an unforeseen environment, causing"
15356   echo "*** configure to incorrectly compute the sequence of libraries to link."
15357   echo "*** Please examine the tail of config.log for runtime errors."
15358   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15359   echo "*** Often adding or removing explicit options in the configure"
15360   echo "*** invocation can work around this kind of problem.  If so, please"
15361   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15362   echo "***"
15363   echo "*** Other possible causes are inability to write to the file system"
15364   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15365   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15366   echo "*** necessary.  On other systems, try telling configure where to find"
15367   echo "*** the shared libraries using the --site-runtime-libraries option."
15368   echo "***"
15369   echo "*** Another way to shoot yourself in the foot is to specify"
15370   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15371   echo "*** system.  Don't do that."
15372   exit 1
15373 fi
15374 rm -fr conftest*
15375
15376 if test "$win32_processes" = "yes"; then
15377   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15378    echo "    xemacs will be linked with \"process-nt.o\""
15379  fi
15380 else
15381   { test "$extra_verbose" = "yes" && cat << \EOF
15382     Defining HAVE_UNIX_PROCESSES
15383 EOF
15384 cat >> confdefs.h <<\EOF
15385 #define HAVE_UNIX_PROCESSES 1
15386 EOF
15387 }
15388
15389   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15390    echo "    xemacs will be linked with \"process-unix.o\""
15391  fi
15392 fi
15393
15394
15395
15396 T=""
15397 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15398 CFLAGS="$T"
15399
15400
15401 T=""
15402 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15403 extra_objs="$T"
15404
15405
15406 T=""
15407 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
15408 c_switch_general="$T"
15409
15410
15411 T=""
15412 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
15413 c_switch_window_system="$T"
15414
15415
15416 T=""
15417 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15418 c_switch_all="$T"
15419
15420
15421 T=""
15422 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
15423 ld_switch_general="$T"
15424
15425
15426 T=""
15427 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15428 ld_switch_window_system="$T"
15429
15430
15431 T=""
15432 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15433 ld_switch_all="$T"
15434
15435
15436 T=""
15437 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15438 ld_libs_general="$T"
15439
15440
15441 T=""
15442 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
15443 ld_libs_window_system="$T"
15444
15445
15446 T=""
15447 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15448 ld_libs_all="$T"
15449
15450
15451
15452 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15453 internal_makefile_list="Makefile.in"
15454 SUBDIR_MAKEFILES=''
15455 test -d lock || mkdir lock
15456 for dir in $MAKE_SUBDIR; do
15457   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15458         test -d "$d" || mkdir "$d"; cd "$d"
15459       done ) ;;
15460    * ) test -d "$dir" || mkdir "$dir" ;;
15461   esac
15462   
15463 T=""
15464 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15465 SUBDIR_MAKEFILES="$T"
15466
15467   
15468 T=""
15469 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15470 internal_makefile_list="$T"
15471
15472 done
15473
15474
15475
15476
15477 for dir in src/s src/m; do
15478   if test ! -d "$dir" ; then
15479     echo Making symbolic link to "$srcdir/$dir"
15480     ${LN_S} "$srcdir/$dir" "$dir"
15481   fi
15482 done
15483
15484 if test "$extra_verbose" = "yes"; then
15485   echo ""
15486   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
15487   echo ""
15488 fi
15489
15490
15491 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15492   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15493   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15494 fi
15495
15496 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15497   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15498   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15499 fi
15500
15501 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15502   test "$extra_verbose" = "yes" && echo "creating TAGS"
15503   echo "\f
15504 $srcdir/TAGS,include" > "TAGS"
15505 fi
15506
15507 if test "$__SUNPRO_C" = "yes"; then
15508   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15509   ( echo "# For use with Sun WorkShop's Source browser."
15510     echo "# See sbquery(1) and sbinit(4) for more information"
15511     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15512   ) > .sbinit
15513 fi
15514
15515 rm -f core
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536 PREFIX=$prefix
15537 while true; do
15538   case "$PREFIX" in
15539     *\$* ) eval "PREFIX=$PREFIX" ;;
15540     *) break ;;
15541   esac
15542 done
15543
15544
15545
15546
15547 EXEC_PREFIX=$exec_prefix
15548 while true; do
15549   case "$EXEC_PREFIX" in
15550     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15551     *) break ;;
15552   esac
15553 done
15554
15555
15556
15557
15558 INFODIR=$infodir
15559 while true; do
15560   case "$INFODIR" in
15561     *\$* ) eval "INFODIR=$INFODIR" ;;
15562     *) break ;;
15563   esac
15564 done
15565
15566
15567
15568
15569 INFOPATH=$infopath
15570 while true; do
15571   case "$INFOPATH" in
15572     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15573     *) break ;;
15574   esac
15575 done
15576
15577
15578
15579
15580 PACKAGE_PATH=$package_path
15581 while true; do
15582   case "$PACKAGE_PATH" in
15583     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15584     *) break ;;
15585   esac
15586 done
15587
15588
15589
15590
15591 LISPDIR=$lispdir
15592 while true; do
15593   case "$LISPDIR" in
15594     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15595     *) break ;;
15596   esac
15597 done
15598
15599
15600
15601
15602 MODULEDIR=$moduledir
15603 while true; do
15604   case "$MODULEDIR" in
15605     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15606     *) break ;;
15607   esac
15608 done
15609
15610
15611
15612
15613 SITELISPDIR=$sitelispdir
15614 while true; do
15615   case "$SITELISPDIR" in
15616     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15617     *) break ;;
15618   esac
15619 done
15620
15621
15622
15623
15624 SITEMODULEDIR=$sitemoduledir
15625 while true; do
15626   case "$SITEMODULEDIR" in
15627     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15628     *) break ;;
15629   esac
15630 done
15631
15632
15633
15634
15635 ETCDIR=$etcdir
15636 while true; do
15637   case "$ETCDIR" in
15638     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15639     *) break ;;
15640   esac
15641 done
15642
15643
15644
15645
15646 DOCDIR=$docdir
15647 while true; do
15648   case "$DOCDIR" in
15649     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15650     *) break ;;
15651   esac
15652 done
15653
15654
15655
15656
15657 ARCHLIBDIR=$archlibdir
15658 while true; do
15659   case "$ARCHLIBDIR" in
15660     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15661     *) break ;;
15662   esac
15663 done
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15685
15686
15687
15688
15689
15690
15691
15692 : ${XEMACS_CC:=$CC}
15693
15694
15695 if test "$with_prefix" = "yes"; then
15696   { test "$extra_verbose" = "yes" && cat << \EOF
15697     Defining PREFIX_USER_DEFINED
15698 EOF
15699 cat >> confdefs.h <<\EOF
15700 #define PREFIX_USER_DEFINED 1
15701 EOF
15702 }
15703
15704 fi
15705
15706 if test "$with_site_lisp" = "no"; then
15707   { test "$extra_verbose" = "yes" && cat << \EOF
15708     Defining INHIBIT_SITE_LISP
15709 EOF
15710 cat >> confdefs.h <<\EOF
15711 #define INHIBIT_SITE_LISP 1
15712 EOF
15713 }
15714
15715 fi
15716 if test "$with_site_modules" = "no"; then
15717   { test "$extra_verbose" = "yes" && cat << \EOF
15718     Defining INHIBIT_SITE_MODULES
15719 EOF
15720 cat >> confdefs.h <<\EOF
15721 #define INHIBIT_SITE_MODULES 1
15722 EOF
15723 }
15724
15725 fi
15726
15727
15728 T=""
15729 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15730 ac_configure_args="$T"
15731
15732 { test "$extra_verbose" = "yes" && cat << EOF
15733     Defining EMACS_CONFIGURATION = "$configuration"
15734 EOF
15735 cat >> confdefs.h <<EOF
15736 #define EMACS_CONFIGURATION "$configuration"
15737 EOF
15738 }
15739
15740 { test "$extra_verbose" = "yes" && cat << EOF
15741     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15742 EOF
15743 cat >> confdefs.h <<EOF
15744 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15745 EOF
15746 }
15747
15748
15749
15750 null_string=""
15751 { test "$extra_verbose" = "yes" && cat << EOF
15752     Defining LD_SWITCH_X_SITE = $null_string
15753 EOF
15754 cat >> confdefs.h <<EOF
15755 #define LD_SWITCH_X_SITE $null_string
15756 EOF
15757 }
15758
15759 { test "$extra_verbose" = "yes" && cat << EOF
15760     Defining LD_SWITCH_X_SITE_AUX = $null_string
15761 EOF
15762 cat >> confdefs.h <<EOF
15763 #define LD_SWITCH_X_SITE_AUX $null_string
15764 EOF
15765 }
15766
15767 { test "$extra_verbose" = "yes" && cat << EOF
15768     Defining C_SWITCH_X_SITE = $null_string
15769 EOF
15770 cat >> confdefs.h <<EOF
15771 #define C_SWITCH_X_SITE $null_string
15772 EOF
15773 }
15774
15775 { test "$extra_verbose" = "yes" && cat << EOF
15776     Defining LD_SWITCH_SITE = $null_string
15777 EOF
15778 cat >> confdefs.h <<EOF
15779 #define LD_SWITCH_SITE $null_string
15780 EOF
15781 }
15782
15783 { test "$extra_verbose" = "yes" && cat << EOF
15784     Defining C_SWITCH_SITE = $null_string
15785 EOF
15786 cat >> confdefs.h <<EOF
15787 #define C_SWITCH_SITE $null_string
15788 EOF
15789 }
15790
15791
15792
15793 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15794     Defining GNU_MALLOC
15795 EOF
15796 cat >> confdefs.h <<\EOF
15797 #define GNU_MALLOC 1
15798 EOF
15799 }
15800
15801 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15802     Defining USE_SYSTEM_MALLOC
15803 EOF
15804 cat >> confdefs.h <<\EOF
15805 #define USE_SYSTEM_MALLOC 1
15806 EOF
15807 }
15808
15809 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15810     Defining USE_DEBUG_MALLOC
15811 EOF
15812 cat >> confdefs.h <<\EOF
15813 #define USE_DEBUG_MALLOC 1
15814 EOF
15815 }
15816
15817                                               { test "$extra_verbose" = "yes" && cat << \EOF
15818     Defining USE_SYSTEM_MALLOC
15819 EOF
15820 cat >> confdefs.h <<\EOF
15821 #define USE_SYSTEM_MALLOC 1
15822 EOF
15823 }
15824
15825 fi
15826 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15827     Defining I18N3
15828 EOF
15829 cat >> confdefs.h <<\EOF
15830 #define I18N3 1
15831 EOF
15832 }
15833
15834 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15835     Defining USE_GCC
15836 EOF
15837 cat >> confdefs.h <<\EOF
15838 #define USE_GCC 1
15839 EOF
15840 }
15841
15842 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15843     Defining EXTERNAL_WIDGET
15844 EOF
15845 cat >> confdefs.h <<\EOF
15846 #define EXTERNAL_WIDGET 1
15847 EOF
15848 }
15849
15850 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15851     Defining QUICK_BUILD
15852 EOF
15853 cat >> confdefs.h <<\EOF
15854 #define QUICK_BUILD 1
15855 EOF
15856 }
15857
15858 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15859     Defining PURIFY
15860 EOF
15861 cat >> confdefs.h <<\EOF
15862 #define PURIFY 1
15863 EOF
15864 }
15865
15866 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15867     Defining QUANTIFY
15868 EOF
15869 cat >> confdefs.h <<\EOF
15870 #define QUANTIFY 1
15871 EOF
15872 }
15873
15874 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15875     Defining MAIL_USE_POP
15876 EOF
15877 cat >> confdefs.h <<\EOF
15878 #define MAIL_USE_POP 1
15879 EOF
15880 }
15881
15882 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15883     Defining KERBEROS
15884 EOF
15885 cat >> confdefs.h <<\EOF
15886 #define KERBEROS 1
15887 EOF
15888 }
15889
15890 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15891     Defining HESIOD
15892 EOF
15893 cat >> confdefs.h <<\EOF
15894 #define HESIOD 1
15895 EOF
15896 }
15897
15898 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15899     Defining USE_UNION_TYPE
15900 EOF
15901 cat >> confdefs.h <<\EOF
15902 #define USE_UNION_TYPE 1
15903 EOF
15904 }
15905
15906 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15907     Defining REGEX_MALLOC
15908 EOF
15909 cat >> confdefs.h <<\EOF
15910 #define REGEX_MALLOC 1
15911 EOF
15912 }
15913
15914 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15915     Defining PDUMP
15916 EOF
15917 cat >> confdefs.h <<\EOF
15918 #define PDUMP 1
15919 EOF
15920 }
15921
15922 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15923     Defining IPV6_CANONICALIZE
15924 EOF
15925 cat >> confdefs.h <<\EOF
15926 #define IPV6_CANONICALIZE 1
15927 EOF
15928 }
15929
15930
15931
15932 (
15933 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15934 else
15935   echo "uname -a: `uname -a`"
15936 fi
15937 echo ""
15938 echo "$0 $quoted_arguments"
15939 ) > Installation
15940
15941 if test ! -z ${emacs_beta_version} ; then
15942   if test -z "${emacs_is_beta}" ; then
15943         xemacs_betaname=".${emacs_beta_version}"
15944   else
15945         xemacs_betaname="-b${emacs_beta_version}"
15946   fi
15947 else
15948   xemacs_betaname=""
15949 fi
15950
15951 (
15952 echo "
15953
15954 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15955 "
15956 echo "
15957 Compilation / Installation:"
15958 echo "  Source code location:              $srcdir"
15959 echo "  Installation prefix:               $prefix"
15960 if test -n "$site_includes"; then
15961   echo "  Additional header files:           $site_includes"
15962 fi
15963 if test -n "$site_libraries"; then
15964   echo "  Additional libraries:              $site_libraries"
15965 fi
15966 if test -n "$site_prefixes"; then
15967   echo "  Additional prefixes:               $site_prefixes"
15968 fi
15969 if test -n "$runpath"; then
15970   echo "  Runtime library search path:       $runpath"
15971 fi
15972
15973 if test -n "$opsysfile"
15974 then echo "  Operating system description file: \`$opsysfile'"
15975 else echo "  Not using any operating system description file"
15976 fi
15977 if test -n "$machfile"
15978 then echo "  Machine description file:          \`$machfile'"
15979 else echo "  Not using any machine description file"
15980 fi
15981
15982 echo "  Compiler:                          $CC $CFLAGS"
15983 echo "  Relocating allocator for buffers:  $rel_alloc"
15984 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15985 case "$ld_switch_site" in
15986   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15987     - Consider configuring with --pdump." ;;
15988 esac
15989
15990 echo "
15991 Window System:"
15992 if test "$with_msw" = "yes"; then
15993   echo "  Compiling in support for the Microsoft window system."
15994 fi
15995 if test "$with_x11" = "yes"; then
15996   echo "  Compiling in support for the X window system:"
15997   echo "    - X Windows headers location:                 $x_includes"
15998   echo "    - X Windows libraries location:               $x_libraries"
15999   if test "$with_xauth" != yes; then
16000     echo "    - Xau (X authority) not available."
16001   fi
16002   if test "$with_xmu" != yes; then
16003     echo "    - Xmu library not available; substituting equivalent routines."
16004   fi
16005   if test "$with_wmcommand" != no; then
16006     echo "    - Handling WM_COMMAND properly."
16007   fi
16008 fi
16009 if test "$need_motif" = "yes" ; then
16010   echo "  Compiling in support for Motif."
16011   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16012   echo "             You are likely to experience slow redisplay."
16013   echo "             You may need to install vendor patches to Motif."
16014   echo "             See PROBLEMS for more information."
16015 fi
16016 if test "$need_athena" = "yes"; then
16017   echo "  Compiling in support for the Athena widget set:"
16018   echo "    - Athena headers location:                    $athena_h_path"
16019   echo "    - Athena library to link:                     $athena_lib"
16020 fi
16021 case "$with_menubars" in
16022   gtk   ) echo "  Using GTK menubars."   ;;
16023   lucid ) echo "  Using Lucid menubars." ;;
16024   motif ) echo "  Using Motif menubars."
16025           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16026           echo "             We recommend using the Lucid menubar instead."
16027           echo "             Re-run configure with --with-menubars='lucid'." ;;
16028     msw ) echo "  Using MS-Windows menubars." ;;
16029 esac
16030 case "$with_scrollbars" in
16031   gtk    ) echo "  Using GTK scrollbars."        ;;
16032   lucid  ) echo "  Using Lucid scrollbars."      ;;
16033   motif  ) echo "  Using Motif scrollbars."      ;;
16034   athena ) echo "  Using Athena scrollbars."     ;;
16035      msw ) echo "  Using MS-Windows scrollbars." ;;
16036 esac
16037 case "$with_dialogs" in
16038   gtk    ) echo "  Using GTK dialog boxes." ;;
16039   motif  ) echo "  Using Motif dialog boxes."
16040            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16041              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16042              echo "             We recommend using the Athena dialog boxes instead."
16043              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16044              echo "             Read the PROBLEMS file for more information."
16045            fi; fi ;;
16046   athena ) echo "  Using Athena dialog boxes."     ;;
16047      msw ) echo "  Using MS-Windows dialog boxes." ;;
16048 esac
16049 case "$with_widgets" in
16050   gtk    ) echo "  Using GTK native widgets."        ;;
16051   motif  ) echo "  Using Motif native widgets."      ;;
16052   athena ) echo "  Using Athena native widgets."     ;;
16053      msw ) echo "  Using MS-Windows native widgets." ;;
16054 esac
16055 if test "$with_dragndrop" = yes; then
16056   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16057   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16058 fi
16059
16060 echo "
16061 TTY:"
16062 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16063 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16064
16065 echo "
16066 Images:"
16067 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16068 if test "$with_xpm" = yes; then
16069   echo "  Compiling in support for XPM  images."
16070 elif test "$with_x11" = yes; then
16071   echo "  WARNING: -----------------------------------------------------------"
16072   echo "  WARNING: Compiling without XPM image support."
16073   if test "$xpm_problem" != ""; then
16074     echo "  Reason: $xpm_problem"
16075   fi
16076   echo "  WARNING: You should strongly consider installing XPM."
16077   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16078   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16079   echo "  WARNING: -----------------------------------------------------------"
16080 fi
16081 if test "$with_png" = yes; then
16082   echo "  Compiling in support for PNG  images."
16083 elif test "$window_system" != "none"; then
16084   echo "  WARNING: -----------------------------------------------------------"
16085   echo "  WARNING: Compiling without PNG image support."
16086   if test "$png_problem" != ""; then
16087     echo "  Reason: $png_problem"
16088   fi
16089   echo "  WARNING: You should strongly consider installing the PNG libraries."
16090   echo "  WARNING: Otherwise certain images and glyphs may not display."
16091   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16092   echo "  WARNING: -----------------------------------------------------------"
16093 fi
16094 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16095 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16096 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16097
16098 echo "
16099 Sound:"
16100 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16101 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16102 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16103 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16104
16105 echo "
16106 Databases:"
16107 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16108 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16109 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16110 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16111 if test "$with_postgresql" = yes; then
16112   echo "  Compiling in support for PostgreSQL."
16113   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16114   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16115 fi
16116
16117 echo "
16118 Internationalization:"
16119 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16120 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16121 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16122 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16123 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16124 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16125 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16126 if test "$with_wnn" = yes; then
16127   echo "  Compiling in support for the WNN input method on Mule."
16128   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16129 fi
16130 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16131
16132 echo "
16133 Mail:"
16134 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16135 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16136 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16137 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16138
16139 echo "
16140 Other Features:"
16141 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16142 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16143 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16144 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16145 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16146 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16147 if test "$use_union_type" = yes; then
16148   echo "  WARNING: ---------------------------------------------------------"
16149   echo "  Using the union type for Lisp_Objects."
16150   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16151   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16152   echo "  WARNING: ---------------------------------------------------------"
16153 fi
16154 if test "$use_regex_malloc" = no; then
16155   echo "  WARNING: -----------------------------------------------------------"
16156   echo "  Using alloca to allocate the failure stack."
16157   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16158   echo "  Do NOT use this build of XEmacs for ordinary work."
16159   echo "  WARNING: -----------------------------------------------------------"
16160 fi
16161 test "$pdump" = yes && echo "  Using the new portable dumper."
16162 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16163 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16164 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16165   != "no no no no no no"; then
16166   echo "  WARNING: ---------------------------------------------------------"
16167   echo "  WARNING: Compiling in support for runtime error checking."
16168   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16169   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16170   echo "  WARNING: ---------------------------------------------------------"
16171 fi
16172 echo ""
16173 ) | tee -a Installation
16174 echo ""
16175
16176
16177 # Remove any trailing slashes in these variables.
16178 test -n "$prefix" &&
16179   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16180 test -n "$exec_prefix" &&
16181   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16182
16183
16184 for file in $internal_makefile_list; do
16185   test "$file" = src/Makefile.in && \
16186     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16187   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16188 done
16189 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16190 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
16191
16192 trap '' 1 2 15
16193
16194 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16195
16196 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16197 # Let make expand exec_prefix.
16198 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16199
16200 # Any assignment to VPATH causes Sun make to only execute
16201 # the first set of double-colon rules, so remove it if not needed.
16202 # If there is a colon in the path, we need to keep it.
16203 if test "x$srcdir" = x.; then
16204   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16205 fi
16206
16207 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16208
16209 DEFS=-DHAVE_CONFIG_H
16210
16211 # Without the "./", some shells look in PATH for config.status.
16212 : ${CONFIG_STATUS=./config.status}
16213
16214 echo creating $CONFIG_STATUS
16215 rm -f $CONFIG_STATUS
16216 cat > $CONFIG_STATUS <<EOF
16217 #! /bin/sh
16218 # Generated automatically by configure.
16219 # Run this file to recreate the current configuration.
16220 # This directory was configured as follows,
16221 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16222 #
16223 # $0 $ac_configure_args
16224 #
16225 # Compiler output produced by configure, useful for debugging
16226 # configure, is in ./config.log if it exists.
16227
16228 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16229 for ac_option
16230 do
16231   case "\$ac_option" in
16232   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16233     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16234     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16235   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16236     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16237     exit 0 ;;
16238   -help | --help | --hel | --he | --h)
16239     echo "\$ac_cs_usage"; exit 0 ;;
16240   *) echo "\$ac_cs_usage"; exit 1 ;;
16241   esac
16242 done
16243
16244 ac_given_srcdir=$srcdir
16245 ac_given_INSTALL="$INSTALL"
16246
16247 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16248 EOF
16249 cat >> $CONFIG_STATUS <<EOF
16250
16251 # Protect against being on the right side of a sed subst in config.status.
16252 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16253  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16254 $ac_vpsub
16255 $extrasub
16256 s%@SHELL@%$SHELL%g
16257 s%@CFLAGS@%$CFLAGS%g
16258 s%@CPPFLAGS@%$CPPFLAGS%g
16259 s%@CXXFLAGS@%$CXXFLAGS%g
16260 s%@FFLAGS@%$FFLAGS%g
16261 s%@DEFS@%$DEFS%g
16262 s%@LDFLAGS@%$LDFLAGS%g
16263 s%@LIBS@%$LIBS%g
16264 s%@exec_prefix@%$exec_prefix%g
16265 s%@prefix@%$prefix%g
16266 s%@program_transform_name@%$program_transform_name%g
16267 s%@bindir@%$bindir%g
16268 s%@sbindir@%$sbindir%g
16269 s%@libexecdir@%$libexecdir%g
16270 s%@datadir@%$datadir%g
16271 s%@sysconfdir@%$sysconfdir%g
16272 s%@sharedstatedir@%$sharedstatedir%g
16273 s%@localstatedir@%$localstatedir%g
16274 s%@libdir@%$libdir%g
16275 s%@includedir@%$includedir%g
16276 s%@oldincludedir@%$oldincludedir%g
16277 s%@infodir@%$infodir%g
16278 s%@mandir@%$mandir%g
16279 s%@LN_S@%$LN_S%g
16280 s%@blddir@%$blddir%g
16281 s%@CC@%$CC%g
16282 s%@CPP@%$CPP%g
16283 s%@start_flags@%$start_flags%g
16284 s%@ld_switch_shared@%$ld_switch_shared%g
16285 s%@start_files@%$start_files%g
16286 s%@ld@%$ld%g
16287 s%@lib_gcc@%$lib_gcc%g
16288 s%@RANLIB@%$RANLIB%g
16289 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16290 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16291 s%@INSTALL_DATA@%$INSTALL_DATA%g
16292 s%@YACC@%$YACC%g
16293 s%@SET_MAKE@%$SET_MAKE%g
16294 s%@GTK_CONFIG@%$GTK_CONFIG%g
16295 s%@X_CFLAGS@%$X_CFLAGS%g
16296 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16297 s%@X_LIBS@%$X_LIBS%g
16298 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16299 s%@install_pp@%$install_pp%g
16300 s%@libs_xauth@%$libs_xauth%g
16301 s%@dnd_objs@%$dnd_objs%g
16302 s%@lwlib_objs@%$lwlib_objs%g
16303 s%@ALLOCA@%$ALLOCA%g
16304 s%@have_esd_config@%$have_esd_config%g
16305 s%@dll_ld@%$dll_ld%g
16306 s%@dll_cflags@%$dll_cflags%g
16307 s%@dll_ldflags@%$dll_ldflags%g
16308 s%@dll_post@%$dll_post%g
16309 s%@dll_ldo@%$dll_ldo%g
16310 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16311 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16312 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16313 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16314 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16315 s%@PROGNAME@%$PROGNAME%g
16316 s%@version@%$version%g
16317 s%@configuration@%$configuration%g
16318 s%@canonical@%$canonical%g
16319 s%@inststaticdir@%$inststaticdir%g
16320 s%@instvardir@%$instvardir%g
16321 s%@srcdir@%$srcdir%g
16322 s%@pkgdir@%$pkgdir%g
16323 s%@statedir@%$statedir%g
16324 s%@extra_includes@%$extra_includes%g
16325 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16326 s%@PREFIX@%$PREFIX%g
16327 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16328 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16329 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16330 s%@INFODIR@%$INFODIR%g
16331 s%@infopath@%$infopath%g
16332 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16333 s%@INFOPATH@%$INFOPATH%g
16334 s%@package_path@%$package_path%g
16335 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16336 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16337 s%@lispdir@%$lispdir%g
16338 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16339 s%@LISPDIR@%$LISPDIR%g
16340 s%@moduledir@%$moduledir%g
16341 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16342 s%@MODULEDIR@%$MODULEDIR%g
16343 s%@sitelispdir@%$sitelispdir%g
16344 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16345 s%@SITELISPDIR@%$SITELISPDIR%g
16346 s%@sitemoduledir@%$sitemoduledir%g
16347 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16348 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16349 s%@etcdir@%$etcdir%g
16350 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16351 s%@ETCDIR@%$ETCDIR%g
16352 s%@docdir@%$docdir%g
16353 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16354 s%@DOCDIR@%$DOCDIR%g
16355 s%@archlibdir@%$archlibdir%g
16356 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16357 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16358 s%@bitmapdir@%$bitmapdir%g
16359 s%@extra_objs@%$extra_objs%g
16360 s%@machfile@%$machfile%g
16361 s%@opsysfile@%$opsysfile%g
16362 s%@c_switch_general@%$c_switch_general%g
16363 s%@c_switch_window_system@%$c_switch_window_system%g
16364 s%@c_switch_all@%$c_switch_all%g
16365 s%@ld_switch_general@%$ld_switch_general%g
16366 s%@ld_switch_window_system@%$ld_switch_window_system%g
16367 s%@ld_switch_all@%$ld_switch_all%g
16368 s%@ld_libs_general@%$ld_libs_general%g
16369 s%@ld_libs_window_system@%$ld_libs_window_system%g
16370 s%@ld_libs_all@%$ld_libs_all%g
16371 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16372 s%@native_sound_lib@%$native_sound_lib%g
16373 s%@sound_cflags@%$sound_cflags%g
16374 s%@dynodump_arch@%$dynodump_arch%g
16375 s%@XEMACS_CC@%$XEMACS_CC%g
16376 s%@internal_makefile_list@%$internal_makefile_list%g
16377
16378 CEOF
16379 EOF
16380
16381 cat >> $CONFIG_STATUS <<\EOF
16382
16383 # Split the substitutions into bite-sized pieces for seds with
16384 # small command number limits, like on Digital OSF/1 and HP-UX.
16385 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16386 ac_file=1 # Number of current file.
16387 ac_beg=1 # First line for current file.
16388 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16389 ac_more_lines=:
16390 ac_sed_cmds=""
16391 while $ac_more_lines; do
16392   if test $ac_beg -gt 1; then
16393     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16394   else
16395     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16396   fi
16397   if test ! -s conftest.s$ac_file; then
16398     ac_more_lines=false
16399     rm -f conftest.s$ac_file
16400   else
16401     if test -z "$ac_sed_cmds"; then
16402       ac_sed_cmds="sed -f conftest.s$ac_file"
16403     else
16404       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16405     fi
16406     ac_file=`expr $ac_file + 1`
16407     ac_beg=$ac_end
16408     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16409   fi
16410 done
16411 if test -z "$ac_sed_cmds"; then
16412   ac_sed_cmds=cat
16413 fi
16414 EOF
16415
16416 cat >> $CONFIG_STATUS <<EOF
16417
16418 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16419 EOF
16420 cat >> $CONFIG_STATUS <<\EOF
16421 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16422   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16423   case "$ac_file" in
16424   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16425        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16426   *) ac_file_in="${ac_file}.in" ;;
16427   esac
16428
16429   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16430
16431   # Remove last slash and all that follows it.  Not all systems have dirname.
16432   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16433   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16434     # The file is in a subdirectory.
16435     test ! -d "$ac_dir" && mkdir "$ac_dir"
16436     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16437     # A "../" for each directory in $ac_dir_suffix.
16438     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16439   else
16440     ac_dir_suffix= ac_dots=
16441   fi
16442
16443   case "$ac_given_srcdir" in
16444   .)  srcdir=.
16445       if test -z "$ac_dots"; then top_srcdir=.
16446       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16447   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16448   *) # Relative path.
16449     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16450     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16451   esac
16452
16453   case "$ac_given_INSTALL" in
16454   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16455   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16456   esac
16457
16458   echo creating "$ac_file"
16459   rm -f "$ac_file"
16460   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16461   case "$ac_file" in
16462   *Makefile*) ac_comsub="1i\\
16463 # $configure_input" ;;
16464   *) ac_comsub= ;;
16465   esac
16466
16467   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16468   sed -e "$ac_comsub
16469 s%@configure_input@%$configure_input%g
16470 s%@srcdir@%$srcdir%g
16471 s%@top_srcdir@%$top_srcdir%g
16472 s%@INSTALL@%$INSTALL%g
16473 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16474 fi; done
16475 rm -f conftest.s*
16476
16477 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16478 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16479 #
16480 # ac_d sets the value in "#define NAME VALUE" lines.
16481 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16482 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16483 ac_dC='\3'
16484 ac_dD='%g'
16485 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16486 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16487 ac_uB='\([      ]\)%\1#\2define\3'
16488 ac_uC=' '
16489 ac_uD='\4%g'
16490 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16491 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16492 ac_eB='$%\1#\2define\3'
16493 ac_eC=' '
16494 ac_eD='%g'
16495
16496 if test "${CONFIG_HEADERS+set}" != set; then
16497 EOF
16498 cat >> $CONFIG_STATUS <<EOF
16499   CONFIG_HEADERS="src/config.h lwlib/config.h"
16500 EOF
16501 cat >> $CONFIG_STATUS <<\EOF
16502 fi
16503 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16504   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16505   case "$ac_file" in
16506   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16507        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16508   *) ac_file_in="${ac_file}.in" ;;
16509   esac
16510
16511   echo creating $ac_file
16512
16513   rm -f conftest.frag conftest.in conftest.out
16514   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16515   cat $ac_file_inputs > conftest.in
16516
16517 EOF
16518
16519 # Transform confdefs.h into a sed script conftest.vals that substitutes
16520 # the proper values into config.h.in to produce config.h.  And first:
16521 # Protect against being on the right side of a sed subst in config.status.
16522 # Protect against being in an unquoted here document in config.status.
16523 rm -f conftest.vals
16524 cat > conftest.hdr <<\EOF
16525 s/[\\&%]/\\&/g
16526 s%[\\$`]%\\&%g
16527 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16528 s%ac_d%ac_u%gp
16529 s%ac_u%ac_e%gp
16530 EOF
16531 sed -n -f conftest.hdr confdefs.h > conftest.vals
16532 rm -f conftest.hdr
16533
16534 # This sed command replaces #undef with comments.  This is necessary, for
16535 # example, in the case of _POSIX_SOURCE, which is predefined and required
16536 # on some systems where configure will not decide to define it.
16537 cat >> conftest.vals <<\EOF
16538 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16539 EOF
16540
16541 # Break up conftest.vals because some shells have a limit on
16542 # the size of here documents, and old seds have small limits too.
16543
16544 rm -f conftest.tail
16545 while :
16546 do
16547   ac_lines=`grep -c . conftest.vals`
16548   # grep -c gives empty output for an empty file on some AIX systems.
16549   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16550   # Write a limited-size here document to conftest.frag.
16551   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16552   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16553   echo 'CEOF
16554   sed -f conftest.frag conftest.in > conftest.out
16555   rm -f conftest.in
16556   mv conftest.out conftest.in
16557 ' >> $CONFIG_STATUS
16558   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16559   rm -f conftest.vals
16560   mv conftest.tail conftest.vals
16561 done
16562 rm -f conftest.vals
16563
16564 cat >> $CONFIG_STATUS <<\EOF
16565   rm -f conftest.frag conftest.h
16566   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16567   cat conftest.in >> conftest.h
16568   rm -f conftest.in
16569   if cmp -s $ac_file conftest.h 2>/dev/null; then
16570     echo "$ac_file is unchanged"
16571     rm -f conftest.h
16572   else
16573     # Remove last slash and all that follows it.  Not all systems have dirname.
16574       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16575       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16576       # The file is in a subdirectory.
16577       test ! -d "$ac_dir" && mkdir "$ac_dir"
16578     fi
16579     rm -f $ac_file
16580     mv conftest.h $ac_file
16581   fi
16582 fi; done
16583
16584 EOF
16585 cat >> $CONFIG_STATUS <<EOF
16586 CPP="$CPP"
16587  top_srcdir="$srcdir"
16588  MAKE_SUBDIR="$MAKE_SUBDIR"
16589
16590 EOF
16591 cat >> $CONFIG_STATUS <<\EOF
16592 for dir in . $MAKE_SUBDIR; do
16593   (
16594     cd $dir
16595     rm -f junk.c
16596     < Makefile.in \
16597       sed -e '/^# Generated/d' \
16598           -e 's%/\*\*/#.*%%' \
16599           -e 's/^ *# */#/' \
16600           -e '/^##/d' \
16601           -e '/^#/ {
16602 p
16603 d
16604 }'        \
16605           -e '/./ {
16606 s/\([\"]\)/\\\1/g
16607 s/^/"/
16608 s/$/"/
16609 }'  > junk.c;
16610
16611
16612
16613     echo creating $dir/Makefile
16614 $CPP -I. -I${top_srcdir}/src  junk.c \
16615   | sed -e 's/^\#.*//'          \
16616         -e 's/^[        ][      ]*$//'\
16617         -e 's/^ /       /'              \
16618         -e '/^[ \f]*$/d' \
16619         -e '/^\"/ {
16620         s/\\\([\"]\)/\1/g
16621         s/^[    ]*\"//
16622         s/\"[   ]*$//
16623 }' > Makefile.new
16624     chmod 444 Makefile.new
16625     mv -f Makefile.new Makefile
16626
16627     echo creating $dir/GNUmakefile
16628 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16629   | sed -e 's/^\#.*//'          \
16630         -e 's/^[        ][      ]*$//'\
16631         -e 's/^ /       /'              \
16632         -e '/^[ \f]*$/d' \
16633         -e '/^\"/ {
16634         s/\\\([\"]\)/\1/g
16635         s/^[    ]*\"//
16636         s/\"[   ]*$//
16637 }' > Makefile.new
16638     chmod 444 Makefile.new
16639     mv -f Makefile.new GNUmakefile
16640
16641     rm -f junk.c
16642   )
16643 done
16644
16645 sed < config.status >> lib-src/config.values \
16646   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16647   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16648   -e 's/^\([^ ]*\) $/\1 ""/' \
16649   -e 's/ 1$/ t/'
16650
16651
16652 exit 0
16653 EOF
16654 chmod +x $CONFIG_STATUS
16655 rm -fr confdefs* $ac_clean_files
16656 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1