Merge r21-4-12-chise-0_21-pre9-for-libchise-b1.
[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 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump=''
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_utf_2000   | \
343         with_chise      | \
344         with_text_coding| \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_postgresql | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         with_netinstall | \
360         with_ipv6_cname | \
361         external_widget | \
362         verbose         | \
363         extra_verbose   | \
364         usage_tracking  | \
365         use_union_type  | \
366         pdump           | \
367         debug           | \
368         use_assertions  | \
369         memory_usage_stats | \
370         with_clash_detection | \
371         with_modules | \
372         quick_build )
373                   case "$val" in
374             y | ye | yes )      val=yes ;;
375             n | no )            val=no  ;;
376             * ) (echo "$progname: Usage error:"
377 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
379           esac
380           eval "$opt=\"$val\"" ;;
381
382
383                         srcdir          | \
384         compiler        | \
385         cflags          | \
386         cpp             | \
387         cppflags        | \
388         libs            | \
389         ldflags         | \
390         cache_file      | \
391         native_sound_lib| \
392         site_lisp       | \
393         x_includes      | \
394         x_libraries     | \
395         site_includes   | \
396         site_libraries  | \
397         site_prefixes   | \
398         site_runtime_libraries )
399                   if test "$valomitted" = "yes" ; then
400                     if test "$#" = 0 ; then
401               (echo "$progname: Usage error:"
402 echo " " "The \`--$optname' option requires a value."
403 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
404             fi
405             val="$1"; shift
406           fi
407           eval "$opt=\"$val\""
408         ;;
409
410                 rel_alloc | \
411         with_dlmalloc | \
412         with_debug_malloc  | use_debug_malloc | \
413         with_system_malloc | use_system_malloc )
414           case "$val" in
415             y | ye | yes )      val=yes ;;
416             n | no )            val=no  ;;
417             d | de | def | defa | defau | defaul | default ) val=default ;;
418             * ) (echo "$progname: Usage error:"
419 echo " " "The \`--$optname' option requires one of these values:
420   \`yes', \`no', or \`default'."
421 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
422           esac
423           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
424           eval "$opt=\"$val\""
425         ;;
426
427                 "with_database" )
428           with_database_berkdb=no
429           with_database_dbm=no
430           with_database_gdbm=no
431           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
432             case "$x" in
433               no ) ;;
434               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
435               d | db | dbm )                               with_database_dbm=yes    ;;
436               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
437               * ) (echo "$progname: Usage error:"
438 echo " " "The \`--$optname' option value
439   must be either \`no' or a comma-separated list
440   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
442             esac
443           done
444           if test "$with_database_dbm"  = "yes" -a \
445                   "$with_database_gdbm" = "yes"; then
446           (echo "$progname: Usage error:"
447 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
448   with the \`--$optname' option."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
450           fi
451         ;;
452
453                 "with_sound" )
454                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
455             case "$x" in
456                       n | no | non | none ) new_sdefault=no ;;
457               a | al | all | both ) new_sdefault=yes ;;
458
459               native )       with_native_sound=yes ;;
460               nonative )     with_native_sound=no ;;
461
462               nas )          with_nas_sound=yes ;;
463               nonas )        with_nas_sound=no ;;
464
465               esd )          with_esd_sound=yes ;;
466               noesd )        with_esd_sound=no ;;
467
468               * ) bogus_sound=yes ;;
469             esac
470             if test "$bogus_sound" -o \
471                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
472                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
473                 (echo "$progname: Usage error:"
474 echo " " "Valid types for the \`--$optname' option are:
475   $types.
476 Option \`all' or \`none' must be first in the list.
477 The default is to autodetect native and NAS sound support."
478 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
479             elif test -n "$new_sdefault" ; then
480                 with_native_sound=$new_sdefault
481                 with_nas_sound=$new_sdefault
482                 with_esd_sound=$new_sdefault
483                 new_sdefault=   # reset this
484             fi
485             sound_notfirst=true
486           done
487         ;;
488
489                         "with_athena" )
490           case "$val" in
491             xa | xaw )                    val=xaw    ;;
492             3 | 3d | xaw3d )              val=3d     ;;
493                         ne | nex | next | naxtaw)     val=next   ;;
494                         9 | 95 | xaw95 )              val=95     ;;
495             xp | xpm | xawxpm )           val=xpm    ;;
496             * ) (echo "$progname: Usage error:"
497 echo " " "The \`--$optname' option must have one of these values:
498   \`xaw', \`3d', \`next', \`95', or \`xpm'."
499 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
500           esac
501           eval "$opt=\"$val\""
502         ;;
503
504                 "with_xim" )
505           case "$val" in
506             y | ye | yes )                val=yes   ;;
507             n | no | non | none )         val=no    ;;
508             x | xl | xli | xlib )         val=xlib  ;;
509             m | mo | mot | moti | motif ) val=motif ;;
510             * ) (echo "$progname: Usage error:"
511 echo " " "The \`--$optname' option must have one of these values:
512   \`motif', \`xlib', \`yes', or \`no'."
513 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
514           esac
515           eval "$opt=\"$val\""
516         ;;
517
518                 "mail_locking" )
519           case "$val" in
520             lockf )     val=lockf ;;
521             flock )     val=flock ;;
522             file | dot ) val=file  ;;
523             locking )   val=locking  ;;
524             * ) (echo "$progname: Usage error:"
525 echo " " "The \`--$optname' option must have one of these values:
526   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
527 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
528           esac
529           eval "$opt=\"$val\""
530         ;;
531
532                 "error_checking" )
533                           
534           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
535             case "$x" in
536                       n | no | non | none ) new_default=no ;;
537               a | al | all )        new_default=yes ;;
538
539               extents )       error_check_extents=yes ;;
540               noextents )     error_check_extents=no ;;
541
542               typecheck )     error_check_typecheck=yes ;;
543               notypecheck )   error_check_typecheck=no ;;
544
545               bufpos )        error_check_bufpos=yes ;;
546               nobufpos )      error_check_bufpos=no ;;
547
548               gc )            error_check_gc=yes ;;
549               nogc )          error_check_gc=no ;;
550
551               malloc )        error_check_malloc=yes ;;
552               nomalloc )      error_check_malloc=no ;;
553
554               byte_code )     error_check_byte_code=yes ;;
555               nobyte_code )   error_check_byte_code=no ;;
556
557               glyphs )     error_check_glyphs=yes ;;
558               noglyphs )   error_check_glyphs=no ;;
559
560               * ) bogus_error_check=yes ;;
561             esac
562             if test "$bogus_error_check" -o \
563                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
564                 if test "$error_check_default" = yes ; then
565                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
566                 else
567                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
568                 fi
569                 (echo "$progname: Usage error:"
570 echo " " "Valid types for the \`--$optname' option are:
571   $types."
572 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
573             elif test -n "$new_default" ; then
574                 error_check_extents=$new_default
575                 error_check_typecheck=$new_default
576                 error_check_bufpos=$new_default
577                 error_check_gc=$new_default
578                 error_check_malloc=$new_default
579                 error_check_byte_code=$new_default
580                 error_check_glyphs=$new_default
581                 new_default=    # reset this
582             fi
583             echeck_notfirst=true
584           done
585         ;;
586
587                                 
588                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
589         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
590         archlibdir | docdir | package_path | moduledir )
591                    if test "$valomitted" = "yes"; then
592              if test "$#" = 0; then
593                  (echo "$progname: Usage error:"
594 echo " " "The \`--$optname' option requires a value."
595 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
596              fi
597              val="$1"; shift
598            fi
599            eval "$opt=\"$val\""
600
601                            case "$opt" in
602                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining EXEC_PREFIX_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define EXEC_PREFIX_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining LISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define LISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining SITELISPDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define SITELISPDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining MODULEDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define MODULEDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining ETCDIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define ETCDIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFODIR_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFODIR_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining INFOPATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define INFOPATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
659     Defining PACKAGE_PATH_USER_DEFINED
660 EOF
661 cat >> confdefs.h <<\EOF
662 #define PACKAGE_PATH_USER_DEFINED 1
663 EOF
664 }
665  ;;
666              datadir )
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining INFODIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define INFODIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LISPDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LISPDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining MODULEDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define MODULEDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ETCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ETCDIR_USER_DEFINED 1
696 EOF
697 }
698
699                 { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706
707                 { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
716     Defining DOCDIR_USER_DEFINED
717 EOF
718 cat >> confdefs.h <<\EOF
719 #define DOCDIR_USER_DEFINED 1
720 EOF
721 }
722  ;;
723              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
724     Defining ARCHLIBDIR_USER_DEFINED
725 EOF
726 cat >> confdefs.h <<\EOF
727 #define ARCHLIBDIR_USER_DEFINED 1
728 EOF
729 }
730  ;;
731            esac
732         ;;
733
734                 "no_create" ) ;;
735
736                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
737
738                 "with_menubars"   | \
739         "with_scrollbars" | \
740         "with_dialogs"    | \
741         "with_widgets" )
742           case "$val" in
743             l | lu | luc | luci | lucid )               val=lucid  ;;
744             mo | mot | moti | motif )                   val=motif  ;;
745             a | at | ath | athe | athen | athena )      val=athena ;;
746             n | no | non | none )                       val=no     ;;
747             y | ye | yes )                              val=yes    ;;
748                         "")                                             val=yes    ;;
749             g | gt | gtk )                              val=gtk    ;;
750             ms | msw )                                  val=msw    ;;
751             * ) (echo "$progname: Usage error:"
752 echo " " "The \`--$optname' option must have one of these values:
753   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
754 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
755           esac
756           eval "$opt=\"$val\""
757         ;;
758
759                 "use_minimal_tagbits" | \
760         "use_indexed_lrecord_implementation" | \
761         "run_in_place"  | \
762         "const_is_losing" | \
763         "with_gnu_make" )
764           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
765         ;;
766
767                 * ) (echo "$progname: Usage error:"
768 echo " " "Unrecognized option: $arg"
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
770
771       esac
772     ;;
773
774         *-*-*) configuration="$arg" ;;
775
776         *) (echo "$progname: Usage error:"
777 echo " " "Unrecognized argument: $arg"
778 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
779
780   esac
781 done
782
783
784 test -n "$cpp"      && CPP="$cpp"
785 test -n "$cppflags" && CPPFLAGS="$cppflags"
786 test -n "$libs"     && LIBS="$libs"
787 test -n "$ldflags"  && LDFLAGS="$ldflags"
788
789 eval set x "$quoted_arguments"; shift
790
791 test "$extra_verbose" = "yes" && verbose=yes
792
793 test -n "$with_x" && with_x11="$with_x"
794
795 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
796   test "$with_system_malloc" = "default" && with_system_malloc=yes
797 fi
798
799
800
801 if test "$with_cde $with_tooltalk" = "yes no"; then
802   (echo "$progname: Usage error:"
803 echo " " "--with-cde requires --with-tooltalk"
804 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
805 elif test "$with_tooltalk" = "no" ; then with_cde=no
806 elif test "$with_cde" = "yes"; then with_tooltalk=yes
807 fi
808
809
810 case "$srcdir" in
811
812     "" )
813     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
814       if test -f "$dir/src/lisp.h" -a \
815               -f "$dir/lisp/version.el" ; then
816         srcdir="$dir"
817         break
818       fi
819     done
820     if test -z "$srcdir" ; then
821       (echo "$progname: Usage error:"
822 echo " " "Neither the current directory nor its parent seem to
823   contain the XEmacs sources.  If you do not want to build XEmacs in its
824   source tree, you should run \`$progname' in the directory in which
825   you wish to build XEmacs, using the \`--srcdir' option to say where the
826   sources may be found."
827 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
828     fi
829   ;;
830
831     * )
832     if test ! -f "$srcdir/src/lisp.h" -o \
833             ! -f "$srcdir/lisp/version.el" ; then
834       (echo "$progname: Usage error:"
835 echo " " "The directory specified with the \`--srcdir' option,
836   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
837   either run the \`$progname' script at the top of the XEmacs source
838   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
839 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
840     fi
841   ;;
842 esac
843
844 if test -z "$configuration"; then
845     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
846   if test -z "$configuration"; then
847     (echo "$progname: Usage error:"
848 echo " " "XEmacs has not been ported to this host type.
849 Try explicitly specifying the CONFIGURATION when rerunning configure."
850 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
851   fi
852 fi
853
854 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
855 echo "configure:856: checking whether ln -s works" >&5
856
857 rm -f conftestdata
858 if ln -s X conftestdata 2>/dev/null
859 then
860   rm -f conftestdata
861   ac_cv_prog_LN_S="ln -s"
862 else
863   ac_cv_prog_LN_S=ln
864 fi
865 LN_S="$ac_cv_prog_LN_S"
866 if test "$ac_cv_prog_LN_S" = "ln -s"; then
867   echo "$ac_t""yes" 1>&6
868 else
869   echo "$ac_t""no" 1>&6
870 fi
871
872
873 for dir in lisp etc man info tests; do
874   if test ! -d "$dir" ; then
875     echo Making symbolic link to "$srcdir/$dir"
876     ${LN_S} "$srcdir/$dir" "$dir"
877   fi
878 done
879
880
881 absolute_pwd="`pwd`";
882 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
883 then blddir="$PWD"
884 else blddir="$absolute_pwd"; if test -d "/net"; then
885   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
886   blddir=`echo "$blddir" | \
887    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
888 fi
889 fi
890
891
892 case "$srcdir" in
893   /* ) ;;
894   .  ) srcdir="$blddir" ;;
895   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
896   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
897   srcdir=`echo "$srcdir" | \
898    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
899 fi ;;
900 esac
901
902 if test `pwd` != `sh -c cd $srcdir && pwd`  \
903    && test -f "$srcdir/src/config.h"; then
904   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
905    echo "   as a build directory right now; it has been configured in its own"
906    echo "   right.  To configure in another directory as well, you MUST"
907    echo "   use GNU make.  If you do not have GNU make, then you must"
908    echo "   now do \`make distclean' in $srcdir,"
909    echo "   and then run $progname again.") >&2
910   extrasub='/^VPATH[     ]*=/c\
911 vpath %.c $(srcdir)\
912 vpath %.h $(srcdir)\
913 vpath %.y $(srcdir)\
914 vpath %.l $(srcdir)\
915 vpath %.s $(srcdir)\
916 vpath %.in $(srcdir)'
917 fi
918
919 . "$srcdir/version.sh" || exit 1;
920 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
921 : "${extra_verbose=$beta}"
922 version="${emacs_major_version}.${emacs_minor_version}"
923 { test "$extra_verbose" = "yes" && cat << EOF
924     Defining EMACS_MAJOR_VERSION = $emacs_major_version
925 EOF
926 cat >> confdefs.h <<EOF
927 #define EMACS_MAJOR_VERSION $emacs_major_version
928 EOF
929 }
930
931 { test "$extra_verbose" = "yes" && cat << EOF
932     Defining EMACS_MINOR_VERSION = $emacs_minor_version
933 EOF
934 cat >> confdefs.h <<EOF
935 #define EMACS_MINOR_VERSION $emacs_minor_version
936 EOF
937 }
938
939 if test -n "$emacs_beta_version" ; then
940   if test "$beta" = "yes"; then
941         version="${version}-b${emacs_beta_version}"
942         { test "$extra_verbose" = "yes" && cat << EOF
943     Defining EMACS_BETA_VERSION = $emacs_beta_version
944 EOF
945 cat >> confdefs.h <<EOF
946 #define EMACS_BETA_VERSION $emacs_beta_version
947 EOF
948 }
949
950   else
951         version="${version}.${emacs_beta_version}"
952         { test "$extra_verbose" = "yes" && cat << EOF
953     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
954 EOF
955 cat >> confdefs.h <<EOF
956 #define EMACS_PATCH_LEVEL $emacs_beta_version
957 EOF
958 }
959
960   fi
961 fi
962 { test "$extra_verbose" = "yes" && cat << EOF
963     Defining XEMACS_CODENAME = "$xemacs_codename"
964 EOF
965 cat >> confdefs.h <<EOF
966 #define XEMACS_CODENAME "$xemacs_codename"
967 EOF
968 }
969
970 { test "$extra_verbose" = "yes" && cat << EOF
971     Defining EMACS_VERSION = "$version"
972 EOF
973 cat >> confdefs.h <<EOF
974 #define EMACS_VERSION "$version"
975 EOF
976 }
977
978
979 if test "$with_infodock" = "yes"; then
980   if test ! -f ../../ID-INSTALL; then
981     echo "Cannot build InfoDock without InfoDock sources"
982     with_infodock=no
983   fi
984 fi
985
986 if test "$with_infodock" = "yes"; then
987       { test "$extra_verbose" = "yes" && cat << EOF
988     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
989 EOF
990 cat >> confdefs.h <<EOF
991 #define INFODOCK_MAJOR_VERSION $infodock_major_version
992 EOF
993 }
994
995   { test "$extra_verbose" = "yes" && cat << EOF
996     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
997 EOF
998 cat >> confdefs.h <<EOF
999 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1000 EOF
1001 }
1002
1003   { test "$extra_verbose" = "yes" && cat << EOF
1004     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1005 EOF
1006 cat >> confdefs.h <<EOF
1007 #define INFODOCK_BUILD_VERSION $infodock_build_version
1008 EOF
1009 }
1010
1011   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1012   PROGNAME=infodock
1013   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1014 else
1015   PROGNAME=xemacs
1016 fi
1017
1018 { test "$extra_verbose" = "yes" && cat << EOF
1019     Defining EMACS_PROGNAME = "$PROGNAME"
1020 EOF
1021 cat >> confdefs.h <<EOF
1022 #define EMACS_PROGNAME "$PROGNAME"
1023 EOF
1024 }
1025
1026
1027 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1028 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1029     Defining ERROR_CHECK_EXTENTS
1030 EOF
1031 cat >> confdefs.h <<\EOF
1032 #define ERROR_CHECK_EXTENTS 1
1033 EOF
1034 }
1035
1036 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1037     Defining ERROR_CHECK_TYPECHECK
1038 EOF
1039 cat >> confdefs.h <<\EOF
1040 #define ERROR_CHECK_TYPECHECK 1
1041 EOF
1042 }
1043
1044 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1045     Defining ERROR_CHECK_BUFPOS
1046 EOF
1047 cat >> confdefs.h <<\EOF
1048 #define ERROR_CHECK_BUFPOS 1
1049 EOF
1050 }
1051
1052 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1053     Defining ERROR_CHECK_GC
1054 EOF
1055 cat >> confdefs.h <<\EOF
1056 #define ERROR_CHECK_GC 1
1057 EOF
1058 }
1059
1060 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1061     Defining ERROR_CHECK_MALLOC
1062 EOF
1063 cat >> confdefs.h <<\EOF
1064 #define ERROR_CHECK_MALLOC 1
1065 EOF
1066 }
1067
1068 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1069     Defining ERROR_CHECK_BYTE_CODE
1070 EOF
1071 cat >> confdefs.h <<\EOF
1072 #define ERROR_CHECK_BYTE_CODE 1
1073 EOF
1074 }
1075
1076 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1077     Defining ERROR_CHECK_GLYPHS
1078 EOF
1079 cat >> confdefs.h <<\EOF
1080 #define ERROR_CHECK_GLYPHS 1
1081 EOF
1082 }
1083
1084 if test "${debug:=$beta}" = "yes"; then
1085   use_assertions=yes memory_usage_stats=yes
1086   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"debug.o\""
1088  fi
1089   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1090    echo "    xemacs will be linked with \"tests.o\""
1091  fi
1092   { test "$extra_verbose" = "yes" && cat << \EOF
1093     Defining DEBUG_XEMACS
1094 EOF
1095 cat >> confdefs.h <<\EOF
1096 #define DEBUG_XEMACS 1
1097 EOF
1098 }
1099
1100 fi
1101 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1102     Defining USE_ASSERTIONS
1103 EOF
1104 cat >> confdefs.h <<\EOF
1105 #define USE_ASSERTIONS 1
1106 EOF
1107 }
1108
1109 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1110     Defining MEMORY_USAGE_STATS
1111 EOF
1112 cat >> confdefs.h <<\EOF
1113 #define MEMORY_USAGE_STATS 1
1114 EOF
1115 }
1116
1117
1118
1119 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1120 echo "configure:1121: checking "host system type"" >&5
1121 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1122 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1123 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1125 echo "$ac_t""$configuration" 1>&6
1126
1127
1128
1129
1130
1131 machine='' opsys=''
1132
1133 case "$canonical" in
1134   sparc-*-*        ) machine=sparc ;;
1135   alpha*-*-*       ) machine=alpha ;;
1136   vax-*-*          ) machine=vax ;;
1137   mips-dec-*       ) machine=pmax ;;
1138   mips-sgi-irix6*  ) machine=iris6d ;;
1139   mips-sgi-*       ) machine=iris4d ;;
1140   mips*-linux      ) machine=mips ;;
1141   romp-ibm-*       ) machine=ibmrt ;;
1142   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1143   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1144   powerpc*-*       ) machine=powerpc ;;
1145   hppa-*-*         ) machine=hp800 ;;
1146   m88k-dg-*        ) machine=aviion ;;
1147   m68*-sony-*      ) machine=news ;;
1148   mips-sony-*      ) machine=news-risc ;;
1149   clipper-*        ) machine=clipper ;;
1150   arm*             ) machine=arm ;;
1151   ns32k-*          ) machine=ns32000 ;;
1152 esac
1153
1154 case "$canonical" in
1155   *-*-linux*    ) opsys=linux ;;
1156   *-*-netbsd*   ) opsys=netbsd ;;
1157   *-*-openbsd*  ) opsys=openbsd ;;
1158   *-*-nextstep* ) opsys=nextstep ;;
1159   *-*-vms       ) opsys=vms ;;
1160
1161     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1162   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1163   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1164   *-dec-osf3*                ) opsys=decosf3-1 ;;
1165   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1166
1167     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1168   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1169   *-*-ultrix* )         opsys=ultrix4-3 ;;
1170
1171     *-*-aix3.1*  ) opsys=aix3-1 ;;
1172   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1173   *-*-aix3*    ) opsys=aix3-2   ;;
1174   *-*-aix4.0*  ) opsys=aix4     ;;
1175   *-*-aix4.1*  ) opsys=aix4-1   ;;
1176   *-*-aix4*    ) opsys=aix4-2   ;;
1177
1178     *-gnu* )                    opsys=gnu    ;;
1179   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1180   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1181   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1182   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1183   *-*-aos*   )                  opsys=bsd4-3 ;;
1184   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1185   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1186   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1187   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1188   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1189   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1190         if test -z "$NON_GNU_CPP" ; then
1191           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1192             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1193           done
1194         fi
1195         opsys=usg5-4-2 ;;
1196     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1197     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1198 esac
1199
1200 case "$canonical" in
1201
1202     *-*-netbsd* )
1203     case "$canonical" in
1204       i[3-9]86-*-netbsd*) machine=intel386 ;;
1205       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1206                                             machine=hp9000s300 ;;
1207       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1208       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1209     esac
1210   ;;
1211
1212     *-*-openbsd* )
1213     case "${canonical}" in
1214       i386-*-openbsd*)          machine=intel386 ;;
1215       m68k-*-openbsd*)          machine=hp9000s300 ;;
1216       mipsel-*-openbsd*)        machine=pmax ;;
1217      esac
1218    ;;
1219
1220     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1221   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1222
1223     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1224   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1225
1226     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1227
1228     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1229
1230     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1231
1232     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1233
1234     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1235
1236     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1237   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1238   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1239
1240   
1241     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1242
1243     *-convex-bsd* | *-convex-convexos* )
1244     machine=convex opsys=bsd4-3
1245     NON_GNU_CPP="cc -E -P"
1246   ;;
1247
1248     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1249
1250     *-*-darwin*)
1251     opsys=darwin
1252     RANLIB="ranlib -c"     ;;
1253
1254     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1255   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1256   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1257   m88k-dg-dgux*                           ) opsys=dgux     ;;
1258
1259     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1260   m88k-motorola-sysv4* )
1261                     machine=delta88k opsys=usg5-4-2
1262   ;;
1263   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1264
1265     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1266   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1267
1268     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1269
1270     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1271   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1272   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1273
1274       m88k-harris-cxux* )
1275         case "`uname -r`" in
1276        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1277        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1278     esac
1279     NON_GNU_CPP="/lib/cpp"
1280   ;;
1281     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1282     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1283
1284     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1285
1286     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1287
1288     *-hp-hpux* )
1289         case "$canonical" in
1290       m68*  ) machine=hp9000s300 ;;
1291       hppa* ) machine=hp800      ;;
1292     esac
1293
1294     case "$canonical" in
1295       *-hp-hpux7*  )  opsys=hpux   ;;
1296       *-hp-hpux8*  )  opsys=hpux8  ;;
1297       *-hp-hpux9*  )  opsys=hpux9  ;;
1298       *-hp-hpux10* )  opsys=hpux10 ;;
1299       *-hp-hpux11* )  opsys=hpux11 ;;
1300       *            )  opsys=hpux   ;;
1301     esac
1302
1303         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1304    echo "    xemacs will be linked with \"strcat.o\""
1305  fi ;; esac
1306
1307     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1308         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1309     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1310
1311     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1312   ;;
1313
1314     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1315   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1316
1317     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1318   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1319   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1320   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1321   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1322   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1323
1324     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1325   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1326
1327     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1328
1329     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1330
1331     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1332
1333     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1334
1335       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1336
1337     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1338
1339     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1340
1341     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1342
1343     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1344
1345         mips-mips-usg* ) machine=mips4 ;;
1346   mips-mips-riscos4 )
1347     machine=mips4
1348     NON_GNU_CC="cc -systype bsd43"
1349     NON_GNU_CPP="cc -systype bsd43 -E"
1350     case "$canonical" in
1351       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1352       mips-mips-riscos5* ) opsys=riscos5 ;;
1353     esac
1354   ;;
1355   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1356   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1357
1358     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1359
1360     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1361
1362     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1363   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1364
1365     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1366
1367     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1368
1369     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1370
1371     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1372
1373     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1374   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1375
1376     mips-siemens-sysv* | mips-sni-sysv*)
1377     machine=mips-siemens opsys=usg5-4
1378     NON_GNU_CC=/usr/ccs/bin/cc
1379     NON_GNU_CPP=/usr/ccs/lib/cpp
1380   ;;
1381
1382     mips-nec-sysv*)
1383     machine=mips-nec
1384     NON_GNU_CC=/usr/ccs/bin/cc
1385     NON_GNU_CPP=/usr/ccs/lib/cpp
1386   ;;
1387
1388       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1389   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1390     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1391   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1392   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1393   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1394   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1395   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1396   mips-sgi-irix*      ) opsys=irix5-0 ;;
1397
1398     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1399   *-sony-news* ) opsys=newsos5 ;;
1400
1401     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1402
1403     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1404         case "$canonical" in
1405       m68*-sunos1* )             machine=sun1     ;;
1406       m68*-sunos2* )             machine=sun2     ;;
1407       m68* )                     machine=sun3     ;;
1408       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1409       i*86-*-* )                 machine=intel386 ;;
1410       rs6000* )                  machine=rs6000   ;;
1411     esac
1412
1413         case "$canonical" in *-sunos5*)
1414       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1415     esac
1416
1417                     case "$canonical" in
1418       *-sunos4* )
1419         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1420         : ;;
1421       *-solaris2* )
1422         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1423         RANLIB=':' ;;
1424     esac
1425
1426     case "$canonical" in
1427       *-solaris*          )
1428         opsys=sol2
1429         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1430         { test "$extra_verbose" = "yes" && cat << EOF
1431     Defining OS_RELEASE = $os_release
1432 EOF
1433 cat >> confdefs.h <<EOF
1434 #define OS_RELEASE $os_release
1435 EOF
1436 }
1437  ;;
1438
1439             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1440       *-sunos4.0*         ) opsys=sunos4-0      ;;
1441       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1442       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1443       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1444       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1445       *-mach*             ) opsys=mach-bsd4-3   ;;
1446       *                   ) opsys=bsd4-2        ;;
1447     esac
1448
1449     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1450
1451         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1452   ;;
1453
1454     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1455
1456     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1457   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1458
1459     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1460
1461     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1462
1463     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1464       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1465
1466     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1467
1468     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1469
1470     vax-dec-* )
1471     case "$canonical" in
1472       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1473       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1474       *-mach* )                         opsys=mach-bsd4-3 ;;
1475     esac
1476   ;;
1477
1478     ns16k-whitechapel-* ) machine=mg1 ;;
1479
1480     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1481
1482     i[3-9]86-*-* )
1483     machine=intel386
1484     case "$canonical" in
1485       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1486       *-isc2.2* )               opsys=isc2-2 ;;
1487       *-isc4.0* )               opsys=isc4-0 ;;
1488       *-isc4.* )                opsys=isc4-1
1489                                 GCC_TEST_OPTIONS=-posix
1490                                 NON_GCC_TEST_OPTIONS=-Xp
1491                                 ;;
1492       *-isc* )                  opsys=isc3-0 ;;
1493       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1494       *-esix* )                 opsys=esix ;;
1495       *-mach* )                 opsys=mach-bsd4-3 ;;
1496       *-xenix* )                opsys=xenix ;;
1497       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1498       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1499       *-bsdi4* )                opsys=bsdos4 ;;
1500       *-bsdi3* )                opsys=bsdos3 ;;
1501       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1502       *-bsdi2* )                opsys=bsdos2 ;;
1503       *-sco3.2v5* )             opsys=sco5 ;;
1504       *-sysv5* )                opsys=sco7 ;;
1505       *-386bsd* )               opsys=386bsd ;;
1506       *-freebsd* )              opsys=freebsd ;;
1507       *-nextstep* )             opsys=nextstep ;;
1508       *-pc-cygwin* )            opsys=cygwin32 ;;
1509       *-pc-mingw* )             opsys=mingw32 ;
1510                                 test -z "$with_tty" && with_tty="no";;
1511           esac
1512   ;;
1513
1514     m68k-*-linux* ) machine=m68k opsys=linux ;;
1515
1516 esac
1517
1518 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1519
1520 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1521
1522 if test -r "${srcdir}/src/m/${machine}.h"; then
1523   machfile="m/${machine}.h"
1524   { test "$extra_verbose" = "yes" && cat << EOF
1525     Defining config_machfile = "$machfile"
1526 EOF
1527 cat >> confdefs.h <<EOF
1528 #define config_machfile "$machfile"
1529 EOF
1530 }
1531
1532 else
1533   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1534   echo "Using configure-time autodetection only."
1535 fi
1536
1537 if test -r "${srcdir}/src/s/${opsys}.h"; then
1538   opsysfile="s/${opsys}.h"
1539   { test "$extra_verbose" = "yes" && cat << EOF
1540     Defining config_opsysfile = "$opsysfile"
1541 EOF
1542 cat >> confdefs.h <<EOF
1543 #define config_opsysfile "$opsysfile"
1544 EOF
1545 }
1546
1547 else
1548   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1549   echo "Using configure-time autodetection only."
1550 fi
1551
1552
1553 if test -z "$pdump"; then
1554   case "$opsys" in
1555     linux* )      pdump=yes ;;        *-*-darwin* ) pdump=yes ;;        *)            pdump=no ;;
1556   esac
1557 fi
1558
1559 if test -z "$dynamic"; then
1560   case "$opsys" in
1561     hpux* | sunos4* ) dynamic=no ;;
1562     *) dynamic=yes ;;
1563   esac
1564 fi
1565 if test "$dynamic" = "yes"; then
1566   case "$opsys" in
1567     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1568     decosf* ) ld_call_shared="-call_shared" ;;
1569   esac
1570 else   case "$opsys" in
1571     sol2 )
1572       echo "Static linking is not supported on Solaris 2."
1573       echo "Rerun configure without specifying --dynamic=no."
1574       exit 1 ;;
1575     linux   ) ld_call_shared="-Bstatic" ;;
1576     decosf* ) ld_call_shared="-non_shared" ;;
1577   esac
1578 fi
1579
1580 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1581
1582 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1583 { test "$extra_verbose" = "yes" && cat << EOF
1584     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1585 EOF
1586 cat >> confdefs.h <<EOF
1587 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1588 EOF
1589 }
1590
1591
1592
1593 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1594 if test "$with_workshop $with_tooltalk" = "yes no"; then
1595   (echo "$progname: Usage error:"
1596 echo " " "--with-workshop requires --with-tooltalk"
1597 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1598 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1599 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1600 fi
1601
1602 if test "$with_workshop" = "yes"; then
1603   { test "$extra_verbose" = "yes" && cat << \EOF
1604     Defining SUNPRO
1605 EOF
1606 cat >> confdefs.h <<\EOF
1607 #define SUNPRO 1
1608 EOF
1609 }
1610
1611   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1612    echo "    xemacs will be linked with \"sunpro.o\""
1613  fi
1614 fi
1615
1616 if test "$with_clash_detection" != "no"; then
1617   { test "$extra_verbose" = "yes" && cat << \EOF
1618     Defining CLASH_DETECTION
1619 EOF
1620 cat >> confdefs.h <<\EOF
1621 #define CLASH_DETECTION 1
1622 EOF
1623 }
1624
1625   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1626    echo "    xemacs will be linked with \"filelock.o\""
1627  fi
1628 fi
1629
1630 test -n "$compiler" && CC="$compiler"
1631 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1632 fi
1633
1634 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1635 if test "${CFLAGS-unset}" != unset
1636   then cflags_specified=yes;
1637   else cflags_specified=no;
1638 fi
1639
1640 xe_save_CFLAGS="$CFLAGS"
1641
1642 # Extract the first word of "gcc", so it can be a program name with args.
1643 set dummy gcc; ac_word=$2
1644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1645 echo "configure:1646: checking for $ac_word" >&5
1646
1647 if test -n "$CC"; then
1648   ac_cv_prog_CC="$CC" # Let the user override the test.
1649 else
1650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1651   ac_dummy="$PATH"
1652   for ac_dir in $ac_dummy; do
1653     test -z "$ac_dir" && ac_dir=.
1654     if test -f $ac_dir/$ac_word; then
1655       ac_cv_prog_CC="gcc"
1656       break
1657     fi
1658   done
1659   IFS="$ac_save_ifs"
1660 fi
1661 CC="$ac_cv_prog_CC"
1662 if test -n "$CC"; then
1663   echo "$ac_t""$CC" 1>&6
1664 else
1665   echo "$ac_t""no" 1>&6
1666 fi
1667
1668 if test -z "$CC"; then
1669   # Extract the first word of "cc", so it can be a program name with args.
1670 set dummy cc; ac_word=$2
1671 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1672 echo "configure:1673: checking for $ac_word" >&5
1673
1674 if test -n "$CC"; then
1675   ac_cv_prog_CC="$CC" # Let the user override the test.
1676 else
1677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1678   ac_prog_rejected=no
1679   ac_dummy="$PATH"
1680   for ac_dir in $ac_dummy; do
1681     test -z "$ac_dir" && ac_dir=.
1682     if test -f $ac_dir/$ac_word; then
1683       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1684         ac_prog_rejected=yes
1685         continue
1686       fi
1687       ac_cv_prog_CC="cc"
1688       break
1689     fi
1690   done
1691   IFS="$ac_save_ifs"
1692 if test $ac_prog_rejected = yes; then
1693   # We found a bogon in the path, so make sure we never use it.
1694   set dummy $ac_cv_prog_CC
1695   shift
1696   if test $# -gt 0; then
1697     # We chose a different compiler from the bogus one.
1698     # However, it has the same basename, so the bogon will be chosen
1699     # first if we set CC to just the basename; use the full file name.
1700     shift
1701     set dummy "$ac_dir/$ac_word" "$@"
1702     shift
1703     ac_cv_prog_CC="$@"
1704   fi
1705 fi
1706 fi
1707 CC="$ac_cv_prog_CC"
1708 if test -n "$CC"; then
1709   echo "$ac_t""$CC" 1>&6
1710 else
1711   echo "$ac_t""no" 1>&6
1712 fi
1713
1714   if test -z "$CC"; then
1715     case "`uname -s`" in
1716     *win32* | *WIN32*)
1717       # Extract the first word of "cl", so it can be a program name with args.
1718 set dummy cl; ac_word=$2
1719 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1720 echo "configure:1721: checking for $ac_word" >&5
1721
1722 if test -n "$CC"; then
1723   ac_cv_prog_CC="$CC" # Let the user override the test.
1724 else
1725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1726   ac_dummy="$PATH"
1727   for ac_dir in $ac_dummy; do
1728     test -z "$ac_dir" && ac_dir=.
1729     if test -f $ac_dir/$ac_word; then
1730       ac_cv_prog_CC="cl"
1731       break
1732     fi
1733   done
1734   IFS="$ac_save_ifs"
1735 fi
1736 CC="$ac_cv_prog_CC"
1737 if test -n "$CC"; then
1738   echo "$ac_t""$CC" 1>&6
1739 else
1740   echo "$ac_t""no" 1>&6
1741 fi
1742  ;;
1743     esac
1744   fi
1745   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1746 fi
1747
1748 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1749 echo "configure:1750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1750
1751 ac_ext=c
1752 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1753 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1754 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'
1755 ac_cpp='$CPP '"$xe_cppflags"
1756 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1757 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1758 cross_compiling=no
1759
1760 cat > conftest.$ac_ext << EOF
1761
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764
1765 main(){return(0);}
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1768   ac_cv_prog_cc_works=yes
1769   # If we can't run a trivial program, we are probably using a cross compiler.
1770   if (./conftest; exit) 2>/dev/null; then
1771     ac_cv_prog_cc_cross=no
1772   else
1773     ac_cv_prog_cc_cross=yes
1774   fi
1775 else
1776   echo "configure: failed program was:" >&5
1777   cat conftest.$ac_ext >&5
1778   ac_cv_prog_cc_works=no
1779 fi
1780 rm -fr conftest*
1781 ac_ext=c
1782 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1783 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1784 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'
1785 ac_cpp='$CPP '"$xe_cppflags"
1786 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1787 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1788 cross_compiling=no
1789
1790 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1791 if test $ac_cv_prog_cc_works = no; then
1792   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1793 fi
1794 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1795 echo "configure:1796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1796 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1797 cross_compiling=$ac_cv_prog_cc_cross
1798
1799 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1800 echo "configure:1801: checking whether we are using GNU C" >&5
1801
1802 cat > conftest.c <<EOF
1803 #ifdef __GNUC__
1804   yes;
1805 #endif
1806 EOF
1807 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1808   ac_cv_prog_gcc=yes
1809 else
1810   ac_cv_prog_gcc=no
1811 fi
1812
1813 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1814
1815 if test $ac_cv_prog_gcc = yes; then
1816   GCC=yes
1817 else
1818   GCC=
1819 fi
1820
1821 ac_test_CFLAGS="${CFLAGS+set}"
1822 ac_save_CFLAGS="$CFLAGS"
1823 CFLAGS=
1824 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1825 echo "configure:1826: checking whether ${CC-cc} accepts -g" >&5
1826
1827 echo 'void f(){}' > conftest.c
1828 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1829   ac_cv_prog_cc_g=yes
1830 else
1831   ac_cv_prog_cc_g=no
1832 fi
1833 rm -f conftest*
1834
1835
1836 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1837 if test "$ac_test_CFLAGS" = set; then
1838   CFLAGS="$ac_save_CFLAGS"
1839 elif test $ac_cv_prog_cc_g = yes; then
1840   if test "$GCC" = yes; then
1841     CFLAGS="-g -O2"
1842   else
1843     CFLAGS="-g"
1844   fi
1845 else
1846   if test "$GCC" = yes; then
1847     CFLAGS="-O2"
1848   else
1849     CFLAGS=
1850   fi
1851 fi
1852  
1853 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1854   CC=${NON_GNU_CC-cc}
1855   # Extract the first word of "gcc", so it can be a program name with args.
1856 set dummy gcc; ac_word=$2
1857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1858 echo "configure:1859: checking for $ac_word" >&5
1859
1860 if test -n "$CC"; then
1861   ac_cv_prog_CC="$CC" # Let the user override the test.
1862 else
1863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1864   ac_dummy="$PATH"
1865   for ac_dir in $ac_dummy; do
1866     test -z "$ac_dir" && ac_dir=.
1867     if test -f $ac_dir/$ac_word; then
1868       ac_cv_prog_CC="gcc"
1869       break
1870     fi
1871   done
1872   IFS="$ac_save_ifs"
1873 fi
1874 CC="$ac_cv_prog_CC"
1875 if test -n "$CC"; then
1876   echo "$ac_t""$CC" 1>&6
1877 else
1878   echo "$ac_t""no" 1>&6
1879 fi
1880
1881 if test -z "$CC"; then
1882   # Extract the first word of "cc", so it can be a program name with args.
1883 set dummy cc; ac_word=$2
1884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1885 echo "configure:1886: checking for $ac_word" >&5
1886
1887 if test -n "$CC"; then
1888   ac_cv_prog_CC="$CC" # Let the user override the test.
1889 else
1890   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1891   ac_prog_rejected=no
1892   ac_dummy="$PATH"
1893   for ac_dir in $ac_dummy; do
1894     test -z "$ac_dir" && ac_dir=.
1895     if test -f $ac_dir/$ac_word; then
1896       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1897         ac_prog_rejected=yes
1898         continue
1899       fi
1900       ac_cv_prog_CC="cc"
1901       break
1902     fi
1903   done
1904   IFS="$ac_save_ifs"
1905 if test $ac_prog_rejected = yes; then
1906   # We found a bogon in the path, so make sure we never use it.
1907   set dummy $ac_cv_prog_CC
1908   shift
1909   if test $# -gt 0; then
1910     # We chose a different compiler from the bogus one.
1911     # However, it has the same basename, so the bogon will be chosen
1912     # first if we set CC to just the basename; use the full file name.
1913     shift
1914     set dummy "$ac_dir/$ac_word" "$@"
1915     shift
1916     ac_cv_prog_CC="$@"
1917   fi
1918 fi
1919 fi
1920 CC="$ac_cv_prog_CC"
1921 if test -n "$CC"; then
1922   echo "$ac_t""$CC" 1>&6
1923 else
1924   echo "$ac_t""no" 1>&6
1925 fi
1926
1927   if test -z "$CC"; then
1928     case "`uname -s`" in
1929     *win32* | *WIN32*)
1930       # Extract the first word of "cl", so it can be a program name with args.
1931 set dummy cl; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934
1935 if test -n "$CC"; then
1936   ac_cv_prog_CC="$CC" # Let the user override the test.
1937 else
1938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1939   ac_dummy="$PATH"
1940   for ac_dir in $ac_dummy; do
1941     test -z "$ac_dir" && ac_dir=.
1942     if test -f $ac_dir/$ac_word; then
1943       ac_cv_prog_CC="cl"
1944       break
1945     fi
1946   done
1947   IFS="$ac_save_ifs"
1948 fi
1949 CC="$ac_cv_prog_CC"
1950 if test -n "$CC"; then
1951   echo "$ac_t""$CC" 1>&6
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955  ;;
1956     esac
1957   fi
1958   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1959 fi
1960
1961 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1962 echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1963
1964 ac_ext=c
1965 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1966 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1967 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'
1968 ac_cpp='$CPP '"$xe_cppflags"
1969 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1970 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1971 cross_compiling=no
1972
1973 cat > conftest.$ac_ext << EOF
1974
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977
1978 main(){return(0);}
1979 EOF
1980 if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1981   ac_cv_prog_cc_works=yes
1982   # If we can't run a trivial program, we are probably using a cross compiler.
1983   if (./conftest; exit) 2>/dev/null; then
1984     ac_cv_prog_cc_cross=no
1985   else
1986     ac_cv_prog_cc_cross=yes
1987   fi
1988 else
1989   echo "configure: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991   ac_cv_prog_cc_works=no
1992 fi
1993 rm -fr conftest*
1994 ac_ext=c
1995 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1996 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1997 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'
1998 ac_cpp='$CPP '"$xe_cppflags"
1999 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2000 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2001 cross_compiling=no
2002
2003 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2004 if test $ac_cv_prog_cc_works = no; then
2005   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2006 fi
2007 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2008 echo "configure:2009: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2009 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2010 cross_compiling=$ac_cv_prog_cc_cross
2011
2012 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2013 echo "configure:2014: checking whether we are using GNU C" >&5
2014
2015 cat > conftest.c <<EOF
2016 #ifdef __GNUC__
2017   yes;
2018 #endif
2019 EOF
2020 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2021   ac_cv_prog_gcc=yes
2022 else
2023   ac_cv_prog_gcc=no
2024 fi
2025
2026 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2027
2028 if test $ac_cv_prog_gcc = yes; then
2029   GCC=yes
2030 else
2031   GCC=
2032 fi
2033
2034 ac_test_CFLAGS="${CFLAGS+set}"
2035 ac_save_CFLAGS="$CFLAGS"
2036 CFLAGS=
2037 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2038 echo "configure:2039: checking whether ${CC-cc} accepts -g" >&5
2039
2040 echo 'void f(){}' > conftest.c
2041 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2042   ac_cv_prog_cc_g=yes
2043 else
2044   ac_cv_prog_cc_g=no
2045 fi
2046 rm -f conftest*
2047
2048
2049 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2050 if test "$ac_test_CFLAGS" = set; then
2051   CFLAGS="$ac_save_CFLAGS"
2052 elif test $ac_cv_prog_cc_g = yes; then
2053   if test "$GCC" = yes; then
2054     CFLAGS="-g -O2"
2055   else
2056     CFLAGS="-g"
2057   fi
2058 else
2059   if test "$GCC" = yes; then
2060     CFLAGS="-O2"
2061   else
2062     CFLAGS=
2063   fi
2064 fi
2065
2066 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2067   CC=gcc
2068   # Extract the first word of "gcc", so it can be a program name with args.
2069 set dummy gcc; ac_word=$2
2070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2071 echo "configure:2072: checking for $ac_word" >&5
2072
2073 if test -n "$CC"; then
2074   ac_cv_prog_CC="$CC" # Let the user override the test.
2075 else
2076   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2077   ac_dummy="$PATH"
2078   for ac_dir in $ac_dummy; do
2079     test -z "$ac_dir" && ac_dir=.
2080     if test -f $ac_dir/$ac_word; then
2081       ac_cv_prog_CC="gcc"
2082       break
2083     fi
2084   done
2085   IFS="$ac_save_ifs"
2086 fi
2087 CC="$ac_cv_prog_CC"
2088 if test -n "$CC"; then
2089   echo "$ac_t""$CC" 1>&6
2090 else
2091   echo "$ac_t""no" 1>&6
2092 fi
2093
2094 if test -z "$CC"; then
2095   # Extract the first word of "cc", so it can be a program name with args.
2096 set dummy cc; ac_word=$2
2097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2098 echo "configure:2099: checking for $ac_word" >&5
2099
2100 if test -n "$CC"; then
2101   ac_cv_prog_CC="$CC" # Let the user override the test.
2102 else
2103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2104   ac_prog_rejected=no
2105   ac_dummy="$PATH"
2106   for ac_dir in $ac_dummy; do
2107     test -z "$ac_dir" && ac_dir=.
2108     if test -f $ac_dir/$ac_word; then
2109       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2110         ac_prog_rejected=yes
2111         continue
2112       fi
2113       ac_cv_prog_CC="cc"
2114       break
2115     fi
2116   done
2117   IFS="$ac_save_ifs"
2118 if test $ac_prog_rejected = yes; then
2119   # We found a bogon in the path, so make sure we never use it.
2120   set dummy $ac_cv_prog_CC
2121   shift
2122   if test $# -gt 0; then
2123     # We chose a different compiler from the bogus one.
2124     # However, it has the same basename, so the bogon will be chosen
2125     # first if we set CC to just the basename; use the full file name.
2126     shift
2127     set dummy "$ac_dir/$ac_word" "$@"
2128     shift
2129     ac_cv_prog_CC="$@"
2130   fi
2131 fi
2132 fi
2133 CC="$ac_cv_prog_CC"
2134 if test -n "$CC"; then
2135   echo "$ac_t""$CC" 1>&6
2136 else
2137   echo "$ac_t""no" 1>&6
2138 fi
2139
2140   if test -z "$CC"; then
2141     case "`uname -s`" in
2142     *win32* | *WIN32*)
2143       # Extract the first word of "cl", so it can be a program name with args.
2144 set dummy cl; ac_word=$2
2145 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2146 echo "configure:2147: checking for $ac_word" >&5
2147
2148 if test -n "$CC"; then
2149   ac_cv_prog_CC="$CC" # Let the user override the test.
2150 else
2151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2152   ac_dummy="$PATH"
2153   for ac_dir in $ac_dummy; do
2154     test -z "$ac_dir" && ac_dir=.
2155     if test -f $ac_dir/$ac_word; then
2156       ac_cv_prog_CC="cl"
2157       break
2158     fi
2159   done
2160   IFS="$ac_save_ifs"
2161 fi
2162 CC="$ac_cv_prog_CC"
2163 if test -n "$CC"; then
2164   echo "$ac_t""$CC" 1>&6
2165 else
2166   echo "$ac_t""no" 1>&6
2167 fi
2168  ;;
2169     esac
2170   fi
2171   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2172 fi
2173
2174 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2175 echo "configure:2176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2176
2177 ac_ext=c
2178 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2179 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2180 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'
2181 ac_cpp='$CPP '"$xe_cppflags"
2182 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2183 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2184 cross_compiling=no
2185
2186 cat > conftest.$ac_ext << EOF
2187
2188 #line 2189 "configure"
2189 #include "confdefs.h"
2190
2191 main(){return(0);}
2192 EOF
2193 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2194   ac_cv_prog_cc_works=yes
2195   # If we can't run a trivial program, we are probably using a cross compiler.
2196   if (./conftest; exit) 2>/dev/null; then
2197     ac_cv_prog_cc_cross=no
2198   else
2199     ac_cv_prog_cc_cross=yes
2200   fi
2201 else
2202   echo "configure: failed program was:" >&5
2203   cat conftest.$ac_ext >&5
2204   ac_cv_prog_cc_works=no
2205 fi
2206 rm -fr conftest*
2207 ac_ext=c
2208 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2209 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2210 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'
2211 ac_cpp='$CPP '"$xe_cppflags"
2212 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2213 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2214 cross_compiling=no
2215
2216 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2217 if test $ac_cv_prog_cc_works = no; then
2218   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2219 fi
2220 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2221 echo "configure:2222: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2222 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2223 cross_compiling=$ac_cv_prog_cc_cross
2224
2225 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2226 echo "configure:2227: checking whether we are using GNU C" >&5
2227
2228 cat > conftest.c <<EOF
2229 #ifdef __GNUC__
2230   yes;
2231 #endif
2232 EOF
2233 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2234   ac_cv_prog_gcc=yes
2235 else
2236   ac_cv_prog_gcc=no
2237 fi
2238
2239 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2240
2241 if test $ac_cv_prog_gcc = yes; then
2242   GCC=yes
2243 else
2244   GCC=
2245 fi
2246
2247 ac_test_CFLAGS="${CFLAGS+set}"
2248 ac_save_CFLAGS="$CFLAGS"
2249 CFLAGS=
2250 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2251 echo "configure:2252: checking whether ${CC-cc} accepts -g" >&5
2252
2253 echo 'void f(){}' > conftest.c
2254 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2255   ac_cv_prog_cc_g=yes
2256 else
2257   ac_cv_prog_cc_g=no
2258 fi
2259 rm -f conftest*
2260
2261
2262 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2263 if test "$ac_test_CFLAGS" = set; then
2264   CFLAGS="$ac_save_CFLAGS"
2265 elif test $ac_cv_prog_cc_g = yes; then
2266   if test "$GCC" = yes; then
2267     CFLAGS="-g -O2"
2268   else
2269     CFLAGS="-g"
2270   fi
2271 else
2272   if test "$GCC" = yes; then
2273     CFLAGS="-O2"
2274   else
2275     CFLAGS=
2276   fi
2277 fi
2278
2279 fi
2280 CFLAGS="$xe_save_CFLAGS"
2281
2282
2283 test -n "$CPP" -a -d "$CPP" && CPP=
2284
2285 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2286
2287 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2288 echo "configure:2289: checking how to run the C preprocessor" >&5
2289 # On Suns, sometimes $CPP names a directory.
2290 if test -n "$CPP" && test -d "$CPP"; then
2291   CPP=
2292 fi
2293 if test -z "$CPP"; then
2294
2295   # This must be in double quotes, not single quotes, because CPP may get
2296   # substituted into the Makefile and "${CC-cc}" will confuse make.
2297   CPP="${CC-cc} -E"
2298   # On the NeXT, cc -E runs the code through the compiler's parser,
2299   # not just through cpp.
2300   cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 #include <assert.h>
2304 Syntax Error
2305 EOF
2306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2307 { (eval echo configure:2308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2309 if test -z "$ac_err"; then
2310   :
2311 else
2312   echo "$ac_err" >&5
2313   echo "configure: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   rm -rf conftest*
2316   CPP="${CC-cc} -E -traditional-cpp"
2317   cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #include <assert.h>
2321 Syntax Error
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   :
2328 else
2329   echo "$ac_err" >&5
2330   echo "configure: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   rm -rf conftest*
2333   CPP="${CC-cc} -nologo -E"
2334   cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include <assert.h>
2338 Syntax Error
2339 EOF
2340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2341 { (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2343 if test -z "$ac_err"; then
2344   :
2345 else
2346   echo "$ac_err" >&5
2347   echo "configure: failed program was:" >&5
2348   cat conftest.$ac_ext >&5
2349   rm -rf conftest*
2350   CPP=/lib/cpp
2351 fi
2352 rm -f conftest*
2353 fi
2354 rm -f conftest*
2355 fi
2356 rm -f conftest*
2357   ac_cv_prog_CPP="$CPP"
2358   CPP="$ac_cv_prog_CPP"
2359 else
2360   ac_cv_prog_CPP="$CPP"
2361 fi
2362 echo "$ac_t""$CPP" 1>&6
2363
2364
2365
2366 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2367 echo "configure:2368: checking for AIX" >&5
2368 cat > conftest.$ac_ext <<EOF
2369 #line 2370 "configure"
2370 #include "confdefs.h"
2371 #ifdef _AIX
2372   yes
2373 #endif
2374
2375 EOF
2376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2377   egrep "yes" >/dev/null 2>&1; then
2378   rm -rf conftest*
2379   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2380     Defining _ALL_SOURCE
2381 EOF
2382 cat >> confdefs.h <<\EOF
2383 #define _ALL_SOURCE 1
2384 EOF
2385 }
2386
2387 else
2388   rm -rf conftest*
2389   echo "$ac_t""no" 1>&6
2390 fi
2391 rm -f conftest*
2392
2393  
2394
2395 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2396 echo "configure:2397: checking for GNU libc" >&5
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 #include <features.h>
2401 int main() {
2402
2403 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2404 #error Not a GNU libc system :-(
2405 ******* ======= ******** &&&&&&&&
2406 #endif
2407
2408 ; return 0; }
2409 EOF
2410 if { (eval echo configure:2411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2411   rm -rf conftest*
2412   have_glibc=yes
2413 else
2414   echo "configure: failed program was:" >&5
2415   cat conftest.$ac_ext >&5
2416   rm -rf conftest*
2417   have_glibc=no
2418 fi
2419 rm -f conftest*
2420 echo "$ac_t""$have_glibc" 1>&6
2421 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2422     Defining _GNU_SOURCE
2423 EOF
2424 cat >> confdefs.h <<\EOF
2425 #define _GNU_SOURCE 1
2426 EOF
2427 }
2428
2429
2430 case "$opsys" in
2431   sol2)
2432    { test "$extra_verbose" = "yes" && cat << \EOF
2433     Defining __EXTENSIONS__
2434 EOF
2435 cat >> confdefs.h <<\EOF
2436 #define __EXTENSIONS__ 1
2437 EOF
2438 }
2439
2440       if test "$os_release" -ge 55; then
2441      { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _XOPEN_SOURCE = 500
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _XOPEN_SOURCE 500
2446 EOF
2447 }
2448
2449      { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE_EXTENDED
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE_EXTENDED 1
2454 EOF
2455 }
2456
2457    fi ;;
2458   linux)
2459     { test "$extra_verbose" = "yes" && cat << \EOF
2460     Defining _POSIX_C_SOURCE = 199506L
2461 EOF
2462 cat >> confdefs.h <<\EOF
2463 #define _POSIX_C_SOURCE 199506L
2464 EOF
2465 }
2466
2467     { test "$extra_verbose" = "yes" && cat << \EOF
2468     Defining _XOPEN_SOURCE = 500
2469 EOF
2470 cat >> confdefs.h <<\EOF
2471 #define _XOPEN_SOURCE 500
2472 EOF
2473 }
2474
2475     { test "$extra_verbose" = "yes" && cat << \EOF
2476     Defining _XOPEN_SOURCE_EXTENDED
2477 EOF
2478 cat >> confdefs.h <<\EOF
2479 #define _XOPEN_SOURCE_EXTENDED 1
2480 EOF
2481 }
2482
2483     ;;
2484 esac
2485
2486 cat > conftest.$ac_ext <<EOF
2487 #line 2488 "configure"
2488 #include "confdefs.h"
2489 int main () {
2490 #if defined __SUNPRO_C
2491 return 11;
2492 #elif defined __DECC
2493 return 12;
2494 #elif defined __USLC__ && defined __SCO_VERSION__
2495 return 13;
2496 #else
2497 return 0;
2498 #endif
2499 }
2500 EOF
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2502 then
2503   :
2504 else
2505   conftest_rc="$?"
2506   echo "configure: failed program was:" >&5
2507   cat conftest.$ac_ext >&5
2508   rm -fr conftest*
2509   case "$conftest_rc" in
2510   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2511   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2512   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2513 esac
2514 fi
2515 rm -fr conftest*
2516
2517
2518
2519
2520 echo "Extracting information from the machine- and system-dependent headers..."
2521
2522 tempcname="conftest.c"
2523
2524
2525
2526 cat > $tempcname < confdefs.h
2527 cat >> $tempcname <<EOF
2528 #define NOT_C_CODE
2529 #define C_SWITCH_SITE
2530 #define C_SWITCH_X_SITE
2531 #define LD_SWITCH_SITE
2532 #define LD_SWITCH_X_SITE
2533 #define LD_SWITCH_X_SITE_AUX
2534 #define OS_RELEASE $os_release
2535
2536 #ifdef config_opsysfile
2537 #include "$srcdir/src/$opsysfile"
2538 #endif
2539
2540 #ifdef config_machfile
2541 #include "$srcdir/src/$machfile"
2542 #endif
2543
2544 #ifndef LIBS_MACHINE
2545 #define LIBS_MACHINE
2546 #endif
2547 configure___ libs_machine=LIBS_MACHINE
2548
2549 #ifndef LIBS_SYSTEM
2550 #define LIBS_SYSTEM
2551 #endif
2552 configure___ libs_system=LIBS_SYSTEM
2553
2554 #ifndef LIBS_TERMCAP
2555 #define LIBS_TERMCAP
2556 #endif
2557 configure___ libs_termcap=LIBS_TERMCAP
2558
2559 #ifndef LIB_STANDARD
2560 #define LIB_STANDARD
2561 #endif
2562 configure___ libs_standard=LIB_STANDARD
2563
2564
2565 #ifndef OBJECTS_MACHINE
2566 #define OBJECTS_MACHINE
2567 #endif
2568 configure___ objects_machine=OBJECTS_MACHINE
2569
2570 #ifndef OBJECTS_SYSTEM
2571 #define OBJECTS_SYSTEM
2572 #endif
2573 configure___ objects_system=OBJECTS_SYSTEM
2574
2575
2576 #ifndef C_SWITCH_MACHINE
2577 #define C_SWITCH_MACHINE
2578 #endif
2579 configure___ c_switch_machine=C_SWITCH_MACHINE
2580
2581 #ifndef C_SWITCH_SYSTEM
2582 #define C_SWITCH_SYSTEM
2583 #endif
2584 configure___ c_switch_system=C_SWITCH_SYSTEM
2585
2586
2587 #ifndef LD_SWITCH_MACHINE
2588 #define LD_SWITCH_MACHINE
2589 #endif
2590 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2591
2592 #ifndef LD_SWITCH_SYSTEM
2593 #define LD_SWITCH_SYSTEM
2594 #endif
2595 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2596
2597
2598 #ifndef UNEXEC
2599 #define UNEXEC "unexec.o"
2600 #endif
2601 configure___ unexec=UNEXEC
2602
2603
2604 #ifndef LD_SWITCH_SHARED
2605 #define LD_SWITCH_SHARED "-c"
2606 #endif
2607 configure___ ld_switch_shared=LD_SWITCH_SHARED
2608
2609
2610 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2611 configure___ ordinary_ld=ORDINARY_LD
2612
2613 #ifdef ORDINARY_LINK
2614 #define LD ORDINARY_LD
2615 #else /* no ORDINARY LINK */
2616 #ifdef COFF_ENCAPSULATE
2617 #define LD "\$(CC) -nostdlib"
2618 #else /* not COFF_ENCAPSULATE */
2619 #ifdef LINKER
2620 #define LD LINKER
2621 #else /* ! defined (LINKER) */
2622 #define LD "ld"
2623 #endif /* ! defined (LINKER) */
2624 #endif /* ! defined (COFF_ENCAPSULATE) */
2625 #endif /* not ORDINARY_LINK */
2626 configure___ ld=LD
2627
2628 #ifndef LIB_GCC
2629 #define LIB_GCC
2630 #endif
2631 configure___ lib_gcc=LIB_GCC
2632
2633 #ifndef LD_TEXT_START_ADDR
2634 #define LD_TEXT_START_ADDR
2635 #endif
2636 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2637
2638
2639 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2640 #ifdef NO_REMAP
2641 #ifdef COFF_ENCAPSULATE
2642 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2643 #else /* ! defined (COFF_ENCAPSULATE) */
2644 #define START_FILES "pre-crt0.o /lib/crt0.o"
2645 #endif /* ! defined (COFF_ENCAPSULATE) */
2646 #else /* ! defined (NO_REMAP) */
2647 #define START_FILES "ecrt0.o"
2648 #endif /* ! defined (NO_REMAP) */
2649 #endif /* no ORDINARY_LINK */
2650 #ifndef START_FILES
2651 #define START_FILES
2652 #endif
2653 configure___ start_files=START_FILES
2654
2655 #ifdef ORDINARY_LINK
2656 configure___ ordinary_link=yes
2657 #else
2658 configure___ ordinary_link=no
2659 #endif
2660
2661 #ifdef SYSTEM_MALLOC
2662 configure___ system_malloc=yes
2663 #else
2664 configure___ system_malloc=no
2665 #endif
2666
2667 #ifdef TERMINFO
2668 configure___ have_terminfo=yes
2669 #else
2670 configure___ have_terminfo=no
2671 #endif
2672
2673 #ifdef MAIL_USE_FLOCK
2674 configure___ mail_use_flock=yes
2675 #else
2676 configure___ mail_use_flock=no
2677 #endif
2678
2679 #ifdef MAIL_USE_LOCKF
2680 configure___ mail_use_lockf=yes
2681 #else
2682 configure___ mail_use_lockf=no
2683 #endif
2684
2685 #ifdef MAIL_USE_LOCKING
2686 configure___ mail_use_locking=yes
2687 #else
2688 configure___ mail_use_locking=no
2689 #endif
2690
2691 #ifdef HAVE_WIN32_PROCESSES
2692 configure___ win32_processes=yes
2693 #else
2694 configure___ win32_processes=no
2695 #endif
2696
2697 EOF
2698
2699 CPP=`eval "echo $CPP $CPPFLAGS"`
2700 eval `$CPP -Isrc $tempcname \
2701         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2702
2703 rm $tempcname
2704
2705 if test "$pdump" = "yes"; then
2706   ordinary_link="yes"
2707   ld="${ordinary_ld}"
2708   start_files=
2709   libs_standard=
2710   unexec=
2711   lib_gcc=
2712 fi
2713
2714 test "$extra_verbose" = "yes" && \
2715   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 ""
2716
2717 case "$opsys" in mingw* | cygwin*)
2718   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2719   cygwin_include=`eval "dirname $cygwin_include"` ;
2720   cygwin_include="-I$cygwin_include/../include" ;
2721   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2722   case "$opsys" in mingw*)
2723     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2724   esac
2725   ;;
2726 esac
2727
2728 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2729
2730
2731 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2732
2733 if test "$__USLC__" = yes; then
2734   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2735 echo "configure:2736: checking for whether the -Kalloca compiler flag is needed" >&5
2736   need_kalloca=no
2737   cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740
2741 int main() {
2742 void *x = alloca(4);
2743 ; return 0; }
2744 EOF
2745 if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2746   rm -rf conftest*
2747   :
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   rm -rf conftest*
2752   
2753     xe_save_c_switch_system="$c_switch_system"
2754     c_switch_system="$c_switch_system -Kalloca"
2755     cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758
2759 int main() {
2760 void *x = alloca(4);
2761 ; return 0; }
2762 EOF
2763 if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2764   rm -rf conftest*
2765    need_kalloca=yes 
2766 else
2767   echo "configure: failed program was:" >&5
2768   cat conftest.$ac_ext >&5
2769 fi
2770 rm -f conftest*
2771     c_switch_system="$xe_save_c_switch_system"
2772 fi
2773 rm -f conftest*
2774   echo "$ac_t""$need_kalloca" 1>&6
2775   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
2776 fi
2777
2778 if test "$cflags_specified" = "no"; then
2779       if   test "$GCC" = "yes"; then
2780     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2781         CFLAGS="$CFLAGS -Wsign-compare"
2782                 if test "$xemacs_compiler" != "g++"; then
2783       CFLAGS="$CFLAGS -Wshadow"
2784     fi
2785             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2786               elif test "$__SUNPRO_C" = "yes"; then
2787     case "$opsys" in
2788       sol2    ) CFLAGS="-v -xO4" ;;
2789       sunos4* ) CFLAGS="-xO2";;
2790     esac
2791   elif test "$__DECC" = "yes"; then
2792     CFLAGS="-O3"
2793   elif test "$CC" = "xlc"; then
2794     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2795     else
2796     CFLAGS="-O" ;  fi
2797 fi
2798
2799 if test "$GCC" = "yes"; then
2800 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2801 echo "configure:2802: checking for buggy gcc versions" >&5
2802 GCC_VERSION=`$CC --version`
2803 case `uname -s`:`uname -m`:$GCC_VERSION in
2804                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2805                         case "$CFLAGS" in
2806             *-O2*|*-O3*)
2807                 case "$CFLAGS" in
2808                     *-fno-schedule-insns*) ;;
2809                     *)
2810                         echo "$ac_t""yes" 1>&6
2811                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2812                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2813                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2814                         ;;
2815                 esac
2816                 ;;
2817         esac
2818         ;;
2819                     Linux:alpha:egcs-2.91.*)
2820         echo "$ac_t""yes" 1>&6
2821         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2822         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2823         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2824         ;;
2825     *:i*86*:2.7.2*)
2826         case "$CFLAGS" in
2827             *-O2*|*-O3*)
2828                 case "$GCC_VERSION" in
2829                     2.7.2)
2830                         case "$CFLAGS" in
2831                             *-fno-strength-reduce*) ;;
2832                             *)
2833                                 echo "$ac_t""yes" 1>&6
2834                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2835                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2836                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2837                                 ;;
2838                         esac
2839                         ;;
2840                 esac
2841                 case "$CFLAGS" in
2842                  *-fno-caller-saves*) ;;
2843                  *)
2844                     echo "$ac_t""yes" 1>&6
2845                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2846                     echo "configure: warning: -fno-caller-saves." 1>&2
2847                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2848                     ;;
2849                 esac
2850                 ;;
2851         esac
2852         ;;
2853 esac
2854 echo "$ac_t""no" 1>&6
2855 fi
2856
2857 if test "$pdump" != "yes"; then
2858   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2859 echo "configure:2860: checking for \"-z nocombreloc\" linker flag" >&5
2860   case "`ld --help 2>&1`" in
2861     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2862       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2863     *) echo "$ac_t""no" 1>&6 ;;
2864   esac
2865 fi
2866
2867
2868
2869 if test "$GCC" = "yes"; then
2870   set x $ld_switch_system; shift; ld_switch_system=""
2871   while test -n "$1"; do
2872     case $1 in
2873       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2874       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2875       -Xlinker* ) ;;
2876       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2877     esac
2878     shift
2879   done
2880 fi
2881
2882 if test "$GCC" = "yes"; then
2883   set x $ld_switch_machine; shift; ld_switch_machine=""
2884   while test -n "$1"; do
2885     case $1 in
2886       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2887       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2888       -Xlinker* ) ;;
2889       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2890     esac
2891     shift
2892   done
2893 fi
2894
2895 if test "$GCC" = "yes"; then
2896   set x $ld_switch_site; shift; ld_switch_site=""
2897   while test -n "$1"; do
2898     case $1 in
2899       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2900       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2901       -Xlinker* ) ;;
2902       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2903     esac
2904     shift
2905   done
2906 fi
2907
2908 if test "$GCC" = "yes"; then
2909   set x $LDFLAGS; shift; LDFLAGS=""
2910   while test -n "$1"; do
2911     case $1 in
2912       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2913       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2914       -Xlinker* ) ;;
2915       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2916     esac
2917     shift
2918   done
2919 fi
2920
2921 if test "$GCC" = "yes"; then
2922   set x $ld_call_shared; shift; ld_call_shared=""
2923   while test -n "$1"; do
2924     case $1 in
2925       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2926       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2927       -Xlinker* ) ;;
2928       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2929     esac
2930     shift
2931   done
2932 fi
2933
2934 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2935    echo "    xemacs will be linked with \"$objects_machine\""
2936  fi
2937 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2938    echo "    xemacs will be linked with \"$objects_system\""
2939  fi
2940 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2941    echo "    xemacs will be linked with \"$unexec\""
2942  fi
2943 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2944    echo "    xemacs will be linked with \"dumper.o\""
2945  fi
2946
2947 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2948 echo "configure:2949: checking for dynodump" >&5
2949 if test "$unexec" != "unexsol2.o"; then
2950   echo "$ac_t""no" 1>&6
2951 else
2952   echo "$ac_t""yes" 1>&6
2953   { test "$extra_verbose" = "yes" && cat << \EOF
2954     Defining DYNODUMP
2955 EOF
2956 cat >> confdefs.h <<\EOF
2957 #define DYNODUMP 1
2958 EOF
2959 }
2960
2961   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2962   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2963   case "$machine" in
2964     sparc   ) dynodump_arch=sparc ;;
2965     *86*    ) dynodump_arch=i386  ;;
2966     powerpc ) dynodump_arch=ppc   ;;
2967   esac
2968     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
2969 fi
2970
2971
2972 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2973
2974 if test "$unexec" = "unexaix.o"; then
2975   if   test "$dynamic" = "no"; then
2976   start_flags="-Wl,-bnso,-bnodelcsect"
2977   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2978   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2979     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2980   done
2981   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2982     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2983   done
2984   
2985 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2986 echo "configure:2987: checking for terminateAndUnload in -lC" >&5
2987 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2988
2989 xe_check_libs=" -lC "
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 /* Override any gcc2 internal prototype to avoid an error.  */
2994 /* We use char because int might match the return type of a gcc2
2995     builtin and then its argument prototype would still apply.  */
2996 char terminateAndUnload();
2997
2998 int main() {
2999 terminateAndUnload()
3000 ; return 0; }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3003   rm -rf conftest*
3004   eval "ac_cv_lib_$ac_lib_var=yes"
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -rf conftest*
3009   eval "ac_cv_lib_$ac_lib_var=no"
3010 fi
3011 rm -f conftest*
3012 xe_check_libs=""
3013
3014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3015   echo "$ac_t""yes" 1>&6
3016   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3017 else
3018   echo "$ac_t""no" 1>&6
3019 fi
3020
3021
3022   fi
3023 elif test -n "$ld_text_start_addr"; then
3024   start_flags="-T $ld_text_start_addr -e __start"
3025 fi
3026
3027
3028
3029
3030 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3031  test -z "$linker" &&  linker='$(CC) -nostdlib'
3032  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3033 fi
3034 test "$GCC" != "yes" && lib_gcc=
3035
3036
3037
3038
3039
3040 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3041 if test -n "$site_libraries"; then
3042   for arg in $site_libraries; do
3043     case "$arg" in
3044      -* ) ;;
3045      * ) test -d "$arg" || \
3046            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3047        arg="-L${arg}" ;;
3048     esac
3049     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3050   done
3051 fi
3052
3053 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3054 if test -n "$site_includes"; then
3055   for arg in $site_includes; do
3056     case "$arg" in
3057       -* ) ;;
3058       * ) test -d "$arg" || \
3059            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3060       arg="-I${arg}" ;;
3061     esac
3062     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3063   done
3064 fi
3065
3066 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3067 if test -n "$site_prefixes"; then
3068   for dir in $site_prefixes; do
3069     lib_dir="${dir}/lib"
3070     inc_dir="${dir}/include"
3071     if test ! -d "$dir"; then
3072       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3073     elif test ! -d "$lib_dir"; then
3074       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3075     else
3076       if test -d "$inc_dir"; then
3077         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
3078       fi
3079       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
3080     fi
3081   done
3082 fi
3083
3084
3085 for dir in "/usr/ccs/lib"; do
3086   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
3087 done
3088
3089 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3090 if test -n "$site_runtime_libraries"; then
3091   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3092   export LD_RUN_PATH
3093 fi
3094
3095
3096
3097
3098
3099 if test -n "$add_runtime_path"; then :;
3100 elif test "$dynamic" = "no"; then add_runtime_path=no
3101 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3102 else case "$opsys" in
3103        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3104        * ) add_runtime_path=no ;;
3105      esac
3106 fi
3107
3108 if test "$add_runtime_path" = "yes"; then
3109       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3110 echo "configure:3111: checking "for runtime libraries flag"" >&5
3111   case "$opsys" in
3112     sol2 ) dash_r="-R" ;;
3113     decosf* | linux* | irix*) dash_r="-rpath " ;;
3114     *)
3115       dash_r=""
3116       for try_dash_r in "-R" "-R " "-rpath "; do
3117         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3118         
3119 if test "$GCC" = "yes"; then
3120   set x $xe_check_libs; shift; xe_check_libs=""
3121   while test -n "$1"; do
3122     case $1 in
3123       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3124       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3125       -Xlinker* ) ;;
3126       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3127     esac
3128     shift
3129   done
3130 fi
3131         cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134
3135 int main() {
3136
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3140   rm -rf conftest*
3141   dash_r="$try_dash_r"
3142 else
3143   echo "configure: failed program was:" >&5
3144   cat conftest.$ac_ext >&5
3145 fi
3146 rm -f conftest*
3147         xe_check_libs=""
3148         test -n "$dash_r" && break
3149       done ;;
3150   esac
3151   if test -n "$dash_r";
3152     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3153     else echo "$ac_t""NONE" 1>&6
3154   fi
3155 fi
3156
3157 xe_add_unique_runpath_dir='
3158   xe_add_p=yes
3159   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3160   done
3161   if test "$xe_add_p" = "yes"; then
3162     test -n "$runpath" && runpath="${runpath}:"
3163     runpath="${runpath}${xe_runpath_dir}"
3164     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3165   fi'
3166
3167
3168
3169
3170 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3171     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3172   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3173   
3174         runpath="" runpath_dirs=""
3175   if test -n "$LD_RUN_PATH"; then
3176     runpath="$LD_RUN_PATH"
3177   elif test "$GCC" = "yes"; then
3178         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3179     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3180     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3181     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3182       case "$arg" in P,* | -L* | -R* )
3183         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3184           {
3185 xe_runpath_dir="$dir"
3186   test "$xe_runpath_dir" != "/lib"     -a \
3187         "$xe_runpath_dir" != "/usr/lib" -a \
3188         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3189   eval "$xe_add_unique_runpath_dir"
3190 }
3191         done ;;
3192       esac
3193     done
3194     ld_switch_run="$ld_switch_run_save"
3195     rm -f conftest*
3196   else
3197         for arg in $ld_switch_site $ld_switch_x_site; do
3198       case "$arg" in -L*) {
3199 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3200   test "$xe_runpath_dir" != "/lib"     -a \
3201         "$xe_runpath_dir" != "/usr/lib" -a \
3202         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3203   eval "$xe_add_unique_runpath_dir"
3204 };; esac
3205     done
3206         if test "$opsys $need_motif" = "sol2 yes"; then
3207       xe_runpath_dir="/opt/SUNWdt/lib";
3208       eval "$xe_add_unique_runpath_dir";
3209     fi
3210   fi 
3211   if test -n "$runpath"; then
3212     ld_switch_run="${dash_r}${runpath}"
3213     
3214 if test "$GCC" = "yes"; then
3215   set x $ld_switch_run; shift; ld_switch_run=""
3216   while test -n "$1"; do
3217     case $1 in
3218       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3219       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3220       -Xlinker* ) ;;
3221       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3222     esac
3223     shift
3224   done
3225 fi
3226     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3227   fi
3228 fi
3229
3230
3231
3232 GNU_MALLOC=yes
3233 if test "$with_dlmalloc" != "no"; then
3234         doug_lea_malloc=yes
3235 else
3236         doug_lea_malloc=no
3237 fi
3238 after_morecore_hook_exists=yes
3239 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3240 echo "configure:3241: checking for malloc_set_state" >&5
3241
3242 cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245 /* System header to define __stub macros and hopefully few prototypes,
3246     which can conflict with char malloc_set_state(); below.  */
3247 #include <assert.h>
3248 /* Override any gcc2 internal prototype to avoid an error.  */
3249 /* We use char because int might match the return type of a gcc2
3250     builtin and then its argument prototype would still apply.  */
3251 char malloc_set_state();
3252
3253 int main() {
3254
3255 /* The GNU C library defines this for functions which it implements
3256     to always fail with ENOSYS.  Some functions are actually named
3257     something starting with __ and the normal name is an alias.  */
3258 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3259 choke me
3260 #else
3261 malloc_set_state();
3262 #endif
3263
3264 ; return 0; }
3265 EOF
3266 if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3267   rm -rf conftest*
3268   eval "ac_cv_func_malloc_set_state=yes"
3269 else
3270   echo "configure: failed program was:" >&5
3271   cat conftest.$ac_ext >&5
3272   rm -rf conftest*
3273   eval "ac_cv_func_malloc_set_state=no"
3274 fi
3275 rm -f conftest*
3276
3277 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3278   echo "$ac_t""yes" 1>&6
3279   :
3280 else
3281   echo "$ac_t""no" 1>&6
3282 doug_lea_malloc=no
3283 fi
3284
3285 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3286 echo "configure:3287: checking whether __after_morecore_hook exists" >&5
3287 cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 extern void (* __after_morecore_hook)();
3291 int main() {
3292 __after_morecore_hook = 0
3293 ; return 0; }
3294 EOF
3295 if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3296   rm -rf conftest*
3297   echo "$ac_t""yes" 1>&6
3298 else
3299   echo "configure: failed program was:" >&5
3300   cat conftest.$ac_ext >&5
3301   rm -rf conftest*
3302   echo "$ac_t""no" 1>&6
3303    after_morecore_hook_exists=no
3304 fi
3305 rm -f conftest*
3306 if test "$system_malloc" = "yes" ; then
3307   GNU_MALLOC=no
3308   GNU_MALLOC_reason="
3309     - The GNU allocators don't work with this system configuration."
3310 elif test "$with_system_malloc" = "yes" ; then
3311   GNU_MALLOC=no
3312   GNU_MALLOC_reason="
3313     - User chose not to use GNU allocators."
3314 elif test "$with_debug_malloc" = "yes" ; then
3315   GNU_MALLOC=no
3316   GNU_MALLOC_reason="
3317     - User chose to use Debugging Malloc."
3318 fi
3319
3320 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3321   GNU_MALLOC_reason="
3322     - Using Doug Lea's new malloc from the GNU C Library."
3323   { test "$extra_verbose" = "yes" && cat << \EOF
3324     Defining DOUG_LEA_MALLOC
3325 EOF
3326 cat >> confdefs.h <<\EOF
3327 #define DOUG_LEA_MALLOC 1
3328 EOF
3329 }
3330
3331   if test "$after_morecore_hook_exists" = "no" ; then
3332     GNU_MALLOC_reason="
3333     - Using Doug Lea's new malloc from the Linux C Library."
3334     { test "$extra_verbose" = "yes" && cat << \EOF
3335     Defining _NO_MALLOC_WARNING_
3336 EOF
3337 cat >> confdefs.h <<\EOF
3338 #define _NO_MALLOC_WARNING_ 1
3339 EOF
3340 }
3341
3342   fi
3343 fi
3344
3345
3346
3347
3348 # Extract the first word of "ranlib", so it can be a program name with args.
3349 set dummy ranlib; ac_word=$2
3350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3351 echo "configure:3352: checking for $ac_word" >&5
3352
3353 if test -n "$RANLIB"; then
3354   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3355 else
3356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3357   ac_dummy="$PATH"
3358   for ac_dir in $ac_dummy; do
3359     test -z "$ac_dir" && ac_dir=.
3360     if test -f $ac_dir/$ac_word; then
3361       ac_cv_prog_RANLIB="ranlib"
3362       break
3363     fi
3364   done
3365   IFS="$ac_save_ifs"
3366   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3367 fi
3368 RANLIB="$ac_cv_prog_RANLIB"
3369 if test -n "$RANLIB"; then
3370   echo "$ac_t""$RANLIB" 1>&6
3371 else
3372   echo "$ac_t""no" 1>&6
3373 fi
3374
3375 ac_aux_dir=
3376 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3377   if test -f $ac_dir/install-sh; then
3378     ac_aux_dir=$ac_dir
3379     ac_install_sh="$ac_aux_dir/install-sh -c"
3380     break
3381   elif test -f $ac_dir/install.sh; then
3382     ac_aux_dir=$ac_dir
3383     ac_install_sh="$ac_aux_dir/install.sh -c"
3384     break
3385   fi
3386 done
3387 if test -z "$ac_aux_dir"; then
3388   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3389 fi
3390 ac_config_guess=$ac_aux_dir/config.guess
3391 ac_config_sub=$ac_aux_dir/config.sub
3392 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3393
3394 # Find a good install program.  We prefer a C program (faster),
3395 # so one script is as good as another.  But avoid the broken or
3396 # incompatible versions:
3397 # SysV /etc/install, /usr/sbin/install
3398 # SunOS /usr/etc/install
3399 # IRIX /sbin/install
3400 # AIX /bin/install
3401 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3402 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3403 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3404 # ./install, which can be erroneously created by make from ./install.sh.
3405 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3406 echo "configure:3407: checking for a BSD compatible install" >&5
3407 if test -z "$INSTALL"; then
3408
3409   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3410   for ac_dir in $PATH; do
3411     # Account for people who put trailing slashes in PATH elements.
3412     case "$ac_dir/" in
3413     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3414     *)
3415       # OSF1 and SCO ODT 3.0 have their own names for install.
3416       # Don't use installbsd from OSF since it installs stuff as root
3417       # by default.
3418       for ac_prog in ginstall scoinst install; do
3419         if test -f $ac_dir/$ac_prog; then
3420           if test $ac_prog = install &&
3421             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3422             # AIX install.  It has an incompatible calling convention.
3423             :
3424           else
3425             ac_cv_path_install="$ac_dir/$ac_prog -c"
3426             break 2
3427           fi
3428         fi
3429       done
3430       ;;
3431     esac
3432   done
3433   IFS="$ac_save_IFS"
3434
3435   if test "${ac_cv_path_install+set}" = set; then
3436     INSTALL="$ac_cv_path_install"
3437   else
3438     # As a last resort, use the slow shell script.  We don't cache a
3439     # path for INSTALL within a source directory, because that will
3440     # break other packages using the cache if that directory is
3441     # removed, or if the path is relative.
3442     INSTALL="$ac_install_sh"
3443   fi
3444 fi
3445 echo "$ac_t""$INSTALL" 1>&6
3446
3447 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3448 # It thinks the first close brace ends the variable substitution.
3449 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3450
3451 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3452
3453 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3454
3455 for ac_prog in 'bison -y' byacc
3456 do
3457 # Extract the first word of "$ac_prog", so it can be a program name with args.
3458 set dummy $ac_prog; ac_word=$2
3459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $ac_word" >&5
3461
3462 if test -n "$YACC"; then
3463   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3464 else
3465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3466   ac_dummy="$PATH"
3467   for ac_dir in $ac_dummy; do
3468     test -z "$ac_dir" && ac_dir=.
3469     if test -f $ac_dir/$ac_word; then
3470       ac_cv_prog_YACC="$ac_prog"
3471       break
3472     fi
3473   done
3474   IFS="$ac_save_ifs"
3475 fi
3476 YACC="$ac_cv_prog_YACC"
3477 if test -n "$YACC"; then
3478   echo "$ac_t""$YACC" 1>&6
3479 else
3480   echo "$ac_t""no" 1>&6
3481 fi
3482
3483 test -n "$YACC" && break
3484 done
3485 test -n "$YACC" || YACC="yacc"
3486
3487
3488 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 
3489 do
3490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3492 echo "configure:3493: checking for $ac_hdr" >&5
3493
3494 cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <$ac_hdr>
3498 EOF
3499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3500 { (eval echo configure:3501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3502 if test -z "$ac_err"; then
3503   rm -rf conftest*
3504   eval "ac_cv_header_$ac_safe=yes"
3505 else
3506   echo "$ac_err" >&5
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   rm -rf conftest*
3510   eval "ac_cv_header_$ac_safe=no"
3511 fi
3512 rm -f conftest*
3513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3514   echo "$ac_t""yes" 1>&6
3515     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3516   { test "$extra_verbose" = "yes" && cat << EOF
3517     Defining $ac_tr_hdr
3518 EOF
3519 cat >> confdefs.h <<EOF
3520 #define $ac_tr_hdr 1
3521 EOF
3522 }
3523  
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527 done
3528
3529 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3530 echo "configure:3531: checking for sys/wait.h that is POSIX.1 compatible" >&5
3531
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 #include <sys/types.h>
3536 #include <sys/wait.h>
3537 #ifndef WEXITSTATUS
3538 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3539 #endif
3540 #ifndef WIFEXITED
3541 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3542 #endif
3543 int main() {
3544 int s;
3545 wait (&s);
3546 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3550   rm -rf conftest*
3551   ac_cv_header_sys_wait_h=yes
3552 else
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   ac_cv_header_sys_wait_h=no
3557 fi
3558 rm -f conftest*
3559
3560 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3561 if test $ac_cv_header_sys_wait_h = yes; then
3562   { test "$extra_verbose" = "yes" && cat << \EOF
3563     Defining HAVE_SYS_WAIT_H
3564 EOF
3565 cat >> confdefs.h <<\EOF
3566 #define HAVE_SYS_WAIT_H 1
3567 EOF
3568 }
3569
3570 fi
3571
3572 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3573 echo "configure:3574: checking for ANSI C header files" >&5
3574
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #include <stdlib.h>
3579 #include <stdarg.h>
3580 #include <string.h>
3581 #include <float.h>
3582 EOF
3583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3584 { (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3586 if test -z "$ac_err"; then
3587   rm -rf conftest*
3588   ac_cv_header_stdc=yes
3589 else
3590   echo "$ac_err" >&5
3591   echo "configure: failed program was:" >&5
3592   cat conftest.$ac_ext >&5
3593   rm -rf conftest*
3594   ac_cv_header_stdc=no
3595 fi
3596 rm -f conftest*
3597
3598 if test $ac_cv_header_stdc = yes; then
3599   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #include <string.h>
3604 EOF
3605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3606   egrep "memchr" >/dev/null 2>&1; then
3607   :
3608 else
3609   rm -rf conftest*
3610   ac_cv_header_stdc=no
3611 fi
3612 rm -f conftest*
3613
3614 fi
3615
3616 if test $ac_cv_header_stdc = yes; then
3617   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3618 cat > conftest.$ac_ext <<EOF
3619 #line 3620 "configure"
3620 #include "confdefs.h"
3621 #include <stdlib.h>
3622 EOF
3623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3624   egrep "free" >/dev/null 2>&1; then
3625   :
3626 else
3627   rm -rf conftest*
3628   ac_cv_header_stdc=no
3629 fi
3630 rm -f conftest*
3631
3632 fi
3633
3634 if test $ac_cv_header_stdc = yes; then
3635   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3636 cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <ctype.h>
3640 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3641 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3642 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3643 int main () { int i; for (i = 0; i < 256; i++)
3644 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3645 exit (0); }
3646
3647 EOF
3648 if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3649 then
3650   :
3651 else
3652   conftest_rc="$?"
3653   echo "configure: failed program was:" >&5
3654   cat conftest.$ac_ext >&5
3655   rm -fr conftest*
3656   ac_cv_header_stdc=no
3657 fi
3658 rm -fr conftest*
3659 fi
3660
3661 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3662 if test $ac_cv_header_stdc = yes; then
3663   { test "$extra_verbose" = "yes" && cat << \EOF
3664     Defining STDC_HEADERS
3665 EOF
3666 cat >> confdefs.h <<\EOF
3667 #define STDC_HEADERS 1
3668 EOF
3669 }
3670
3671 fi
3672
3673 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3674 echo "configure:3675: checking whether time.h and sys/time.h may both be included" >&5
3675
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <sys/types.h>
3680 #include <sys/time.h>
3681 #include <time.h>
3682 int main() {
3683 struct tm *tp;
3684 ; return 0; }
3685 EOF
3686 if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3687   rm -rf conftest*
3688   ac_cv_header_time=yes
3689 else
3690   echo "configure: failed program was:" >&5
3691   cat conftest.$ac_ext >&5
3692   rm -rf conftest*
3693   ac_cv_header_time=no
3694 fi
3695 rm -f conftest*
3696
3697 echo "$ac_t""$ac_cv_header_time" 1>&6
3698 if test $ac_cv_header_time = yes; then
3699   { test "$extra_verbose" = "yes" && cat << \EOF
3700     Defining TIME_WITH_SYS_TIME
3701 EOF
3702 cat >> confdefs.h <<\EOF
3703 #define TIME_WITH_SYS_TIME 1
3704 EOF
3705 }
3706
3707 fi
3708
3709 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3710 echo "configure:3711: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3711
3712 cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 #include <sys/types.h>
3716 #include <signal.h>
3717 /* NetBSD declares sys_siglist in unistd.h.  */
3718 #ifdef HAVE_UNISTD_H
3719 #include <unistd.h>
3720 #endif
3721 int main() {
3722 char *msg = *(sys_siglist + 1);
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3726   rm -rf conftest*
3727   ac_cv_decl_sys_siglist=yes
3728 else
3729   echo "configure: failed program was:" >&5
3730   cat conftest.$ac_ext >&5
3731   rm -rf conftest*
3732   ac_cv_decl_sys_siglist=no
3733 fi
3734 rm -f conftest*
3735
3736 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3737 if test $ac_cv_decl_sys_siglist = yes; then
3738   { test "$extra_verbose" = "yes" && cat << \EOF
3739     Defining SYS_SIGLIST_DECLARED
3740 EOF
3741 cat >> confdefs.h <<\EOF
3742 #define SYS_SIGLIST_DECLARED 1
3743 EOF
3744 }
3745
3746 fi
3747
3748
3749
3750 echo $ac_n "checking for utime""... $ac_c" 1>&6
3751 echo "configure:3752: checking for utime" >&5
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #include <utime.h>
3757 int main() {
3758 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3759 ; return 0; }
3760 EOF
3761 if { (eval echo configure:3762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3762   rm -rf conftest*
3763   echo "$ac_t""yes" 1>&6
3764    { test "$extra_verbose" = "yes" && cat << \EOF
3765     Defining HAVE_UTIME
3766 EOF
3767 cat >> confdefs.h <<\EOF
3768 #define HAVE_UTIME 1
3769 EOF
3770 }
3771
3772 else
3773   echo "configure: failed program was:" >&5
3774   cat conftest.$ac_ext >&5
3775   rm -rf conftest*
3776   echo "$ac_t""no" 1>&6
3777       for ac_func in utimes
3778 do
3779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3780 echo "configure:3781: checking for $ac_func" >&5
3781
3782 cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 /* System header to define __stub macros and hopefully few prototypes,
3786     which can conflict with char $ac_func(); below.  */
3787 #include <assert.h>
3788 /* Override any gcc2 internal prototype to avoid an error.  */
3789 /* We use char because int might match the return type of a gcc2
3790     builtin and then its argument prototype would still apply.  */
3791 char $ac_func();
3792
3793 int main() {
3794
3795 /* The GNU C library defines this for functions which it implements
3796     to always fail with ENOSYS.  Some functions are actually named
3797     something starting with __ and the normal name is an alias.  */
3798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3799 choke me
3800 #else
3801 $ac_func();
3802 #endif
3803
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3807   rm -rf conftest*
3808   eval "ac_cv_func_$ac_func=yes"
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   eval "ac_cv_func_$ac_func=no"
3814 fi
3815 rm -f conftest*
3816
3817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3818   echo "$ac_t""yes" 1>&6
3819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3820   { test "$extra_verbose" = "yes" && cat << EOF
3821     Defining $ac_tr_func
3822 EOF
3823 cat >> confdefs.h <<EOF
3824 #define $ac_tr_func 1
3825 EOF
3826 }
3827  
3828 else
3829   echo "$ac_t""no" 1>&6
3830 fi
3831 done
3832
3833 fi
3834 rm -f conftest*
3835
3836
3837 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3838 echo "configure:3839: checking return type of signal handlers" >&5
3839
3840 cat > conftest.$ac_ext <<EOF
3841 #line 3842 "configure"
3842 #include "confdefs.h"
3843 #include <sys/types.h>
3844 #include <signal.h>
3845 #ifdef signal
3846 #undef signal
3847 #endif
3848 #ifdef __cplusplus
3849 extern "C" void (*signal (int, void (*)(int)))(int);
3850 #else
3851 void (*signal ()) ();
3852 #endif
3853
3854 int main() {
3855 int i;
3856 ; return 0; }
3857 EOF
3858 if { (eval echo configure:3859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3859   rm -rf conftest*
3860   ac_cv_type_signal=void
3861 else
3862   echo "configure: failed program was:" >&5
3863   cat conftest.$ac_ext >&5
3864   rm -rf conftest*
3865   ac_cv_type_signal=int
3866 fi
3867 rm -f conftest*
3868
3869 echo "$ac_t""$ac_cv_type_signal" 1>&6
3870 { test "$extra_verbose" = "yes" && cat << EOF
3871     Defining RETSIGTYPE = $ac_cv_type_signal
3872 EOF
3873 cat >> confdefs.h <<EOF
3874 #define RETSIGTYPE $ac_cv_type_signal
3875 EOF
3876 }
3877
3878
3879 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3880 echo "configure:3881: checking for size_t" >&5
3881
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 #include <sys/types.h>
3886 #if STDC_HEADERS
3887 #include <stdlib.h>
3888 #include <stddef.h>
3889 #endif
3890 EOF
3891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3892   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3893   rm -rf conftest*
3894   ac_cv_type_size_t=yes
3895 else
3896   rm -rf conftest*
3897   ac_cv_type_size_t=no
3898 fi
3899 rm -f conftest*
3900
3901 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3902 if test $ac_cv_type_size_t = no; then
3903   { test "$extra_verbose" = "yes" && cat << \EOF
3904     Defining size_t = unsigned
3905 EOF
3906 cat >> confdefs.h <<\EOF
3907 #define size_t unsigned
3908 EOF
3909 }
3910
3911 fi
3912
3913 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3914 echo "configure:3915: checking for pid_t" >&5
3915
3916 cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919 #include <sys/types.h>
3920 #if STDC_HEADERS
3921 #include <stdlib.h>
3922 #include <stddef.h>
3923 #endif
3924 EOF
3925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3926   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3927   rm -rf conftest*
3928   ac_cv_type_pid_t=yes
3929 else
3930   rm -rf conftest*
3931   ac_cv_type_pid_t=no
3932 fi
3933 rm -f conftest*
3934
3935 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3936 if test $ac_cv_type_pid_t = no; then
3937   { test "$extra_verbose" = "yes" && cat << \EOF
3938     Defining pid_t = int
3939 EOF
3940 cat >> confdefs.h <<\EOF
3941 #define pid_t int
3942 EOF
3943 }
3944
3945 fi
3946
3947 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3948 echo "configure:3949: checking for uid_t in sys/types.h" >&5
3949
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 #include <sys/types.h>
3954 EOF
3955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3956   egrep "uid_t" >/dev/null 2>&1; then
3957   rm -rf conftest*
3958   ac_cv_type_uid_t=yes
3959 else
3960   rm -rf conftest*
3961   ac_cv_type_uid_t=no
3962 fi
3963 rm -f conftest*
3964
3965
3966 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3967 if test $ac_cv_type_uid_t = no; then
3968   { test "$extra_verbose" = "yes" && cat << \EOF
3969     Defining uid_t = int
3970 EOF
3971 cat >> confdefs.h <<\EOF
3972 #define uid_t int
3973 EOF
3974 }
3975
3976   { test "$extra_verbose" = "yes" && cat << \EOF
3977     Defining gid_t = int
3978 EOF
3979 cat >> confdefs.h <<\EOF
3980 #define gid_t int
3981 EOF
3982 }
3983
3984 fi
3985
3986 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3987 echo "configure:3988: checking for mode_t" >&5
3988
3989 cat > conftest.$ac_ext <<EOF
3990 #line 3991 "configure"
3991 #include "confdefs.h"
3992 #include <sys/types.h>
3993 #if STDC_HEADERS
3994 #include <stdlib.h>
3995 #include <stddef.h>
3996 #endif
3997 EOF
3998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3999   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4000   rm -rf conftest*
4001   ac_cv_type_mode_t=yes
4002 else
4003   rm -rf conftest*
4004   ac_cv_type_mode_t=no
4005 fi
4006 rm -f conftest*
4007
4008 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4009 if test $ac_cv_type_mode_t = no; then
4010   { test "$extra_verbose" = "yes" && cat << \EOF
4011     Defining mode_t = int
4012 EOF
4013 cat >> confdefs.h <<\EOF
4014 #define mode_t int
4015 EOF
4016 }
4017
4018 fi
4019
4020 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4021 echo "configure:4022: checking for off_t" >&5
4022
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <sys/types.h>
4027 #if STDC_HEADERS
4028 #include <stdlib.h>
4029 #include <stddef.h>
4030 #endif
4031 EOF
4032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4033   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4034   rm -rf conftest*
4035   ac_cv_type_off_t=yes
4036 else
4037   rm -rf conftest*
4038   ac_cv_type_off_t=no
4039 fi
4040 rm -f conftest*
4041
4042 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4043 if test $ac_cv_type_off_t = no; then
4044   { test "$extra_verbose" = "yes" && cat << \EOF
4045     Defining off_t = long
4046 EOF
4047 cat >> confdefs.h <<\EOF
4048 #define off_t long
4049 EOF
4050 }
4051
4052 fi
4053
4054 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4055 echo "configure:4056: checking for ssize_t" >&5
4056
4057 cat > conftest.$ac_ext <<EOF
4058 #line 4059 "configure"
4059 #include "confdefs.h"
4060 #include <sys/types.h>
4061 #if STDC_HEADERS
4062 #include <stdlib.h>
4063 #include <stddef.h>
4064 #endif
4065 EOF
4066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4067   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4068   rm -rf conftest*
4069   ac_cv_type_ssize_t=yes
4070 else
4071   rm -rf conftest*
4072   ac_cv_type_ssize_t=no
4073 fi
4074 rm -f conftest*
4075
4076 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4077 if test $ac_cv_type_ssize_t = no; then
4078   { test "$extra_verbose" = "yes" && cat << \EOF
4079     Defining ssize_t = int
4080 EOF
4081 cat >> confdefs.h <<\EOF
4082 #define ssize_t int
4083 EOF
4084 }
4085
4086 fi
4087
4088
4089 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4090 echo "configure:4091: checking for socklen_t" >&5
4091 cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 #include <sys/types.h>
4095 #include <sys/socket.h>
4096 socklen_t x;
4097
4098 int main() {
4099
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4103   rm -rf conftest*
4104   echo "$ac_t""yes" 1>&6
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113 #include <sys/types.h>
4114 #include <sys/socket.h>
4115 int accept (int, struct sockaddr *, size_t *);
4116
4117 int main() {
4118
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   
4124 echo "$ac_t""size_t" 1>&6
4125 { test "$extra_verbose" = "yes" && cat << \EOF
4126     Defining socklen_t = size_t
4127 EOF
4128 cat >> confdefs.h <<\EOF
4129 #define socklen_t size_t
4130 EOF
4131 }
4132
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -rf conftest*
4137   
4138 echo "$ac_t""int" 1>&6
4139 { test "$extra_verbose" = "yes" && cat << \EOF
4140     Defining socklen_t = int
4141 EOF
4142 cat >> confdefs.h <<\EOF
4143 #define socklen_t int
4144 EOF
4145 }
4146
4147 fi
4148 rm -f conftest*
4149 fi
4150 rm -f conftest*
4151
4152 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4153 echo "configure:4154: checking for struct timeval" >&5
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 #ifdef TIME_WITH_SYS_TIME
4158 #include <sys/time.h>
4159 #include <time.h>
4160 #else
4161 #ifdef HAVE_SYS_TIME_H
4162 #include <sys/time.h>
4163 #else
4164 #include <time.h>
4165 #endif
4166 #endif
4167 int main() {
4168 static struct timeval x; x.tv_sec = x.tv_usec;
4169 ; return 0; }
4170 EOF
4171 if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4172   rm -rf conftest*
4173   echo "$ac_t""yes" 1>&6
4174   HAVE_TIMEVAL=yes
4175   { test "$extra_verbose" = "yes" && cat << \EOF
4176     Defining HAVE_TIMEVAL
4177 EOF
4178 cat >> confdefs.h <<\EOF
4179 #define HAVE_TIMEVAL 1
4180 EOF
4181 }
4182
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   echo "$ac_t""no" 1>&6
4188    HAVE_TIMEVAL=no
4189 fi
4190 rm -f conftest*
4191
4192 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4193 echo "configure:4194: checking whether struct tm is in sys/time.h or time.h" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <sys/types.h>
4199 #include <time.h>
4200 int main() {
4201 struct tm *tp; tp->tm_sec;
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4205   rm -rf conftest*
4206   ac_cv_struct_tm=time.h
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   ac_cv_struct_tm=sys/time.h
4212 fi
4213 rm -f conftest*
4214
4215 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4216 if test $ac_cv_struct_tm = sys/time.h; then
4217   { test "$extra_verbose" = "yes" && cat << \EOF
4218     Defining TM_IN_SYS_TIME
4219 EOF
4220 cat >> confdefs.h <<\EOF
4221 #define TM_IN_SYS_TIME 1
4222 EOF
4223 }
4224
4225 fi
4226
4227 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4228 echo "configure:4229: checking for tm_zone in struct tm" >&5
4229
4230 cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 #include <sys/types.h>
4234 #include <$ac_cv_struct_tm>
4235 int main() {
4236 struct tm tm; tm.tm_zone;
4237 ; return 0; }
4238 EOF
4239 if { (eval echo configure:4240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4240   rm -rf conftest*
4241   ac_cv_struct_tm_zone=yes
4242 else
4243   echo "configure: failed program was:" >&5
4244   cat conftest.$ac_ext >&5
4245   rm -rf conftest*
4246   ac_cv_struct_tm_zone=no
4247 fi
4248 rm -f conftest*
4249
4250 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4251 if test "$ac_cv_struct_tm_zone" = yes; then
4252   { test "$extra_verbose" = "yes" && cat << \EOF
4253     Defining HAVE_TM_ZONE
4254 EOF
4255 cat >> confdefs.h <<\EOF
4256 #define HAVE_TM_ZONE 1
4257 EOF
4258 }
4259
4260 else
4261   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4262 echo "configure:4263: checking for tzname" >&5
4263
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include <time.h>
4268 #ifndef tzname /* For SGI.  */
4269 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4270 #endif
4271 int main() {
4272 atoi(*tzname);
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276   rm -rf conftest*
4277   ac_cv_var_tzname=yes
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -rf conftest*
4282   ac_cv_var_tzname=no
4283 fi
4284 rm -f conftest*
4285
4286 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4287   if test $ac_cv_var_tzname = yes; then
4288     { test "$extra_verbose" = "yes" && cat << \EOF
4289     Defining HAVE_TZNAME
4290 EOF
4291 cat >> confdefs.h <<\EOF
4292 #define HAVE_TZNAME 1
4293 EOF
4294 }
4295
4296   fi
4297 fi
4298
4299
4300 echo $ac_n "checking for working const""... $ac_c" 1>&6
4301 echo "configure:4302: checking for working const" >&5
4302
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306
4307 int main() {
4308
4309 /* Ultrix mips cc rejects this.  */
4310 typedef int charset[2]; const charset x;
4311 /* SunOS 4.1.1 cc rejects this.  */
4312 char const *const *ccp;
4313 char **p;
4314 /* NEC SVR4.0.2 mips cc rejects this.  */
4315 struct point {int x, y;};
4316 static struct point const zero = {0,0};
4317 /* AIX XL C 1.02.0.0 rejects this.
4318    It does not let you subtract one const X* pointer from another in an arm
4319    of an if-expression whose if-part is not a constant expression */
4320 const char *g = "string";
4321 ccp = &g + (g ? g-g : 0);
4322 /* HPUX 7.0 cc rejects these. */
4323 ++ccp;
4324 p = (char**) ccp;
4325 ccp = (char const *const *) p;
4326 { /* SCO 3.2v4 cc rejects this.  */
4327   char *t;
4328   char const *s = 0 ? (char *) 0 : (char const *) 0;
4329
4330   *t++ = 0;
4331 }
4332 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4333   int x[] = {25, 17};
4334   const int *foo = &x[0];
4335   ++foo;
4336 }
4337 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4338   typedef const int *iptr;
4339   iptr p = 0;
4340   ++p;
4341 }
4342 { /* AIX XL C 1.02.0.0 rejects this saying
4343      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4344   struct s { int j; const int *ap[3]; };
4345   struct s *b; b->j = 5;
4346 }
4347 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4348   const int foo = 10;
4349 }
4350
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4354   rm -rf conftest*
4355   ac_cv_c_const=yes
4356 else
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359   rm -rf conftest*
4360   ac_cv_c_const=no
4361 fi
4362 rm -f conftest*
4363
4364 echo "$ac_t""$ac_cv_c_const" 1>&6
4365 if test $ac_cv_c_const = no; then
4366   { test "$extra_verbose" = "yes" && cat << \EOF
4367     Defining const = 
4368 EOF
4369 cat >> confdefs.h <<\EOF
4370 #define const 
4371 EOF
4372 }
4373
4374 fi
4375
4376
4377 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4378 echo "configure:4379: checking whether ${MAKE-make} sets \${MAKE}" >&5
4379 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4380
4381 cat > conftestmake <<\EOF
4382 all:
4383         @echo 'ac_maketemp="${MAKE}"'
4384 EOF
4385 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4386 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4387 if test -n "$ac_maketemp"; then
4388   eval ac_cv_prog_make_${ac_make}_set=yes
4389 else
4390   eval ac_cv_prog_make_${ac_make}_set=no
4391 fi
4392 rm -f conftestmake
4393 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395   SET_MAKE=
4396 else
4397   echo "$ac_t""no" 1>&6
4398   SET_MAKE="MAKE=${MAKE-make}"
4399 fi
4400
4401
4402 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4403 echo "configure:4404: checking whether byte ordering is bigendian" >&5
4404
4405 ac_cv_c_bigendian=unknown
4406 # See if sys/param.h defines the BYTE_ORDER macro.
4407 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410 #include <sys/types.h>
4411 #include <sys/param.h>
4412 int main() {
4413
4414 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4415  bogus endian macros
4416 #endif
4417 ; return 0; }
4418 EOF
4419 if { (eval echo configure:4420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4420   rm -rf conftest*
4421   # It does; now see whether it defined to BIG_ENDIAN or not.
4422 cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425 #include <sys/types.h>
4426 #include <sys/param.h>
4427 int main() {
4428
4429 #if BYTE_ORDER != BIG_ENDIAN
4430  not big endian
4431 #endif
4432 ; return 0; }
4433 EOF
4434 if { (eval echo configure:4435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4435   rm -rf conftest*
4436   ac_cv_c_bigendian=yes
4437 else
4438   echo "configure: failed program was:" >&5
4439   cat conftest.$ac_ext >&5
4440   rm -rf conftest*
4441   ac_cv_c_bigendian=no
4442 fi
4443 rm -f conftest*
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447 fi
4448 rm -f conftest*
4449 if test $ac_cv_c_bigendian = unknown; then
4450 cat > conftest.$ac_ext <<EOF
4451 #line 4452 "configure"
4452 #include "confdefs.h"
4453 main () {
4454   /* Are we little or big endian?  From Harbison&Steele.  */
4455   union
4456   {
4457     long l;
4458     char c[sizeof (long)];
4459   } u;
4460   u.l = 1;
4461   exit (u.c[sizeof (long) - 1] == 1);
4462 }
4463 EOF
4464 if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4465 then
4466   ac_cv_c_bigendian=no
4467 else
4468   conftest_rc="$?"
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -fr conftest*
4472   ac_cv_c_bigendian=yes
4473 fi
4474 rm -fr conftest*
4475 fi
4476
4477 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4478 if test $ac_cv_c_bigendian = yes; then
4479   { test "$extra_verbose" = "yes" && cat << \EOF
4480     Defining WORDS_BIGENDIAN
4481 EOF
4482 cat >> confdefs.h <<\EOF
4483 #define WORDS_BIGENDIAN 1
4484 EOF
4485 }
4486
4487 fi
4488
4489
4490 echo $ac_n "checking size of short""... $ac_c" 1>&6
4491 echo "configure:4492: checking size of short" >&5
4492
4493 cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496 #include <stdio.h>
4497 #include <sys/types.h>
4498 main()
4499 {
4500   FILE *f=fopen("conftestval", "w");
4501   if (!f) exit(1);
4502   fprintf(f, "%d\n", sizeof(short));
4503   exit(0);
4504 }
4505 EOF
4506 if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4507 then
4508   ac_cv_sizeof_short=`cat conftestval`
4509 else
4510   conftest_rc="$?"
4511   echo "configure: failed program was:" >&5
4512   cat conftest.$ac_ext >&5
4513   rm -fr conftest*
4514   ac_cv_sizeof_short=0
4515 fi
4516 rm -fr conftest*
4517 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4518 { test "$extra_verbose" = "yes" && cat << EOF
4519     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4520 EOF
4521 cat >> confdefs.h <<EOF
4522 #define SIZEOF_SHORT $ac_cv_sizeof_short
4523 EOF
4524 }
4525
4526
4527 if test "$ac_cv_sizeof_short" = 0; then
4528   echo ""
4529   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4530   echo "*** PANIC *** Please examine config.log for compilation errors."
4531   exit 1
4532 fi
4533 echo $ac_n "checking size of int""... $ac_c" 1>&6
4534 echo "configure:4535: checking size of int" >&5
4535
4536 cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 #include <stdio.h>
4540 #include <sys/types.h>
4541 main()
4542 {
4543   FILE *f=fopen("conftestval", "w");
4544   if (!f) exit(1);
4545   fprintf(f, "%d\n", sizeof(int));
4546   exit(0);
4547 }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4550 then
4551   ac_cv_sizeof_int=`cat conftestval`
4552 else
4553   conftest_rc="$?"
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -fr conftest*
4557   ac_cv_sizeof_int=0
4558 fi
4559 rm -fr conftest*
4560 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4561 { test "$extra_verbose" = "yes" && cat << EOF
4562     Defining SIZEOF_INT = $ac_cv_sizeof_int
4563 EOF
4564 cat >> confdefs.h <<EOF
4565 #define SIZEOF_INT $ac_cv_sizeof_int
4566 EOF
4567 }
4568
4569
4570 echo $ac_n "checking size of long""... $ac_c" 1>&6
4571 echo "configure:4572: checking size of long" >&5
4572
4573 cat > conftest.$ac_ext <<EOF
4574 #line 4575 "configure"
4575 #include "confdefs.h"
4576 #include <stdio.h>
4577 #include <sys/types.h>
4578 main()
4579 {
4580   FILE *f=fopen("conftestval", "w");
4581   if (!f) exit(1);
4582   fprintf(f, "%d\n", sizeof(long));
4583   exit(0);
4584 }
4585 EOF
4586 if { (eval echo configure:4587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4587 then
4588   ac_cv_sizeof_long=`cat conftestval`
4589 else
4590   conftest_rc="$?"
4591   echo "configure: failed program was:" >&5
4592   cat conftest.$ac_ext >&5
4593   rm -fr conftest*
4594   ac_cv_sizeof_long=0
4595 fi
4596 rm -fr conftest*
4597 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4598 { test "$extra_verbose" = "yes" && cat << EOF
4599     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4600 EOF
4601 cat >> confdefs.h <<EOF
4602 #define SIZEOF_LONG $ac_cv_sizeof_long
4603 EOF
4604 }
4605
4606
4607 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4608 echo "configure:4609: checking size of long long" >&5
4609
4610 cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 #include <stdio.h>
4614 #include <sys/types.h>
4615 main()
4616 {
4617   FILE *f=fopen("conftestval", "w");
4618   if (!f) exit(1);
4619   fprintf(f, "%d\n", sizeof(long long));
4620   exit(0);
4621 }
4622 EOF
4623 if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4624 then
4625   ac_cv_sizeof_long_long=`cat conftestval`
4626 else
4627   conftest_rc="$?"
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -fr conftest*
4631   ac_cv_sizeof_long_long=0
4632 fi
4633 rm -fr conftest*
4634 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4635 { test "$extra_verbose" = "yes" && cat << EOF
4636     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4637 EOF
4638 cat >> confdefs.h <<EOF
4639 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4640 EOF
4641 }
4642
4643
4644 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4645 echo "configure:4646: checking size of void *" >&5
4646
4647 cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <stdio.h>
4651 #include <sys/types.h>
4652 main()
4653 {
4654   FILE *f=fopen("conftestval", "w");
4655   if (!f) exit(1);
4656   fprintf(f, "%d\n", sizeof(void *));
4657   exit(0);
4658 }
4659 EOF
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4661 then
4662   ac_cv_sizeof_void_p=`cat conftestval`
4663 else
4664   conftest_rc="$?"
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -fr conftest*
4668   ac_cv_sizeof_void_p=0
4669 fi
4670 rm -fr conftest*
4671 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4672 { test "$extra_verbose" = "yes" && cat << EOF
4673     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4674 EOF
4675 cat >> confdefs.h <<EOF
4676 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4677 EOF
4678 }
4679
4680
4681
4682 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4683 echo "configure:4684: checking for long file names" >&5
4684
4685 ac_cv_sys_long_file_names=yes
4686 # Test for long file names in all the places we know might matter:
4687 #      .                the current directory, where building will happen
4688 #      $prefix/lib      where we will be installing things
4689 #      $exec_prefix/lib likewise
4690 # eval it to expand exec_prefix.
4691 #      $TMPDIR          if set, where it might want to write temporary files
4692 # if $TMPDIR is not set:
4693 #      /tmp             where it might want to write temporary files
4694 #      /var/tmp         likewise
4695 #      /usr/tmp         likewise
4696 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4697   ac_tmpdirs="$TMPDIR"
4698 else
4699   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4700 fi
4701 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4702   test -d $ac_dir || continue
4703   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4704   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4705   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4706   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4707   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4708     ac_cv_sys_long_file_names=no
4709     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4710     break
4711   fi
4712   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4713 done
4714
4715 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4716 if test $ac_cv_sys_long_file_names = yes; then
4717   { test "$extra_verbose" = "yes" && cat << \EOF
4718     Defining HAVE_LONG_FILE_NAMES
4719 EOF
4720 cat >> confdefs.h <<\EOF
4721 #define HAVE_LONG_FILE_NAMES 1
4722 EOF
4723 }
4724
4725 fi
4726
4727
4728 echo $ac_n "checking for sin""... $ac_c" 1>&6
4729 echo "configure:4730: checking for sin" >&5
4730
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 /* System header to define __stub macros and hopefully few prototypes,
4735     which can conflict with char sin(); below.  */
4736 #include <assert.h>
4737 /* Override any gcc2 internal prototype to avoid an error.  */
4738 /* We use char because int might match the return type of a gcc2
4739     builtin and then its argument prototype would still apply.  */
4740 char sin();
4741
4742 int main() {
4743
4744 /* The GNU C library defines this for functions which it implements
4745     to always fail with ENOSYS.  Some functions are actually named
4746     something starting with __ and the normal name is an alias.  */
4747 #if defined (__stub_sin) || defined (__stub___sin)
4748 choke me
4749 #else
4750 sin();
4751 #endif
4752
4753 ; return 0; }
4754 EOF
4755 if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4756   rm -rf conftest*
4757   eval "ac_cv_func_sin=yes"
4758 else
4759   echo "configure: failed program was:" >&5
4760   cat conftest.$ac_ext >&5
4761   rm -rf conftest*
4762   eval "ac_cv_func_sin=no"
4763 fi
4764 rm -f conftest*
4765
4766 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4767   echo "$ac_t""yes" 1>&6
4768   :
4769 else
4770   echo "$ac_t""no" 1>&6
4771
4772 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4773 echo "configure:4774: checking for sin in -lm" >&5
4774 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4775
4776 xe_check_libs=" -lm "
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 /* Override any gcc2 internal prototype to avoid an error.  */
4781 /* We use char because int might match the return type of a gcc2
4782     builtin and then its argument prototype would still apply.  */
4783 char sin();
4784
4785 int main() {
4786 sin()
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_lib_$ac_lib_var=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_lib_$ac_lib_var=no"
4797 fi
4798 rm -f conftest*
4799 xe_check_libs=""
4800
4801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4802   echo "$ac_t""yes" 1>&6
4803     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4804     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4805   { test "$extra_verbose" = "yes" && cat << EOF
4806     Defining $ac_tr_lib
4807 EOF
4808 cat >> confdefs.h <<EOF
4809 #define $ac_tr_lib 1
4810 EOF
4811 }
4812
4813   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4814
4815 else
4816   echo "$ac_t""no" 1>&6
4817 fi
4818
4819
4820 fi
4821
4822
4823 { test "$extra_verbose" = "yes" && cat << \EOF
4824     Defining LISP_FLOAT_TYPE
4825 EOF
4826 cat >> confdefs.h <<\EOF
4827 #define LISP_FLOAT_TYPE 1
4828 EOF
4829 }
4830
4831
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 #include <math.h>
4836 int main() {
4837 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   { test "$extra_verbose" = "yes" && cat << \EOF
4843     Defining HAVE_INVERSE_HYPERBOLIC
4844 EOF
4845 cat >> confdefs.h <<\EOF
4846 #define HAVE_INVERSE_HYPERBOLIC 1
4847 EOF
4848 }
4849
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853 fi
4854 rm -f conftest*
4855
4856 echo "checking type of mail spool file locking" 1>&6
4857 echo "configure:4858: checking type of mail spool file locking" >&5
4858 for ac_func in lockf flock
4859 do
4860 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4861 echo "configure:4862: checking for $ac_func" >&5
4862
4863 cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 /* System header to define __stub macros and hopefully few prototypes,
4867     which can conflict with char $ac_func(); below.  */
4868 #include <assert.h>
4869 /* Override any gcc2 internal prototype to avoid an error.  */
4870 /* We use char because int might match the return type of a gcc2
4871     builtin and then its argument prototype would still apply.  */
4872 char $ac_func();
4873
4874 int main() {
4875
4876 /* The GNU C library defines this for functions which it implements
4877     to always fail with ENOSYS.  Some functions are actually named
4878     something starting with __ and the normal name is an alias.  */
4879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4880 choke me
4881 #else
4882 $ac_func();
4883 #endif
4884
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   eval "ac_cv_func_$ac_func=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_func_$ac_func=no"
4895 fi
4896 rm -f conftest*
4897
4898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4899   echo "$ac_t""yes" 1>&6
4900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4901   { test "$extra_verbose" = "yes" && cat << EOF
4902     Defining $ac_tr_func
4903 EOF
4904 cat >> confdefs.h <<EOF
4905 #define $ac_tr_func 1
4906 EOF
4907 }
4908  
4909 else
4910   echo "$ac_t""no" 1>&6
4911 fi
4912 done
4913
4914 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4915 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4916 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4917 if   test -z "$mail_locking"; then
4918   case "$opsys" in cygwin* | mingw*)
4919     mail_locking=pop ;;
4920   esac
4921 fi
4922
4923 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4924     Defining MAIL_LOCK_LOCKF
4925 EOF
4926 cat >> confdefs.h <<\EOF
4927 #define MAIL_LOCK_LOCKF 1
4928 EOF
4929 }
4930
4931 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4932     Defining MAIL_LOCK_FLOCK
4933 EOF
4934 cat >> confdefs.h <<\EOF
4935 #define MAIL_LOCK_FLOCK 1
4936 EOF
4937 }
4938
4939 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4940     Defining MAIL_LOCK_LOCKING
4941 EOF
4942 cat >> confdefs.h <<\EOF
4943 #define MAIL_LOCK_LOCKING 1
4944 EOF
4945 }
4946
4947 elif test "$mail_locking" = "pop"; then
4948   with_pop=yes
4949   mail_locking=
4950 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4951     Defining MAIL_LOCK_DOT
4952 EOF
4953 cat >> confdefs.h <<\EOF
4954 #define MAIL_LOCK_DOT 1
4955 EOF
4956 }
4957
4958 fi
4959 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4960   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4961 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4962   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4963 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4964   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4965
4966 case "$opsys" in decosf*)
4967   
4968 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4969 echo "configure:4970: checking for cma_open in -lpthreads" >&5
4970 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4971
4972 xe_check_libs=" -lpthreads "
4973 cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976 /* Override any gcc2 internal prototype to avoid an error.  */
4977 /* We use char because int might match the return type of a gcc2
4978     builtin and then its argument prototype would still apply.  */
4979 char cma_open();
4980
4981 int main() {
4982 cma_open()
4983 ; return 0; }
4984 EOF
4985 if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4986   rm -rf conftest*
4987   eval "ac_cv_lib_$ac_lib_var=yes"
4988 else
4989   echo "configure: failed program was:" >&5
4990   cat conftest.$ac_ext >&5
4991   rm -rf conftest*
4992   eval "ac_cv_lib_$ac_lib_var=no"
4993 fi
4994 rm -f conftest*
4995 xe_check_libs=""
4996
4997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4998   echo "$ac_t""yes" 1>&6
4999     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5000     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5001   { test "$extra_verbose" = "yes" && cat << EOF
5002     Defining $ac_tr_lib
5003 EOF
5004 cat >> confdefs.h <<EOF
5005 #define $ac_tr_lib 1
5006 EOF
5007 }
5008
5009   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5010
5011 else
5012   echo "$ac_t""no" 1>&6
5013 fi
5014
5015
5016   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5017     c_switch_site="$c_switch_site -threads" ;;
5018 esac
5019
5020
5021 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5022 echo "configure:5023: checking whether the -xildoff compiler flag is required" >&5
5023 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5024   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5025     then echo "$ac_t""no" 1>&6;
5026     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
5027   fi
5028   else echo "$ac_t""no" 1>&6
5029 fi
5030
5031 if test "$opsys" = "sol2"; then
5032   if test "$os_release" -ge 56; then
5033     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5034 echo "configure:5035: checking for \"-z ignore\" linker flag" >&5
5035     case "`ld -h 2>&1`" in
5036       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5037         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5038       *) echo "$ac_t""no" 1>&6 ;;
5039     esac
5040   fi
5041 fi
5042
5043
5044 echo "checking "for specified window system"" 1>&6
5045 echo "configure:5046: checking "for specified window system"" >&5
5046
5047
5048 GNOME_CONFIG=no
5049 GTK_CONFIG=no
5050
5051 if test "$with_gnome" != "no"; then
5052    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5053 echo "configure:5054: checking for GNOME configuration script" >&5
5054    for possible in gnome-config
5055    do
5056       possible_version=`${possible} --version 2> /dev/null`
5057       if test "x${possible_version}" != "x"; then
5058               GNOME_CONFIG="${possible}"
5059               with_gnome=yes
5060               with_gtk=yes
5061               break
5062       fi
5063    done
5064    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5065 fi
5066
5067 if test "${GNOME_CONFIG}" != "no"; then
5068       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5069       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5070       { test "$extra_verbose" = "yes" && cat << \EOF
5071     Defining HAVE_GNOME
5072 EOF
5073 cat >> confdefs.h <<\EOF
5074 #define HAVE_GNOME 1
5075 EOF
5076 }
5077
5078       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5079       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5080 fi
5081
5082 if test "$with_gtk" != "no";then
5083    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5084 echo "configure:5085: checking for GTK configuration script" >&5
5085    for possible in gtk12-config gtk14-config gtk-config
5086    do
5087       possible_version=`${possible} --version 2> /dev/null`
5088       if test "x${possible_version}" != "x"; then
5089               GTK_CONFIG="${possible}"
5090       fi
5091       case "${possible_version}" in
5092         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5093         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5094         1.2.*)
5095                 with_gtk=yes
5096                 break
5097                 ;;
5098         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5099       esac
5100    done
5101    echo "$ac_t""${GTK_CONFIG}" 1>&6
5102 fi
5103
5104 if test "${GTK_CONFIG}" != "no"; then
5105       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5106 echo "configure:5107: checking gtk version" >&5
5107       GTK_VERSION=`${GTK_CONFIG} --version`
5108       echo "$ac_t""${GTK_VERSION}" 1>&6
5109
5110       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5111 echo "configure:5112: checking gtk libs" >&5
5112       GTK_LIBS=`${GTK_CONFIG} --libs`
5113       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5114       echo "$ac_t""${GTK_LIBS}" 1>&6
5115
5116       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5117 echo "configure:5118: checking gtk cflags" >&5
5118       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5119       if test "$GCC" = "yes"; then
5120         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5121       fi
5122       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5123       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5124
5125       
5126 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5127 echo "configure:5128: checking for main in -lgdk_imlib" >&5
5128 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5129
5130 xe_check_libs=" -lgdk_imlib "
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134
5135 int main() {
5136 main()
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140   rm -rf conftest*
5141   eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143   echo "configure: failed program was:" >&5
5144   cat conftest.$ac_ext >&5
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=no"
5147 fi
5148 rm -f conftest*
5149 xe_check_libs=""
5150
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5152   echo "$ac_t""yes" 1>&6
5153   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5154 else
5155   echo "$ac_t""no" 1>&6
5156 fi
5157
5158
5159       
5160 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5161 echo "configure:5162: checking for Imlib_init in -lImlib" >&5
5162 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5163
5164 xe_check_libs=" -lImlib "
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 /* Override any gcc2 internal prototype to avoid an error.  */
5169 /* We use char because int might match the return type of a gcc2
5170     builtin and then its argument prototype would still apply.  */
5171 char Imlib_init();
5172
5173 int main() {
5174 Imlib_init()
5175 ; return 0; }
5176 EOF
5177 if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5178   rm -rf conftest*
5179   eval "ac_cv_lib_$ac_lib_var=yes"
5180 else
5181   echo "configure: failed program was:" >&5
5182   cat conftest.$ac_ext >&5
5183   rm -rf conftest*
5184   eval "ac_cv_lib_$ac_lib_var=no"
5185 fi
5186 rm -f conftest*
5187 xe_check_libs=""
5188
5189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5190   echo "$ac_t""yes" 1>&6
5191   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5192 else
5193   echo "$ac_t""no" 1>&6
5194 fi
5195
5196
5197       for ac_func in gdk_imlib_init
5198 do
5199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5200 echo "configure:5201: checking for $ac_func" >&5
5201
5202 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 /* System header to define __stub macros and hopefully few prototypes,
5206     which can conflict with char $ac_func(); below.  */
5207 #include <assert.h>
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 /* We use char because int might match the return type of a gcc2
5210     builtin and then its argument prototype would still apply.  */
5211 char $ac_func();
5212
5213 int main() {
5214
5215 /* The GNU C library defines this for functions which it implements
5216     to always fail with ENOSYS.  Some functions are actually named
5217     something starting with __ and the normal name is an alias.  */
5218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5219 choke me
5220 #else
5221 $ac_func();
5222 #endif
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227   rm -rf conftest*
5228   eval "ac_cv_func_$ac_func=yes"
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   eval "ac_cv_func_$ac_func=no"
5234 fi
5235 rm -f conftest*
5236
5237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5238   echo "$ac_t""yes" 1>&6
5239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5240   { test "$extra_verbose" = "yes" && cat << EOF
5241     Defining $ac_tr_func
5242 EOF
5243 cat >> confdefs.h <<EOF
5244 #define $ac_tr_func 1
5245 EOF
5246 }
5247  
5248 else
5249   echo "$ac_t""no" 1>&6
5250 fi
5251 done
5252
5253
5254       { test "$extra_verbose" = "yes" && cat << \EOF
5255     Defining HAVE_XPM
5256 EOF
5257 cat >> confdefs.h <<\EOF
5258 #define HAVE_XPM 1
5259 EOF
5260 }
5261
5262       { test "$extra_verbose" = "yes" && cat << \EOF
5263     Defining HAVE_GTK
5264 EOF
5265 cat >> confdefs.h <<\EOF
5266 #define HAVE_GTK 1
5267 EOF
5268 }
5269
5270       
5271
5272       window_system=gtk
5273       with_gtk=yes
5274       with_x11=no
5275
5276       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5277       test "${with_toolbars}" != no && with_toolbars=gtk
5278       test "${with_menubars}" != "no" && with_menubars=gtk
5279       test "${with_dialogs}" != "no" && with_dialogs=gtk
5280       test "${with_widgets}" != "no" && with_widgets=gtk
5281
5282       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5283    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5284  fi
5285       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5286    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5287  fi
5288       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5289    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5290  fi
5291       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5292    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5293  fi
5294
5295             OLD_CFLAGS="${CFLAGS}"
5296       OLD_CPPFLAGS="${CPPFLAGS}"
5297       OLD_LDFLAGS="${LDFLAGS}"
5298       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5299       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5300       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5301       for ac_hdr in glade/glade.h glade.h
5302 do
5303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5305 echo "configure:5306: checking for $ac_hdr" >&5
5306
5307 cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310 #include <$ac_hdr>
5311 EOF
5312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5313 { (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5315 if test -z "$ac_err"; then
5316   rm -rf conftest*
5317   eval "ac_cv_header_$ac_safe=yes"
5318 else
5319   echo "$ac_err" >&5
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322   rm -rf conftest*
5323   eval "ac_cv_header_$ac_safe=no"
5324 fi
5325 rm -f conftest*
5326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5327   echo "$ac_t""yes" 1>&6
5328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5329   { test "$extra_verbose" = "yes" && cat << EOF
5330     Defining $ac_tr_hdr
5331 EOF
5332 cat >> confdefs.h <<EOF
5333 #define $ac_tr_hdr 1
5334 EOF
5335 }
5336  
5337 else
5338   echo "$ac_t""no" 1>&6
5339 fi
5340 done
5341
5342       
5343 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5344 echo "configure:5345: checking for main in -lxml" >&5
5345 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5346
5347 xe_check_libs=" -lxml "
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351
5352 int main() {
5353 main()
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=yes"
5359 else
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=no"
5364 fi
5365 rm -f conftest*
5366 xe_check_libs=""
5367
5368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5369   echo "$ac_t""yes" 1>&6
5370   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5371 else
5372   echo "$ac_t""no" 1>&6
5373 fi
5374
5375
5376       
5377 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5378 echo "configure:5379: checking for main in -lglade" >&5
5379 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5380
5381 xe_check_libs=" -lglade "
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385
5386 int main() {
5387 main()
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_lib_$ac_lib_var=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_lib_$ac_lib_var=no"
5398 fi
5399 rm -f conftest*
5400 xe_check_libs=""
5401
5402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5403   echo "$ac_t""yes" 1>&6
5404   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408
5409
5410       
5411 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5412 echo "configure:5413: checking for main in -lglade-gnome" >&5
5413 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5414
5415 xe_check_libs=" -lglade-gnome "
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419
5420 int main() {
5421 main()
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   eval "ac_cv_lib_$ac_lib_var=yes"
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=no"
5432 fi
5433 rm -f conftest*
5434 xe_check_libs=""
5435
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5437   echo "$ac_t""yes" 1>&6
5438   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5439 else
5440   echo "$ac_t""no" 1>&6
5441 fi
5442
5443
5444       cat > conftest.$ac_ext <<EOF
5445 #line 5446 "configure"
5446 #include "confdefs.h"
5447 #include <glade/glade-xml.h>
5448 EOF
5449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5450   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5451   rm -rf conftest*
5452   echo "$ac_t""yes" 1>&6
5453                        { test "$extra_verbose" = "yes" && cat << \EOF
5454     Defining LIBGLADE_XML_TXTDOMAIN = 1
5455 EOF
5456 cat >> confdefs.h <<\EOF
5457 #define LIBGLADE_XML_TXTDOMAIN 1
5458 EOF
5459 }
5460
5461 else
5462   rm -rf conftest*
5463   echo "$ac_t""no" 1>&6
5464 fi
5465 rm -f conftest*
5466
5467       CFLAGS="${OLD_CFLAGS}"
5468       CPPFLAGS="${OLD_CPPFLAGS}"
5469       LDFLAGS="${OLD_LDFLAGS}"
5470 fi
5471
5472
5473 if test "$with_x11" != "no"; then
5474     test "$x_includes $x_libraries" != "NONE NONE" && \
5475    window_system=x11 with_x11=yes
5476
5477         
5478       if test "$x_includes $x_libraries" = "NONE NONE" \
5479     -a -n "$OPENWINHOME" \
5480     -a "$OPENWINHOME" != "/usr/openwin" \
5481     -a -d "$OPENWINHOME"; then
5482       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5483       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5484       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5485   fi
5486
5487   if test "$x_includes" = "NONE"; then
5488                     for dir in "/usr/X11" "/usr/X11R6"; do
5489       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5490     done
5491   fi
5492
5493   if test "$x_libraries" = "NONE"; then
5494     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5495       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5496     done
5497   fi
5498
5499   # If we find X, set shell vars x_includes and x_libraries to the
5500 # paths, otherwise set no_x=yes.
5501 # Uses ac_ vars as temps to allow command line to override cache and checks.
5502 # --without-x overrides everything else, but does not touch the cache.
5503 echo $ac_n "checking for X""... $ac_c" 1>&6
5504 echo "configure:5505: checking for X" >&5
5505
5506 # Check whether --with-x or --without-x was given.
5507 if test "${with_x+set}" = set; then
5508   withval="$with_x"
5509   :
5510 fi
5511
5512 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5513 if test "x$with_x" = xno; then
5514   # The user explicitly disabled X.
5515   have_x=disabled
5516 else
5517   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5518     # Both variables are already set.
5519     have_x=yes
5520   else
5521
5522 # One or both of the vars are not set, and there is no cached value.
5523 ac_x_includes=NO ac_x_libraries=NO
5524 rm -fr conftestdir
5525 if mkdir conftestdir; then
5526   cd conftestdir
5527   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5528   cat > Imakefile <<'EOF'
5529 acfindx:
5530         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5531 EOF
5532   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5533     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5534     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5535     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5536     for ac_extension in a so sl; do
5537       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5538         test -f $ac_im_libdir/libX11.$ac_extension; then
5539         ac_im_usrlibdir=$ac_im_libdir; break
5540       fi
5541     done
5542     # Screen out bogus values from the imake configuration.  They are
5543     # bogus both because they are the default anyway, and because
5544     # using them would break gcc on systems where it needs fixed includes.
5545     case "$ac_im_incroot" in
5546         /usr/include) ;;
5547         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5548     esac
5549     case "$ac_im_usrlibdir" in
5550         /usr/lib | /lib) ;;
5551         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5552     esac
5553   fi
5554   cd ..
5555   rm -fr conftestdir
5556 fi
5557
5558 if test "$ac_x_includes" = NO; then
5559   # Guess where to find include files, by looking for this one X11 .h file.
5560   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5561
5562   # First, try using that file with no special directory specified.
5563 cat > conftest.$ac_ext <<EOF
5564 #line 5565 "configure"
5565 #include "confdefs.h"
5566 #include <$x_direct_test_include>
5567 EOF
5568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5569 { (eval echo configure:5570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5571 if test -z "$ac_err"; then
5572   rm -rf conftest*
5573   # We can compile using X headers with no special include directory.
5574 ac_x_includes=
5575 else
5576   echo "$ac_err" >&5
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   # Look for the header file in a standard set of common directories.
5581 # Check X11 before X11Rn because it is often a symlink to the current release.
5582   for ac_dir in               \
5583     /usr/X11/include          \
5584     /usr/X11R6/include        \
5585     /usr/X11R5/include        \
5586     /usr/X11R4/include        \
5587                               \
5588     /usr/include/X11          \
5589     /usr/include/X11R6        \
5590     /usr/include/X11R5        \
5591     /usr/include/X11R4        \
5592                               \
5593     /usr/local/X11/include    \
5594     /usr/local/X11R6/include  \
5595     /usr/local/X11R5/include  \
5596     /usr/local/X11R4/include  \
5597                               \
5598     /usr/local/include/X11    \
5599     /usr/local/include/X11R6  \
5600     /usr/local/include/X11R5  \
5601     /usr/local/include/X11R4  \
5602                               \
5603     /usr/X386/include         \
5604     /usr/x386/include         \
5605     /usr/XFree86/include/X11  \
5606                               \
5607     /usr/include              \
5608     /usr/local/include        \
5609     /usr/unsupported/include  \
5610     /usr/athena/include       \
5611     /usr/local/x11r5/include  \
5612     /usr/lpp/Xamples/include  \
5613                               \
5614     /usr/openwin/include      \
5615     /usr/openwin/share/include \
5616     ; \
5617   do
5618     if test -r "$ac_dir/$x_direct_test_include"; then
5619       ac_x_includes=$ac_dir
5620       break
5621     fi
5622   done
5623 fi
5624 rm -f conftest*
5625 fi # $ac_x_includes = NO
5626
5627 if test "$ac_x_libraries" = NO; then
5628   # Check for the libraries.
5629
5630   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5631   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5632
5633   # See if we find them without any special options.
5634   # Don't add to $LIBS permanently.
5635   ac_save_LIBS="$LIBS"
5636   LIBS="-l$x_direct_test_library $LIBS"
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5640
5641 int main() {
5642 ${x_direct_test_function}()
5643 ; return 0; }
5644 EOF
5645 if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5646   rm -rf conftest*
5647   LIBS="$ac_save_LIBS"
5648 # We can link X programs with no special library path.
5649 ac_x_libraries=
5650 else
5651   echo "configure: failed program was:" >&5
5652   cat conftest.$ac_ext >&5
5653   rm -rf conftest*
5654   LIBS="$ac_save_LIBS"
5655 # First see if replacing the include by lib works.
5656 # Check X11 before X11Rn because it is often a symlink to the current release.
5657 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5658     /usr/X11/lib          \
5659     /usr/X11R6/lib        \
5660     /usr/X11R5/lib        \
5661     /usr/X11R4/lib        \
5662                           \
5663     /usr/lib/X11          \
5664     /usr/lib/X11R6        \
5665     /usr/lib/X11R5        \
5666     /usr/lib/X11R4        \
5667                           \
5668     /usr/local/X11/lib    \
5669     /usr/local/X11R6/lib  \
5670     /usr/local/X11R5/lib  \
5671     /usr/local/X11R4/lib  \
5672                           \
5673     /usr/local/lib/X11    \
5674     /usr/local/lib/X11R6  \
5675     /usr/local/lib/X11R5  \
5676     /usr/local/lib/X11R4  \
5677                           \
5678     /usr/X386/lib         \
5679     /usr/x386/lib         \
5680     /usr/XFree86/lib/X11  \
5681                           \
5682     /usr/lib              \
5683     /usr/local/lib        \
5684     /usr/unsupported/lib  \
5685     /usr/athena/lib       \
5686     /usr/local/x11r5/lib  \
5687     /usr/lpp/Xamples/lib  \
5688     /lib/usr/lib/X11      \
5689                           \
5690     /usr/openwin/lib      \
5691     /usr/openwin/share/lib \
5692     ; \
5693 do
5694   for ac_extension in a so sl; do
5695     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5696       ac_x_libraries=$ac_dir
5697       break 2
5698     fi
5699   done
5700 done
5701 fi
5702 rm -f conftest*
5703 fi # $ac_x_libraries = NO
5704
5705 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5706   # Didn't find X anywhere.  Cache the known absence of X.
5707   ac_cv_have_x="have_x=no"
5708 else
5709   # Record where we found X for the cache.
5710   ac_cv_have_x="have_x=yes \
5711                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5712 fi
5713   fi
5714   eval "$ac_cv_have_x"
5715 fi # $with_x != no
5716
5717 if test "$have_x" != yes; then
5718   echo "$ac_t""$have_x" 1>&6
5719   no_x=yes
5720 else
5721   # If each of the values was on the command line, it overrides each guess.
5722   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5723   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5724   # Update the cache value to reflect the command line values.
5725   ac_cv_have_x="have_x=yes \
5726                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5727   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5728 fi
5729
5730 if test "$no_x" = yes; then
5731   # Not all programs may use this symbol, but it does not hurt to define it.
5732   { test "$extra_verbose" = "yes" && cat << \EOF
5733     Defining X_DISPLAY_MISSING
5734 EOF
5735 cat >> confdefs.h <<\EOF
5736 #define X_DISPLAY_MISSING 1
5737 EOF
5738 }
5739
5740   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5741 else
5742   if test -n "$x_includes"; then
5743     X_CFLAGS="$X_CFLAGS -I$x_includes"
5744   fi
5745
5746   # It would also be nice to do this for all -L options, not just this one.
5747   if test -n "$x_libraries"; then
5748     X_LIBS="$X_LIBS -L$x_libraries"
5749     # For Solaris; some versions of Sun CC require a space after -R and
5750     # others require no space.  Words are not sufficient . . . .
5751     case "`(uname -sr) 2>/dev/null`" in
5752     "SunOS 5"*)
5753       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5754 echo "configure:5755: checking whether -R must be followed by a space" >&5
5755       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5756       cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759
5760 int main() {
5761
5762 ; return 0; }
5763 EOF
5764 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5765   rm -rf conftest*
5766   ac_R_nospace=yes
5767 else
5768   echo "configure: failed program was:" >&5
5769   cat conftest.$ac_ext >&5
5770   rm -rf conftest*
5771   ac_R_nospace=no
5772 fi
5773 rm -f conftest*
5774       if test $ac_R_nospace = yes; then
5775         echo "$ac_t""no" 1>&6
5776         X_LIBS="$X_LIBS -R$x_libraries"
5777       else
5778         LIBS="$ac_xsave_LIBS -R $x_libraries"
5779         cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782
5783 int main() {
5784
5785 ; return 0; }
5786 EOF
5787 if { (eval echo configure:5788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5788   rm -rf conftest*
5789   ac_R_space=yes
5790 else
5791   echo "configure: failed program was:" >&5
5792   cat conftest.$ac_ext >&5
5793   rm -rf conftest*
5794   ac_R_space=no
5795 fi
5796 rm -f conftest*
5797         if test $ac_R_space = yes; then
5798           echo "$ac_t""yes" 1>&6
5799           X_LIBS="$X_LIBS -R $x_libraries"
5800         else
5801           echo "$ac_t""neither works" 1>&6
5802         fi
5803       fi
5804       LIBS="$ac_xsave_LIBS"
5805     esac
5806   fi
5807
5808   # Check for system-dependent libraries X programs must link with.
5809   # Do this before checking for the system-independent R6 libraries
5810   # (-lICE), since we may need -lsocket or whatever for X linking.
5811
5812   if test "$ISC" = yes; then
5813     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5814   else
5815     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5816     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5817     # the Alpha needs dnet_stub (dnet does not exist).
5818     if test "$with_dnet" = "no" ; then
5819 ac_cv_lib_dnet_dnet_ntoa=no
5820 else
5821
5822 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5823 echo "configure:5824: checking for dnet_ntoa in -ldnet" >&5
5824 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5825
5826 xe_check_libs=" -ldnet "
5827 cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 /* Override any gcc2 internal prototype to avoid an error.  */
5831 /* We use char because int might match the return type of a gcc2
5832     builtin and then its argument prototype would still apply.  */
5833 char dnet_ntoa();
5834
5835 int main() {
5836 dnet_ntoa()
5837 ; return 0; }
5838 EOF
5839 if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5840   rm -rf conftest*
5841   eval "ac_cv_lib_$ac_lib_var=yes"
5842 else
5843   echo "configure: failed program was:" >&5
5844   cat conftest.$ac_ext >&5
5845   rm -rf conftest*
5846   eval "ac_cv_lib_$ac_lib_var=no"
5847 fi
5848 rm -f conftest*
5849 xe_check_libs=""
5850
5851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5852   echo "$ac_t""yes" 1>&6
5853   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5854 else
5855   echo "$ac_t""no" 1>&6
5856 fi
5857
5858 fi
5859
5860     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5861       
5862 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5863 echo "configure:5864: checking for dnet_ntoa in -ldnet_stub" >&5
5864 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5865
5866 xe_check_libs=" -ldnet_stub "
5867 cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 /* Override any gcc2 internal prototype to avoid an error.  */
5871 /* We use char because int might match the return type of a gcc2
5872     builtin and then its argument prototype would still apply.  */
5873 char dnet_ntoa();
5874
5875 int main() {
5876 dnet_ntoa()
5877 ; return 0; }
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880   rm -rf conftest*
5881   eval "ac_cv_lib_$ac_lib_var=yes"
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=no"
5887 fi
5888 rm -f conftest*
5889 xe_check_libs=""
5890
5891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5892   echo "$ac_t""yes" 1>&6
5893   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897
5898
5899     fi
5900
5901     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5902     # to get the SysV transport functions.
5903     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5904     # needs -lnsl.
5905     # The nsl library prevents programs from opening the X display
5906     # on Irix 5.2, according to dickey@clark.net.
5907     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5908 echo "configure:5909: checking for gethostbyname" >&5
5909
5910 cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 /* System header to define __stub macros and hopefully few prototypes,
5914     which can conflict with char gethostbyname(); below.  */
5915 #include <assert.h>
5916 /* Override any gcc2 internal prototype to avoid an error.  */
5917 /* We use char because int might match the return type of a gcc2
5918     builtin and then its argument prototype would still apply.  */
5919 char gethostbyname();
5920
5921 int main() {
5922
5923 /* The GNU C library defines this for functions which it implements
5924     to always fail with ENOSYS.  Some functions are actually named
5925     something starting with __ and the normal name is an alias.  */
5926 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5927 choke me
5928 #else
5929 gethostbyname();
5930 #endif
5931
5932 ; return 0; }
5933 EOF
5934 if { (eval echo configure:5935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5935   rm -rf conftest*
5936   eval "ac_cv_func_gethostbyname=yes"
5937 else
5938   echo "configure: failed program was:" >&5
5939   cat conftest.$ac_ext >&5
5940   rm -rf conftest*
5941   eval "ac_cv_func_gethostbyname=no"
5942 fi
5943 rm -f conftest*
5944
5945 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5946   echo "$ac_t""yes" 1>&6
5947   :
5948 else
5949   echo "$ac_t""no" 1>&6
5950 fi
5951
5952     if test $ac_cv_func_gethostbyname = no; then
5953       
5954 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5955 echo "configure:5956: checking for gethostbyname in -lnsl" >&5
5956 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5957
5958 xe_check_libs=" -lnsl "
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 /* Override any gcc2 internal prototype to avoid an error.  */
5963 /* We use char because int might match the return type of a gcc2
5964     builtin and then its argument prototype would still apply.  */
5965 char gethostbyname();
5966
5967 int main() {
5968 gethostbyname()
5969 ; return 0; }
5970 EOF
5971 if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5972   rm -rf conftest*
5973   eval "ac_cv_lib_$ac_lib_var=yes"
5974 else
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_lib_$ac_lib_var=no"
5979 fi
5980 rm -f conftest*
5981 xe_check_libs=""
5982
5983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5984   echo "$ac_t""yes" 1>&6
5985   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5986 else
5987   echo "$ac_t""no" 1>&6
5988 fi
5989
5990
5991     fi
5992
5993     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5994     # socket/setsockopt and other routines are undefined under SCO ODT
5995     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5996     # on later versions), says simon@lia.di.epfl.ch: it contains
5997     # gethostby* variants that don't use the nameserver (or something).
5998     # -lsocket must be given before -lnsl if both are needed.
5999     # We assume that if connect needs -lnsl, so does gethostbyname.
6000     echo $ac_n "checking for connect""... $ac_c" 1>&6
6001 echo "configure:6002: checking for connect" >&5
6002
6003 cat > conftest.$ac_ext <<EOF
6004 #line 6005 "configure"
6005 #include "confdefs.h"
6006 /* System header to define __stub macros and hopefully few prototypes,
6007     which can conflict with char connect(); below.  */
6008 #include <assert.h>
6009 /* Override any gcc2 internal prototype to avoid an error.  */
6010 /* We use char because int might match the return type of a gcc2
6011     builtin and then its argument prototype would still apply.  */
6012 char connect();
6013
6014 int main() {
6015
6016 /* The GNU C library defines this for functions which it implements
6017     to always fail with ENOSYS.  Some functions are actually named
6018     something starting with __ and the normal name is an alias.  */
6019 #if defined (__stub_connect) || defined (__stub___connect)
6020 choke me
6021 #else
6022 connect();
6023 #endif
6024
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028   rm -rf conftest*
6029   eval "ac_cv_func_connect=yes"
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   eval "ac_cv_func_connect=no"
6035 fi
6036 rm -f conftest*
6037
6038 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6039   echo "$ac_t""yes" 1>&6
6040   :
6041 else
6042   echo "$ac_t""no" 1>&6
6043 fi
6044
6045     if test $ac_cv_func_connect = no; then
6046       
6047 xe_msg_checking="for connect in -lsocket"
6048 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6049 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6050 echo "configure:6051: checking "$xe_msg_checking"" >&5
6051 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6052
6053 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6054 cat > conftest.$ac_ext <<EOF
6055 #line 6056 "configure"
6056 #include "confdefs.h"
6057 /* Override any gcc2 internal prototype to avoid an error.  */
6058 /* We use char because int might match the return type of a gcc2
6059     builtin and then its argument prototype would still apply.  */
6060 char connect();
6061
6062 int main() {
6063 connect()
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6067   rm -rf conftest*
6068   eval "ac_cv_lib_$ac_lib_var=yes"
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   eval "ac_cv_lib_$ac_lib_var=no"
6074 fi
6075 rm -f conftest*
6076 xe_check_libs=""
6077
6078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6079   echo "$ac_t""yes" 1>&6
6080   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6081 else
6082   echo "$ac_t""no" 1>&6
6083 fi
6084
6085
6086     fi
6087
6088     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6089     echo $ac_n "checking for remove""... $ac_c" 1>&6
6090 echo "configure:6091: checking for remove" >&5
6091
6092 cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 /* System header to define __stub macros and hopefully few prototypes,
6096     which can conflict with char remove(); below.  */
6097 #include <assert.h>
6098 /* Override any gcc2 internal prototype to avoid an error.  */
6099 /* We use char because int might match the return type of a gcc2
6100     builtin and then its argument prototype would still apply.  */
6101 char remove();
6102
6103 int main() {
6104
6105 /* The GNU C library defines this for functions which it implements
6106     to always fail with ENOSYS.  Some functions are actually named
6107     something starting with __ and the normal name is an alias.  */
6108 #if defined (__stub_remove) || defined (__stub___remove)
6109 choke me
6110 #else
6111 remove();
6112 #endif
6113
6114 ; return 0; }
6115 EOF
6116 if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6117   rm -rf conftest*
6118   eval "ac_cv_func_remove=yes"
6119 else
6120   echo "configure: failed program was:" >&5
6121   cat conftest.$ac_ext >&5
6122   rm -rf conftest*
6123   eval "ac_cv_func_remove=no"
6124 fi
6125 rm -f conftest*
6126
6127 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6128   echo "$ac_t""yes" 1>&6
6129   :
6130 else
6131   echo "$ac_t""no" 1>&6
6132 fi
6133
6134     if test $ac_cv_func_remove = no; then
6135       
6136 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6137 echo "configure:6138: checking for remove in -lposix" >&5
6138 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6139
6140 xe_check_libs=" -lposix "
6141 cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 /* Override any gcc2 internal prototype to avoid an error.  */
6145 /* We use char because int might match the return type of a gcc2
6146     builtin and then its argument prototype would still apply.  */
6147 char remove();
6148
6149 int main() {
6150 remove()
6151 ; return 0; }
6152 EOF
6153 if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6154   rm -rf conftest*
6155   eval "ac_cv_lib_$ac_lib_var=yes"
6156 else
6157   echo "configure: failed program was:" >&5
6158   cat conftest.$ac_ext >&5
6159   rm -rf conftest*
6160   eval "ac_cv_lib_$ac_lib_var=no"
6161 fi
6162 rm -f conftest*
6163 xe_check_libs=""
6164
6165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6166   echo "$ac_t""yes" 1>&6
6167   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6168 else
6169   echo "$ac_t""no" 1>&6
6170 fi
6171
6172
6173     fi
6174
6175     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6176     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6177 echo "configure:6178: checking for shmat" >&5
6178
6179 cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 /* System header to define __stub macros and hopefully few prototypes,
6183     which can conflict with char shmat(); below.  */
6184 #include <assert.h>
6185 /* Override any gcc2 internal prototype to avoid an error.  */
6186 /* We use char because int might match the return type of a gcc2
6187     builtin and then its argument prototype would still apply.  */
6188 char shmat();
6189
6190 int main() {
6191
6192 /* The GNU C library defines this for functions which it implements
6193     to always fail with ENOSYS.  Some functions are actually named
6194     something starting with __ and the normal name is an alias.  */
6195 #if defined (__stub_shmat) || defined (__stub___shmat)
6196 choke me
6197 #else
6198 shmat();
6199 #endif
6200
6201 ; return 0; }
6202 EOF
6203 if { (eval echo configure:6204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6204   rm -rf conftest*
6205   eval "ac_cv_func_shmat=yes"
6206 else
6207   echo "configure: failed program was:" >&5
6208   cat conftest.$ac_ext >&5
6209   rm -rf conftest*
6210   eval "ac_cv_func_shmat=no"
6211 fi
6212 rm -f conftest*
6213
6214 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6215   echo "$ac_t""yes" 1>&6
6216   :
6217 else
6218   echo "$ac_t""no" 1>&6
6219 fi
6220
6221     if test $ac_cv_func_shmat = no; then
6222       
6223 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6224 echo "configure:6225: checking for shmat in -lipc" >&5
6225 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6226
6227 xe_check_libs=" -lipc "
6228 cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 /* We use char because int might match the return type of a gcc2
6233     builtin and then its argument prototype would still apply.  */
6234 char shmat();
6235
6236 int main() {
6237 shmat()
6238 ; return 0; }
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6241   rm -rf conftest*
6242   eval "ac_cv_lib_$ac_lib_var=yes"
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   eval "ac_cv_lib_$ac_lib_var=no"
6248 fi
6249 rm -f conftest*
6250 xe_check_libs=""
6251
6252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6253   echo "$ac_t""yes" 1>&6
6254   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6255 else
6256   echo "$ac_t""no" 1>&6
6257 fi
6258
6259
6260     fi
6261   fi
6262
6263   # Check for libraries that X11R6 Xt/Xaw programs need.
6264   ac_save_LDFLAGS="$LDFLAGS"
6265   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6266   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6267   # check for ICE first), but we must link in the order -lSM -lICE or
6268   # we get undefined symbols.  So assume we have SM if we have ICE.
6269   # These have to be linked with before -lX11, unlike the other
6270   # libraries we check for below, so use a different variable.
6271   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6272   
6273 xe_msg_checking="for IceConnectionNumber in -lICE"
6274 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6275 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6276 echo "configure:6277: checking "$xe_msg_checking"" >&5
6277 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6278
6279 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6280 cat > conftest.$ac_ext <<EOF
6281 #line 6282 "configure"
6282 #include "confdefs.h"
6283 /* Override any gcc2 internal prototype to avoid an error.  */
6284 /* We use char because int might match the return type of a gcc2
6285     builtin and then its argument prototype would still apply.  */
6286 char IceConnectionNumber();
6287
6288 int main() {
6289 IceConnectionNumber()
6290 ; return 0; }
6291 EOF
6292 if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6293   rm -rf conftest*
6294   eval "ac_cv_lib_$ac_lib_var=yes"
6295 else
6296   echo "configure: failed program was:" >&5
6297   cat conftest.$ac_ext >&5
6298   rm -rf conftest*
6299   eval "ac_cv_lib_$ac_lib_var=no"
6300 fi
6301 rm -f conftest*
6302 xe_check_libs=""
6303
6304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6305   echo "$ac_t""yes" 1>&6
6306   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6307 else
6308   echo "$ac_t""no" 1>&6
6309 fi
6310
6311
6312   LDFLAGS="$ac_save_LDFLAGS"
6313
6314 fi
6315  # Autoconf claims to find X library and include dirs for us.
6316   if test "$no_x" = "yes"
6317   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6318   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6319   fi
6320 fi
6321
6322
6323 if test "$with_x11" = "yes"; then
6324   { test "$extra_verbose" = "yes" && cat << \EOF
6325     Defining HAVE_X_WINDOWS
6326 EOF
6327 cat >> confdefs.h <<\EOF
6328 #define HAVE_X_WINDOWS 1
6329 EOF
6330 }
6331
6332   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6333   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6334
6335       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6336     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6337     if test -d "$lib_dir" -a -d "$inc_dir"; then
6338       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6339         x_libraries="$lib_dir $x_libraries"
6340         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6341       esac
6342       case "$x_includes" in "$inc_dir"* ) ;; *)
6343         x_includes="$inc_dir $x_includes"
6344         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6345       esac
6346       break;       fi
6347   done
6348
6349     for rel in "X11R6" "X11R5" "X11R4"; do
6350     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6351     if test -d "$lib_dir" -a -d "$inc_dir"; then
6352       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6353         x_libraries="$x_libraries $lib_dir"
6354         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6355       esac
6356       case "$x_includes" in "$inc_dir"* ) ;; *)
6357         x_includes="$x_includes $inc_dir"
6358         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6359       esac
6360       break;     fi
6361   done
6362
6363     case "$opsys" in
6364   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 ;;
6365   esac
6366
6367   ld_switch_x_site="$X_LIBS"
6368
6369   
6370 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6371     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6372   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6373   
6374         runpath="" runpath_dirs=""
6375   if test -n "$LD_RUN_PATH"; then
6376     runpath="$LD_RUN_PATH"
6377   elif test "$GCC" = "yes"; then
6378         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6379     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6380     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6381     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6382       case "$arg" in P,* | -L* | -R* )
6383         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6384           {
6385 xe_runpath_dir="$dir"
6386   test "$xe_runpath_dir" != "/lib"     -a \
6387         "$xe_runpath_dir" != "/usr/lib" -a \
6388         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6389   eval "$xe_add_unique_runpath_dir"
6390 }
6391         done ;;
6392       esac
6393     done
6394     ld_switch_run="$ld_switch_run_save"
6395     rm -f conftest*
6396   else
6397         for arg in $ld_switch_site $ld_switch_x_site; do
6398       case "$arg" in -L*) {
6399 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6400   test "$xe_runpath_dir" != "/lib"     -a \
6401         "$xe_runpath_dir" != "/usr/lib" -a \
6402         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6403   eval "$xe_add_unique_runpath_dir"
6404 };; esac
6405     done
6406         if test "$opsys $need_motif" = "sol2 yes"; then
6407       xe_runpath_dir="/opt/SUNWdt/lib";
6408       eval "$xe_add_unique_runpath_dir";
6409     fi
6410   fi 
6411   if test -n "$runpath"; then
6412     ld_switch_run="${dash_r}${runpath}"
6413     
6414 if test "$GCC" = "yes"; then
6415   set x $ld_switch_run; shift; ld_switch_run=""
6416   while test -n "$1"; do
6417     case $1 in
6418       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6419       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6420       -Xlinker* ) ;;
6421       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6422     esac
6423     shift
6424   done
6425 fi
6426     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6427   fi
6428 fi
6429
6430
6431   if test "$extra_verbose" = "yes"; then
6432     echo; echo "X11 compilation variables:"
6433     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6434     echo
6435   fi
6436
6437             bitmapdirs=
6438   if test "$x_includes" != NONE; then
6439     for i in $x_includes; do
6440       if test -d "$i/bitmaps"; then
6441         bitmapdirs="$i/bitmaps:$bitmapdirs"
6442       fi
6443       if test -d "$i/X11/bitmaps"; then
6444         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6445       fi
6446     done
6447     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6448   fi
6449   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6450     Defining BITMAPDIR = "$bitmapdirs"
6451 EOF
6452 cat >> confdefs.h <<EOF
6453 #define BITMAPDIR "$bitmapdirs"
6454 EOF
6455 }
6456
6457
6458     echo "checking for X defines extracted by xmkmf" 1>&6
6459 echo "configure:6460: checking for X defines extracted by xmkmf" >&5
6460   rm -fr conftestdir
6461   if mkdir conftestdir; then
6462     cd conftestdir
6463     cat > Imakefile <<'EOF'
6464 xetest:
6465         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6466 EOF
6467     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6468       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6469       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6470     fi
6471     cd ..
6472     rm -fr conftestdir
6473     for word in $xmkmf_defines; do
6474       case "$word" in 
6475       -D__STDC__*) ;;
6476       -D* )
6477         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6478         case "$word" in
6479           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6480           *     ) val=1 ;;
6481         esac
6482         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6483           if test "$val" = "1"
6484             then { test "$extra_verbose" = "yes" && cat << EOF
6485     Defining $sym
6486 EOF
6487 cat >> confdefs.h <<EOF
6488 #define $sym 1
6489 EOF
6490 }
6491
6492             else { test "$extra_verbose" = "yes" && cat << EOF
6493     Defining $sym = $val
6494 EOF
6495 cat >> confdefs.h <<EOF
6496 #define $sym $val
6497 EOF
6498 }
6499
6500           fi
6501         fi  ;;
6502       esac
6503     done
6504   fi
6505
6506     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6507 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6508 echo "configure:6509: checking for X11/Intrinsic.h" >&5
6509
6510 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 #include <X11/Intrinsic.h>
6514 EOF
6515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6516 { (eval echo configure:6517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6518 if test -z "$ac_err"; then
6519   rm -rf conftest*
6520   eval "ac_cv_header_$ac_safe=yes"
6521 else
6522   echo "$ac_err" >&5
6523   echo "configure: failed program was:" >&5
6524   cat conftest.$ac_ext >&5
6525   rm -rf conftest*
6526   eval "ac_cv_header_$ac_safe=no"
6527 fi
6528 rm -f conftest*
6529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6530   echo "$ac_t""yes" 1>&6
6531   :
6532 else
6533   echo "$ac_t""no" 1>&6
6534 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6535 fi
6536
6537
6538       
6539 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6540 echo "configure:6541: checking for XOpenDisplay in -lX11" >&5
6541 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6542
6543 xe_check_libs=" -lX11 "
6544 cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 /* We use char because int might match the return type of a gcc2
6549     builtin and then its argument prototype would still apply.  */
6550 char XOpenDisplay();
6551
6552 int main() {
6553 XOpenDisplay()
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6557   rm -rf conftest*
6558   eval "ac_cv_lib_$ac_lib_var=yes"
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   eval "ac_cv_lib_$ac_lib_var=no"
6564 fi
6565 rm -f conftest*
6566 xe_check_libs=""
6567
6568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6569   echo "$ac_t""yes" 1>&6
6570   have_lib_x11=yes
6571 else
6572   echo "$ac_t""no" 1>&6
6573 fi
6574
6575
6576   if test "$have_lib_x11" != "yes"; then
6577     
6578 xe_msg_checking="for XGetFontProperty in -lX11"
6579 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6580 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6581 echo "configure:6582: checking "$xe_msg_checking"" >&5
6582 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6583
6584 xe_check_libs=" -lX11 -b i486-linuxaout"
6585 cat > conftest.$ac_ext <<EOF
6586 #line 6587 "configure"
6587 #include "confdefs.h"
6588 /* Override any gcc2 internal prototype to avoid an error.  */
6589 /* We use char because int might match the return type of a gcc2
6590     builtin and then its argument prototype would still apply.  */
6591 char XGetFontProperty();
6592
6593 int main() {
6594 XGetFontProperty()
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   eval "ac_cv_lib_$ac_lib_var=yes"
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_lib_$ac_lib_var=no"
6605 fi
6606 rm -f conftest*
6607 xe_check_libs=""
6608
6609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6610   echo "$ac_t""yes" 1>&6
6611   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6615 fi
6616
6617
6618   fi
6619   libs_x="-lX11"
6620   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6621
6622     
6623 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6624 echo "configure:6625: checking for XShapeSelectInput in -lXext" >&5
6625 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6626
6627 xe_check_libs=" -lXext "
6628 cat > conftest.$ac_ext <<EOF
6629 #line 6630 "configure"
6630 #include "confdefs.h"
6631 /* Override any gcc2 internal prototype to avoid an error.  */
6632 /* We use char because int might match the return type of a gcc2
6633     builtin and then its argument prototype would still apply.  */
6634 char XShapeSelectInput();
6635
6636 int main() {
6637 XShapeSelectInput()
6638 ; return 0; }
6639 EOF
6640 if { (eval echo configure:6641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6641   rm -rf conftest*
6642   eval "ac_cv_lib_$ac_lib_var=yes"
6643 else
6644   echo "configure: failed program was:" >&5
6645   cat conftest.$ac_ext >&5
6646   rm -rf conftest*
6647   eval "ac_cv_lib_$ac_lib_var=no"
6648 fi
6649 rm -f conftest*
6650 xe_check_libs=""
6651
6652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6653   echo "$ac_t""yes" 1>&6
6654   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6655 else
6656   echo "$ac_t""no" 1>&6
6657 fi
6658
6659
6660
6661     
6662 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6663 echo "configure:6664: checking for XtOpenDisplay in -lXt" >&5
6664 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6665
6666 xe_check_libs=" -lXt "
6667 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* Override any gcc2 internal prototype to avoid an error.  */
6671 /* We use char because int might match the return type of a gcc2
6672     builtin and then its argument prototype would still apply.  */
6673 char XtOpenDisplay();
6674
6675 int main() {
6676 XtOpenDisplay()
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6680   rm -rf conftest*
6681   eval "ac_cv_lib_$ac_lib_var=yes"
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=no"
6687 fi
6688 rm -f conftest*
6689 xe_check_libs=""
6690
6691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6692   echo "$ac_t""yes" 1>&6
6693   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6694 else
6695   echo "$ac_t""no" 1>&6
6696 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6697 fi
6698
6699
6700
6701   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6702 echo "configure:6703: checking the version of X11 being used" >&5
6703   cat > conftest.$ac_ext <<EOF
6704 #line 6705 "configure"
6705 #include "confdefs.h"
6706 #include <X11/Intrinsic.h>
6707     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6710 then
6711   ./conftest foobar; x11_release=$?
6712 else
6713   conftest_rc="$?"
6714   echo "configure: failed program was:" >&5
6715   cat conftest.$ac_ext >&5
6716   rm -fr conftest*
6717   x11_release=4
6718 fi
6719 rm -fr conftest*
6720   echo "$ac_t""R${x11_release}" 1>&6
6721   { test "$extra_verbose" = "yes" && cat << EOF
6722     Defining THIS_IS_X11R${x11_release}
6723 EOF
6724 cat >> confdefs.h <<EOF
6725 #define THIS_IS_X11R${x11_release} 1
6726 EOF
6727 }
6728
6729
6730   if test "${x11_release}" = "4"; then
6731     case "$with_widgets" in
6732       "" | "no") with_widgets=no ;;
6733       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6734     esac
6735   fi
6736
6737   for ac_func in XConvertCase
6738 do
6739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6740 echo "configure:6741: checking for $ac_func" >&5
6741
6742 cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745 /* System header to define __stub macros and hopefully few prototypes,
6746     which can conflict with char $ac_func(); below.  */
6747 #include <assert.h>
6748 /* Override any gcc2 internal prototype to avoid an error.  */
6749 /* We use char because int might match the return type of a gcc2
6750     builtin and then its argument prototype would still apply.  */
6751 char $ac_func();
6752
6753 int main() {
6754
6755 /* The GNU C library defines this for functions which it implements
6756     to always fail with ENOSYS.  Some functions are actually named
6757     something starting with __ and the normal name is an alias.  */
6758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6759 choke me
6760 #else
6761 $ac_func();
6762 #endif
6763
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_func_$ac_func=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_func_$ac_func=no"
6774 fi
6775 rm -f conftest*
6776
6777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6778   echo "$ac_t""yes" 1>&6
6779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6780   { test "$extra_verbose" = "yes" && cat << EOF
6781     Defining $ac_tr_func
6782 EOF
6783 cat >> confdefs.h <<EOF
6784 #define $ac_tr_func 1
6785 EOF
6786 }
6787  
6788 else
6789   echo "$ac_t""no" 1>&6
6790 fi
6791 done
6792
6793
6794   for ac_hdr in X11/Xlocale.h
6795 do
6796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6798 echo "configure:6799: checking for $ac_hdr" >&5
6799
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 #include <$ac_hdr>
6804 EOF
6805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6806 { (eval echo configure:6807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6808 if test -z "$ac_err"; then
6809   rm -rf conftest*
6810   eval "ac_cv_header_$ac_safe=yes"
6811 else
6812   echo "$ac_err" >&5
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_header_$ac_safe=no"
6817 fi
6818 rm -f conftest*
6819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6822   { test "$extra_verbose" = "yes" && cat << EOF
6823     Defining $ac_tr_hdr
6824 EOF
6825 cat >> confdefs.h <<EOF
6826 #define $ac_tr_hdr 1
6827 EOF
6828 }
6829  
6830 else
6831   echo "$ac_t""no" 1>&6
6832 fi
6833 done
6834
6835
6836     for ac_func in XRegisterIMInstantiateCallback
6837 do
6838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6839 echo "configure:6840: checking for $ac_func" >&5
6840
6841 cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844 /* System header to define __stub macros and hopefully few prototypes,
6845     which can conflict with char $ac_func(); below.  */
6846 #include <assert.h>
6847 /* Override any gcc2 internal prototype to avoid an error.  */
6848 /* We use char because int might match the return type of a gcc2
6849     builtin and then its argument prototype would still apply.  */
6850 char $ac_func();
6851
6852 int main() {
6853
6854 /* The GNU C library defines this for functions which it implements
6855     to always fail with ENOSYS.  Some functions are actually named
6856     something starting with __ and the normal name is an alias.  */
6857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6858 choke me
6859 #else
6860 $ac_func();
6861 #endif
6862
6863 ; return 0; }
6864 EOF
6865 if { (eval echo configure:6866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6866   rm -rf conftest*
6867   eval "ac_cv_func_$ac_func=yes"
6868 else
6869   echo "configure: failed program was:" >&5
6870   cat conftest.$ac_ext >&5
6871   rm -rf conftest*
6872   eval "ac_cv_func_$ac_func=no"
6873 fi
6874 rm -f conftest*
6875
6876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6877   echo "$ac_t""yes" 1>&6
6878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6879   { test "$extra_verbose" = "yes" && cat << EOF
6880     Defining $ac_tr_func
6881 EOF
6882 cat >> confdefs.h <<EOF
6883 #define $ac_tr_func 1
6884 EOF
6885 }
6886  
6887 else
6888   echo "$ac_t""no" 1>&6
6889 fi
6890 done
6891
6892   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6893 echo "configure:6894: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6894   cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897
6898 #define NeedFunctionPrototypes 1
6899 #include <X11/Xlib.h>
6900 extern Bool XRegisterIMInstantiateCallback(
6901    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6902
6903 int main() {
6904
6905 ; return 0; }
6906 EOF
6907 if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6908   rm -rf conftest*
6909   echo "$ac_t""yes" 1>&6
6910 else
6911   echo "configure: failed program was:" >&5
6912   cat conftest.$ac_ext >&5
6913   rm -rf conftest*
6914   echo "$ac_t""no" 1>&6
6915    { test "$extra_verbose" = "yes" && cat << \EOF
6916     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6917 EOF
6918 cat >> confdefs.h <<\EOF
6919 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6920 EOF
6921 }
6922
6923 fi
6924 rm -f conftest*
6925
6926     test -z "$with_xmu" && { 
6927 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6928 echo "configure:6929: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6929 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6930
6931 xe_check_libs=" -lXmu "
6932 cat > conftest.$ac_ext <<EOF
6933 #line 6934 "configure"
6934 #include "confdefs.h"
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 /* We use char because int might match the return type of a gcc2
6937     builtin and then its argument prototype would still apply.  */
6938 char XmuReadBitmapDataFromFile();
6939
6940 int main() {
6941 XmuReadBitmapDataFromFile()
6942 ; return 0; }
6943 EOF
6944 if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6945   rm -rf conftest*
6946   eval "ac_cv_lib_$ac_lib_var=yes"
6947 else
6948   echo "configure: failed program was:" >&5
6949   cat conftest.$ac_ext >&5
6950   rm -rf conftest*
6951   eval "ac_cv_lib_$ac_lib_var=no"
6952 fi
6953 rm -f conftest*
6954 xe_check_libs=""
6955
6956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6957   echo "$ac_t""yes" 1>&6
6958   with_xmu=yes
6959 else
6960   echo "$ac_t""no" 1>&6
6961 with_xmu=no
6962 fi
6963
6964  }
6965   if test "$with_xmu" = "no"; then
6966     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6967    echo "    xemacs will be linked with \"xmu.o\""
6968  fi
6969   else
6970     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6971     { test "$extra_verbose" = "yes" && cat << \EOF
6972     Defining HAVE_XMU
6973 EOF
6974 cat >> confdefs.h <<\EOF
6975 #define HAVE_XMU 1
6976 EOF
6977 }
6978
6979   fi
6980
6981       
6982 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6983 echo "configure:6984: checking for main in -lXbsd" >&5
6984 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6985
6986 xe_check_libs=" -lXbsd "
6987 cat > conftest.$ac_ext <<EOF
6988 #line 6989 "configure"
6989 #include "confdefs.h"
6990
6991 int main() {
6992 main()
6993 ; return 0; }
6994 EOF
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=yes"
6998 else
6999   echo "configure: failed program was:" >&5
7000   cat conftest.$ac_ext >&5
7001   rm -rf conftest*
7002   eval "ac_cv_lib_$ac_lib_var=no"
7003 fi
7004 rm -f conftest*
7005 xe_check_libs=""
7006
7007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7008   echo "$ac_t""yes" 1>&6
7009   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7010 else
7011   echo "$ac_t""no" 1>&6
7012 fi
7013
7014
7015
7016     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7017         if test "$GCC" = "yes"; then
7018       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
7019       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
7020     else
7021       case "$CC" in
7022         "xlc" ) CC="xlc_r" ;;
7023         "xlC" ) CC="xlC_r" ;;
7024         "cc"  ) CC="cc_r" ;;
7025       esac
7026     fi
7027   fi
7028
7029 fi 
7030 if test "$with_msw" != "no"; then
7031   echo "checking for MS-Windows" 1>&6
7032 echo "configure:7033: checking for MS-Windows" >&5
7033   
7034 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7035 echo "configure:7036: checking for main in -lgdi32" >&5
7036 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7037
7038 xe_check_libs=" -lgdi32 "
7039 cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042
7043 int main() {
7044 main()
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_msw=yes
7062 else
7063   echo "$ac_t""no" 1>&6
7064 fi
7065
7066
7067   if test "$with_msw" = "yes"; then
7068     { test "$extra_verbose" = "yes" && cat << \EOF
7069     Defining HAVE_MS_WINDOWS
7070 EOF
7071 cat >> confdefs.h <<\EOF
7072 #define HAVE_MS_WINDOWS 1
7073 EOF
7074 }
7075
7076
7077         if test "$with_netinstall" = "yes"; then
7078       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7079       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7080       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7081     fi
7082
7083     install_pp="$blddir/lib-src/installexe.sh"
7084     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
7085     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7086     if test "$window_system" != x11; then
7087         window_system=msw
7088         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7089             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7090    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7091  fi
7092         test "$with_menubars"   != "no" && with_menubars=msw \
7093             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7094    echo "    xemacs will be linked with \"menubar-msw.o\""
7095  fi
7096         test "$with_toolbars"   != "no" && with_toolbars=msw \
7097             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7098    echo "    xemacs will be linked with \"toolbar-msw.o\""
7099  fi
7100         test "$with_dialogs"   != "no" && with_dialogs=msw \
7101             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7102    echo "    xemacs will be linked with \"dialog-msw.o\""
7103  fi
7104         test "$with_widgets"   != "no" && with_widgets=msw
7105     else
7106         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7107    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7108  fi
7109         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7110    echo "    xemacs will be linked with \"menubar-msw.o\""
7111  fi
7112         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7113    echo "    xemacs will be linked with \"toolbar-msw.o\""
7114  fi
7115         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7116    echo "    xemacs will be linked with \"dialog-msw.o\""
7117  fi
7118     fi
7119         cat > conftest.$ac_ext <<EOF
7120 #line 7121 "configure"
7121 #include "confdefs.h"
7122 #include <fcntl.h>
7123     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7124 EOF
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7126 then
7127   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7128     Defining HAVE_MSG_SELECT
7129 EOF
7130 cat >> confdefs.h <<\EOF
7131 #define HAVE_MSG_SELECT 1
7132 EOF
7133 }
7134
7135 else
7136   conftest_rc="$?"
7137   echo "configure: failed program was:" >&5
7138   cat conftest.$ac_ext >&5
7139 fi
7140 rm -fr conftest*
7141     with_file_coding=yes
7142     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
7143    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\""
7144  fi
7145   fi
7146 fi
7147
7148
7149
7150 test -z "$window_system" && window_system="none"
7151
7152 if test "$window_system" = "none"; then
7153   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7154   do
7155     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7156        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7157     fi
7158     eval "with_${feature}=no"
7159   done
7160 else
7161   test -z "$with_toolbars" && with_toolbars=yes
7162 fi
7163
7164 if test "$with_msw" != "yes"; then
7165   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7166   do
7167     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7168        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7169     fi
7170     eval "with_${feature}=no"
7171   done
7172 else
7173   :
7174 fi
7175
7176 if test "$with_x11" != "yes"; then
7177             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7178   do
7179     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7180        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7181     fi
7182     eval "with_${feature}=no"
7183   done
7184 fi
7185
7186 if test "$with_x11" = "yes"; then
7187   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7188 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7189 echo "configure:7190: checking for X11/extensions/shape.h" >&5
7190
7191 cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194 #include <X11/extensions/shape.h>
7195 EOF
7196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7197 { (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7199 if test -z "$ac_err"; then
7200   rm -rf conftest*
7201   eval "ac_cv_header_$ac_safe=yes"
7202 else
7203   echo "$ac_err" >&5
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_header_$ac_safe=no"
7208 fi
7209 rm -f conftest*
7210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7211   echo "$ac_t""yes" 1>&6
7212   
7213    { test "$extra_verbose" = "yes" && cat << \EOF
7214     Defining HAVE_BALLOON_HELP
7215 EOF
7216 cat >> confdefs.h <<\EOF
7217 #define HAVE_BALLOON_HELP 1
7218 EOF
7219 }
7220
7221    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7222    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7223  fi
7224 else
7225   echo "$ac_t""no" 1>&6
7226 fi
7227
7228 fi
7229
7230 bitmapdir=
7231
7232 case "$window_system" in
7233   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7234   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7235   gtk  )
7236        HAVE_X_WINDOWS=no
7237        test "$with_gnome" = "yes" && echo "  Using GNOME."
7238        test "$with_gnome" = "no" && echo "  Using GTK."
7239        ;;
7240   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7241 esac
7242
7243 case "$x_libraries" in *X11R4* )
7244   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7245   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7246 esac
7247
7248 echo "checking for WM_COMMAND option" 1>&6
7249 echo "configure:7250: checking for WM_COMMAND option" >&5;
7250 if test "$with_wmcommand" != "no"; then
7251   { test "$extra_verbose" = "yes" && cat << \EOF
7252     Defining HAVE_WMCOMMAND
7253 EOF
7254 cat >> confdefs.h <<\EOF
7255 #define HAVE_WMCOMMAND 1
7256 EOF
7257 }
7258
7259 fi
7260
7261 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7262 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7263 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7264 echo "configure:7265: checking for X11/Xauth.h" >&5
7265
7266 cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 #include <X11/Xauth.h>
7270 EOF
7271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7272 { (eval echo configure:7273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7274 if test -z "$ac_err"; then
7275   rm -rf conftest*
7276   eval "ac_cv_header_$ac_safe=yes"
7277 else
7278   echo "$ac_err" >&5
7279   echo "configure: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281   rm -rf conftest*
7282   eval "ac_cv_header_$ac_safe=no"
7283 fi
7284 rm -f conftest*
7285 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7286   echo "$ac_t""yes" 1>&6
7287   :
7288 else
7289   echo "$ac_t""no" 1>&6
7290 with_xauth=no
7291 fi
7292  }
7293 test -z "$with_xauth" && { 
7294 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7295 echo "configure:7296: checking for XauGetAuthByAddr in -lXau" >&5
7296 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7297
7298 xe_check_libs=" -lXau "
7299 cat > conftest.$ac_ext <<EOF
7300 #line 7301 "configure"
7301 #include "confdefs.h"
7302 /* Override any gcc2 internal prototype to avoid an error.  */
7303 /* We use char because int might match the return type of a gcc2
7304     builtin and then its argument prototype would still apply.  */
7305 char XauGetAuthByAddr();
7306
7307 int main() {
7308 XauGetAuthByAddr()
7309 ; return 0; }
7310 EOF
7311 if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7312   rm -rf conftest*
7313   eval "ac_cv_lib_$ac_lib_var=yes"
7314 else
7315   echo "configure: failed program was:" >&5
7316   cat conftest.$ac_ext >&5
7317   rm -rf conftest*
7318   eval "ac_cv_lib_$ac_lib_var=no"
7319 fi
7320 rm -f conftest*
7321 xe_check_libs=""
7322
7323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7324   echo "$ac_t""yes" 1>&6
7325   :
7326 else
7327   echo "$ac_t""no" 1>&6
7328 with_xauth=no
7329 fi
7330
7331  }
7332 test -z "$with_xauth" && with_xauth=yes
7333 if test "$with_xauth" = "yes"; then
7334   { test "$extra_verbose" = "yes" && cat << \EOF
7335     Defining HAVE_XAUTH
7336 EOF
7337 cat >> confdefs.h <<\EOF
7338 #define HAVE_XAUTH 1
7339 EOF
7340 }
7341
7342   
7343 T=""
7344 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
7345 libs_xauth="$T"
7346
7347 fi
7348
7349
7350
7351
7352 if test "$with_tooltalk" != "no" ; then
7353       for dir in "" "Tt/" "desktop/" ; do
7354     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7355 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7356 echo "configure:7357: checking for ${dir}tt_c.h" >&5
7357
7358 cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 #include <${dir}tt_c.h>
7362 EOF
7363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7364 { (eval echo configure:7365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7366 if test -z "$ac_err"; then
7367   rm -rf conftest*
7368   eval "ac_cv_header_$ac_safe=yes"
7369 else
7370   echo "$ac_err" >&5
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -rf conftest*
7374   eval "ac_cv_header_$ac_safe=no"
7375 fi
7376 rm -f conftest*
7377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7378   echo "$ac_t""yes" 1>&6
7379   tt_c_h_file="${dir}tt_c.h"; break
7380 else
7381   echo "$ac_t""no" 1>&6
7382 fi
7383
7384   done
7385   if test -z "$tt_c_h_file"; then
7386     if test "$with_tooltalk" = "yes"; then
7387       (echo "$progname: Usage error:"
7388 echo " " "Unable to find required tooltalk header files."
7389 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7390     fi
7391     with_tooltalk=no
7392   fi
7393 fi
7394 if test "$with_tooltalk" != "no" ; then
7395   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7396     
7397 xe_msg_checking="for tt_message_create in -ltt"
7398 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7399 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7400 echo "configure:7401: checking "$xe_msg_checking"" >&5
7401 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7402
7403 xe_check_libs=" -ltt $extra_libs"
7404 cat > conftest.$ac_ext <<EOF
7405 #line 7406 "configure"
7406 #include "confdefs.h"
7407 /* Override any gcc2 internal prototype to avoid an error.  */
7408 /* We use char because int might match the return type of a gcc2
7409     builtin and then its argument prototype would still apply.  */
7410 char tt_message_create();
7411
7412 int main() {
7413 tt_message_create()
7414 ; return 0; }
7415 EOF
7416 if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7417   rm -rf conftest*
7418   eval "ac_cv_lib_$ac_lib_var=yes"
7419 else
7420   echo "configure: failed program was:" >&5
7421   cat conftest.$ac_ext >&5
7422   rm -rf conftest*
7423   eval "ac_cv_lib_$ac_lib_var=no"
7424 fi
7425 rm -f conftest*
7426 xe_check_libs=""
7427
7428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7429   echo "$ac_t""yes" 1>&6
7430   tt_libs="-ltt $extra_libs"; break
7431 else
7432   echo "$ac_t""no" 1>&6
7433 :
7434 fi
7435
7436
7437   done
7438   if test -z "$tt_libs"; then
7439     if test "$with_tooltalk" = "yes"; then
7440       (echo "$progname: Usage error:"
7441 echo " " "Unable to find required tooltalk libraries."
7442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7443     fi
7444     with_tooltalk=no
7445   fi
7446 fi
7447 test -z "$with_tooltalk" && with_tooltalk=yes
7448 if test "$with_tooltalk" = "yes"; then
7449   { test "$extra_verbose" = "yes" && cat << \EOF
7450     Defining TOOLTALK
7451 EOF
7452 cat >> confdefs.h <<\EOF
7453 #define TOOLTALK 1
7454 EOF
7455 }
7456
7457   { test "$extra_verbose" = "yes" && cat << EOF
7458     Defining TT_C_H_FILE = "$tt_c_h_file"
7459 EOF
7460 cat >> confdefs.h <<EOF
7461 #define TT_C_H_FILE "$tt_c_h_file"
7462 EOF
7463 }
7464
7465   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7466   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7467    echo "    xemacs will be linked with \"tooltalk.o\""
7468  fi
7469 fi
7470
7471 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7472 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7473 echo "configure:7474: checking for Dt/Dt.h" >&5
7474
7475 cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 #include <Dt/Dt.h>
7479 EOF
7480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7481 { (eval echo configure:7482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7483 if test -z "$ac_err"; then
7484   rm -rf conftest*
7485   eval "ac_cv_header_$ac_safe=yes"
7486 else
7487   echo "$ac_err" >&5
7488   echo "configure: failed program was:" >&5
7489   cat conftest.$ac_ext >&5
7490   rm -rf conftest*
7491   eval "ac_cv_header_$ac_safe=no"
7492 fi
7493 rm -f conftest*
7494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7495   echo "$ac_t""yes" 1>&6
7496   :
7497 else
7498   echo "$ac_t""no" 1>&6
7499 with_cde=no
7500 fi
7501  }
7502 test -z "$with_cde" && { 
7503 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7504 echo "configure:7505: checking for DtDndDragStart in -lDtSvc" >&5
7505 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7506
7507 xe_check_libs=" -lDtSvc "
7508 cat > conftest.$ac_ext <<EOF
7509 #line 7510 "configure"
7510 #include "confdefs.h"
7511 /* Override any gcc2 internal prototype to avoid an error.  */
7512 /* We use char because int might match the return type of a gcc2
7513     builtin and then its argument prototype would still apply.  */
7514 char DtDndDragStart();
7515
7516 int main() {
7517 DtDndDragStart()
7518 ; return 0; }
7519 EOF
7520 if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7521   rm -rf conftest*
7522   eval "ac_cv_lib_$ac_lib_var=yes"
7523 else
7524   echo "configure: failed program was:" >&5
7525   cat conftest.$ac_ext >&5
7526   rm -rf conftest*
7527   eval "ac_cv_lib_$ac_lib_var=no"
7528 fi
7529 rm -f conftest*
7530 xe_check_libs=""
7531
7532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7533   echo "$ac_t""yes" 1>&6
7534   :
7535 else
7536   echo "$ac_t""no" 1>&6
7537 with_cde=no
7538 fi
7539
7540  }
7541 test -z "$with_cde" && with_cde=yes
7542 if test "$with_dragndrop" = no; then
7543   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7544   with_cde=no
7545 fi
7546 if test "$with_cde" = "yes" ; then
7547   { test "$extra_verbose" = "yes" && cat << \EOF
7548     Defining HAVE_CDE
7549 EOF
7550 cat >> confdefs.h <<\EOF
7551 #define HAVE_CDE 1
7552 EOF
7553 }
7554
7555   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7556   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7557   with_tooltalk=yes # CDE requires Tooltalk
7558   need_motif=yes    # CDE requires Motif
7559 fi
7560
7561 test "$window_system" != "x11" && with_offix=no
7562 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7563   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7564   with_offix=no
7565 fi
7566 if test "$with_dragndrop" = no; then
7567   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7568   with_offix=no
7569 fi
7570 if test "$with_cde" = yes; then
7571   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7572   with_offix=no
7573 fi
7574 test -z "$with_offix" && with_offix=no
7575 if test "$with_offix" = "yes"; then
7576   { test "$extra_verbose" = "yes" && cat << \EOF
7577     Defining HAVE_OFFIX_DND
7578 EOF
7579 cat >> confdefs.h <<\EOF
7580 #define HAVE_OFFIX_DND 1
7581 EOF
7582 }
7583
7584   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7585   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7586 fi
7587 if test "$with_gtk" = "yes"; then
7588    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7589 fi
7590
7591 if test "$with_dragndrop" != "no" ; then
7592   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7593 echo "configure:7594: checking if drag and drop API is needed" >&5
7594   if test -n "$dragndrop_proto" ; then
7595     with_dragndrop=yes
7596     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7597     { test "$extra_verbose" = "yes" && cat << \EOF
7598     Defining HAVE_DRAGNDROP
7599 EOF
7600 cat >> confdefs.h <<\EOF
7601 #define HAVE_DRAGNDROP 1
7602 EOF
7603 }
7604
7605     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7606   else
7607     with_dragndrop=no
7608     echo "$ac_t""no" 1>&6
7609   fi
7610 fi
7611
7612 echo "checking for LDAP" 1>&6
7613 echo "configure:7614: checking for LDAP" >&5
7614 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7615 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7616 echo "configure:7617: checking for ldap.h" >&5
7617
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 #include <ldap.h>
7622 EOF
7623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7624 { (eval echo configure:7625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7626 if test -z "$ac_err"; then
7627   rm -rf conftest*
7628   eval "ac_cv_header_$ac_safe=yes"
7629 else
7630   echo "$ac_err" >&5
7631   echo "configure: failed program was:" >&5
7632   cat conftest.$ac_ext >&5
7633   rm -rf conftest*
7634   eval "ac_cv_header_$ac_safe=no"
7635 fi
7636 rm -f conftest*
7637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7638   echo "$ac_t""yes" 1>&6
7639   :
7640 else
7641   echo "$ac_t""no" 1>&6
7642 with_ldap=no
7643 fi
7644  }
7645 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7646 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7647 echo "configure:7648: checking for lber.h" >&5
7648
7649 cat > conftest.$ac_ext <<EOF
7650 #line 7651 "configure"
7651 #include "confdefs.h"
7652 #include <lber.h>
7653 EOF
7654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7655 { (eval echo configure:7656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7657 if test -z "$ac_err"; then
7658   rm -rf conftest*
7659   eval "ac_cv_header_$ac_safe=yes"
7660 else
7661   echo "$ac_err" >&5
7662   echo "configure: failed program was:" >&5
7663   cat conftest.$ac_ext >&5
7664   rm -rf conftest*
7665   eval "ac_cv_header_$ac_safe=no"
7666 fi
7667 rm -f conftest*
7668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7669   echo "$ac_t""yes" 1>&6
7670   :
7671 else
7672   echo "$ac_t""no" 1>&6
7673 with_ldap=no
7674 fi
7675  }
7676 if test "$with_ldap" != "no"; then
7677   
7678 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7679 echo "configure:7680: checking for ldap_search in -lldap" >&5
7680 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7681
7682 xe_check_libs=" -lldap "
7683 cat > conftest.$ac_ext <<EOF
7684 #line 7685 "configure"
7685 #include "confdefs.h"
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 /* We use char because int might match the return type of a gcc2
7688     builtin and then its argument prototype would still apply.  */
7689 char ldap_search();
7690
7691 int main() {
7692 ldap_search()
7693 ; return 0; }
7694 EOF
7695 if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7696   rm -rf conftest*
7697   eval "ac_cv_lib_$ac_lib_var=yes"
7698 else
7699   echo "configure: failed program was:" >&5
7700   cat conftest.$ac_ext >&5
7701   rm -rf conftest*
7702   eval "ac_cv_lib_$ac_lib_var=no"
7703 fi
7704 rm -f conftest*
7705 xe_check_libs=""
7706
7707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7708   echo "$ac_t""yes" 1>&6
7709   with_ldap_nolber=yes
7710 else
7711   echo "$ac_t""no" 1>&6
7712 with_ldap_nolber=no
7713 fi
7714
7715
7716   test "$with_ldap_nolber" = "no" && { 
7717 xe_msg_checking="for ldap_open in -lldap"
7718 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7719 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7720 echo "configure:7721: checking "$xe_msg_checking"" >&5
7721 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7722
7723 xe_check_libs=" -lldap -llber"
7724 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 /* Override any gcc2 internal prototype to avoid an error.  */
7728 /* We use char because int might match the return type of a gcc2
7729     builtin and then its argument prototype would still apply.  */
7730 char ldap_open();
7731
7732 int main() {
7733 ldap_open()
7734 ; return 0; }
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7737   rm -rf conftest*
7738   eval "ac_cv_lib_$ac_lib_var=yes"
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -rf conftest*
7743   eval "ac_cv_lib_$ac_lib_var=no"
7744 fi
7745 rm -f conftest*
7746 xe_check_libs=""
7747
7748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7749   echo "$ac_t""yes" 1>&6
7750   with_ldap_lber=yes
7751 else
7752   echo "$ac_t""no" 1>&6
7753 with_ldap_lber=no
7754 fi
7755
7756  }
7757   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7758 xe_msg_checking="for ldap_open in -lldap"
7759 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7760 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7761 echo "configure:7762: checking "$xe_msg_checking"" >&5
7762 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7763
7764 xe_check_libs=" -lldap -llber -lkrb"
7765 cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 /* Override any gcc2 internal prototype to avoid an error.  */
7769 /* We use char because int might match the return type of a gcc2
7770     builtin and then its argument prototype would still apply.  */
7771 char ldap_open();
7772
7773 int main() {
7774 ldap_open()
7775 ; return 0; }
7776 EOF
7777 if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7778   rm -rf conftest*
7779   eval "ac_cv_lib_$ac_lib_var=yes"
7780 else
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=no"
7785 fi
7786 rm -f conftest*
7787 xe_check_libs=""
7788
7789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7790   echo "$ac_t""yes" 1>&6
7791   with_ldap_krb=yes
7792 else
7793   echo "$ac_t""no" 1>&6
7794 with_ldap_krb=no
7795 fi
7796
7797  }
7798   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7799 xe_msg_checking="for ldap_open in -lldap"
7800 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7801 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7802 echo "configure:7803: checking "$xe_msg_checking"" >&5
7803 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7804
7805 xe_check_libs=" -lldap -llber -lkrb -ldes"
7806 cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 /* Override any gcc2 internal prototype to avoid an error.  */
7810 /* We use char because int might match the return type of a gcc2
7811     builtin and then its argument prototype would still apply.  */
7812 char ldap_open();
7813
7814 int main() {
7815 ldap_open()
7816 ; return 0; }
7817 EOF
7818 if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7819   rm -rf conftest*
7820   eval "ac_cv_lib_$ac_lib_var=yes"
7821 else
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_lib_$ac_lib_var=no"
7826 fi
7827 rm -f conftest*
7828 xe_check_libs=""
7829
7830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7831   echo "$ac_t""yes" 1>&6
7832   with_ldap_krbdes=yes
7833 else
7834   echo "$ac_t""no" 1>&6
7835 with_ldap_krbdes=no
7836 fi
7837
7838  }
7839   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
7840 fi
7841 if test "$with_ldap" = "yes"; then
7842   { test "$extra_verbose" = "yes" && cat << \EOF
7843     Defining HAVE_LDAP
7844 EOF
7845 cat >> confdefs.h <<\EOF
7846 #define HAVE_LDAP 1
7847 EOF
7848 }
7849
7850   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7851    echo "    xemacs will be linked with \"eldap.o\""
7852  fi
7853   if test "$with_ldap_nolber" = "yes" ; then
7854     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7855   else
7856     if test "$with_ldap_krb" = "yes" ; then
7857       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7858     fi
7859     if test "$with_ldap_krbdes" = "yes" ; then
7860       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7861       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7862     fi
7863     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7864     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7865   fi
7866   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7867 do
7868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7869 echo "configure:7870: checking for $ac_func" >&5
7870
7871 cat > conftest.$ac_ext <<EOF
7872 #line 7873 "configure"
7873 #include "confdefs.h"
7874 /* System header to define __stub macros and hopefully few prototypes,
7875     which can conflict with char $ac_func(); below.  */
7876 #include <assert.h>
7877 /* Override any gcc2 internal prototype to avoid an error.  */
7878 /* We use char because int might match the return type of a gcc2
7879     builtin and then its argument prototype would still apply.  */
7880 char $ac_func();
7881
7882 int main() {
7883
7884 /* The GNU C library defines this for functions which it implements
7885     to always fail with ENOSYS.  Some functions are actually named
7886     something starting with __ and the normal name is an alias.  */
7887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7888 choke me
7889 #else
7890 $ac_func();
7891 #endif
7892
7893 ; return 0; }
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896   rm -rf conftest*
7897   eval "ac_cv_func_$ac_func=yes"
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   eval "ac_cv_func_$ac_func=no"
7903 fi
7904 rm -f conftest*
7905
7906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7907   echo "$ac_t""yes" 1>&6
7908     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7909   { test "$extra_verbose" = "yes" && cat << EOF
7910     Defining $ac_tr_func
7911 EOF
7912 cat >> confdefs.h <<EOF
7913 #define $ac_tr_func 1
7914 EOF
7915 }
7916  
7917 else
7918   echo "$ac_t""no" 1>&6
7919 fi
7920 done
7921
7922 fi
7923
7924 if test "$with_postgresql" != "no"; then
7925   echo "checking for PostgreSQL" 1>&6
7926 echo "configure:7927: checking for PostgreSQL" >&5
7927
7928   for header_dir in "" "pgsql/" "postgresql/"; do
7929     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7930 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7931 echo "configure:7932: checking for ${header_dir}libpq-fe.h" >&5
7932
7933 cat > conftest.$ac_ext <<EOF
7934 #line 7935 "configure"
7935 #include "confdefs.h"
7936 #include <${header_dir}libpq-fe.h>
7937 EOF
7938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7939 { (eval echo configure:7940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7941 if test -z "$ac_err"; then
7942   rm -rf conftest*
7943   eval "ac_cv_header_$ac_safe=yes"
7944 else
7945   echo "$ac_err" >&5
7946   echo "configure: failed program was:" >&5
7947   cat conftest.$ac_ext >&5
7948   rm -rf conftest*
7949   eval "ac_cv_header_$ac_safe=no"
7950 fi
7951 rm -f conftest*
7952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7953   echo "$ac_t""yes" 1>&6
7954   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7955 else
7956   echo "$ac_t""no" 1>&6
7957 fi
7958
7959   done
7960
7961   test -n "$libpq_fe_h_file" && { 
7962 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7963 echo "configure:7964: checking for PQconnectdb in -lpq" >&5
7964 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7965
7966 xe_check_libs=" -lpq "
7967 cat > conftest.$ac_ext <<EOF
7968 #line 7969 "configure"
7969 #include "confdefs.h"
7970 /* Override any gcc2 internal prototype to avoid an error.  */
7971 /* We use char because int might match the return type of a gcc2
7972     builtin and then its argument prototype would still apply.  */
7973 char PQconnectdb();
7974
7975 int main() {
7976 PQconnectdb()
7977 ; return 0; }
7978 EOF
7979 if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7980   rm -rf conftest*
7981   eval "ac_cv_lib_$ac_lib_var=yes"
7982 else
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   eval "ac_cv_lib_$ac_lib_var=no"
7987 fi
7988 rm -f conftest*
7989 xe_check_libs=""
7990
7991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7992   echo "$ac_t""yes" 1>&6
7993   have_libpq=yes
7994 else
7995   echo "$ac_t""no" 1>&6
7996 fi
7997
7998  }
7999
8000   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8001     with_postgresql=yes
8002     { test "$extra_verbose" = "yes" && cat << \EOF
8003     Defining HAVE_POSTGRESQL
8004 EOF
8005 cat >> confdefs.h <<\EOF
8006 #define HAVE_POSTGRESQL 1
8007 EOF
8008 }
8009
8010     
8011 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8012 echo "configure:8013: checking for PQconnectStart in -lpq" >&5
8013 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8014
8015 xe_check_libs=" -lpq "
8016 cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 /* Override any gcc2 internal prototype to avoid an error.  */
8020 /* We use char because int might match the return type of a gcc2
8021     builtin and then its argument prototype would still apply.  */
8022 char PQconnectStart();
8023
8024 int main() {
8025 PQconnectStart()
8026 ; return 0; }
8027 EOF
8028 if { (eval echo configure:8029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8029   rm -rf conftest*
8030   eval "ac_cv_lib_$ac_lib_var=yes"
8031 else
8032   echo "configure: failed program was:" >&5
8033   cat conftest.$ac_ext >&5
8034   rm -rf conftest*
8035   eval "ac_cv_lib_$ac_lib_var=no"
8036 fi
8037 rm -f conftest*
8038 xe_check_libs=""
8039
8040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8041   echo "$ac_t""yes" 1>&6
8042   with_postgresqlv7=yes;
8043                  { test "$extra_verbose" = "yes" && cat << \EOF
8044     Defining HAVE_POSTGRESQLV7
8045 EOF
8046 cat >> confdefs.h <<\EOF
8047 #define HAVE_POSTGRESQLV7 1
8048 EOF
8049 }
8050
8051 else
8052   echo "$ac_t""no" 1>&6
8053 fi
8054
8055
8056     { test "$extra_verbose" = "yes" && cat << EOF
8057     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8058 EOF
8059 cat >> confdefs.h <<EOF
8060 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8061 EOF
8062 }
8063
8064     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8065     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8066    echo "    xemacs will be linked with \"postgresql.o\""
8067  fi
8068   elif test "$with_postgresql" = "yes"; then
8069     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8070   fi
8071 fi
8072
8073
8074 if test "$window_system" != "none"; then
8075   echo "checking for graphics libraries" 1>&6
8076 echo "configure:8077: checking for graphics libraries" >&5
8077
8078       libpath_xpm=
8079   incpath_xpm=
8080   case "$opsys" in 
8081     cygwin*)
8082       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8083       cygwin_top=`eval "dirname ${cygwin_top}"`;
8084       cygwin_top="${cygwin_top}/..";
8085       case "$window_system" in
8086                 x11)  ;;
8087                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8088              incpath_xpm="-I${cygwin_top}/include/noX"
8089               ;;
8090                 gtk)  ;;
8091                 none) ;;
8092                 *)    ;;
8093       esac
8094       ;;
8095         *) ;;
8096   esac
8097     xpm_problem=""
8098   if test -z "$with_xpm"; then
8099     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8100     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8101     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8102 echo "configure:8103: checking for Xpm - no older than 3.4f" >&5
8103     xe_check_libs=-lXpm
8104     cat > conftest.$ac_ext <<EOF
8105 #line 8106 "configure"
8106 #include "confdefs.h"
8107 #define XPM_NUMBERS
8108 #include <X11/xpm.h>
8109     int main(int c, char **v) {
8110     return c == 1 ? 0 :
8111       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8112       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8113 EOF
8114 if { (eval echo configure:8115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8115 then
8116   ./conftest dummy_arg; xpm_status=$?;
8117       if test "$xpm_status" = "0"; then
8118         with_xpm=yes;
8119       else
8120         with_xpm=no;
8121         if test "$xpm_status" = "1"; then
8122           xpm_problem="Xpm library version and header file version don't match!"
8123         elif test "$xpm_status" = "2"; then
8124           xpm_problem="Xpm library version is too old!"
8125         else
8126           xpm_problem="Internal xpm detection logic error!"
8127         fi
8128         echo "
8129 *** WARNING *** $xpm_problem
8130   I'm not touching that with a 10-foot pole!
8131   If you really want to use the installed version of Xpm, rerun
8132   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8133     fi
8134 else
8135   conftest_rc="$?"
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -fr conftest*
8139   with_xpm=no
8140 fi
8141 rm -fr conftest*
8142     xe_check_libs=
8143     echo "$ac_t""$with_xpm" 1>&6
8144   fi
8145   if test "$with_xpm" = "yes"; then
8146                 { test "$extra_verbose" = "yes" && cat << \EOF
8147     Defining HAVE_XPM
8148 EOF
8149 cat >> confdefs.h <<\EOF
8150 #define HAVE_XPM 1
8151 EOF
8152 }
8153
8154     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8155     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8156     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8157     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8158 echo "configure:8159: checking for \"FOR_MSW\" xpm" >&5
8159     xe_check_libs=-lXpm
8160     cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163
8164 int main() {
8165 XpmCreatePixmapFromData()
8166 ; return 0; }
8167 EOF
8168 if { (eval echo configure:8169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8169   rm -rf conftest*
8170   xpm_for_msw=no
8171 else
8172   echo "configure: failed program was:" >&5
8173   cat conftest.$ac_ext >&5
8174   rm -rf conftest*
8175   xpm_for_msw=yes
8176 fi
8177 rm -f conftest*
8178     xe_check_libs=
8179     echo "$ac_t""$xpm_for_msw" 1>&6
8180     if test "$xpm_for_msw" = "yes"; then
8181       { test "$extra_verbose" = "yes" && cat << \EOF
8182     Defining FOR_MSW
8183 EOF
8184 cat >> confdefs.h <<\EOF
8185 #define FOR_MSW 1
8186 EOF
8187 }
8188
8189     fi
8190   fi
8191
8192     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8193 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8194 echo "configure:8195: checking for compface.h" >&5
8195
8196 cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199 #include <compface.h>
8200 EOF
8201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8202 { (eval echo configure:8203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8204 if test -z "$ac_err"; then
8205   rm -rf conftest*
8206   eval "ac_cv_header_$ac_safe=yes"
8207 else
8208   echo "$ac_err" >&5
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_header_$ac_safe=no"
8213 fi
8214 rm -f conftest*
8215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8216   echo "$ac_t""yes" 1>&6
8217   :
8218 else
8219   echo "$ac_t""no" 1>&6
8220 with_xface=no
8221 fi
8222  }
8223   test -z "$with_xface" && { 
8224 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8225 echo "configure:8226: checking for UnGenFace in -lcompface" >&5
8226 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8227
8228 xe_check_libs=" -lcompface "
8229 cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 /* Override any gcc2 internal prototype to avoid an error.  */
8233 /* We use char because int might match the return type of a gcc2
8234     builtin and then its argument prototype would still apply.  */
8235 char UnGenFace();
8236
8237 int main() {
8238 UnGenFace()
8239 ; return 0; }
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8242   rm -rf conftest*
8243   eval "ac_cv_lib_$ac_lib_var=yes"
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   eval "ac_cv_lib_$ac_lib_var=no"
8249 fi
8250 rm -f conftest*
8251 xe_check_libs=""
8252
8253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8254   echo "$ac_t""yes" 1>&6
8255   : 
8256 else
8257   echo "$ac_t""no" 1>&6
8258 with_xface=no
8259 fi
8260
8261  }
8262   test -z "$with_xface" && with_xface=yes
8263   if test "$with_xface" = "yes"; then
8264     { test "$extra_verbose" = "yes" && cat << \EOF
8265     Defining HAVE_XFACE
8266 EOF
8267 cat >> confdefs.h <<\EOF
8268 #define HAVE_XFACE 1
8269 EOF
8270 }
8271
8272     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8273   fi
8274
8275         if test "$with_gif" != "no"; then
8276     with_gif="yes"
8277     { test "$extra_verbose" = "yes" && cat << \EOF
8278     Defining HAVE_GIF
8279 EOF
8280 cat >> confdefs.h <<\EOF
8281 #define HAVE_GIF 1
8282 EOF
8283 }
8284
8285     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8286    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8287  fi
8288   fi
8289
8290       if test "$with_png $with_tiff" != "no no"; then
8291     
8292 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8293 echo "configure:8294: checking for inflate in -lc" >&5
8294 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8295
8296 xe_check_libs=" -lc "
8297 cat > conftest.$ac_ext <<EOF
8298 #line 8299 "configure"
8299 #include "confdefs.h"
8300 /* Override any gcc2 internal prototype to avoid an error.  */
8301 /* We use char because int might match the return type of a gcc2
8302     builtin and then its argument prototype would still apply.  */
8303 char inflate();
8304
8305 int main() {
8306 inflate()
8307 ; return 0; }
8308 EOF
8309 if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8310   rm -rf conftest*
8311   eval "ac_cv_lib_$ac_lib_var=yes"
8312 else
8313   echo "configure: failed program was:" >&5
8314   cat conftest.$ac_ext >&5
8315   rm -rf conftest*
8316   eval "ac_cv_lib_$ac_lib_var=no"
8317 fi
8318 rm -f conftest*
8319 xe_check_libs=""
8320
8321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8322   echo "$ac_t""yes" 1>&6
8323   :
8324 else
8325   echo "$ac_t""no" 1>&6
8326
8327 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8328 echo "configure:8329: checking for inflate in -lz" >&5
8329 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8330
8331 xe_check_libs=" -lz "
8332 cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 /* Override any gcc2 internal prototype to avoid an error.  */
8336 /* We use char because int might match the return type of a gcc2
8337     builtin and then its argument prototype would still apply.  */
8338 char inflate();
8339
8340 int main() {
8341 inflate()
8342 ; return 0; }
8343 EOF
8344 if { (eval echo configure:8345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8345   rm -rf conftest*
8346   eval "ac_cv_lib_$ac_lib_var=yes"
8347 else
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_lib_$ac_lib_var=no"
8352 fi
8353 rm -f conftest*
8354 xe_check_libs=""
8355
8356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8357   echo "$ac_t""yes" 1>&6
8358   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8359 else
8360   echo "$ac_t""no" 1>&6
8361
8362 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8363 echo "configure:8364: checking for inflate in -lgz" >&5
8364 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8365
8366 xe_check_libs=" -lgz "
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char inflate();
8374
8375 int main() {
8376 inflate()
8377 ; return 0; }
8378 EOF
8379 if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8380   rm -rf conftest*
8381   eval "ac_cv_lib_$ac_lib_var=yes"
8382 else
8383   echo "configure: failed program was:" >&5
8384   cat conftest.$ac_ext >&5
8385   rm -rf conftest*
8386   eval "ac_cv_lib_$ac_lib_var=no"
8387 fi
8388 rm -f conftest*
8389 xe_check_libs=""
8390
8391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8392   echo "$ac_t""yes" 1>&6
8393   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8394 else
8395   echo "$ac_t""no" 1>&6
8396 fi
8397
8398
8399 fi
8400
8401
8402 fi
8403
8404
8405   fi
8406
8407     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8408 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8409 echo "configure:8410: checking for jpeglib.h" >&5
8410
8411 cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 #include <jpeglib.h>
8415 EOF
8416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8417 { (eval echo configure:8418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8419 if test -z "$ac_err"; then
8420   rm -rf conftest*
8421   eval "ac_cv_header_$ac_safe=yes"
8422 else
8423   echo "$ac_err" >&5
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -rf conftest*
8427   eval "ac_cv_header_$ac_safe=no"
8428 fi
8429 rm -f conftest*
8430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432   :
8433 else
8434   echo "$ac_t""no" 1>&6
8435 with_jpeg=no
8436 fi
8437  }
8438   test -z "$with_jpeg" && { 
8439 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8440 echo "configure:8441: checking for jpeg_destroy_decompress in -ljpeg" >&5
8441 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8442
8443 xe_check_libs=" -ljpeg "
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 jpeg_destroy_decompress();
8451
8452 int main() {
8453 jpeg_destroy_decompress()
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 with_jpeg=no
8474 fi
8475
8476  }
8477   test -z "$with_jpeg" && with_jpeg=yes
8478   if test "$with_jpeg" = "yes"; then
8479     { test "$extra_verbose" = "yes" && cat << \EOF
8480     Defining HAVE_JPEG
8481 EOF
8482 cat >> confdefs.h <<\EOF
8483 #define HAVE_JPEG 1
8484 EOF
8485 }
8486
8487     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8488   fi
8489
8490     png_problem=""
8491   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8492 echo "configure:8493: checking for pow" >&5
8493
8494 cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497 /* System header to define __stub macros and hopefully few prototypes,
8498     which can conflict with char pow(); below.  */
8499 #include <assert.h>
8500 /* Override any gcc2 internal prototype to avoid an error.  */
8501 /* We use char because int might match the return type of a gcc2
8502     builtin and then its argument prototype would still apply.  */
8503 char pow();
8504
8505 int main() {
8506
8507 /* The GNU C library defines this for functions which it implements
8508     to always fail with ENOSYS.  Some functions are actually named
8509     something starting with __ and the normal name is an alias.  */
8510 #if defined (__stub_pow) || defined (__stub___pow)
8511 choke me
8512 #else
8513 pow();
8514 #endif
8515
8516 ; return 0; }
8517 EOF
8518 if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8519   rm -rf conftest*
8520   eval "ac_cv_func_pow=yes"
8521 else
8522   echo "configure: failed program was:" >&5
8523   cat conftest.$ac_ext >&5
8524   rm -rf conftest*
8525   eval "ac_cv_func_pow=no"
8526 fi
8527 rm -f conftest*
8528
8529 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531   :
8532 else
8533   echo "$ac_t""no" 1>&6
8534 with_png=no
8535 fi
8536  }
8537   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8538 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8539 echo "configure:8540: checking for png.h" >&5
8540
8541 cat > conftest.$ac_ext <<EOF
8542 #line 8543 "configure"
8543 #include "confdefs.h"
8544 #include <png.h>
8545 EOF
8546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8547 { (eval echo configure:8548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8549 if test -z "$ac_err"; then
8550   rm -rf conftest*
8551   eval "ac_cv_header_$ac_safe=yes"
8552 else
8553   echo "$ac_err" >&5
8554   echo "configure: failed program was:" >&5
8555   cat conftest.$ac_ext >&5
8556   rm -rf conftest*
8557   eval "ac_cv_header_$ac_safe=no"
8558 fi
8559 rm -f conftest*
8560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8561   echo "$ac_t""yes" 1>&6
8562   :
8563 else
8564   echo "$ac_t""no" 1>&6
8565 with_png=no
8566 fi
8567  }
8568   test -z "$with_png" && { 
8569 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8570 echo "configure:8571: checking for png_read_image in -lpng" >&5
8571 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8572
8573 xe_check_libs=" -lpng "
8574 cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 /* Override any gcc2 internal prototype to avoid an error.  */
8578 /* We use char because int might match the return type of a gcc2
8579     builtin and then its argument prototype would still apply.  */
8580 char png_read_image();
8581
8582 int main() {
8583 png_read_image()
8584 ; return 0; }
8585 EOF
8586 if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8587   rm -rf conftest*
8588   eval "ac_cv_lib_$ac_lib_var=yes"
8589 else
8590   echo "configure: failed program was:" >&5
8591   cat conftest.$ac_ext >&5
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=no"
8594 fi
8595 rm -f conftest*
8596 xe_check_libs=""
8597
8598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8599   echo "$ac_t""yes" 1>&6
8600   :
8601 else
8602   echo "$ac_t""no" 1>&6
8603 with_png=no
8604 fi
8605
8606  }
8607   if test -z "$with_png"; then
8608     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8609 echo "configure:8610: checking for workable png version information" >&5
8610     xe_check_libs="-lpng -lz"
8611     cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 #include <png.h>
8615     int main(int c, char **v) {
8616     if (c == 1) return 0;
8617     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8618     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8619 EOF
8620 if { (eval echo configure:8621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8621 then
8622   ./conftest dummy_arg; png_status=$?;
8623       if test "$png_status" = "0"; then
8624         with_png=yes;
8625       else
8626         with_png=no;
8627         if test "$png_status" = "1"; then
8628           png_problem="PNG library version and header file don't match!"
8629         elif test "$png_status" = "2"; then
8630           png_problem="PNG library version too old (pre 1.0.2)!"
8631         fi
8632         echo "
8633 *** WARNING *** $png_problem
8634   I'm not touching that with a 10-foot pole!
8635   If you really want to use the installed version of libPNG, rerun
8636   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8637     fi
8638 else
8639   conftest_rc="$?"
8640   echo "configure: failed program was:" >&5
8641   cat conftest.$ac_ext >&5
8642   rm -fr conftest*
8643   with_png=no
8644 fi
8645 rm -fr conftest*
8646     xe_check_libs=
8647     echo "$ac_t""$with_png" 1>&6
8648   fi
8649   if test "$with_png" = "yes"; then
8650     { test "$extra_verbose" = "yes" && cat << \EOF
8651     Defining HAVE_PNG
8652 EOF
8653 cat >> confdefs.h <<\EOF
8654 #define HAVE_PNG 1
8655 EOF
8656 }
8657
8658     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8659   fi
8660
8661     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8662 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8663 echo "configure:8664: checking for tiffio.h" >&5
8664
8665 cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <tiffio.h>
8669 EOF
8670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8671 { (eval echo configure:8672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8673 if test -z "$ac_err"; then
8674   rm -rf conftest*
8675   eval "ac_cv_header_$ac_safe=yes"
8676 else
8677   echo "$ac_err" >&5
8678   echo "configure: failed program was:" >&5
8679   cat conftest.$ac_ext >&5
8680   rm -rf conftest*
8681   eval "ac_cv_header_$ac_safe=no"
8682 fi
8683 rm -f conftest*
8684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8685   echo "$ac_t""yes" 1>&6
8686   :
8687 else
8688   echo "$ac_t""no" 1>&6
8689 with_tiff=no
8690 fi
8691  }
8692   test -z "$with_tiff" && { 
8693 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8694 echo "configure:8695: checking for TIFFClientOpen in -ltiff" >&5
8695 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8696
8697 xe_check_libs=" -ltiff "
8698 cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 /* Override any gcc2 internal prototype to avoid an error.  */
8702 /* We use char because int might match the return type of a gcc2
8703     builtin and then its argument prototype would still apply.  */
8704 char TIFFClientOpen();
8705
8706 int main() {
8707 TIFFClientOpen()
8708 ; return 0; }
8709 EOF
8710 if { (eval echo configure:8711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8711   rm -rf conftest*
8712   eval "ac_cv_lib_$ac_lib_var=yes"
8713 else
8714   echo "configure: failed program was:" >&5
8715   cat conftest.$ac_ext >&5
8716   rm -rf conftest*
8717   eval "ac_cv_lib_$ac_lib_var=no"
8718 fi
8719 rm -f conftest*
8720 xe_check_libs=""
8721
8722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8723   echo "$ac_t""yes" 1>&6
8724   :
8725 else
8726   echo "$ac_t""no" 1>&6
8727 with_tiff=no
8728 fi
8729
8730  }
8731   test -z "$with_tiff" && with_tiff=yes
8732   if test "$with_tiff" = "yes"; then
8733     { test "$extra_verbose" = "yes" && cat << \EOF
8734     Defining HAVE_TIFF
8735 EOF
8736 cat >> confdefs.h <<\EOF
8737 #define HAVE_TIFF 1
8738 EOF
8739 }
8740
8741     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8742   fi
8743 fi
8744
8745
8746 if test "$with_gtk" = "yes"; then
8747     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8748 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8749 echo "configure:8750: checking for compface.h" >&5
8750
8751 cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 #include <compface.h>
8755 EOF
8756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8757 { (eval echo configure:8758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8759 if test -z "$ac_err"; then
8760   rm -rf conftest*
8761   eval "ac_cv_header_$ac_safe=yes"
8762 else
8763   echo "$ac_err" >&5
8764   echo "configure: failed program was:" >&5
8765   cat conftest.$ac_ext >&5
8766   rm -rf conftest*
8767   eval "ac_cv_header_$ac_safe=no"
8768 fi
8769 rm -f conftest*
8770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8771   echo "$ac_t""yes" 1>&6
8772   :
8773 else
8774   echo "$ac_t""no" 1>&6
8775 with_xface=no
8776 fi
8777  }
8778   test -z "$with_xface" && { 
8779 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8780 echo "configure:8781: checking for UnGenFace in -lcompface" >&5
8781 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8782
8783 xe_check_libs=" -lcompface "
8784 cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787 /* Override any gcc2 internal prototype to avoid an error.  */
8788 /* We use char because int might match the return type of a gcc2
8789     builtin and then its argument prototype would still apply.  */
8790 char UnGenFace();
8791
8792 int main() {
8793 UnGenFace()
8794 ; return 0; }
8795 EOF
8796 if { (eval echo configure:8797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8797   rm -rf conftest*
8798   eval "ac_cv_lib_$ac_lib_var=yes"
8799 else
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -rf conftest*
8803   eval "ac_cv_lib_$ac_lib_var=no"
8804 fi
8805 rm -f conftest*
8806 xe_check_libs=""
8807
8808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8809   echo "$ac_t""yes" 1>&6
8810   : 
8811 else
8812   echo "$ac_t""no" 1>&6
8813 with_xface=no
8814 fi
8815
8816  }
8817   test -z "$with_xface" && with_xface=yes
8818   if test "$with_xface" = "yes"; then
8819     { test "$extra_verbose" = "yes" && cat << \EOF
8820     Defining HAVE_XFACE
8821 EOF
8822 cat >> confdefs.h <<\EOF
8823 #define HAVE_XFACE 1
8824 EOF
8825 }
8826
8827     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8828   fi
8829 fi
8830
8831
8832
8833 if test "$with_x11" = "yes"; then
8834   echo "checking for X11 graphics libraries" 1>&6
8835 echo "configure:8836: checking for X11 graphics libraries" >&5
8836 fi
8837
8838 case "$with_widgets" in
8839   "yes" | "athena")             detect_athena=yes ;;
8840    *)                           detect_athena=no ;;
8841 esac
8842
8843 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8844   echo "checking for the Athena widgets" 1>&6
8845 echo "configure:8846: checking for the Athena widgets" >&5
8846
8847     case "$with_athena" in
8848         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8849     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8850     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8851     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8852     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8853     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8854   esac
8855
8856     if test "$athena_3d" = "no"; then
8857     
8858 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8859 echo "configure:8860: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8860 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8861
8862 xe_check_libs=" -l$athena_variant "
8863 cat > conftest.$ac_ext <<EOF
8864 #line 8865 "configure"
8865 #include "confdefs.h"
8866 /* Override any gcc2 internal prototype to avoid an error.  */
8867 /* We use char because int might match the return type of a gcc2
8868     builtin and then its argument prototype would still apply.  */
8869 char XawScrollbarSetThumb();
8870
8871 int main() {
8872 XawScrollbarSetThumb()
8873 ; return 0; }
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8876   rm -rf conftest*
8877   eval "ac_cv_lib_$ac_lib_var=yes"
8878 else
8879   echo "configure: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   rm -rf conftest*
8882   eval "ac_cv_lib_$ac_lib_var=no"
8883 fi
8884 rm -f conftest*
8885 xe_check_libs=""
8886
8887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8888   echo "$ac_t""yes" 1>&6
8889           
8890 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8891 echo "configure:8892: checking for threeDClassRec in -l$athena_variant" >&5
8892 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8893
8894 xe_check_libs=" -l$athena_variant "
8895 cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* Override any gcc2 internal prototype to avoid an error.  */
8899 /* We use char because int might match the return type of a gcc2
8900     builtin and then its argument prototype would still apply.  */
8901 char threeDClassRec();
8902
8903 int main() {
8904 threeDClassRec()
8905 ; return 0; }
8906 EOF
8907 if { (eval echo configure:8908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8908   rm -rf conftest*
8909   eval "ac_cv_lib_$ac_lib_var=yes"
8910 else
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_lib_$ac_lib_var=no"
8915 fi
8916 rm -f conftest*
8917 xe_check_libs=""
8918
8919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8920   echo "$ac_t""yes" 1>&6
8921   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8922 else
8923   echo "$ac_t""no" 1>&6
8924 athena_lib=$athena_variant
8925 fi
8926
8927
8928       
8929 else
8930   echo "$ac_t""no" 1>&6
8931 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8932 fi
8933
8934
8935   else
8936         
8937 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8938 echo "configure:8939: checking for threeDClassRec in -l$athena_variant" >&5
8939 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8940
8941 xe_check_libs=" -l$athena_variant "
8942 cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945 /* Override any gcc2 internal prototype to avoid an error.  */
8946 /* We use char because int might match the return type of a gcc2
8947     builtin and then its argument prototype would still apply.  */
8948 char threeDClassRec();
8949
8950 int main() {
8951 threeDClassRec()
8952 ; return 0; }
8953 EOF
8954 if { (eval echo configure:8955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8955   rm -rf conftest*
8956   eval "ac_cv_lib_$ac_lib_var=yes"
8957 else
8958   echo "configure: failed program was:" >&5
8959   cat conftest.$ac_ext >&5
8960   rm -rf conftest*
8961   eval "ac_cv_lib_$ac_lib_var=no"
8962 fi
8963 rm -f conftest*
8964 xe_check_libs=""
8965
8966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8967   echo "$ac_t""yes" 1>&6
8968   athena_lib=$athena_variant
8969 else
8970   echo "$ac_t""no" 1>&6
8971 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8972 echo "configure:8973: checking for threeDClassRec in -lXaw" >&5
8973 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8974
8975 xe_check_libs=" -lXaw "
8976 cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8979 /* Override any gcc2 internal prototype to avoid an error.  */
8980 /* We use char because int might match the return type of a gcc2
8981     builtin and then its argument prototype would still apply.  */
8982 char threeDClassRec();
8983
8984 int main() {
8985 threeDClassRec()
8986 ; return 0; }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8989   rm -rf conftest*
8990   eval "ac_cv_lib_$ac_lib_var=yes"
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -rf conftest*
8995   eval "ac_cv_lib_$ac_lib_var=no"
8996 fi
8997 rm -f conftest*
8998 xe_check_libs=""
8999
9000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9001   echo "$ac_t""yes" 1>&6
9002   athena_lib=Xaw;
9003           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9004         
9005 else
9006   echo "$ac_t""no" 1>&6
9007 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9008 fi
9009
9010
9011 fi
9012
9013
9014   fi
9015
9016     if test "$athena_3d" = "no"; then
9017     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9018 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9019 echo "configure:9020: checking for X11/Xaw/ThreeD.h" >&5
9020
9021 cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 #include <X11/Xaw/ThreeD.h>
9025 EOF
9026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9027 { (eval echo configure:9028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9029 if test -z "$ac_err"; then
9030   rm -rf conftest*
9031   eval "ac_cv_header_$ac_safe=yes"
9032 else
9033   echo "$ac_err" >&5
9034   echo "configure: failed program was:" >&5
9035   cat conftest.$ac_ext >&5
9036   rm -rf conftest*
9037   eval "ac_cv_header_$ac_safe=no"
9038 fi
9039 rm -f conftest*
9040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9043 else
9044   echo "$ac_t""no" 1>&6
9045 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9046 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9047 echo "configure:9048: checking for X11/Xaw/XawInit.h" >&5
9048
9049 cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052 #include <X11/Xaw/XawInit.h>
9053 EOF
9054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9055 { (eval echo configure:9056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9057 if test -z "$ac_err"; then
9058   rm -rf conftest*
9059   eval "ac_cv_header_$ac_safe=yes"
9060 else
9061   echo "$ac_err" >&5
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -rf conftest*
9065   eval "ac_cv_header_$ac_safe=no"
9066 fi
9067 rm -f conftest*
9068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9069   echo "$ac_t""yes" 1>&6
9070   athena_h_path=X11/Xaw
9071 else
9072   echo "$ac_t""no" 1>&6
9073 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9074 fi
9075
9076 fi
9077
9078   else
9079             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9080 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9081 echo "configure:9082: checking for X11/$athena_variant/XawInit.h" >&5
9082
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 #include <X11/$athena_variant/XawInit.h>
9087 EOF
9088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9089 { (eval echo configure:9090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9091 if test -z "$ac_err"; then
9092   rm -rf conftest*
9093   eval "ac_cv_header_$ac_safe=yes"
9094 else
9095   echo "$ac_err" >&5
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_header_$ac_safe=no"
9100 fi
9101 rm -f conftest*
9102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9105 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9106 echo "configure:9107: checking for X11/$athena_variant/ThreeD.h" >&5
9107
9108 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111 #include <X11/$athena_variant/ThreeD.h>
9112 EOF
9113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9114 { (eval echo configure:9115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9116 if test -z "$ac_err"; then
9117   rm -rf conftest*
9118   eval "ac_cv_header_$ac_safe=yes"
9119 else
9120   echo "$ac_err" >&5
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_header_$ac_safe=no"
9125 fi
9126 rm -f conftest*
9127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9128   echo "$ac_t""yes" 1>&6
9129   athena_h_path=X11/$athena_variant
9130 else
9131   echo "$ac_t""no" 1>&6
9132 fi
9133
9134 else
9135   echo "$ac_t""no" 1>&6
9136 fi
9137
9138
9139         if test -z "$athena_h_path"; then
9140       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9141 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9142 echo "configure:9143: checking for $athena_variant/XawInit.h" >&5
9143
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <$athena_variant/XawInit.h>
9148 EOF
9149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9150 { (eval echo configure:9151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9152 if test -z "$ac_err"; then
9153   rm -rf conftest*
9154   eval "ac_cv_header_$ac_safe=yes"
9155 else
9156   echo "$ac_err" >&5
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159   rm -rf conftest*
9160   eval "ac_cv_header_$ac_safe=no"
9161 fi
9162 rm -f conftest*
9163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9164   echo "$ac_t""yes" 1>&6
9165   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9166 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9167 echo "configure:9168: checking for $athena_variant/ThreeD.h" >&5
9168
9169 cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <$athena_variant/ThreeD.h>
9173 EOF
9174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9175 { (eval echo configure:9176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9177 if test -z "$ac_err"; then
9178   rm -rf conftest*
9179   eval "ac_cv_header_$ac_safe=yes"
9180 else
9181   echo "$ac_err" >&5
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   eval "ac_cv_header_$ac_safe=no"
9186 fi
9187 rm -f conftest*
9188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9189   echo "$ac_t""yes" 1>&6
9190   athena_h_path=$athena_variant
9191 else
9192   echo "$ac_t""no" 1>&6
9193 fi
9194
9195 else
9196   echo "$ac_t""no" 1>&6
9197 fi
9198
9199     fi
9200
9201         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9202       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9203 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9204 echo "configure:9205: checking for X11/Xaw3d/XawInit.h" >&5
9205
9206 cat > conftest.$ac_ext <<EOF
9207 #line 9208 "configure"
9208 #include "confdefs.h"
9209 #include <X11/Xaw3d/XawInit.h>
9210 EOF
9211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9212 { (eval echo configure:9213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9214 if test -z "$ac_err"; then
9215   rm -rf conftest*
9216   eval "ac_cv_header_$ac_safe=yes"
9217 else
9218   echo "$ac_err" >&5
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   eval "ac_cv_header_$ac_safe=no"
9223 fi
9224 rm -f conftest*
9225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9226   echo "$ac_t""yes" 1>&6
9227   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9228 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9229 echo "configure:9230: checking for X11/Xaw3d/ThreeD.h" >&5
9230
9231 cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 #include <X11/Xaw3d/ThreeD.h>
9235 EOF
9236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9237 { (eval echo configure:9238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9239 if test -z "$ac_err"; then
9240   rm -rf conftest*
9241   eval "ac_cv_header_$ac_safe=yes"
9242 else
9243   echo "$ac_err" >&5
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   eval "ac_cv_header_$ac_safe=no"
9248 fi
9249 rm -f conftest*
9250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9251   echo "$ac_t""yes" 1>&6
9252   
9253             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9254             athena_h_path=X11/Xaw3d
9255           
9256 else
9257   echo "$ac_t""no" 1>&6
9258 fi
9259
9260 else
9261   echo "$ac_t""no" 1>&6
9262 fi
9263
9264     fi
9265
9266         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9267       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9268 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9269 echo "configure:9270: checking for Xaw3d/XawInit.h" >&5
9270
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274 #include <Xaw3d/XawInit.h>
9275 EOF
9276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9277 { (eval echo configure:9278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9279 if test -z "$ac_err"; then
9280   rm -rf conftest*
9281   eval "ac_cv_header_$ac_safe=yes"
9282 else
9283   echo "$ac_err" >&5
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -rf conftest*
9287   eval "ac_cv_header_$ac_safe=no"
9288 fi
9289 rm -f conftest*
9290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9293 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9294 echo "configure:9295: checking for Xaw3d/ThreeD.h" >&5
9295
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <Xaw3d/ThreeD.h>
9300 EOF
9301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9302 { (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9304 if test -z "$ac_err"; then
9305   rm -rf conftest*
9306   eval "ac_cv_header_$ac_safe=yes"
9307 else
9308   echo "$ac_err" >&5
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=no"
9313 fi
9314 rm -f conftest*
9315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317   
9318             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9319             athena_h_path=Xaw3d
9320           
9321 else
9322   echo "$ac_t""no" 1>&6
9323 fi
9324
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328
9329     fi
9330
9331             if test -z "$athena_h_path"; then
9332       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9333 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9334 echo "configure:9335: checking for X11/Xaw/ThreeD.h" >&5
9335
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 #include <X11/Xaw/ThreeD.h>
9340 EOF
9341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9342 { (eval echo configure:9343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9344 if test -z "$ac_err"; then
9345   rm -rf conftest*
9346   eval "ac_cv_header_$ac_safe=yes"
9347 else
9348   echo "$ac_err" >&5
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   eval "ac_cv_header_$ac_safe=no"
9353 fi
9354 rm -f conftest*
9355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9356   echo "$ac_t""yes" 1>&6
9357   
9358           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9359           athena_h_path=X11/Xaw
9360         
9361 else
9362   echo "$ac_t""no" 1>&6
9363 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9364 fi
9365
9366     fi
9367   fi
9368
9369     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9370     have_xaw=yes
9371   else
9372     have_xaw=no
9373   fi
9374
9375 else
9376   have_xaw=no
9377 fi 
9378 if test "$with_x11" = "yes"; then
9379     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9380 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9381 echo "configure:9382: checking for Xm/Xm.h" >&5
9382
9383 cat > conftest.$ac_ext <<EOF
9384 #line 9385 "configure"
9385 #include "confdefs.h"
9386 #include <Xm/Xm.h>
9387 EOF
9388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9389 { (eval echo configure:9390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9391 if test -z "$ac_err"; then
9392   rm -rf conftest*
9393   eval "ac_cv_header_$ac_safe=yes"
9394 else
9395   echo "$ac_err" >&5
9396   echo "configure: failed program was:" >&5
9397   cat conftest.$ac_ext >&5
9398   rm -rf conftest*
9399   eval "ac_cv_header_$ac_safe=no"
9400 fi
9401 rm -f conftest*
9402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9403   echo "$ac_t""yes" 1>&6
9404   
9405 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9406 echo "configure:9407: checking for XmStringFree in -lXm" >&5
9407 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9408
9409 xe_check_libs=" -lXm "
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413 /* Override any gcc2 internal prototype to avoid an error.  */
9414 /* We use char because int might match the return type of a gcc2
9415     builtin and then its argument prototype would still apply.  */
9416 char XmStringFree();
9417
9418 int main() {
9419 XmStringFree()
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=yes"
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_lib_$ac_lib_var=no"
9430 fi
9431 rm -f conftest*
9432 xe_check_libs=""
9433
9434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9435   echo "$ac_t""yes" 1>&6
9436   have_motif=yes
9437 else
9438   echo "$ac_t""no" 1>&6
9439 have_motif=no
9440 fi
9441
9442
9443 else
9444   echo "$ac_t""no" 1>&6
9445 have_motif=no
9446 fi
9447
9448
9449   if test "$have_motif" = "yes"; then
9450         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9451 echo "configure:9452: checking for Lesstif" >&5
9452     cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 #include <Xm/Xm.h>
9456 #ifdef LESSTIF_VERSION
9457 yes
9458 #endif
9459
9460 EOF
9461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9462   egrep "yes" >/dev/null 2>&1; then
9463   rm -rf conftest*
9464   have_lesstif=yes
9465 else
9466   rm -rf conftest*
9467   have_lesstif=no
9468 fi
9469 rm -f conftest*
9470
9471   echo "$ac_t""$have_lesstif" 1>&6
9472   fi
9473
9474 fi 
9475
9476 case "$with_menubars" in "" | "yes" | "athena" )
9477   with_menubars="lucid" ;;
9478 esac
9479 case "$with_dialogs" in "" | "yes" | "lucid" )
9480   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9481   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9482   else with_dialogs=no
9483   fi ;;
9484 esac
9485 case "$with_scrollbars" in "" | "yes" )
9486   with_scrollbars="lucid" ;;
9487 esac
9488 case "$with_widgets" in "" | "yes" | "lucid")
9489   if   test "$have_motif" = "yes"; then with_widgets="motif"
9490   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9491   else with_widgets=no
9492   fi ;;
9493 esac
9494
9495 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9496
9497 case "$all_widgets" in
9498   *athena* )
9499     if test "$have_xaw" != "yes"; then
9500       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9501     fi
9502
9503         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9504
9505         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9506
9507                     { test "$extra_verbose" = "yes" && cat << EOF
9508     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9509 EOF
9510 cat >> confdefs.h <<EOF
9511 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9512 EOF
9513 }
9514
9515     { test "$extra_verbose" = "yes" && cat << EOF
9516     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9517 EOF
9518 cat >> confdefs.h <<EOF
9519 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9520 EOF
9521 }
9522
9523     { test "$extra_verbose" = "yes" && cat << EOF
9524     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9525 EOF
9526 cat >> confdefs.h <<EOF
9527 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9528 EOF
9529 }
9530
9531     { test "$extra_verbose" = "yes" && cat << EOF
9532     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9533 EOF
9534 cat >> confdefs.h <<EOF
9535 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9536 EOF
9537 }
9538
9539     { test "$extra_verbose" = "yes" && cat << EOF
9540     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9541 EOF
9542 cat >> confdefs.h <<EOF
9543 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9544 EOF
9545 }
9546
9547     { test "$extra_verbose" = "yes" && cat << EOF
9548     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9549 EOF
9550 cat >> confdefs.h <<EOF
9551 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9552 EOF
9553 }
9554
9555     { test "$extra_verbose" = "yes" && cat << EOF
9556     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9557 EOF
9558 cat >> confdefs.h <<EOF
9559 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9560 EOF
9561 }
9562
9563     { test "$extra_verbose" = "yes" && cat << EOF
9564     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9565 EOF
9566 cat >> confdefs.h <<EOF
9567 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9568 EOF
9569 }
9570
9571     { test "$extra_verbose" = "yes" && cat << EOF
9572     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9573 EOF
9574 cat >> confdefs.h <<EOF
9575 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9576 EOF
9577 }
9578
9579     { test "$extra_verbose" = "yes" && cat << EOF
9580     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9581 EOF
9582 cat >> confdefs.h <<EOF
9583 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9584 EOF
9585 }
9586
9587
9588     { test "$extra_verbose" = "yes" && cat << \EOF
9589     Defining LWLIB_USES_ATHENA
9590 EOF
9591 cat >> confdefs.h <<\EOF
9592 #define LWLIB_USES_ATHENA 1
9593 EOF
9594 }
9595
9596     { test "$extra_verbose" = "yes" && cat << \EOF
9597     Defining NEED_ATHENA
9598 EOF
9599 cat >> confdefs.h <<\EOF
9600 #define NEED_ATHENA 1
9601 EOF
9602 }
9603
9604     need_athena="yes"
9605
9606     if test "$athena_3d" = "yes"; then
9607       { test "$extra_verbose" = "yes" && cat << \EOF
9608     Defining HAVE_ATHENA_3D
9609 EOF
9610 cat >> confdefs.h <<\EOF
9611 #define HAVE_ATHENA_3D 1
9612 EOF
9613 }
9614
9615     fi
9616   ;;
9617 esac
9618
9619 case "$all_widgets" in *motif* )
9620   { test "$extra_verbose" = "yes" && cat << \EOF
9621     Defining LWLIB_USES_MOTIF
9622 EOF
9623 cat >> confdefs.h <<\EOF
9624 #define LWLIB_USES_MOTIF 1
9625 EOF
9626 }
9627
9628   { test "$extra_verbose" = "yes" && cat << \EOF
9629     Defining NEED_MOTIF
9630 EOF
9631 cat >> confdefs.h <<\EOF
9632 #define NEED_MOTIF 1
9633 EOF
9634 }
9635
9636   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9637   need_motif=yes ;;
9638 esac
9639
9640 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9641 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9642 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9643 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9644         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9645 case "$with_widgets" in athena* )
9646         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;;
9647 esac
9648 case "$all_widgets" in *lucid* )
9649   { test "$extra_verbose" = "yes" && cat << \EOF
9650     Defining NEED_LUCID
9651 EOF
9652 cat >> confdefs.h <<\EOF
9653 #define NEED_LUCID 1
9654 EOF
9655 }
9656
9657   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9658 esac
9659
9660
9661
9662 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9663     Defining LWLIB_SCROLLBARS_ATHENA
9664 EOF
9665 cat >> confdefs.h <<\EOF
9666 #define LWLIB_SCROLLBARS_ATHENA 1
9667 EOF
9668 }
9669
9670 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9671     Defining LWLIB_DIALOGS_ATHENA
9672 EOF
9673 cat >> confdefs.h <<\EOF
9674 #define LWLIB_DIALOGS_ATHENA 1
9675 EOF
9676 }
9677
9678
9679 if test "$athena_3d" = "yes"; then
9680   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9681     Defining LWLIB_SCROLLBARS_ATHENA3D
9682 EOF
9683 cat >> confdefs.h <<\EOF
9684 #define LWLIB_SCROLLBARS_ATHENA3D 1
9685 EOF
9686 }
9687
9688   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9689     Defining LWLIB_DIALOGS_ATHENA3D
9690 EOF
9691 cat >> confdefs.h <<\EOF
9692 #define LWLIB_DIALOGS_ATHENA3D 1
9693 EOF
9694 }
9695
9696 fi
9697
9698 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9699     Defining LWLIB_WIDGETS_ATHENA
9700 EOF
9701 cat >> confdefs.h <<\EOF
9702 #define LWLIB_WIDGETS_ATHENA 1
9703 EOF
9704 }
9705 ;; esac
9706 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9707         { test "$extra_verbose" = "yes" && cat << \EOF
9708     Defining LWLIB_TABS_LUCID
9709 EOF
9710 cat >> confdefs.h <<\EOF
9711 #define LWLIB_TABS_LUCID 1
9712 EOF
9713 }
9714
9715
9716 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9717     Defining HAVE_MENUBARS
9718 EOF
9719 cat >> confdefs.h <<\EOF
9720 #define HAVE_MENUBARS 1
9721 EOF
9722 }
9723
9724 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9725     Defining HAVE_SCROLLBARS
9726 EOF
9727 cat >> confdefs.h <<\EOF
9728 #define HAVE_SCROLLBARS 1
9729 EOF
9730 }
9731
9732 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9733     Defining HAVE_DIALOGS
9734 EOF
9735 cat >> confdefs.h <<\EOF
9736 #define HAVE_DIALOGS 1
9737 EOF
9738 }
9739
9740 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9741     Defining HAVE_TOOLBARS
9742 EOF
9743 cat >> confdefs.h <<\EOF
9744 #define HAVE_TOOLBARS 1
9745 EOF
9746 }
9747
9748 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9749     Defining HAVE_WIDGETS
9750 EOF
9751 cat >> confdefs.h <<\EOF
9752 #define HAVE_WIDGETS 1
9753 EOF
9754 }
9755
9756
9757 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9758     Defining LWLIB_MENUBARS_LUCID
9759 EOF
9760 cat >> confdefs.h <<\EOF
9761 #define LWLIB_MENUBARS_LUCID 1
9762 EOF
9763 }
9764
9765 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9766     Defining LWLIB_SCROLLBARS_LUCID
9767 EOF
9768 cat >> confdefs.h <<\EOF
9769 #define LWLIB_SCROLLBARS_LUCID 1
9770 EOF
9771 }
9772
9773
9774 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9775     Defining LWLIB_MENUBARS_MOTIF
9776 EOF
9777 cat >> confdefs.h <<\EOF
9778 #define LWLIB_MENUBARS_MOTIF 1
9779 EOF
9780 }
9781
9782 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9783     Defining LWLIB_SCROLLBARS_MOTIF
9784 EOF
9785 cat >> confdefs.h <<\EOF
9786 #define LWLIB_SCROLLBARS_MOTIF 1
9787 EOF
9788 }
9789
9790 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9791     Defining LWLIB_DIALOGS_MOTIF
9792 EOF
9793 cat >> confdefs.h <<\EOF
9794 #define LWLIB_DIALOGS_MOTIF 1
9795 EOF
9796 }
9797
9798 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9799     Defining LWLIB_WIDGETS_MOTIF
9800 EOF
9801 cat >> confdefs.h <<\EOF
9802 #define LWLIB_WIDGETS_MOTIF 1
9803 EOF
9804 }
9805
9806
9807 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"menubar.o\""
9809  fi
9810 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9811    echo "    xemacs will be linked with \"scrollbar.o\""
9812  fi
9813 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9814    echo "    xemacs will be linked with \"dialog.o\""
9815  fi
9816 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9817    echo "    xemacs will be linked with \"toolbar.o\""
9818  fi
9819
9820 if test "$with_gtk" = "yes"; then
9821   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9822    echo "    xemacs will be linked with \"menubar-gtk.o\""
9823  fi
9824   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9825    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9826  fi
9827   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9828    echo "    xemacs will be linked with \"dialog-gtk.o\""
9829  fi
9830   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9831    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9832  fi
9833   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9834    echo "    xemacs will be linked with \"gui-gtk.o\""
9835  fi
9836 fi
9837
9838 if test "$with_x11" = "yes"; then
9839   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9840    echo "    xemacs will be linked with \"menubar-x.o\""
9841  fi
9842   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9843    echo "    xemacs will be linked with \"scrollbar-x.o\""
9844  fi
9845   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9846    echo "    xemacs will be linked with \"dialog-x.o\""
9847  fi
9848   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9849    echo "    xemacs will be linked with \"toolbar-x.o\""
9850  fi
9851   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9852    echo "    xemacs will be linked with \"gui-x.o\""
9853  fi
9854 fi
9855
9856
9857 test -z "$with_mule" && with_mule=no
9858 test -z "$with_file_coding" && with_file_coding=no
9859
9860
9861 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9862   { test "$extra_verbose" = "yes" && cat << \EOF
9863     Defining FILE_CODING
9864 EOF
9865 cat >> confdefs.h <<\EOF
9866 #define FILE_CODING 1
9867 EOF
9868 }
9869
9870   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9871    echo "    xemacs will be linked with \"file-coding.o\""
9872  fi
9873 fi
9874
9875 test -z "$with_chise" && with_chise=yes
9876 if test "$with_chise" = "yes"; then
9877     with_mule=yes
9878     with_utf_2000=yes
9879     with_text_coding=yes
9880 fi
9881
9882 if test "$with_mule" = "yes" ; then
9883   echo "checking for Mule-related features" 1>&6
9884 echo "configure:9885: checking for Mule-related features" >&5
9885   { test "$extra_verbose" = "yes" && cat << \EOF
9886     Defining MULE
9887 EOF
9888 cat >> confdefs.h <<\EOF
9889 #define MULE 1
9890 EOF
9891 }
9892
9893
9894     chise_includes_found=no
9895   if test "$with_chise" != "no"; then
9896     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
9897 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
9898 echo "configure:9899: checking for chise.h" >&5
9899
9900 cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 #include <chise.h>
9904 EOF
9905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9906 { (eval echo configure:9907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9908 if test -z "$ac_err"; then
9909   rm -rf conftest*
9910   eval "ac_cv_header_$ac_safe=yes"
9911 else
9912   echo "$ac_err" >&5
9913   echo "configure: failed program was:" >&5
9914   cat conftest.$ac_ext >&5
9915   rm -rf conftest*
9916   eval "ac_cv_header_$ac_safe=no"
9917 fi
9918 rm -f conftest*
9919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921   :
9922 else
9923   echo "$ac_t""no" 1>&6
9924 with_chise=no
9925 fi
9926
9927   fi
9928   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
9929       -d "/usr/local/chise/include"; then
9930     save_c_switch_site="$c_switch_site"
9931     c_switch_site="$c_switch_site -I/usr/local/chise/include"
9932     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
9933 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
9934 echo "configure:9935: checking for chise.h" >&5
9935
9936 cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 #include <chise.h>
9940 EOF
9941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9942 { (eval echo configure:9943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9944 if test -z "$ac_err"; then
9945   rm -rf conftest*
9946   eval "ac_cv_header_$ac_safe=yes"
9947 else
9948   echo "$ac_err" >&5
9949   echo "configure: failed program was:" >&5
9950   cat conftest.$ac_ext >&5
9951   rm -rf conftest*
9952   eval "ac_cv_header_$ac_safe=no"
9953 fi
9954 rm -f conftest*
9955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9956   echo "$ac_t""yes" 1>&6
9957   chise_includes_found=yes
9958 else
9959   echo "$ac_t""no" 1>&6
9960 fi
9961
9962     if test "$chise_includes_found" != "yes"; then
9963       c_switch_site="$save_c_switch_site"
9964       with_chise="no"
9965     fi
9966   fi
9967
9968   test -z "$with_chise" && with_chise=yes
9969   if test "$with_chise" = "yes"; then
9970     { test "$extra_verbose" = "yes" && cat << \EOF
9971     Defining HAVE_CHISE
9972 EOF
9973 cat >> confdefs.h <<\EOF
9974 #define HAVE_CHISE 1
9975 EOF
9976 }
9977
9978     { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining HAVE_LIBCHISE
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define HAVE_LIBCHISE 1
9983 EOF
9984 }
9985
9986     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
9987   fi
9988
9989   { test "$extra_verbose" = "yes" && cat << \EOF
9990     Defining FILE_CODING
9991 EOF
9992 cat >> confdefs.h <<\EOF
9993 #define FILE_CODING 1
9994 EOF
9995 }
9996
9997   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9998    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9999  fi
10000   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10001     { test "$extra_verbose" = "yes" && cat << \EOF
10002     Defining TEXT_CODING
10003 EOF
10004 cat >> confdefs.h <<\EOF
10005 #define TEXT_CODING 1
10006 EOF
10007 }
10008
10009     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10010    echo "    xemacs will be linked with \"text-coding.o\""
10011  fi
10012   else
10013     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10014    echo "    xemacs will be linked with \"file-coding.o\""
10015  fi
10016   fi
10017     for ac_hdr in libintl.h
10018 do
10019 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10020 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10021 echo "configure:10022: checking for $ac_hdr" >&5
10022
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 #include <$ac_hdr>
10027 EOF
10028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10029 { (eval echo configure:10030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10031 if test -z "$ac_err"; then
10032   rm -rf conftest*
10033   eval "ac_cv_header_$ac_safe=yes"
10034 else
10035   echo "$ac_err" >&5
10036   echo "configure: failed program was:" >&5
10037   cat conftest.$ac_ext >&5
10038   rm -rf conftest*
10039   eval "ac_cv_header_$ac_safe=no"
10040 fi
10041 rm -f conftest*
10042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10045   { test "$extra_verbose" = "yes" && cat << EOF
10046     Defining $ac_tr_hdr
10047 EOF
10048 cat >> confdefs.h <<EOF
10049 #define $ac_tr_hdr 1
10050 EOF
10051 }
10052  
10053 else
10054   echo "$ac_t""no" 1>&6
10055 fi
10056 done
10057
10058   
10059 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10060 echo "configure:10061: checking for strerror in -lintl" >&5
10061 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10062
10063 xe_check_libs=" -lintl "
10064 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* Override any gcc2 internal prototype to avoid an error.  */
10068 /* We use char because int might match the return type of a gcc2
10069     builtin and then its argument prototype would still apply.  */
10070 char strerror();
10071
10072 int main() {
10073 strerror()
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=no"
10084 fi
10085 rm -f conftest*
10086 xe_check_libs=""
10087
10088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10089   echo "$ac_t""yes" 1>&6
10090     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10092   { test "$extra_verbose" = "yes" && cat << EOF
10093     Defining $ac_tr_lib
10094 EOF
10095 cat >> confdefs.h <<EOF
10096 #define $ac_tr_lib 1
10097 EOF
10098 }
10099
10100   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10101
10102 else
10103   echo "$ac_t""no" 1>&6
10104 fi
10105
10106
10107
10108   if test "$with_utf_2000" = "yes" ; then
10109     { test "$extra_verbose" = "yes" && cat << \EOF
10110     Defining CHAR_IS_UCS4
10111 EOF
10112 cat >> confdefs.h <<\EOF
10113 #define CHAR_IS_UCS4 1
10114 EOF
10115 }
10116
10117     { test "$extra_verbose" = "yes" && cat << \EOF
10118     Defining UTF2000
10119 EOF
10120 cat >> confdefs.h <<\EOF
10121 #define UTF2000 1
10122 EOF
10123 }
10124
10125     with_wnn=no
10126     with_wnn6=no
10127   fi
10128
10129   echo "checking for Mule input methods" 1>&6
10130 echo "configure:10131: checking for Mule input methods" >&5
10131         case "$with_xim" in "" | "yes" )
10132     echo "checking for XIM" 1>&6
10133 echo "configure:10134: checking for XIM" >&5
10134     
10135 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10136 echo "configure:10137: checking for XOpenIM in -lX11" >&5
10137 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10138
10139 xe_check_libs=" -lX11 "
10140 cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143 /* Override any gcc2 internal prototype to avoid an error.  */
10144 /* We use char because int might match the return type of a gcc2
10145     builtin and then its argument prototype would still apply.  */
10146 char XOpenIM();
10147
10148 int main() {
10149 XOpenIM()
10150 ; return 0; }
10151 EOF
10152 if { (eval echo configure:10153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10153   rm -rf conftest*
10154   eval "ac_cv_lib_$ac_lib_var=yes"
10155 else
10156   echo "configure: failed program was:" >&5
10157   cat conftest.$ac_ext >&5
10158   rm -rf conftest*
10159   eval "ac_cv_lib_$ac_lib_var=no"
10160 fi
10161 rm -f conftest*
10162 xe_check_libs=""
10163
10164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10165   echo "$ac_t""yes" 1>&6
10166   with_xim=xlib
10167 else
10168   echo "$ac_t""no" 1>&6
10169 with_xim=no
10170 fi
10171
10172
10173         if test "$have_motif $have_lesstif" = "yes no"; then
10174       
10175 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10176 echo "configure:10177: checking for XmImMbLookupString in -lXm" >&5
10177 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10178
10179 xe_check_libs=" -lXm "
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 /* Override any gcc2 internal prototype to avoid an error.  */
10184 /* We use char because int might match the return type of a gcc2
10185     builtin and then its argument prototype would still apply.  */
10186 char XmImMbLookupString();
10187
10188 int main() {
10189 XmImMbLookupString()
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10193   rm -rf conftest*
10194   eval "ac_cv_lib_$ac_lib_var=yes"
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   eval "ac_cv_lib_$ac_lib_var=no"
10200 fi
10201 rm -f conftest*
10202 xe_check_libs=""
10203
10204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10205   echo "$ac_t""yes" 1>&6
10206   with_xim=motif
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211
10212     fi ;;
10213   esac
10214   if test "$with_xim" != "no"; then
10215     { test "$extra_verbose" = "yes" && cat << \EOF
10216     Defining HAVE_XIM
10217 EOF
10218 cat >> confdefs.h <<\EOF
10219 #define HAVE_XIM 1
10220 EOF
10221 }
10222
10223     if test "$with_xim" = "xlib"; then
10224       { test "$extra_verbose" = "yes" && cat << \EOF
10225     Defining XIM_XLIB
10226 EOF
10227 cat >> confdefs.h <<\EOF
10228 #define XIM_XLIB 1
10229 EOF
10230 }
10231
10232       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10233    echo "    xemacs will be linked with \"input-method-xlib.o\""
10234  fi
10235     fi
10236     if test "$with_xim" = "motif"; then
10237       { test "$extra_verbose" = "yes" && cat << \EOF
10238     Defining XIM_MOTIF
10239 EOF
10240 cat >> confdefs.h <<\EOF
10241 #define XIM_MOTIF 1
10242 EOF
10243 }
10244
10245       need_motif=yes
10246       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10247    echo "    xemacs will be linked with \"input-method-motif.o\""
10248  fi
10249     fi
10250     if test "$with_xim" = "motif"; then
10251       with_xfs=no
10252     fi
10253   fi
10254
10255     if test "$with_xfs" = "yes" ; then
10256     echo "checking for XFontSet" 1>&6
10257 echo "configure:10258: checking for XFontSet" >&5
10258     
10259 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10260 echo "configure:10261: checking for XmbDrawString in -lX11" >&5
10261 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10262
10263 xe_check_libs=" -lX11 "
10264 cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 /* Override any gcc2 internal prototype to avoid an error.  */
10268 /* We use char because int might match the return type of a gcc2
10269     builtin and then its argument prototype would still apply.  */
10270 char XmbDrawString();
10271
10272 int main() {
10273 XmbDrawString()
10274 ; return 0; }
10275 EOF
10276 if { (eval echo configure:10277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10277   rm -rf conftest*
10278   eval "ac_cv_lib_$ac_lib_var=yes"
10279 else
10280   echo "configure: failed program was:" >&5
10281   cat conftest.$ac_ext >&5
10282   rm -rf conftest*
10283   eval "ac_cv_lib_$ac_lib_var=no"
10284 fi
10285 rm -f conftest*
10286 xe_check_libs=""
10287
10288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10289   echo "$ac_t""yes" 1>&6
10290   :
10291 else
10292   echo "$ac_t""no" 1>&6
10293 with_xfs=no
10294 fi
10295
10296
10297     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10298       { test "$extra_verbose" = "yes" && cat << \EOF
10299     Defining USE_XFONTSET
10300 EOF
10301 cat >> confdefs.h <<\EOF
10302 #define USE_XFONTSET 1
10303 EOF
10304 }
10305
10306       if test "$with_xim" = "no" ; then
10307         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10308    echo "    xemacs will be linked with \"input-method-xlib.o\""
10309  fi
10310       fi
10311     fi
10312   fi 
10313     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10314   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10315 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10316 echo "configure:10317: checking for wnn/jllib.h" >&5
10317
10318 cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321 #include <wnn/jllib.h>
10322 EOF
10323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10324 { (eval echo configure:10325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10326 if test -z "$ac_err"; then
10327   rm -rf conftest*
10328   eval "ac_cv_header_$ac_safe=yes"
10329 else
10330   echo "$ac_err" >&5
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   eval "ac_cv_header_$ac_safe=no"
10335 fi
10336 rm -f conftest*
10337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10338   echo "$ac_t""yes" 1>&6
10339   :
10340 else
10341   echo "$ac_t""no" 1>&6
10342 with_wnn=no
10343 fi
10344  }
10345     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10346 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10347 echo "configure:10348: checking for wnn/commonhd.h" >&5
10348
10349 cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <wnn/commonhd.h>
10353 EOF
10354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10355 { (eval echo configure:10356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10357 if test -z "$ac_err"; then
10358   rm -rf conftest*
10359   eval "ac_cv_header_$ac_safe=yes"
10360 else
10361   echo "$ac_err" >&5
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_header_$ac_safe=no"
10366 fi
10367 rm -f conftest*
10368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10369   echo "$ac_t""yes" 1>&6
10370   :
10371 else
10372   echo "$ac_t""no" 1>&6
10373 with_wnn=no
10374 fi
10375  }
10376     if test "$with_wnn" != "no"; then
10377     for ac_func in crypt
10378 do
10379 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10380 echo "configure:10381: checking for $ac_func" >&5
10381
10382 cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 /* System header to define __stub macros and hopefully few prototypes,
10386     which can conflict with char $ac_func(); below.  */
10387 #include <assert.h>
10388 /* Override any gcc2 internal prototype to avoid an error.  */
10389 /* We use char because int might match the return type of a gcc2
10390     builtin and then its argument prototype would still apply.  */
10391 char $ac_func();
10392
10393 int main() {
10394
10395 /* The GNU C library defines this for functions which it implements
10396     to always fail with ENOSYS.  Some functions are actually named
10397     something starting with __ and the normal name is an alias.  */
10398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10399 choke me
10400 #else
10401 $ac_func();
10402 #endif
10403
10404 ; return 0; }
10405 EOF
10406 if { (eval echo configure:10407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10407   rm -rf conftest*
10408   eval "ac_cv_func_$ac_func=yes"
10409 else
10410   echo "configure: failed program was:" >&5
10411   cat conftest.$ac_ext >&5
10412   rm -rf conftest*
10413   eval "ac_cv_func_$ac_func=no"
10414 fi
10415 rm -f conftest*
10416
10417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10420   { test "$extra_verbose" = "yes" && cat << EOF
10421     Defining $ac_tr_func
10422 EOF
10423 cat >> confdefs.h <<EOF
10424 #define $ac_tr_func 1
10425 EOF
10426 }
10427  
10428 else
10429   echo "$ac_t""no" 1>&6
10430 fi
10431 done
10432
10433     test "$ac_cv_func_crypt" != "yes" && { 
10434 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10435 echo "configure:10436: checking for crypt in -lcrypt" >&5
10436 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10437
10438 xe_check_libs=" -lcrypt "
10439 cat > conftest.$ac_ext <<EOF
10440 #line 10441 "configure"
10441 #include "confdefs.h"
10442 /* Override any gcc2 internal prototype to avoid an error.  */
10443 /* We use char because int might match the return type of a gcc2
10444     builtin and then its argument prototype would still apply.  */
10445 char crypt();
10446
10447 int main() {
10448 crypt()
10449 ; return 0; }
10450 EOF
10451 if { (eval echo configure:10452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10452   rm -rf conftest*
10453   eval "ac_cv_lib_$ac_lib_var=yes"
10454 else
10455   echo "configure: failed program was:" >&5
10456   cat conftest.$ac_ext >&5
10457   rm -rf conftest*
10458   eval "ac_cv_lib_$ac_lib_var=no"
10459 fi
10460 rm -f conftest*
10461 xe_check_libs=""
10462
10463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10464   echo "$ac_t""yes" 1>&6
10465     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10467   { test "$extra_verbose" = "yes" && cat << EOF
10468     Defining $ac_tr_lib
10469 EOF
10470 cat >> confdefs.h <<EOF
10471 #define $ac_tr_lib 1
10472 EOF
10473 }
10474
10475   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10476
10477 else
10478   echo "$ac_t""no" 1>&6
10479 fi
10480
10481  }
10482   fi
10483     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10484     
10485 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10486 echo "configure:10487: checking for jl_dic_list_e in -lwnn" >&5
10487 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10488
10489 xe_check_libs=" -lwnn "
10490 cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493 /* Override any gcc2 internal prototype to avoid an error.  */
10494 /* We use char because int might match the return type of a gcc2
10495     builtin and then its argument prototype would still apply.  */
10496 char jl_dic_list_e();
10497
10498 int main() {
10499 jl_dic_list_e()
10500 ; return 0; }
10501 EOF
10502 if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10503   rm -rf conftest*
10504   eval "ac_cv_lib_$ac_lib_var=yes"
10505 else
10506   echo "configure: failed program was:" >&5
10507   cat conftest.$ac_ext >&5
10508   rm -rf conftest*
10509   eval "ac_cv_lib_$ac_lib_var=no"
10510 fi
10511 rm -f conftest*
10512 xe_check_libs=""
10513
10514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10515   echo "$ac_t""yes" 1>&6
10516   libwnn=wnn
10517 else
10518   echo "$ac_t""no" 1>&6
10519 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10520 echo "configure:10521: checking for jl_dic_list_e in -lwnn4" >&5
10521 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10522
10523 xe_check_libs=" -lwnn4 "
10524 cat > conftest.$ac_ext <<EOF
10525 #line 10526 "configure"
10526 #include "confdefs.h"
10527 /* Override any gcc2 internal prototype to avoid an error.  */
10528 /* We use char because int might match the return type of a gcc2
10529     builtin and then its argument prototype would still apply.  */
10530 char jl_dic_list_e();
10531
10532 int main() {
10533 jl_dic_list_e()
10534 ; return 0; }
10535 EOF
10536 if { (eval echo configure:10537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10537   rm -rf conftest*
10538   eval "ac_cv_lib_$ac_lib_var=yes"
10539 else
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -rf conftest*
10543   eval "ac_cv_lib_$ac_lib_var=no"
10544 fi
10545 rm -f conftest*
10546 xe_check_libs=""
10547
10548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10549   echo "$ac_t""yes" 1>&6
10550   libwnn=wnn4
10551 else
10552   echo "$ac_t""no" 1>&6
10553 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10554 echo "configure:10555: checking for jl_dic_list_e in -lwnn6" >&5
10555 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10556
10557 xe_check_libs=" -lwnn6 "
10558 cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 /* Override any gcc2 internal prototype to avoid an error.  */
10562 /* We use char because int might match the return type of a gcc2
10563     builtin and then its argument prototype would still apply.  */
10564 char jl_dic_list_e();
10565
10566 int main() {
10567 jl_dic_list_e()
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=no"
10578 fi
10579 rm -f conftest*
10580 xe_check_libs=""
10581
10582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10583   echo "$ac_t""yes" 1>&6
10584   libwnn=wnn6
10585 else
10586   echo "$ac_t""no" 1>&6
10587 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10588 echo "configure:10589: checking for dic_list_e in -lwnn6_fromsrc" >&5
10589 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10590
10591 xe_check_libs=" -lwnn6_fromsrc "
10592 cat > conftest.$ac_ext <<EOF
10593 #line 10594 "configure"
10594 #include "confdefs.h"
10595 /* Override any gcc2 internal prototype to avoid an error.  */
10596 /* We use char because int might match the return type of a gcc2
10597     builtin and then its argument prototype would still apply.  */
10598 char dic_list_e();
10599
10600 int main() {
10601 dic_list_e()
10602 ; return 0; }
10603 EOF
10604 if { (eval echo configure:10605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10605   rm -rf conftest*
10606   eval "ac_cv_lib_$ac_lib_var=yes"
10607 else
10608   echo "configure: failed program was:" >&5
10609   cat conftest.$ac_ext >&5
10610   rm -rf conftest*
10611   eval "ac_cv_lib_$ac_lib_var=no"
10612 fi
10613 rm -f conftest*
10614 xe_check_libs=""
10615
10616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10617   echo "$ac_t""yes" 1>&6
10618   libwnn=wnn6_fromsrc
10619 else
10620   echo "$ac_t""no" 1>&6
10621 with_wnn=no
10622 fi
10623
10624
10625 fi
10626
10627
10628 fi
10629
10630
10631 fi
10632
10633
10634   fi
10635   test -z "$with_wnn" && with_wnn=yes
10636   if test "$with_wnn" = "yes"; then
10637     { test "$extra_verbose" = "yes" && cat << \EOF
10638     Defining HAVE_WNN
10639 EOF
10640 cat >> confdefs.h <<\EOF
10641 #define HAVE_WNN 1
10642 EOF
10643 }
10644
10645     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10646     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10647    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10648  fi
10649     if test "$with_wnn6" != "no"; then
10650       
10651 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10652 echo "configure:10653: checking for jl_fi_dic_list in -l$libwnn" >&5
10653 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10654
10655 xe_check_libs=" -l$libwnn "
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* Override any gcc2 internal prototype to avoid an error.  */
10660 /* We use char because int might match the return type of a gcc2
10661     builtin and then its argument prototype would still apply.  */
10662 char jl_fi_dic_list();
10663
10664 int main() {
10665 jl_fi_dic_list()
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=no"
10676 fi
10677 rm -f conftest*
10678 xe_check_libs=""
10679
10680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10681   echo "$ac_t""yes" 1>&6
10682   with_wnn6=yes
10683 else
10684   echo "$ac_t""no" 1>&6
10685 fi
10686
10687
10688       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10689     Defining WNN6
10690 EOF
10691 cat >> confdefs.h <<\EOF
10692 #define WNN6 1
10693 EOF
10694 }
10695
10696     fi
10697   fi
10698
10699     canna_includes_found=no
10700   if test "$with_canna" != "no"; then
10701     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10702 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10703 echo "configure:10704: checking for canna/jrkanji.h" >&5
10704
10705 cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 #include <canna/jrkanji.h>
10709 EOF
10710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10711 { (eval echo configure:10712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10713 if test -z "$ac_err"; then
10714   rm -rf conftest*
10715   eval "ac_cv_header_$ac_safe=yes"
10716 else
10717   echo "$ac_err" >&5
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -rf conftest*
10721   eval "ac_cv_header_$ac_safe=no"
10722 fi
10723 rm -f conftest*
10724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10725   echo "$ac_t""yes" 1>&6
10726   canna_includes_found=yes
10727 else
10728   echo "$ac_t""no" 1>&6
10729 fi
10730
10731   fi
10732   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10733       -d "/usr/local/canna/include"; then
10734     save_c_switch_site="$c_switch_site"
10735     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10736     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10737 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10738 echo "configure:10739: checking for canna/jrkanji.h" >&5
10739
10740 cat > conftest.$ac_ext <<EOF
10741 #line 10742 "configure"
10742 #include "confdefs.h"
10743 #include <canna/jrkanji.h>
10744 EOF
10745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10746 { (eval echo configure:10747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10748 if test -z "$ac_err"; then
10749   rm -rf conftest*
10750   eval "ac_cv_header_$ac_safe=yes"
10751 else
10752   echo "$ac_err" >&5
10753   echo "configure: failed program was:" >&5
10754   cat conftest.$ac_ext >&5
10755   rm -rf conftest*
10756   eval "ac_cv_header_$ac_safe=no"
10757 fi
10758 rm -f conftest*
10759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10760   echo "$ac_t""yes" 1>&6
10761   canna_includes_found=yes
10762 else
10763   echo "$ac_t""no" 1>&6
10764 fi
10765
10766     if test "$canna_includes_found" != "yes"; then
10767       c_switch_site="$save_c_switch_site"
10768       with_canna="no"
10769     fi
10770   fi
10771
10772   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10773 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10774 echo "configure:10775: checking for canna/RK.h" >&5
10775
10776 cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 #include <canna/RK.h>
10780 EOF
10781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10782 { (eval echo configure:10783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10784 if test -z "$ac_err"; then
10785   rm -rf conftest*
10786   eval "ac_cv_header_$ac_safe=yes"
10787 else
10788   echo "$ac_err" >&5
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -rf conftest*
10792   eval "ac_cv_header_$ac_safe=no"
10793 fi
10794 rm -f conftest*
10795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10796   echo "$ac_t""yes" 1>&6
10797   :
10798 else
10799   echo "$ac_t""no" 1>&6
10800 with_canna=no
10801 fi
10802  }
10803   test -z "$with_canna" && { 
10804 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10805 echo "configure:10806: checking for RkBgnBun in -lRKC" >&5
10806 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10807
10808 xe_check_libs=" -lRKC "
10809 cat > conftest.$ac_ext <<EOF
10810 #line 10811 "configure"
10811 #include "confdefs.h"
10812 /* Override any gcc2 internal prototype to avoid an error.  */
10813 /* We use char because int might match the return type of a gcc2
10814     builtin and then its argument prototype would still apply.  */
10815 char RkBgnBun();
10816
10817 int main() {
10818 RkBgnBun()
10819 ; return 0; }
10820 EOF
10821 if { (eval echo configure:10822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10822   rm -rf conftest*
10823   eval "ac_cv_lib_$ac_lib_var=yes"
10824 else
10825   echo "configure: failed program was:" >&5
10826   cat conftest.$ac_ext >&5
10827   rm -rf conftest*
10828   eval "ac_cv_lib_$ac_lib_var=no"
10829 fi
10830 rm -f conftest*
10831 xe_check_libs=""
10832
10833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10834   echo "$ac_t""yes" 1>&6
10835   :
10836 else
10837   echo "$ac_t""no" 1>&6
10838 with_canna=no
10839 fi
10840
10841  }
10842   test -z "$with_canna" && { 
10843 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10844 echo "configure:10845: checking for jrKanjiControl in -lcanna" >&5
10845 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10846
10847 xe_check_libs=" -lcanna "
10848 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 /* Override any gcc2 internal prototype to avoid an error.  */
10852 /* We use char because int might match the return type of a gcc2
10853     builtin and then its argument prototype would still apply.  */
10854 char jrKanjiControl();
10855
10856 int main() {
10857 jrKanjiControl()
10858 ; return 0; }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10861   rm -rf conftest*
10862   eval "ac_cv_lib_$ac_lib_var=yes"
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -rf conftest*
10867   eval "ac_cv_lib_$ac_lib_var=no"
10868 fi
10869 rm -f conftest*
10870 xe_check_libs=""
10871
10872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10873   echo "$ac_t""yes" 1>&6
10874   :
10875 else
10876   echo "$ac_t""no" 1>&6
10877 with_canna=no
10878 fi
10879
10880  }
10881   test -z "$with_canna" && with_canna=yes
10882   if test "$with_canna" = "yes"; then
10883     { test "$extra_verbose" = "yes" && cat << \EOF
10884     Defining HAVE_CANNA
10885 EOF
10886 cat >> confdefs.h <<\EOF
10887 #define HAVE_CANNA 1
10888 EOF
10889 }
10890
10891     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10892     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10893    echo "    xemacs will be linked with \"mule-canna.o\""
10894  fi
10895   fi
10896
10897 else   for feature in xim canna wnn; do
10898     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10899       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10900     fi
10901     eval "with_${feature}=no"
10902   done
10903 fi 
10904
10905 if test "$need_motif" = "yes" ; then
10906   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10907     
10908 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10909 echo "configure:10910: checking for layout_object_getvalue in -li18n" >&5
10910 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10911
10912 xe_check_libs=" -li18n "
10913 cat > conftest.$ac_ext <<EOF
10914 #line 10915 "configure"
10915 #include "confdefs.h"
10916 /* Override any gcc2 internal prototype to avoid an error.  */
10917 /* We use char because int might match the return type of a gcc2
10918     builtin and then its argument prototype would still apply.  */
10919 char layout_object_getvalue();
10920
10921 int main() {
10922 layout_object_getvalue()
10923 ; return 0; }
10924 EOF
10925 if { (eval echo configure:10926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10926   rm -rf conftest*
10927   eval "ac_cv_lib_$ac_lib_var=yes"
10928 else
10929   echo "configure: failed program was:" >&5
10930   cat conftest.$ac_ext >&5
10931   rm -rf conftest*
10932   eval "ac_cv_lib_$ac_lib_var=no"
10933 fi
10934 rm -f conftest*
10935 xe_check_libs=""
10936
10937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10938   echo "$ac_t""yes" 1>&6
10939   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10940 else
10941   echo "$ac_t""no" 1>&6
10942 fi
10943
10944
10945   
10946 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10947     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10948   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10949   
10950         runpath="" runpath_dirs=""
10951   if test -n "$LD_RUN_PATH"; then
10952     runpath="$LD_RUN_PATH"
10953   elif test "$GCC" = "yes"; then
10954         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10955     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10956     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10957     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10958       case "$arg" in P,* | -L* | -R* )
10959         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10960           {
10961 xe_runpath_dir="$dir"
10962   test "$xe_runpath_dir" != "/lib"     -a \
10963         "$xe_runpath_dir" != "/usr/lib" -a \
10964         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10965   eval "$xe_add_unique_runpath_dir"
10966 }
10967         done ;;
10968       esac
10969     done
10970     ld_switch_run="$ld_switch_run_save"
10971     rm -f conftest*
10972   else
10973         for arg in $ld_switch_site $ld_switch_x_site; do
10974       case "$arg" in -L*) {
10975 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10976   test "$xe_runpath_dir" != "/lib"     -a \
10977         "$xe_runpath_dir" != "/usr/lib" -a \
10978         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10979   eval "$xe_add_unique_runpath_dir"
10980 };; esac
10981     done
10982         if test "$opsys $need_motif" = "sol2 yes"; then
10983       xe_runpath_dir="/opt/SUNWdt/lib";
10984       eval "$xe_add_unique_runpath_dir";
10985     fi
10986   fi 
10987   if test -n "$runpath"; then
10988     ld_switch_run="${dash_r}${runpath}"
10989     
10990 if test "$GCC" = "yes"; then
10991   set x $ld_switch_run; shift; ld_switch_run=""
10992   while test -n "$1"; do
10993     case $1 in
10994       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10995       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10996       -Xlinker* ) ;;
10997       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10998     esac
10999     shift
11000   done
11001 fi
11002     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11003   fi
11004 fi
11005
11006 fi
11007
11008
11009 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
11010 do
11011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11012 echo "configure:11013: checking for $ac_func" >&5
11013
11014 cat > conftest.$ac_ext <<EOF
11015 #line 11016 "configure"
11016 #include "confdefs.h"
11017 /* System header to define __stub macros and hopefully few prototypes,
11018     which can conflict with char $ac_func(); below.  */
11019 #include <assert.h>
11020 /* Override any gcc2 internal prototype to avoid an error.  */
11021 /* We use char because int might match the return type of a gcc2
11022     builtin and then its argument prototype would still apply.  */
11023 char $ac_func();
11024
11025 int main() {
11026
11027 /* The GNU C library defines this for functions which it implements
11028     to always fail with ENOSYS.  Some functions are actually named
11029     something starting with __ and the normal name is an alias.  */
11030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11031 choke me
11032 #else
11033 $ac_func();
11034 #endif
11035
11036 ; return 0; }
11037 EOF
11038 if { (eval echo configure:11039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11039   rm -rf conftest*
11040   eval "ac_cv_func_$ac_func=yes"
11041 else
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -rf conftest*
11045   eval "ac_cv_func_$ac_func=no"
11046 fi
11047 rm -f conftest*
11048
11049 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11050   echo "$ac_t""yes" 1>&6
11051     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11052   { test "$extra_verbose" = "yes" && cat << EOF
11053     Defining $ac_tr_func
11054 EOF
11055 cat >> confdefs.h <<EOF
11056 #define $ac_tr_func 1
11057 EOF
11058 }
11059  
11060 else
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 done
11064
11065
11066 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11067   case "$opsys" in
11068     hpux11* )
11069       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11070       ac_cv_func_getaddrinfo=no
11071       ;;
11072   esac
11073 fi
11074
11075
11076 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11077 do
11078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11079 echo "configure:11080: checking for $ac_func" >&5
11080
11081 cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084 /* System header to define __stub macros and hopefully few prototypes,
11085     which can conflict with char $ac_func(); below.  */
11086 #include <assert.h>
11087 /* Override any gcc2 internal prototype to avoid an error.  */
11088 /* We use char because int might match the return type of a gcc2
11089     builtin and then its argument prototype would still apply.  */
11090 char $ac_func();
11091
11092 int main() {
11093
11094 /* The GNU C library defines this for functions which it implements
11095     to always fail with ENOSYS.  Some functions are actually named
11096     something starting with __ and the normal name is an alias.  */
11097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11098 choke me
11099 #else
11100 $ac_func();
11101 #endif
11102
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_func_$ac_func=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_func_$ac_func=no"
11113 fi
11114 rm -f conftest*
11115
11116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11117   echo "$ac_t""yes" 1>&6
11118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11119   { test "$extra_verbose" = "yes" && cat << EOF
11120     Defining $ac_tr_func
11121 EOF
11122 cat >> confdefs.h <<EOF
11123 #define $ac_tr_func 1
11124 EOF
11125 }
11126  
11127 else
11128   echo "$ac_t""no" 1>&6
11129 fi
11130 done
11131
11132
11133 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11134 echo "configure:11135: checking for openpty" >&5
11135
11136 cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139 /* System header to define __stub macros and hopefully few prototypes,
11140     which can conflict with char openpty(); below.  */
11141 #include <assert.h>
11142 /* Override any gcc2 internal prototype to avoid an error.  */
11143 /* We use char because int might match the return type of a gcc2
11144     builtin and then its argument prototype would still apply.  */
11145 char openpty();
11146
11147 int main() {
11148
11149 /* The GNU C library defines this for functions which it implements
11150     to always fail with ENOSYS.  Some functions are actually named
11151     something starting with __ and the normal name is an alias.  */
11152 #if defined (__stub_openpty) || defined (__stub___openpty)
11153 choke me
11154 #else
11155 openpty();
11156 #endif
11157
11158 ; return 0; }
11159 EOF
11160 if { (eval echo configure:11161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11161   rm -rf conftest*
11162   eval "ac_cv_func_openpty=yes"
11163 else
11164   echo "configure: failed program was:" >&5
11165   cat conftest.$ac_ext >&5
11166   rm -rf conftest*
11167   eval "ac_cv_func_openpty=no"
11168 fi
11169 rm -f conftest*
11170
11171 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11172   echo "$ac_t""yes" 1>&6
11173   have_openpty=yes
11174 else
11175   echo "$ac_t""no" 1>&6
11176
11177   
11178 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11179 echo "configure:11180: checking for openpty in -lutil" >&5
11180 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11181
11182 xe_check_libs=" -lutil "
11183 cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 /* Override any gcc2 internal prototype to avoid an error.  */
11187 /* We use char because int might match the return type of a gcc2
11188     builtin and then its argument prototype would still apply.  */
11189 char openpty();
11190
11191 int main() {
11192 openpty()
11193 ; return 0; }
11194 EOF
11195 if { (eval echo configure:11196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11196   rm -rf conftest*
11197   eval "ac_cv_lib_$ac_lib_var=yes"
11198 else
11199   echo "configure: failed program was:" >&5
11200   cat conftest.$ac_ext >&5
11201   rm -rf conftest*
11202   eval "ac_cv_lib_$ac_lib_var=no"
11203 fi
11204 rm -f conftest*
11205 xe_check_libs=""
11206
11207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11208   echo "$ac_t""yes" 1>&6
11209   have_openpty=yes need_libutil=yes
11210 else
11211   echo "$ac_t""no" 1>&6
11212 fi
11213
11214
11215 fi
11216
11217 if test "$have_openpty" = "yes"; then
11218   { test "$extra_verbose" = "yes" && cat << \EOF
11219     Defining HAVE_OPENPTY
11220 EOF
11221 cat >> confdefs.h <<\EOF
11222 #define HAVE_OPENPTY 1
11223 EOF
11224 }
11225
11226   for ac_hdr in pty.h libutil.h util.h
11227 do
11228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11230 echo "configure:11231: checking for $ac_hdr" >&5
11231
11232 cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <$ac_hdr>
11236 EOF
11237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11238 { (eval echo configure:11239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11240 if test -z "$ac_err"; then
11241   rm -rf conftest*
11242   eval "ac_cv_header_$ac_safe=yes"
11243 else
11244   echo "$ac_err" >&5
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_header_$ac_safe=no"
11249 fi
11250 rm -f conftest*
11251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11252   echo "$ac_t""yes" 1>&6
11253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11254   { test "$extra_verbose" = "yes" && cat << EOF
11255     Defining $ac_tr_hdr
11256 EOF
11257 cat >> confdefs.h <<EOF
11258 #define $ac_tr_hdr 1
11259 EOF
11260 }
11261  break
11262 else
11263   echo "$ac_t""no" 1>&6
11264 fi
11265 done
11266
11267   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11268 fi
11269
11270 for ac_hdr in stropts.h
11271 do
11272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_hdr" >&5
11275
11276 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 #include <$ac_hdr>
11280 EOF
11281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11282 { (eval echo configure:11283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11284 if test -z "$ac_err"; then
11285   rm -rf conftest*
11286   eval "ac_cv_header_$ac_safe=yes"
11287 else
11288   echo "$ac_err" >&5
11289   echo "configure: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   rm -rf conftest*
11292   eval "ac_cv_header_$ac_safe=no"
11293 fi
11294 rm -f conftest*
11295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11296   echo "$ac_t""yes" 1>&6
11297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11298   { test "$extra_verbose" = "yes" && cat << EOF
11299     Defining $ac_tr_hdr
11300 EOF
11301 cat >> confdefs.h <<EOF
11302 #define $ac_tr_hdr 1
11303 EOF
11304 }
11305  
11306 else
11307   echo "$ac_t""no" 1>&6
11308 fi
11309 done
11310
11311 if test "$ac_cv_header_stropts_h" = "yes"; then
11312   for ac_func in isastream
11313 do
11314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11315 echo "configure:11316: checking for $ac_func" >&5
11316
11317 cat > conftest.$ac_ext <<EOF
11318 #line 11319 "configure"
11319 #include "confdefs.h"
11320 /* System header to define __stub macros and hopefully few prototypes,
11321     which can conflict with char $ac_func(); below.  */
11322 #include <assert.h>
11323 /* Override any gcc2 internal prototype to avoid an error.  */
11324 /* We use char because int might match the return type of a gcc2
11325     builtin and then its argument prototype would still apply.  */
11326 char $ac_func();
11327
11328 int main() {
11329
11330 /* The GNU C library defines this for functions which it implements
11331     to always fail with ENOSYS.  Some functions are actually named
11332     something starting with __ and the normal name is an alias.  */
11333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11334 choke me
11335 #else
11336 $ac_func();
11337 #endif
11338
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11342   rm -rf conftest*
11343   eval "ac_cv_func_$ac_func=yes"
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   eval "ac_cv_func_$ac_func=no"
11349 fi
11350 rm -f conftest*
11351
11352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11355   { test "$extra_verbose" = "yes" && cat << EOF
11356     Defining $ac_tr_func
11357 EOF
11358 cat >> confdefs.h <<EOF
11359 #define $ac_tr_func 1
11360 EOF
11361 }
11362  
11363 else
11364   echo "$ac_t""no" 1>&6
11365 fi
11366 done
11367
11368   for ac_hdr in strtio.h
11369 do
11370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11372 echo "configure:11373: checking for $ac_hdr" >&5
11373
11374 cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377 #include <$ac_hdr>
11378 EOF
11379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11380 { (eval echo configure:11381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11382 if test -z "$ac_err"; then
11383   rm -rf conftest*
11384   eval "ac_cv_header_$ac_safe=yes"
11385 else
11386   echo "$ac_err" >&5
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_header_$ac_safe=no"
11391 fi
11392 rm -f conftest*
11393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11394   echo "$ac_t""yes" 1>&6
11395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11396   { test "$extra_verbose" = "yes" && cat << EOF
11397     Defining $ac_tr_hdr
11398 EOF
11399 cat >> confdefs.h <<EOF
11400 #define $ac_tr_hdr 1
11401 EOF
11402 }
11403  
11404 else
11405   echo "$ac_t""no" 1>&6
11406 fi
11407 done
11408  fi
11409
11410 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11411    echo "    xemacs will be linked with \"realpath.o\""
11412  fi
11413
11414 for ac_func in getloadavg
11415 do
11416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11417 echo "configure:11418: checking for $ac_func" >&5
11418
11419 cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 /* System header to define __stub macros and hopefully few prototypes,
11423     which can conflict with char $ac_func(); below.  */
11424 #include <assert.h>
11425 /* Override any gcc2 internal prototype to avoid an error.  */
11426 /* We use char because int might match the return type of a gcc2
11427     builtin and then its argument prototype would still apply.  */
11428 char $ac_func();
11429
11430 int main() {
11431
11432 /* The GNU C library defines this for functions which it implements
11433     to always fail with ENOSYS.  Some functions are actually named
11434     something starting with __ and the normal name is an alias.  */
11435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11436 choke me
11437 #else
11438 $ac_func();
11439 #endif
11440
11441 ; return 0; }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11444   rm -rf conftest*
11445   eval "ac_cv_func_$ac_func=yes"
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   eval "ac_cv_func_$ac_func=no"
11451 fi
11452 rm -f conftest*
11453
11454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11455   echo "$ac_t""yes" 1>&6
11456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11457   { test "$extra_verbose" = "yes" && cat << EOF
11458     Defining $ac_tr_func
11459 EOF
11460 cat >> confdefs.h <<EOF
11461 #define $ac_tr_func 1
11462 EOF
11463 }
11464  
11465 else
11466   echo "$ac_t""no" 1>&6
11467 fi
11468 done
11469
11470
11471 if test "$ac_cv_func_getloadavg" = "yes"; then
11472         for ac_hdr in sys/loadavg.h
11473 do
11474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11476 echo "configure:11477: checking for $ac_hdr" >&5
11477
11478 cat > conftest.$ac_ext <<EOF
11479 #line 11480 "configure"
11480 #include "confdefs.h"
11481 #include <$ac_hdr>
11482 EOF
11483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11484 { (eval echo configure:11485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11486 if test -z "$ac_err"; then
11487   rm -rf conftest*
11488   eval "ac_cv_header_$ac_safe=yes"
11489 else
11490   echo "$ac_err" >&5
11491   echo "configure: failed program was:" >&5
11492   cat conftest.$ac_ext >&5
11493   rm -rf conftest*
11494   eval "ac_cv_header_$ac_safe=no"
11495 fi
11496 rm -f conftest*
11497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11498   echo "$ac_t""yes" 1>&6
11499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11500   { test "$extra_verbose" = "yes" && cat << EOF
11501     Defining $ac_tr_hdr
11502 EOF
11503 cat >> confdefs.h <<EOF
11504 #define $ac_tr_hdr 1
11505 EOF
11506 }
11507  
11508 else
11509   echo "$ac_t""no" 1>&6
11510 fi
11511 done
11512
11513 else
11514     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11515    echo "    xemacs will be linked with \"getloadavg.o\""
11516  fi
11517
11518     
11519 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11520 echo "configure:11521: checking for kstat_open in -lkstat" >&5
11521 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11522
11523 xe_check_libs=" -lkstat "
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 /* Override any gcc2 internal prototype to avoid an error.  */
11528 /* We use char because int might match the return type of a gcc2
11529     builtin and then its argument prototype would still apply.  */
11530 char kstat_open();
11531
11532 int main() {
11533 kstat_open()
11534 ; return 0; }
11535 EOF
11536 if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11537   rm -rf conftest*
11538   eval "ac_cv_lib_$ac_lib_var=yes"
11539 else
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   eval "ac_cv_lib_$ac_lib_var=no"
11544 fi
11545 rm -f conftest*
11546 xe_check_libs=""
11547
11548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11549   echo "$ac_t""yes" 1>&6
11550     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11551     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11552   { test "$extra_verbose" = "yes" && cat << EOF
11553     Defining $ac_tr_lib
11554 EOF
11555 cat >> confdefs.h <<EOF
11556 #define $ac_tr_lib 1
11557 EOF
11558 }
11559
11560   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11561
11562 else
11563   echo "$ac_t""no" 1>&6
11564 fi
11565
11566
11567   for ac_hdr in kstat.h
11568 do
11569 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11570 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11571 echo "configure:11572: checking for $ac_hdr" >&5
11572
11573 cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 #include <$ac_hdr>
11577 EOF
11578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11579 { (eval echo configure:11580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11581 if test -z "$ac_err"; then
11582   rm -rf conftest*
11583   eval "ac_cv_header_$ac_safe=yes"
11584 else
11585   echo "$ac_err" >&5
11586   echo "configure: failed program was:" >&5
11587   cat conftest.$ac_ext >&5
11588   rm -rf conftest*
11589   eval "ac_cv_header_$ac_safe=no"
11590 fi
11591 rm -f conftest*
11592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11593   echo "$ac_t""yes" 1>&6
11594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11595   { test "$extra_verbose" = "yes" && cat << EOF
11596     Defining $ac_tr_hdr
11597 EOF
11598 cat >> confdefs.h <<EOF
11599 #define $ac_tr_hdr 1
11600 EOF
11601 }
11602  
11603 else
11604   echo "$ac_t""no" 1>&6
11605 fi
11606 done
11607
11608
11609     
11610 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11611 echo "configure:11612: checking for kvm_read in -lkvm" >&5
11612 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11613
11614 xe_check_libs=" -lkvm "
11615 cat > conftest.$ac_ext <<EOF
11616 #line 11617 "configure"
11617 #include "confdefs.h"
11618 /* Override any gcc2 internal prototype to avoid an error.  */
11619 /* We use char because int might match the return type of a gcc2
11620     builtin and then its argument prototype would still apply.  */
11621 char kvm_read();
11622
11623 int main() {
11624 kvm_read()
11625 ; return 0; }
11626 EOF
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11628   rm -rf conftest*
11629   eval "ac_cv_lib_$ac_lib_var=yes"
11630 else
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   eval "ac_cv_lib_$ac_lib_var=no"
11635 fi
11636 rm -f conftest*
11637 xe_check_libs=""
11638
11639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11640   echo "$ac_t""yes" 1>&6
11641     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11643   { test "$extra_verbose" = "yes" && cat << EOF
11644     Defining $ac_tr_lib
11645 EOF
11646 cat >> confdefs.h <<EOF
11647 #define $ac_tr_lib 1
11648 EOF
11649 }
11650
11651   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11652
11653 else
11654   echo "$ac_t""no" 1>&6
11655 fi
11656
11657
11658 fi
11659
11660 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11661 echo "configure:11662: checking whether netdb declares h_errno" >&5
11662 cat > conftest.$ac_ext <<EOF
11663 #line 11664 "configure"
11664 #include "confdefs.h"
11665 #include <netdb.h>
11666 int main() {
11667 return h_errno;
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   echo "$ac_t""yes" 1>&6
11673    { test "$extra_verbose" = "yes" && cat << \EOF
11674     Defining HAVE_H_ERRNO
11675 EOF
11676 cat >> confdefs.h <<\EOF
11677 #define HAVE_H_ERRNO 1
11678 EOF
11679 }
11680
11681 else
11682   echo "configure: failed program was:" >&5
11683   cat conftest.$ac_ext >&5
11684   rm -rf conftest*
11685   echo "$ac_t""no" 1>&6
11686 fi
11687 rm -f conftest*
11688
11689 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11690 echo "configure:11691: checking for sigsetjmp" >&5
11691 cat > conftest.$ac_ext <<EOF
11692 #line 11693 "configure"
11693 #include "confdefs.h"
11694 #include <setjmp.h>
11695 int main() {
11696 sigjmp_buf bar; sigsetjmp (bar, 0);
11697 ; return 0; }
11698 EOF
11699 if { (eval echo configure:11700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11700   rm -rf conftest*
11701   echo "$ac_t""yes" 1>&6
11702    { test "$extra_verbose" = "yes" && cat << \EOF
11703     Defining HAVE_SIGSETJMP
11704 EOF
11705 cat >> confdefs.h <<\EOF
11706 #define HAVE_SIGSETJMP 1
11707 EOF
11708 }
11709
11710 else
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713   rm -rf conftest*
11714   echo "$ac_t""no" 1>&6
11715 fi
11716 rm -f conftest*
11717
11718 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11719 echo "configure:11720: checking whether localtime caches TZ" >&5
11720
11721 if test "$ac_cv_func_tzset" = "yes"; then
11722 cat > conftest.$ac_ext <<EOF
11723 #line 11724 "configure"
11724 #include "confdefs.h"
11725 #include <time.h>
11726 #if STDC_HEADERS
11727 # include <stdlib.h>
11728 #endif
11729 extern char **environ;
11730 unset_TZ ()
11731 {
11732   char **from, **to;
11733   for (to = from = environ; (*to = *from); from++)
11734     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11735       to++;
11736 }
11737 char TZ_GMT0[] = "TZ=GMT0";
11738 char TZ_PST8[] = "TZ=PST8";
11739 main()
11740 {
11741   time_t now = time ((time_t *) 0);
11742   int hour_GMT0, hour_unset;
11743   if (putenv (TZ_GMT0) != 0)
11744     exit (1);
11745   hour_GMT0 = localtime (&now)->tm_hour;
11746   unset_TZ ();
11747   hour_unset = localtime (&now)->tm_hour;
11748   if (putenv (TZ_PST8) != 0)
11749     exit (1);
11750   if (localtime (&now)->tm_hour == hour_GMT0)
11751     exit (1);
11752   unset_TZ ();
11753   if (localtime (&now)->tm_hour != hour_unset)
11754     exit (1);
11755   exit (0);
11756 }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11759 then
11760   emacs_cv_localtime_cache=no
11761 else
11762   conftest_rc="$?"
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -fr conftest*
11766   emacs_cv_localtime_cache=yes
11767 fi
11768 rm -fr conftest*
11769 else
11770         # If we lack tzset, report that localtime does not cache TZ,
11771         # since we can't invalidate the cache if we don't have tzset.
11772         emacs_cv_localtime_cache=no
11773 fi
11774 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11775 if test $emacs_cv_localtime_cache = yes; then
11776   { test "$extra_verbose" = "yes" && cat << \EOF
11777     Defining LOCALTIME_CACHE
11778 EOF
11779 cat >> confdefs.h <<\EOF
11780 #define LOCALTIME_CACHE 1
11781 EOF
11782 }
11783
11784 fi
11785
11786 if test "$HAVE_TIMEVAL" = "yes"; then
11787 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11788 echo "configure:11789: checking whether gettimeofday accepts one or two arguments" >&5
11789 cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792
11793 #ifdef TIME_WITH_SYS_TIME
11794 #include <sys/time.h>
11795 #include <time.h>
11796 #else
11797 #ifdef HAVE_SYS_TIME_H
11798 #include <sys/time.h>
11799 #else
11800 #include <time.h>
11801 #endif
11802 #endif
11803   
11804 int main() {
11805
11806   struct timeval time;
11807   gettimeofday (&time, 0);
11808
11809 ; return 0; }
11810 EOF
11811 if { (eval echo configure:11812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11812   rm -rf conftest*
11813   echo "$ac_t""two" 1>&6
11814 else
11815   echo "configure: failed program was:" >&5
11816   cat conftest.$ac_ext >&5
11817   rm -rf conftest*
11818   echo "$ac_t""one" 1>&6
11819    { test "$extra_verbose" = "yes" && cat << \EOF
11820     Defining GETTIMEOFDAY_ONE_ARGUMENT
11821 EOF
11822 cat >> confdefs.h <<\EOF
11823 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11824 EOF
11825 }
11826
11827 fi
11828 rm -f conftest*
11829 fi
11830
11831
11832 echo $ac_n "checking for inline""... $ac_c" 1>&6
11833 echo "configure:11834: checking for inline" >&5
11834
11835 ac_cv_c_inline=no
11836 for ac_kw in inline __inline__ __inline; do
11837   cat > conftest.$ac_ext <<EOF
11838 #line 11839 "configure"
11839 #include "confdefs.h"
11840
11841 int main() {
11842 } $ac_kw foo() {
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11846   rm -rf conftest*
11847   ac_cv_c_inline=$ac_kw; break
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851 fi
11852 rm -f conftest*
11853 done
11854
11855
11856 echo "$ac_t""$ac_cv_c_inline" 1>&6
11857 case "$ac_cv_c_inline" in
11858   inline | yes) ;;
11859   no) { test "$extra_verbose" = "yes" && cat << \EOF
11860     Defining inline = 
11861 EOF
11862 cat >> confdefs.h <<\EOF
11863 #define inline 
11864 EOF
11865 }
11866  ;;
11867   *)  { test "$extra_verbose" = "yes" && cat << EOF
11868     Defining inline = $ac_cv_c_inline
11869 EOF
11870 cat >> confdefs.h <<EOF
11871 #define inline $ac_cv_c_inline
11872 EOF
11873 }
11874  ;;
11875 esac
11876
11877 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11878    echo "    xemacs will be linked with \"inline.o\""
11879  fi
11880
11881
11882 if test "$__DECC" != "yes"; then
11883   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11884 # for constant arguments.  Useless!
11885 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11886 echo "configure:11887: checking for working alloca.h" >&5
11887
11888 cat > conftest.$ac_ext <<EOF
11889 #line 11890 "configure"
11890 #include "confdefs.h"
11891 #include <alloca.h>
11892 int main() {
11893 char *p = alloca(2 * sizeof(int));
11894 ; return 0; }
11895 EOF
11896 if { (eval echo configure:11897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11897   rm -rf conftest*
11898   ac_cv_header_alloca_h=yes
11899 else
11900   echo "configure: failed program was:" >&5
11901   cat conftest.$ac_ext >&5
11902   rm -rf conftest*
11903   ac_cv_header_alloca_h=no
11904 fi
11905 rm -f conftest*
11906
11907 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11908 if test $ac_cv_header_alloca_h = yes; then
11909   { test "$extra_verbose" = "yes" && cat << \EOF
11910     Defining HAVE_ALLOCA_H
11911 EOF
11912 cat >> confdefs.h <<\EOF
11913 #define HAVE_ALLOCA_H 1
11914 EOF
11915 }
11916
11917 fi
11918
11919 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11920 echo "configure:11921: checking for alloca" >&5
11921
11922 cat > conftest.$ac_ext <<EOF
11923 #line 11924 "configure"
11924 #include "confdefs.h"
11925
11926 #ifdef __GNUC__
11927 # define alloca __builtin_alloca
11928 #else
11929 # ifdef _MSC_VER
11930 #  include <malloc.h>
11931 #  define alloca _alloca
11932 # else
11933 #  if HAVE_ALLOCA_H
11934 #   include <alloca.h>
11935 #  else
11936 #   ifdef _AIX
11937  #pragma alloca
11938 #   else
11939 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11940 char *alloca ();
11941 #    endif
11942 #   endif
11943 #  endif
11944 # endif
11945 #endif
11946
11947 int main() {
11948 char *p = (char *) alloca(1);
11949 ; return 0; }
11950 EOF
11951 if { (eval echo configure:11952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11952   rm -rf conftest*
11953   ac_cv_func_alloca_works=yes
11954 else
11955   echo "configure: failed program was:" >&5
11956   cat conftest.$ac_ext >&5
11957   rm -rf conftest*
11958   ac_cv_func_alloca_works=no
11959 fi
11960 rm -f conftest*
11961
11962 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11963 if test $ac_cv_func_alloca_works = yes; then
11964   { test "$extra_verbose" = "yes" && cat << \EOF
11965     Defining HAVE_ALLOCA
11966 EOF
11967 cat >> confdefs.h <<\EOF
11968 #define HAVE_ALLOCA 1
11969 EOF
11970 }
11971
11972 fi
11973
11974 if test $ac_cv_func_alloca_works = no; then
11975   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11976   # that cause trouble.  Some versions do not even contain alloca or
11977   # contain a buggy version.  If you still want to use their alloca,
11978   # use ar to extract alloca.o from them instead of compiling alloca.c.
11979   ALLOCA=alloca.${ac_objext}
11980   { test "$extra_verbose" = "yes" && cat << \EOF
11981     Defining C_ALLOCA
11982 EOF
11983 cat >> confdefs.h <<\EOF
11984 #define C_ALLOCA 1
11985 EOF
11986 }
11987
11988
11989 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11990 echo "configure:11991: checking whether alloca needs Cray hooks" >&5
11991
11992 cat > conftest.$ac_ext <<EOF
11993 #line 11994 "configure"
11994 #include "confdefs.h"
11995 #if defined(CRAY) && ! defined(CRAY2)
11996 webecray
11997 #else
11998 wenotbecray
11999 #endif
12000
12001 EOF
12002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12003   egrep "webecray" >/dev/null 2>&1; then
12004   rm -rf conftest*
12005   ac_cv_os_cray=yes
12006 else
12007   rm -rf conftest*
12008   ac_cv_os_cray=no
12009 fi
12010 rm -f conftest*
12011
12012
12013 echo "$ac_t""$ac_cv_os_cray" 1>&6
12014 if test $ac_cv_os_cray = yes; then
12015 for ac_func in _getb67 GETB67 getb67; do
12016   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12017 echo "configure:12018: checking for $ac_func" >&5
12018
12019 cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* System header to define __stub macros and hopefully few prototypes,
12023     which can conflict with char $ac_func(); below.  */
12024 #include <assert.h>
12025 /* Override any gcc2 internal prototype to avoid an error.  */
12026 /* We use char because int might match the return type of a gcc2
12027     builtin and then its argument prototype would still apply.  */
12028 char $ac_func();
12029
12030 int main() {
12031
12032 /* The GNU C library defines this for functions which it implements
12033     to always fail with ENOSYS.  Some functions are actually named
12034     something starting with __ and the normal name is an alias.  */
12035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12036 choke me
12037 #else
12038 $ac_func();
12039 #endif
12040
12041 ; return 0; }
12042 EOF
12043 if { (eval echo configure:12044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12044   rm -rf conftest*
12045   eval "ac_cv_func_$ac_func=yes"
12046 else
12047   echo "configure: failed program was:" >&5
12048   cat conftest.$ac_ext >&5
12049   rm -rf conftest*
12050   eval "ac_cv_func_$ac_func=no"
12051 fi
12052 rm -f conftest*
12053
12054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12055   echo "$ac_t""yes" 1>&6
12056   { test "$extra_verbose" = "yes" && cat << EOF
12057     Defining CRAY_STACKSEG_END = $ac_func
12058 EOF
12059 cat >> confdefs.h <<EOF
12060 #define CRAY_STACKSEG_END $ac_func
12061 EOF
12062 }
12063
12064   break
12065 else
12066   echo "$ac_t""no" 1>&6
12067 fi
12068
12069 done
12070 fi
12071
12072 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12073 echo "configure:12074: checking stack direction for C alloca" >&5
12074
12075 cat > conftest.$ac_ext <<EOF
12076 #line 12077 "configure"
12077 #include "confdefs.h"
12078 find_stack_direction ()
12079 {
12080   static char *addr = 0;
12081   auto char dummy;
12082   if (addr == 0)
12083     {
12084       addr = &dummy;
12085       return find_stack_direction ();
12086     }
12087   else
12088     return (&dummy > addr) ? 1 : -1;
12089 }
12090 main ()
12091 {
12092   exit (find_stack_direction() < 0);
12093 }
12094 EOF
12095 if { (eval echo configure:12096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12096 then
12097   ac_cv_c_stack_direction=1
12098 else
12099   conftest_rc="$?"
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -fr conftest*
12103   ac_cv_c_stack_direction=-1
12104 fi
12105 rm -fr conftest*
12106
12107 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12108 { test "$extra_verbose" = "yes" && cat << EOF
12109     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12110 EOF
12111 cat >> confdefs.h <<EOF
12112 #define STACK_DIRECTION $ac_cv_c_stack_direction
12113 EOF
12114 }
12115
12116 fi
12117
12118   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12119    echo "    xemacs will be linked with \"$ALLOCA\""
12120  fi
12121 fi
12122
12123 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12124 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12125 echo "configure:12126: checking for vfork.h" >&5
12126
12127 cat > conftest.$ac_ext <<EOF
12128 #line 12129 "configure"
12129 #include "confdefs.h"
12130 #include <vfork.h>
12131 EOF
12132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12133 { (eval echo configure:12134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12135 if test -z "$ac_err"; then
12136   rm -rf conftest*
12137   eval "ac_cv_header_$ac_safe=yes"
12138 else
12139   echo "$ac_err" >&5
12140   echo "configure: failed program was:" >&5
12141   cat conftest.$ac_ext >&5
12142   rm -rf conftest*
12143   eval "ac_cv_header_$ac_safe=no"
12144 fi
12145 rm -f conftest*
12146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12147   echo "$ac_t""yes" 1>&6
12148   { test "$extra_verbose" = "yes" && cat << \EOF
12149     Defining HAVE_VFORK_H
12150 EOF
12151 cat >> confdefs.h <<\EOF
12152 #define HAVE_VFORK_H 1
12153 EOF
12154 }
12155
12156 else
12157   echo "$ac_t""no" 1>&6
12158 fi
12159
12160 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12161 echo "configure:12162: checking for working vfork" >&5
12162
12163 cat > conftest.$ac_ext <<EOF
12164 #line 12165 "configure"
12165 #include "confdefs.h"
12166 /* Thanks to Paul Eggert for this test.  */
12167 #include <stdio.h>
12168 #include <sys/types.h>
12169 #include <sys/stat.h>
12170 #ifdef HAVE_UNISTD_H
12171 #include <unistd.h>
12172 #endif
12173 #ifdef HAVE_VFORK_H
12174 #include <vfork.h>
12175 #endif
12176 /* On some sparc systems, changes by the child to local and incoming
12177    argument registers are propagated back to the parent.
12178    The compiler is told about this with #include <vfork.h>,
12179    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12180    Test for this by using a static variable whose address
12181    is put into a register that is clobbered by the vfork.  */
12182 static
12183 #ifdef __cplusplus
12184 sparc_address_test (int arg)
12185 #else
12186 sparc_address_test (arg) int arg;
12187 #endif
12188 {
12189   static pid_t child;
12190   if (!child) {
12191     child = vfork ();
12192     if (child < 0) {
12193       perror ("vfork");
12194       _exit(2);
12195     }
12196     if (!child) {
12197       arg = getpid();
12198       write(-1, "", 0);
12199       _exit (arg);
12200     }
12201   }
12202 }
12203 main() {
12204   pid_t parent = getpid ();
12205   pid_t child;
12206
12207   sparc_address_test ();
12208
12209   child = vfork ();
12210
12211   if (child == 0) {
12212     /* Here is another test for sparc vfork register problems.
12213        This test uses lots of local variables, at least
12214        as many local variables as main has allocated so far
12215        including compiler temporaries.  4 locals are enough for
12216        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12217        A buggy compiler should reuse the register of parent
12218        for one of the local variables, since it will think that
12219        parent can't possibly be used any more in this routine.
12220        Assigning to the local variable will thus munge parent
12221        in the parent process.  */
12222     pid_t
12223       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12224       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12225     /* Convince the compiler that p..p7 are live; otherwise, it might
12226        use the same hardware register for all 8 local variables.  */
12227     if (p != p1 || p != p2 || p != p3 || p != p4
12228         || p != p5 || p != p6 || p != p7)
12229       _exit(1);
12230
12231     /* On some systems (e.g. IRIX 3.3),
12232        vfork doesn't separate parent from child file descriptors.
12233        If the child closes a descriptor before it execs or exits,
12234        this munges the parent's descriptor as well.
12235        Test for this by closing stdout in the child.  */
12236     _exit(close(fileno(stdout)) != 0);
12237   } else {
12238     int status;
12239     struct stat st;
12240
12241     while (wait(&status) != child)
12242       ;
12243     exit(
12244          /* Was there some problem with vforking?  */
12245          child < 0
12246
12247          /* Did the child fail?  (This shouldn't happen.)  */
12248          || status
12249
12250          /* Did the vfork/compiler bug occur?  */
12251          || parent != getpid()
12252
12253          /* Did the file descriptor bug occur?  */
12254          || fstat(fileno(stdout), &st) != 0
12255          );
12256   }
12257 }
12258 EOF
12259 if { (eval echo configure:12260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12260 then
12261   ac_cv_func_vfork_works=yes
12262 else
12263   conftest_rc="$?"
12264   echo "configure: failed program was:" >&5
12265   cat conftest.$ac_ext >&5
12266   rm -fr conftest*
12267   ac_cv_func_vfork_works=no
12268 fi
12269 rm -fr conftest*
12270
12271 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12272 if test $ac_cv_func_vfork_works = no; then
12273   { test "$extra_verbose" = "yes" && cat << \EOF
12274     Defining vfork = fork
12275 EOF
12276 cat >> confdefs.h <<\EOF
12277 #define vfork fork
12278 EOF
12279 }
12280
12281 fi
12282
12283
12284 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12285 echo "configure:12286: checking for working strcoll" >&5
12286
12287 cat > conftest.$ac_ext <<EOF
12288 #line 12289 "configure"
12289 #include "confdefs.h"
12290 #include <string.h>
12291 main ()
12292 {
12293   exit (strcoll ("abc", "def") >= 0 ||
12294         strcoll ("ABC", "DEF") >= 0 ||
12295         strcoll ("123", "456") >= 0);
12296 }
12297 EOF
12298 if { (eval echo configure:12299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12299 then
12300   ac_cv_func_strcoll_works=yes
12301 else
12302   conftest_rc="$?"
12303   echo "configure: failed program was:" >&5
12304   cat conftest.$ac_ext >&5
12305   rm -fr conftest*
12306   ac_cv_func_strcoll_works=no
12307 fi
12308 rm -fr conftest*
12309
12310 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12311 if test $ac_cv_func_strcoll_works = yes; then
12312   { test "$extra_verbose" = "yes" && cat << \EOF
12313     Defining HAVE_STRCOLL
12314 EOF
12315 cat >> confdefs.h <<\EOF
12316 #define HAVE_STRCOLL 1
12317 EOF
12318 }
12319
12320 fi
12321
12322
12323 for ac_func in getpgrp
12324 do
12325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12326 echo "configure:12327: checking for $ac_func" >&5
12327
12328 cat > conftest.$ac_ext <<EOF
12329 #line 12330 "configure"
12330 #include "confdefs.h"
12331 /* System header to define __stub macros and hopefully few prototypes,
12332     which can conflict with char $ac_func(); below.  */
12333 #include <assert.h>
12334 /* Override any gcc2 internal prototype to avoid an error.  */
12335 /* We use char because int might match the return type of a gcc2
12336     builtin and then its argument prototype would still apply.  */
12337 char $ac_func();
12338
12339 int main() {
12340
12341 /* The GNU C library defines this for functions which it implements
12342     to always fail with ENOSYS.  Some functions are actually named
12343     something starting with __ and the normal name is an alias.  */
12344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12345 choke me
12346 #else
12347 $ac_func();
12348 #endif
12349
12350 ; return 0; }
12351 EOF
12352 if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12353   rm -rf conftest*
12354   eval "ac_cv_func_$ac_func=yes"
12355 else
12356   echo "configure: failed program was:" >&5
12357   cat conftest.$ac_ext >&5
12358   rm -rf conftest*
12359   eval "ac_cv_func_$ac_func=no"
12360 fi
12361 rm -f conftest*
12362
12363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12364   echo "$ac_t""yes" 1>&6
12365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12366   { test "$extra_verbose" = "yes" && cat << EOF
12367     Defining $ac_tr_func
12368 EOF
12369 cat >> confdefs.h <<EOF
12370 #define $ac_tr_func 1
12371 EOF
12372 }
12373  
12374 else
12375   echo "$ac_t""no" 1>&6
12376 fi
12377 done
12378
12379 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12380 echo "configure:12381: checking whether getpgrp takes no argument" >&5
12381
12382 cat > conftest.$ac_ext <<EOF
12383 #line 12384 "configure"
12384 #include "confdefs.h"
12385
12386 /*
12387  * If this system has a BSD-style getpgrp(),
12388  * which takes a pid argument, exit unsuccessfully.
12389  *
12390  * Snarfed from Chet Ramey's bash pgrp.c test program
12391  */
12392 #include <stdio.h>
12393 #include <sys/types.h>
12394
12395 int     pid;
12396 int     pg1, pg2, pg3, pg4;
12397 int     ng, np, s, child;
12398
12399 main()
12400 {
12401         pid = getpid();
12402         pg1 = getpgrp(0);
12403         pg2 = getpgrp();
12404         pg3 = getpgrp(pid);
12405         pg4 = getpgrp(1);
12406
12407         /*
12408          * If all of these values are the same, it's pretty sure that
12409          * we're on a system that ignores getpgrp's first argument.
12410          */
12411         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12412                 exit(0);
12413
12414         child = fork();
12415         if (child < 0)
12416                 exit(1);
12417         else if (child == 0) {
12418                 np = getpid();
12419                 /*
12420                  * If this is Sys V, this will not work; pgrp will be
12421                  * set to np because setpgrp just changes a pgrp to be
12422                  * the same as the pid.
12423                  */
12424                 setpgrp(np, pg1);
12425                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12426                 if (ng == pg1) {
12427                         exit(1);
12428                 } else {
12429                         exit(0);
12430                 }
12431         } else {
12432                 wait(&s);
12433                 exit(s>>8);
12434         }
12435 }
12436
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12439 then
12440   ac_cv_func_getpgrp_void=yes
12441 else
12442   conftest_rc="$?"
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -fr conftest*
12446   ac_cv_func_getpgrp_void=no
12447 fi
12448 rm -fr conftest*
12449
12450
12451 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12452 if test $ac_cv_func_getpgrp_void = yes; then
12453   { test "$extra_verbose" = "yes" && cat << \EOF
12454     Defining GETPGRP_VOID
12455 EOF
12456 cat >> confdefs.h <<\EOF
12457 #define GETPGRP_VOID 1
12458 EOF
12459 }
12460
12461 fi
12462
12463
12464 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12465 echo "configure:12466: checking for working mmap" >&5
12466 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12467 cat > conftest.$ac_ext <<EOF
12468 #line 12469 "configure"
12469 #include "confdefs.h"
12470 #include <stdio.h>
12471 #include <unistd.h>
12472 #include <fcntl.h>
12473 #include <sys/mman.h>
12474
12475 #ifndef MAP_VARIABLE
12476 #define MAP_VARIABLE 0
12477 #endif
12478
12479 #ifndef MAP_FAILED
12480 #define MAP_FAILED -1
12481 #endif
12482
12483 int main (int argc, char *argv[])
12484 {
12485   int fd = -1;
12486   caddr_t p;
12487 #ifndef MAP_ANONYMOUS
12488   fd = open ("/dev/zero", O_RDWR);
12489   if (fd < 0)
12490     return 1;
12491 #define MAP_ANONYMOUS 0
12492 #endif
12493   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12494            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12495            fd, 0) != (void *) MAP_FAILED)
12496     return 0;
12497   perror ("conftest: mmap failed");
12498   return 1;
12499 }
12500 EOF
12501 if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12502 then
12503   have_mmap=yes
12504 else
12505   conftest_rc="$?"
12506   echo "configure: failed program was:" >&5
12507   cat conftest.$ac_ext >&5
12508   rm -fr conftest*
12509   have_mmap=no
12510 fi
12511 rm -fr conftest* ;;
12512 esac
12513 echo "$ac_t""$have_mmap" 1>&6
12514 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12515     Defining HAVE_MMAP
12516 EOF
12517 cat >> confdefs.h <<\EOF
12518 #define HAVE_MMAP 1
12519 EOF
12520 }
12521
12522
12523 case "$opsys" in cygwin*) 
12524         test "$rel_alloc" = "default" && rel_alloc=no ;;
12525 esac
12526 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12527 if test "$rel_alloc $have_mmap" = "default yes"; then
12528   if test "$doug_lea_malloc" = "yes"; then
12529         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12530 echo "configure:12531: checking for M_MMAP_THRESHOLD" >&5
12531     cat > conftest.$ac_ext <<EOF
12532 #line 12533 "configure"
12533 #include "confdefs.h"
12534 #include <malloc.h>
12535 int main() {
12536
12537 #ifndef M_MMAP_THRESHOLD
12538 #error No M_MMAP_THRESHOLD :-(
12539 !@+$%^&*_)(_ - unlikely to compile...
12540 #endif
12541
12542 ; return 0; }
12543 EOF
12544 if { (eval echo configure:12545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12545   rm -rf conftest*
12546   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12547 else
12548   echo "configure: failed program was:" >&5
12549   cat conftest.$ac_ext >&5
12550   rm -rf conftest*
12551   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12552 fi
12553 rm -f conftest*
12554   else
12555     rel_alloc=yes
12556   fi
12557 fi
12558 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12559     Defining REL_ALLOC
12560 EOF
12561 cat >> confdefs.h <<\EOF
12562 #define REL_ALLOC 1
12563 EOF
12564 }
12565
12566
12567 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12568 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12569 echo "configure:12570: checking for termios.h" >&5
12570
12571 cat > conftest.$ac_ext <<EOF
12572 #line 12573 "configure"
12573 #include "confdefs.h"
12574 #include <termios.h>
12575 EOF
12576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12577 { (eval echo configure:12578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12579 if test -z "$ac_err"; then
12580   rm -rf conftest*
12581   eval "ac_cv_header_$ac_safe=yes"
12582 else
12583   echo "$ac_err" >&5
12584   echo "configure: failed program was:" >&5
12585   cat conftest.$ac_ext >&5
12586   rm -rf conftest*
12587   eval "ac_cv_header_$ac_safe=no"
12588 fi
12589 rm -f conftest*
12590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12591   echo "$ac_t""yes" 1>&6
12592   { test "$extra_verbose" = "yes" && cat << \EOF
12593     Defining HAVE_TERMIOS
12594 EOF
12595 cat >> confdefs.h <<\EOF
12596 #define HAVE_TERMIOS 1
12597 EOF
12598 }
12599
12600   { test "$extra_verbose" = "yes" && cat << \EOF
12601     Defining SIGNALS_VIA_CHARACTERS
12602 EOF
12603 cat >> confdefs.h <<\EOF
12604 #define SIGNALS_VIA_CHARACTERS 1
12605 EOF
12606 }
12607
12608   { test "$extra_verbose" = "yes" && cat << \EOF
12609     Defining NO_TERMIO
12610 EOF
12611 cat >> confdefs.h <<\EOF
12612 #define NO_TERMIO 1
12613 EOF
12614 }
12615
12616 else
12617   echo "$ac_t""no" 1>&6
12618 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12619 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12620 echo "configure:12621: checking for termio.h" >&5
12621
12622 cat > conftest.$ac_ext <<EOF
12623 #line 12624 "configure"
12624 #include "confdefs.h"
12625 #include <termio.h>
12626 EOF
12627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12628 { (eval echo configure:12629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12630 if test -z "$ac_err"; then
12631   rm -rf conftest*
12632   eval "ac_cv_header_$ac_safe=yes"
12633 else
12634   echo "$ac_err" >&5
12635   echo "configure: failed program was:" >&5
12636   cat conftest.$ac_ext >&5
12637   rm -rf conftest*
12638   eval "ac_cv_header_$ac_safe=no"
12639 fi
12640 rm -f conftest*
12641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12642   echo "$ac_t""yes" 1>&6
12643   { test "$extra_verbose" = "yes" && cat << \EOF
12644     Defining HAVE_TERMIO
12645 EOF
12646 cat >> confdefs.h <<\EOF
12647 #define HAVE_TERMIO 1
12648 EOF
12649 }
12650
12651 else
12652   echo "$ac_t""no" 1>&6
12653 fi
12654
12655 fi
12656
12657
12658
12659 echo $ac_n "checking for socket""... $ac_c" 1>&6
12660 echo "configure:12661: checking for socket" >&5
12661
12662 cat > conftest.$ac_ext <<EOF
12663 #line 12664 "configure"
12664 #include "confdefs.h"
12665 /* System header to define __stub macros and hopefully few prototypes,
12666     which can conflict with char socket(); below.  */
12667 #include <assert.h>
12668 /* Override any gcc2 internal prototype to avoid an error.  */
12669 /* We use char because int might match the return type of a gcc2
12670     builtin and then its argument prototype would still apply.  */
12671 char socket();
12672
12673 int main() {
12674
12675 /* The GNU C library defines this for functions which it implements
12676     to always fail with ENOSYS.  Some functions are actually named
12677     something starting with __ and the normal name is an alias.  */
12678 #if defined (__stub_socket) || defined (__stub___socket)
12679 choke me
12680 #else
12681 socket();
12682 #endif
12683
12684 ; return 0; }
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12687   rm -rf conftest*
12688   eval "ac_cv_func_socket=yes"
12689 else
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -rf conftest*
12693   eval "ac_cv_func_socket=no"
12694 fi
12695 rm -f conftest*
12696
12697 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12698   echo "$ac_t""yes" 1>&6
12699   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12700 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12701 echo "configure:12702: checking for netinet/in.h" >&5
12702
12703 cat > conftest.$ac_ext <<EOF
12704 #line 12705 "configure"
12705 #include "confdefs.h"
12706 #include <netinet/in.h>
12707 EOF
12708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12709 { (eval echo configure:12710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12711 if test -z "$ac_err"; then
12712   rm -rf conftest*
12713   eval "ac_cv_header_$ac_safe=yes"
12714 else
12715   echo "$ac_err" >&5
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   eval "ac_cv_header_$ac_safe=no"
12720 fi
12721 rm -f conftest*
12722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12723   echo "$ac_t""yes" 1>&6
12724   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12725 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12726 echo "configure:12727: checking for arpa/inet.h" >&5
12727
12728 cat > conftest.$ac_ext <<EOF
12729 #line 12730 "configure"
12730 #include "confdefs.h"
12731 #include <arpa/inet.h>
12732 EOF
12733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12734 { (eval echo configure:12735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12736 if test -z "$ac_err"; then
12737   rm -rf conftest*
12738   eval "ac_cv_header_$ac_safe=yes"
12739 else
12740   echo "$ac_err" >&5
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -rf conftest*
12744   eval "ac_cv_header_$ac_safe=no"
12745 fi
12746 rm -f conftest*
12747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12748   echo "$ac_t""yes" 1>&6
12749   
12750   { test "$extra_verbose" = "yes" && cat << \EOF
12751     Defining HAVE_SOCKETS
12752 EOF
12753 cat >> confdefs.h <<\EOF
12754 #define HAVE_SOCKETS 1
12755 EOF
12756 }
12757
12758       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12759 echo "configure:12760: checking "for sun_len member in struct sockaddr_un"" >&5
12760       cat > conftest.$ac_ext <<EOF
12761 #line 12762 "configure"
12762 #include "confdefs.h"
12763
12764 #include <sys/types.h>
12765 #include <sys/socket.h>
12766 #include <sys/un.h>
12767       
12768 int main() {
12769 static struct sockaddr_un x; x.sun_len = 1;
12770 ; return 0; }
12771 EOF
12772 if { (eval echo configure:12773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12773   rm -rf conftest*
12774   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12775     Defining HAVE_SOCKADDR_SUN_LEN
12776 EOF
12777 cat >> confdefs.h <<\EOF
12778 #define HAVE_SOCKADDR_SUN_LEN 1
12779 EOF
12780 }
12781
12782 else
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   echo "$ac_t""no" 1>&6
12787 fi
12788 rm -f conftest*
12789       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12790 echo "configure:12791: checking "for ip_mreq struct in netinet/in.h"" >&5
12791       cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794
12795 #include <sys/types.h>
12796 #include <netinet/in.h>
12797       
12798 int main() {
12799 static struct ip_mreq x;
12800 ; return 0; }
12801 EOF
12802 if { (eval echo configure:12803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12803   rm -rf conftest*
12804   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12805     Defining HAVE_MULTICAST
12806 EOF
12807 cat >> confdefs.h <<\EOF
12808 #define HAVE_MULTICAST 1
12809 EOF
12810 }
12811
12812 else
12813   echo "configure: failed program was:" >&5
12814   cat conftest.$ac_ext >&5
12815   rm -rf conftest*
12816   echo "$ac_t""no" 1>&6
12817 fi
12818 rm -f conftest*
12819 else
12820   echo "$ac_t""no" 1>&6
12821 fi
12822
12823 else
12824   echo "$ac_t""no" 1>&6
12825 fi
12826
12827 else
12828   echo "$ac_t""no" 1>&6
12829 fi
12830
12831
12832 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12833 echo "configure:12834: checking for msgget" >&5
12834
12835 cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 /* System header to define __stub macros and hopefully few prototypes,
12839     which can conflict with char msgget(); below.  */
12840 #include <assert.h>
12841 /* Override any gcc2 internal prototype to avoid an error.  */
12842 /* We use char because int might match the return type of a gcc2
12843     builtin and then its argument prototype would still apply.  */
12844 char msgget();
12845
12846 int main() {
12847
12848 /* The GNU C library defines this for functions which it implements
12849     to always fail with ENOSYS.  Some functions are actually named
12850     something starting with __ and the normal name is an alias.  */
12851 #if defined (__stub_msgget) || defined (__stub___msgget)
12852 choke me
12853 #else
12854 msgget();
12855 #endif
12856
12857 ; return 0; }
12858 EOF
12859 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12860   rm -rf conftest*
12861   eval "ac_cv_func_msgget=yes"
12862 else
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -rf conftest*
12866   eval "ac_cv_func_msgget=no"
12867 fi
12868 rm -f conftest*
12869
12870 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12871   echo "$ac_t""yes" 1>&6
12872   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12873 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12874 echo "configure:12875: checking for sys/ipc.h" >&5
12875
12876 cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879 #include <sys/ipc.h>
12880 EOF
12881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12882 { (eval echo configure:12883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12884 if test -z "$ac_err"; then
12885   rm -rf conftest*
12886   eval "ac_cv_header_$ac_safe=yes"
12887 else
12888   echo "$ac_err" >&5
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -rf conftest*
12892   eval "ac_cv_header_$ac_safe=no"
12893 fi
12894 rm -f conftest*
12895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12896   echo "$ac_t""yes" 1>&6
12897   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12898 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12899 echo "configure:12900: checking for sys/msg.h" >&5
12900
12901 cat > conftest.$ac_ext <<EOF
12902 #line 12903 "configure"
12903 #include "confdefs.h"
12904 #include <sys/msg.h>
12905 EOF
12906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12907 { (eval echo configure:12908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12909 if test -z "$ac_err"; then
12910   rm -rf conftest*
12911   eval "ac_cv_header_$ac_safe=yes"
12912 else
12913   echo "$ac_err" >&5
12914   echo "configure: failed program was:" >&5
12915   cat conftest.$ac_ext >&5
12916   rm -rf conftest*
12917   eval "ac_cv_header_$ac_safe=no"
12918 fi
12919 rm -f conftest*
12920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12921   echo "$ac_t""yes" 1>&6
12922   { test "$extra_verbose" = "yes" && cat << \EOF
12923     Defining HAVE_SYSVIPC
12924 EOF
12925 cat >> confdefs.h <<\EOF
12926 #define HAVE_SYSVIPC 1
12927 EOF
12928 }
12929
12930 else
12931   echo "$ac_t""no" 1>&6
12932 fi
12933
12934 else
12935   echo "$ac_t""no" 1>&6
12936 fi
12937
12938 else
12939   echo "$ac_t""no" 1>&6
12940 fi
12941
12942
12943 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12944 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12945 echo "configure:12946: checking for dirent.h" >&5
12946
12947 cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 #include <dirent.h>
12951 EOF
12952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12953 { (eval echo configure:12954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12955 if test -z "$ac_err"; then
12956   rm -rf conftest*
12957   eval "ac_cv_header_$ac_safe=yes"
12958 else
12959   echo "$ac_err" >&5
12960   echo "configure: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   rm -rf conftest*
12963   eval "ac_cv_header_$ac_safe=no"
12964 fi
12965 rm -f conftest*
12966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12967   echo "$ac_t""yes" 1>&6
12968   { test "$extra_verbose" = "yes" && cat << \EOF
12969     Defining SYSV_SYSTEM_DIR
12970 EOF
12971 cat >> confdefs.h <<\EOF
12972 #define SYSV_SYSTEM_DIR 1
12973 EOF
12974 }
12975
12976 else
12977   echo "$ac_t""no" 1>&6
12978 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12979 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12980 echo "configure:12981: checking for sys/dir.h" >&5
12981
12982 cat > conftest.$ac_ext <<EOF
12983 #line 12984 "configure"
12984 #include "confdefs.h"
12985 #include <sys/dir.h>
12986 EOF
12987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12988 { (eval echo configure:12989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12990 if test -z "$ac_err"; then
12991   rm -rf conftest*
12992   eval "ac_cv_header_$ac_safe=yes"
12993 else
12994   echo "$ac_err" >&5
12995   echo "configure: failed program was:" >&5
12996   cat conftest.$ac_ext >&5
12997   rm -rf conftest*
12998   eval "ac_cv_header_$ac_safe=no"
12999 fi
13000 rm -f conftest*
13001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13002   echo "$ac_t""yes" 1>&6
13003   :
13004 else
13005   echo "$ac_t""no" 1>&6
13006 { test "$extra_verbose" = "yes" && cat << \EOF
13007     Defining NONSYSTEM_DIR_LIBRARY
13008 EOF
13009 cat >> confdefs.h <<\EOF
13010 #define NONSYSTEM_DIR_LIBRARY 1
13011 EOF
13012 }
13013
13014 fi
13015
13016 fi
13017
13018
13019 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13020 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13021 echo "configure:13022: checking for nlist.h" >&5
13022
13023 cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 #include <nlist.h>
13027 EOF
13028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13029 { (eval echo configure:13030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13031 if test -z "$ac_err"; then
13032   rm -rf conftest*
13033   eval "ac_cv_header_$ac_safe=yes"
13034 else
13035   echo "$ac_err" >&5
13036   echo "configure: failed program was:" >&5
13037   cat conftest.$ac_ext >&5
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=no"
13040 fi
13041 rm -f conftest*
13042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13043   echo "$ac_t""yes" 1>&6
13044   { test "$extra_verbose" = "yes" && cat << \EOF
13045     Defining NLIST_STRUCT
13046 EOF
13047 cat >> confdefs.h <<\EOF
13048 #define NLIST_STRUCT 1
13049 EOF
13050 }
13051
13052 else
13053   echo "$ac_t""no" 1>&6
13054 fi
13055
13056
13057
13058 echo "checking "for sound support"" 1>&6
13059 echo "configure:13060: checking "for sound support"" >&5
13060 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13061
13062 if test "$with_native_sound" != "no"; then
13063     if test -n "$native_sound_lib"; then
13064     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13065 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13066 echo "configure:13067: checking for multimedia/audio_device.h" >&5
13067
13068 cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071 #include <multimedia/audio_device.h>
13072 EOF
13073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13074 { (eval echo configure:13075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13076 if test -z "$ac_err"; then
13077   rm -rf conftest*
13078   eval "ac_cv_header_$ac_safe=yes"
13079 else
13080   echo "$ac_err" >&5
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -rf conftest*
13084   eval "ac_cv_header_$ac_safe=no"
13085 fi
13086 rm -f conftest*
13087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13088   echo "$ac_t""yes" 1>&6
13089   sound_found=yes sound_cflags=""
13090       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13091    echo "    xemacs will be linked with \"sunplay.o\""
13092  fi
13093 else
13094   echo "$ac_t""no" 1>&6
13095 fi
13096
13097   fi
13098
13099     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13100     sound_found=yes
13101     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13102    echo "    xemacs will be linked with \"sunplay.o\""
13103  fi
13104     if test -d "/usr/demo/SOUND/include"
13105       then sound_cflags="-I/usr/demo/SOUND/include"
13106       else sound_cflags="-I/usr/demo/SOUND"
13107     fi
13108     if test -z "$native_sound_lib" ; then
13109       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13110         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13111         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13112       fi
13113     fi
13114   fi
13115
13116     if test -z "$sound_found"; then
13117     case "$canonical" in
13118     *-sgi-* )
13119       if test -z "$native_sound_lib"; then
13120         
13121 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13122 echo "configure:13123: checking for ALopenport in -laudio" >&5
13123 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13124
13125 xe_check_libs=" -laudio "
13126 cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 /* Override any gcc2 internal prototype to avoid an error.  */
13130 /* We use char because int might match the return type of a gcc2
13131     builtin and then its argument prototype would still apply.  */
13132 char ALopenport();
13133
13134 int main() {
13135 ALopenport()
13136 ; return 0; }
13137 EOF
13138 if { (eval echo configure:13139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13139   rm -rf conftest*
13140   eval "ac_cv_lib_$ac_lib_var=yes"
13141 else
13142   echo "configure: failed program was:" >&5
13143   cat conftest.$ac_ext >&5
13144   rm -rf conftest*
13145   eval "ac_cv_lib_$ac_lib_var=no"
13146 fi
13147 rm -f conftest*
13148 xe_check_libs=""
13149
13150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13151   echo "$ac_t""yes" 1>&6
13152   native_sound_lib="-laudio"
13153 else
13154   echo "$ac_t""no" 1>&6
13155 fi
13156
13157
13158       fi
13159       if test -n "$native_sound_lib"; then
13160         sound_found=yes sound_cflags=""
13161         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13162    echo "    xemacs will be linked with \"sgiplay.o\""
13163  fi
13164       fi ;;
13165     hppa*-hp-hpux* )
13166       if test -z "$native_sound_lib"; then
13167         
13168 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13169 echo "configure:13170: checking for AOpenAudio in -lAlib" >&5
13170 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13171
13172 xe_check_libs=" -lAlib "
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* Override any gcc2 internal prototype to avoid an error.  */
13177 /* We use char because int might match the return type of a gcc2
13178     builtin and then its argument prototype would still apply.  */
13179 char AOpenAudio();
13180
13181 int main() {
13182 AOpenAudio()
13183 ; return 0; }
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13186   rm -rf conftest*
13187   eval "ac_cv_lib_$ac_lib_var=yes"
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   eval "ac_cv_lib_$ac_lib_var=no"
13193 fi
13194 rm -f conftest*
13195 xe_check_libs=""
13196
13197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13198   echo "$ac_t""yes" 1>&6
13199   native_sound_lib="-lAlib"
13200 else
13201   echo "$ac_t""no" 1>&6
13202 fi
13203
13204
13205       fi
13206       if test -n "$native_sound_lib"; then
13207         sound_found=yes
13208         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13209    echo "    xemacs will be linked with \"hpplay.o\""
13210  fi
13211         if test "$GCC" = "yes" # Kludge city
13212           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13213           else sound_cflags="+e -I/usr/audio/examples"
13214         fi
13215       fi ;;
13216     esac
13217   fi
13218
13219     if test -z "$sound_found"; then
13220     if test "$with_msw" = "yes"; then
13221     sound_found=yes
13222     native_sound_lib=
13223     fi
13224   fi
13225
13226     if test -z "$sound_found"; then
13227     for dir in "machine" "sys" "linux"; do
13228       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13229 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13230 echo "configure:13231: checking for ${dir}/soundcard.h" >&5
13231
13232 cat > conftest.$ac_ext <<EOF
13233 #line 13234 "configure"
13234 #include "confdefs.h"
13235 #include <${dir}/soundcard.h>
13236 EOF
13237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13238 { (eval echo configure:13239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13240 if test -z "$ac_err"; then
13241   rm -rf conftest*
13242   eval "ac_cv_header_$ac_safe=yes"
13243 else
13244   echo "$ac_err" >&5
13245   echo "configure: failed program was:" >&5
13246   cat conftest.$ac_ext >&5
13247   rm -rf conftest*
13248   eval "ac_cv_header_$ac_safe=no"
13249 fi
13250 rm -f conftest*
13251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13252   echo "$ac_t""yes" 1>&6
13253   sound_found=yes
13254        need_miscplay=yes
13255         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13256    echo "    xemacs will be linked with \"linuxplay.o\""
13257  fi
13258         { test "$extra_verbose" = "yes" && cat << EOF
13259     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13260 EOF
13261 cat >> confdefs.h <<EOF
13262 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13263 EOF
13264 }
13265
13266         break
13267 else
13268   echo "$ac_t""no" 1>&6
13269 fi
13270
13271     done
13272   fi
13273
13274   test "$sound_found" = "yes" && with_native_sound=yes
13275 fi
13276
13277 if test "$with_native_sound" = "yes"; then
13278   { test "$extra_verbose" = "yes" && cat << \EOF
13279     Defining HAVE_NATIVE_SOUND
13280 EOF
13281 cat >> confdefs.h <<\EOF
13282 #define HAVE_NATIVE_SOUND 1
13283 EOF
13284 }
13285
13286   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13287 fi
13288
13289 if test "$with_nas_sound" != "no"; then
13290   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13291 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13292 echo "configure:13293: checking for audio/audiolib.h" >&5
13293
13294 cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 #include <audio/audiolib.h>
13298 EOF
13299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13300 { (eval echo configure:13301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13302 if test -z "$ac_err"; then
13303   rm -rf conftest*
13304   eval "ac_cv_header_$ac_safe=yes"
13305 else
13306   echo "$ac_err" >&5
13307   echo "configure: failed program was:" >&5
13308   cat conftest.$ac_ext >&5
13309   rm -rf conftest*
13310   eval "ac_cv_header_$ac_safe=no"
13311 fi
13312 rm -f conftest*
13313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13314   echo "$ac_t""yes" 1>&6
13315   
13316     
13317 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13318 echo "configure:13319: checking for AuOpenServer in -laudio" >&5
13319 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13320
13321 xe_check_libs=" -laudio "
13322 cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325 /* Override any gcc2 internal prototype to avoid an error.  */
13326 /* We use char because int might match the return type of a gcc2
13327     builtin and then its argument prototype would still apply.  */
13328 char AuOpenServer();
13329
13330 int main() {
13331 AuOpenServer()
13332 ; return 0; }
13333 EOF
13334 if { (eval echo configure:13335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13335   rm -rf conftest*
13336   eval "ac_cv_lib_$ac_lib_var=yes"
13337 else
13338   echo "configure: failed program was:" >&5
13339   cat conftest.$ac_ext >&5
13340   rm -rf conftest*
13341   eval "ac_cv_lib_$ac_lib_var=no"
13342 fi
13343 rm -f conftest*
13344 xe_check_libs=""
13345
13346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13347   echo "$ac_t""yes" 1>&6
13348   have_nas_sound=yes
13349 else
13350   echo "$ac_t""no" 1>&6
13351 fi
13352
13353
13354 else
13355   echo "$ac_t""no" 1>&6
13356 fi
13357
13358   if test "$have_nas_sound" = "yes"; then
13359     with_nas_sound=yes
13360     { test "$extra_verbose" = "yes" && cat << \EOF
13361     Defining HAVE_NAS_SOUND
13362 EOF
13363 cat >> confdefs.h <<\EOF
13364 #define HAVE_NAS_SOUND 1
13365 EOF
13366 }
13367
13368     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13369    echo "    xemacs will be linked with \"nas.o\""
13370  fi
13371     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13372             cat > conftest.$ac_ext <<EOF
13373 #line 13374 "configure"
13374 #include "confdefs.h"
13375 #include <audio/Xtutil.h>
13376 EOF
13377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13378   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13379   :
13380 else
13381   rm -rf conftest*
13382   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13383     Defining NAS_NO_ERROR_JUMP
13384 EOF
13385 cat >> confdefs.h <<\EOF
13386 #define NAS_NO_ERROR_JUMP 1
13387 EOF
13388 }
13389
13390 fi
13391 rm -f conftest*
13392
13393   else
13394     test "$with_nas_sound" = "yes" && \
13395       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13396     with_nas_sound=no
13397   fi
13398 fi
13399
13400 if test "$with_esd_sound" != "no"; then
13401   # Extract the first word of "esd-config", so it can be a program name with args.
13402 set dummy esd-config; ac_word=$2
13403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13404 echo "configure:13405: checking for $ac_word" >&5
13405
13406 if test -n "$have_esd_config"; then
13407   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13408 else
13409   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13410   ac_dummy="$PATH"
13411   for ac_dir in $ac_dummy; do
13412     test -z "$ac_dir" && ac_dir=.
13413     if test -f $ac_dir/$ac_word; then
13414       ac_cv_prog_have_esd_config="yes"
13415       break
13416     fi
13417   done
13418   IFS="$ac_save_ifs"
13419   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13420 fi
13421 have_esd_config="$ac_cv_prog_have_esd_config"
13422 if test -n "$have_esd_config"; then
13423   echo "$ac_t""$have_esd_config" 1>&6
13424 else
13425   echo "$ac_t""no" 1>&6
13426 fi
13427
13428   if test "$have_esd_config" = "yes"; then
13429     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13430     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
13431     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13432     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13433 echo "configure:13434: checking for esd_play_stream" >&5
13434
13435 cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438 /* System header to define __stub macros and hopefully few prototypes,
13439     which can conflict with char esd_play_stream(); below.  */
13440 #include <assert.h>
13441 /* Override any gcc2 internal prototype to avoid an error.  */
13442 /* We use char because int might match the return type of a gcc2
13443     builtin and then its argument prototype would still apply.  */
13444 char esd_play_stream();
13445
13446 int main() {
13447
13448 /* The GNU C library defines this for functions which it implements
13449     to always fail with ENOSYS.  Some functions are actually named
13450     something starting with __ and the normal name is an alias.  */
13451 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13452 choke me
13453 #else
13454 esd_play_stream();
13455 #endif
13456
13457 ; return 0; }
13458 EOF
13459 if { (eval echo configure:13460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13460   rm -rf conftest*
13461   eval "ac_cv_func_esd_play_stream=yes"
13462 else
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   eval "ac_cv_func_esd_play_stream=no"
13467 fi
13468 rm -f conftest*
13469
13470 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13471   echo "$ac_t""yes" 1>&6
13472   have_esd_sound=yes
13473 else
13474   echo "$ac_t""no" 1>&6
13475 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13476 fi
13477
13478   fi
13479
13480   if test "$have_esd_sound" = "yes"; then
13481     with_esd_sound=yes
13482     need_miscplay=yes
13483     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13484    echo "    xemacs will be linked with \"esd.o\""
13485  fi
13486     { test "$extra_verbose" = "yes" && cat << \EOF
13487     Defining HAVE_ESD_SOUND
13488 EOF
13489 cat >> confdefs.h <<\EOF
13490 #define HAVE_ESD_SOUND 1
13491 EOF
13492 }
13493
13494   else
13495     test "$with_esd_sound" = "yes" && \
13496       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13497     with_esd_sound=no
13498   fi
13499 fi
13500
13501 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13502    echo "    xemacs will be linked with \"miscplay.o\""
13503  fi
13504
13505
13506 test -z "$with_tty" && with_tty=yes
13507
13508 if test "$with_tty" = "yes"  ; then
13509   echo "checking for TTY-related features" 1>&6
13510 echo "configure:13511: checking for TTY-related features" >&5
13511   { test "$extra_verbose" = "yes" && cat << \EOF
13512     Defining HAVE_TTY
13513 EOF
13514 cat >> confdefs.h <<\EOF
13515 #define HAVE_TTY 1
13516 EOF
13517 }
13518
13519   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
13520    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\""
13521  fi
13522
13523     if test -z "$with_ncurses"; then
13524     
13525 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13526 echo "configure:13527: checking for tgetent in -lncurses" >&5
13527 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13528
13529 xe_check_libs=" -lncurses "
13530 cat > conftest.$ac_ext <<EOF
13531 #line 13532 "configure"
13532 #include "confdefs.h"
13533 /* Override any gcc2 internal prototype to avoid an error.  */
13534 /* We use char because int might match the return type of a gcc2
13535     builtin and then its argument prototype would still apply.  */
13536 char tgetent();
13537
13538 int main() {
13539 tgetent()
13540 ; return 0; }
13541 EOF
13542 if { (eval echo configure:13543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13543   rm -rf conftest*
13544   eval "ac_cv_lib_$ac_lib_var=yes"
13545 else
13546   echo "configure: failed program was:" >&5
13547   cat conftest.$ac_ext >&5
13548   rm -rf conftest*
13549   eval "ac_cv_lib_$ac_lib_var=no"
13550 fi
13551 rm -f conftest*
13552 xe_check_libs=""
13553
13554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13555   echo "$ac_t""yes" 1>&6
13556   with_ncurses=yes
13557 else
13558   echo "$ac_t""no" 1>&6
13559 with_ncurses=no
13560 fi
13561
13562
13563   fi
13564   if test "$with_ncurses" = "yes"; then
13565     { test "$extra_verbose" = "yes" && cat << \EOF
13566     Defining HAVE_NCURSES
13567 EOF
13568 cat >> confdefs.h <<\EOF
13569 #define HAVE_NCURSES 1
13570 EOF
13571 }
13572
13573     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13574 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13575 echo "configure:13576: checking for ncurses/curses.h" >&5
13576
13577 cat > conftest.$ac_ext <<EOF
13578 #line 13579 "configure"
13579 #include "confdefs.h"
13580 #include <ncurses/curses.h>
13581 EOF
13582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13583 { (eval echo configure:13584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13585 if test -z "$ac_err"; then
13586   rm -rf conftest*
13587   eval "ac_cv_header_$ac_safe=yes"
13588 else
13589   echo "$ac_err" >&5
13590   echo "configure: failed program was:" >&5
13591   cat conftest.$ac_ext >&5
13592   rm -rf conftest*
13593   eval "ac_cv_header_$ac_safe=no"
13594 fi
13595 rm -f conftest*
13596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13597   echo "$ac_t""yes" 1>&6
13598   curses_h_file=ncurses/curses.h
13599 else
13600   echo "$ac_t""no" 1>&6
13601 fi
13602
13603     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13604 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13605 echo "configure:13606: checking for ncurses/term.h" >&5
13606
13607 cat > conftest.$ac_ext <<EOF
13608 #line 13609 "configure"
13609 #include "confdefs.h"
13610 #include <ncurses/term.h>
13611 EOF
13612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13613 { (eval echo configure:13614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13615 if test -z "$ac_err"; then
13616   rm -rf conftest*
13617   eval "ac_cv_header_$ac_safe=yes"
13618 else
13619   echo "$ac_err" >&5
13620   echo "configure: failed program was:" >&5
13621   cat conftest.$ac_ext >&5
13622   rm -rf conftest*
13623   eval "ac_cv_header_$ac_safe=no"
13624 fi
13625 rm -f conftest*
13626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13627   echo "$ac_t""yes" 1>&6
13628   term_h_file=ncurses/term.h
13629 else
13630   echo "$ac_t""no" 1>&6
13631 fi
13632
13633     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13634    echo "    xemacs will be linked with \"terminfo.o\""
13635  fi
13636     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13637
13638     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13639                         save_c_switch_site="$c_switch_site"
13640       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13641       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13642 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13643 echo "configure:13644: checking for ncurses/curses.h" >&5
13644
13645 cat > conftest.$ac_ext <<EOF
13646 #line 13647 "configure"
13647 #include "confdefs.h"
13648 #include <ncurses/curses.h>
13649 EOF
13650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13651 { (eval echo configure:13652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13653 if test -z "$ac_err"; then
13654   rm -rf conftest*
13655   eval "ac_cv_header_$ac_safe=yes"
13656 else
13657   echo "$ac_err" >&5
13658   echo "configure: failed program was:" >&5
13659   cat conftest.$ac_ext >&5
13660   rm -rf conftest*
13661   eval "ac_cv_header_$ac_safe=no"
13662 fi
13663 rm -f conftest*
13664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13665   echo "$ac_t""yes" 1>&6
13666   curses_h_file=ncurses/curses.h
13667 else
13668   echo "$ac_t""no" 1>&6
13669 fi
13670
13671       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13672         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13673         else c_switch_site="$save_c_switch_site"
13674       fi
13675     fi
13676   else         if test "$have_terminfo" = "yes"; then
13677       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13678    echo "    xemacs will be linked with \"terminfo.o\""
13679  fi
13680       if test -n "$libs_termcap"; then
13681         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13682       else
13683         for lib in curses termlib termcap; do
13684           
13685 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13686 echo "configure:13687: checking for tgetent in -l$lib" >&5
13687 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13688
13689 xe_check_libs=" -l$lib "
13690 cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693 /* Override any gcc2 internal prototype to avoid an error.  */
13694 /* We use char because int might match the return type of a gcc2
13695     builtin and then its argument prototype would still apply.  */
13696 char tgetent();
13697
13698 int main() {
13699 tgetent()
13700 ; return 0; }
13701 EOF
13702 if { (eval echo configure:13703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13703   rm -rf conftest*
13704   eval "ac_cv_lib_$ac_lib_var=yes"
13705 else
13706   echo "configure: failed program was:" >&5
13707   cat conftest.$ac_ext >&5
13708   rm -rf conftest*
13709   eval "ac_cv_lib_$ac_lib_var=no"
13710 fi
13711 rm -f conftest*
13712 xe_check_libs=""
13713
13714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13715   echo "$ac_t""yes" 1>&6
13716   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13717 else
13718   echo "$ac_t""no" 1>&6
13719 fi
13720
13721
13722         done
13723       fi
13724     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13725                                 
13726 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13727 echo "configure:13728: checking for tgoto in -ltermcap" >&5
13728 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13729
13730 xe_check_libs=" -ltermcap "
13731 cat > conftest.$ac_ext <<EOF
13732 #line 13733 "configure"
13733 #include "confdefs.h"
13734 /* Override any gcc2 internal prototype to avoid an error.  */
13735 /* We use char because int might match the return type of a gcc2
13736     builtin and then its argument prototype would still apply.  */
13737 char tgoto();
13738
13739 int main() {
13740 tgoto()
13741 ; return 0; }
13742 EOF
13743 if { (eval echo configure:13744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13744   rm -rf conftest*
13745   eval "ac_cv_lib_$ac_lib_var=yes"
13746 else
13747   echo "configure: failed program was:" >&5
13748   cat conftest.$ac_ext >&5
13749   rm -rf conftest*
13750   eval "ac_cv_lib_$ac_lib_var=no"
13751 fi
13752 rm -f conftest*
13753 xe_check_libs=""
13754
13755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13756   echo "$ac_t""yes" 1>&6
13757     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13758     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13759   { test "$extra_verbose" = "yes" && cat << EOF
13760     Defining $ac_tr_lib
13761 EOF
13762 cat >> confdefs.h <<EOF
13763 #define $ac_tr_lib 1
13764 EOF
13765 }
13766
13767   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13768
13769 else
13770   echo "$ac_t""no" 1>&6
13771 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13772    echo "    xemacs will be linked with \"tparam.o\""
13773  fi
13774 fi
13775
13776
13777       else
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                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13783       if test -n "$libs_termcap"; then
13784         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13785       else
13786         
13787 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13788 echo "configure:13789: checking for tgetent in -lcurses" >&5
13789 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13790
13791 xe_check_libs=" -lcurses "
13792 cat > conftest.$ac_ext <<EOF
13793 #line 13794 "configure"
13794 #include "confdefs.h"
13795 /* Override any gcc2 internal prototype to avoid an error.  */
13796 /* We use char because int might match the return type of a gcc2
13797     builtin and then its argument prototype would still apply.  */
13798 char tgetent();
13799
13800 int main() {
13801 tgetent()
13802 ; return 0; }
13803 EOF
13804 if { (eval echo configure:13805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13805   rm -rf conftest*
13806   eval "ac_cv_lib_$ac_lib_var=yes"
13807 else
13808   echo "configure: failed program was:" >&5
13809   cat conftest.$ac_ext >&5
13810   rm -rf conftest*
13811   eval "ac_cv_lib_$ac_lib_var=no"
13812 fi
13813 rm -f conftest*
13814 xe_check_libs=""
13815
13816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13817   echo "$ac_t""yes" 1>&6
13818   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13819 else
13820   echo "$ac_t""no" 1>&6
13821 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13822 echo "configure:13823: checking for tgetent in -ltermcap" >&5
13823 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13824
13825 xe_check_libs=" -ltermcap "
13826 cat > conftest.$ac_ext <<EOF
13827 #line 13828 "configure"
13828 #include "confdefs.h"
13829 /* Override any gcc2 internal prototype to avoid an error.  */
13830 /* We use char because int might match the return type of a gcc2
13831     builtin and then its argument prototype would still apply.  */
13832 char tgetent();
13833
13834 int main() {
13835 tgetent()
13836 ; return 0; }
13837 EOF
13838 if { (eval echo configure:13839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13839   rm -rf conftest*
13840   eval "ac_cv_lib_$ac_lib_var=yes"
13841 else
13842   echo "configure: failed program was:" >&5
13843   cat conftest.$ac_ext >&5
13844   rm -rf conftest*
13845   eval "ac_cv_lib_$ac_lib_var=no"
13846 fi
13847 rm -f conftest*
13848 xe_check_libs=""
13849
13850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13851   echo "$ac_t""yes" 1>&6
13852   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13853 else
13854   echo "$ac_t""no" 1>&6
13855 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13856    echo "    xemacs will be linked with \"termcap.o\""
13857  fi
13858 fi
13859
13860
13861 fi
13862
13863
13864       fi
13865     fi
13866   fi
13867   { test "$extra_verbose" = "yes" && cat << EOF
13868     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13869 EOF
13870 cat >> confdefs.h <<EOF
13871 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13872 EOF
13873 }
13874
13875   { test "$extra_verbose" = "yes" && cat << EOF
13876     Defining TERM_H_FILE = "${term_h_file-term.h}"
13877 EOF
13878 cat >> confdefs.h <<EOF
13879 #define TERM_H_FILE "${term_h_file-term.h}"
13880 EOF
13881 }
13882
13883
13884     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13885 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13886 echo "configure:13887: checking for gpm.h" >&5
13887
13888 cat > conftest.$ac_ext <<EOF
13889 #line 13890 "configure"
13890 #include "confdefs.h"
13891 #include <gpm.h>
13892 EOF
13893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13894 { (eval echo configure:13895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13896 if test -z "$ac_err"; then
13897   rm -rf conftest*
13898   eval "ac_cv_header_$ac_safe=yes"
13899 else
13900   echo "$ac_err" >&5
13901   echo "configure: failed program was:" >&5
13902   cat conftest.$ac_ext >&5
13903   rm -rf conftest*
13904   eval "ac_cv_header_$ac_safe=no"
13905 fi
13906 rm -f conftest*
13907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13908   echo "$ac_t""yes" 1>&6
13909   :
13910 else
13911   echo "$ac_t""no" 1>&6
13912 with_gpm=no
13913 fi
13914  }
13915   test -z "$with_gpm" && { 
13916 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13917 echo "configure:13918: checking for Gpm_Open in -lgpm" >&5
13918 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13919
13920 xe_check_libs=" -lgpm "
13921 cat > conftest.$ac_ext <<EOF
13922 #line 13923 "configure"
13923 #include "confdefs.h"
13924 /* Override any gcc2 internal prototype to avoid an error.  */
13925 /* We use char because int might match the return type of a gcc2
13926     builtin and then its argument prototype would still apply.  */
13927 char Gpm_Open();
13928
13929 int main() {
13930 Gpm_Open()
13931 ; return 0; }
13932 EOF
13933 if { (eval echo configure:13934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13934   rm -rf conftest*
13935   eval "ac_cv_lib_$ac_lib_var=yes"
13936 else
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   rm -rf conftest*
13940   eval "ac_cv_lib_$ac_lib_var=no"
13941 fi
13942 rm -f conftest*
13943 xe_check_libs=""
13944
13945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13946   echo "$ac_t""yes" 1>&6
13947   with_gpm=yes
13948 else
13949   echo "$ac_t""no" 1>&6
13950 with_gpm=no
13951 fi
13952
13953  }
13954   if test "$with_gpm" = "yes"; then
13955     { test "$extra_verbose" = "yes" && cat << \EOF
13956     Defining HAVE_GPM
13957 EOF
13958 cat >> confdefs.h <<\EOF
13959 #define HAVE_GPM 1
13960 EOF
13961 }
13962
13963     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13964    echo "    xemacs will be linked with \"gpmevent.o\""
13965  fi
13966     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13967   fi
13968
13969 else   for feature in ncurses gpm; do
13970     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13971       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13972     fi
13973     eval "with_${feature}=no"
13974   done
13975 fi 
13976 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
13977    echo "    xemacs will be linked with \"event-unixoid.o\""
13978  fi
13979
13980
13981 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13982   != "no no no" && echo "checking for database support" 1>&6
13983 echo "configure:13984: checking for database support" >&5
13984
13985 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13986   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13987 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13988 echo "configure:13989: checking for ndbm.h" >&5
13989
13990 cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 #include <ndbm.h>
13994 EOF
13995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13996 { (eval echo configure:13997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13998 if test -z "$ac_err"; then
13999   rm -rf conftest*
14000   eval "ac_cv_header_$ac_safe=yes"
14001 else
14002   echo "$ac_err" >&5
14003   echo "configure: failed program was:" >&5
14004   cat conftest.$ac_ext >&5
14005   rm -rf conftest*
14006   eval "ac_cv_header_$ac_safe=no"
14007 fi
14008 rm -f conftest*
14009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14010   echo "$ac_t""yes" 1>&6
14011   :
14012 else
14013   echo "$ac_t""no" 1>&6
14014
14015     test "$with_database_gdbm" = "yes" -o \
14016          "$with_database_dbm"  = "yes" && \
14017       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14018     with_database_gdbm=no with_database_dbm=no
14019 fi
14020
14021 fi
14022
14023 if test "$with_database_gdbm" != "no"; then
14024   
14025 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14026 echo "configure:14027: checking for dbm_open in -lgdbm" >&5
14027 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14028
14029 xe_check_libs=" -lgdbm "
14030 cat > conftest.$ac_ext <<EOF
14031 #line 14032 "configure"
14032 #include "confdefs.h"
14033 /* Override any gcc2 internal prototype to avoid an error.  */
14034 /* We use char because int might match the return type of a gcc2
14035     builtin and then its argument prototype would still apply.  */
14036 char dbm_open();
14037
14038 int main() {
14039 dbm_open()
14040 ; return 0; }
14041 EOF
14042 if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14043   rm -rf conftest*
14044   eval "ac_cv_lib_$ac_lib_var=yes"
14045 else
14046   echo "configure: failed program was:" >&5
14047   cat conftest.$ac_ext >&5
14048   rm -rf conftest*
14049   eval "ac_cv_lib_$ac_lib_var=no"
14050 fi
14051 rm -f conftest*
14052 xe_check_libs=""
14053
14054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14055   echo "$ac_t""yes" 1>&6
14056   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14057 else
14058   echo "$ac_t""no" 1>&6
14059 if test "$with_database_gdbm" = "yes"; then
14060      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14061    fi
14062    with_database_gdbm=no
14063 fi
14064
14065
14066 fi
14067
14068 if test "$with_database_dbm" != "no"; then
14069   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14070 echo "configure:14071: checking for dbm_open" >&5
14071
14072 cat > conftest.$ac_ext <<EOF
14073 #line 14074 "configure"
14074 #include "confdefs.h"
14075 /* System header to define __stub macros and hopefully few prototypes,
14076     which can conflict with char dbm_open(); below.  */
14077 #include <assert.h>
14078 /* Override any gcc2 internal prototype to avoid an error.  */
14079 /* We use char because int might match the return type of a gcc2
14080     builtin and then its argument prototype would still apply.  */
14081 char dbm_open();
14082
14083 int main() {
14084
14085 /* The GNU C library defines this for functions which it implements
14086     to always fail with ENOSYS.  Some functions are actually named
14087     something starting with __ and the normal name is an alias.  */
14088 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14089 choke me
14090 #else
14091 dbm_open();
14092 #endif
14093
14094 ; return 0; }
14095 EOF
14096 if { (eval echo configure:14097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14097   rm -rf conftest*
14098   eval "ac_cv_func_dbm_open=yes"
14099 else
14100   echo "configure: failed program was:" >&5
14101   cat conftest.$ac_ext >&5
14102   rm -rf conftest*
14103   eval "ac_cv_func_dbm_open=no"
14104 fi
14105 rm -f conftest*
14106
14107 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14108   echo "$ac_t""yes" 1>&6
14109   with_database_dbm=yes libdbm=
14110 else
14111   echo "$ac_t""no" 1>&6
14112
14113     
14114 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14115 echo "configure:14116: checking for dbm_open in -ldbm" >&5
14116 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14117
14118 xe_check_libs=" -ldbm "
14119 cat > conftest.$ac_ext <<EOF
14120 #line 14121 "configure"
14121 #include "confdefs.h"
14122 /* Override any gcc2 internal prototype to avoid an error.  */
14123 /* We use char because int might match the return type of a gcc2
14124     builtin and then its argument prototype would still apply.  */
14125 char dbm_open();
14126
14127 int main() {
14128 dbm_open()
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14132   rm -rf conftest*
14133   eval "ac_cv_lib_$ac_lib_var=yes"
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   eval "ac_cv_lib_$ac_lib_var=no"
14139 fi
14140 rm -f conftest*
14141 xe_check_libs=""
14142
14143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14144   echo "$ac_t""yes" 1>&6
14145   with_database_dbm=yes libdbm=-ldbm
14146 else
14147   echo "$ac_t""no" 1>&6
14148 test "$with_database_dbm" = "yes" && \
14149         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14150       with_database_dbm=no
14151 fi
14152
14153
14154 fi
14155
14156 fi
14157
14158 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14159 test "$with_database_gdbm" = "yes" -o \
14160      "$with_database_dbm"  = "yes" && \
14161   { test "$extra_verbose" = "yes" && cat << \EOF
14162     Defining HAVE_DBM
14163 EOF
14164 cat >> confdefs.h <<\EOF
14165 #define HAVE_DBM 1
14166 EOF
14167 }
14168
14169
14170 if test "$with_database_berkdb" != "no"; then
14171   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14172 echo "configure:14173: checking for Berkeley db.h" >&5
14173   for header in "db/db.h" "db.h"; do
14174     cat > conftest.$ac_ext <<EOF
14175 #line 14176 "configure"
14176 #include "confdefs.h"
14177
14178 #include <stdlib.h>
14179 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14180 #ifdef HAVE_INTTYPES_H
14181 #define __BIT_TYPES_DEFINED__
14182 #include <inttypes.h>
14183 typedef uint8_t  u_int8_t;
14184 typedef uint16_t u_int16_t;
14185 typedef uint32_t u_int32_t;
14186 #ifdef WE_DONT_NEED_QUADS
14187 typedef uint64_t u_int64_t;
14188 #endif
14189 #endif
14190 #endif
14191 #include <$header>
14192
14193 int main() {
14194
14195 ; return 0; }
14196 EOF
14197 if { (eval echo configure:14198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14198   rm -rf conftest*
14199   db_h_file="$header"; break
14200 else
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203 fi
14204 rm -f conftest*
14205   done
14206   if test -z "$db_h_file"
14207   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14208   else echo "$ac_t""$db_h_file" 1>&6
14209   fi
14210
14211   if test "$with_database_berkdb" != "no"; then
14212     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14213 echo "configure:14214: checking for Berkeley DB version" >&5
14214     cat > conftest.$ac_ext <<EOF
14215 #line 14216 "configure"
14216 #include "confdefs.h"
14217 #include <$db_h_file>
14218 #if DB_VERSION_MAJOR > 1
14219 yes
14220 #endif
14221
14222 EOF
14223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14224   egrep "yes" >/dev/null 2>&1; then
14225   rm -rf conftest*
14226   cat > conftest.$ac_ext <<EOF
14227 #line 14228 "configure"
14228 #include "confdefs.h"
14229 #include <$db_h_file>
14230 #if DB_VERSION_MAJOR > 2
14231 yes
14232 #endif
14233
14234 EOF
14235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14236   egrep "yes" >/dev/null 2>&1; then
14237   rm -rf conftest*
14238   echo "$ac_t""3" 1>&6; dbfunc=db_create
14239 else
14240   rm -rf conftest*
14241   
14242     echo "$ac_t""2" 1>&6; dbfunc=db_open
14243 fi
14244 rm -f conftest*
14245
14246 else
14247   rm -rf conftest*
14248   
14249     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14250 fi
14251 rm -f conftest*
14252
14253     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14254 echo "configure:14255: checking for $dbfunc" >&5
14255
14256 cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 /* System header to define __stub macros and hopefully few prototypes,
14260     which can conflict with char $dbfunc(); below.  */
14261 #include <assert.h>
14262 /* Override any gcc2 internal prototype to avoid an error.  */
14263 /* We use char because int might match the return type of a gcc2
14264     builtin and then its argument prototype would still apply.  */
14265 char $dbfunc();
14266
14267 int main() {
14268
14269 /* The GNU C library defines this for functions which it implements
14270     to always fail with ENOSYS.  Some functions are actually named
14271     something starting with __ and the normal name is an alias.  */
14272 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14273 choke me
14274 #else
14275 $dbfunc();
14276 #endif
14277
14278 ; return 0; }
14279 EOF
14280 if { (eval echo configure:14281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14281   rm -rf conftest*
14282   eval "ac_cv_func_$dbfunc=yes"
14283 else
14284   echo "configure: failed program was:" >&5
14285   cat conftest.$ac_ext >&5
14286   rm -rf conftest*
14287   eval "ac_cv_func_$dbfunc=no"
14288 fi
14289 rm -f conftest*
14290
14291 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14292   echo "$ac_t""yes" 1>&6
14293   with_database_berkdb=yes need_libdb=no
14294 else
14295   echo "$ac_t""no" 1>&6
14296
14297     
14298 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14299 echo "configure:14300: checking for $dbfunc in -ldb" >&5
14300 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14301
14302 xe_check_libs=" -ldb "
14303 cat > conftest.$ac_ext <<EOF
14304 #line 14305 "configure"
14305 #include "confdefs.h"
14306 /* Override any gcc2 internal prototype to avoid an error.  */
14307 /* We use char because int might match the return type of a gcc2
14308     builtin and then its argument prototype would still apply.  */
14309 char $dbfunc();
14310
14311 int main() {
14312 $dbfunc()
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14316   rm -rf conftest*
14317   eval "ac_cv_lib_$ac_lib_var=yes"
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   eval "ac_cv_lib_$ac_lib_var=no"
14323 fi
14324 rm -f conftest*
14325 xe_check_libs=""
14326
14327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14328   echo "$ac_t""yes" 1>&6
14329   with_database_berkdb=yes need_libdb=yes
14330 else
14331   echo "$ac_t""no" 1>&6
14332 fi
14333
14334
14335 fi
14336
14337   fi
14338
14339   if test "$with_database_berkdb" = "yes"; then
14340     { test "$extra_verbose" = "yes" && cat << EOF
14341     Defining DB_H_FILE = "$db_h_file"
14342 EOF
14343 cat >> confdefs.h <<EOF
14344 #define DB_H_FILE "$db_h_file"
14345 EOF
14346 }
14347
14348     { test "$extra_verbose" = "yes" && cat << \EOF
14349     Defining HAVE_BERKELEY_DB
14350 EOF
14351 cat >> confdefs.h <<\EOF
14352 #define HAVE_BERKELEY_DB 1
14353 EOF
14354 }
14355
14356     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14357   else with_database_berkdb=no
14358   fi
14359 fi
14360
14361 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14362      != "no no no"; then
14363   { test "$extra_verbose" = "yes" && cat << \EOF
14364     Defining HAVE_DATABASE
14365 EOF
14366 cat >> confdefs.h <<\EOF
14367 #define HAVE_DATABASE 1
14368 EOF
14369 }
14370
14371   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14372    echo "    xemacs will be linked with \"database.o\""
14373  fi
14374   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14375     { test "$extra_verbose" = "yes" && cat << \EOF
14376     Defining HAVE_CHISE
14377 EOF
14378 cat >> confdefs.h <<\EOF
14379 #define HAVE_CHISE 1
14380 EOF
14381 }
14382
14383   fi
14384 fi
14385
14386 if test "$with_socks" = "yes"; then
14387   
14388 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14389 echo "configure:14390: checking for SOCKSinit in -lsocks" >&5
14390 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14391
14392 xe_check_libs=" -lsocks "
14393 cat > conftest.$ac_ext <<EOF
14394 #line 14395 "configure"
14395 #include "confdefs.h"
14396 /* Override any gcc2 internal prototype to avoid an error.  */
14397 /* We use char because int might match the return type of a gcc2
14398     builtin and then its argument prototype would still apply.  */
14399 char SOCKSinit();
14400
14401 int main() {
14402 SOCKSinit()
14403 ; return 0; }
14404 EOF
14405 if { (eval echo configure:14406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14406   rm -rf conftest*
14407   eval "ac_cv_lib_$ac_lib_var=yes"
14408 else
14409   echo "configure: failed program was:" >&5
14410   cat conftest.$ac_ext >&5
14411   rm -rf conftest*
14412   eval "ac_cv_lib_$ac_lib_var=no"
14413 fi
14414 rm -f conftest*
14415 xe_check_libs=""
14416
14417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14418   echo "$ac_t""yes" 1>&6
14419     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14420     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14421   { test "$extra_verbose" = "yes" && cat << EOF
14422     Defining $ac_tr_lib
14423 EOF
14424 cat >> confdefs.h <<EOF
14425 #define $ac_tr_lib 1
14426 EOF
14427 }
14428
14429   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14430
14431 else
14432   echo "$ac_t""no" 1>&6
14433 fi
14434
14435
14436   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14437     Defining HAVE_SOCKS
14438 EOF
14439 cat >> confdefs.h <<\EOF
14440 #define HAVE_SOCKS 1
14441 EOF
14442 }
14443
14444 fi
14445
14446 if test "$usage_tracking" = "yes"; then
14447   { test "$extra_verbose" = "yes" && cat << \EOF
14448     Defining USAGE_TRACKING
14449 EOF
14450 cat >> confdefs.h <<\EOF
14451 #define USAGE_TRACKING 1
14452 EOF
14453 }
14454
14455   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14456 fi
14457
14458 if test "$with_modules" != "no"; then
14459   echo "checking for module support" 1>&6
14460 echo "configure:14461: checking for module support" >&5
14461
14462     if test "$with_msw" = "yes"; then
14463     have_dl=yes;
14464   else
14465         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14466 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14467 echo "configure:14468: checking for dlfcn.h" >&5
14468
14469 cat > conftest.$ac_ext <<EOF
14470 #line 14471 "configure"
14471 #include "confdefs.h"
14472 #include <dlfcn.h>
14473 EOF
14474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14475 { (eval echo configure:14476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14477 if test -z "$ac_err"; then
14478   rm -rf conftest*
14479   eval "ac_cv_header_$ac_safe=yes"
14480 else
14481   echo "$ac_err" >&5
14482   echo "configure: failed program was:" >&5
14483   cat conftest.$ac_ext >&5
14484   rm -rf conftest*
14485   eval "ac_cv_header_$ac_safe=no"
14486 fi
14487 rm -f conftest*
14488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14489   echo "$ac_t""yes" 1>&6
14490   
14491       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14492 echo "configure:14493: checking for dlopen in -lc" >&5
14493       cat > conftest.$ac_ext <<EOF
14494 #line 14495 "configure"
14495 #include "confdefs.h"
14496 #include <dlfcn.h>
14497 int main() {
14498         dlopen ("", 0);
14499 ; return 0; }
14500 EOF
14501 if { (eval echo configure:14502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14502   rm -rf conftest*
14503    have_dl=yes 
14504 else
14505   echo "configure: failed program was:" >&5
14506   cat conftest.$ac_ext >&5
14507   rm -rf conftest*
14508   
14509       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14510 echo "configure:14511: checking for dlopen in -ldl" >&5
14511       ac_save_LIBS="$LIBS"
14512       LIBS="-ldl $LIBS"
14513       cat > conftest.$ac_ext <<EOF
14514 #line 14515 "configure"
14515 #include "confdefs.h"
14516 #include <dlfcn.h>
14517 int main() {
14518         dlopen ("", 0);
14519 ; return 0; }
14520 EOF
14521 if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14522   rm -rf conftest*
14523    have_dl=yes 
14524 else
14525   echo "configure: failed program was:" >&5
14526   cat conftest.$ac_ext >&5
14527   rm -rf conftest*
14528   LIBS="$ac_save_LIBS"
14529 fi
14530 rm -f conftest*
14531       ac_save_LIBS=
14532 fi
14533 rm -f conftest*
14534 else
14535   echo "$ac_t""no" 1>&6
14536 fi
14537
14538     if test -n "$have_dl"; then
14539       { test "$extra_verbose" = "yes" && cat << \EOF
14540     Defining HAVE_DLOPEN
14541 EOF
14542 cat >> confdefs.h <<\EOF
14543 #define HAVE_DLOPEN 1
14544 EOF
14545 }
14546
14547     else
14548       
14549 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14550 echo "configure:14551: checking for shl_load in -ldld" >&5
14551 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14552
14553 xe_check_libs=" -ldld "
14554 cat > conftest.$ac_ext <<EOF
14555 #line 14556 "configure"
14556 #include "confdefs.h"
14557 /* Override any gcc2 internal prototype to avoid an error.  */
14558 /* We use char because int might match the return type of a gcc2
14559     builtin and then its argument prototype would still apply.  */
14560 char shl_load();
14561
14562 int main() {
14563 shl_load()
14564 ; return 0; }
14565 EOF
14566 if { (eval echo configure:14567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14567   rm -rf conftest*
14568   eval "ac_cv_lib_$ac_lib_var=yes"
14569 else
14570   echo "configure: failed program was:" >&5
14571   cat conftest.$ac_ext >&5
14572   rm -rf conftest*
14573   eval "ac_cv_lib_$ac_lib_var=no"
14574 fi
14575 rm -f conftest*
14576 xe_check_libs=""
14577
14578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14579   echo "$ac_t""yes" 1>&6
14580   libdl=dld have_dl=yes;
14581         { test "$extra_verbose" = "yes" && cat << \EOF
14582     Defining HAVE_SHL_LOAD
14583 EOF
14584 cat >> confdefs.h <<\EOF
14585 #define HAVE_SHL_LOAD 1
14586 EOF
14587 }
14588
14589 else
14590   echo "$ac_t""no" 1>&6
14591
14592 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14593 echo "configure:14594: checking for dld_init in -ldld" >&5
14594 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14595
14596 xe_check_libs=" -ldld "
14597 cat > conftest.$ac_ext <<EOF
14598 #line 14599 "configure"
14599 #include "confdefs.h"
14600 /* Override any gcc2 internal prototype to avoid an error.  */
14601 /* We use char because int might match the return type of a gcc2
14602     builtin and then its argument prototype would still apply.  */
14603 char dld_init();
14604
14605 int main() {
14606 dld_init()
14607 ; return 0; }
14608 EOF
14609 if { (eval echo configure:14610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14610   rm -rf conftest*
14611   eval "ac_cv_lib_$ac_lib_var=yes"
14612 else
14613   echo "configure: failed program was:" >&5
14614   cat conftest.$ac_ext >&5
14615   rm -rf conftest*
14616   eval "ac_cv_lib_$ac_lib_var=no"
14617 fi
14618 rm -f conftest*
14619 xe_check_libs=""
14620
14621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14622   echo "$ac_t""yes" 1>&6
14623   libdl=dld have_dl=yes;
14624         { test "$extra_verbose" = "yes" && cat << \EOF
14625     Defining HAVE_DLD_INIT
14626 EOF
14627 cat >> confdefs.h <<\EOF
14628 #define HAVE_DLD_INIT 1
14629 EOF
14630 }
14631
14632 else
14633   echo "$ac_t""no" 1>&6
14634 fi
14635
14636
14637 fi
14638
14639
14640     fi
14641   fi 
14642   if test -n "$have_dl"; then
14643         
14644 dll_ld=
14645 dll_ldflags=
14646 dll_cflags=
14647 dll_post=
14648 dll_ldo="-o"
14649 ld_dynamic_link_flags=
14650 xehost=$canonical
14651 xealias=$internal_configuration
14652
14653 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14654 echo "configure:14655: checking how to build dynamic libraries for ${xehost}" >&5
14655 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14656 case "$xehost" in
14657 *-*-linux-gnu*) ;;
14658 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14659 esac
14660
14661 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14662 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14663 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14664
14665 case "$xehost_os" in
14666 aix3*)
14667   # AIX sometimes has problems with the GCC collect2 program.  For some
14668   # reason, if we set the COLLECT_NAMES environment variable, the problems
14669   # vanish in a puff of smoke.
14670   if test "${COLLECT_NAMES+set}" != set; then
14671     COLLECT_NAMES=
14672     export COLLECT_NAMES
14673   fi
14674   ;;
14675 esac
14676
14677 # Now see if the compiler is really GCC.
14678 if test "$GCC" = "yes"; then
14679   XEGCC=yes
14680 else
14681   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14682 echo "configure:14683: checking checking whether we are using GNU C" >&5
14683   cat > conftest.$ac_ext <<EOF
14684 #line 14685 "configure"
14685 #include "confdefs.h"
14686
14687 #ifdef __GNUC__
14688   yes;
14689 #endif
14690
14691 EOF
14692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14693   egrep "yes" >/dev/null 2>&1; then
14694   rm -rf conftest*
14695   XEGCC=yes
14696 else
14697   rm -rf conftest*
14698   XEGCC=no
14699 fi
14700 rm -f conftest*
14701
14702   echo "$ac_t""${XEGCC}" 1>&6
14703 fi
14704
14705 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14706 echo "configure:14707: checking how to produce PIC code" >&5
14707 wl=
14708
14709 can_build_shared=yes
14710 if test "$XEGCC" = yes; then
14711   wl='-Wl,'
14712
14713   case "$xehost_os" in
14714   aix[3-9]* | irix[5-9]* | osf[3-9])
14715     # PIC is the default for these OSes.
14716     ;;
14717
14718   os2*)
14719     # We can build DLLs from non-PIC.
14720     ;;
14721   amigaos*)
14722     # FIXME: we need at least 68020 code to build shared libraries, but
14723     # adding the `-m68020' flag to GCC prevents building anything better,
14724     # like `-m68040'.
14725     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14726     ;;
14727   *cygwin* | *mingw* )
14728     # PIC is the default
14729     ;;
14730   *)
14731     dll_cflags='-fPIC'
14732     ;;
14733   esac
14734 else
14735   # PORTME Check for PIC flags for the system compiler.
14736   case "$xehost_os" in
14737   hpux9* | hpux1[0-9]*)
14738     # Is there a better link_static_flag that works with the bundled CC?
14739     wl='-Wl,'
14740     dll_cflags='+Z'
14741     ;;
14742
14743   irix[5-9]*)
14744     wl='-Wl,'
14745     # PIC (with -KPIC) is the default.
14746     ;;
14747
14748   os2*)
14749     # We can build DLLs from non-PIC.
14750     ;;
14751
14752   osf[3-9]*)
14753     # All OSF/1 code is PIC.
14754     wl='-Wl,'
14755     ;;
14756
14757   aix[3-9]*)
14758     # All AIX code is PIC.
14759     wl='-Wl,'
14760     ;;
14761
14762   sco3.2v5*)
14763     dll_cflags='-belf -Kpic'
14764     wl='-Wl,'
14765     ;;
14766
14767   unixware*)
14768     dll_cflags="-KPIC"
14769     wl="-Wl,"
14770     ;;
14771
14772   sysv4*)
14773     dll_cflags="-KPIC"
14774     wl="-Wl,"
14775     ;;
14776
14777   sysv5*)
14778     dll_cflags="-KPIC"
14779     wl="-Wl,"
14780     ;;
14781
14782   solaris2*)
14783     dll_cflags='-KPIC'
14784     wl='-Wl,'
14785     ;;
14786
14787   sunos4*)
14788     dll_cflags='-PIC'
14789     wl='-Qoption ld '
14790     ;;
14791
14792   uts4*)
14793     dll_cflags='-pic'
14794     ;;
14795
14796   *)
14797     can_build_shared=no
14798     ;;
14799   esac
14800 fi
14801
14802 if test -n "$dll_cflags"; then
14803   echo "$ac_t""${dll_cflags}" 1>&6
14804
14805   # Check to make sure the dll_cflags actually works.
14806   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14807 echo "configure:14808: checking if PIC flag ${dll_cflags} really works" >&5
14808   save_CFLAGS="$CFLAGS"
14809   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14810   cat > conftest.$ac_ext <<EOF
14811 #line 14812 "configure"
14812 #include "confdefs.h"
14813
14814 int main() {
14815 int x=0;
14816 ; return 0; }
14817 EOF
14818 if { (eval echo configure:14819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14819   rm -rf conftest*
14820   
14821     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14822     # reports no error.  So, we need to grep stderr for (Bundled).
14823     if grep '(Bundled)' config.log >/dev/null; then
14824       echo "$ac_t""no" 1>&6
14825       can_build_shared=no
14826       dll_cflags=
14827     else
14828       echo "$ac_t""yes" 1>&6
14829     fi
14830 else
14831   echo "configure: failed program was:" >&5
14832   cat conftest.$ac_ext >&5
14833   rm -rf conftest*
14834   echo "$ac_t""no" 1>&6
14835     can_build_shared=no
14836     dll_cflags=
14837 fi
14838 rm -f conftest*
14839   CFLAGS="$save_CFLAGS"
14840 else
14841   echo "$ac_t""none" 1>&6
14842 fi
14843
14844 if test "$can_build_shared" = "yes"; then
14845 cc_produces_so=no
14846 xldf=
14847 xcldf=
14848 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14849 echo "configure:14850: checking if C compiler can produce shared libraries" >&5
14850 if test "$XEGCC" = yes; then
14851   xcldf="-shared"
14852   xldf="-shared"
14853 else # Not using GCC
14854   case "$xehost_os" in
14855     aix[3-9]*)
14856       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14857       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14858       ;;
14859
14860     freebsd2* | netbsd* | openbsd*)
14861       xldf="-Bshareable"
14862       xcldf="${wl}-Bshareable"
14863       ;;
14864
14865     freebsd3*)
14866       xcldf="-shared"
14867       ;;
14868
14869     hpux*)
14870       xldf="-b +s"
14871       xcldf="${wl}-b ${wl}+s"
14872       ;;
14873
14874     irix[5-9]* | osf[3-9]*)
14875       xcldf="${wl}-shared"
14876       xldf="-shared"
14877       ;;
14878
14879     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14880       xcldf="-G"
14881       xldf="-G"
14882       ;;
14883
14884     sunos4*)
14885       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14886       xldf="-assert pure-text -Bstatic"
14887       ;;
14888   esac
14889 fi # End if if we are using gcc
14890
14891 if test -n "$xcldf"; then
14892   save_LDFLAGS=$LDFLAGS
14893   save_LIBS=$LIBS
14894   save_xe_libs=$xe_libs
14895   LDFLAGS="$xcldf $LDFLAGS"
14896   LIBS=
14897   xe_libs=
14898   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14899   cat > conftest.$ac_ext <<EOF
14900 #line 14901 "configure"
14901 #include "confdefs.h"
14902
14903 int main() {
14904 int x=0;
14905 ; return 0; }
14906 EOF
14907 if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14908   rm -rf conftest*
14909   cc_produces_so=yes
14910 else
14911   echo "configure: failed program was:" >&5
14912   cat conftest.$ac_ext >&5
14913   rm -rf conftest*
14914   cc_produces_so=no
14915 fi
14916 rm -f conftest*
14917   LDFLAGS=$save_LDFLAGS
14918   LIBS=$save_LIBS
14919   xe_libs=$save_xe_libs
14920   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14921 else
14922   cc_produces_so=no
14923 fi
14924 echo "$ac_t""${cc_produces_so}" 1>&6
14925
14926 LTLD=$LD
14927 if test -z "$LTLD"; then
14928   ac_prog=ld
14929   if test "$XEGCC" = yes; then
14930     # Check if gcc -print-prog-name=ld gives a path.
14931     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14932 echo "configure:14933: checking for ld used by GCC" >&5
14933     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14934     case "$ac_prog" in
14935     # Accept absolute paths.
14936     /*)
14937       if test -z "$LTLD"; then
14938 #        case "$ac_prog" in
14939 #          *gcc-lib*) LTLD="$CC"
14940 #                     ;;
14941 #          *)
14942          LTLD="$ac_prog"
14943 #                     ;;
14944 #        esac
14945       fi
14946       ;;
14947     "")
14948       # If it fails, then pretend we aren't using GCC.
14949       ac_prog=ld
14950       ;;
14951     *)
14952       # If it is relative, then search for the first ld in PATH.
14953       with_gnu_ld=unknown
14954       ;;
14955     esac
14956   else
14957     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14958 echo "configure:14959: checking for GNU ld" >&5
14959   fi
14960
14961   if test -z "$LTLD"; then
14962     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14963     for ac_dir in $PATH; do
14964       test -z "$ac_dir" && ac_dir=.
14965       if test -f "$ac_dir/$ac_prog"; then
14966         LTLD="$ac_dir/$ac_prog"
14967         # Check to see if the program is GNU ld.  I'd rather use --version,
14968         # but apparently some GNU ld's only accept -v.
14969         # Break only if it was the GNU/non-GNU ld that we prefer.
14970         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14971           xe_gnu_ld=yes
14972         else
14973           xe_gnu_ld=no
14974         fi
14975       fi
14976     done
14977     IFS="$ac_save_ifs"
14978   fi
14979
14980   if test -n "$LTLD"; then
14981     echo "$ac_t""${LTLD}" 1>&6
14982   else
14983     echo "$ac_t""no" 1>&6
14984   fi
14985
14986   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14987     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14988     exit 1
14989   fi
14990 fi
14991
14992 ld_dynamic_link_flags=
14993
14994 # Check to see if it really is or isn't GNU ld.
14995 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14996 echo "configure:14997: checking if the linker is GNU ld" >&5
14997 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14998 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14999   xe_gnu_ld=yes
15000 else
15001   xe_gnu_ld=no
15002 fi
15003 echo "$ac_t""${xe_gnu_ld}" 1>&6
15004
15005 case "$xehost_os" in
15006   amigaos* | sunos4*)
15007     # On these operating systems, we should treat GNU ld like the system ld.
15008     gnu_ld_acts_native=yes
15009     ;;
15010   *)
15011     gnu_ld_acts_native=no
15012     ;;
15013 esac
15014
15015 if test "$cc_produces_so" = "yes"; then
15016   dll_ld=$CC
15017   dll_ldflags=$xcldf
15018   can_build_shared=yes
15019   ld_shlibs=yes
15020 else
15021   # OK - only NOW do we futz about with ld.
15022   # See if the linker supports building shared libraries.
15023   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15024 echo "configure:15025: checking whether the linker supports shared libraries" >&5
15025   dll_ld=$CC
15026   dll_ldflags=$LDFLAGS
15027   ld_shlibs=yes
15028   can_build_shared=yes
15029   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15030     # See if GNU ld supports shared libraries.
15031     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15032       dll_ld=$CC
15033       dll_ldflags="-shared"
15034       ld_shlibs=yes
15035     else
15036       ld_shlibs=no
15037     fi
15038   else
15039     # PORTME fill in a description of your system's linker (not GNU ld)
15040     case "$xehost_os" in
15041     aix3*)
15042       dll_ld=$LTLD
15043       dll_ldflags=$xldf
15044       ;;
15045
15046     aix[4-9]*)
15047       dll_ldflags=$xcldf
15048       ;;
15049
15050     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15051     # support.  Future versions do this automatically, but an explicit c++rt0.o
15052     # doesn't break anything, and helps significantly (at the cost of a little
15053     # extra space).
15054     freebsd2.2*)
15055       dll_ld=$LTLD
15056       dll_ldflags=$xldf
15057       dll_post="/usr/lib/c++rt0.o"
15058       ;;
15059
15060     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15061     freebsd2*)
15062       dll_ld=$LTLD
15063       dll_ldflags="-Bshareable"
15064       ;;
15065
15066     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15067     freebsd3*)
15068       dll_ldflags="-shared"
15069       ;;
15070
15071     hpux*)
15072       dll_ld=$LTLD
15073       dll_ldflags=$xldf
15074       ;;
15075
15076     irix[5-9]*)
15077       dll_ld=$LTLD
15078       dll_ldflags=$xldf
15079       ;;
15080
15081     netbsd*)
15082       # Tested with NetBSD 1.2 ld
15083       dll_ld=$LTLD
15084       dll_ldflags=$xldf
15085       ;;
15086
15087     openbsd*)
15088       dll_ld=$LTLD
15089       dll_ldflags=$xldf
15090       ;;
15091
15092     osf3* | osf4*)
15093       dll_ld=$LTLD
15094       dll_ldflags=$xldf
15095       ;;
15096
15097     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15098     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15099       dll_ld=$LTLD
15100       case "$dll_ld" in
15101         *gcc*) dll_ldflags="-shared"
15102                dll_ld=$CC
15103                ;;
15104         *)     dll_ldflags="-G"
15105                ;;
15106       esac
15107       ;;
15108
15109     sunos4*)
15110       if test "$XEGCC" = yes; then
15111         dll_ld=$CC
15112       else
15113         dll_ld=$LTLD
15114       fi
15115       dll_ldflags=$xldf
15116       ;;
15117
15118     uts4*)
15119       dll_ld=$LTLD
15120       dll_ldflags="-G"
15121       ;;
15122
15123     bsdi*)
15124       dll_ldflags="-r"
15125       dll_ld="shlicc2"
15126       ;;
15127
15128     *)
15129       ld_shlibs=no
15130       can_build_shared=no
15131       ;;
15132     esac
15133   fi
15134   echo "$ac_t""${ld_shlibs}" 1>&6
15135   if test "$ld_shlibs" = "no"; then
15136     can_build_shared=no
15137   fi
15138 fi # End of if cc_produces_so = no
15139
15140
15141 if test "$xe_gnu_ld" = yes; then
15142   if test "$ld_shlibs" = yes; then
15143     ld_dynamic_link_flags="${wl}-export-dynamic"
15144   fi
15145 fi
15146
15147 if test -z "$ld_dynamic_link_flags"; then
15148   case "$xehost_os" in
15149   aix[3-9]*)
15150     ld_dynamic_link_flags=
15151     ;;
15152
15153   freebsd2.2*)
15154     ld_dynamic_link_flags=
15155     ;;
15156
15157   freebsd2*)
15158     ld_dynamic_link_flags=
15159     ;;
15160
15161   freebsd3*)
15162     ld_dynamic_link_flags=
15163     ;;
15164
15165   hpux*)
15166     ld_dynamic_link_flags="${wl}-E"
15167     ;;
15168
15169   irix[5-9]*)
15170     ld_dynamic_link_flags=
15171     ;;
15172
15173   netbsd*)
15174     ld_dynamic_link_flags=
15175     ;;
15176
15177   openbsd*)
15178     ld_dynamic_link_flags=
15179     ;;
15180
15181   osf3* | osf4*)
15182     ld_dynamic_link_flags=
15183     ;;
15184
15185   solaris2* | solaris7*)
15186     ld_dynamic_link_flags=
15187     ;;
15188
15189   sco3.2v5* | unixware* | sysv5* | sysv4*)
15190     ld_dynamic_link_flags="${wl}-Bexport"
15191     ;;
15192
15193   sunos4*)
15194     ld_dynamic_link_flags=
15195     ;;
15196
15197   uts4*)
15198     ld_dynamic_link_flags=
15199     ;;
15200
15201   bsdi*)
15202     ld_dynamic_link_flags=
15203     ;;
15204
15205   esac
15206 fi # End of if -z ld_dynamic_link_flags
15207 fi # End of if test "$can_build_shared" = "yes"
15208
15209
15210
15211
15212
15213
15214
15215
15216   fi
15217
15218   if test "$can_build_shared" = "yes"; then
15219     { test "$extra_verbose" = "yes" && cat << \EOF
15220     Defining HAVE_SHLIB
15221 EOF
15222 cat >> confdefs.h <<\EOF
15223 #define HAVE_SHLIB 1
15224 EOF
15225 }
15226
15227     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15228    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15229  fi
15230     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15231     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15232     for ac_func in dlerror _dlerror
15233 do
15234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15235 echo "configure:15236: checking for $ac_func" >&5
15236
15237 cat > conftest.$ac_ext <<EOF
15238 #line 15239 "configure"
15239 #include "confdefs.h"
15240 /* System header to define __stub macros and hopefully few prototypes,
15241     which can conflict with char $ac_func(); below.  */
15242 #include <assert.h>
15243 /* Override any gcc2 internal prototype to avoid an error.  */
15244 /* We use char because int might match the return type of a gcc2
15245     builtin and then its argument prototype would still apply.  */
15246 char $ac_func();
15247
15248 int main() {
15249
15250 /* The GNU C library defines this for functions which it implements
15251     to always fail with ENOSYS.  Some functions are actually named
15252     something starting with __ and the normal name is an alias.  */
15253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15254 choke me
15255 #else
15256 $ac_func();
15257 #endif
15258
15259 ; return 0; }
15260 EOF
15261 if { (eval echo configure:15262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15262   rm -rf conftest*
15263   eval "ac_cv_func_$ac_func=yes"
15264 else
15265   echo "configure: failed program was:" >&5
15266   cat conftest.$ac_ext >&5
15267   rm -rf conftest*
15268   eval "ac_cv_func_$ac_func=no"
15269 fi
15270 rm -f conftest*
15271
15272 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15273   echo "$ac_t""yes" 1>&6
15274     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15275   { test "$extra_verbose" = "yes" && cat << EOF
15276     Defining $ac_tr_func
15277 EOF
15278 cat >> confdefs.h <<EOF
15279 #define $ac_tr_func 1
15280 EOF
15281 }
15282  
15283 else
15284   echo "$ac_t""no" 1>&6
15285 fi
15286 done
15287
15288     with_modules=yes
15289   else
15290     if test "$with_modules" = "yes"; then
15291       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15292     else
15293       echo "configure: warning: "Module support cannot be provided."" 1>&2
15294     fi
15295     with_modules=no
15296   fi
15297 fi
15298
15299 cat > conftest.$ac_ext <<EOF
15300 #line 15301 "configure"
15301 #include "confdefs.h"
15302 int main(int c,char *v[]){return 0;}
15303 EOF
15304 if { (eval echo configure:15305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15305 then
15306   :
15307 else
15308   conftest_rc="$?"
15309   echo "configure: failed program was:" >&5
15310   cat conftest.$ac_ext >&5
15311   rm -fr conftest*
15312   
15313   echo ""
15314   echo "*** PANIC *** configure forgot how to build working executables!"
15315   echo ""
15316   echo "*** This is most commonly due to an unforeseen environment, causing"
15317   echo "*** configure to incorrectly compute the sequence of libraries to link."
15318   echo "*** Please examine the tail of config.log for runtime errors."
15319   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15320   echo "*** Often adding or removing explicit options in the configure"
15321   echo "*** invocation can work around this kind of problem.  If so, please"
15322   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15323   echo "***"
15324   echo "*** Other possible causes are inability to write to the file system"
15325   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15326   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15327   echo "*** necessary.  On other systems, try telling configure where to find"
15328   echo "*** the shared libraries using the --site-runtime-libraries option."
15329   echo "***"
15330   echo "*** Another way to shoot yourself in the foot is to specify"
15331   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15332   echo "*** system.  Don't do that."
15333   exit 1
15334 fi
15335 rm -fr conftest*
15336
15337 if test "$win32_processes" = "yes"; then
15338   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15339    echo "    xemacs will be linked with \"process-nt.o\""
15340  fi
15341 else
15342   { test "$extra_verbose" = "yes" && cat << \EOF
15343     Defining HAVE_UNIX_PROCESSES
15344 EOF
15345 cat >> confdefs.h <<\EOF
15346 #define HAVE_UNIX_PROCESSES 1
15347 EOF
15348 }
15349
15350   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15351    echo "    xemacs will be linked with \"process-unix.o\""
15352  fi
15353 fi
15354
15355
15356
15357 T=""
15358 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15359 CFLAGS="$T"
15360
15361
15362 T=""
15363 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15364 extra_objs="$T"
15365
15366
15367 T=""
15368 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
15369 c_switch_general="$T"
15370
15371
15372 T=""
15373 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
15374 c_switch_window_system="$T"
15375
15376
15377 T=""
15378 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15379 c_switch_all="$T"
15380
15381
15382 T=""
15383 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
15384 ld_switch_general="$T"
15385
15386
15387 T=""
15388 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15389 ld_switch_window_system="$T"
15390
15391
15392 T=""
15393 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15394 ld_switch_all="$T"
15395
15396
15397 T=""
15398 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15399 ld_libs_general="$T"
15400
15401
15402 T=""
15403 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
15404 ld_libs_window_system="$T"
15405
15406
15407 T=""
15408 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15409 ld_libs_all="$T"
15410
15411
15412
15413 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15414 internal_makefile_list="Makefile.in"
15415 SUBDIR_MAKEFILES=''
15416 test -d lock || mkdir lock
15417 for dir in $MAKE_SUBDIR; do
15418   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15419         test -d "$d" || mkdir "$d"; cd "$d"
15420       done ) ;;
15421    * ) test -d "$dir" || mkdir "$dir" ;;
15422   esac
15423   
15424 T=""
15425 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15426 SUBDIR_MAKEFILES="$T"
15427
15428   
15429 T=""
15430 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15431 internal_makefile_list="$T"
15432
15433 done
15434
15435
15436
15437
15438 for dir in src/s src/m; do
15439   if test ! -d "$dir" ; then
15440     echo Making symbolic link to "$srcdir/$dir"
15441     ${LN_S} "$srcdir/$dir" "$dir"
15442   fi
15443 done
15444
15445 if test "$extra_verbose" = "yes"; then
15446   echo ""
15447   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
15448   echo ""
15449 fi
15450
15451
15452 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15453   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15454   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15455 fi
15456
15457 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15458   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15459   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15460 fi
15461
15462 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15463   test "$extra_verbose" = "yes" && echo "creating TAGS"
15464   echo "\f
15465 $srcdir/TAGS,include" > "TAGS"
15466 fi
15467
15468 if test "$__SUNPRO_C" = "yes"; then
15469   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15470   ( echo "# For use with Sun WorkShop's Source browser."
15471     echo "# See sbquery(1) and sbinit(4) for more information"
15472     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15473   ) > .sbinit
15474 fi
15475
15476 rm -f core
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497 PREFIX=$prefix
15498 while true; do
15499   case "$PREFIX" in
15500     *\$* ) eval "PREFIX=$PREFIX" ;;
15501     *) break ;;
15502   esac
15503 done
15504
15505
15506
15507
15508 EXEC_PREFIX=$exec_prefix
15509 while true; do
15510   case "$EXEC_PREFIX" in
15511     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15512     *) break ;;
15513   esac
15514 done
15515
15516
15517
15518
15519 INFODIR=$infodir
15520 while true; do
15521   case "$INFODIR" in
15522     *\$* ) eval "INFODIR=$INFODIR" ;;
15523     *) break ;;
15524   esac
15525 done
15526
15527
15528
15529
15530 INFOPATH=$infopath
15531 while true; do
15532   case "$INFOPATH" in
15533     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15534     *) break ;;
15535   esac
15536 done
15537
15538
15539
15540
15541 PACKAGE_PATH=$package_path
15542 while true; do
15543   case "$PACKAGE_PATH" in
15544     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15545     *) break ;;
15546   esac
15547 done
15548
15549
15550
15551
15552 LISPDIR=$lispdir
15553 while true; do
15554   case "$LISPDIR" in
15555     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15556     *) break ;;
15557   esac
15558 done
15559
15560
15561
15562
15563 MODULEDIR=$moduledir
15564 while true; do
15565   case "$MODULEDIR" in
15566     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15567     *) break ;;
15568   esac
15569 done
15570
15571
15572
15573
15574 SITELISPDIR=$sitelispdir
15575 while true; do
15576   case "$SITELISPDIR" in
15577     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15578     *) break ;;
15579   esac
15580 done
15581
15582
15583
15584
15585 SITEMODULEDIR=$sitemoduledir
15586 while true; do
15587   case "$SITEMODULEDIR" in
15588     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15589     *) break ;;
15590   esac
15591 done
15592
15593
15594
15595
15596 ETCDIR=$etcdir
15597 while true; do
15598   case "$ETCDIR" in
15599     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15600     *) break ;;
15601   esac
15602 done
15603
15604
15605
15606
15607 DOCDIR=$docdir
15608 while true; do
15609   case "$DOCDIR" in
15610     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15611     *) break ;;
15612   esac
15613 done
15614
15615
15616
15617
15618 ARCHLIBDIR=$archlibdir
15619 while true; do
15620   case "$ARCHLIBDIR" in
15621     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15622     *) break ;;
15623   esac
15624 done
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15646
15647
15648
15649
15650
15651
15652
15653 : ${XEMACS_CC:=$CC}
15654
15655
15656 if test "$with_prefix" = "yes"; then
15657   { test "$extra_verbose" = "yes" && cat << \EOF
15658     Defining PREFIX_USER_DEFINED
15659 EOF
15660 cat >> confdefs.h <<\EOF
15661 #define PREFIX_USER_DEFINED 1
15662 EOF
15663 }
15664
15665 fi
15666
15667 if test "$with_site_lisp" = "no"; then
15668   { test "$extra_verbose" = "yes" && cat << \EOF
15669     Defining INHIBIT_SITE_LISP
15670 EOF
15671 cat >> confdefs.h <<\EOF
15672 #define INHIBIT_SITE_LISP 1
15673 EOF
15674 }
15675
15676 fi
15677 if test "$with_site_modules" = "no"; then
15678   { test "$extra_verbose" = "yes" && cat << \EOF
15679     Defining INHIBIT_SITE_MODULES
15680 EOF
15681 cat >> confdefs.h <<\EOF
15682 #define INHIBIT_SITE_MODULES 1
15683 EOF
15684 }
15685
15686 fi
15687
15688
15689 T=""
15690 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15691 ac_configure_args="$T"
15692
15693 { test "$extra_verbose" = "yes" && cat << EOF
15694     Defining EMACS_CONFIGURATION = "$configuration"
15695 EOF
15696 cat >> confdefs.h <<EOF
15697 #define EMACS_CONFIGURATION "$configuration"
15698 EOF
15699 }
15700
15701 { test "$extra_verbose" = "yes" && cat << EOF
15702     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15703 EOF
15704 cat >> confdefs.h <<EOF
15705 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15706 EOF
15707 }
15708
15709
15710
15711 null_string=""
15712 { test "$extra_verbose" = "yes" && cat << EOF
15713     Defining LD_SWITCH_X_SITE = $null_string
15714 EOF
15715 cat >> confdefs.h <<EOF
15716 #define LD_SWITCH_X_SITE $null_string
15717 EOF
15718 }
15719
15720 { test "$extra_verbose" = "yes" && cat << EOF
15721     Defining LD_SWITCH_X_SITE_AUX = $null_string
15722 EOF
15723 cat >> confdefs.h <<EOF
15724 #define LD_SWITCH_X_SITE_AUX $null_string
15725 EOF
15726 }
15727
15728 { test "$extra_verbose" = "yes" && cat << EOF
15729     Defining C_SWITCH_X_SITE = $null_string
15730 EOF
15731 cat >> confdefs.h <<EOF
15732 #define C_SWITCH_X_SITE $null_string
15733 EOF
15734 }
15735
15736 { test "$extra_verbose" = "yes" && cat << EOF
15737     Defining LD_SWITCH_SITE = $null_string
15738 EOF
15739 cat >> confdefs.h <<EOF
15740 #define LD_SWITCH_SITE $null_string
15741 EOF
15742 }
15743
15744 { test "$extra_verbose" = "yes" && cat << EOF
15745     Defining C_SWITCH_SITE = $null_string
15746 EOF
15747 cat >> confdefs.h <<EOF
15748 #define C_SWITCH_SITE $null_string
15749 EOF
15750 }
15751
15752
15753
15754 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15755     Defining GNU_MALLOC
15756 EOF
15757 cat >> confdefs.h <<\EOF
15758 #define GNU_MALLOC 1
15759 EOF
15760 }
15761
15762 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15763     Defining USE_SYSTEM_MALLOC
15764 EOF
15765 cat >> confdefs.h <<\EOF
15766 #define USE_SYSTEM_MALLOC 1
15767 EOF
15768 }
15769
15770 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15771     Defining USE_DEBUG_MALLOC
15772 EOF
15773 cat >> confdefs.h <<\EOF
15774 #define USE_DEBUG_MALLOC 1
15775 EOF
15776 }
15777
15778                                               { test "$extra_verbose" = "yes" && cat << \EOF
15779     Defining USE_SYSTEM_MALLOC
15780 EOF
15781 cat >> confdefs.h <<\EOF
15782 #define USE_SYSTEM_MALLOC 1
15783 EOF
15784 }
15785
15786 fi
15787 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15788     Defining I18N3
15789 EOF
15790 cat >> confdefs.h <<\EOF
15791 #define I18N3 1
15792 EOF
15793 }
15794
15795 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15796     Defining USE_GCC
15797 EOF
15798 cat >> confdefs.h <<\EOF
15799 #define USE_GCC 1
15800 EOF
15801 }
15802
15803 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15804     Defining EXTERNAL_WIDGET
15805 EOF
15806 cat >> confdefs.h <<\EOF
15807 #define EXTERNAL_WIDGET 1
15808 EOF
15809 }
15810
15811 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15812     Defining QUICK_BUILD
15813 EOF
15814 cat >> confdefs.h <<\EOF
15815 #define QUICK_BUILD 1
15816 EOF
15817 }
15818
15819 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15820     Defining PURIFY
15821 EOF
15822 cat >> confdefs.h <<\EOF
15823 #define PURIFY 1
15824 EOF
15825 }
15826
15827 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15828     Defining QUANTIFY
15829 EOF
15830 cat >> confdefs.h <<\EOF
15831 #define QUANTIFY 1
15832 EOF
15833 }
15834
15835 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15836     Defining MAIL_USE_POP
15837 EOF
15838 cat >> confdefs.h <<\EOF
15839 #define MAIL_USE_POP 1
15840 EOF
15841 }
15842
15843 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15844     Defining KERBEROS
15845 EOF
15846 cat >> confdefs.h <<\EOF
15847 #define KERBEROS 1
15848 EOF
15849 }
15850
15851 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15852     Defining HESIOD
15853 EOF
15854 cat >> confdefs.h <<\EOF
15855 #define HESIOD 1
15856 EOF
15857 }
15858
15859 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15860     Defining USE_UNION_TYPE
15861 EOF
15862 cat >> confdefs.h <<\EOF
15863 #define USE_UNION_TYPE 1
15864 EOF
15865 }
15866
15867 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15868     Defining PDUMP
15869 EOF
15870 cat >> confdefs.h <<\EOF
15871 #define PDUMP 1
15872 EOF
15873 }
15874
15875 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15876     Defining IPV6_CANONICALIZE
15877 EOF
15878 cat >> confdefs.h <<\EOF
15879 #define IPV6_CANONICALIZE 1
15880 EOF
15881 }
15882
15883
15884
15885 (
15886 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15887 else
15888   echo "uname -a: `uname -a`"
15889 fi
15890 echo ""
15891 echo "$0 $quoted_arguments"
15892 ) > Installation
15893
15894 if test ! -z ${emacs_beta_version} ; then
15895   if test -z "${emacs_is_beta}" ; then
15896         xemacs_betaname=".${emacs_beta_version}"
15897   else
15898         xemacs_betaname="-b${emacs_beta_version}"
15899   fi
15900 else
15901   xemacs_betaname=""
15902 fi
15903
15904 (
15905 echo "
15906
15907 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15908 "
15909 echo "
15910 Compilation / Installation:"
15911 echo "  Source code location:              $srcdir"
15912 echo "  Installation prefix:               $prefix"
15913 if test -n "$site_includes"; then
15914   echo "  Additional header files:           $site_includes"
15915 fi
15916 if test -n "$site_libraries"; then
15917   echo "  Additional libraries:              $site_libraries"
15918 fi
15919 if test -n "$site_prefixes"; then
15920   echo "  Additional prefixes:               $site_prefixes"
15921 fi
15922 if test -n "$runpath"; then
15923   echo "  Runtime library search path:       $runpath"
15924 fi
15925
15926 if test -n "$opsysfile"
15927 then echo "  Operating system description file: \`$opsysfile'"
15928 else echo "  Not using any operating system description file"
15929 fi
15930 if test -n "$machfile"
15931 then echo "  Machine description file:          \`$machfile'"
15932 else echo "  Not using any machine description file"
15933 fi
15934
15935 echo "  Compiler:                          $CC $CFLAGS"
15936 echo "  Relocating allocator for buffers:  $rel_alloc"
15937 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15938 case "$ld_switch_site" in
15939   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15940     - Consider configuring with --pdump." ;;
15941 esac
15942
15943 echo "
15944 Window System:"
15945 if test "$with_msw" = "yes"; then
15946   echo "  Compiling in support for the Microsoft window system."
15947 fi
15948 if test "$with_x11" = "yes"; then
15949   echo "  Compiling in support for the X window system:"
15950   echo "    - X Windows headers location:                 $x_includes"
15951   echo "    - X Windows libraries location:               $x_libraries"
15952   if test "$with_xauth" != yes; then
15953     echo "    - Xau (X authority) not available."
15954   fi
15955   if test "$with_xmu" != yes; then
15956     echo "    - Xmu library not available; substituting equivalent routines."
15957   fi
15958   if test "$with_wmcommand" != no; then
15959     echo "    - Handling WM_COMMAND properly."
15960   fi
15961 fi
15962 if test "$need_athena" = "yes"; then
15963   echo "  Compiling in support for the Athena widget set:"
15964   echo "    - Athena headers location:                    $athena_h_path"
15965   echo "    - Athena library to link:                     $athena_lib"
15966 fi
15967 case "$with_menubars" in
15968   gtk   ) echo "  Using GTK menubars."   ;;
15969   lucid ) echo "  Using Lucid menubars." ;;
15970   motif ) echo "  Using Motif menubars."
15971           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15972           echo "             We recommend using the Lucid menubar instead."
15973           echo "             Re-run configure with --with-menubars='lucid'." ;;
15974     msw ) echo "  Using MS-Windows menubars." ;;
15975 esac
15976 case "$with_scrollbars" in
15977   gtk    ) echo "  Using GTK scrollbars."        ;;
15978   lucid  ) echo "  Using Lucid scrollbars."      ;;
15979   motif  ) echo "  Using Motif scrollbars."      ;;
15980   athena ) echo "  Using Athena scrollbars."     ;;
15981      msw ) echo "  Using MS-Windows scrollbars." ;;
15982 esac
15983 case "$with_dialogs" in
15984   gtk    ) echo "  Using GTK dialog boxes." ;;
15985   motif  ) echo "  Using Motif dialog boxes."
15986            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15987              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15988              echo "             We recommend using the Athena dialog boxes instead."
15989              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15990              echo "             Read the PROBLEMS file for more information."
15991            fi; fi ;;
15992   athena ) echo "  Using Athena dialog boxes."     ;;
15993      msw ) echo "  Using MS-Windows dialog boxes." ;;
15994 esac
15995 case "$with_widgets" in
15996   gtk    ) echo "  Using GTK native widgets."        ;;
15997   motif  ) echo "  Using Motif native widgets."      ;;
15998   athena ) echo "  Using Athena native widgets."     ;;
15999      msw ) echo "  Using MS-Windows native widgets." ;;
16000 esac
16001 if test "$with_dragndrop" = yes; then
16002   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16003   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16004 fi
16005
16006 echo "
16007 TTY:"
16008 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16009 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16010
16011 echo "
16012 Images:"
16013 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16014 if test "$with_xpm" = yes; then
16015   echo "  Compiling in support for XPM  images."
16016 elif test "$with_x11" = yes; then
16017   echo "  WARNING: -----------------------------------------------------------"
16018   echo "  WARNING: Compiling without XPM image support."
16019   if test "$xpm_problem" != ""; then
16020     echo "  Reason: $xpm_problem"
16021   fi
16022   echo "  WARNING: You should strongly consider installing XPM."
16023   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16024   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16025   echo "  WARNING: -----------------------------------------------------------"
16026 fi
16027 if test "$with_png" = yes; then
16028   echo "  Compiling in support for PNG  images."
16029 elif test "$window_system" != "none"; then
16030   echo "  WARNING: -----------------------------------------------------------"
16031   echo "  WARNING: Compiling without PNG image support."
16032   if test "$png_problem" != ""; then
16033     echo "  Reason: $png_problem"
16034   fi
16035   echo "  WARNING: You should strongly consider installing the PNG libraries."
16036   echo "  WARNING: Otherwise certain images and glyphs may not display."
16037   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16038   echo "  WARNING: -----------------------------------------------------------"
16039 fi
16040 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16041 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16042 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16043
16044 echo "
16045 Sound:"
16046 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16047 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16048 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16049 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16050
16051 echo "
16052 Databases:"
16053 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16054 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16055 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16056 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16057 if test "$with_postgresql" = yes; then
16058   echo "  Compiling in support for PostgreSQL."
16059   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16060   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16061 fi
16062
16063 echo "
16064 Multiscriptization / Multilingualization / Internationalization:"
16065 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16066 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16067 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16068 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16069 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16070 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16071 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16072 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16073 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16074 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16075 if test "$with_wnn" = yes; then
16076   echo "  Compiling in support for the WNN input method on Mule."
16077   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16078 fi
16079 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16080
16081 echo "
16082 Mail:"
16083 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16084 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16085 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16086 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16087
16088 echo "
16089 Other Features:"
16090 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16091 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16092 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16093 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16094 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16095 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16096 if test "$use_union_type" = yes; then
16097   echo "  WARNING: ---------------------------------------------------------"
16098   echo "  Using the union type for Lisp_Objects."
16099   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16100   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16101   echo "  WARNING: ---------------------------------------------------------"
16102 fi
16103 test "$pdump" = yes && echo "  Using the new portable dumper."
16104 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16105 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16106 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16107   != "no no no no no no"; then
16108   echo "  WARNING: ---------------------------------------------------------"
16109   echo "  WARNING: Compiling in support for runtime error checking."
16110   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16111   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16112   echo "  WARNING: ---------------------------------------------------------"
16113 fi
16114 echo ""
16115 ) | tee -a Installation
16116 echo ""
16117
16118
16119 # Remove any trailing slashes in these variables.
16120 test -n "$prefix" &&
16121   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16122 test -n "$exec_prefix" &&
16123   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16124
16125
16126 for file in $internal_makefile_list; do
16127   test "$file" = src/Makefile.in && \
16128     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16129   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16130 done
16131 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16132 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
16133
16134 trap '' 1 2 15
16135
16136 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16137
16138 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16139 # Let make expand exec_prefix.
16140 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16141
16142 # Any assignment to VPATH causes Sun make to only execute
16143 # the first set of double-colon rules, so remove it if not needed.
16144 # If there is a colon in the path, we need to keep it.
16145 if test "x$srcdir" = x.; then
16146   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16147 fi
16148
16149 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16150
16151 DEFS=-DHAVE_CONFIG_H
16152
16153 # Without the "./", some shells look in PATH for config.status.
16154 : ${CONFIG_STATUS=./config.status}
16155
16156 echo creating $CONFIG_STATUS
16157 rm -f $CONFIG_STATUS
16158 cat > $CONFIG_STATUS <<EOF
16159 #! /bin/sh
16160 # Generated automatically by configure.
16161 # Run this file to recreate the current configuration.
16162 # This directory was configured as follows,
16163 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16164 #
16165 # $0 $ac_configure_args
16166 #
16167 # Compiler output produced by configure, useful for debugging
16168 # configure, is in ./config.log if it exists.
16169
16170 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16171 for ac_option
16172 do
16173   case "\$ac_option" in
16174   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16175     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16176     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16177   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16178     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16179     exit 0 ;;
16180   -help | --help | --hel | --he | --h)
16181     echo "\$ac_cs_usage"; exit 0 ;;
16182   *) echo "\$ac_cs_usage"; exit 1 ;;
16183   esac
16184 done
16185
16186 ac_given_srcdir=$srcdir
16187 ac_given_INSTALL="$INSTALL"
16188
16189 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16190 EOF
16191 cat >> $CONFIG_STATUS <<EOF
16192
16193 # Protect against being on the right side of a sed subst in config.status.
16194 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16195  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16196 $ac_vpsub
16197 $extrasub
16198 s%@SHELL@%$SHELL%g
16199 s%@CFLAGS@%$CFLAGS%g
16200 s%@CPPFLAGS@%$CPPFLAGS%g
16201 s%@CXXFLAGS@%$CXXFLAGS%g
16202 s%@FFLAGS@%$FFLAGS%g
16203 s%@DEFS@%$DEFS%g
16204 s%@LDFLAGS@%$LDFLAGS%g
16205 s%@LIBS@%$LIBS%g
16206 s%@exec_prefix@%$exec_prefix%g
16207 s%@prefix@%$prefix%g
16208 s%@program_transform_name@%$program_transform_name%g
16209 s%@bindir@%$bindir%g
16210 s%@sbindir@%$sbindir%g
16211 s%@libexecdir@%$libexecdir%g
16212 s%@datadir@%$datadir%g
16213 s%@sysconfdir@%$sysconfdir%g
16214 s%@sharedstatedir@%$sharedstatedir%g
16215 s%@localstatedir@%$localstatedir%g
16216 s%@libdir@%$libdir%g
16217 s%@includedir@%$includedir%g
16218 s%@oldincludedir@%$oldincludedir%g
16219 s%@infodir@%$infodir%g
16220 s%@mandir@%$mandir%g
16221 s%@LN_S@%$LN_S%g
16222 s%@blddir@%$blddir%g
16223 s%@CC@%$CC%g
16224 s%@CPP@%$CPP%g
16225 s%@start_flags@%$start_flags%g
16226 s%@ld_switch_shared@%$ld_switch_shared%g
16227 s%@start_files@%$start_files%g
16228 s%@ld@%$ld%g
16229 s%@lib_gcc@%$lib_gcc%g
16230 s%@RANLIB@%$RANLIB%g
16231 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16232 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16233 s%@INSTALL_DATA@%$INSTALL_DATA%g
16234 s%@YACC@%$YACC%g
16235 s%@SET_MAKE@%$SET_MAKE%g
16236 s%@GTK_CONFIG@%$GTK_CONFIG%g
16237 s%@X_CFLAGS@%$X_CFLAGS%g
16238 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16239 s%@X_LIBS@%$X_LIBS%g
16240 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16241 s%@install_pp@%$install_pp%g
16242 s%@libs_xauth@%$libs_xauth%g
16243 s%@dnd_objs@%$dnd_objs%g
16244 s%@lwlib_objs@%$lwlib_objs%g
16245 s%@ALLOCA@%$ALLOCA%g
16246 s%@have_esd_config@%$have_esd_config%g
16247 s%@dll_ld@%$dll_ld%g
16248 s%@dll_cflags@%$dll_cflags%g
16249 s%@dll_ldflags@%$dll_ldflags%g
16250 s%@dll_post@%$dll_post%g
16251 s%@dll_ldo@%$dll_ldo%g
16252 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16253 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16254 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16255 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16256 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16257 s%@PROGNAME@%$PROGNAME%g
16258 s%@version@%$version%g
16259 s%@configuration@%$configuration%g
16260 s%@canonical@%$canonical%g
16261 s%@inststaticdir@%$inststaticdir%g
16262 s%@instvardir@%$instvardir%g
16263 s%@srcdir@%$srcdir%g
16264 s%@pkgdir@%$pkgdir%g
16265 s%@statedir@%$statedir%g
16266 s%@extra_includes@%$extra_includes%g
16267 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16268 s%@PREFIX@%$PREFIX%g
16269 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16270 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16271 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16272 s%@INFODIR@%$INFODIR%g
16273 s%@infopath@%$infopath%g
16274 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16275 s%@INFOPATH@%$INFOPATH%g
16276 s%@package_path@%$package_path%g
16277 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16278 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16279 s%@lispdir@%$lispdir%g
16280 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16281 s%@LISPDIR@%$LISPDIR%g
16282 s%@moduledir@%$moduledir%g
16283 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16284 s%@MODULEDIR@%$MODULEDIR%g
16285 s%@sitelispdir@%$sitelispdir%g
16286 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16287 s%@SITELISPDIR@%$SITELISPDIR%g
16288 s%@sitemoduledir@%$sitemoduledir%g
16289 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16290 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16291 s%@etcdir@%$etcdir%g
16292 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16293 s%@ETCDIR@%$ETCDIR%g
16294 s%@docdir@%$docdir%g
16295 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16296 s%@DOCDIR@%$DOCDIR%g
16297 s%@archlibdir@%$archlibdir%g
16298 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16299 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16300 s%@bitmapdir@%$bitmapdir%g
16301 s%@extra_objs@%$extra_objs%g
16302 s%@machfile@%$machfile%g
16303 s%@opsysfile@%$opsysfile%g
16304 s%@c_switch_general@%$c_switch_general%g
16305 s%@c_switch_window_system@%$c_switch_window_system%g
16306 s%@c_switch_all@%$c_switch_all%g
16307 s%@ld_switch_general@%$ld_switch_general%g
16308 s%@ld_switch_window_system@%$ld_switch_window_system%g
16309 s%@ld_switch_all@%$ld_switch_all%g
16310 s%@ld_libs_general@%$ld_libs_general%g
16311 s%@ld_libs_window_system@%$ld_libs_window_system%g
16312 s%@ld_libs_all@%$ld_libs_all%g
16313 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16314 s%@native_sound_lib@%$native_sound_lib%g
16315 s%@sound_cflags@%$sound_cflags%g
16316 s%@dynodump_arch@%$dynodump_arch%g
16317 s%@XEMACS_CC@%$XEMACS_CC%g
16318 s%@internal_makefile_list@%$internal_makefile_list%g
16319
16320 CEOF
16321 EOF
16322
16323 cat >> $CONFIG_STATUS <<\EOF
16324
16325 # Split the substitutions into bite-sized pieces for seds with
16326 # small command number limits, like on Digital OSF/1 and HP-UX.
16327 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16328 ac_file=1 # Number of current file.
16329 ac_beg=1 # First line for current file.
16330 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16331 ac_more_lines=:
16332 ac_sed_cmds=""
16333 while $ac_more_lines; do
16334   if test $ac_beg -gt 1; then
16335     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16336   else
16337     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16338   fi
16339   if test ! -s conftest.s$ac_file; then
16340     ac_more_lines=false
16341     rm -f conftest.s$ac_file
16342   else
16343     if test -z "$ac_sed_cmds"; then
16344       ac_sed_cmds="sed -f conftest.s$ac_file"
16345     else
16346       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16347     fi
16348     ac_file=`expr $ac_file + 1`
16349     ac_beg=$ac_end
16350     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16351   fi
16352 done
16353 if test -z "$ac_sed_cmds"; then
16354   ac_sed_cmds=cat
16355 fi
16356 EOF
16357
16358 cat >> $CONFIG_STATUS <<EOF
16359
16360 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16361 EOF
16362 cat >> $CONFIG_STATUS <<\EOF
16363 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16364   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16365   case "$ac_file" in
16366   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16367        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16368   *) ac_file_in="${ac_file}.in" ;;
16369   esac
16370
16371   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16372
16373   # Remove last slash and all that follows it.  Not all systems have dirname.
16374   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16375   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16376     # The file is in a subdirectory.
16377     test ! -d "$ac_dir" && mkdir "$ac_dir"
16378     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16379     # A "../" for each directory in $ac_dir_suffix.
16380     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16381   else
16382     ac_dir_suffix= ac_dots=
16383   fi
16384
16385   case "$ac_given_srcdir" in
16386   .)  srcdir=.
16387       if test -z "$ac_dots"; then top_srcdir=.
16388       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16389   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16390   *) # Relative path.
16391     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16392     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16393   esac
16394
16395   case "$ac_given_INSTALL" in
16396   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16397   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16398   esac
16399
16400   echo creating "$ac_file"
16401   rm -f "$ac_file"
16402   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16403   case "$ac_file" in
16404   *Makefile*) ac_comsub="1i\\
16405 # $configure_input" ;;
16406   *) ac_comsub= ;;
16407   esac
16408
16409   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16410   sed -e "$ac_comsub
16411 s%@configure_input@%$configure_input%g
16412 s%@srcdir@%$srcdir%g
16413 s%@top_srcdir@%$top_srcdir%g
16414 s%@INSTALL@%$INSTALL%g
16415 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16416 fi; done
16417 rm -f conftest.s*
16418
16419 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16420 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16421 #
16422 # ac_d sets the value in "#define NAME VALUE" lines.
16423 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16424 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16425 ac_dC='\3'
16426 ac_dD='%g'
16427 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16428 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16429 ac_uB='\([      ]\)%\1#\2define\3'
16430 ac_uC=' '
16431 ac_uD='\4%g'
16432 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16433 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16434 ac_eB='$%\1#\2define\3'
16435 ac_eC=' '
16436 ac_eD='%g'
16437
16438 if test "${CONFIG_HEADERS+set}" != set; then
16439 EOF
16440 cat >> $CONFIG_STATUS <<EOF
16441   CONFIG_HEADERS="src/config.h lwlib/config.h"
16442 EOF
16443 cat >> $CONFIG_STATUS <<\EOF
16444 fi
16445 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16446   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16447   case "$ac_file" in
16448   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16449        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16450   *) ac_file_in="${ac_file}.in" ;;
16451   esac
16452
16453   echo creating $ac_file
16454
16455   rm -f conftest.frag conftest.in conftest.out
16456   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16457   cat $ac_file_inputs > conftest.in
16458
16459 EOF
16460
16461 # Transform confdefs.h into a sed script conftest.vals that substitutes
16462 # the proper values into config.h.in to produce config.h.  And first:
16463 # Protect against being on the right side of a sed subst in config.status.
16464 # Protect against being in an unquoted here document in config.status.
16465 rm -f conftest.vals
16466 cat > conftest.hdr <<\EOF
16467 s/[\\&%]/\\&/g
16468 s%[\\$`]%\\&%g
16469 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16470 s%ac_d%ac_u%gp
16471 s%ac_u%ac_e%gp
16472 EOF
16473 sed -n -f conftest.hdr confdefs.h > conftest.vals
16474 rm -f conftest.hdr
16475
16476 # This sed command replaces #undef with comments.  This is necessary, for
16477 # example, in the case of _POSIX_SOURCE, which is predefined and required
16478 # on some systems where configure will not decide to define it.
16479 cat >> conftest.vals <<\EOF
16480 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16481 EOF
16482
16483 # Break up conftest.vals because some shells have a limit on
16484 # the size of here documents, and old seds have small limits too.
16485
16486 rm -f conftest.tail
16487 while :
16488 do
16489   ac_lines=`grep -c . conftest.vals`
16490   # grep -c gives empty output for an empty file on some AIX systems.
16491   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16492   # Write a limited-size here document to conftest.frag.
16493   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16494   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16495   echo 'CEOF
16496   sed -f conftest.frag conftest.in > conftest.out
16497   rm -f conftest.in
16498   mv conftest.out conftest.in
16499 ' >> $CONFIG_STATUS
16500   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16501   rm -f conftest.vals
16502   mv conftest.tail conftest.vals
16503 done
16504 rm -f conftest.vals
16505
16506 cat >> $CONFIG_STATUS <<\EOF
16507   rm -f conftest.frag conftest.h
16508   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16509   cat conftest.in >> conftest.h
16510   rm -f conftest.in
16511   if cmp -s $ac_file conftest.h 2>/dev/null; then
16512     echo "$ac_file is unchanged"
16513     rm -f conftest.h
16514   else
16515     # Remove last slash and all that follows it.  Not all systems have dirname.
16516       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16517       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16518       # The file is in a subdirectory.
16519       test ! -d "$ac_dir" && mkdir "$ac_dir"
16520     fi
16521     rm -f $ac_file
16522     mv conftest.h $ac_file
16523   fi
16524 fi; done
16525
16526 EOF
16527 cat >> $CONFIG_STATUS <<EOF
16528 CPP="$CPP"
16529  top_srcdir="$srcdir"
16530  MAKE_SUBDIR="$MAKE_SUBDIR"
16531
16532 EOF
16533 cat >> $CONFIG_STATUS <<\EOF
16534 for dir in . $MAKE_SUBDIR; do
16535   (
16536     cd $dir
16537     rm -f junk.c
16538     < Makefile.in \
16539       sed -e '/^# Generated/d' \
16540           -e 's%/\*\*/#.*%%' \
16541           -e 's/^ *# */#/' \
16542           -e '/^##/d' \
16543           -e '/^#/ {
16544 p
16545 d
16546 }'        \
16547           -e '/./ {
16548 s/\([\"]\)/\\\1/g
16549 s/^/"/
16550 s/$/"/
16551 }'  > junk.c;
16552
16553
16554
16555     echo creating $dir/Makefile
16556 $CPP -I. -I${top_srcdir}/src  junk.c \
16557   | sed -e 's/^\#.*//'          \
16558         -e 's/^[        ][      ]*$//'\
16559         -e 's/^ /       /'              \
16560         -e '/^[ \f]*$/d' \
16561         -e '/^\"/ {
16562         s/\\\([\"]\)/\1/g
16563         s/^[    ]*\"//
16564         s/\"[   ]*$//
16565 }' > Makefile.new
16566     chmod 444 Makefile.new
16567     mv -f Makefile.new Makefile
16568
16569     echo creating $dir/GNUmakefile
16570 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16571   | sed -e 's/^\#.*//'          \
16572         -e 's/^[        ][      ]*$//'\
16573         -e 's/^ /       /'              \
16574         -e '/^[ \f]*$/d' \
16575         -e '/^\"/ {
16576         s/\\\([\"]\)/\1/g
16577         s/^[    ]*\"//
16578         s/\"[   ]*$//
16579 }' > Makefile.new
16580     chmod 444 Makefile.new
16581     mv -f Makefile.new GNUmakefile
16582
16583     rm -f junk.c
16584   )
16585 done
16586
16587 sed < config.status >> lib-src/config.values \
16588   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16589   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16590   -e 's/^\([^ ]*\) $/\1 ""/' \
16591   -e 's/ 1$/ t/'
16592
16593
16594 exit 0
16595 EOF
16596 chmod +x $CONFIG_STATUS
16597 rm -fr confdefs* $ac_clean_files
16598 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1