update.
[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 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -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 CHISE
9972 EOF
9973 cat >> confdefs.h <<\EOF
9974 #define CHISE 1
9975 EOF
9976 }
9977
9978     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
9979   fi
9980
9981   { test "$extra_verbose" = "yes" && cat << \EOF
9982     Defining FILE_CODING
9983 EOF
9984 cat >> confdefs.h <<\EOF
9985 #define FILE_CODING 1
9986 EOF
9987 }
9988
9989   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9990    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9991  fi
9992   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9993     { test "$extra_verbose" = "yes" && cat << \EOF
9994     Defining TEXT_CODING
9995 EOF
9996 cat >> confdefs.h <<\EOF
9997 #define TEXT_CODING 1
9998 EOF
9999 }
10000
10001     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10002    echo "    xemacs will be linked with \"text-coding.o\""
10003  fi
10004   else
10005     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10006    echo "    xemacs will be linked with \"file-coding.o\""
10007  fi
10008   fi
10009     for ac_hdr in libintl.h
10010 do
10011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10013 echo "configure:10014: checking for $ac_hdr" >&5
10014
10015 cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 #include <$ac_hdr>
10019 EOF
10020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10021 { (eval echo configure:10022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10023 if test -z "$ac_err"; then
10024   rm -rf conftest*
10025   eval "ac_cv_header_$ac_safe=yes"
10026 else
10027   echo "$ac_err" >&5
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_header_$ac_safe=no"
10032 fi
10033 rm -f conftest*
10034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10035   echo "$ac_t""yes" 1>&6
10036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10037   { test "$extra_verbose" = "yes" && cat << EOF
10038     Defining $ac_tr_hdr
10039 EOF
10040 cat >> confdefs.h <<EOF
10041 #define $ac_tr_hdr 1
10042 EOF
10043 }
10044  
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048 done
10049
10050   
10051 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10052 echo "configure:10053: checking for strerror in -lintl" >&5
10053 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10054
10055 xe_check_libs=" -lintl "
10056 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 /* We use char because int might match the return type of a gcc2
10061     builtin and then its argument prototype would still apply.  */
10062 char strerror();
10063
10064 int main() {
10065 strerror()
10066 ; return 0; }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10069   rm -rf conftest*
10070   eval "ac_cv_lib_$ac_lib_var=yes"
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=no"
10076 fi
10077 rm -f conftest*
10078 xe_check_libs=""
10079
10080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10081   echo "$ac_t""yes" 1>&6
10082     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10084   { test "$extra_verbose" = "yes" && cat << EOF
10085     Defining $ac_tr_lib
10086 EOF
10087 cat >> confdefs.h <<EOF
10088 #define $ac_tr_lib 1
10089 EOF
10090 }
10091
10092   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10093
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097
10098
10099
10100   if test "$with_utf_2000" = "yes" ; then
10101     { test "$extra_verbose" = "yes" && cat << \EOF
10102     Defining CHAR_IS_UCS4
10103 EOF
10104 cat >> confdefs.h <<\EOF
10105 #define CHAR_IS_UCS4 1
10106 EOF
10107 }
10108
10109     { test "$extra_verbose" = "yes" && cat << \EOF
10110     Defining UTF2000
10111 EOF
10112 cat >> confdefs.h <<\EOF
10113 #define UTF2000 1
10114 EOF
10115 }
10116
10117     with_wnn=no
10118     with_wnn6=no
10119   fi
10120
10121   echo "checking for Mule input methods" 1>&6
10122 echo "configure:10123: checking for Mule input methods" >&5
10123         case "$with_xim" in "" | "yes" )
10124     echo "checking for XIM" 1>&6
10125 echo "configure:10126: checking for XIM" >&5
10126     
10127 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10128 echo "configure:10129: checking for XOpenIM in -lX11" >&5
10129 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10130
10131 xe_check_libs=" -lX11 "
10132 cat > conftest.$ac_ext <<EOF
10133 #line 10134 "configure"
10134 #include "confdefs.h"
10135 /* Override any gcc2 internal prototype to avoid an error.  */
10136 /* We use char because int might match the return type of a gcc2
10137     builtin and then its argument prototype would still apply.  */
10138 char XOpenIM();
10139
10140 int main() {
10141 XOpenIM()
10142 ; return 0; }
10143 EOF
10144 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10145   rm -rf conftest*
10146   eval "ac_cv_lib_$ac_lib_var=yes"
10147 else
10148   echo "configure: failed program was:" >&5
10149   cat conftest.$ac_ext >&5
10150   rm -rf conftest*
10151   eval "ac_cv_lib_$ac_lib_var=no"
10152 fi
10153 rm -f conftest*
10154 xe_check_libs=""
10155
10156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10157   echo "$ac_t""yes" 1>&6
10158   with_xim=xlib
10159 else
10160   echo "$ac_t""no" 1>&6
10161 with_xim=no
10162 fi
10163
10164
10165         if test "$have_motif $have_lesstif" = "yes no"; then
10166       
10167 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10168 echo "configure:10169: checking for XmImMbLookupString in -lXm" >&5
10169 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10170
10171 xe_check_libs=" -lXm "
10172 cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175 /* Override any gcc2 internal prototype to avoid an error.  */
10176 /* We use char because int might match the return type of a gcc2
10177     builtin and then its argument prototype would still apply.  */
10178 char XmImMbLookupString();
10179
10180 int main() {
10181 XmImMbLookupString()
10182 ; return 0; }
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10185   rm -rf conftest*
10186   eval "ac_cv_lib_$ac_lib_var=yes"
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=no"
10192 fi
10193 rm -f conftest*
10194 xe_check_libs=""
10195
10196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10197   echo "$ac_t""yes" 1>&6
10198   with_xim=motif
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202
10203
10204     fi ;;
10205   esac
10206   if test "$with_xim" != "no"; then
10207     { test "$extra_verbose" = "yes" && cat << \EOF
10208     Defining HAVE_XIM
10209 EOF
10210 cat >> confdefs.h <<\EOF
10211 #define HAVE_XIM 1
10212 EOF
10213 }
10214
10215     if test "$with_xim" = "xlib"; then
10216       { test "$extra_verbose" = "yes" && cat << \EOF
10217     Defining XIM_XLIB
10218 EOF
10219 cat >> confdefs.h <<\EOF
10220 #define XIM_XLIB 1
10221 EOF
10222 }
10223
10224       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10225    echo "    xemacs will be linked with \"input-method-xlib.o\""
10226  fi
10227     fi
10228     if test "$with_xim" = "motif"; then
10229       { test "$extra_verbose" = "yes" && cat << \EOF
10230     Defining XIM_MOTIF
10231 EOF
10232 cat >> confdefs.h <<\EOF
10233 #define XIM_MOTIF 1
10234 EOF
10235 }
10236
10237       need_motif=yes
10238       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10239    echo "    xemacs will be linked with \"input-method-motif.o\""
10240  fi
10241     fi
10242     if test "$with_xim" = "motif"; then
10243       with_xfs=no
10244     fi
10245   fi
10246
10247     if test "$with_xfs" = "yes" ; then
10248     echo "checking for XFontSet" 1>&6
10249 echo "configure:10250: checking for XFontSet" >&5
10250     
10251 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10252 echo "configure:10253: checking for XmbDrawString in -lX11" >&5
10253 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10254
10255 xe_check_libs=" -lX11 "
10256 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* Override any gcc2 internal prototype to avoid an error.  */
10260 /* We use char because int might match the return type of a gcc2
10261     builtin and then its argument prototype would still apply.  */
10262 char XmbDrawString();
10263
10264 int main() {
10265 XmbDrawString()
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=yes"
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=no"
10276 fi
10277 rm -f conftest*
10278 xe_check_libs=""
10279
10280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10281   echo "$ac_t""yes" 1>&6
10282   :
10283 else
10284   echo "$ac_t""no" 1>&6
10285 with_xfs=no
10286 fi
10287
10288
10289     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10290       { test "$extra_verbose" = "yes" && cat << \EOF
10291     Defining USE_XFONTSET
10292 EOF
10293 cat >> confdefs.h <<\EOF
10294 #define USE_XFONTSET 1
10295 EOF
10296 }
10297
10298       if test "$with_xim" = "no" ; then
10299         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10300    echo "    xemacs will be linked with \"input-method-xlib.o\""
10301  fi
10302       fi
10303     fi
10304   fi 
10305     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10306   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10307 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10308 echo "configure:10309: checking for wnn/jllib.h" >&5
10309
10310 cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313 #include <wnn/jllib.h>
10314 EOF
10315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10316 { (eval echo configure:10317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10318 if test -z "$ac_err"; then
10319   rm -rf conftest*
10320   eval "ac_cv_header_$ac_safe=yes"
10321 else
10322   echo "$ac_err" >&5
10323   echo "configure: failed program was:" >&5
10324   cat conftest.$ac_ext >&5
10325   rm -rf conftest*
10326   eval "ac_cv_header_$ac_safe=no"
10327 fi
10328 rm -f conftest*
10329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10330   echo "$ac_t""yes" 1>&6
10331   :
10332 else
10333   echo "$ac_t""no" 1>&6
10334 with_wnn=no
10335 fi
10336  }
10337     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10338 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10339 echo "configure:10340: checking for wnn/commonhd.h" >&5
10340
10341 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 #include <wnn/commonhd.h>
10345 EOF
10346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10347 { (eval echo configure:10348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10349 if test -z "$ac_err"; then
10350   rm -rf conftest*
10351   eval "ac_cv_header_$ac_safe=yes"
10352 else
10353   echo "$ac_err" >&5
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=no"
10358 fi
10359 rm -f conftest*
10360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362   :
10363 else
10364   echo "$ac_t""no" 1>&6
10365 with_wnn=no
10366 fi
10367  }
10368     if test "$with_wnn" != "no"; then
10369     for ac_func in crypt
10370 do
10371 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10372 echo "configure:10373: checking for $ac_func" >&5
10373
10374 cat > conftest.$ac_ext <<EOF
10375 #line 10376 "configure"
10376 #include "confdefs.h"
10377 /* System header to define __stub macros and hopefully few prototypes,
10378     which can conflict with char $ac_func(); below.  */
10379 #include <assert.h>
10380 /* Override any gcc2 internal prototype to avoid an error.  */
10381 /* We use char because int might match the return type of a gcc2
10382     builtin and then its argument prototype would still apply.  */
10383 char $ac_func();
10384
10385 int main() {
10386
10387 /* The GNU C library defines this for functions which it implements
10388     to always fail with ENOSYS.  Some functions are actually named
10389     something starting with __ and the normal name is an alias.  */
10390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10391 choke me
10392 #else
10393 $ac_func();
10394 #endif
10395
10396 ; return 0; }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10399   rm -rf conftest*
10400   eval "ac_cv_func_$ac_func=yes"
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_func_$ac_func=no"
10406 fi
10407 rm -f conftest*
10408
10409 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10410   echo "$ac_t""yes" 1>&6
10411     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10412   { test "$extra_verbose" = "yes" && cat << EOF
10413     Defining $ac_tr_func
10414 EOF
10415 cat >> confdefs.h <<EOF
10416 #define $ac_tr_func 1
10417 EOF
10418 }
10419  
10420 else
10421   echo "$ac_t""no" 1>&6
10422 fi
10423 done
10424
10425     test "$ac_cv_func_crypt" != "yes" && { 
10426 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10427 echo "configure:10428: checking for crypt in -lcrypt" >&5
10428 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10429
10430 xe_check_libs=" -lcrypt "
10431 cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 /* Override any gcc2 internal prototype to avoid an error.  */
10435 /* We use char because int might match the return type of a gcc2
10436     builtin and then its argument prototype would still apply.  */
10437 char crypt();
10438
10439 int main() {
10440 crypt()
10441 ; return 0; }
10442 EOF
10443 if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=yes"
10446 else
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   eval "ac_cv_lib_$ac_lib_var=no"
10451 fi
10452 rm -f conftest*
10453 xe_check_libs=""
10454
10455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10456   echo "$ac_t""yes" 1>&6
10457     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10459   { test "$extra_verbose" = "yes" && cat << EOF
10460     Defining $ac_tr_lib
10461 EOF
10462 cat >> confdefs.h <<EOF
10463 #define $ac_tr_lib 1
10464 EOF
10465 }
10466
10467   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10468
10469 else
10470   echo "$ac_t""no" 1>&6
10471 fi
10472
10473  }
10474   fi
10475     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10476     
10477 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10478 echo "configure:10479: checking for jl_dic_list_e in -lwnn" >&5
10479 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10480
10481 xe_check_libs=" -lwnn "
10482 cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485 /* Override any gcc2 internal prototype to avoid an error.  */
10486 /* We use char because int might match the return type of a gcc2
10487     builtin and then its argument prototype would still apply.  */
10488 char jl_dic_list_e();
10489
10490 int main() {
10491 jl_dic_list_e()
10492 ; return 0; }
10493 EOF
10494 if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10495   rm -rf conftest*
10496   eval "ac_cv_lib_$ac_lib_var=yes"
10497 else
10498   echo "configure: failed program was:" >&5
10499   cat conftest.$ac_ext >&5
10500   rm -rf conftest*
10501   eval "ac_cv_lib_$ac_lib_var=no"
10502 fi
10503 rm -f conftest*
10504 xe_check_libs=""
10505
10506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10507   echo "$ac_t""yes" 1>&6
10508   libwnn=wnn
10509 else
10510   echo "$ac_t""no" 1>&6
10511 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10512 echo "configure:10513: checking for jl_dic_list_e in -lwnn4" >&5
10513 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10514
10515 xe_check_libs=" -lwnn4 "
10516 cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 /* Override any gcc2 internal prototype to avoid an error.  */
10520 /* We use char because int might match the return type of a gcc2
10521     builtin and then its argument prototype would still apply.  */
10522 char jl_dic_list_e();
10523
10524 int main() {
10525 jl_dic_list_e()
10526 ; return 0; }
10527 EOF
10528 if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10529   rm -rf conftest*
10530   eval "ac_cv_lib_$ac_lib_var=yes"
10531 else
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_lib_$ac_lib_var=no"
10536 fi
10537 rm -f conftest*
10538 xe_check_libs=""
10539
10540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10541   echo "$ac_t""yes" 1>&6
10542   libwnn=wnn4
10543 else
10544   echo "$ac_t""no" 1>&6
10545 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10546 echo "configure:10547: checking for jl_dic_list_e in -lwnn6" >&5
10547 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10548
10549 xe_check_libs=" -lwnn6 "
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553 /* Override any gcc2 internal prototype to avoid an error.  */
10554 /* We use char because int might match the return type of a gcc2
10555     builtin and then its argument prototype would still apply.  */
10556 char jl_dic_list_e();
10557
10558 int main() {
10559 jl_dic_list_e()
10560 ; return 0; }
10561 EOF
10562 if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=yes"
10565 else
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=no"
10570 fi
10571 rm -f conftest*
10572 xe_check_libs=""
10573
10574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10575   echo "$ac_t""yes" 1>&6
10576   libwnn=wnn6
10577 else
10578   echo "$ac_t""no" 1>&6
10579 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10580 echo "configure:10581: checking for dic_list_e in -lwnn6_fromsrc" >&5
10581 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10582
10583 xe_check_libs=" -lwnn6_fromsrc "
10584 cat > conftest.$ac_ext <<EOF
10585 #line 10586 "configure"
10586 #include "confdefs.h"
10587 /* Override any gcc2 internal prototype to avoid an error.  */
10588 /* We use char because int might match the return type of a gcc2
10589     builtin and then its argument prototype would still apply.  */
10590 char dic_list_e();
10591
10592 int main() {
10593 dic_list_e()
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10597   rm -rf conftest*
10598   eval "ac_cv_lib_$ac_lib_var=yes"
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=no"
10604 fi
10605 rm -f conftest*
10606 xe_check_libs=""
10607
10608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10609   echo "$ac_t""yes" 1>&6
10610   libwnn=wnn6_fromsrc
10611 else
10612   echo "$ac_t""no" 1>&6
10613 with_wnn=no
10614 fi
10615
10616
10617 fi
10618
10619
10620 fi
10621
10622
10623 fi
10624
10625
10626   fi
10627   test -z "$with_wnn" && with_wnn=yes
10628   if test "$with_wnn" = "yes"; then
10629     { test "$extra_verbose" = "yes" && cat << \EOF
10630     Defining HAVE_WNN
10631 EOF
10632 cat >> confdefs.h <<\EOF
10633 #define HAVE_WNN 1
10634 EOF
10635 }
10636
10637     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10638     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10639    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10640  fi
10641     if test "$with_wnn6" != "no"; then
10642       
10643 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10644 echo "configure:10645: checking for jl_fi_dic_list in -l$libwnn" >&5
10645 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10646
10647 xe_check_libs=" -l$libwnn "
10648 cat > conftest.$ac_ext <<EOF
10649 #line 10650 "configure"
10650 #include "confdefs.h"
10651 /* Override any gcc2 internal prototype to avoid an error.  */
10652 /* We use char because int might match the return type of a gcc2
10653     builtin and then its argument prototype would still apply.  */
10654 char jl_fi_dic_list();
10655
10656 int main() {
10657 jl_fi_dic_list()
10658 ; return 0; }
10659 EOF
10660 if { (eval echo configure:10661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10661   rm -rf conftest*
10662   eval "ac_cv_lib_$ac_lib_var=yes"
10663 else
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -rf conftest*
10667   eval "ac_cv_lib_$ac_lib_var=no"
10668 fi
10669 rm -f conftest*
10670 xe_check_libs=""
10671
10672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10673   echo "$ac_t""yes" 1>&6
10674   with_wnn6=yes
10675 else
10676   echo "$ac_t""no" 1>&6
10677 fi
10678
10679
10680       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10681     Defining WNN6
10682 EOF
10683 cat >> confdefs.h <<\EOF
10684 #define WNN6 1
10685 EOF
10686 }
10687
10688     fi
10689   fi
10690
10691     canna_includes_found=no
10692   if test "$with_canna" != "no"; then
10693     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10694 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10695 echo "configure:10696: checking for canna/jrkanji.h" >&5
10696
10697 cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 #include <canna/jrkanji.h>
10701 EOF
10702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10703 { (eval echo configure:10704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10705 if test -z "$ac_err"; then
10706   rm -rf conftest*
10707   eval "ac_cv_header_$ac_safe=yes"
10708 else
10709   echo "$ac_err" >&5
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   eval "ac_cv_header_$ac_safe=no"
10714 fi
10715 rm -f conftest*
10716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10717   echo "$ac_t""yes" 1>&6
10718   canna_includes_found=yes
10719 else
10720   echo "$ac_t""no" 1>&6
10721 fi
10722
10723   fi
10724   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10725       -d "/usr/local/canna/include"; then
10726     save_c_switch_site="$c_switch_site"
10727     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10728     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10729 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10730 echo "configure:10731: checking for canna/jrkanji.h" >&5
10731
10732 cat > conftest.$ac_ext <<EOF
10733 #line 10734 "configure"
10734 #include "confdefs.h"
10735 #include <canna/jrkanji.h>
10736 EOF
10737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10738 { (eval echo configure:10739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10740 if test -z "$ac_err"; then
10741   rm -rf conftest*
10742   eval "ac_cv_header_$ac_safe=yes"
10743 else
10744   echo "$ac_err" >&5
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   eval "ac_cv_header_$ac_safe=no"
10749 fi
10750 rm -f conftest*
10751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10752   echo "$ac_t""yes" 1>&6
10753   canna_includes_found=yes
10754 else
10755   echo "$ac_t""no" 1>&6
10756 fi
10757
10758     if test "$canna_includes_found" != "yes"; then
10759       c_switch_site="$save_c_switch_site"
10760       with_canna="no"
10761     fi
10762   fi
10763
10764   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10765 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10766 echo "configure:10767: checking for canna/RK.h" >&5
10767
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771 #include <canna/RK.h>
10772 EOF
10773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10774 { (eval echo configure:10775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10776 if test -z "$ac_err"; then
10777   rm -rf conftest*
10778   eval "ac_cv_header_$ac_safe=yes"
10779 else
10780   echo "$ac_err" >&5
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -rf conftest*
10784   eval "ac_cv_header_$ac_safe=no"
10785 fi
10786 rm -f conftest*
10787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10788   echo "$ac_t""yes" 1>&6
10789   :
10790 else
10791   echo "$ac_t""no" 1>&6
10792 with_canna=no
10793 fi
10794  }
10795   test -z "$with_canna" && { 
10796 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10797 echo "configure:10798: checking for RkBgnBun in -lRKC" >&5
10798 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10799
10800 xe_check_libs=" -lRKC "
10801 cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804 /* Override any gcc2 internal prototype to avoid an error.  */
10805 /* We use char because int might match the return type of a gcc2
10806     builtin and then its argument prototype would still apply.  */
10807 char RkBgnBun();
10808
10809 int main() {
10810 RkBgnBun()
10811 ; return 0; }
10812 EOF
10813 if { (eval echo configure:10814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10814   rm -rf conftest*
10815   eval "ac_cv_lib_$ac_lib_var=yes"
10816 else
10817   echo "configure: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=no"
10821 fi
10822 rm -f conftest*
10823 xe_check_libs=""
10824
10825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10826   echo "$ac_t""yes" 1>&6
10827   :
10828 else
10829   echo "$ac_t""no" 1>&6
10830 with_canna=no
10831 fi
10832
10833  }
10834   test -z "$with_canna" && { 
10835 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10836 echo "configure:10837: checking for jrKanjiControl in -lcanna" >&5
10837 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10838
10839 xe_check_libs=" -lcanna "
10840 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843 /* Override any gcc2 internal prototype to avoid an error.  */
10844 /* We use char because int might match the return type of a gcc2
10845     builtin and then its argument prototype would still apply.  */
10846 char jrKanjiControl();
10847
10848 int main() {
10849 jrKanjiControl()
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10853   rm -rf conftest*
10854   eval "ac_cv_lib_$ac_lib_var=yes"
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   eval "ac_cv_lib_$ac_lib_var=no"
10860 fi
10861 rm -f conftest*
10862 xe_check_libs=""
10863
10864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10865   echo "$ac_t""yes" 1>&6
10866   :
10867 else
10868   echo "$ac_t""no" 1>&6
10869 with_canna=no
10870 fi
10871
10872  }
10873   test -z "$with_canna" && with_canna=yes
10874   if test "$with_canna" = "yes"; then
10875     { test "$extra_verbose" = "yes" && cat << \EOF
10876     Defining HAVE_CANNA
10877 EOF
10878 cat >> confdefs.h <<\EOF
10879 #define HAVE_CANNA 1
10880 EOF
10881 }
10882
10883     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10884     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10885    echo "    xemacs will be linked with \"mule-canna.o\""
10886  fi
10887   fi
10888
10889 else   for feature in xim canna wnn; do
10890     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10891       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10892     fi
10893     eval "with_${feature}=no"
10894   done
10895 fi 
10896
10897 if test "$need_motif" = "yes" ; then
10898   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10899     
10900 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10901 echo "configure:10902: checking for layout_object_getvalue in -li18n" >&5
10902 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10903
10904 xe_check_libs=" -li18n "
10905 cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908 /* Override any gcc2 internal prototype to avoid an error.  */
10909 /* We use char because int might match the return type of a gcc2
10910     builtin and then its argument prototype would still apply.  */
10911 char layout_object_getvalue();
10912
10913 int main() {
10914 layout_object_getvalue()
10915 ; return 0; }
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10918   rm -rf conftest*
10919   eval "ac_cv_lib_$ac_lib_var=yes"
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -rf conftest*
10924   eval "ac_cv_lib_$ac_lib_var=no"
10925 fi
10926 rm -f conftest*
10927 xe_check_libs=""
10928
10929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10930   echo "$ac_t""yes" 1>&6
10931   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10932 else
10933   echo "$ac_t""no" 1>&6
10934 fi
10935
10936
10937   
10938 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10939     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10940   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10941   
10942         runpath="" runpath_dirs=""
10943   if test -n "$LD_RUN_PATH"; then
10944     runpath="$LD_RUN_PATH"
10945   elif test "$GCC" = "yes"; then
10946         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10947     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10948     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10949     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10950       case "$arg" in P,* | -L* | -R* )
10951         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10952           {
10953 xe_runpath_dir="$dir"
10954   test "$xe_runpath_dir" != "/lib"     -a \
10955         "$xe_runpath_dir" != "/usr/lib" -a \
10956         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10957   eval "$xe_add_unique_runpath_dir"
10958 }
10959         done ;;
10960       esac
10961     done
10962     ld_switch_run="$ld_switch_run_save"
10963     rm -f conftest*
10964   else
10965         for arg in $ld_switch_site $ld_switch_x_site; do
10966       case "$arg" in -L*) {
10967 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10968   test "$xe_runpath_dir" != "/lib"     -a \
10969         "$xe_runpath_dir" != "/usr/lib" -a \
10970         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10971   eval "$xe_add_unique_runpath_dir"
10972 };; esac
10973     done
10974         if test "$opsys $need_motif" = "sol2 yes"; then
10975       xe_runpath_dir="/opt/SUNWdt/lib";
10976       eval "$xe_add_unique_runpath_dir";
10977     fi
10978   fi 
10979   if test -n "$runpath"; then
10980     ld_switch_run="${dash_r}${runpath}"
10981     
10982 if test "$GCC" = "yes"; then
10983   set x $ld_switch_run; shift; ld_switch_run=""
10984   while test -n "$1"; do
10985     case $1 in
10986       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10987       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10988       -Xlinker* ) ;;
10989       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10990     esac
10991     shift
10992   done
10993 fi
10994     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10995   fi
10996 fi
10997
10998 fi
10999
11000
11001 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
11002 do
11003 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11004 echo "configure:11005: checking for $ac_func" >&5
11005
11006 cat > conftest.$ac_ext <<EOF
11007 #line 11008 "configure"
11008 #include "confdefs.h"
11009 /* System header to define __stub macros and hopefully few prototypes,
11010     which can conflict with char $ac_func(); below.  */
11011 #include <assert.h>
11012 /* Override any gcc2 internal prototype to avoid an error.  */
11013 /* We use char because int might match the return type of a gcc2
11014     builtin and then its argument prototype would still apply.  */
11015 char $ac_func();
11016
11017 int main() {
11018
11019 /* The GNU C library defines this for functions which it implements
11020     to always fail with ENOSYS.  Some functions are actually named
11021     something starting with __ and the normal name is an alias.  */
11022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11023 choke me
11024 #else
11025 $ac_func();
11026 #endif
11027
11028 ; return 0; }
11029 EOF
11030 if { (eval echo configure:11031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11031   rm -rf conftest*
11032   eval "ac_cv_func_$ac_func=yes"
11033 else
11034   echo "configure: failed program was:" >&5
11035   cat conftest.$ac_ext >&5
11036   rm -rf conftest*
11037   eval "ac_cv_func_$ac_func=no"
11038 fi
11039 rm -f conftest*
11040
11041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11042   echo "$ac_t""yes" 1>&6
11043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11044   { test "$extra_verbose" = "yes" && cat << EOF
11045     Defining $ac_tr_func
11046 EOF
11047 cat >> confdefs.h <<EOF
11048 #define $ac_tr_func 1
11049 EOF
11050 }
11051  
11052 else
11053   echo "$ac_t""no" 1>&6
11054 fi
11055 done
11056
11057
11058 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11059   case "$opsys" in
11060     hpux11* )
11061       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11062       ac_cv_func_getaddrinfo=no
11063       ;;
11064   esac
11065 fi
11066
11067
11068 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11069 do
11070 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11071 echo "configure:11072: checking for $ac_func" >&5
11072
11073 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 /* System header to define __stub macros and hopefully few prototypes,
11077     which can conflict with char $ac_func(); below.  */
11078 #include <assert.h>
11079 /* Override any gcc2 internal prototype to avoid an error.  */
11080 /* We use char because int might match the return type of a gcc2
11081     builtin and then its argument prototype would still apply.  */
11082 char $ac_func();
11083
11084 int main() {
11085
11086 /* The GNU C library defines this for functions which it implements
11087     to always fail with ENOSYS.  Some functions are actually named
11088     something starting with __ and the normal name is an alias.  */
11089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11090 choke me
11091 #else
11092 $ac_func();
11093 #endif
11094
11095 ; return 0; }
11096 EOF
11097 if { (eval echo configure:11098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11098   rm -rf conftest*
11099   eval "ac_cv_func_$ac_func=yes"
11100 else
11101   echo "configure: failed program was:" >&5
11102   cat conftest.$ac_ext >&5
11103   rm -rf conftest*
11104   eval "ac_cv_func_$ac_func=no"
11105 fi
11106 rm -f conftest*
11107
11108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11111   { test "$extra_verbose" = "yes" && cat << EOF
11112     Defining $ac_tr_func
11113 EOF
11114 cat >> confdefs.h <<EOF
11115 #define $ac_tr_func 1
11116 EOF
11117 }
11118  
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124
11125 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11126 echo "configure:11127: checking for openpty" >&5
11127
11128 cat > conftest.$ac_ext <<EOF
11129 #line 11130 "configure"
11130 #include "confdefs.h"
11131 /* System header to define __stub macros and hopefully few prototypes,
11132     which can conflict with char openpty(); below.  */
11133 #include <assert.h>
11134 /* Override any gcc2 internal prototype to avoid an error.  */
11135 /* We use char because int might match the return type of a gcc2
11136     builtin and then its argument prototype would still apply.  */
11137 char openpty();
11138
11139 int main() {
11140
11141 /* The GNU C library defines this for functions which it implements
11142     to always fail with ENOSYS.  Some functions are actually named
11143     something starting with __ and the normal name is an alias.  */
11144 #if defined (__stub_openpty) || defined (__stub___openpty)
11145 choke me
11146 #else
11147 openpty();
11148 #endif
11149
11150 ; return 0; }
11151 EOF
11152 if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11153   rm -rf conftest*
11154   eval "ac_cv_func_openpty=yes"
11155 else
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -rf conftest*
11159   eval "ac_cv_func_openpty=no"
11160 fi
11161 rm -f conftest*
11162
11163 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11164   echo "$ac_t""yes" 1>&6
11165   have_openpty=yes
11166 else
11167   echo "$ac_t""no" 1>&6
11168
11169   
11170 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11171 echo "configure:11172: checking for openpty in -lutil" >&5
11172 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11173
11174 xe_check_libs=" -lutil "
11175 cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 /* Override any gcc2 internal prototype to avoid an error.  */
11179 /* We use char because int might match the return type of a gcc2
11180     builtin and then its argument prototype would still apply.  */
11181 char openpty();
11182
11183 int main() {
11184 openpty()
11185 ; return 0; }
11186 EOF
11187 if { (eval echo configure:11188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11188   rm -rf conftest*
11189   eval "ac_cv_lib_$ac_lib_var=yes"
11190 else
11191   echo "configure: failed program was:" >&5
11192   cat conftest.$ac_ext >&5
11193   rm -rf conftest*
11194   eval "ac_cv_lib_$ac_lib_var=no"
11195 fi
11196 rm -f conftest*
11197 xe_check_libs=""
11198
11199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11200   echo "$ac_t""yes" 1>&6
11201   have_openpty=yes need_libutil=yes
11202 else
11203   echo "$ac_t""no" 1>&6
11204 fi
11205
11206
11207 fi
11208
11209 if test "$have_openpty" = "yes"; then
11210   { test "$extra_verbose" = "yes" && cat << \EOF
11211     Defining HAVE_OPENPTY
11212 EOF
11213 cat >> confdefs.h <<\EOF
11214 #define HAVE_OPENPTY 1
11215 EOF
11216 }
11217
11218   for ac_hdr in pty.h libutil.h util.h
11219 do
11220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11222 echo "configure:11223: checking for $ac_hdr" >&5
11223
11224 cat > conftest.$ac_ext <<EOF
11225 #line 11226 "configure"
11226 #include "confdefs.h"
11227 #include <$ac_hdr>
11228 EOF
11229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11230 { (eval echo configure:11231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11232 if test -z "$ac_err"; then
11233   rm -rf conftest*
11234   eval "ac_cv_header_$ac_safe=yes"
11235 else
11236   echo "$ac_err" >&5
11237   echo "configure: failed program was:" >&5
11238   cat conftest.$ac_ext >&5
11239   rm -rf conftest*
11240   eval "ac_cv_header_$ac_safe=no"
11241 fi
11242 rm -f conftest*
11243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11246   { test "$extra_verbose" = "yes" && cat << EOF
11247     Defining $ac_tr_hdr
11248 EOF
11249 cat >> confdefs.h <<EOF
11250 #define $ac_tr_hdr 1
11251 EOF
11252 }
11253  break
11254 else
11255   echo "$ac_t""no" 1>&6
11256 fi
11257 done
11258
11259   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11260 fi
11261
11262 for ac_hdr in stropts.h
11263 do
11264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11266 echo "configure:11267: checking for $ac_hdr" >&5
11267
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <$ac_hdr>
11272 EOF
11273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11274 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11276 if test -z "$ac_err"; then
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=yes"
11279 else
11280   echo "$ac_err" >&5
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=no"
11285 fi
11286 rm -f conftest*
11287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11288   echo "$ac_t""yes" 1>&6
11289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11290   { test "$extra_verbose" = "yes" && cat << EOF
11291     Defining $ac_tr_hdr
11292 EOF
11293 cat >> confdefs.h <<EOF
11294 #define $ac_tr_hdr 1
11295 EOF
11296 }
11297  
11298 else
11299   echo "$ac_t""no" 1>&6
11300 fi
11301 done
11302
11303 if test "$ac_cv_header_stropts_h" = "yes"; then
11304   for ac_func in isastream
11305 do
11306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11307 echo "configure:11308: checking for $ac_func" >&5
11308
11309 cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312 /* System header to define __stub macros and hopefully few prototypes,
11313     which can conflict with char $ac_func(); below.  */
11314 #include <assert.h>
11315 /* Override any gcc2 internal prototype to avoid an error.  */
11316 /* We use char because int might match the return type of a gcc2
11317     builtin and then its argument prototype would still apply.  */
11318 char $ac_func();
11319
11320 int main() {
11321
11322 /* The GNU C library defines this for functions which it implements
11323     to always fail with ENOSYS.  Some functions are actually named
11324     something starting with __ and the normal name is an alias.  */
11325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11326 choke me
11327 #else
11328 $ac_func();
11329 #endif
11330
11331 ; return 0; }
11332 EOF
11333 if { (eval echo configure:11334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11334   rm -rf conftest*
11335   eval "ac_cv_func_$ac_func=yes"
11336 else
11337   echo "configure: failed program was:" >&5
11338   cat conftest.$ac_ext >&5
11339   rm -rf conftest*
11340   eval "ac_cv_func_$ac_func=no"
11341 fi
11342 rm -f conftest*
11343
11344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11345   echo "$ac_t""yes" 1>&6
11346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11347   { test "$extra_verbose" = "yes" && cat << EOF
11348     Defining $ac_tr_func
11349 EOF
11350 cat >> confdefs.h <<EOF
11351 #define $ac_tr_func 1
11352 EOF
11353 }
11354  
11355 else
11356   echo "$ac_t""no" 1>&6
11357 fi
11358 done
11359
11360   for ac_hdr in strtio.h
11361 do
11362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11364 echo "configure:11365: checking for $ac_hdr" >&5
11365
11366 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 #include <$ac_hdr>
11370 EOF
11371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11372 { (eval echo configure:11373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11374 if test -z "$ac_err"; then
11375   rm -rf conftest*
11376   eval "ac_cv_header_$ac_safe=yes"
11377 else
11378   echo "$ac_err" >&5
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=no"
11383 fi
11384 rm -f conftest*
11385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11386   echo "$ac_t""yes" 1>&6
11387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11388   { test "$extra_verbose" = "yes" && cat << EOF
11389     Defining $ac_tr_hdr
11390 EOF
11391 cat >> confdefs.h <<EOF
11392 #define $ac_tr_hdr 1
11393 EOF
11394 }
11395  
11396 else
11397   echo "$ac_t""no" 1>&6
11398 fi
11399 done
11400  fi
11401
11402 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11403    echo "    xemacs will be linked with \"realpath.o\""
11404  fi
11405
11406 for ac_func in getloadavg
11407 do
11408 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11409 echo "configure:11410: checking for $ac_func" >&5
11410
11411 cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414 /* System header to define __stub macros and hopefully few prototypes,
11415     which can conflict with char $ac_func(); below.  */
11416 #include <assert.h>
11417 /* Override any gcc2 internal prototype to avoid an error.  */
11418 /* We use char because int might match the return type of a gcc2
11419     builtin and then its argument prototype would still apply.  */
11420 char $ac_func();
11421
11422 int main() {
11423
11424 /* The GNU C library defines this for functions which it implements
11425     to always fail with ENOSYS.  Some functions are actually named
11426     something starting with __ and the normal name is an alias.  */
11427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11428 choke me
11429 #else
11430 $ac_func();
11431 #endif
11432
11433 ; return 0; }
11434 EOF
11435 if { (eval echo configure:11436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11436   rm -rf conftest*
11437   eval "ac_cv_func_$ac_func=yes"
11438 else
11439   echo "configure: failed program was:" >&5
11440   cat conftest.$ac_ext >&5
11441   rm -rf conftest*
11442   eval "ac_cv_func_$ac_func=no"
11443 fi
11444 rm -f conftest*
11445
11446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11447   echo "$ac_t""yes" 1>&6
11448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11449   { test "$extra_verbose" = "yes" && cat << EOF
11450     Defining $ac_tr_func
11451 EOF
11452 cat >> confdefs.h <<EOF
11453 #define $ac_tr_func 1
11454 EOF
11455 }
11456  
11457 else
11458   echo "$ac_t""no" 1>&6
11459 fi
11460 done
11461
11462
11463 if test "$ac_cv_func_getloadavg" = "yes"; then
11464         for ac_hdr in sys/loadavg.h
11465 do
11466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11468 echo "configure:11469: checking for $ac_hdr" >&5
11469
11470 cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473 #include <$ac_hdr>
11474 EOF
11475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11476 { (eval echo configure:11477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11478 if test -z "$ac_err"; then
11479   rm -rf conftest*
11480   eval "ac_cv_header_$ac_safe=yes"
11481 else
11482   echo "$ac_err" >&5
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   eval "ac_cv_header_$ac_safe=no"
11487 fi
11488 rm -f conftest*
11489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11490   echo "$ac_t""yes" 1>&6
11491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11492   { test "$extra_verbose" = "yes" && cat << EOF
11493     Defining $ac_tr_hdr
11494 EOF
11495 cat >> confdefs.h <<EOF
11496 #define $ac_tr_hdr 1
11497 EOF
11498 }
11499  
11500 else
11501   echo "$ac_t""no" 1>&6
11502 fi
11503 done
11504
11505 else
11506     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11507    echo "    xemacs will be linked with \"getloadavg.o\""
11508  fi
11509
11510     
11511 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11512 echo "configure:11513: checking for kstat_open in -lkstat" >&5
11513 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11514
11515 xe_check_libs=" -lkstat "
11516 cat > conftest.$ac_ext <<EOF
11517 #line 11518 "configure"
11518 #include "confdefs.h"
11519 /* Override any gcc2 internal prototype to avoid an error.  */
11520 /* We use char because int might match the return type of a gcc2
11521     builtin and then its argument prototype would still apply.  */
11522 char kstat_open();
11523
11524 int main() {
11525 kstat_open()
11526 ; return 0; }
11527 EOF
11528 if { (eval echo configure:11529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11529   rm -rf conftest*
11530   eval "ac_cv_lib_$ac_lib_var=yes"
11531 else
11532   echo "configure: failed program was:" >&5
11533   cat conftest.$ac_ext >&5
11534   rm -rf conftest*
11535   eval "ac_cv_lib_$ac_lib_var=no"
11536 fi
11537 rm -f conftest*
11538 xe_check_libs=""
11539
11540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11541   echo "$ac_t""yes" 1>&6
11542     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11543     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11544   { test "$extra_verbose" = "yes" && cat << EOF
11545     Defining $ac_tr_lib
11546 EOF
11547 cat >> confdefs.h <<EOF
11548 #define $ac_tr_lib 1
11549 EOF
11550 }
11551
11552   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11553
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557
11558
11559   for ac_hdr in kstat.h
11560 do
11561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11563 echo "configure:11564: checking for $ac_hdr" >&5
11564
11565 cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 #include <$ac_hdr>
11569 EOF
11570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11571 { (eval echo configure:11572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11573 if test -z "$ac_err"; then
11574   rm -rf conftest*
11575   eval "ac_cv_header_$ac_safe=yes"
11576 else
11577   echo "$ac_err" >&5
11578   echo "configure: failed program was:" >&5
11579   cat conftest.$ac_ext >&5
11580   rm -rf conftest*
11581   eval "ac_cv_header_$ac_safe=no"
11582 fi
11583 rm -f conftest*
11584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11585   echo "$ac_t""yes" 1>&6
11586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11587   { test "$extra_verbose" = "yes" && cat << EOF
11588     Defining $ac_tr_hdr
11589 EOF
11590 cat >> confdefs.h <<EOF
11591 #define $ac_tr_hdr 1
11592 EOF
11593 }
11594  
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598 done
11599
11600
11601     
11602 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11603 echo "configure:11604: checking for kvm_read in -lkvm" >&5
11604 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11605
11606 xe_check_libs=" -lkvm "
11607 cat > conftest.$ac_ext <<EOF
11608 #line 11609 "configure"
11609 #include "confdefs.h"
11610 /* Override any gcc2 internal prototype to avoid an error.  */
11611 /* We use char because int might match the return type of a gcc2
11612     builtin and then its argument prototype would still apply.  */
11613 char kvm_read();
11614
11615 int main() {
11616 kvm_read()
11617 ; return 0; }
11618 EOF
11619 if { (eval echo configure:11620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11620   rm -rf conftest*
11621   eval "ac_cv_lib_$ac_lib_var=yes"
11622 else
11623   echo "configure: failed program was:" >&5
11624   cat conftest.$ac_ext >&5
11625   rm -rf conftest*
11626   eval "ac_cv_lib_$ac_lib_var=no"
11627 fi
11628 rm -f conftest*
11629 xe_check_libs=""
11630
11631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11632   echo "$ac_t""yes" 1>&6
11633     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11635   { test "$extra_verbose" = "yes" && cat << EOF
11636     Defining $ac_tr_lib
11637 EOF
11638 cat >> confdefs.h <<EOF
11639 #define $ac_tr_lib 1
11640 EOF
11641 }
11642
11643   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11644
11645 else
11646   echo "$ac_t""no" 1>&6
11647 fi
11648
11649
11650 fi
11651
11652 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11653 echo "configure:11654: checking whether netdb declares h_errno" >&5
11654 cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 #include <netdb.h>
11658 int main() {
11659 return h_errno;
11660 ; return 0; }
11661 EOF
11662 if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11663   rm -rf conftest*
11664   echo "$ac_t""yes" 1>&6
11665    { test "$extra_verbose" = "yes" && cat << \EOF
11666     Defining HAVE_H_ERRNO
11667 EOF
11668 cat >> confdefs.h <<\EOF
11669 #define HAVE_H_ERRNO 1
11670 EOF
11671 }
11672
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   echo "$ac_t""no" 1>&6
11678 fi
11679 rm -f conftest*
11680
11681 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11682 echo "configure:11683: checking for sigsetjmp" >&5
11683 cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686 #include <setjmp.h>
11687 int main() {
11688 sigjmp_buf bar; sigsetjmp (bar, 0);
11689 ; return 0; }
11690 EOF
11691 if { (eval echo configure:11692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11692   rm -rf conftest*
11693   echo "$ac_t""yes" 1>&6
11694    { test "$extra_verbose" = "yes" && cat << \EOF
11695     Defining HAVE_SIGSETJMP
11696 EOF
11697 cat >> confdefs.h <<\EOF
11698 #define HAVE_SIGSETJMP 1
11699 EOF
11700 }
11701
11702 else
11703   echo "configure: failed program was:" >&5
11704   cat conftest.$ac_ext >&5
11705   rm -rf conftest*
11706   echo "$ac_t""no" 1>&6
11707 fi
11708 rm -f conftest*
11709
11710 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11711 echo "configure:11712: checking whether localtime caches TZ" >&5
11712
11713 if test "$ac_cv_func_tzset" = "yes"; then
11714 cat > conftest.$ac_ext <<EOF
11715 #line 11716 "configure"
11716 #include "confdefs.h"
11717 #include <time.h>
11718 #if STDC_HEADERS
11719 # include <stdlib.h>
11720 #endif
11721 extern char **environ;
11722 unset_TZ ()
11723 {
11724   char **from, **to;
11725   for (to = from = environ; (*to = *from); from++)
11726     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11727       to++;
11728 }
11729 char TZ_GMT0[] = "TZ=GMT0";
11730 char TZ_PST8[] = "TZ=PST8";
11731 main()
11732 {
11733   time_t now = time ((time_t *) 0);
11734   int hour_GMT0, hour_unset;
11735   if (putenv (TZ_GMT0) != 0)
11736     exit (1);
11737   hour_GMT0 = localtime (&now)->tm_hour;
11738   unset_TZ ();
11739   hour_unset = localtime (&now)->tm_hour;
11740   if (putenv (TZ_PST8) != 0)
11741     exit (1);
11742   if (localtime (&now)->tm_hour == hour_GMT0)
11743     exit (1);
11744   unset_TZ ();
11745   if (localtime (&now)->tm_hour != hour_unset)
11746     exit (1);
11747   exit (0);
11748 }
11749 EOF
11750 if { (eval echo configure:11751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11751 then
11752   emacs_cv_localtime_cache=no
11753 else
11754   conftest_rc="$?"
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -fr conftest*
11758   emacs_cv_localtime_cache=yes
11759 fi
11760 rm -fr conftest*
11761 else
11762         # If we lack tzset, report that localtime does not cache TZ,
11763         # since we can't invalidate the cache if we don't have tzset.
11764         emacs_cv_localtime_cache=no
11765 fi
11766 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11767 if test $emacs_cv_localtime_cache = yes; then
11768   { test "$extra_verbose" = "yes" && cat << \EOF
11769     Defining LOCALTIME_CACHE
11770 EOF
11771 cat >> confdefs.h <<\EOF
11772 #define LOCALTIME_CACHE 1
11773 EOF
11774 }
11775
11776 fi
11777
11778 if test "$HAVE_TIMEVAL" = "yes"; then
11779 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11780 echo "configure:11781: checking whether gettimeofday accepts one or two arguments" >&5
11781 cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784
11785 #ifdef TIME_WITH_SYS_TIME
11786 #include <sys/time.h>
11787 #include <time.h>
11788 #else
11789 #ifdef HAVE_SYS_TIME_H
11790 #include <sys/time.h>
11791 #else
11792 #include <time.h>
11793 #endif
11794 #endif
11795   
11796 int main() {
11797
11798   struct timeval time;
11799   gettimeofday (&time, 0);
11800
11801 ; return 0; }
11802 EOF
11803 if { (eval echo configure:11804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11804   rm -rf conftest*
11805   echo "$ac_t""two" 1>&6
11806 else
11807   echo "configure: failed program was:" >&5
11808   cat conftest.$ac_ext >&5
11809   rm -rf conftest*
11810   echo "$ac_t""one" 1>&6
11811    { test "$extra_verbose" = "yes" && cat << \EOF
11812     Defining GETTIMEOFDAY_ONE_ARGUMENT
11813 EOF
11814 cat >> confdefs.h <<\EOF
11815 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11816 EOF
11817 }
11818
11819 fi
11820 rm -f conftest*
11821 fi
11822
11823
11824 echo $ac_n "checking for inline""... $ac_c" 1>&6
11825 echo "configure:11826: checking for inline" >&5
11826
11827 ac_cv_c_inline=no
11828 for ac_kw in inline __inline__ __inline; do
11829   cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832
11833 int main() {
11834 } $ac_kw foo() {
11835 ; return 0; }
11836 EOF
11837 if { (eval echo configure:11838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11838   rm -rf conftest*
11839   ac_cv_c_inline=$ac_kw; break
11840 else
11841   echo "configure: failed program was:" >&5
11842   cat conftest.$ac_ext >&5
11843 fi
11844 rm -f conftest*
11845 done
11846
11847
11848 echo "$ac_t""$ac_cv_c_inline" 1>&6
11849 case "$ac_cv_c_inline" in
11850   inline | yes) ;;
11851   no) { test "$extra_verbose" = "yes" && cat << \EOF
11852     Defining inline = 
11853 EOF
11854 cat >> confdefs.h <<\EOF
11855 #define inline 
11856 EOF
11857 }
11858  ;;
11859   *)  { test "$extra_verbose" = "yes" && cat << EOF
11860     Defining inline = $ac_cv_c_inline
11861 EOF
11862 cat >> confdefs.h <<EOF
11863 #define inline $ac_cv_c_inline
11864 EOF
11865 }
11866  ;;
11867 esac
11868
11869 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11870    echo "    xemacs will be linked with \"inline.o\""
11871  fi
11872
11873
11874 if test "$__DECC" != "yes"; then
11875   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11876 # for constant arguments.  Useless!
11877 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11878 echo "configure:11879: checking for working alloca.h" >&5
11879
11880 cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883 #include <alloca.h>
11884 int main() {
11885 char *p = alloca(2 * sizeof(int));
11886 ; return 0; }
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11889   rm -rf conftest*
11890   ac_cv_header_alloca_h=yes
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -rf conftest*
11895   ac_cv_header_alloca_h=no
11896 fi
11897 rm -f conftest*
11898
11899 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11900 if test $ac_cv_header_alloca_h = yes; then
11901   { test "$extra_verbose" = "yes" && cat << \EOF
11902     Defining HAVE_ALLOCA_H
11903 EOF
11904 cat >> confdefs.h <<\EOF
11905 #define HAVE_ALLOCA_H 1
11906 EOF
11907 }
11908
11909 fi
11910
11911 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11912 echo "configure:11913: checking for alloca" >&5
11913
11914 cat > conftest.$ac_ext <<EOF
11915 #line 11916 "configure"
11916 #include "confdefs.h"
11917
11918 #ifdef __GNUC__
11919 # define alloca __builtin_alloca
11920 #else
11921 # ifdef _MSC_VER
11922 #  include <malloc.h>
11923 #  define alloca _alloca
11924 # else
11925 #  if HAVE_ALLOCA_H
11926 #   include <alloca.h>
11927 #  else
11928 #   ifdef _AIX
11929  #pragma alloca
11930 #   else
11931 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11932 char *alloca ();
11933 #    endif
11934 #   endif
11935 #  endif
11936 # endif
11937 #endif
11938
11939 int main() {
11940 char *p = (char *) alloca(1);
11941 ; return 0; }
11942 EOF
11943 if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11944   rm -rf conftest*
11945   ac_cv_func_alloca_works=yes
11946 else
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -rf conftest*
11950   ac_cv_func_alloca_works=no
11951 fi
11952 rm -f conftest*
11953
11954 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11955 if test $ac_cv_func_alloca_works = yes; then
11956   { test "$extra_verbose" = "yes" && cat << \EOF
11957     Defining HAVE_ALLOCA
11958 EOF
11959 cat >> confdefs.h <<\EOF
11960 #define HAVE_ALLOCA 1
11961 EOF
11962 }
11963
11964 fi
11965
11966 if test $ac_cv_func_alloca_works = no; then
11967   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11968   # that cause trouble.  Some versions do not even contain alloca or
11969   # contain a buggy version.  If you still want to use their alloca,
11970   # use ar to extract alloca.o from them instead of compiling alloca.c.
11971   ALLOCA=alloca.${ac_objext}
11972   { test "$extra_verbose" = "yes" && cat << \EOF
11973     Defining C_ALLOCA
11974 EOF
11975 cat >> confdefs.h <<\EOF
11976 #define C_ALLOCA 1
11977 EOF
11978 }
11979
11980
11981 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11982 echo "configure:11983: checking whether alloca needs Cray hooks" >&5
11983
11984 cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 #if defined(CRAY) && ! defined(CRAY2)
11988 webecray
11989 #else
11990 wenotbecray
11991 #endif
11992
11993 EOF
11994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11995   egrep "webecray" >/dev/null 2>&1; then
11996   rm -rf conftest*
11997   ac_cv_os_cray=yes
11998 else
11999   rm -rf conftest*
12000   ac_cv_os_cray=no
12001 fi
12002 rm -f conftest*
12003
12004
12005 echo "$ac_t""$ac_cv_os_cray" 1>&6
12006 if test $ac_cv_os_cray = yes; then
12007 for ac_func in _getb67 GETB67 getb67; do
12008   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12009 echo "configure:12010: checking for $ac_func" >&5
12010
12011 cat > conftest.$ac_ext <<EOF
12012 #line 12013 "configure"
12013 #include "confdefs.h"
12014 /* System header to define __stub macros and hopefully few prototypes,
12015     which can conflict with char $ac_func(); below.  */
12016 #include <assert.h>
12017 /* Override any gcc2 internal prototype to avoid an error.  */
12018 /* We use char because int might match the return type of a gcc2
12019     builtin and then its argument prototype would still apply.  */
12020 char $ac_func();
12021
12022 int main() {
12023
12024 /* The GNU C library defines this for functions which it implements
12025     to always fail with ENOSYS.  Some functions are actually named
12026     something starting with __ and the normal name is an alias.  */
12027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12028 choke me
12029 #else
12030 $ac_func();
12031 #endif
12032
12033 ; return 0; }
12034 EOF
12035 if { (eval echo configure:12036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12036   rm -rf conftest*
12037   eval "ac_cv_func_$ac_func=yes"
12038 else
12039   echo "configure: failed program was:" >&5
12040   cat conftest.$ac_ext >&5
12041   rm -rf conftest*
12042   eval "ac_cv_func_$ac_func=no"
12043 fi
12044 rm -f conftest*
12045
12046 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12047   echo "$ac_t""yes" 1>&6
12048   { test "$extra_verbose" = "yes" && cat << EOF
12049     Defining CRAY_STACKSEG_END = $ac_func
12050 EOF
12051 cat >> confdefs.h <<EOF
12052 #define CRAY_STACKSEG_END $ac_func
12053 EOF
12054 }
12055
12056   break
12057 else
12058   echo "$ac_t""no" 1>&6
12059 fi
12060
12061 done
12062 fi
12063
12064 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12065 echo "configure:12066: checking stack direction for C alloca" >&5
12066
12067 cat > conftest.$ac_ext <<EOF
12068 #line 12069 "configure"
12069 #include "confdefs.h"
12070 find_stack_direction ()
12071 {
12072   static char *addr = 0;
12073   auto char dummy;
12074   if (addr == 0)
12075     {
12076       addr = &dummy;
12077       return find_stack_direction ();
12078     }
12079   else
12080     return (&dummy > addr) ? 1 : -1;
12081 }
12082 main ()
12083 {
12084   exit (find_stack_direction() < 0);
12085 }
12086 EOF
12087 if { (eval echo configure:12088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12088 then
12089   ac_cv_c_stack_direction=1
12090 else
12091   conftest_rc="$?"
12092   echo "configure: failed program was:" >&5
12093   cat conftest.$ac_ext >&5
12094   rm -fr conftest*
12095   ac_cv_c_stack_direction=-1
12096 fi
12097 rm -fr conftest*
12098
12099 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12100 { test "$extra_verbose" = "yes" && cat << EOF
12101     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12102 EOF
12103 cat >> confdefs.h <<EOF
12104 #define STACK_DIRECTION $ac_cv_c_stack_direction
12105 EOF
12106 }
12107
12108 fi
12109
12110   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12111    echo "    xemacs will be linked with \"$ALLOCA\""
12112  fi
12113 fi
12114
12115 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12116 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12117 echo "configure:12118: checking for vfork.h" >&5
12118
12119 cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122 #include <vfork.h>
12123 EOF
12124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12125 { (eval echo configure:12126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12127 if test -z "$ac_err"; then
12128   rm -rf conftest*
12129   eval "ac_cv_header_$ac_safe=yes"
12130 else
12131   echo "$ac_err" >&5
12132   echo "configure: failed program was:" >&5
12133   cat conftest.$ac_ext >&5
12134   rm -rf conftest*
12135   eval "ac_cv_header_$ac_safe=no"
12136 fi
12137 rm -f conftest*
12138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12139   echo "$ac_t""yes" 1>&6
12140   { test "$extra_verbose" = "yes" && cat << \EOF
12141     Defining HAVE_VFORK_H
12142 EOF
12143 cat >> confdefs.h <<\EOF
12144 #define HAVE_VFORK_H 1
12145 EOF
12146 }
12147
12148 else
12149   echo "$ac_t""no" 1>&6
12150 fi
12151
12152 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12153 echo "configure:12154: checking for working vfork" >&5
12154
12155 cat > conftest.$ac_ext <<EOF
12156 #line 12157 "configure"
12157 #include "confdefs.h"
12158 /* Thanks to Paul Eggert for this test.  */
12159 #include <stdio.h>
12160 #include <sys/types.h>
12161 #include <sys/stat.h>
12162 #ifdef HAVE_UNISTD_H
12163 #include <unistd.h>
12164 #endif
12165 #ifdef HAVE_VFORK_H
12166 #include <vfork.h>
12167 #endif
12168 /* On some sparc systems, changes by the child to local and incoming
12169    argument registers are propagated back to the parent.
12170    The compiler is told about this with #include <vfork.h>,
12171    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12172    Test for this by using a static variable whose address
12173    is put into a register that is clobbered by the vfork.  */
12174 static
12175 #ifdef __cplusplus
12176 sparc_address_test (int arg)
12177 #else
12178 sparc_address_test (arg) int arg;
12179 #endif
12180 {
12181   static pid_t child;
12182   if (!child) {
12183     child = vfork ();
12184     if (child < 0) {
12185       perror ("vfork");
12186       _exit(2);
12187     }
12188     if (!child) {
12189       arg = getpid();
12190       write(-1, "", 0);
12191       _exit (arg);
12192     }
12193   }
12194 }
12195 main() {
12196   pid_t parent = getpid ();
12197   pid_t child;
12198
12199   sparc_address_test ();
12200
12201   child = vfork ();
12202
12203   if (child == 0) {
12204     /* Here is another test for sparc vfork register problems.
12205        This test uses lots of local variables, at least
12206        as many local variables as main has allocated so far
12207        including compiler temporaries.  4 locals are enough for
12208        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12209        A buggy compiler should reuse the register of parent
12210        for one of the local variables, since it will think that
12211        parent can't possibly be used any more in this routine.
12212        Assigning to the local variable will thus munge parent
12213        in the parent process.  */
12214     pid_t
12215       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12216       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12217     /* Convince the compiler that p..p7 are live; otherwise, it might
12218        use the same hardware register for all 8 local variables.  */
12219     if (p != p1 || p != p2 || p != p3 || p != p4
12220         || p != p5 || p != p6 || p != p7)
12221       _exit(1);
12222
12223     /* On some systems (e.g. IRIX 3.3),
12224        vfork doesn't separate parent from child file descriptors.
12225        If the child closes a descriptor before it execs or exits,
12226        this munges the parent's descriptor as well.
12227        Test for this by closing stdout in the child.  */
12228     _exit(close(fileno(stdout)) != 0);
12229   } else {
12230     int status;
12231     struct stat st;
12232
12233     while (wait(&status) != child)
12234       ;
12235     exit(
12236          /* Was there some problem with vforking?  */
12237          child < 0
12238
12239          /* Did the child fail?  (This shouldn't happen.)  */
12240          || status
12241
12242          /* Did the vfork/compiler bug occur?  */
12243          || parent != getpid()
12244
12245          /* Did the file descriptor bug occur?  */
12246          || fstat(fileno(stdout), &st) != 0
12247          );
12248   }
12249 }
12250 EOF
12251 if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12252 then
12253   ac_cv_func_vfork_works=yes
12254 else
12255   conftest_rc="$?"
12256   echo "configure: failed program was:" >&5
12257   cat conftest.$ac_ext >&5
12258   rm -fr conftest*
12259   ac_cv_func_vfork_works=no
12260 fi
12261 rm -fr conftest*
12262
12263 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12264 if test $ac_cv_func_vfork_works = no; then
12265   { test "$extra_verbose" = "yes" && cat << \EOF
12266     Defining vfork = fork
12267 EOF
12268 cat >> confdefs.h <<\EOF
12269 #define vfork fork
12270 EOF
12271 }
12272
12273 fi
12274
12275
12276 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12277 echo "configure:12278: checking for working strcoll" >&5
12278
12279 cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282 #include <string.h>
12283 main ()
12284 {
12285   exit (strcoll ("abc", "def") >= 0 ||
12286         strcoll ("ABC", "DEF") >= 0 ||
12287         strcoll ("123", "456") >= 0);
12288 }
12289 EOF
12290 if { (eval echo configure:12291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12291 then
12292   ac_cv_func_strcoll_works=yes
12293 else
12294   conftest_rc="$?"
12295   echo "configure: failed program was:" >&5
12296   cat conftest.$ac_ext >&5
12297   rm -fr conftest*
12298   ac_cv_func_strcoll_works=no
12299 fi
12300 rm -fr conftest*
12301
12302 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12303 if test $ac_cv_func_strcoll_works = yes; then
12304   { test "$extra_verbose" = "yes" && cat << \EOF
12305     Defining HAVE_STRCOLL
12306 EOF
12307 cat >> confdefs.h <<\EOF
12308 #define HAVE_STRCOLL 1
12309 EOF
12310 }
12311
12312 fi
12313
12314
12315 for ac_func in getpgrp
12316 do
12317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12318 echo "configure:12319: checking for $ac_func" >&5
12319
12320 cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* System header to define __stub macros and hopefully few prototypes,
12324     which can conflict with char $ac_func(); below.  */
12325 #include <assert.h>
12326 /* Override any gcc2 internal prototype to avoid an error.  */
12327 /* We use char because int might match the return type of a gcc2
12328     builtin and then its argument prototype would still apply.  */
12329 char $ac_func();
12330
12331 int main() {
12332
12333 /* The GNU C library defines this for functions which it implements
12334     to always fail with ENOSYS.  Some functions are actually named
12335     something starting with __ and the normal name is an alias.  */
12336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12337 choke me
12338 #else
12339 $ac_func();
12340 #endif
12341
12342 ; return 0; }
12343 EOF
12344 if { (eval echo configure:12345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12345   rm -rf conftest*
12346   eval "ac_cv_func_$ac_func=yes"
12347 else
12348   echo "configure: failed program was:" >&5
12349   cat conftest.$ac_ext >&5
12350   rm -rf conftest*
12351   eval "ac_cv_func_$ac_func=no"
12352 fi
12353 rm -f conftest*
12354
12355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12356   echo "$ac_t""yes" 1>&6
12357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12358   { test "$extra_verbose" = "yes" && cat << EOF
12359     Defining $ac_tr_func
12360 EOF
12361 cat >> confdefs.h <<EOF
12362 #define $ac_tr_func 1
12363 EOF
12364 }
12365  
12366 else
12367   echo "$ac_t""no" 1>&6
12368 fi
12369 done
12370
12371 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12372 echo "configure:12373: checking whether getpgrp takes no argument" >&5
12373
12374 cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377
12378 /*
12379  * If this system has a BSD-style getpgrp(),
12380  * which takes a pid argument, exit unsuccessfully.
12381  *
12382  * Snarfed from Chet Ramey's bash pgrp.c test program
12383  */
12384 #include <stdio.h>
12385 #include <sys/types.h>
12386
12387 int     pid;
12388 int     pg1, pg2, pg3, pg4;
12389 int     ng, np, s, child;
12390
12391 main()
12392 {
12393         pid = getpid();
12394         pg1 = getpgrp(0);
12395         pg2 = getpgrp();
12396         pg3 = getpgrp(pid);
12397         pg4 = getpgrp(1);
12398
12399         /*
12400          * If all of these values are the same, it's pretty sure that
12401          * we're on a system that ignores getpgrp's first argument.
12402          */
12403         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12404                 exit(0);
12405
12406         child = fork();
12407         if (child < 0)
12408                 exit(1);
12409         else if (child == 0) {
12410                 np = getpid();
12411                 /*
12412                  * If this is Sys V, this will not work; pgrp will be
12413                  * set to np because setpgrp just changes a pgrp to be
12414                  * the same as the pid.
12415                  */
12416                 setpgrp(np, pg1);
12417                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12418                 if (ng == pg1) {
12419                         exit(1);
12420                 } else {
12421                         exit(0);
12422                 }
12423         } else {
12424                 wait(&s);
12425                 exit(s>>8);
12426         }
12427 }
12428
12429 EOF
12430 if { (eval echo configure:12431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12431 then
12432   ac_cv_func_getpgrp_void=yes
12433 else
12434   conftest_rc="$?"
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -fr conftest*
12438   ac_cv_func_getpgrp_void=no
12439 fi
12440 rm -fr conftest*
12441
12442
12443 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12444 if test $ac_cv_func_getpgrp_void = yes; then
12445   { test "$extra_verbose" = "yes" && cat << \EOF
12446     Defining GETPGRP_VOID
12447 EOF
12448 cat >> confdefs.h <<\EOF
12449 #define GETPGRP_VOID 1
12450 EOF
12451 }
12452
12453 fi
12454
12455
12456 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12457 echo "configure:12458: checking for working mmap" >&5
12458 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12459 cat > conftest.$ac_ext <<EOF
12460 #line 12461 "configure"
12461 #include "confdefs.h"
12462 #include <stdio.h>
12463 #include <unistd.h>
12464 #include <fcntl.h>
12465 #include <sys/mman.h>
12466
12467 #ifndef MAP_VARIABLE
12468 #define MAP_VARIABLE 0
12469 #endif
12470
12471 #ifndef MAP_FAILED
12472 #define MAP_FAILED -1
12473 #endif
12474
12475 int main (int argc, char *argv[])
12476 {
12477   int fd = -1;
12478   caddr_t p;
12479 #ifndef MAP_ANONYMOUS
12480   fd = open ("/dev/zero", O_RDWR);
12481   if (fd < 0)
12482     return 1;
12483 #define MAP_ANONYMOUS 0
12484 #endif
12485   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12486            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12487            fd, 0) != (void *) MAP_FAILED)
12488     return 0;
12489   perror ("conftest: mmap failed");
12490   return 1;
12491 }
12492 EOF
12493 if { (eval echo configure:12494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12494 then
12495   have_mmap=yes
12496 else
12497   conftest_rc="$?"
12498   echo "configure: failed program was:" >&5
12499   cat conftest.$ac_ext >&5
12500   rm -fr conftest*
12501   have_mmap=no
12502 fi
12503 rm -fr conftest* ;;
12504 esac
12505 echo "$ac_t""$have_mmap" 1>&6
12506 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12507     Defining HAVE_MMAP
12508 EOF
12509 cat >> confdefs.h <<\EOF
12510 #define HAVE_MMAP 1
12511 EOF
12512 }
12513
12514
12515 case "$opsys" in cygwin*) 
12516         test "$rel_alloc" = "default" && rel_alloc=no ;;
12517 esac
12518 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12519 if test "$rel_alloc $have_mmap" = "default yes"; then
12520   if test "$doug_lea_malloc" = "yes"; then
12521         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12522 echo "configure:12523: checking for M_MMAP_THRESHOLD" >&5
12523     cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 #include <malloc.h>
12527 int main() {
12528
12529 #ifndef M_MMAP_THRESHOLD
12530 #error No M_MMAP_THRESHOLD :-(
12531 !@+$%^&*_)(_ - unlikely to compile...
12532 #endif
12533
12534 ; return 0; }
12535 EOF
12536 if { (eval echo configure:12537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12537   rm -rf conftest*
12538   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12539 else
12540   echo "configure: failed program was:" >&5
12541   cat conftest.$ac_ext >&5
12542   rm -rf conftest*
12543   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12544 fi
12545 rm -f conftest*
12546   else
12547     rel_alloc=yes
12548   fi
12549 fi
12550 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12551     Defining REL_ALLOC
12552 EOF
12553 cat >> confdefs.h <<\EOF
12554 #define REL_ALLOC 1
12555 EOF
12556 }
12557
12558
12559 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12560 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12561 echo "configure:12562: checking for termios.h" >&5
12562
12563 cat > conftest.$ac_ext <<EOF
12564 #line 12565 "configure"
12565 #include "confdefs.h"
12566 #include <termios.h>
12567 EOF
12568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12569 { (eval echo configure:12570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12571 if test -z "$ac_err"; then
12572   rm -rf conftest*
12573   eval "ac_cv_header_$ac_safe=yes"
12574 else
12575   echo "$ac_err" >&5
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -rf conftest*
12579   eval "ac_cv_header_$ac_safe=no"
12580 fi
12581 rm -f conftest*
12582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12583   echo "$ac_t""yes" 1>&6
12584   { test "$extra_verbose" = "yes" && cat << \EOF
12585     Defining HAVE_TERMIOS
12586 EOF
12587 cat >> confdefs.h <<\EOF
12588 #define HAVE_TERMIOS 1
12589 EOF
12590 }
12591
12592   { test "$extra_verbose" = "yes" && cat << \EOF
12593     Defining SIGNALS_VIA_CHARACTERS
12594 EOF
12595 cat >> confdefs.h <<\EOF
12596 #define SIGNALS_VIA_CHARACTERS 1
12597 EOF
12598 }
12599
12600   { test "$extra_verbose" = "yes" && cat << \EOF
12601     Defining NO_TERMIO
12602 EOF
12603 cat >> confdefs.h <<\EOF
12604 #define NO_TERMIO 1
12605 EOF
12606 }
12607
12608 else
12609   echo "$ac_t""no" 1>&6
12610 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12611 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12612 echo "configure:12613: checking for termio.h" >&5
12613
12614 cat > conftest.$ac_ext <<EOF
12615 #line 12616 "configure"
12616 #include "confdefs.h"
12617 #include <termio.h>
12618 EOF
12619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12620 { (eval echo configure:12621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12622 if test -z "$ac_err"; then
12623   rm -rf conftest*
12624   eval "ac_cv_header_$ac_safe=yes"
12625 else
12626   echo "$ac_err" >&5
12627   echo "configure: failed program was:" >&5
12628   cat conftest.$ac_ext >&5
12629   rm -rf conftest*
12630   eval "ac_cv_header_$ac_safe=no"
12631 fi
12632 rm -f conftest*
12633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12634   echo "$ac_t""yes" 1>&6
12635   { test "$extra_verbose" = "yes" && cat << \EOF
12636     Defining HAVE_TERMIO
12637 EOF
12638 cat >> confdefs.h <<\EOF
12639 #define HAVE_TERMIO 1
12640 EOF
12641 }
12642
12643 else
12644   echo "$ac_t""no" 1>&6
12645 fi
12646
12647 fi
12648
12649
12650
12651 echo $ac_n "checking for socket""... $ac_c" 1>&6
12652 echo "configure:12653: checking for socket" >&5
12653
12654 cat > conftest.$ac_ext <<EOF
12655 #line 12656 "configure"
12656 #include "confdefs.h"
12657 /* System header to define __stub macros and hopefully few prototypes,
12658     which can conflict with char socket(); below.  */
12659 #include <assert.h>
12660 /* Override any gcc2 internal prototype to avoid an error.  */
12661 /* We use char because int might match the return type of a gcc2
12662     builtin and then its argument prototype would still apply.  */
12663 char socket();
12664
12665 int main() {
12666
12667 /* The GNU C library defines this for functions which it implements
12668     to always fail with ENOSYS.  Some functions are actually named
12669     something starting with __ and the normal name is an alias.  */
12670 #if defined (__stub_socket) || defined (__stub___socket)
12671 choke me
12672 #else
12673 socket();
12674 #endif
12675
12676 ; return 0; }
12677 EOF
12678 if { (eval echo configure:12679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12679   rm -rf conftest*
12680   eval "ac_cv_func_socket=yes"
12681 else
12682   echo "configure: failed program was:" >&5
12683   cat conftest.$ac_ext >&5
12684   rm -rf conftest*
12685   eval "ac_cv_func_socket=no"
12686 fi
12687 rm -f conftest*
12688
12689 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12690   echo "$ac_t""yes" 1>&6
12691   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12692 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12693 echo "configure:12694: checking for netinet/in.h" >&5
12694
12695 cat > conftest.$ac_ext <<EOF
12696 #line 12697 "configure"
12697 #include "confdefs.h"
12698 #include <netinet/in.h>
12699 EOF
12700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12701 { (eval echo configure:12702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12703 if test -z "$ac_err"; then
12704   rm -rf conftest*
12705   eval "ac_cv_header_$ac_safe=yes"
12706 else
12707   echo "$ac_err" >&5
12708   echo "configure: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   rm -rf conftest*
12711   eval "ac_cv_header_$ac_safe=no"
12712 fi
12713 rm -f conftest*
12714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12715   echo "$ac_t""yes" 1>&6
12716   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12717 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12718 echo "configure:12719: checking for arpa/inet.h" >&5
12719
12720 cat > conftest.$ac_ext <<EOF
12721 #line 12722 "configure"
12722 #include "confdefs.h"
12723 #include <arpa/inet.h>
12724 EOF
12725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12726 { (eval echo configure:12727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12728 if test -z "$ac_err"; then
12729   rm -rf conftest*
12730   eval "ac_cv_header_$ac_safe=yes"
12731 else
12732   echo "$ac_err" >&5
12733   echo "configure: failed program was:" >&5
12734   cat conftest.$ac_ext >&5
12735   rm -rf conftest*
12736   eval "ac_cv_header_$ac_safe=no"
12737 fi
12738 rm -f conftest*
12739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12740   echo "$ac_t""yes" 1>&6
12741   
12742   { test "$extra_verbose" = "yes" && cat << \EOF
12743     Defining HAVE_SOCKETS
12744 EOF
12745 cat >> confdefs.h <<\EOF
12746 #define HAVE_SOCKETS 1
12747 EOF
12748 }
12749
12750       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12751 echo "configure:12752: checking "for sun_len member in struct sockaddr_un"" >&5
12752       cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755
12756 #include <sys/types.h>
12757 #include <sys/socket.h>
12758 #include <sys/un.h>
12759       
12760 int main() {
12761 static struct sockaddr_un x; x.sun_len = 1;
12762 ; return 0; }
12763 EOF
12764 if { (eval echo configure:12765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12765   rm -rf conftest*
12766   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12767     Defining HAVE_SOCKADDR_SUN_LEN
12768 EOF
12769 cat >> confdefs.h <<\EOF
12770 #define HAVE_SOCKADDR_SUN_LEN 1
12771 EOF
12772 }
12773
12774 else
12775   echo "configure: failed program was:" >&5
12776   cat conftest.$ac_ext >&5
12777   rm -rf conftest*
12778   echo "$ac_t""no" 1>&6
12779 fi
12780 rm -f conftest*
12781       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12782 echo "configure:12783: checking "for ip_mreq struct in netinet/in.h"" >&5
12783       cat > conftest.$ac_ext <<EOF
12784 #line 12785 "configure"
12785 #include "confdefs.h"
12786
12787 #include <sys/types.h>
12788 #include <netinet/in.h>
12789       
12790 int main() {
12791 static struct ip_mreq x;
12792 ; return 0; }
12793 EOF
12794 if { (eval echo configure:12795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12795   rm -rf conftest*
12796   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12797     Defining HAVE_MULTICAST
12798 EOF
12799 cat >> confdefs.h <<\EOF
12800 #define HAVE_MULTICAST 1
12801 EOF
12802 }
12803
12804 else
12805   echo "configure: failed program was:" >&5
12806   cat conftest.$ac_ext >&5
12807   rm -rf conftest*
12808   echo "$ac_t""no" 1>&6
12809 fi
12810 rm -f conftest*
12811 else
12812   echo "$ac_t""no" 1>&6
12813 fi
12814
12815 else
12816   echo "$ac_t""no" 1>&6
12817 fi
12818
12819 else
12820   echo "$ac_t""no" 1>&6
12821 fi
12822
12823
12824 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12825 echo "configure:12826: checking for msgget" >&5
12826
12827 cat > conftest.$ac_ext <<EOF
12828 #line 12829 "configure"
12829 #include "confdefs.h"
12830 /* System header to define __stub macros and hopefully few prototypes,
12831     which can conflict with char msgget(); below.  */
12832 #include <assert.h>
12833 /* Override any gcc2 internal prototype to avoid an error.  */
12834 /* We use char because int might match the return type of a gcc2
12835     builtin and then its argument prototype would still apply.  */
12836 char msgget();
12837
12838 int main() {
12839
12840 /* The GNU C library defines this for functions which it implements
12841     to always fail with ENOSYS.  Some functions are actually named
12842     something starting with __ and the normal name is an alias.  */
12843 #if defined (__stub_msgget) || defined (__stub___msgget)
12844 choke me
12845 #else
12846 msgget();
12847 #endif
12848
12849 ; return 0; }
12850 EOF
12851 if { (eval echo configure:12852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12852   rm -rf conftest*
12853   eval "ac_cv_func_msgget=yes"
12854 else
12855   echo "configure: failed program was:" >&5
12856   cat conftest.$ac_ext >&5
12857   rm -rf conftest*
12858   eval "ac_cv_func_msgget=no"
12859 fi
12860 rm -f conftest*
12861
12862 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12863   echo "$ac_t""yes" 1>&6
12864   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12865 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12866 echo "configure:12867: checking for sys/ipc.h" >&5
12867
12868 cat > conftest.$ac_ext <<EOF
12869 #line 12870 "configure"
12870 #include "confdefs.h"
12871 #include <sys/ipc.h>
12872 EOF
12873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12874 { (eval echo configure:12875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12876 if test -z "$ac_err"; then
12877   rm -rf conftest*
12878   eval "ac_cv_header_$ac_safe=yes"
12879 else
12880   echo "$ac_err" >&5
12881   echo "configure: failed program was:" >&5
12882   cat conftest.$ac_ext >&5
12883   rm -rf conftest*
12884   eval "ac_cv_header_$ac_safe=no"
12885 fi
12886 rm -f conftest*
12887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12888   echo "$ac_t""yes" 1>&6
12889   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12890 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12891 echo "configure:12892: checking for sys/msg.h" >&5
12892
12893 cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <sys/msg.h>
12897 EOF
12898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12899 { (eval echo configure:12900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12901 if test -z "$ac_err"; then
12902   rm -rf conftest*
12903   eval "ac_cv_header_$ac_safe=yes"
12904 else
12905   echo "$ac_err" >&5
12906   echo "configure: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   rm -rf conftest*
12909   eval "ac_cv_header_$ac_safe=no"
12910 fi
12911 rm -f conftest*
12912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12913   echo "$ac_t""yes" 1>&6
12914   { test "$extra_verbose" = "yes" && cat << \EOF
12915     Defining HAVE_SYSVIPC
12916 EOF
12917 cat >> confdefs.h <<\EOF
12918 #define HAVE_SYSVIPC 1
12919 EOF
12920 }
12921
12922 else
12923   echo "$ac_t""no" 1>&6
12924 fi
12925
12926 else
12927   echo "$ac_t""no" 1>&6
12928 fi
12929
12930 else
12931   echo "$ac_t""no" 1>&6
12932 fi
12933
12934
12935 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12936 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12937 echo "configure:12938: checking for dirent.h" >&5
12938
12939 cat > conftest.$ac_ext <<EOF
12940 #line 12941 "configure"
12941 #include "confdefs.h"
12942 #include <dirent.h>
12943 EOF
12944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12945 { (eval echo configure:12946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12947 if test -z "$ac_err"; then
12948   rm -rf conftest*
12949   eval "ac_cv_header_$ac_safe=yes"
12950 else
12951   echo "$ac_err" >&5
12952   echo "configure: failed program was:" >&5
12953   cat conftest.$ac_ext >&5
12954   rm -rf conftest*
12955   eval "ac_cv_header_$ac_safe=no"
12956 fi
12957 rm -f conftest*
12958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12959   echo "$ac_t""yes" 1>&6
12960   { test "$extra_verbose" = "yes" && cat << \EOF
12961     Defining SYSV_SYSTEM_DIR
12962 EOF
12963 cat >> confdefs.h <<\EOF
12964 #define SYSV_SYSTEM_DIR 1
12965 EOF
12966 }
12967
12968 else
12969   echo "$ac_t""no" 1>&6
12970 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12971 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12972 echo "configure:12973: checking for sys/dir.h" >&5
12973
12974 cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 #include <sys/dir.h>
12978 EOF
12979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12980 { (eval echo configure:12981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12982 if test -z "$ac_err"; then
12983   rm -rf conftest*
12984   eval "ac_cv_header_$ac_safe=yes"
12985 else
12986   echo "$ac_err" >&5
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -rf conftest*
12990   eval "ac_cv_header_$ac_safe=no"
12991 fi
12992 rm -f conftest*
12993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12994   echo "$ac_t""yes" 1>&6
12995   :
12996 else
12997   echo "$ac_t""no" 1>&6
12998 { test "$extra_verbose" = "yes" && cat << \EOF
12999     Defining NONSYSTEM_DIR_LIBRARY
13000 EOF
13001 cat >> confdefs.h <<\EOF
13002 #define NONSYSTEM_DIR_LIBRARY 1
13003 EOF
13004 }
13005
13006 fi
13007
13008 fi
13009
13010
13011 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13012 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13013 echo "configure:13014: checking for nlist.h" >&5
13014
13015 cat > conftest.$ac_ext <<EOF
13016 #line 13017 "configure"
13017 #include "confdefs.h"
13018 #include <nlist.h>
13019 EOF
13020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13021 { (eval echo configure:13022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13023 if test -z "$ac_err"; then
13024   rm -rf conftest*
13025   eval "ac_cv_header_$ac_safe=yes"
13026 else
13027   echo "$ac_err" >&5
13028   echo "configure: failed program was:" >&5
13029   cat conftest.$ac_ext >&5
13030   rm -rf conftest*
13031   eval "ac_cv_header_$ac_safe=no"
13032 fi
13033 rm -f conftest*
13034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13035   echo "$ac_t""yes" 1>&6
13036   { test "$extra_verbose" = "yes" && cat << \EOF
13037     Defining NLIST_STRUCT
13038 EOF
13039 cat >> confdefs.h <<\EOF
13040 #define NLIST_STRUCT 1
13041 EOF
13042 }
13043
13044 else
13045   echo "$ac_t""no" 1>&6
13046 fi
13047
13048
13049
13050 echo "checking "for sound support"" 1>&6
13051 echo "configure:13052: checking "for sound support"" >&5
13052 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13053
13054 if test "$with_native_sound" != "no"; then
13055     if test -n "$native_sound_lib"; then
13056     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13057 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13058 echo "configure:13059: checking for multimedia/audio_device.h" >&5
13059
13060 cat > conftest.$ac_ext <<EOF
13061 #line 13062 "configure"
13062 #include "confdefs.h"
13063 #include <multimedia/audio_device.h>
13064 EOF
13065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13066 { (eval echo configure:13067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13068 if test -z "$ac_err"; then
13069   rm -rf conftest*
13070   eval "ac_cv_header_$ac_safe=yes"
13071 else
13072   echo "$ac_err" >&5
13073   echo "configure: failed program was:" >&5
13074   cat conftest.$ac_ext >&5
13075   rm -rf conftest*
13076   eval "ac_cv_header_$ac_safe=no"
13077 fi
13078 rm -f conftest*
13079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13080   echo "$ac_t""yes" 1>&6
13081   sound_found=yes sound_cflags=""
13082       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13083    echo "    xemacs will be linked with \"sunplay.o\""
13084  fi
13085 else
13086   echo "$ac_t""no" 1>&6
13087 fi
13088
13089   fi
13090
13091     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13092     sound_found=yes
13093     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13094    echo "    xemacs will be linked with \"sunplay.o\""
13095  fi
13096     if test -d "/usr/demo/SOUND/include"
13097       then sound_cflags="-I/usr/demo/SOUND/include"
13098       else sound_cflags="-I/usr/demo/SOUND"
13099     fi
13100     if test -z "$native_sound_lib" ; then
13101       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13102         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13103         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13104       fi
13105     fi
13106   fi
13107
13108     if test -z "$sound_found"; then
13109     case "$canonical" in
13110     *-sgi-* )
13111       if test -z "$native_sound_lib"; then
13112         
13113 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13114 echo "configure:13115: checking for ALopenport in -laudio" >&5
13115 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13116
13117 xe_check_libs=" -laudio "
13118 cat > conftest.$ac_ext <<EOF
13119 #line 13120 "configure"
13120 #include "confdefs.h"
13121 /* Override any gcc2 internal prototype to avoid an error.  */
13122 /* We use char because int might match the return type of a gcc2
13123     builtin and then its argument prototype would still apply.  */
13124 char ALopenport();
13125
13126 int main() {
13127 ALopenport()
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13131   rm -rf conftest*
13132   eval "ac_cv_lib_$ac_lib_var=yes"
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   eval "ac_cv_lib_$ac_lib_var=no"
13138 fi
13139 rm -f conftest*
13140 xe_check_libs=""
13141
13142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13143   echo "$ac_t""yes" 1>&6
13144   native_sound_lib="-laudio"
13145 else
13146   echo "$ac_t""no" 1>&6
13147 fi
13148
13149
13150       fi
13151       if test -n "$native_sound_lib"; then
13152         sound_found=yes sound_cflags=""
13153         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13154    echo "    xemacs will be linked with \"sgiplay.o\""
13155  fi
13156       fi ;;
13157     hppa*-hp-hpux* )
13158       if test -z "$native_sound_lib"; then
13159         
13160 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13161 echo "configure:13162: checking for AOpenAudio in -lAlib" >&5
13162 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13163
13164 xe_check_libs=" -lAlib "
13165 cat > conftest.$ac_ext <<EOF
13166 #line 13167 "configure"
13167 #include "confdefs.h"
13168 /* Override any gcc2 internal prototype to avoid an error.  */
13169 /* We use char because int might match the return type of a gcc2
13170     builtin and then its argument prototype would still apply.  */
13171 char AOpenAudio();
13172
13173 int main() {
13174 AOpenAudio()
13175 ; return 0; }
13176 EOF
13177 if { (eval echo configure:13178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13178   rm -rf conftest*
13179   eval "ac_cv_lib_$ac_lib_var=yes"
13180 else
13181   echo "configure: failed program was:" >&5
13182   cat conftest.$ac_ext >&5
13183   rm -rf conftest*
13184   eval "ac_cv_lib_$ac_lib_var=no"
13185 fi
13186 rm -f conftest*
13187 xe_check_libs=""
13188
13189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13190   echo "$ac_t""yes" 1>&6
13191   native_sound_lib="-lAlib"
13192 else
13193   echo "$ac_t""no" 1>&6
13194 fi
13195
13196
13197       fi
13198       if test -n "$native_sound_lib"; then
13199         sound_found=yes
13200         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13201    echo "    xemacs will be linked with \"hpplay.o\""
13202  fi
13203         if test "$GCC" = "yes" # Kludge city
13204           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13205           else sound_cflags="+e -I/usr/audio/examples"
13206         fi
13207       fi ;;
13208     esac
13209   fi
13210
13211     if test -z "$sound_found"; then
13212     if test "$with_msw" = "yes"; then
13213     sound_found=yes
13214     native_sound_lib=
13215     fi
13216   fi
13217
13218     if test -z "$sound_found"; then
13219     for dir in "machine" "sys" "linux"; do
13220       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13221 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13222 echo "configure:13223: checking for ${dir}/soundcard.h" >&5
13223
13224 cat > conftest.$ac_ext <<EOF
13225 #line 13226 "configure"
13226 #include "confdefs.h"
13227 #include <${dir}/soundcard.h>
13228 EOF
13229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13230 { (eval echo configure:13231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13232 if test -z "$ac_err"; then
13233   rm -rf conftest*
13234   eval "ac_cv_header_$ac_safe=yes"
13235 else
13236   echo "$ac_err" >&5
13237   echo "configure: failed program was:" >&5
13238   cat conftest.$ac_ext >&5
13239   rm -rf conftest*
13240   eval "ac_cv_header_$ac_safe=no"
13241 fi
13242 rm -f conftest*
13243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13244   echo "$ac_t""yes" 1>&6
13245   sound_found=yes
13246        need_miscplay=yes
13247         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13248    echo "    xemacs will be linked with \"linuxplay.o\""
13249  fi
13250         { test "$extra_verbose" = "yes" && cat << EOF
13251     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13252 EOF
13253 cat >> confdefs.h <<EOF
13254 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13255 EOF
13256 }
13257
13258         break
13259 else
13260   echo "$ac_t""no" 1>&6
13261 fi
13262
13263     done
13264   fi
13265
13266   test "$sound_found" = "yes" && with_native_sound=yes
13267 fi
13268
13269 if test "$with_native_sound" = "yes"; then
13270   { test "$extra_verbose" = "yes" && cat << \EOF
13271     Defining HAVE_NATIVE_SOUND
13272 EOF
13273 cat >> confdefs.h <<\EOF
13274 #define HAVE_NATIVE_SOUND 1
13275 EOF
13276 }
13277
13278   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13279 fi
13280
13281 if test "$with_nas_sound" != "no"; then
13282   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13283 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13284 echo "configure:13285: checking for audio/audiolib.h" >&5
13285
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 #include <audio/audiolib.h>
13290 EOF
13291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13292 { (eval echo configure:13293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13294 if test -z "$ac_err"; then
13295   rm -rf conftest*
13296   eval "ac_cv_header_$ac_safe=yes"
13297 else
13298   echo "$ac_err" >&5
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -rf conftest*
13302   eval "ac_cv_header_$ac_safe=no"
13303 fi
13304 rm -f conftest*
13305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13306   echo "$ac_t""yes" 1>&6
13307   
13308     
13309 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13310 echo "configure:13311: checking for AuOpenServer in -laudio" >&5
13311 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13312
13313 xe_check_libs=" -laudio "
13314 cat > conftest.$ac_ext <<EOF
13315 #line 13316 "configure"
13316 #include "confdefs.h"
13317 /* Override any gcc2 internal prototype to avoid an error.  */
13318 /* We use char because int might match the return type of a gcc2
13319     builtin and then its argument prototype would still apply.  */
13320 char AuOpenServer();
13321
13322 int main() {
13323 AuOpenServer()
13324 ; return 0; }
13325 EOF
13326 if { (eval echo configure:13327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13327   rm -rf conftest*
13328   eval "ac_cv_lib_$ac_lib_var=yes"
13329 else
13330   echo "configure: failed program was:" >&5
13331   cat conftest.$ac_ext >&5
13332   rm -rf conftest*
13333   eval "ac_cv_lib_$ac_lib_var=no"
13334 fi
13335 rm -f conftest*
13336 xe_check_libs=""
13337
13338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13339   echo "$ac_t""yes" 1>&6
13340   have_nas_sound=yes
13341 else
13342   echo "$ac_t""no" 1>&6
13343 fi
13344
13345
13346 else
13347   echo "$ac_t""no" 1>&6
13348 fi
13349
13350   if test "$have_nas_sound" = "yes"; then
13351     with_nas_sound=yes
13352     { test "$extra_verbose" = "yes" && cat << \EOF
13353     Defining HAVE_NAS_SOUND
13354 EOF
13355 cat >> confdefs.h <<\EOF
13356 #define HAVE_NAS_SOUND 1
13357 EOF
13358 }
13359
13360     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13361    echo "    xemacs will be linked with \"nas.o\""
13362  fi
13363     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13364             cat > conftest.$ac_ext <<EOF
13365 #line 13366 "configure"
13366 #include "confdefs.h"
13367 #include <audio/Xtutil.h>
13368 EOF
13369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13370   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13371   :
13372 else
13373   rm -rf conftest*
13374   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13375     Defining NAS_NO_ERROR_JUMP
13376 EOF
13377 cat >> confdefs.h <<\EOF
13378 #define NAS_NO_ERROR_JUMP 1
13379 EOF
13380 }
13381
13382 fi
13383 rm -f conftest*
13384
13385   else
13386     test "$with_nas_sound" = "yes" && \
13387       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13388     with_nas_sound=no
13389   fi
13390 fi
13391
13392 if test "$with_esd_sound" != "no"; then
13393   # Extract the first word of "esd-config", so it can be a program name with args.
13394 set dummy esd-config; ac_word=$2
13395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13396 echo "configure:13397: checking for $ac_word" >&5
13397
13398 if test -n "$have_esd_config"; then
13399   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13400 else
13401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13402   ac_dummy="$PATH"
13403   for ac_dir in $ac_dummy; do
13404     test -z "$ac_dir" && ac_dir=.
13405     if test -f $ac_dir/$ac_word; then
13406       ac_cv_prog_have_esd_config="yes"
13407       break
13408     fi
13409   done
13410   IFS="$ac_save_ifs"
13411   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13412 fi
13413 have_esd_config="$ac_cv_prog_have_esd_config"
13414 if test -n "$have_esd_config"; then
13415   echo "$ac_t""$have_esd_config" 1>&6
13416 else
13417   echo "$ac_t""no" 1>&6
13418 fi
13419
13420   if test "$have_esd_config" = "yes"; then
13421     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13422     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
13423     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13424     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13425 echo "configure:13426: checking for esd_play_stream" >&5
13426
13427 cat > conftest.$ac_ext <<EOF
13428 #line 13429 "configure"
13429 #include "confdefs.h"
13430 /* System header to define __stub macros and hopefully few prototypes,
13431     which can conflict with char esd_play_stream(); below.  */
13432 #include <assert.h>
13433 /* Override any gcc2 internal prototype to avoid an error.  */
13434 /* We use char because int might match the return type of a gcc2
13435     builtin and then its argument prototype would still apply.  */
13436 char esd_play_stream();
13437
13438 int main() {
13439
13440 /* The GNU C library defines this for functions which it implements
13441     to always fail with ENOSYS.  Some functions are actually named
13442     something starting with __ and the normal name is an alias.  */
13443 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13444 choke me
13445 #else
13446 esd_play_stream();
13447 #endif
13448
13449 ; return 0; }
13450 EOF
13451 if { (eval echo configure:13452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13452   rm -rf conftest*
13453   eval "ac_cv_func_esd_play_stream=yes"
13454 else
13455   echo "configure: failed program was:" >&5
13456   cat conftest.$ac_ext >&5
13457   rm -rf conftest*
13458   eval "ac_cv_func_esd_play_stream=no"
13459 fi
13460 rm -f conftest*
13461
13462 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13463   echo "$ac_t""yes" 1>&6
13464   have_esd_sound=yes
13465 else
13466   echo "$ac_t""no" 1>&6
13467 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13468 fi
13469
13470   fi
13471
13472   if test "$have_esd_sound" = "yes"; then
13473     with_esd_sound=yes
13474     need_miscplay=yes
13475     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13476    echo "    xemacs will be linked with \"esd.o\""
13477  fi
13478     { test "$extra_verbose" = "yes" && cat << \EOF
13479     Defining HAVE_ESD_SOUND
13480 EOF
13481 cat >> confdefs.h <<\EOF
13482 #define HAVE_ESD_SOUND 1
13483 EOF
13484 }
13485
13486   else
13487     test "$with_esd_sound" = "yes" && \
13488       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13489     with_esd_sound=no
13490   fi
13491 fi
13492
13493 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13494    echo "    xemacs will be linked with \"miscplay.o\""
13495  fi
13496
13497
13498 test -z "$with_tty" && with_tty=yes
13499
13500 if test "$with_tty" = "yes"  ; then
13501   echo "checking for TTY-related features" 1>&6
13502 echo "configure:13503: checking for TTY-related features" >&5
13503   { test "$extra_verbose" = "yes" && cat << \EOF
13504     Defining HAVE_TTY
13505 EOF
13506 cat >> confdefs.h <<\EOF
13507 #define HAVE_TTY 1
13508 EOF
13509 }
13510
13511   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
13512    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\""
13513  fi
13514
13515     if test -z "$with_ncurses"; then
13516     
13517 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13518 echo "configure:13519: checking for tgetent in -lncurses" >&5
13519 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13520
13521 xe_check_libs=" -lncurses "
13522 cat > conftest.$ac_ext <<EOF
13523 #line 13524 "configure"
13524 #include "confdefs.h"
13525 /* Override any gcc2 internal prototype to avoid an error.  */
13526 /* We use char because int might match the return type of a gcc2
13527     builtin and then its argument prototype would still apply.  */
13528 char tgetent();
13529
13530 int main() {
13531 tgetent()
13532 ; return 0; }
13533 EOF
13534 if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13535   rm -rf conftest*
13536   eval "ac_cv_lib_$ac_lib_var=yes"
13537 else
13538   echo "configure: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   rm -rf conftest*
13541   eval "ac_cv_lib_$ac_lib_var=no"
13542 fi
13543 rm -f conftest*
13544 xe_check_libs=""
13545
13546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13547   echo "$ac_t""yes" 1>&6
13548   with_ncurses=yes
13549 else
13550   echo "$ac_t""no" 1>&6
13551 with_ncurses=no
13552 fi
13553
13554
13555   fi
13556   if test "$with_ncurses" = "yes"; then
13557     { test "$extra_verbose" = "yes" && cat << \EOF
13558     Defining HAVE_NCURSES
13559 EOF
13560 cat >> confdefs.h <<\EOF
13561 #define HAVE_NCURSES 1
13562 EOF
13563 }
13564
13565     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13566 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13567 echo "configure:13568: checking for ncurses/curses.h" >&5
13568
13569 cat > conftest.$ac_ext <<EOF
13570 #line 13571 "configure"
13571 #include "confdefs.h"
13572 #include <ncurses/curses.h>
13573 EOF
13574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13575 { (eval echo configure:13576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13577 if test -z "$ac_err"; then
13578   rm -rf conftest*
13579   eval "ac_cv_header_$ac_safe=yes"
13580 else
13581   echo "$ac_err" >&5
13582   echo "configure: failed program was:" >&5
13583   cat conftest.$ac_ext >&5
13584   rm -rf conftest*
13585   eval "ac_cv_header_$ac_safe=no"
13586 fi
13587 rm -f conftest*
13588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13589   echo "$ac_t""yes" 1>&6
13590   curses_h_file=ncurses/curses.h
13591 else
13592   echo "$ac_t""no" 1>&6
13593 fi
13594
13595     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13596 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13597 echo "configure:13598: checking for ncurses/term.h" >&5
13598
13599 cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 #include <ncurses/term.h>
13603 EOF
13604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13605 { (eval echo configure:13606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13607 if test -z "$ac_err"; then
13608   rm -rf conftest*
13609   eval "ac_cv_header_$ac_safe=yes"
13610 else
13611   echo "$ac_err" >&5
13612   echo "configure: failed program was:" >&5
13613   cat conftest.$ac_ext >&5
13614   rm -rf conftest*
13615   eval "ac_cv_header_$ac_safe=no"
13616 fi
13617 rm -f conftest*
13618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13619   echo "$ac_t""yes" 1>&6
13620   term_h_file=ncurses/term.h
13621 else
13622   echo "$ac_t""no" 1>&6
13623 fi
13624
13625     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13626    echo "    xemacs will be linked with \"terminfo.o\""
13627  fi
13628     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13629
13630     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13631                         save_c_switch_site="$c_switch_site"
13632       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13633       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13634 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13635 echo "configure:13636: checking for ncurses/curses.h" >&5
13636
13637 cat > conftest.$ac_ext <<EOF
13638 #line 13639 "configure"
13639 #include "confdefs.h"
13640 #include <ncurses/curses.h>
13641 EOF
13642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13643 { (eval echo configure:13644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13645 if test -z "$ac_err"; then
13646   rm -rf conftest*
13647   eval "ac_cv_header_$ac_safe=yes"
13648 else
13649   echo "$ac_err" >&5
13650   echo "configure: failed program was:" >&5
13651   cat conftest.$ac_ext >&5
13652   rm -rf conftest*
13653   eval "ac_cv_header_$ac_safe=no"
13654 fi
13655 rm -f conftest*
13656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13657   echo "$ac_t""yes" 1>&6
13658   curses_h_file=ncurses/curses.h
13659 else
13660   echo "$ac_t""no" 1>&6
13661 fi
13662
13663       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13664         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13665         else c_switch_site="$save_c_switch_site"
13666       fi
13667     fi
13668   else         if test "$have_terminfo" = "yes"; then
13669       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13670    echo "    xemacs will be linked with \"terminfo.o\""
13671  fi
13672       if test -n "$libs_termcap"; then
13673         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13674       else
13675         for lib in curses termlib termcap; do
13676           
13677 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13678 echo "configure:13679: checking for tgetent in -l$lib" >&5
13679 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13680
13681 xe_check_libs=" -l$lib "
13682 cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 /* Override any gcc2 internal prototype to avoid an error.  */
13686 /* We use char because int might match the return type of a gcc2
13687     builtin and then its argument prototype would still apply.  */
13688 char tgetent();
13689
13690 int main() {
13691 tgetent()
13692 ; return 0; }
13693 EOF
13694 if { (eval echo configure:13695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=yes"
13697 else
13698   echo "configure: failed program was:" >&5
13699   cat conftest.$ac_ext >&5
13700   rm -rf conftest*
13701   eval "ac_cv_lib_$ac_lib_var=no"
13702 fi
13703 rm -f conftest*
13704 xe_check_libs=""
13705
13706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13707   echo "$ac_t""yes" 1>&6
13708   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13709 else
13710   echo "$ac_t""no" 1>&6
13711 fi
13712
13713
13714         done
13715       fi
13716     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13717                                 
13718 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13719 echo "configure:13720: checking for tgoto in -ltermcap" >&5
13720 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13721
13722 xe_check_libs=" -ltermcap "
13723 cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 /* Override any gcc2 internal prototype to avoid an error.  */
13727 /* We use char because int might match the return type of a gcc2
13728     builtin and then its argument prototype would still apply.  */
13729 char tgoto();
13730
13731 int main() {
13732 tgoto()
13733 ; return 0; }
13734 EOF
13735 if { (eval echo configure:13736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13736   rm -rf conftest*
13737   eval "ac_cv_lib_$ac_lib_var=yes"
13738 else
13739   echo "configure: failed program was:" >&5
13740   cat conftest.$ac_ext >&5
13741   rm -rf conftest*
13742   eval "ac_cv_lib_$ac_lib_var=no"
13743 fi
13744 rm -f conftest*
13745 xe_check_libs=""
13746
13747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13748   echo "$ac_t""yes" 1>&6
13749     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13750     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13751   { test "$extra_verbose" = "yes" && cat << EOF
13752     Defining $ac_tr_lib
13753 EOF
13754 cat >> confdefs.h <<EOF
13755 #define $ac_tr_lib 1
13756 EOF
13757 }
13758
13759   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13760
13761 else
13762   echo "$ac_t""no" 1>&6
13763 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13764    echo "    xemacs will be linked with \"tparam.o\""
13765  fi
13766 fi
13767
13768
13769       else
13770         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13771    echo "    xemacs will be linked with \"tparam.o\""
13772  fi
13773       fi
13774                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13775       if test -n "$libs_termcap"; then
13776         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13777       else
13778         
13779 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13780 echo "configure:13781: checking for tgetent in -lcurses" >&5
13781 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13782
13783 xe_check_libs=" -lcurses "
13784 cat > conftest.$ac_ext <<EOF
13785 #line 13786 "configure"
13786 #include "confdefs.h"
13787 /* Override any gcc2 internal prototype to avoid an error.  */
13788 /* We use char because int might match the return type of a gcc2
13789     builtin and then its argument prototype would still apply.  */
13790 char tgetent();
13791
13792 int main() {
13793 tgetent()
13794 ; return 0; }
13795 EOF
13796 if { (eval echo configure:13797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13797   rm -rf conftest*
13798   eval "ac_cv_lib_$ac_lib_var=yes"
13799 else
13800   echo "configure: failed program was:" >&5
13801   cat conftest.$ac_ext >&5
13802   rm -rf conftest*
13803   eval "ac_cv_lib_$ac_lib_var=no"
13804 fi
13805 rm -f conftest*
13806 xe_check_libs=""
13807
13808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13809   echo "$ac_t""yes" 1>&6
13810   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13811 else
13812   echo "$ac_t""no" 1>&6
13813 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13814 echo "configure:13815: checking for tgetent in -ltermcap" >&5
13815 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13816
13817 xe_check_libs=" -ltermcap "
13818 cat > conftest.$ac_ext <<EOF
13819 #line 13820 "configure"
13820 #include "confdefs.h"
13821 /* Override any gcc2 internal prototype to avoid an error.  */
13822 /* We use char because int might match the return type of a gcc2
13823     builtin and then its argument prototype would still apply.  */
13824 char tgetent();
13825
13826 int main() {
13827 tgetent()
13828 ; return 0; }
13829 EOF
13830 if { (eval echo configure:13831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13831   rm -rf conftest*
13832   eval "ac_cv_lib_$ac_lib_var=yes"
13833 else
13834   echo "configure: failed program was:" >&5
13835   cat conftest.$ac_ext >&5
13836   rm -rf conftest*
13837   eval "ac_cv_lib_$ac_lib_var=no"
13838 fi
13839 rm -f conftest*
13840 xe_check_libs=""
13841
13842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13843   echo "$ac_t""yes" 1>&6
13844   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13845 else
13846   echo "$ac_t""no" 1>&6
13847 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13848    echo "    xemacs will be linked with \"termcap.o\""
13849  fi
13850 fi
13851
13852
13853 fi
13854
13855
13856       fi
13857     fi
13858   fi
13859   { test "$extra_verbose" = "yes" && cat << EOF
13860     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13861 EOF
13862 cat >> confdefs.h <<EOF
13863 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13864 EOF
13865 }
13866
13867   { test "$extra_verbose" = "yes" && cat << EOF
13868     Defining TERM_H_FILE = "${term_h_file-term.h}"
13869 EOF
13870 cat >> confdefs.h <<EOF
13871 #define TERM_H_FILE "${term_h_file-term.h}"
13872 EOF
13873 }
13874
13875
13876     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13877 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13878 echo "configure:13879: checking for gpm.h" >&5
13879
13880 cat > conftest.$ac_ext <<EOF
13881 #line 13882 "configure"
13882 #include "confdefs.h"
13883 #include <gpm.h>
13884 EOF
13885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13886 { (eval echo configure:13887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13888 if test -z "$ac_err"; then
13889   rm -rf conftest*
13890   eval "ac_cv_header_$ac_safe=yes"
13891 else
13892   echo "$ac_err" >&5
13893   echo "configure: failed program was:" >&5
13894   cat conftest.$ac_ext >&5
13895   rm -rf conftest*
13896   eval "ac_cv_header_$ac_safe=no"
13897 fi
13898 rm -f conftest*
13899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13900   echo "$ac_t""yes" 1>&6
13901   :
13902 else
13903   echo "$ac_t""no" 1>&6
13904 with_gpm=no
13905 fi
13906  }
13907   test -z "$with_gpm" && { 
13908 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13909 echo "configure:13910: checking for Gpm_Open in -lgpm" >&5
13910 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13911
13912 xe_check_libs=" -lgpm "
13913 cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 /* Override any gcc2 internal prototype to avoid an error.  */
13917 /* We use char because int might match the return type of a gcc2
13918     builtin and then its argument prototype would still apply.  */
13919 char Gpm_Open();
13920
13921 int main() {
13922 Gpm_Open()
13923 ; return 0; }
13924 EOF
13925 if { (eval echo configure:13926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13926   rm -rf conftest*
13927   eval "ac_cv_lib_$ac_lib_var=yes"
13928 else
13929   echo "configure: failed program was:" >&5
13930   cat conftest.$ac_ext >&5
13931   rm -rf conftest*
13932   eval "ac_cv_lib_$ac_lib_var=no"
13933 fi
13934 rm -f conftest*
13935 xe_check_libs=""
13936
13937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13938   echo "$ac_t""yes" 1>&6
13939   with_gpm=yes
13940 else
13941   echo "$ac_t""no" 1>&6
13942 with_gpm=no
13943 fi
13944
13945  }
13946   if test "$with_gpm" = "yes"; then
13947     { test "$extra_verbose" = "yes" && cat << \EOF
13948     Defining HAVE_GPM
13949 EOF
13950 cat >> confdefs.h <<\EOF
13951 #define HAVE_GPM 1
13952 EOF
13953 }
13954
13955     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13956    echo "    xemacs will be linked with \"gpmevent.o\""
13957  fi
13958     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13959   fi
13960
13961 else   for feature in ncurses gpm; do
13962     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13963       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13964     fi
13965     eval "with_${feature}=no"
13966   done
13967 fi 
13968 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
13969    echo "    xemacs will be linked with \"event-unixoid.o\""
13970  fi
13971
13972
13973 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13974   != "no no no" && echo "checking for database support" 1>&6
13975 echo "configure:13976: checking for database support" >&5
13976
13977 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13978   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13979 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13980 echo "configure:13981: checking for ndbm.h" >&5
13981
13982 cat > conftest.$ac_ext <<EOF
13983 #line 13984 "configure"
13984 #include "confdefs.h"
13985 #include <ndbm.h>
13986 EOF
13987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13988 { (eval echo configure:13989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13990 if test -z "$ac_err"; then
13991   rm -rf conftest*
13992   eval "ac_cv_header_$ac_safe=yes"
13993 else
13994   echo "$ac_err" >&5
13995   echo "configure: failed program was:" >&5
13996   cat conftest.$ac_ext >&5
13997   rm -rf conftest*
13998   eval "ac_cv_header_$ac_safe=no"
13999 fi
14000 rm -f conftest*
14001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14002   echo "$ac_t""yes" 1>&6
14003   :
14004 else
14005   echo "$ac_t""no" 1>&6
14006
14007     test "$with_database_gdbm" = "yes" -o \
14008          "$with_database_dbm"  = "yes" && \
14009       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14010     with_database_gdbm=no with_database_dbm=no
14011 fi
14012
14013 fi
14014
14015 if test "$with_database_gdbm" != "no"; then
14016   
14017 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14018 echo "configure:14019: checking for dbm_open in -lgdbm" >&5
14019 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14020
14021 xe_check_libs=" -lgdbm "
14022 cat > conftest.$ac_ext <<EOF
14023 #line 14024 "configure"
14024 #include "confdefs.h"
14025 /* Override any gcc2 internal prototype to avoid an error.  */
14026 /* We use char because int might match the return type of a gcc2
14027     builtin and then its argument prototype would still apply.  */
14028 char dbm_open();
14029
14030 int main() {
14031 dbm_open()
14032 ; return 0; }
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14035   rm -rf conftest*
14036   eval "ac_cv_lib_$ac_lib_var=yes"
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -rf conftest*
14041   eval "ac_cv_lib_$ac_lib_var=no"
14042 fi
14043 rm -f conftest*
14044 xe_check_libs=""
14045
14046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14047   echo "$ac_t""yes" 1>&6
14048   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14049 else
14050   echo "$ac_t""no" 1>&6
14051 if test "$with_database_gdbm" = "yes"; then
14052      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14053    fi
14054    with_database_gdbm=no
14055 fi
14056
14057
14058 fi
14059
14060 if test "$with_database_dbm" != "no"; then
14061   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14062 echo "configure:14063: checking for dbm_open" >&5
14063
14064 cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067 /* System header to define __stub macros and hopefully few prototypes,
14068     which can conflict with char dbm_open(); below.  */
14069 #include <assert.h>
14070 /* Override any gcc2 internal prototype to avoid an error.  */
14071 /* We use char because int might match the return type of a gcc2
14072     builtin and then its argument prototype would still apply.  */
14073 char dbm_open();
14074
14075 int main() {
14076
14077 /* The GNU C library defines this for functions which it implements
14078     to always fail with ENOSYS.  Some functions are actually named
14079     something starting with __ and the normal name is an alias.  */
14080 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14081 choke me
14082 #else
14083 dbm_open();
14084 #endif
14085
14086 ; return 0; }
14087 EOF
14088 if { (eval echo configure:14089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14089   rm -rf conftest*
14090   eval "ac_cv_func_dbm_open=yes"
14091 else
14092   echo "configure: failed program was:" >&5
14093   cat conftest.$ac_ext >&5
14094   rm -rf conftest*
14095   eval "ac_cv_func_dbm_open=no"
14096 fi
14097 rm -f conftest*
14098
14099 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14100   echo "$ac_t""yes" 1>&6
14101   with_database_dbm=yes libdbm=
14102 else
14103   echo "$ac_t""no" 1>&6
14104
14105     
14106 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14107 echo "configure:14108: checking for dbm_open in -ldbm" >&5
14108 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14109
14110 xe_check_libs=" -ldbm "
14111 cat > conftest.$ac_ext <<EOF
14112 #line 14113 "configure"
14113 #include "confdefs.h"
14114 /* Override any gcc2 internal prototype to avoid an error.  */
14115 /* We use char because int might match the return type of a gcc2
14116     builtin and then its argument prototype would still apply.  */
14117 char dbm_open();
14118
14119 int main() {
14120 dbm_open()
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14124   rm -rf conftest*
14125   eval "ac_cv_lib_$ac_lib_var=yes"
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   eval "ac_cv_lib_$ac_lib_var=no"
14131 fi
14132 rm -f conftest*
14133 xe_check_libs=""
14134
14135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14136   echo "$ac_t""yes" 1>&6
14137   with_database_dbm=yes libdbm=-ldbm
14138 else
14139   echo "$ac_t""no" 1>&6
14140 test "$with_database_dbm" = "yes" && \
14141         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14142       with_database_dbm=no
14143 fi
14144
14145
14146 fi
14147
14148 fi
14149
14150 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14151 test "$with_database_gdbm" = "yes" -o \
14152      "$with_database_dbm"  = "yes" && \
14153   { test "$extra_verbose" = "yes" && cat << \EOF
14154     Defining HAVE_DBM
14155 EOF
14156 cat >> confdefs.h <<\EOF
14157 #define HAVE_DBM 1
14158 EOF
14159 }
14160
14161
14162 if test "$with_database_berkdb" != "no"; then
14163   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14164 echo "configure:14165: checking for Berkeley db.h" >&5
14165   for header in "db/db.h" "db.h"; do
14166     cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169
14170 #include <stdlib.h>
14171 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14172 #ifdef HAVE_INTTYPES_H
14173 #define __BIT_TYPES_DEFINED__
14174 #include <inttypes.h>
14175 typedef uint8_t  u_int8_t;
14176 typedef uint16_t u_int16_t;
14177 typedef uint32_t u_int32_t;
14178 #ifdef WE_DONT_NEED_QUADS
14179 typedef uint64_t u_int64_t;
14180 #endif
14181 #endif
14182 #endif
14183 #include <$header>
14184
14185 int main() {
14186
14187 ; return 0; }
14188 EOF
14189 if { (eval echo configure:14190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14190   rm -rf conftest*
14191   db_h_file="$header"; break
14192 else
14193   echo "configure: failed program was:" >&5
14194   cat conftest.$ac_ext >&5
14195 fi
14196 rm -f conftest*
14197   done
14198   if test -z "$db_h_file"
14199   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14200   else echo "$ac_t""$db_h_file" 1>&6
14201   fi
14202
14203   if test "$with_database_berkdb" != "no"; then
14204     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14205 echo "configure:14206: checking for Berkeley DB version" >&5
14206     cat > conftest.$ac_ext <<EOF
14207 #line 14208 "configure"
14208 #include "confdefs.h"
14209 #include <$db_h_file>
14210 #if DB_VERSION_MAJOR > 1
14211 yes
14212 #endif
14213
14214 EOF
14215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14216   egrep "yes" >/dev/null 2>&1; then
14217   rm -rf conftest*
14218   cat > conftest.$ac_ext <<EOF
14219 #line 14220 "configure"
14220 #include "confdefs.h"
14221 #include <$db_h_file>
14222 #if DB_VERSION_MAJOR > 2
14223 yes
14224 #endif
14225
14226 EOF
14227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14228   egrep "yes" >/dev/null 2>&1; then
14229   rm -rf conftest*
14230   echo "$ac_t""3" 1>&6; dbfunc=db_create
14231 else
14232   rm -rf conftest*
14233   
14234     echo "$ac_t""2" 1>&6; dbfunc=db_open
14235 fi
14236 rm -f conftest*
14237
14238 else
14239   rm -rf conftest*
14240   
14241     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14242 fi
14243 rm -f conftest*
14244
14245     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14246 echo "configure:14247: checking for $dbfunc" >&5
14247
14248 cat > conftest.$ac_ext <<EOF
14249 #line 14250 "configure"
14250 #include "confdefs.h"
14251 /* System header to define __stub macros and hopefully few prototypes,
14252     which can conflict with char $dbfunc(); below.  */
14253 #include <assert.h>
14254 /* Override any gcc2 internal prototype to avoid an error.  */
14255 /* We use char because int might match the return type of a gcc2
14256     builtin and then its argument prototype would still apply.  */
14257 char $dbfunc();
14258
14259 int main() {
14260
14261 /* The GNU C library defines this for functions which it implements
14262     to always fail with ENOSYS.  Some functions are actually named
14263     something starting with __ and the normal name is an alias.  */
14264 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14265 choke me
14266 #else
14267 $dbfunc();
14268 #endif
14269
14270 ; return 0; }
14271 EOF
14272 if { (eval echo configure:14273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14273   rm -rf conftest*
14274   eval "ac_cv_func_$dbfunc=yes"
14275 else
14276   echo "configure: failed program was:" >&5
14277   cat conftest.$ac_ext >&5
14278   rm -rf conftest*
14279   eval "ac_cv_func_$dbfunc=no"
14280 fi
14281 rm -f conftest*
14282
14283 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14284   echo "$ac_t""yes" 1>&6
14285   with_database_berkdb=yes need_libdb=no
14286 else
14287   echo "$ac_t""no" 1>&6
14288
14289     
14290 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14291 echo "configure:14292: checking for $dbfunc in -ldb" >&5
14292 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14293
14294 xe_check_libs=" -ldb "
14295 cat > conftest.$ac_ext <<EOF
14296 #line 14297 "configure"
14297 #include "confdefs.h"
14298 /* Override any gcc2 internal prototype to avoid an error.  */
14299 /* We use char because int might match the return type of a gcc2
14300     builtin and then its argument prototype would still apply.  */
14301 char $dbfunc();
14302
14303 int main() {
14304 $dbfunc()
14305 ; return 0; }
14306 EOF
14307 if { (eval echo configure:14308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14308   rm -rf conftest*
14309   eval "ac_cv_lib_$ac_lib_var=yes"
14310 else
14311   echo "configure: failed program was:" >&5
14312   cat conftest.$ac_ext >&5
14313   rm -rf conftest*
14314   eval "ac_cv_lib_$ac_lib_var=no"
14315 fi
14316 rm -f conftest*
14317 xe_check_libs=""
14318
14319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14320   echo "$ac_t""yes" 1>&6
14321   with_database_berkdb=yes need_libdb=yes
14322 else
14323   echo "$ac_t""no" 1>&6
14324 fi
14325
14326
14327 fi
14328
14329   fi
14330
14331   if test "$with_database_berkdb" = "yes"; then
14332     { test "$extra_verbose" = "yes" && cat << EOF
14333     Defining DB_H_FILE = "$db_h_file"
14334 EOF
14335 cat >> confdefs.h <<EOF
14336 #define DB_H_FILE "$db_h_file"
14337 EOF
14338 }
14339
14340     { test "$extra_verbose" = "yes" && cat << \EOF
14341     Defining HAVE_BERKELEY_DB
14342 EOF
14343 cat >> confdefs.h <<\EOF
14344 #define HAVE_BERKELEY_DB 1
14345 EOF
14346 }
14347
14348     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14349   else with_database_berkdb=no
14350   fi
14351 fi
14352
14353 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14354      != "no no no"; then
14355   { test "$extra_verbose" = "yes" && cat << \EOF
14356     Defining HAVE_DATABASE
14357 EOF
14358 cat >> confdefs.h <<\EOF
14359 #define HAVE_DATABASE 1
14360 EOF
14361 }
14362
14363   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14364    echo "    xemacs will be linked with \"database.o\""
14365  fi
14366   if test "$with_utf_2000" = "yes"; then
14367     { test "$extra_verbose" = "yes" && cat << \EOF
14368     Defining HAVE_CHISE_CLIENT
14369 EOF
14370 cat >> confdefs.h <<\EOF
14371 #define HAVE_CHISE_CLIENT 1
14372 EOF
14373 }
14374
14375   fi
14376 fi
14377
14378 if test "$with_socks" = "yes"; then
14379   
14380 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14381 echo "configure:14382: checking for SOCKSinit in -lsocks" >&5
14382 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14383
14384 xe_check_libs=" -lsocks "
14385 cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 /* Override any gcc2 internal prototype to avoid an error.  */
14389 /* We use char because int might match the return type of a gcc2
14390     builtin and then its argument prototype would still apply.  */
14391 char SOCKSinit();
14392
14393 int main() {
14394 SOCKSinit()
14395 ; return 0; }
14396 EOF
14397 if { (eval echo configure:14398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14398   rm -rf conftest*
14399   eval "ac_cv_lib_$ac_lib_var=yes"
14400 else
14401   echo "configure: failed program was:" >&5
14402   cat conftest.$ac_ext >&5
14403   rm -rf conftest*
14404   eval "ac_cv_lib_$ac_lib_var=no"
14405 fi
14406 rm -f conftest*
14407 xe_check_libs=""
14408
14409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14410   echo "$ac_t""yes" 1>&6
14411     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14412     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14413   { test "$extra_verbose" = "yes" && cat << EOF
14414     Defining $ac_tr_lib
14415 EOF
14416 cat >> confdefs.h <<EOF
14417 #define $ac_tr_lib 1
14418 EOF
14419 }
14420
14421   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14422
14423 else
14424   echo "$ac_t""no" 1>&6
14425 fi
14426
14427
14428   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14429     Defining HAVE_SOCKS
14430 EOF
14431 cat >> confdefs.h <<\EOF
14432 #define HAVE_SOCKS 1
14433 EOF
14434 }
14435
14436 fi
14437
14438 if test "$usage_tracking" = "yes"; then
14439   { test "$extra_verbose" = "yes" && cat << \EOF
14440     Defining USAGE_TRACKING
14441 EOF
14442 cat >> confdefs.h <<\EOF
14443 #define USAGE_TRACKING 1
14444 EOF
14445 }
14446
14447   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14448 fi
14449
14450 if test "$with_modules" != "no"; then
14451   echo "checking for module support" 1>&6
14452 echo "configure:14453: checking for module support" >&5
14453
14454     if test "$with_msw" = "yes"; then
14455     have_dl=yes;
14456   else
14457         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14458 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14459 echo "configure:14460: checking for dlfcn.h" >&5
14460
14461 cat > conftest.$ac_ext <<EOF
14462 #line 14463 "configure"
14463 #include "confdefs.h"
14464 #include <dlfcn.h>
14465 EOF
14466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14467 { (eval echo configure:14468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14469 if test -z "$ac_err"; then
14470   rm -rf conftest*
14471   eval "ac_cv_header_$ac_safe=yes"
14472 else
14473   echo "$ac_err" >&5
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -rf conftest*
14477   eval "ac_cv_header_$ac_safe=no"
14478 fi
14479 rm -f conftest*
14480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14481   echo "$ac_t""yes" 1>&6
14482   
14483       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14484 echo "configure:14485: checking for dlopen in -lc" >&5
14485       cat > conftest.$ac_ext <<EOF
14486 #line 14487 "configure"
14487 #include "confdefs.h"
14488 #include <dlfcn.h>
14489 int main() {
14490         dlopen ("", 0);
14491 ; return 0; }
14492 EOF
14493 if { (eval echo configure:14494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14494   rm -rf conftest*
14495    have_dl=yes 
14496 else
14497   echo "configure: failed program was:" >&5
14498   cat conftest.$ac_ext >&5
14499   rm -rf conftest*
14500   
14501       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14502 echo "configure:14503: checking for dlopen in -ldl" >&5
14503       ac_save_LIBS="$LIBS"
14504       LIBS="-ldl $LIBS"
14505       cat > conftest.$ac_ext <<EOF
14506 #line 14507 "configure"
14507 #include "confdefs.h"
14508 #include <dlfcn.h>
14509 int main() {
14510         dlopen ("", 0);
14511 ; return 0; }
14512 EOF
14513 if { (eval echo configure:14514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14514   rm -rf conftest*
14515    have_dl=yes 
14516 else
14517   echo "configure: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   rm -rf conftest*
14520   LIBS="$ac_save_LIBS"
14521 fi
14522 rm -f conftest*
14523       ac_save_LIBS=
14524 fi
14525 rm -f conftest*
14526 else
14527   echo "$ac_t""no" 1>&6
14528 fi
14529
14530     if test -n "$have_dl"; then
14531       { test "$extra_verbose" = "yes" && cat << \EOF
14532     Defining HAVE_DLOPEN
14533 EOF
14534 cat >> confdefs.h <<\EOF
14535 #define HAVE_DLOPEN 1
14536 EOF
14537 }
14538
14539     else
14540       
14541 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14542 echo "configure:14543: checking for shl_load in -ldld" >&5
14543 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14544
14545 xe_check_libs=" -ldld "
14546 cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 /* Override any gcc2 internal prototype to avoid an error.  */
14550 /* We use char because int might match the return type of a gcc2
14551     builtin and then its argument prototype would still apply.  */
14552 char shl_load();
14553
14554 int main() {
14555 shl_load()
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14559   rm -rf conftest*
14560   eval "ac_cv_lib_$ac_lib_var=yes"
14561 else
14562   echo "configure: failed program was:" >&5
14563   cat conftest.$ac_ext >&5
14564   rm -rf conftest*
14565   eval "ac_cv_lib_$ac_lib_var=no"
14566 fi
14567 rm -f conftest*
14568 xe_check_libs=""
14569
14570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14571   echo "$ac_t""yes" 1>&6
14572   libdl=dld have_dl=yes;
14573         { test "$extra_verbose" = "yes" && cat << \EOF
14574     Defining HAVE_SHL_LOAD
14575 EOF
14576 cat >> confdefs.h <<\EOF
14577 #define HAVE_SHL_LOAD 1
14578 EOF
14579 }
14580
14581 else
14582   echo "$ac_t""no" 1>&6
14583
14584 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14585 echo "configure:14586: checking for dld_init in -ldld" >&5
14586 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14587
14588 xe_check_libs=" -ldld "
14589 cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 /* Override any gcc2 internal prototype to avoid an error.  */
14593 /* We use char because int might match the return type of a gcc2
14594     builtin and then its argument prototype would still apply.  */
14595 char dld_init();
14596
14597 int main() {
14598 dld_init()
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   eval "ac_cv_lib_$ac_lib_var=yes"
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   eval "ac_cv_lib_$ac_lib_var=no"
14609 fi
14610 rm -f conftest*
14611 xe_check_libs=""
14612
14613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14614   echo "$ac_t""yes" 1>&6
14615   libdl=dld have_dl=yes;
14616         { test "$extra_verbose" = "yes" && cat << \EOF
14617     Defining HAVE_DLD_INIT
14618 EOF
14619 cat >> confdefs.h <<\EOF
14620 #define HAVE_DLD_INIT 1
14621 EOF
14622 }
14623
14624 else
14625   echo "$ac_t""no" 1>&6
14626 fi
14627
14628
14629 fi
14630
14631
14632     fi
14633   fi 
14634   if test -n "$have_dl"; then
14635         
14636 dll_ld=
14637 dll_ldflags=
14638 dll_cflags=
14639 dll_post=
14640 dll_ldo="-o"
14641 ld_dynamic_link_flags=
14642 xehost=$canonical
14643 xealias=$internal_configuration
14644
14645 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14646 echo "configure:14647: checking how to build dynamic libraries for ${xehost}" >&5
14647 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14648 case "$xehost" in
14649 *-*-linux-gnu*) ;;
14650 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14651 esac
14652
14653 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14654 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14655 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14656
14657 case "$xehost_os" in
14658 aix3*)
14659   # AIX sometimes has problems with the GCC collect2 program.  For some
14660   # reason, if we set the COLLECT_NAMES environment variable, the problems
14661   # vanish in a puff of smoke.
14662   if test "${COLLECT_NAMES+set}" != set; then
14663     COLLECT_NAMES=
14664     export COLLECT_NAMES
14665   fi
14666   ;;
14667 esac
14668
14669 # Now see if the compiler is really GCC.
14670 if test "$GCC" = "yes"; then
14671   XEGCC=yes
14672 else
14673   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14674 echo "configure:14675: checking checking whether we are using GNU C" >&5
14675   cat > conftest.$ac_ext <<EOF
14676 #line 14677 "configure"
14677 #include "confdefs.h"
14678
14679 #ifdef __GNUC__
14680   yes;
14681 #endif
14682
14683 EOF
14684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14685   egrep "yes" >/dev/null 2>&1; then
14686   rm -rf conftest*
14687   XEGCC=yes
14688 else
14689   rm -rf conftest*
14690   XEGCC=no
14691 fi
14692 rm -f conftest*
14693
14694   echo "$ac_t""${XEGCC}" 1>&6
14695 fi
14696
14697 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14698 echo "configure:14699: checking how to produce PIC code" >&5
14699 wl=
14700
14701 can_build_shared=yes
14702 if test "$XEGCC" = yes; then
14703   wl='-Wl,'
14704
14705   case "$xehost_os" in
14706   aix[3-9]* | irix[5-9]* | osf[3-9])
14707     # PIC is the default for these OSes.
14708     ;;
14709
14710   os2*)
14711     # We can build DLLs from non-PIC.
14712     ;;
14713   amigaos*)
14714     # FIXME: we need at least 68020 code to build shared libraries, but
14715     # adding the `-m68020' flag to GCC prevents building anything better,
14716     # like `-m68040'.
14717     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14718     ;;
14719   *cygwin* | *mingw* )
14720     # PIC is the default
14721     ;;
14722   *)
14723     dll_cflags='-fPIC'
14724     ;;
14725   esac
14726 else
14727   # PORTME Check for PIC flags for the system compiler.
14728   case "$xehost_os" in
14729   hpux9* | hpux1[0-9]*)
14730     # Is there a better link_static_flag that works with the bundled CC?
14731     wl='-Wl,'
14732     dll_cflags='+Z'
14733     ;;
14734
14735   irix[5-9]*)
14736     wl='-Wl,'
14737     # PIC (with -KPIC) is the default.
14738     ;;
14739
14740   os2*)
14741     # We can build DLLs from non-PIC.
14742     ;;
14743
14744   osf[3-9]*)
14745     # All OSF/1 code is PIC.
14746     wl='-Wl,'
14747     ;;
14748
14749   aix[3-9]*)
14750     # All AIX code is PIC.
14751     wl='-Wl,'
14752     ;;
14753
14754   sco3.2v5*)
14755     dll_cflags='-belf -Kpic'
14756     wl='-Wl,'
14757     ;;
14758
14759   unixware*)
14760     dll_cflags="-KPIC"
14761     wl="-Wl,"
14762     ;;
14763
14764   sysv4*)
14765     dll_cflags="-KPIC"
14766     wl="-Wl,"
14767     ;;
14768
14769   sysv5*)
14770     dll_cflags="-KPIC"
14771     wl="-Wl,"
14772     ;;
14773
14774   solaris2*)
14775     dll_cflags='-KPIC'
14776     wl='-Wl,'
14777     ;;
14778
14779   sunos4*)
14780     dll_cflags='-PIC'
14781     wl='-Qoption ld '
14782     ;;
14783
14784   uts4*)
14785     dll_cflags='-pic'
14786     ;;
14787
14788   *)
14789     can_build_shared=no
14790     ;;
14791   esac
14792 fi
14793
14794 if test -n "$dll_cflags"; then
14795   echo "$ac_t""${dll_cflags}" 1>&6
14796
14797   # Check to make sure the dll_cflags actually works.
14798   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14799 echo "configure:14800: checking if PIC flag ${dll_cflags} really works" >&5
14800   save_CFLAGS="$CFLAGS"
14801   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14802   cat > conftest.$ac_ext <<EOF
14803 #line 14804 "configure"
14804 #include "confdefs.h"
14805
14806 int main() {
14807 int x=0;
14808 ; return 0; }
14809 EOF
14810 if { (eval echo configure:14811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14811   rm -rf conftest*
14812   
14813     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14814     # reports no error.  So, we need to grep stderr for (Bundled).
14815     if grep '(Bundled)' config.log >/dev/null; then
14816       echo "$ac_t""no" 1>&6
14817       can_build_shared=no
14818       dll_cflags=
14819     else
14820       echo "$ac_t""yes" 1>&6
14821     fi
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825   rm -rf conftest*
14826   echo "$ac_t""no" 1>&6
14827     can_build_shared=no
14828     dll_cflags=
14829 fi
14830 rm -f conftest*
14831   CFLAGS="$save_CFLAGS"
14832 else
14833   echo "$ac_t""none" 1>&6
14834 fi
14835
14836 if test "$can_build_shared" = "yes"; then
14837 cc_produces_so=no
14838 xldf=
14839 xcldf=
14840 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14841 echo "configure:14842: checking if C compiler can produce shared libraries" >&5
14842 if test "$XEGCC" = yes; then
14843   xcldf="-shared"
14844   xldf="-shared"
14845 else # Not using GCC
14846   case "$xehost_os" in
14847     aix[3-9]*)
14848       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14849       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14850       ;;
14851
14852     freebsd2* | netbsd* | openbsd*)
14853       xldf="-Bshareable"
14854       xcldf="${wl}-Bshareable"
14855       ;;
14856
14857     freebsd3*)
14858       xcldf="-shared"
14859       ;;
14860
14861     hpux*)
14862       xldf="-b +s"
14863       xcldf="${wl}-b ${wl}+s"
14864       ;;
14865
14866     irix[5-9]* | osf[3-9]*)
14867       xcldf="${wl}-shared"
14868       xldf="-shared"
14869       ;;
14870
14871     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14872       xcldf="-G"
14873       xldf="-G"
14874       ;;
14875
14876     sunos4*)
14877       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14878       xldf="-assert pure-text -Bstatic"
14879       ;;
14880   esac
14881 fi # End if if we are using gcc
14882
14883 if test -n "$xcldf"; then
14884   save_LDFLAGS=$LDFLAGS
14885   save_LIBS=$LIBS
14886   save_xe_libs=$xe_libs
14887   LDFLAGS="$xcldf $LDFLAGS"
14888   LIBS=
14889   xe_libs=
14890   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14891   cat > conftest.$ac_ext <<EOF
14892 #line 14893 "configure"
14893 #include "confdefs.h"
14894
14895 int main() {
14896 int x=0;
14897 ; return 0; }
14898 EOF
14899 if { (eval echo configure:14900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14900   rm -rf conftest*
14901   cc_produces_so=yes
14902 else
14903   echo "configure: failed program was:" >&5
14904   cat conftest.$ac_ext >&5
14905   rm -rf conftest*
14906   cc_produces_so=no
14907 fi
14908 rm -f conftest*
14909   LDFLAGS=$save_LDFLAGS
14910   LIBS=$save_LIBS
14911   xe_libs=$save_xe_libs
14912   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14913 else
14914   cc_produces_so=no
14915 fi
14916 echo "$ac_t""${cc_produces_so}" 1>&6
14917
14918 LTLD=$LD
14919 if test -z "$LTLD"; then
14920   ac_prog=ld
14921   if test "$XEGCC" = yes; then
14922     # Check if gcc -print-prog-name=ld gives a path.
14923     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14924 echo "configure:14925: checking for ld used by GCC" >&5
14925     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14926     case "$ac_prog" in
14927     # Accept absolute paths.
14928     /*)
14929       if test -z "$LTLD"; then
14930 #        case "$ac_prog" in
14931 #          *gcc-lib*) LTLD="$CC"
14932 #                     ;;
14933 #          *)
14934          LTLD="$ac_prog"
14935 #                     ;;
14936 #        esac
14937       fi
14938       ;;
14939     "")
14940       # If it fails, then pretend we aren't using GCC.
14941       ac_prog=ld
14942       ;;
14943     *)
14944       # If it is relative, then search for the first ld in PATH.
14945       with_gnu_ld=unknown
14946       ;;
14947     esac
14948   else
14949     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14950 echo "configure:14951: checking for GNU ld" >&5
14951   fi
14952
14953   if test -z "$LTLD"; then
14954     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14955     for ac_dir in $PATH; do
14956       test -z "$ac_dir" && ac_dir=.
14957       if test -f "$ac_dir/$ac_prog"; then
14958         LTLD="$ac_dir/$ac_prog"
14959         # Check to see if the program is GNU ld.  I'd rather use --version,
14960         # but apparently some GNU ld's only accept -v.
14961         # Break only if it was the GNU/non-GNU ld that we prefer.
14962         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14963           xe_gnu_ld=yes
14964         else
14965           xe_gnu_ld=no
14966         fi
14967       fi
14968     done
14969     IFS="$ac_save_ifs"
14970   fi
14971
14972   if test -n "$LTLD"; then
14973     echo "$ac_t""${LTLD}" 1>&6
14974   else
14975     echo "$ac_t""no" 1>&6
14976   fi
14977
14978   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14979     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14980     exit 1
14981   fi
14982 fi
14983
14984 ld_dynamic_link_flags=
14985
14986 # Check to see if it really is or isn't GNU ld.
14987 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14988 echo "configure:14989: checking if the linker is GNU ld" >&5
14989 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14990 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14991   xe_gnu_ld=yes
14992 else
14993   xe_gnu_ld=no
14994 fi
14995 echo "$ac_t""${xe_gnu_ld}" 1>&6
14996
14997 case "$xehost_os" in
14998   amigaos* | sunos4*)
14999     # On these operating systems, we should treat GNU ld like the system ld.
15000     gnu_ld_acts_native=yes
15001     ;;
15002   *)
15003     gnu_ld_acts_native=no
15004     ;;
15005 esac
15006
15007 if test "$cc_produces_so" = "yes"; then
15008   dll_ld=$CC
15009   dll_ldflags=$xcldf
15010   can_build_shared=yes
15011   ld_shlibs=yes
15012 else
15013   # OK - only NOW do we futz about with ld.
15014   # See if the linker supports building shared libraries.
15015   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15016 echo "configure:15017: checking whether the linker supports shared libraries" >&5
15017   dll_ld=$CC
15018   dll_ldflags=$LDFLAGS
15019   ld_shlibs=yes
15020   can_build_shared=yes
15021   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15022     # See if GNU ld supports shared libraries.
15023     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15024       dll_ld=$CC
15025       dll_ldflags="-shared"
15026       ld_shlibs=yes
15027     else
15028       ld_shlibs=no
15029     fi
15030   else
15031     # PORTME fill in a description of your system's linker (not GNU ld)
15032     case "$xehost_os" in
15033     aix3*)
15034       dll_ld=$LTLD
15035       dll_ldflags=$xldf
15036       ;;
15037
15038     aix[4-9]*)
15039       dll_ldflags=$xcldf
15040       ;;
15041
15042     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15043     # support.  Future versions do this automatically, but an explicit c++rt0.o
15044     # doesn't break anything, and helps significantly (at the cost of a little
15045     # extra space).
15046     freebsd2.2*)
15047       dll_ld=$LTLD
15048       dll_ldflags=$xldf
15049       dll_post="/usr/lib/c++rt0.o"
15050       ;;
15051
15052     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15053     freebsd2*)
15054       dll_ld=$LTLD
15055       dll_ldflags="-Bshareable"
15056       ;;
15057
15058     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15059     freebsd3*)
15060       dll_ldflags="-shared"
15061       ;;
15062
15063     hpux*)
15064       dll_ld=$LTLD
15065       dll_ldflags=$xldf
15066       ;;
15067
15068     irix[5-9]*)
15069       dll_ld=$LTLD
15070       dll_ldflags=$xldf
15071       ;;
15072
15073     netbsd*)
15074       # Tested with NetBSD 1.2 ld
15075       dll_ld=$LTLD
15076       dll_ldflags=$xldf
15077       ;;
15078
15079     openbsd*)
15080       dll_ld=$LTLD
15081       dll_ldflags=$xldf
15082       ;;
15083
15084     osf3* | osf4*)
15085       dll_ld=$LTLD
15086       dll_ldflags=$xldf
15087       ;;
15088
15089     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15090     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15091       dll_ld=$LTLD
15092       case "$dll_ld" in
15093         *gcc*) dll_ldflags="-shared"
15094                dll_ld=$CC
15095                ;;
15096         *)     dll_ldflags="-G"
15097                ;;
15098       esac
15099       ;;
15100
15101     sunos4*)
15102       if test "$XEGCC" = yes; then
15103         dll_ld=$CC
15104       else
15105         dll_ld=$LTLD
15106       fi
15107       dll_ldflags=$xldf
15108       ;;
15109
15110     uts4*)
15111       dll_ld=$LTLD
15112       dll_ldflags="-G"
15113       ;;
15114
15115     bsdi*)
15116       dll_ldflags="-r"
15117       dll_ld="shlicc2"
15118       ;;
15119
15120     *)
15121       ld_shlibs=no
15122       can_build_shared=no
15123       ;;
15124     esac
15125   fi
15126   echo "$ac_t""${ld_shlibs}" 1>&6
15127   if test "$ld_shlibs" = "no"; then
15128     can_build_shared=no
15129   fi
15130 fi # End of if cc_produces_so = no
15131
15132
15133 if test "$xe_gnu_ld" = yes; then
15134   if test "$ld_shlibs" = yes; then
15135     ld_dynamic_link_flags="${wl}-export-dynamic"
15136   fi
15137 fi
15138
15139 if test -z "$ld_dynamic_link_flags"; then
15140   case "$xehost_os" in
15141   aix[3-9]*)
15142     ld_dynamic_link_flags=
15143     ;;
15144
15145   freebsd2.2*)
15146     ld_dynamic_link_flags=
15147     ;;
15148
15149   freebsd2*)
15150     ld_dynamic_link_flags=
15151     ;;
15152
15153   freebsd3*)
15154     ld_dynamic_link_flags=
15155     ;;
15156
15157   hpux*)
15158     ld_dynamic_link_flags="${wl}-E"
15159     ;;
15160
15161   irix[5-9]*)
15162     ld_dynamic_link_flags=
15163     ;;
15164
15165   netbsd*)
15166     ld_dynamic_link_flags=
15167     ;;
15168
15169   openbsd*)
15170     ld_dynamic_link_flags=
15171     ;;
15172
15173   osf3* | osf4*)
15174     ld_dynamic_link_flags=
15175     ;;
15176
15177   solaris2* | solaris7*)
15178     ld_dynamic_link_flags=
15179     ;;
15180
15181   sco3.2v5* | unixware* | sysv5* | sysv4*)
15182     ld_dynamic_link_flags="${wl}-Bexport"
15183     ;;
15184
15185   sunos4*)
15186     ld_dynamic_link_flags=
15187     ;;
15188
15189   uts4*)
15190     ld_dynamic_link_flags=
15191     ;;
15192
15193   bsdi*)
15194     ld_dynamic_link_flags=
15195     ;;
15196
15197   esac
15198 fi # End of if -z ld_dynamic_link_flags
15199 fi # End of if test "$can_build_shared" = "yes"
15200
15201
15202
15203
15204
15205
15206
15207
15208   fi
15209
15210   if test "$can_build_shared" = "yes"; then
15211     { test "$extra_verbose" = "yes" && cat << \EOF
15212     Defining HAVE_SHLIB
15213 EOF
15214 cat >> confdefs.h <<\EOF
15215 #define HAVE_SHLIB 1
15216 EOF
15217 }
15218
15219     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15220    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15221  fi
15222     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15223     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15224     for ac_func in dlerror _dlerror
15225 do
15226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15227 echo "configure:15228: checking for $ac_func" >&5
15228
15229 cat > conftest.$ac_ext <<EOF
15230 #line 15231 "configure"
15231 #include "confdefs.h"
15232 /* System header to define __stub macros and hopefully few prototypes,
15233     which can conflict with char $ac_func(); below.  */
15234 #include <assert.h>
15235 /* Override any gcc2 internal prototype to avoid an error.  */
15236 /* We use char because int might match the return type of a gcc2
15237     builtin and then its argument prototype would still apply.  */
15238 char $ac_func();
15239
15240 int main() {
15241
15242 /* The GNU C library defines this for functions which it implements
15243     to always fail with ENOSYS.  Some functions are actually named
15244     something starting with __ and the normal name is an alias.  */
15245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15246 choke me
15247 #else
15248 $ac_func();
15249 #endif
15250
15251 ; return 0; }
15252 EOF
15253 if { (eval echo configure:15254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15254   rm -rf conftest*
15255   eval "ac_cv_func_$ac_func=yes"
15256 else
15257   echo "configure: failed program was:" >&5
15258   cat conftest.$ac_ext >&5
15259   rm -rf conftest*
15260   eval "ac_cv_func_$ac_func=no"
15261 fi
15262 rm -f conftest*
15263
15264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15265   echo "$ac_t""yes" 1>&6
15266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15267   { test "$extra_verbose" = "yes" && cat << EOF
15268     Defining $ac_tr_func
15269 EOF
15270 cat >> confdefs.h <<EOF
15271 #define $ac_tr_func 1
15272 EOF
15273 }
15274  
15275 else
15276   echo "$ac_t""no" 1>&6
15277 fi
15278 done
15279
15280     with_modules=yes
15281   else
15282     if test "$with_modules" = "yes"; then
15283       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15284     else
15285       echo "configure: warning: "Module support cannot be provided."" 1>&2
15286     fi
15287     with_modules=no
15288   fi
15289 fi
15290
15291 cat > conftest.$ac_ext <<EOF
15292 #line 15293 "configure"
15293 #include "confdefs.h"
15294 int main(int c,char *v[]){return 0;}
15295 EOF
15296 if { (eval echo configure:15297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15297 then
15298   :
15299 else
15300   conftest_rc="$?"
15301   echo "configure: failed program was:" >&5
15302   cat conftest.$ac_ext >&5
15303   rm -fr conftest*
15304   
15305   echo ""
15306   echo "*** PANIC *** configure forgot how to build working executables!"
15307   echo ""
15308   echo "*** This is most commonly due to an unforeseen environment, causing"
15309   echo "*** configure to incorrectly compute the sequence of libraries to link."
15310   echo "*** Please examine the tail of config.log for runtime errors."
15311   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15312   echo "*** Often adding or removing explicit options in the configure"
15313   echo "*** invocation can work around this kind of problem.  If so, please"
15314   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15315   echo "***"
15316   echo "*** Other possible causes are inability to write to the file system"
15317   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15318   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15319   echo "*** necessary.  On other systems, try telling configure where to find"
15320   echo "*** the shared libraries using the --site-runtime-libraries option."
15321   echo "***"
15322   echo "*** Another way to shoot yourself in the foot is to specify"
15323   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15324   echo "*** system.  Don't do that."
15325   exit 1
15326 fi
15327 rm -fr conftest*
15328
15329 if test "$win32_processes" = "yes"; then
15330   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15331    echo "    xemacs will be linked with \"process-nt.o\""
15332  fi
15333 else
15334   { test "$extra_verbose" = "yes" && cat << \EOF
15335     Defining HAVE_UNIX_PROCESSES
15336 EOF
15337 cat >> confdefs.h <<\EOF
15338 #define HAVE_UNIX_PROCESSES 1
15339 EOF
15340 }
15341
15342   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15343    echo "    xemacs will be linked with \"process-unix.o\""
15344  fi
15345 fi
15346
15347
15348
15349 T=""
15350 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15351 CFLAGS="$T"
15352
15353
15354 T=""
15355 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15356 extra_objs="$T"
15357
15358
15359 T=""
15360 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
15361 c_switch_general="$T"
15362
15363
15364 T=""
15365 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
15366 c_switch_window_system="$T"
15367
15368
15369 T=""
15370 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15371 c_switch_all="$T"
15372
15373
15374 T=""
15375 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
15376 ld_switch_general="$T"
15377
15378
15379 T=""
15380 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15381 ld_switch_window_system="$T"
15382
15383
15384 T=""
15385 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15386 ld_switch_all="$T"
15387
15388
15389 T=""
15390 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15391 ld_libs_general="$T"
15392
15393
15394 T=""
15395 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
15396 ld_libs_window_system="$T"
15397
15398
15399 T=""
15400 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15401 ld_libs_all="$T"
15402
15403
15404
15405 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15406 internal_makefile_list="Makefile.in"
15407 SUBDIR_MAKEFILES=''
15408 test -d lock || mkdir lock
15409 for dir in $MAKE_SUBDIR; do
15410   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15411         test -d "$d" || mkdir "$d"; cd "$d"
15412       done ) ;;
15413    * ) test -d "$dir" || mkdir "$dir" ;;
15414   esac
15415   
15416 T=""
15417 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15418 SUBDIR_MAKEFILES="$T"
15419
15420   
15421 T=""
15422 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15423 internal_makefile_list="$T"
15424
15425 done
15426
15427
15428
15429
15430 for dir in src/s src/m; do
15431   if test ! -d "$dir" ; then
15432     echo Making symbolic link to "$srcdir/$dir"
15433     ${LN_S} "$srcdir/$dir" "$dir"
15434   fi
15435 done
15436
15437 if test "$extra_verbose" = "yes"; then
15438   echo ""
15439   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
15440   echo ""
15441 fi
15442
15443
15444 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15445   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15446   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15447 fi
15448
15449 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15450   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15451   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15452 fi
15453
15454 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15455   test "$extra_verbose" = "yes" && echo "creating TAGS"
15456   echo "\f
15457 $srcdir/TAGS,include" > "TAGS"
15458 fi
15459
15460 if test "$__SUNPRO_C" = "yes"; then
15461   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15462   ( echo "# For use with Sun WorkShop's Source browser."
15463     echo "# See sbquery(1) and sbinit(4) for more information"
15464     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15465   ) > .sbinit
15466 fi
15467
15468 rm -f core
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489 PREFIX=$prefix
15490 while true; do
15491   case "$PREFIX" in
15492     *\$* ) eval "PREFIX=$PREFIX" ;;
15493     *) break ;;
15494   esac
15495 done
15496
15497
15498
15499
15500 EXEC_PREFIX=$exec_prefix
15501 while true; do
15502   case "$EXEC_PREFIX" in
15503     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15504     *) break ;;
15505   esac
15506 done
15507
15508
15509
15510
15511 INFODIR=$infodir
15512 while true; do
15513   case "$INFODIR" in
15514     *\$* ) eval "INFODIR=$INFODIR" ;;
15515     *) break ;;
15516   esac
15517 done
15518
15519
15520
15521
15522 INFOPATH=$infopath
15523 while true; do
15524   case "$INFOPATH" in
15525     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15526     *) break ;;
15527   esac
15528 done
15529
15530
15531
15532
15533 PACKAGE_PATH=$package_path
15534 while true; do
15535   case "$PACKAGE_PATH" in
15536     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15537     *) break ;;
15538   esac
15539 done
15540
15541
15542
15543
15544 LISPDIR=$lispdir
15545 while true; do
15546   case "$LISPDIR" in
15547     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15548     *) break ;;
15549   esac
15550 done
15551
15552
15553
15554
15555 MODULEDIR=$moduledir
15556 while true; do
15557   case "$MODULEDIR" in
15558     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15559     *) break ;;
15560   esac
15561 done
15562
15563
15564
15565
15566 SITELISPDIR=$sitelispdir
15567 while true; do
15568   case "$SITELISPDIR" in
15569     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15570     *) break ;;
15571   esac
15572 done
15573
15574
15575
15576
15577 SITEMODULEDIR=$sitemoduledir
15578 while true; do
15579   case "$SITEMODULEDIR" in
15580     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15581     *) break ;;
15582   esac
15583 done
15584
15585
15586
15587
15588 ETCDIR=$etcdir
15589 while true; do
15590   case "$ETCDIR" in
15591     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15592     *) break ;;
15593   esac
15594 done
15595
15596
15597
15598
15599 DOCDIR=$docdir
15600 while true; do
15601   case "$DOCDIR" in
15602     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15603     *) break ;;
15604   esac
15605 done
15606
15607
15608
15609
15610 ARCHLIBDIR=$archlibdir
15611 while true; do
15612   case "$ARCHLIBDIR" in
15613     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15614     *) break ;;
15615   esac
15616 done
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15638
15639
15640
15641
15642
15643
15644
15645 : ${XEMACS_CC:=$CC}
15646
15647
15648 if test "$with_prefix" = "yes"; then
15649   { test "$extra_verbose" = "yes" && cat << \EOF
15650     Defining PREFIX_USER_DEFINED
15651 EOF
15652 cat >> confdefs.h <<\EOF
15653 #define PREFIX_USER_DEFINED 1
15654 EOF
15655 }
15656
15657 fi
15658
15659 if test "$with_site_lisp" = "no"; then
15660   { test "$extra_verbose" = "yes" && cat << \EOF
15661     Defining INHIBIT_SITE_LISP
15662 EOF
15663 cat >> confdefs.h <<\EOF
15664 #define INHIBIT_SITE_LISP 1
15665 EOF
15666 }
15667
15668 fi
15669 if test "$with_site_modules" = "no"; then
15670   { test "$extra_verbose" = "yes" && cat << \EOF
15671     Defining INHIBIT_SITE_MODULES
15672 EOF
15673 cat >> confdefs.h <<\EOF
15674 #define INHIBIT_SITE_MODULES 1
15675 EOF
15676 }
15677
15678 fi
15679
15680
15681 T=""
15682 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15683 ac_configure_args="$T"
15684
15685 { test "$extra_verbose" = "yes" && cat << EOF
15686     Defining EMACS_CONFIGURATION = "$configuration"
15687 EOF
15688 cat >> confdefs.h <<EOF
15689 #define EMACS_CONFIGURATION "$configuration"
15690 EOF
15691 }
15692
15693 { test "$extra_verbose" = "yes" && cat << EOF
15694     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15695 EOF
15696 cat >> confdefs.h <<EOF
15697 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15698 EOF
15699 }
15700
15701
15702
15703 null_string=""
15704 { test "$extra_verbose" = "yes" && cat << EOF
15705     Defining LD_SWITCH_X_SITE = $null_string
15706 EOF
15707 cat >> confdefs.h <<EOF
15708 #define LD_SWITCH_X_SITE $null_string
15709 EOF
15710 }
15711
15712 { test "$extra_verbose" = "yes" && cat << EOF
15713     Defining LD_SWITCH_X_SITE_AUX = $null_string
15714 EOF
15715 cat >> confdefs.h <<EOF
15716 #define LD_SWITCH_X_SITE_AUX $null_string
15717 EOF
15718 }
15719
15720 { test "$extra_verbose" = "yes" && cat << EOF
15721     Defining C_SWITCH_X_SITE = $null_string
15722 EOF
15723 cat >> confdefs.h <<EOF
15724 #define C_SWITCH_X_SITE $null_string
15725 EOF
15726 }
15727
15728 { test "$extra_verbose" = "yes" && cat << EOF
15729     Defining LD_SWITCH_SITE = $null_string
15730 EOF
15731 cat >> confdefs.h <<EOF
15732 #define LD_SWITCH_SITE $null_string
15733 EOF
15734 }
15735
15736 { test "$extra_verbose" = "yes" && cat << EOF
15737     Defining C_SWITCH_SITE = $null_string
15738 EOF
15739 cat >> confdefs.h <<EOF
15740 #define C_SWITCH_SITE $null_string
15741 EOF
15742 }
15743
15744
15745
15746 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15747     Defining GNU_MALLOC
15748 EOF
15749 cat >> confdefs.h <<\EOF
15750 #define GNU_MALLOC 1
15751 EOF
15752 }
15753
15754 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15755     Defining USE_SYSTEM_MALLOC
15756 EOF
15757 cat >> confdefs.h <<\EOF
15758 #define USE_SYSTEM_MALLOC 1
15759 EOF
15760 }
15761
15762 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15763     Defining USE_DEBUG_MALLOC
15764 EOF
15765 cat >> confdefs.h <<\EOF
15766 #define USE_DEBUG_MALLOC 1
15767 EOF
15768 }
15769
15770                                               { test "$extra_verbose" = "yes" && cat << \EOF
15771     Defining USE_SYSTEM_MALLOC
15772 EOF
15773 cat >> confdefs.h <<\EOF
15774 #define USE_SYSTEM_MALLOC 1
15775 EOF
15776 }
15777
15778 fi
15779 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15780     Defining I18N3
15781 EOF
15782 cat >> confdefs.h <<\EOF
15783 #define I18N3 1
15784 EOF
15785 }
15786
15787 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15788     Defining USE_GCC
15789 EOF
15790 cat >> confdefs.h <<\EOF
15791 #define USE_GCC 1
15792 EOF
15793 }
15794
15795 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15796     Defining EXTERNAL_WIDGET
15797 EOF
15798 cat >> confdefs.h <<\EOF
15799 #define EXTERNAL_WIDGET 1
15800 EOF
15801 }
15802
15803 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15804     Defining QUICK_BUILD
15805 EOF
15806 cat >> confdefs.h <<\EOF
15807 #define QUICK_BUILD 1
15808 EOF
15809 }
15810
15811 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15812     Defining PURIFY
15813 EOF
15814 cat >> confdefs.h <<\EOF
15815 #define PURIFY 1
15816 EOF
15817 }
15818
15819 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15820     Defining QUANTIFY
15821 EOF
15822 cat >> confdefs.h <<\EOF
15823 #define QUANTIFY 1
15824 EOF
15825 }
15826
15827 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15828     Defining MAIL_USE_POP
15829 EOF
15830 cat >> confdefs.h <<\EOF
15831 #define MAIL_USE_POP 1
15832 EOF
15833 }
15834
15835 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15836     Defining KERBEROS
15837 EOF
15838 cat >> confdefs.h <<\EOF
15839 #define KERBEROS 1
15840 EOF
15841 }
15842
15843 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15844     Defining HESIOD
15845 EOF
15846 cat >> confdefs.h <<\EOF
15847 #define HESIOD 1
15848 EOF
15849 }
15850
15851 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15852     Defining USE_UNION_TYPE
15853 EOF
15854 cat >> confdefs.h <<\EOF
15855 #define USE_UNION_TYPE 1
15856 EOF
15857 }
15858
15859 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15860     Defining PDUMP
15861 EOF
15862 cat >> confdefs.h <<\EOF
15863 #define PDUMP 1
15864 EOF
15865 }
15866
15867 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15868     Defining IPV6_CANONICALIZE
15869 EOF
15870 cat >> confdefs.h <<\EOF
15871 #define IPV6_CANONICALIZE 1
15872 EOF
15873 }
15874
15875
15876
15877 (
15878 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15879 else
15880   echo "uname -a: `uname -a`"
15881 fi
15882 echo ""
15883 echo "$0 $quoted_arguments"
15884 ) > Installation
15885
15886 if test ! -z ${emacs_beta_version} ; then
15887   if test -z "${emacs_is_beta}" ; then
15888         xemacs_betaname=".${emacs_beta_version}"
15889   else
15890         xemacs_betaname="-b${emacs_beta_version}"
15891   fi
15892 else
15893   xemacs_betaname=""
15894 fi
15895
15896 (
15897 echo "
15898
15899 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15900 "
15901 echo "
15902 Compilation / Installation:"
15903 echo "  Source code location:              $srcdir"
15904 echo "  Installation prefix:               $prefix"
15905 if test -n "$site_includes"; then
15906   echo "  Additional header files:           $site_includes"
15907 fi
15908 if test -n "$site_libraries"; then
15909   echo "  Additional libraries:              $site_libraries"
15910 fi
15911 if test -n "$site_prefixes"; then
15912   echo "  Additional prefixes:               $site_prefixes"
15913 fi
15914 if test -n "$runpath"; then
15915   echo "  Runtime library search path:       $runpath"
15916 fi
15917
15918 if test -n "$opsysfile"
15919 then echo "  Operating system description file: \`$opsysfile'"
15920 else echo "  Not using any operating system description file"
15921 fi
15922 if test -n "$machfile"
15923 then echo "  Machine description file:          \`$machfile'"
15924 else echo "  Not using any machine description file"
15925 fi
15926
15927 echo "  Compiler:                          $CC $CFLAGS"
15928 echo "  Relocating allocator for buffers:  $rel_alloc"
15929 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15930 case "$ld_switch_site" in
15931   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15932     - Consider configuring with --pdump." ;;
15933 esac
15934
15935 echo "
15936 Window System:"
15937 if test "$with_msw" = "yes"; then
15938   echo "  Compiling in support for the Microsoft window system."
15939 fi
15940 if test "$with_x11" = "yes"; then
15941   echo "  Compiling in support for the X window system:"
15942   echo "    - X Windows headers location:                 $x_includes"
15943   echo "    - X Windows libraries location:               $x_libraries"
15944   if test "$with_xauth" != yes; then
15945     echo "    - Xau (X authority) not available."
15946   fi
15947   if test "$with_xmu" != yes; then
15948     echo "    - Xmu library not available; substituting equivalent routines."
15949   fi
15950   if test "$with_wmcommand" != no; then
15951     echo "    - Handling WM_COMMAND properly."
15952   fi
15953 fi
15954 if test "$need_athena" = "yes"; then
15955   echo "  Compiling in support for the Athena widget set:"
15956   echo "    - Athena headers location:                    $athena_h_path"
15957   echo "    - Athena library to link:                     $athena_lib"
15958 fi
15959 case "$with_menubars" in
15960   gtk   ) echo "  Using GTK menubars."   ;;
15961   lucid ) echo "  Using Lucid menubars." ;;
15962   motif ) echo "  Using Motif menubars."
15963           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15964           echo "             We recommend using the Lucid menubar instead."
15965           echo "             Re-run configure with --with-menubars='lucid'." ;;
15966     msw ) echo "  Using MS-Windows menubars." ;;
15967 esac
15968 case "$with_scrollbars" in
15969   gtk    ) echo "  Using GTK scrollbars."        ;;
15970   lucid  ) echo "  Using Lucid scrollbars."      ;;
15971   motif  ) echo "  Using Motif scrollbars."      ;;
15972   athena ) echo "  Using Athena scrollbars."     ;;
15973      msw ) echo "  Using MS-Windows scrollbars." ;;
15974 esac
15975 case "$with_dialogs" in
15976   gtk    ) echo "  Using GTK dialog boxes." ;;
15977   motif  ) echo "  Using Motif dialog boxes."
15978            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15979              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15980              echo "             We recommend using the Athena dialog boxes instead."
15981              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15982              echo "             Read the PROBLEMS file for more information."
15983            fi; fi ;;
15984   athena ) echo "  Using Athena dialog boxes."     ;;
15985      msw ) echo "  Using MS-Windows dialog boxes." ;;
15986 esac
15987 case "$with_widgets" in
15988   gtk    ) echo "  Using GTK native widgets."        ;;
15989   motif  ) echo "  Using Motif native widgets."      ;;
15990   athena ) echo "  Using Athena native widgets."     ;;
15991      msw ) echo "  Using MS-Windows native widgets." ;;
15992 esac
15993 if test "$with_dragndrop" = yes; then
15994   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15995   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15996 fi
15997
15998 echo "
15999 TTY:"
16000 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16001 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16002
16003 echo "
16004 Images:"
16005 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16006 if test "$with_xpm" = yes; then
16007   echo "  Compiling in support for XPM  images."
16008 elif test "$with_x11" = yes; then
16009   echo "  WARNING: -----------------------------------------------------------"
16010   echo "  WARNING: Compiling without XPM image support."
16011   if test "$xpm_problem" != ""; then
16012     echo "  Reason: $xpm_problem"
16013   fi
16014   echo "  WARNING: You should strongly consider installing XPM."
16015   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16016   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16017   echo "  WARNING: -----------------------------------------------------------"
16018 fi
16019 if test "$with_png" = yes; then
16020   echo "  Compiling in support for PNG  images."
16021 elif test "$window_system" != "none"; then
16022   echo "  WARNING: -----------------------------------------------------------"
16023   echo "  WARNING: Compiling without PNG image support."
16024   if test "$png_problem" != ""; then
16025     echo "  Reason: $png_problem"
16026   fi
16027   echo "  WARNING: You should strongly consider installing the PNG libraries."
16028   echo "  WARNING: Otherwise certain images and glyphs may not display."
16029   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16030   echo "  WARNING: -----------------------------------------------------------"
16031 fi
16032 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16033 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16034 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16035
16036 echo "
16037 Sound:"
16038 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16039 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16040 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16041 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16042
16043 echo "
16044 Databases:"
16045 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16046 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16047 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16048 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16049 if test "$with_postgresql" = yes; then
16050   echo "  Compiling in support for PostgreSQL."
16051   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16052   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16053 fi
16054
16055 echo "
16056 Multiscriptization / Multilingualization / Internationalization:"
16057 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16058 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16059 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16060 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16061 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16062 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16063 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16064 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16065 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16066 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16067 if test "$with_wnn" = yes; then
16068   echo "  Compiling in support for the WNN input method on Mule."
16069   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16070 fi
16071 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16072
16073 echo "
16074 Mail:"
16075 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16076 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16077 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16078 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16079
16080 echo "
16081 Other Features:"
16082 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16083 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16084 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16085 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16086 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16087 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16088 if test "$use_union_type" = yes; then
16089   echo "  WARNING: ---------------------------------------------------------"
16090   echo "  Using the union type for Lisp_Objects."
16091   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16092   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16093   echo "  WARNING: ---------------------------------------------------------"
16094 fi
16095 test "$pdump" = yes && echo "  Using the new portable dumper."
16096 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16097 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16098 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16099   != "no no no no no no"; then
16100   echo "  WARNING: ---------------------------------------------------------"
16101   echo "  WARNING: Compiling in support for runtime error checking."
16102   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16103   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16104   echo "  WARNING: ---------------------------------------------------------"
16105 fi
16106 echo ""
16107 ) | tee -a Installation
16108 echo ""
16109
16110
16111 # Remove any trailing slashes in these variables.
16112 test -n "$prefix" &&
16113   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16114 test -n "$exec_prefix" &&
16115   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16116
16117
16118 for file in $internal_makefile_list; do
16119   test "$file" = src/Makefile.in && \
16120     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16121   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16122 done
16123 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16124 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
16125
16126 trap '' 1 2 15
16127
16128 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16129
16130 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16131 # Let make expand exec_prefix.
16132 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16133
16134 # Any assignment to VPATH causes Sun make to only execute
16135 # the first set of double-colon rules, so remove it if not needed.
16136 # If there is a colon in the path, we need to keep it.
16137 if test "x$srcdir" = x.; then
16138   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16139 fi
16140
16141 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16142
16143 DEFS=-DHAVE_CONFIG_H
16144
16145 # Without the "./", some shells look in PATH for config.status.
16146 : ${CONFIG_STATUS=./config.status}
16147
16148 echo creating $CONFIG_STATUS
16149 rm -f $CONFIG_STATUS
16150 cat > $CONFIG_STATUS <<EOF
16151 #! /bin/sh
16152 # Generated automatically by configure.
16153 # Run this file to recreate the current configuration.
16154 # This directory was configured as follows,
16155 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16156 #
16157 # $0 $ac_configure_args
16158 #
16159 # Compiler output produced by configure, useful for debugging
16160 # configure, is in ./config.log if it exists.
16161
16162 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16163 for ac_option
16164 do
16165   case "\$ac_option" in
16166   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16167     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16168     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16169   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16170     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16171     exit 0 ;;
16172   -help | --help | --hel | --he | --h)
16173     echo "\$ac_cs_usage"; exit 0 ;;
16174   *) echo "\$ac_cs_usage"; exit 1 ;;
16175   esac
16176 done
16177
16178 ac_given_srcdir=$srcdir
16179 ac_given_INSTALL="$INSTALL"
16180
16181 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16182 EOF
16183 cat >> $CONFIG_STATUS <<EOF
16184
16185 # Protect against being on the right side of a sed subst in config.status.
16186 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16187  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16188 $ac_vpsub
16189 $extrasub
16190 s%@SHELL@%$SHELL%g
16191 s%@CFLAGS@%$CFLAGS%g
16192 s%@CPPFLAGS@%$CPPFLAGS%g
16193 s%@CXXFLAGS@%$CXXFLAGS%g
16194 s%@FFLAGS@%$FFLAGS%g
16195 s%@DEFS@%$DEFS%g
16196 s%@LDFLAGS@%$LDFLAGS%g
16197 s%@LIBS@%$LIBS%g
16198 s%@exec_prefix@%$exec_prefix%g
16199 s%@prefix@%$prefix%g
16200 s%@program_transform_name@%$program_transform_name%g
16201 s%@bindir@%$bindir%g
16202 s%@sbindir@%$sbindir%g
16203 s%@libexecdir@%$libexecdir%g
16204 s%@datadir@%$datadir%g
16205 s%@sysconfdir@%$sysconfdir%g
16206 s%@sharedstatedir@%$sharedstatedir%g
16207 s%@localstatedir@%$localstatedir%g
16208 s%@libdir@%$libdir%g
16209 s%@includedir@%$includedir%g
16210 s%@oldincludedir@%$oldincludedir%g
16211 s%@infodir@%$infodir%g
16212 s%@mandir@%$mandir%g
16213 s%@LN_S@%$LN_S%g
16214 s%@blddir@%$blddir%g
16215 s%@CC@%$CC%g
16216 s%@CPP@%$CPP%g
16217 s%@start_flags@%$start_flags%g
16218 s%@ld_switch_shared@%$ld_switch_shared%g
16219 s%@start_files@%$start_files%g
16220 s%@ld@%$ld%g
16221 s%@lib_gcc@%$lib_gcc%g
16222 s%@RANLIB@%$RANLIB%g
16223 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16224 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16225 s%@INSTALL_DATA@%$INSTALL_DATA%g
16226 s%@YACC@%$YACC%g
16227 s%@SET_MAKE@%$SET_MAKE%g
16228 s%@GTK_CONFIG@%$GTK_CONFIG%g
16229 s%@X_CFLAGS@%$X_CFLAGS%g
16230 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16231 s%@X_LIBS@%$X_LIBS%g
16232 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16233 s%@install_pp@%$install_pp%g
16234 s%@libs_xauth@%$libs_xauth%g
16235 s%@dnd_objs@%$dnd_objs%g
16236 s%@lwlib_objs@%$lwlib_objs%g
16237 s%@ALLOCA@%$ALLOCA%g
16238 s%@have_esd_config@%$have_esd_config%g
16239 s%@dll_ld@%$dll_ld%g
16240 s%@dll_cflags@%$dll_cflags%g
16241 s%@dll_ldflags@%$dll_ldflags%g
16242 s%@dll_post@%$dll_post%g
16243 s%@dll_ldo@%$dll_ldo%g
16244 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16245 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16246 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16247 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16248 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16249 s%@PROGNAME@%$PROGNAME%g
16250 s%@version@%$version%g
16251 s%@configuration@%$configuration%g
16252 s%@canonical@%$canonical%g
16253 s%@inststaticdir@%$inststaticdir%g
16254 s%@instvardir@%$instvardir%g
16255 s%@srcdir@%$srcdir%g
16256 s%@pkgdir@%$pkgdir%g
16257 s%@statedir@%$statedir%g
16258 s%@extra_includes@%$extra_includes%g
16259 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16260 s%@PREFIX@%$PREFIX%g
16261 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16262 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16263 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16264 s%@INFODIR@%$INFODIR%g
16265 s%@infopath@%$infopath%g
16266 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16267 s%@INFOPATH@%$INFOPATH%g
16268 s%@package_path@%$package_path%g
16269 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16270 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16271 s%@lispdir@%$lispdir%g
16272 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16273 s%@LISPDIR@%$LISPDIR%g
16274 s%@moduledir@%$moduledir%g
16275 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16276 s%@MODULEDIR@%$MODULEDIR%g
16277 s%@sitelispdir@%$sitelispdir%g
16278 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16279 s%@SITELISPDIR@%$SITELISPDIR%g
16280 s%@sitemoduledir@%$sitemoduledir%g
16281 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16282 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16283 s%@etcdir@%$etcdir%g
16284 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16285 s%@ETCDIR@%$ETCDIR%g
16286 s%@docdir@%$docdir%g
16287 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16288 s%@DOCDIR@%$DOCDIR%g
16289 s%@archlibdir@%$archlibdir%g
16290 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16291 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16292 s%@bitmapdir@%$bitmapdir%g
16293 s%@extra_objs@%$extra_objs%g
16294 s%@machfile@%$machfile%g
16295 s%@opsysfile@%$opsysfile%g
16296 s%@c_switch_general@%$c_switch_general%g
16297 s%@c_switch_window_system@%$c_switch_window_system%g
16298 s%@c_switch_all@%$c_switch_all%g
16299 s%@ld_switch_general@%$ld_switch_general%g
16300 s%@ld_switch_window_system@%$ld_switch_window_system%g
16301 s%@ld_switch_all@%$ld_switch_all%g
16302 s%@ld_libs_general@%$ld_libs_general%g
16303 s%@ld_libs_window_system@%$ld_libs_window_system%g
16304 s%@ld_libs_all@%$ld_libs_all%g
16305 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16306 s%@native_sound_lib@%$native_sound_lib%g
16307 s%@sound_cflags@%$sound_cflags%g
16308 s%@dynodump_arch@%$dynodump_arch%g
16309 s%@XEMACS_CC@%$XEMACS_CC%g
16310 s%@internal_makefile_list@%$internal_makefile_list%g
16311
16312 CEOF
16313 EOF
16314
16315 cat >> $CONFIG_STATUS <<\EOF
16316
16317 # Split the substitutions into bite-sized pieces for seds with
16318 # small command number limits, like on Digital OSF/1 and HP-UX.
16319 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16320 ac_file=1 # Number of current file.
16321 ac_beg=1 # First line for current file.
16322 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16323 ac_more_lines=:
16324 ac_sed_cmds=""
16325 while $ac_more_lines; do
16326   if test $ac_beg -gt 1; then
16327     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16328   else
16329     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16330   fi
16331   if test ! -s conftest.s$ac_file; then
16332     ac_more_lines=false
16333     rm -f conftest.s$ac_file
16334   else
16335     if test -z "$ac_sed_cmds"; then
16336       ac_sed_cmds="sed -f conftest.s$ac_file"
16337     else
16338       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16339     fi
16340     ac_file=`expr $ac_file + 1`
16341     ac_beg=$ac_end
16342     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16343   fi
16344 done
16345 if test -z "$ac_sed_cmds"; then
16346   ac_sed_cmds=cat
16347 fi
16348 EOF
16349
16350 cat >> $CONFIG_STATUS <<EOF
16351
16352 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16353 EOF
16354 cat >> $CONFIG_STATUS <<\EOF
16355 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16356   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16357   case "$ac_file" in
16358   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16359        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16360   *) ac_file_in="${ac_file}.in" ;;
16361   esac
16362
16363   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16364
16365   # Remove last slash and all that follows it.  Not all systems have dirname.
16366   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16367   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16368     # The file is in a subdirectory.
16369     test ! -d "$ac_dir" && mkdir "$ac_dir"
16370     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16371     # A "../" for each directory in $ac_dir_suffix.
16372     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16373   else
16374     ac_dir_suffix= ac_dots=
16375   fi
16376
16377   case "$ac_given_srcdir" in
16378   .)  srcdir=.
16379       if test -z "$ac_dots"; then top_srcdir=.
16380       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16381   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16382   *) # Relative path.
16383     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16384     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16385   esac
16386
16387   case "$ac_given_INSTALL" in
16388   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16389   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16390   esac
16391
16392   echo creating "$ac_file"
16393   rm -f "$ac_file"
16394   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16395   case "$ac_file" in
16396   *Makefile*) ac_comsub="1i\\
16397 # $configure_input" ;;
16398   *) ac_comsub= ;;
16399   esac
16400
16401   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16402   sed -e "$ac_comsub
16403 s%@configure_input@%$configure_input%g
16404 s%@srcdir@%$srcdir%g
16405 s%@top_srcdir@%$top_srcdir%g
16406 s%@INSTALL@%$INSTALL%g
16407 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16408 fi; done
16409 rm -f conftest.s*
16410
16411 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16412 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16413 #
16414 # ac_d sets the value in "#define NAME VALUE" lines.
16415 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16416 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16417 ac_dC='\3'
16418 ac_dD='%g'
16419 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16420 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16421 ac_uB='\([      ]\)%\1#\2define\3'
16422 ac_uC=' '
16423 ac_uD='\4%g'
16424 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16425 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16426 ac_eB='$%\1#\2define\3'
16427 ac_eC=' '
16428 ac_eD='%g'
16429
16430 if test "${CONFIG_HEADERS+set}" != set; then
16431 EOF
16432 cat >> $CONFIG_STATUS <<EOF
16433   CONFIG_HEADERS="src/config.h lwlib/config.h"
16434 EOF
16435 cat >> $CONFIG_STATUS <<\EOF
16436 fi
16437 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16438   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16439   case "$ac_file" in
16440   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16441        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16442   *) ac_file_in="${ac_file}.in" ;;
16443   esac
16444
16445   echo creating $ac_file
16446
16447   rm -f conftest.frag conftest.in conftest.out
16448   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16449   cat $ac_file_inputs > conftest.in
16450
16451 EOF
16452
16453 # Transform confdefs.h into a sed script conftest.vals that substitutes
16454 # the proper values into config.h.in to produce config.h.  And first:
16455 # Protect against being on the right side of a sed subst in config.status.
16456 # Protect against being in an unquoted here document in config.status.
16457 rm -f conftest.vals
16458 cat > conftest.hdr <<\EOF
16459 s/[\\&%]/\\&/g
16460 s%[\\$`]%\\&%g
16461 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16462 s%ac_d%ac_u%gp
16463 s%ac_u%ac_e%gp
16464 EOF
16465 sed -n -f conftest.hdr confdefs.h > conftest.vals
16466 rm -f conftest.hdr
16467
16468 # This sed command replaces #undef with comments.  This is necessary, for
16469 # example, in the case of _POSIX_SOURCE, which is predefined and required
16470 # on some systems where configure will not decide to define it.
16471 cat >> conftest.vals <<\EOF
16472 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16473 EOF
16474
16475 # Break up conftest.vals because some shells have a limit on
16476 # the size of here documents, and old seds have small limits too.
16477
16478 rm -f conftest.tail
16479 while :
16480 do
16481   ac_lines=`grep -c . conftest.vals`
16482   # grep -c gives empty output for an empty file on some AIX systems.
16483   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16484   # Write a limited-size here document to conftest.frag.
16485   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16486   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16487   echo 'CEOF
16488   sed -f conftest.frag conftest.in > conftest.out
16489   rm -f conftest.in
16490   mv conftest.out conftest.in
16491 ' >> $CONFIG_STATUS
16492   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16493   rm -f conftest.vals
16494   mv conftest.tail conftest.vals
16495 done
16496 rm -f conftest.vals
16497
16498 cat >> $CONFIG_STATUS <<\EOF
16499   rm -f conftest.frag conftest.h
16500   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16501   cat conftest.in >> conftest.h
16502   rm -f conftest.in
16503   if cmp -s $ac_file conftest.h 2>/dev/null; then
16504     echo "$ac_file is unchanged"
16505     rm -f conftest.h
16506   else
16507     # Remove last slash and all that follows it.  Not all systems have dirname.
16508       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16509       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16510       # The file is in a subdirectory.
16511       test ! -d "$ac_dir" && mkdir "$ac_dir"
16512     fi
16513     rm -f $ac_file
16514     mv conftest.h $ac_file
16515   fi
16516 fi; done
16517
16518 EOF
16519 cat >> $CONFIG_STATUS <<EOF
16520 CPP="$CPP"
16521  top_srcdir="$srcdir"
16522  MAKE_SUBDIR="$MAKE_SUBDIR"
16523
16524 EOF
16525 cat >> $CONFIG_STATUS <<\EOF
16526 for dir in . $MAKE_SUBDIR; do
16527   (
16528     cd $dir
16529     rm -f junk.c
16530     < Makefile.in \
16531       sed -e '/^# Generated/d' \
16532           -e 's%/\*\*/#.*%%' \
16533           -e 's/^ *# */#/' \
16534           -e '/^##/d' \
16535           -e '/^#/ {
16536 p
16537 d
16538 }'        \
16539           -e '/./ {
16540 s/\([\"]\)/\\\1/g
16541 s/^/"/
16542 s/$/"/
16543 }'  > junk.c;
16544
16545
16546
16547     echo creating $dir/Makefile
16548 $CPP -I. -I${top_srcdir}/src  junk.c \
16549   | sed -e 's/^\#.*//'          \
16550         -e 's/^[        ][      ]*$//'\
16551         -e 's/^ /       /'              \
16552         -e '/^[ \f]*$/d' \
16553         -e '/^\"/ {
16554         s/\\\([\"]\)/\1/g
16555         s/^[    ]*\"//
16556         s/\"[   ]*$//
16557 }' > Makefile.new
16558     chmod 444 Makefile.new
16559     mv -f Makefile.new Makefile
16560
16561     echo creating $dir/GNUmakefile
16562 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16563   | sed -e 's/^\#.*//'          \
16564         -e 's/^[        ][      ]*$//'\
16565         -e 's/^ /       /'              \
16566         -e '/^[ \f]*$/d' \
16567         -e '/^\"/ {
16568         s/\\\([\"]\)/\1/g
16569         s/^[    ]*\"//
16570         s/\"[   ]*$//
16571 }' > Makefile.new
16572     chmod 444 Makefile.new
16573     mv -f Makefile.new GNUmakefile
16574
16575     rm -f junk.c
16576   )
16577 done
16578
16579 sed < config.status >> lib-src/config.values \
16580   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16581   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16582   -e 's/^\([^ ]*\) $/\1 ""/' \
16583   -e 's/ 1$/ t/'
16584
16585
16586 exit 0
16587 EOF
16588 chmod +x $CONFIG_STATUS
16589 rm -fr confdefs* $ac_clean_files
16590 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1