3eb15549991dc365525182be7d82ef769343be3f
[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_text_coding| \
344         with_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_postgresql | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         with_netinstall | \
359         with_ipv6_cname | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         quick_build )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 Option \`all' or \`none' must be first in the list.
476 The default is to autodetect native and NAS sound support."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
478             elif test -n "$new_sdefault" ; then
479                 with_native_sound=$new_sdefault
480                 with_nas_sound=$new_sdefault
481                 with_esd_sound=$new_sdefault
482                 new_sdefault=   # reset this
483             fi
484             sound_notfirst=true
485           done
486         ;;
487
488                         "with_athena" )
489           case "$val" in
490             xa | xaw )                    val=xaw    ;;
491             3 | 3d | xaw3d )              val=3d     ;;
492                         ne | nex | next | naxtaw)     val=next   ;;
493                         9 | 95 | xaw95 )              val=95     ;;
494             xp | xpm | xawxpm )           val=xpm    ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`xaw', \`3d', \`next', \`95', or \`xpm'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "with_xim" )
504           case "$val" in
505             y | ye | yes )                val=yes   ;;
506             n | no | non | none )         val=no    ;;
507             x | xl | xli | xlib )         val=xlib  ;;
508             m | mo | mot | moti | motif ) val=motif ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`motif', \`xlib', \`yes', or \`no'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "mail_locking" )
518           case "$val" in
519             lockf )     val=lockf ;;
520             flock )     val=flock ;;
521             file | dot ) val=file  ;;
522             locking )   val=locking  ;;
523             * ) (echo "$progname: Usage error:"
524 echo " " "The \`--$optname' option must have one of these values:
525   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
527           esac
528           eval "$opt=\"$val\""
529         ;;
530
531                 "error_checking" )
532                           
533           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
534             case "$x" in
535                       n | no | non | none ) new_default=no ;;
536               a | al | all )        new_default=yes ;;
537
538               extents )       error_check_extents=yes ;;
539               noextents )     error_check_extents=no ;;
540
541               typecheck )     error_check_typecheck=yes ;;
542               notypecheck )   error_check_typecheck=no ;;
543
544               bufpos )        error_check_bufpos=yes ;;
545               nobufpos )      error_check_bufpos=no ;;
546
547               gc )            error_check_gc=yes ;;
548               nogc )          error_check_gc=no ;;
549
550               malloc )        error_check_malloc=yes ;;
551               nomalloc )      error_check_malloc=no ;;
552
553               byte_code )     error_check_byte_code=yes ;;
554               nobyte_code )   error_check_byte_code=no ;;
555
556               glyphs )     error_check_glyphs=yes ;;
557               noglyphs )   error_check_glyphs=no ;;
558
559               * ) bogus_error_check=yes ;;
560             esac
561             if test "$bogus_error_check" -o \
562                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
563                 if test "$error_check_default" = yes ; then
564                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
565                 else
566                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
567                 fi
568                 (echo "$progname: Usage error:"
569 echo " " "Valid types for the \`--$optname' option are:
570   $types."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
572             elif test -n "$new_default" ; then
573                 error_check_extents=$new_default
574                 error_check_typecheck=$new_default
575                 error_check_bufpos=$new_default
576                 error_check_gc=$new_default
577                 error_check_malloc=$new_default
578                 error_check_byte_code=$new_default
579                 error_check_glyphs=$new_default
580                 new_default=    # reset this
581             fi
582             echeck_notfirst=true
583           done
584         ;;
585
586                                 
587                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
588         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
589         archlibdir | docdir | package_path | moduledir )
590                    if test "$valomitted" = "yes"; then
591              if test "$#" = 0; then
592                  (echo "$progname: Usage error:"
593 echo " " "The \`--$optname' option requires a value."
594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
595              fi
596              val="$1"; shift
597            fi
598            eval "$opt=\"$val\""
599
600                            case "$opt" in
601                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining EXEC_PREFIX_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define EXEC_PREFIX_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining LISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define LISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining SITELISPDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define SITELISPDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining MODULEDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define MODULEDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining ETCDIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define ETCDIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFODIR_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFODIR_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining INFOPATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define INFOPATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
658     Defining PACKAGE_PATH_USER_DEFINED
659 EOF
660 cat >> confdefs.h <<\EOF
661 #define PACKAGE_PATH_USER_DEFINED 1
662 EOF
663 }
664  ;;
665              datadir )
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining INFODIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define INFODIR_USER_DEFINED 1
671 EOF
672 }
673
674                 { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining LISPDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define LISPDIR_USER_DEFINED 1
679 EOF
680 }
681
682                 { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining MODULEDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define MODULEDIR_USER_DEFINED 1
687 EOF
688 }
689
690                 { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining ETCDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define ETCDIR_USER_DEFINED 1
695 EOF
696 }
697
698                 { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705
706                 { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
715     Defining DOCDIR_USER_DEFINED
716 EOF
717 cat >> confdefs.h <<\EOF
718 #define DOCDIR_USER_DEFINED 1
719 EOF
720 }
721  ;;
722              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
723     Defining ARCHLIBDIR_USER_DEFINED
724 EOF
725 cat >> confdefs.h <<\EOF
726 #define ARCHLIBDIR_USER_DEFINED 1
727 EOF
728 }
729  ;;
730            esac
731         ;;
732
733                 "no_create" ) ;;
734
735                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
736
737                 "with_menubars"   | \
738         "with_scrollbars" | \
739         "with_dialogs"    | \
740         "with_widgets" )
741           case "$val" in
742             l | lu | luc | luci | lucid )               val=lucid  ;;
743             mo | mot | moti | motif )                   val=motif  ;;
744             a | at | ath | athe | athen | athena )      val=athena ;;
745             n | no | non | none )                       val=no     ;;
746             y | ye | yes )                              val=yes    ;;
747                         "")                                             val=yes    ;;
748             g | gt | gtk )                              val=gtk    ;;
749             ms | msw )                                  val=msw    ;;
750             * ) (echo "$progname: Usage error:"
751 echo " " "The \`--$optname' option must have one of these values:
752   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
753 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
754           esac
755           eval "$opt=\"$val\""
756         ;;
757
758                 "use_minimal_tagbits" | \
759         "use_indexed_lrecord_implementation" | \
760         "run_in_place"  | \
761         "const_is_losing" | \
762         "with_gnu_make" )
763           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
764         ;;
765
766                 * ) (echo "$progname: Usage error:"
767 echo " " "Unrecognized option: $arg"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
769
770       esac
771     ;;
772
773         *-*-*) configuration="$arg" ;;
774
775         *) (echo "$progname: Usage error:"
776 echo " " "Unrecognized argument: $arg"
777 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
778
779   esac
780 done
781
782
783 test -n "$cpp"      && CPP="$cpp"
784 test -n "$cppflags" && CPPFLAGS="$cppflags"
785 test -n "$libs"     && LIBS="$libs"
786 test -n "$ldflags"  && LDFLAGS="$ldflags"
787
788 eval set x "$quoted_arguments"; shift
789
790 test "$extra_verbose" = "yes" && verbose=yes
791
792 test -n "$with_x" && with_x11="$with_x"
793
794 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
795   test "$with_system_malloc" = "default" && with_system_malloc=yes
796 fi
797
798
799
800 if test "$with_cde $with_tooltalk" = "yes no"; then
801   (echo "$progname: Usage error:"
802 echo " " "--with-cde requires --with-tooltalk"
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804 elif test "$with_tooltalk" = "no" ; then with_cde=no
805 elif test "$with_cde" = "yes"; then with_tooltalk=yes
806 fi
807
808
809 case "$srcdir" in
810
811     "" )
812     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
813       if test -f "$dir/src/lisp.h" -a \
814               -f "$dir/lisp/version.el" ; then
815         srcdir="$dir"
816         break
817       fi
818     done
819     if test -z "$srcdir" ; then
820       (echo "$progname: Usage error:"
821 echo " " "Neither the current directory nor its parent seem to
822   contain the XEmacs sources.  If you do not want to build XEmacs in its
823   source tree, you should run \`$progname' in the directory in which
824   you wish to build XEmacs, using the \`--srcdir' option to say where the
825   sources may be found."
826 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
827     fi
828   ;;
829
830     * )
831     if test ! -f "$srcdir/src/lisp.h" -o \
832             ! -f "$srcdir/lisp/version.el" ; then
833       (echo "$progname: Usage error:"
834 echo " " "The directory specified with the \`--srcdir' option,
835   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
836   either run the \`$progname' script at the top of the XEmacs source
837   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
838 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
839     fi
840   ;;
841 esac
842
843 if test -z "$configuration"; then
844     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
845   if test -z "$configuration"; then
846     (echo "$progname: Usage error:"
847 echo " " "XEmacs has not been ported to this host type.
848 Try explicitly specifying the CONFIGURATION when rerunning configure."
849 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
850   fi
851 fi
852
853 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
854 echo "configure:855: checking whether ln -s works" >&5
855
856 rm -f conftestdata
857 if ln -s X conftestdata 2>/dev/null
858 then
859   rm -f conftestdata
860   ac_cv_prog_LN_S="ln -s"
861 else
862   ac_cv_prog_LN_S=ln
863 fi
864 LN_S="$ac_cv_prog_LN_S"
865 if test "$ac_cv_prog_LN_S" = "ln -s"; then
866   echo "$ac_t""yes" 1>&6
867 else
868   echo "$ac_t""no" 1>&6
869 fi
870
871
872 for dir in lisp etc man info tests; do
873   if test ! -d "$dir" ; then
874     echo Making symbolic link to "$srcdir/$dir"
875     ${LN_S} "$srcdir/$dir" "$dir"
876   fi
877 done
878
879
880 absolute_pwd="`pwd`";
881 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
882 then blddir="$PWD"
883 else blddir="$absolute_pwd"; if test -d "/net"; then
884   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
885   blddir=`echo "$blddir" | \
886    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
887 fi
888 fi
889
890
891 case "$srcdir" in
892   /* ) ;;
893   .  ) srcdir="$blddir" ;;
894   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
895   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
896   srcdir=`echo "$srcdir" | \
897    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
898 fi ;;
899 esac
900
901 if test `pwd` != `sh -c cd $srcdir && pwd`  \
902    && test -f "$srcdir/src/config.h"; then
903   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
904    echo "   as a build directory right now; it has been configured in its own"
905    echo "   right.  To configure in another directory as well, you MUST"
906    echo "   use GNU make.  If you do not have GNU make, then you must"
907    echo "   now do \`make distclean' in $srcdir,"
908    echo "   and then run $progname again.") >&2
909   extrasub='/^VPATH[     ]*=/c\
910 vpath %.c $(srcdir)\
911 vpath %.h $(srcdir)\
912 vpath %.y $(srcdir)\
913 vpath %.l $(srcdir)\
914 vpath %.s $(srcdir)\
915 vpath %.in $(srcdir)'
916 fi
917
918 . "$srcdir/version.sh" || exit 1;
919 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
920 : "${extra_verbose=$beta}"
921 version="${emacs_major_version}.${emacs_minor_version}"
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MAJOR_VERSION = $emacs_major_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MAJOR_VERSION $emacs_major_version
927 EOF
928 }
929
930 { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_MINOR_VERSION = $emacs_minor_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_MINOR_VERSION $emacs_minor_version
935 EOF
936 }
937
938 if test -n "$emacs_beta_version" ; then
939   if test "$beta" = "yes"; then
940         version="${version}-b${emacs_beta_version}"
941         { test "$extra_verbose" = "yes" && cat << EOF
942     Defining EMACS_BETA_VERSION = $emacs_beta_version
943 EOF
944 cat >> confdefs.h <<EOF
945 #define EMACS_BETA_VERSION $emacs_beta_version
946 EOF
947 }
948
949   else
950         version="${version}.${emacs_beta_version}"
951         { test "$extra_verbose" = "yes" && cat << EOF
952     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define EMACS_PATCH_LEVEL $emacs_beta_version
956 EOF
957 }
958
959   fi
960 fi
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining XEMACS_CODENAME = "$xemacs_codename"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define XEMACS_CODENAME "$xemacs_codename"
966 EOF
967 }
968
969 { test "$extra_verbose" = "yes" && cat << EOF
970     Defining EMACS_VERSION = "$version"
971 EOF
972 cat >> confdefs.h <<EOF
973 #define EMACS_VERSION "$version"
974 EOF
975 }
976
977
978 if test "$with_infodock" = "yes"; then
979   if test ! -f ../../ID-INSTALL; then
980     echo "Cannot build InfoDock without InfoDock sources"
981     with_infodock=no
982   fi
983 fi
984
985 if test "$with_infodock" = "yes"; then
986       { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MAJOR_VERSION $infodock_major_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_MINOR_VERSION $infodock_minor_version
999 EOF
1000 }
1001
1002   { test "$extra_verbose" = "yes" && cat << EOF
1003     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1004 EOF
1005 cat >> confdefs.h <<EOF
1006 #define INFODOCK_BUILD_VERSION $infodock_build_version
1007 EOF
1008 }
1009
1010   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1011   PROGNAME=infodock
1012   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1013 else
1014   PROGNAME=xemacs
1015 fi
1016
1017 { test "$extra_verbose" = "yes" && cat << EOF
1018     Defining EMACS_PROGNAME = "$PROGNAME"
1019 EOF
1020 cat >> confdefs.h <<EOF
1021 #define EMACS_PROGNAME "$PROGNAME"
1022 EOF
1023 }
1024
1025
1026 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1027 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_EXTENTS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_EXTENTS 1
1032 EOF
1033 }
1034
1035 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_TYPECHECK
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_TYPECHECK 1
1040 EOF
1041 }
1042
1043 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_BUFPOS
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_BUFPOS 1
1048 EOF
1049 }
1050
1051 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_GC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_GC 1
1056 EOF
1057 }
1058
1059 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_MALLOC
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_MALLOC 1
1064 EOF
1065 }
1066
1067 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_BYTE_CODE
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_BYTE_CODE 1
1072 EOF
1073 }
1074
1075 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining ERROR_CHECK_GLYPHS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define ERROR_CHECK_GLYPHS 1
1080 EOF
1081 }
1082
1083 if test "${debug:=$beta}" = "yes"; then
1084   use_assertions=yes memory_usage_stats=yes
1085   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"debug.o\""
1087  fi
1088   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"tests.o\""
1090  fi
1091   { test "$extra_verbose" = "yes" && cat << \EOF
1092     Defining DEBUG_XEMACS
1093 EOF
1094 cat >> confdefs.h <<\EOF
1095 #define DEBUG_XEMACS 1
1096 EOF
1097 }
1098
1099 fi
1100 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining USE_ASSERTIONS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define USE_ASSERTIONS 1
1105 EOF
1106 }
1107
1108 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1109     Defining MEMORY_USAGE_STATS
1110 EOF
1111 cat >> confdefs.h <<\EOF
1112 #define MEMORY_USAGE_STATS 1
1113 EOF
1114 }
1115
1116
1117
1118 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1119 echo "configure:1120: checking "host system type"" >&5
1120 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1121 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1122 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 echo "$ac_t""$configuration" 1>&6
1125
1126
1127
1128
1129
1130 machine='' opsys=''
1131
1132 case "$canonical" in
1133   sparc-*-*        ) machine=sparc ;;
1134   alpha*-*-*       ) machine=alpha ;;
1135   vax-*-*          ) machine=vax ;;
1136   mips-dec-*       ) machine=pmax ;;
1137   mips-sgi-irix6*  ) machine=iris6d ;;
1138   mips-sgi-*       ) machine=iris4d ;;
1139   mips*-linux      ) machine=mips ;;
1140   romp-ibm-*       ) machine=ibmrt ;;
1141   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1142   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1143   powerpc*-*       ) machine=powerpc ;;
1144   hppa-*-*         ) machine=hp800 ;;
1145   m88k-dg-*        ) machine=aviion ;;
1146   m68*-sony-*      ) machine=news ;;
1147   mips-sony-*      ) machine=news-risc ;;
1148   clipper-*        ) machine=clipper ;;
1149   arm*             ) machine=arm ;;
1150   ns32k-*          ) machine=ns32000 ;;
1151 esac
1152
1153 case "$canonical" in
1154   *-*-linux*    ) opsys=linux ;;
1155   *-*-netbsd*   ) opsys=netbsd ;;
1156   *-*-openbsd*  ) opsys=openbsd ;;
1157   *-*-nextstep* ) opsys=nextstep ;;
1158   *-*-vms       ) opsys=vms ;;
1159
1160     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1161   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1162   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1163   *-dec-osf3*                ) opsys=decosf3-1 ;;
1164   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1165
1166     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1167   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1168   *-*-ultrix* )         opsys=ultrix4-3 ;;
1169
1170     *-*-aix3.1*  ) opsys=aix3-1 ;;
1171   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1172   *-*-aix3*    ) opsys=aix3-2   ;;
1173   *-*-aix4.0*  ) opsys=aix4     ;;
1174   *-*-aix4.1*  ) opsys=aix4-1   ;;
1175   *-*-aix4*    ) opsys=aix4-2   ;;
1176
1177     *-gnu* )                    opsys=gnu    ;;
1178   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1179   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1180   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1181   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1182   *-*-aos*   )                  opsys=bsd4-3 ;;
1183   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1184   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1185   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1186   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1187   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1188   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1189         if test -z "$NON_GNU_CPP" ; then
1190           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1191             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1192           done
1193         fi
1194         opsys=usg5-4-2 ;;
1195     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1196     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1197 esac
1198
1199 case "$canonical" in
1200
1201     *-*-netbsd* )
1202     case "$canonical" in
1203       i[3-9]86-*-netbsd*) machine=intel386 ;;
1204       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1205                                             machine=hp9000s300 ;;
1206       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1207       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1208     esac
1209   ;;
1210
1211     *-*-openbsd* )
1212     case "${canonical}" in
1213       i386-*-openbsd*)          machine=intel386 ;;
1214       m68k-*-openbsd*)          machine=hp9000s300 ;;
1215       mipsel-*-openbsd*)        machine=pmax ;;
1216      esac
1217    ;;
1218
1219     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1220   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1221
1222     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1223   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1224
1225     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1226
1227     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1228
1229     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1230
1231     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1232
1233     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1234
1235     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1236   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1237   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1238
1239   
1240     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1241
1242     *-convex-bsd* | *-convex-convexos* )
1243     machine=convex opsys=bsd4-3
1244     NON_GNU_CPP="cc -E -P"
1245   ;;
1246
1247     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1248
1249     *-*-darwin*)
1250     opsys=darwin
1251     RANLIB="ranlib -c"     ;;
1252
1253     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1254   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1255   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1256   m88k-dg-dgux*                           ) opsys=dgux     ;;
1257
1258     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1259   m88k-motorola-sysv4* )
1260                     machine=delta88k opsys=usg5-4-2
1261   ;;
1262   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1263
1264     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1265   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1266
1267     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1268
1269     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1270   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1271   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1272
1273       m88k-harris-cxux* )
1274         case "`uname -r`" in
1275        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1276        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1277     esac
1278     NON_GNU_CPP="/lib/cpp"
1279   ;;
1280     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1281     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1282
1283     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1284
1285     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1286
1287     *-hp-hpux* )
1288         case "$canonical" in
1289       m68*  ) machine=hp9000s300 ;;
1290       hppa* ) machine=hp800      ;;
1291     esac
1292
1293     case "$canonical" in
1294       *-hp-hpux7*  )  opsys=hpux   ;;
1295       *-hp-hpux8*  )  opsys=hpux8  ;;
1296       *-hp-hpux9*  )  opsys=hpux9  ;;
1297       *-hp-hpux10* )  opsys=hpux10 ;;
1298       *-hp-hpux11* )  opsys=hpux11 ;;
1299       *            )  opsys=hpux   ;;
1300     esac
1301
1302         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1303    echo "    xemacs will be linked with \"strcat.o\""
1304  fi ;; esac
1305
1306     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1307         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1308     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1309
1310     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1311   ;;
1312
1313     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1314   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1315
1316     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1317   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1318   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1319   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1320   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1321   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1322
1323     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1324   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1325
1326     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1327
1328     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1329
1330     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1331
1332     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1333
1334       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1335
1336     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1337
1338     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1339
1340     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1341
1342     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1343
1344         mips-mips-usg* ) machine=mips4 ;;
1345   mips-mips-riscos4 )
1346     machine=mips4
1347     NON_GNU_CC="cc -systype bsd43"
1348     NON_GNU_CPP="cc -systype bsd43 -E"
1349     case "$canonical" in
1350       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1351       mips-mips-riscos5* ) opsys=riscos5 ;;
1352     esac
1353   ;;
1354   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1355   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1356
1357     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1358
1359     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1360
1361     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1362   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1363
1364     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1365
1366     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1367
1368     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1369
1370     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1371
1372     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1373   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1374
1375     mips-siemens-sysv* | mips-sni-sysv*)
1376     machine=mips-siemens opsys=usg5-4
1377     NON_GNU_CC=/usr/ccs/bin/cc
1378     NON_GNU_CPP=/usr/ccs/lib/cpp
1379   ;;
1380
1381     mips-nec-sysv*)
1382     machine=mips-nec
1383     NON_GNU_CC=/usr/ccs/bin/cc
1384     NON_GNU_CPP=/usr/ccs/lib/cpp
1385   ;;
1386
1387       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1388   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1389     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1390   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1391   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1392   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1393   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1394   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1395   mips-sgi-irix*      ) opsys=irix5-0 ;;
1396
1397     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1398   *-sony-news* ) opsys=newsos5 ;;
1399
1400     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1401
1402     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1403         case "$canonical" in
1404       m68*-sunos1* )             machine=sun1     ;;
1405       m68*-sunos2* )             machine=sun2     ;;
1406       m68* )                     machine=sun3     ;;
1407       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1408       i*86-*-* )                 machine=intel386 ;;
1409       rs6000* )                  machine=rs6000   ;;
1410     esac
1411
1412         case "$canonical" in *-sunos5*)
1413       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1414     esac
1415
1416                     case "$canonical" in
1417       *-sunos4* )
1418         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1419         : ;;
1420       *-solaris2* )
1421         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1422         RANLIB=':' ;;
1423     esac
1424
1425     case "$canonical" in
1426       *-solaris*          )
1427         opsys=sol2
1428         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1429         { test "$extra_verbose" = "yes" && cat << EOF
1430     Defining OS_RELEASE = $os_release
1431 EOF
1432 cat >> confdefs.h <<EOF
1433 #define OS_RELEASE $os_release
1434 EOF
1435 }
1436  ;;
1437
1438             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1439       *-sunos4.0*         ) opsys=sunos4-0      ;;
1440       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1441       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1442       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1443       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1444       *-mach*             ) opsys=mach-bsd4-3   ;;
1445       *                   ) opsys=bsd4-2        ;;
1446     esac
1447
1448     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1449
1450         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1451   ;;
1452
1453     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1454
1455     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1456   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1457
1458     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1459
1460     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1461
1462     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1463       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1464
1465     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1466
1467     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1468
1469     vax-dec-* )
1470     case "$canonical" in
1471       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1472       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1473       *-mach* )                         opsys=mach-bsd4-3 ;;
1474     esac
1475   ;;
1476
1477     ns16k-whitechapel-* ) machine=mg1 ;;
1478
1479     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1480
1481     i[3-9]86-*-* )
1482     machine=intel386
1483     case "$canonical" in
1484       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1485       *-isc2.2* )               opsys=isc2-2 ;;
1486       *-isc4.0* )               opsys=isc4-0 ;;
1487       *-isc4.* )                opsys=isc4-1
1488                                 GCC_TEST_OPTIONS=-posix
1489                                 NON_GCC_TEST_OPTIONS=-Xp
1490                                 ;;
1491       *-isc* )                  opsys=isc3-0 ;;
1492       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1493       *-esix* )                 opsys=esix ;;
1494       *-mach* )                 opsys=mach-bsd4-3 ;;
1495       *-xenix* )                opsys=xenix ;;
1496       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1497       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1498       *-bsdi4* )                opsys=bsdos4 ;;
1499       *-bsdi3* )                opsys=bsdos3 ;;
1500       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1501       *-bsdi2* )                opsys=bsdos2 ;;
1502       *-sco3.2v5* )             opsys=sco5 ;;
1503       *-sysv5* )                opsys=sco7 ;;
1504       *-386bsd* )               opsys=386bsd ;;
1505       *-freebsd* )              opsys=freebsd ;;
1506       *-nextstep* )             opsys=nextstep ;;
1507       *-pc-cygwin* )            opsys=cygwin32 ;;
1508       *-pc-mingw* )             opsys=mingw32 ;
1509                                 test -z "$with_tty" && with_tty="no";;
1510           esac
1511   ;;
1512
1513     m68k-*-linux* ) machine=m68k opsys=linux ;;
1514
1515 esac
1516
1517 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1518
1519 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1520
1521 if test -r "${srcdir}/src/m/${machine}.h"; then
1522   machfile="m/${machine}.h"
1523   { test "$extra_verbose" = "yes" && cat << EOF
1524     Defining config_machfile = "$machfile"
1525 EOF
1526 cat >> confdefs.h <<EOF
1527 #define config_machfile "$machfile"
1528 EOF
1529 }
1530
1531 else
1532   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1533   echo "Using configure-time autodetection only."
1534 fi
1535
1536 if test -r "${srcdir}/src/s/${opsys}.h"; then
1537   opsysfile="s/${opsys}.h"
1538   { test "$extra_verbose" = "yes" && cat << EOF
1539     Defining config_opsysfile = "$opsysfile"
1540 EOF
1541 cat >> confdefs.h <<EOF
1542 #define config_opsysfile "$opsysfile"
1543 EOF
1544 }
1545
1546 else
1547   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1548   echo "Using configure-time autodetection only."
1549 fi
1550
1551
1552 if test -z "$pdump"; then
1553   case "$opsys" in
1554     linux* )      pdump=yes ;;        *-*-darwin* ) pdump=yes ;;        *)            pdump=no ;;
1555   esac
1556 fi
1557
1558 if test -z "$dynamic"; then
1559   case "$opsys" in
1560     hpux* | sunos4* ) dynamic=no ;;
1561     *) dynamic=yes ;;
1562   esac
1563 fi
1564 if test "$dynamic" = "yes"; then
1565   case "$opsys" in
1566     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1567     decosf* ) ld_call_shared="-call_shared" ;;
1568   esac
1569 else   case "$opsys" in
1570     sol2 )
1571       echo "Static linking is not supported on Solaris 2."
1572       echo "Rerun configure without specifying --dynamic=no."
1573       exit 1 ;;
1574     linux   ) ld_call_shared="-Bstatic" ;;
1575     decosf* ) ld_call_shared="-non_shared" ;;
1576   esac
1577 fi
1578
1579 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1580
1581 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1582 { test "$extra_verbose" = "yes" && cat << EOF
1583     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1584 EOF
1585 cat >> confdefs.h <<EOF
1586 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1587 EOF
1588 }
1589
1590
1591
1592 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1593 if test "$with_workshop $with_tooltalk" = "yes no"; then
1594   (echo "$progname: Usage error:"
1595 echo " " "--with-workshop requires --with-tooltalk"
1596 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1597 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1598 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1599 fi
1600
1601 if test "$with_workshop" = "yes"; then
1602   { test "$extra_verbose" = "yes" && cat << \EOF
1603     Defining SUNPRO
1604 EOF
1605 cat >> confdefs.h <<\EOF
1606 #define SUNPRO 1
1607 EOF
1608 }
1609
1610   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1611    echo "    xemacs will be linked with \"sunpro.o\""
1612  fi
1613 fi
1614
1615 if test "$with_clash_detection" != "no"; then
1616   { test "$extra_verbose" = "yes" && cat << \EOF
1617     Defining CLASH_DETECTION
1618 EOF
1619 cat >> confdefs.h <<\EOF
1620 #define CLASH_DETECTION 1
1621 EOF
1622 }
1623
1624   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1625    echo "    xemacs will be linked with \"filelock.o\""
1626  fi
1627 fi
1628
1629 test -n "$compiler" && CC="$compiler"
1630 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1631 fi
1632
1633 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1634 if test "${CFLAGS-unset}" != unset
1635   then cflags_specified=yes;
1636   else cflags_specified=no;
1637 fi
1638
1639 xe_save_CFLAGS="$CFLAGS"
1640
1641 # Extract the first word of "gcc", so it can be a program name with args.
1642 set dummy gcc; ac_word=$2
1643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1644 echo "configure:1645: checking for $ac_word" >&5
1645
1646 if test -n "$CC"; then
1647   ac_cv_prog_CC="$CC" # Let the user override the test.
1648 else
1649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1650   ac_dummy="$PATH"
1651   for ac_dir in $ac_dummy; do
1652     test -z "$ac_dir" && ac_dir=.
1653     if test -f $ac_dir/$ac_word; then
1654       ac_cv_prog_CC="gcc"
1655       break
1656     fi
1657   done
1658   IFS="$ac_save_ifs"
1659 fi
1660 CC="$ac_cv_prog_CC"
1661 if test -n "$CC"; then
1662   echo "$ac_t""$CC" 1>&6
1663 else
1664   echo "$ac_t""no" 1>&6
1665 fi
1666
1667 if test -z "$CC"; then
1668   # Extract the first word of "cc", so it can be a program name with args.
1669 set dummy cc; ac_word=$2
1670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1671 echo "configure:1672: checking for $ac_word" >&5
1672
1673 if test -n "$CC"; then
1674   ac_cv_prog_CC="$CC" # Let the user override the test.
1675 else
1676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1677   ac_prog_rejected=no
1678   ac_dummy="$PATH"
1679   for ac_dir in $ac_dummy; do
1680     test -z "$ac_dir" && ac_dir=.
1681     if test -f $ac_dir/$ac_word; then
1682       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1683         ac_prog_rejected=yes
1684         continue
1685       fi
1686       ac_cv_prog_CC="cc"
1687       break
1688     fi
1689   done
1690   IFS="$ac_save_ifs"
1691 if test $ac_prog_rejected = yes; then
1692   # We found a bogon in the path, so make sure we never use it.
1693   set dummy $ac_cv_prog_CC
1694   shift
1695   if test $# -gt 0; then
1696     # We chose a different compiler from the bogus one.
1697     # However, it has the same basename, so the bogon will be chosen
1698     # first if we set CC to just the basename; use the full file name.
1699     shift
1700     set dummy "$ac_dir/$ac_word" "$@"
1701     shift
1702     ac_cv_prog_CC="$@"
1703   fi
1704 fi
1705 fi
1706 CC="$ac_cv_prog_CC"
1707 if test -n "$CC"; then
1708   echo "$ac_t""$CC" 1>&6
1709 else
1710   echo "$ac_t""no" 1>&6
1711 fi
1712
1713   if test -z "$CC"; then
1714     case "`uname -s`" in
1715     *win32* | *WIN32*)
1716       # Extract the first word of "cl", so it can be a program name with args.
1717 set dummy cl; ac_word=$2
1718 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1719 echo "configure:1720: checking for $ac_word" >&5
1720
1721 if test -n "$CC"; then
1722   ac_cv_prog_CC="$CC" # Let the user override the test.
1723 else
1724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1725   ac_dummy="$PATH"
1726   for ac_dir in $ac_dummy; do
1727     test -z "$ac_dir" && ac_dir=.
1728     if test -f $ac_dir/$ac_word; then
1729       ac_cv_prog_CC="cl"
1730       break
1731     fi
1732   done
1733   IFS="$ac_save_ifs"
1734 fi
1735 CC="$ac_cv_prog_CC"
1736 if test -n "$CC"; then
1737   echo "$ac_t""$CC" 1>&6
1738 else
1739   echo "$ac_t""no" 1>&6
1740 fi
1741  ;;
1742     esac
1743   fi
1744   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1745 fi
1746
1747 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1748 echo "configure:1749: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1749
1750 ac_ext=c
1751 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1752 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1753 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'
1754 ac_cpp='$CPP '"$xe_cppflags"
1755 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1756 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1757 cross_compiling=no
1758
1759 cat > conftest.$ac_ext << EOF
1760
1761 #line 1762 "configure"
1762 #include "confdefs.h"
1763
1764 main(){return(0);}
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1767   ac_cv_prog_cc_works=yes
1768   # If we can't run a trivial program, we are probably using a cross compiler.
1769   if (./conftest; exit) 2>/dev/null; then
1770     ac_cv_prog_cc_cross=no
1771   else
1772     ac_cv_prog_cc_cross=yes
1773   fi
1774 else
1775   echo "configure: failed program was:" >&5
1776   cat conftest.$ac_ext >&5
1777   ac_cv_prog_cc_works=no
1778 fi
1779 rm -fr conftest*
1780 ac_ext=c
1781 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1782 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1783 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'
1784 ac_cpp='$CPP '"$xe_cppflags"
1785 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1786 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1787 cross_compiling=no
1788
1789 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1790 if test $ac_cv_prog_cc_works = no; then
1791   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1792 fi
1793 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1794 echo "configure:1795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1795 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1796 cross_compiling=$ac_cv_prog_cc_cross
1797
1798 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1799 echo "configure:1800: checking whether we are using GNU C" >&5
1800
1801 cat > conftest.c <<EOF
1802 #ifdef __GNUC__
1803   yes;
1804 #endif
1805 EOF
1806 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1807   ac_cv_prog_gcc=yes
1808 else
1809   ac_cv_prog_gcc=no
1810 fi
1811
1812 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1813
1814 if test $ac_cv_prog_gcc = yes; then
1815   GCC=yes
1816 else
1817   GCC=
1818 fi
1819
1820 ac_test_CFLAGS="${CFLAGS+set}"
1821 ac_save_CFLAGS="$CFLAGS"
1822 CFLAGS=
1823 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1824 echo "configure:1825: checking whether ${CC-cc} accepts -g" >&5
1825
1826 echo 'void f(){}' > conftest.c
1827 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1828   ac_cv_prog_cc_g=yes
1829 else
1830   ac_cv_prog_cc_g=no
1831 fi
1832 rm -f conftest*
1833
1834
1835 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1836 if test "$ac_test_CFLAGS" = set; then
1837   CFLAGS="$ac_save_CFLAGS"
1838 elif test $ac_cv_prog_cc_g = yes; then
1839   if test "$GCC" = yes; then
1840     CFLAGS="-g -O2"
1841   else
1842     CFLAGS="-g"
1843   fi
1844 else
1845   if test "$GCC" = yes; then
1846     CFLAGS="-O2"
1847   else
1848     CFLAGS=
1849   fi
1850 fi
1851  
1852 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1853   CC=${NON_GNU_CC-cc}
1854   # Extract the first word of "gcc", so it can be a program name with args.
1855 set dummy gcc; ac_word=$2
1856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1857 echo "configure:1858: checking for $ac_word" >&5
1858
1859 if test -n "$CC"; then
1860   ac_cv_prog_CC="$CC" # Let the user override the test.
1861 else
1862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1863   ac_dummy="$PATH"
1864   for ac_dir in $ac_dummy; do
1865     test -z "$ac_dir" && ac_dir=.
1866     if test -f $ac_dir/$ac_word; then
1867       ac_cv_prog_CC="gcc"
1868       break
1869     fi
1870   done
1871   IFS="$ac_save_ifs"
1872 fi
1873 CC="$ac_cv_prog_CC"
1874 if test -n "$CC"; then
1875   echo "$ac_t""$CC" 1>&6
1876 else
1877   echo "$ac_t""no" 1>&6
1878 fi
1879
1880 if test -z "$CC"; then
1881   # Extract the first word of "cc", so it can be a program name with args.
1882 set dummy cc; ac_word=$2
1883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1884 echo "configure:1885: checking for $ac_word" >&5
1885
1886 if test -n "$CC"; then
1887   ac_cv_prog_CC="$CC" # Let the user override the test.
1888 else
1889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1890   ac_prog_rejected=no
1891   ac_dummy="$PATH"
1892   for ac_dir in $ac_dummy; do
1893     test -z "$ac_dir" && ac_dir=.
1894     if test -f $ac_dir/$ac_word; then
1895       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1896         ac_prog_rejected=yes
1897         continue
1898       fi
1899       ac_cv_prog_CC="cc"
1900       break
1901     fi
1902   done
1903   IFS="$ac_save_ifs"
1904 if test $ac_prog_rejected = yes; then
1905   # We found a bogon in the path, so make sure we never use it.
1906   set dummy $ac_cv_prog_CC
1907   shift
1908   if test $# -gt 0; then
1909     # We chose a different compiler from the bogus one.
1910     # However, it has the same basename, so the bogon will be chosen
1911     # first if we set CC to just the basename; use the full file name.
1912     shift
1913     set dummy "$ac_dir/$ac_word" "$@"
1914     shift
1915     ac_cv_prog_CC="$@"
1916   fi
1917 fi
1918 fi
1919 CC="$ac_cv_prog_CC"
1920 if test -n "$CC"; then
1921   echo "$ac_t""$CC" 1>&6
1922 else
1923   echo "$ac_t""no" 1>&6
1924 fi
1925
1926   if test -z "$CC"; then
1927     case "`uname -s`" in
1928     *win32* | *WIN32*)
1929       # Extract the first word of "cl", so it can be a program name with args.
1930 set dummy cl; ac_word=$2
1931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1932 echo "configure:1933: checking for $ac_word" >&5
1933
1934 if test -n "$CC"; then
1935   ac_cv_prog_CC="$CC" # Let the user override the test.
1936 else
1937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1938   ac_dummy="$PATH"
1939   for ac_dir in $ac_dummy; do
1940     test -z "$ac_dir" && ac_dir=.
1941     if test -f $ac_dir/$ac_word; then
1942       ac_cv_prog_CC="cl"
1943       break
1944     fi
1945   done
1946   IFS="$ac_save_ifs"
1947 fi
1948 CC="$ac_cv_prog_CC"
1949 if test -n "$CC"; then
1950   echo "$ac_t""$CC" 1>&6
1951 else
1952   echo "$ac_t""no" 1>&6
1953 fi
1954  ;;
1955     esac
1956   fi
1957   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1958 fi
1959
1960 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1962
1963 ac_ext=c
1964 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1965 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1966 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'
1967 ac_cpp='$CPP '"$xe_cppflags"
1968 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1969 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1970 cross_compiling=no
1971
1972 cat > conftest.$ac_ext << EOF
1973
1974 #line 1975 "configure"
1975 #include "confdefs.h"
1976
1977 main(){return(0);}
1978 EOF
1979 if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1980   ac_cv_prog_cc_works=yes
1981   # If we can't run a trivial program, we are probably using a cross compiler.
1982   if (./conftest; exit) 2>/dev/null; then
1983     ac_cv_prog_cc_cross=no
1984   else
1985     ac_cv_prog_cc_cross=yes
1986   fi
1987 else
1988   echo "configure: failed program was:" >&5
1989   cat conftest.$ac_ext >&5
1990   ac_cv_prog_cc_works=no
1991 fi
1992 rm -fr conftest*
1993 ac_ext=c
1994 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1995 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1996 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'
1997 ac_cpp='$CPP '"$xe_cppflags"
1998 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1999 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2000 cross_compiling=no
2001
2002 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2003 if test $ac_cv_prog_cc_works = no; then
2004   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2005 fi
2006 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2007 echo "configure:2008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2008 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2009 cross_compiling=$ac_cv_prog_cc_cross
2010
2011 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether we are using GNU C" >&5
2013
2014 cat > conftest.c <<EOF
2015 #ifdef __GNUC__
2016   yes;
2017 #endif
2018 EOF
2019 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2020   ac_cv_prog_gcc=yes
2021 else
2022   ac_cv_prog_gcc=no
2023 fi
2024
2025 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2026
2027 if test $ac_cv_prog_gcc = yes; then
2028   GCC=yes
2029 else
2030   GCC=
2031 fi
2032
2033 ac_test_CFLAGS="${CFLAGS+set}"
2034 ac_save_CFLAGS="$CFLAGS"
2035 CFLAGS=
2036 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
2038
2039 echo 'void f(){}' > conftest.c
2040 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2041   ac_cv_prog_cc_g=yes
2042 else
2043   ac_cv_prog_cc_g=no
2044 fi
2045 rm -f conftest*
2046
2047
2048 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2049 if test "$ac_test_CFLAGS" = set; then
2050   CFLAGS="$ac_save_CFLAGS"
2051 elif test $ac_cv_prog_cc_g = yes; then
2052   if test "$GCC" = yes; then
2053     CFLAGS="-g -O2"
2054   else
2055     CFLAGS="-g"
2056   fi
2057 else
2058   if test "$GCC" = yes; then
2059     CFLAGS="-O2"
2060   else
2061     CFLAGS=
2062   fi
2063 fi
2064
2065 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2066   CC=gcc
2067   # Extract the first word of "gcc", so it can be a program name with args.
2068 set dummy gcc; ac_word=$2
2069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2070 echo "configure:2071: checking for $ac_word" >&5
2071
2072 if test -n "$CC"; then
2073   ac_cv_prog_CC="$CC" # Let the user override the test.
2074 else
2075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2076   ac_dummy="$PATH"
2077   for ac_dir in $ac_dummy; do
2078     test -z "$ac_dir" && ac_dir=.
2079     if test -f $ac_dir/$ac_word; then
2080       ac_cv_prog_CC="gcc"
2081       break
2082     fi
2083   done
2084   IFS="$ac_save_ifs"
2085 fi
2086 CC="$ac_cv_prog_CC"
2087 if test -n "$CC"; then
2088   echo "$ac_t""$CC" 1>&6
2089 else
2090   echo "$ac_t""no" 1>&6
2091 fi
2092
2093 if test -z "$CC"; then
2094   # Extract the first word of "cc", so it can be a program name with args.
2095 set dummy cc; ac_word=$2
2096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2097 echo "configure:2098: checking for $ac_word" >&5
2098
2099 if test -n "$CC"; then
2100   ac_cv_prog_CC="$CC" # Let the user override the test.
2101 else
2102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2103   ac_prog_rejected=no
2104   ac_dummy="$PATH"
2105   for ac_dir in $ac_dummy; do
2106     test -z "$ac_dir" && ac_dir=.
2107     if test -f $ac_dir/$ac_word; then
2108       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2109         ac_prog_rejected=yes
2110         continue
2111       fi
2112       ac_cv_prog_CC="cc"
2113       break
2114     fi
2115   done
2116   IFS="$ac_save_ifs"
2117 if test $ac_prog_rejected = yes; then
2118   # We found a bogon in the path, so make sure we never use it.
2119   set dummy $ac_cv_prog_CC
2120   shift
2121   if test $# -gt 0; then
2122     # We chose a different compiler from the bogus one.
2123     # However, it has the same basename, so the bogon will be chosen
2124     # first if we set CC to just the basename; use the full file name.
2125     shift
2126     set dummy "$ac_dir/$ac_word" "$@"
2127     shift
2128     ac_cv_prog_CC="$@"
2129   fi
2130 fi
2131 fi
2132 CC="$ac_cv_prog_CC"
2133 if test -n "$CC"; then
2134   echo "$ac_t""$CC" 1>&6
2135 else
2136   echo "$ac_t""no" 1>&6
2137 fi
2138
2139   if test -z "$CC"; then
2140     case "`uname -s`" in
2141     *win32* | *WIN32*)
2142       # Extract the first word of "cl", so it can be a program name with args.
2143 set dummy cl; ac_word=$2
2144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2145 echo "configure:2146: checking for $ac_word" >&5
2146
2147 if test -n "$CC"; then
2148   ac_cv_prog_CC="$CC" # Let the user override the test.
2149 else
2150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2151   ac_dummy="$PATH"
2152   for ac_dir in $ac_dummy; do
2153     test -z "$ac_dir" && ac_dir=.
2154     if test -f $ac_dir/$ac_word; then
2155       ac_cv_prog_CC="cl"
2156       break
2157     fi
2158   done
2159   IFS="$ac_save_ifs"
2160 fi
2161 CC="$ac_cv_prog_CC"
2162 if test -n "$CC"; then
2163   echo "$ac_t""$CC" 1>&6
2164 else
2165   echo "$ac_t""no" 1>&6
2166 fi
2167  ;;
2168     esac
2169   fi
2170   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2171 fi
2172
2173 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2174 echo "configure:2175: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2175
2176 ac_ext=c
2177 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2178 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2179 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'
2180 ac_cpp='$CPP '"$xe_cppflags"
2181 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2182 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2183 cross_compiling=no
2184
2185 cat > conftest.$ac_ext << EOF
2186
2187 #line 2188 "configure"
2188 #include "confdefs.h"
2189
2190 main(){return(0);}
2191 EOF
2192 if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2193   ac_cv_prog_cc_works=yes
2194   # If we can't run a trivial program, we are probably using a cross compiler.
2195   if (./conftest; exit) 2>/dev/null; then
2196     ac_cv_prog_cc_cross=no
2197   else
2198     ac_cv_prog_cc_cross=yes
2199   fi
2200 else
2201   echo "configure: failed program was:" >&5
2202   cat conftest.$ac_ext >&5
2203   ac_cv_prog_cc_works=no
2204 fi
2205 rm -fr conftest*
2206 ac_ext=c
2207 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2208 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2209 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'
2210 ac_cpp='$CPP '"$xe_cppflags"
2211 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2212 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2213 cross_compiling=no
2214
2215 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2216 if test $ac_cv_prog_cc_works = no; then
2217   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2218 fi
2219 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2220 echo "configure:2221: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2221 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2222 cross_compiling=$ac_cv_prog_cc_cross
2223
2224 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2225 echo "configure:2226: checking whether we are using GNU C" >&5
2226
2227 cat > conftest.c <<EOF
2228 #ifdef __GNUC__
2229   yes;
2230 #endif
2231 EOF
2232 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2233   ac_cv_prog_gcc=yes
2234 else
2235   ac_cv_prog_gcc=no
2236 fi
2237
2238 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2239
2240 if test $ac_cv_prog_gcc = yes; then
2241   GCC=yes
2242 else
2243   GCC=
2244 fi
2245
2246 ac_test_CFLAGS="${CFLAGS+set}"
2247 ac_save_CFLAGS="$CFLAGS"
2248 CFLAGS=
2249 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2250 echo "configure:2251: checking whether ${CC-cc} accepts -g" >&5
2251
2252 echo 'void f(){}' > conftest.c
2253 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2254   ac_cv_prog_cc_g=yes
2255 else
2256   ac_cv_prog_cc_g=no
2257 fi
2258 rm -f conftest*
2259
2260
2261 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2262 if test "$ac_test_CFLAGS" = set; then
2263   CFLAGS="$ac_save_CFLAGS"
2264 elif test $ac_cv_prog_cc_g = yes; then
2265   if test "$GCC" = yes; then
2266     CFLAGS="-g -O2"
2267   else
2268     CFLAGS="-g"
2269   fi
2270 else
2271   if test "$GCC" = yes; then
2272     CFLAGS="-O2"
2273   else
2274     CFLAGS=
2275   fi
2276 fi
2277
2278 fi
2279 CFLAGS="$xe_save_CFLAGS"
2280
2281
2282 test -n "$CPP" -a -d "$CPP" && CPP=
2283
2284 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2285
2286 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2287 echo "configure:2288: checking how to run the C preprocessor" >&5
2288 # On Suns, sometimes $CPP names a directory.
2289 if test -n "$CPP" && test -d "$CPP"; then
2290   CPP=
2291 fi
2292 if test -z "$CPP"; then
2293
2294   # This must be in double quotes, not single quotes, because CPP may get
2295   # substituted into the Makefile and "${CC-cc}" will confuse make.
2296   CPP="${CC-cc} -E"
2297   # On the NeXT, cc -E runs the code through the compiler's parser,
2298   # not just through cpp.
2299   cat > conftest.$ac_ext <<EOF
2300 #line 2301 "configure"
2301 #include "confdefs.h"
2302 #include <assert.h>
2303 Syntax Error
2304 EOF
2305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2306 { (eval echo configure:2307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2308 if test -z "$ac_err"; then
2309   :
2310 else
2311   echo "$ac_err" >&5
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -rf conftest*
2315   CPP="${CC-cc} -E -traditional-cpp"
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <assert.h>
2320 Syntax Error
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   :
2327 else
2328   echo "$ac_err" >&5
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   CPP="${CC-cc} -nologo -E"
2333   cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <assert.h>
2337 Syntax Error
2338 EOF
2339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2340 { (eval echo configure:2341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2342 if test -z "$ac_err"; then
2343   :
2344 else
2345   echo "$ac_err" >&5
2346   echo "configure: failed program was:" >&5
2347   cat conftest.$ac_ext >&5
2348   rm -rf conftest*
2349   CPP=/lib/cpp
2350 fi
2351 rm -f conftest*
2352 fi
2353 rm -f conftest*
2354 fi
2355 rm -f conftest*
2356   ac_cv_prog_CPP="$CPP"
2357   CPP="$ac_cv_prog_CPP"
2358 else
2359   ac_cv_prog_CPP="$CPP"
2360 fi
2361 echo "$ac_t""$CPP" 1>&6
2362
2363
2364
2365 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2366 echo "configure:2367: checking for AIX" >&5
2367 cat > conftest.$ac_ext <<EOF
2368 #line 2369 "configure"
2369 #include "confdefs.h"
2370 #ifdef _AIX
2371   yes
2372 #endif
2373
2374 EOF
2375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2376   egrep "yes" >/dev/null 2>&1; then
2377   rm -rf conftest*
2378   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2379     Defining _ALL_SOURCE
2380 EOF
2381 cat >> confdefs.h <<\EOF
2382 #define _ALL_SOURCE 1
2383 EOF
2384 }
2385
2386 else
2387   rm -rf conftest*
2388   echo "$ac_t""no" 1>&6
2389 fi
2390 rm -f conftest*
2391
2392  
2393
2394 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2395 echo "configure:2396: checking for GNU libc" >&5
2396 cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <features.h>
2400 int main() {
2401
2402 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2403 #error Not a GNU libc system :-(
2404 ******* ======= ******** &&&&&&&&
2405 #endif
2406
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2410   rm -rf conftest*
2411   have_glibc=yes
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   have_glibc=no
2417 fi
2418 rm -f conftest*
2419 echo "$ac_t""$have_glibc" 1>&6
2420 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2421     Defining _GNU_SOURCE
2422 EOF
2423 cat >> confdefs.h <<\EOF
2424 #define _GNU_SOURCE 1
2425 EOF
2426 }
2427
2428
2429 case "$opsys" in
2430   sol2)
2431    { test "$extra_verbose" = "yes" && cat << \EOF
2432     Defining __EXTENSIONS__
2433 EOF
2434 cat >> confdefs.h <<\EOF
2435 #define __EXTENSIONS__ 1
2436 EOF
2437 }
2438
2439       if test "$os_release" -ge 55; then
2440      { test "$extra_verbose" = "yes" && cat << \EOF
2441     Defining _XOPEN_SOURCE = 500
2442 EOF
2443 cat >> confdefs.h <<\EOF
2444 #define _XOPEN_SOURCE 500
2445 EOF
2446 }
2447
2448      { test "$extra_verbose" = "yes" && cat << \EOF
2449     Defining _XOPEN_SOURCE_EXTENDED
2450 EOF
2451 cat >> confdefs.h <<\EOF
2452 #define _XOPEN_SOURCE_EXTENDED 1
2453 EOF
2454 }
2455
2456    fi ;;
2457   linux)
2458     { test "$extra_verbose" = "yes" && cat << \EOF
2459     Defining _POSIX_C_SOURCE = 199506L
2460 EOF
2461 cat >> confdefs.h <<\EOF
2462 #define _POSIX_C_SOURCE 199506L
2463 EOF
2464 }
2465
2466     { test "$extra_verbose" = "yes" && cat << \EOF
2467     Defining _XOPEN_SOURCE = 500
2468 EOF
2469 cat >> confdefs.h <<\EOF
2470 #define _XOPEN_SOURCE 500
2471 EOF
2472 }
2473
2474     { test "$extra_verbose" = "yes" && cat << \EOF
2475     Defining _XOPEN_SOURCE_EXTENDED
2476 EOF
2477 cat >> confdefs.h <<\EOF
2478 #define _XOPEN_SOURCE_EXTENDED 1
2479 EOF
2480 }
2481
2482     ;;
2483 esac
2484
2485 cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 int main () {
2489 #if defined __SUNPRO_C
2490 return 11;
2491 #elif defined __DECC
2492 return 12;
2493 #elif defined __USLC__ && defined __SCO_VERSION__
2494 return 13;
2495 #else
2496 return 0;
2497 #endif
2498 }
2499 EOF
2500 if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2501 then
2502   :
2503 else
2504   conftest_rc="$?"
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -fr conftest*
2508   case "$conftest_rc" in
2509   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2510   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2511   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2512 esac
2513 fi
2514 rm -fr conftest*
2515
2516
2517
2518
2519 echo "Extracting information from the machine- and system-dependent headers..."
2520
2521 tempcname="conftest.c"
2522
2523
2524
2525 cat > $tempcname < confdefs.h
2526 cat >> $tempcname <<EOF
2527 #define NOT_C_CODE
2528 #define C_SWITCH_SITE
2529 #define C_SWITCH_X_SITE
2530 #define LD_SWITCH_SITE
2531 #define LD_SWITCH_X_SITE
2532 #define LD_SWITCH_X_SITE_AUX
2533 #define OS_RELEASE $os_release
2534
2535 #ifdef config_opsysfile
2536 #include "$srcdir/src/$opsysfile"
2537 #endif
2538
2539 #ifdef config_machfile
2540 #include "$srcdir/src/$machfile"
2541 #endif
2542
2543 #ifndef LIBS_MACHINE
2544 #define LIBS_MACHINE
2545 #endif
2546 configure___ libs_machine=LIBS_MACHINE
2547
2548 #ifndef LIBS_SYSTEM
2549 #define LIBS_SYSTEM
2550 #endif
2551 configure___ libs_system=LIBS_SYSTEM
2552
2553 #ifndef LIBS_TERMCAP
2554 #define LIBS_TERMCAP
2555 #endif
2556 configure___ libs_termcap=LIBS_TERMCAP
2557
2558 #ifndef LIB_STANDARD
2559 #define LIB_STANDARD
2560 #endif
2561 configure___ libs_standard=LIB_STANDARD
2562
2563
2564 #ifndef OBJECTS_MACHINE
2565 #define OBJECTS_MACHINE
2566 #endif
2567 configure___ objects_machine=OBJECTS_MACHINE
2568
2569 #ifndef OBJECTS_SYSTEM
2570 #define OBJECTS_SYSTEM
2571 #endif
2572 configure___ objects_system=OBJECTS_SYSTEM
2573
2574
2575 #ifndef C_SWITCH_MACHINE
2576 #define C_SWITCH_MACHINE
2577 #endif
2578 configure___ c_switch_machine=C_SWITCH_MACHINE
2579
2580 #ifndef C_SWITCH_SYSTEM
2581 #define C_SWITCH_SYSTEM
2582 #endif
2583 configure___ c_switch_system=C_SWITCH_SYSTEM
2584
2585
2586 #ifndef LD_SWITCH_MACHINE
2587 #define LD_SWITCH_MACHINE
2588 #endif
2589 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2590
2591 #ifndef LD_SWITCH_SYSTEM
2592 #define LD_SWITCH_SYSTEM
2593 #endif
2594 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2595
2596
2597 #ifndef UNEXEC
2598 #define UNEXEC "unexec.o"
2599 #endif
2600 configure___ unexec=UNEXEC
2601
2602
2603 #ifndef LD_SWITCH_SHARED
2604 #define LD_SWITCH_SHARED "-c"
2605 #endif
2606 configure___ ld_switch_shared=LD_SWITCH_SHARED
2607
2608
2609 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2610 configure___ ordinary_ld=ORDINARY_LD
2611
2612 #ifdef ORDINARY_LINK
2613 #define LD ORDINARY_LD
2614 #else /* no ORDINARY LINK */
2615 #ifdef COFF_ENCAPSULATE
2616 #define LD "\$(CC) -nostdlib"
2617 #else /* not COFF_ENCAPSULATE */
2618 #ifdef LINKER
2619 #define LD LINKER
2620 #else /* ! defined (LINKER) */
2621 #define LD "ld"
2622 #endif /* ! defined (LINKER) */
2623 #endif /* ! defined (COFF_ENCAPSULATE) */
2624 #endif /* not ORDINARY_LINK */
2625 configure___ ld=LD
2626
2627 #ifndef LIB_GCC
2628 #define LIB_GCC
2629 #endif
2630 configure___ lib_gcc=LIB_GCC
2631
2632 #ifndef LD_TEXT_START_ADDR
2633 #define LD_TEXT_START_ADDR
2634 #endif
2635 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2636
2637
2638 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2639 #ifdef NO_REMAP
2640 #ifdef COFF_ENCAPSULATE
2641 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2642 #else /* ! defined (COFF_ENCAPSULATE) */
2643 #define START_FILES "pre-crt0.o /lib/crt0.o"
2644 #endif /* ! defined (COFF_ENCAPSULATE) */
2645 #else /* ! defined (NO_REMAP) */
2646 #define START_FILES "ecrt0.o"
2647 #endif /* ! defined (NO_REMAP) */
2648 #endif /* no ORDINARY_LINK */
2649 #ifndef START_FILES
2650 #define START_FILES
2651 #endif
2652 configure___ start_files=START_FILES
2653
2654 #ifdef ORDINARY_LINK
2655 configure___ ordinary_link=yes
2656 #else
2657 configure___ ordinary_link=no
2658 #endif
2659
2660 #ifdef SYSTEM_MALLOC
2661 configure___ system_malloc=yes
2662 #else
2663 configure___ system_malloc=no
2664 #endif
2665
2666 #ifdef TERMINFO
2667 configure___ have_terminfo=yes
2668 #else
2669 configure___ have_terminfo=no
2670 #endif
2671
2672 #ifdef MAIL_USE_FLOCK
2673 configure___ mail_use_flock=yes
2674 #else
2675 configure___ mail_use_flock=no
2676 #endif
2677
2678 #ifdef MAIL_USE_LOCKF
2679 configure___ mail_use_lockf=yes
2680 #else
2681 configure___ mail_use_lockf=no
2682 #endif
2683
2684 #ifdef MAIL_USE_LOCKING
2685 configure___ mail_use_locking=yes
2686 #else
2687 configure___ mail_use_locking=no
2688 #endif
2689
2690 #ifdef HAVE_WIN32_PROCESSES
2691 configure___ win32_processes=yes
2692 #else
2693 configure___ win32_processes=no
2694 #endif
2695
2696 EOF
2697
2698 CPP=`eval "echo $CPP $CPPFLAGS"`
2699 eval `$CPP -Isrc $tempcname \
2700         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2701
2702 rm $tempcname
2703
2704 if test "$pdump" = "yes"; then
2705   ordinary_link="yes"
2706   ld="${ordinary_ld}"
2707   start_files=
2708   libs_standard=
2709   unexec=
2710   lib_gcc=
2711 fi
2712
2713 test "$extra_verbose" = "yes" && \
2714   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 ""
2715
2716 case "$opsys" in mingw* | cygwin*)
2717   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2718   cygwin_include=`eval "dirname $cygwin_include"` ;
2719   cygwin_include="-I$cygwin_include/../include" ;
2720   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2721   case "$opsys" in mingw*)
2722     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2723   esac
2724   ;;
2725 esac
2726
2727 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2728
2729
2730 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2731
2732 if test "$__USLC__" = yes; then
2733   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2734 echo "configure:2735: checking for whether the -Kalloca compiler flag is needed" >&5
2735   need_kalloca=no
2736   cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739
2740 int main() {
2741 void *x = alloca(4);
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2745   rm -rf conftest*
2746   :
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   
2752     xe_save_c_switch_system="$c_switch_system"
2753     c_switch_system="$c_switch_system -Kalloca"
2754     cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757
2758 int main() {
2759 void *x = alloca(4);
2760 ; return 0; }
2761 EOF
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763   rm -rf conftest*
2764    need_kalloca=yes 
2765 else
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest*
2770     c_switch_system="$xe_save_c_switch_system"
2771 fi
2772 rm -f conftest*
2773   echo "$ac_t""$need_kalloca" 1>&6
2774   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
2775 fi
2776
2777 if test "$cflags_specified" = "no"; then
2778       if   test "$GCC" = "yes"; then
2779     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2780         CFLAGS="$CFLAGS -Wsign-compare"
2781                 if test "$xemacs_compiler" != "g++"; then
2782       CFLAGS="$CFLAGS -Wshadow"
2783     fi
2784             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2785               elif test "$__SUNPRO_C" = "yes"; then
2786     case "$opsys" in
2787       sol2    ) CFLAGS="-v -xO4" ;;
2788       sunos4* ) CFLAGS="-xO2";;
2789     esac
2790   elif test "$__DECC" = "yes"; then
2791     CFLAGS="-O3"
2792   elif test "$CC" = "xlc"; then
2793     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2794     else
2795     CFLAGS="-O" ;  fi
2796 fi
2797
2798 if test "$GCC" = "yes"; then
2799 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2800 echo "configure:2801: checking for buggy gcc versions" >&5
2801 GCC_VERSION=`$CC --version`
2802 case `uname -s`:`uname -m`:$GCC_VERSION in
2803                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2804                         case "$CFLAGS" in
2805             *-O2*|*-O3*)
2806                 case "$CFLAGS" in
2807                     *-fno-schedule-insns*) ;;
2808                     *)
2809                         echo "$ac_t""yes" 1>&6
2810                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2811                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2812                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2813                         ;;
2814                 esac
2815                 ;;
2816         esac
2817         ;;
2818                     Linux:alpha:egcs-2.91.*)
2819         echo "$ac_t""yes" 1>&6
2820         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2821         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2822         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2823         ;;
2824     *:i*86*:2.7.2*)
2825         case "$CFLAGS" in
2826             *-O2*|*-O3*)
2827                 case "$GCC_VERSION" in
2828                     2.7.2)
2829                         case "$CFLAGS" in
2830                             *-fno-strength-reduce*) ;;
2831                             *)
2832                                 echo "$ac_t""yes" 1>&6
2833                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2834                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2835                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2836                                 ;;
2837                         esac
2838                         ;;
2839                 esac
2840                 case "$CFLAGS" in
2841                  *-fno-caller-saves*) ;;
2842                  *)
2843                     echo "$ac_t""yes" 1>&6
2844                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2845                     echo "configure: warning: -fno-caller-saves." 1>&2
2846                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2847                     ;;
2848                 esac
2849                 ;;
2850         esac
2851         ;;
2852 esac
2853 echo "$ac_t""no" 1>&6
2854 fi
2855
2856 if test "$pdump" != "yes"; then
2857   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2858 echo "configure:2859: checking for \"-z nocombreloc\" linker flag" >&5
2859   case "`ld --help 2>&1`" in
2860     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2861       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2862     *) echo "$ac_t""no" 1>&6 ;;
2863   esac
2864 fi
2865
2866
2867
2868 if test "$GCC" = "yes"; then
2869   set x $ld_switch_system; shift; ld_switch_system=""
2870   while test -n "$1"; do
2871     case $1 in
2872       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2873       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2874       -Xlinker* ) ;;
2875       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2876     esac
2877     shift
2878   done
2879 fi
2880
2881 if test "$GCC" = "yes"; then
2882   set x $ld_switch_machine; shift; ld_switch_machine=""
2883   while test -n "$1"; do
2884     case $1 in
2885       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2886       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2887       -Xlinker* ) ;;
2888       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2889     esac
2890     shift
2891   done
2892 fi
2893
2894 if test "$GCC" = "yes"; then
2895   set x $ld_switch_site; shift; ld_switch_site=""
2896   while test -n "$1"; do
2897     case $1 in
2898       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2899       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2900       -Xlinker* ) ;;
2901       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2902     esac
2903     shift
2904   done
2905 fi
2906
2907 if test "$GCC" = "yes"; then
2908   set x $LDFLAGS; shift; LDFLAGS=""
2909   while test -n "$1"; do
2910     case $1 in
2911       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2912       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2913       -Xlinker* ) ;;
2914       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2915     esac
2916     shift
2917   done
2918 fi
2919
2920 if test "$GCC" = "yes"; then
2921   set x $ld_call_shared; shift; ld_call_shared=""
2922   while test -n "$1"; do
2923     case $1 in
2924       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2925       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2926       -Xlinker* ) ;;
2927       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2928     esac
2929     shift
2930   done
2931 fi
2932
2933 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2934    echo "    xemacs will be linked with \"$objects_machine\""
2935  fi
2936 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2937    echo "    xemacs will be linked with \"$objects_system\""
2938  fi
2939 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2940    echo "    xemacs will be linked with \"$unexec\""
2941  fi
2942 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2943    echo "    xemacs will be linked with \"dumper.o\""
2944  fi
2945
2946 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2947 echo "configure:2948: checking for dynodump" >&5
2948 if test "$unexec" != "unexsol2.o"; then
2949   echo "$ac_t""no" 1>&6
2950 else
2951   echo "$ac_t""yes" 1>&6
2952   { test "$extra_verbose" = "yes" && cat << \EOF
2953     Defining DYNODUMP
2954 EOF
2955 cat >> confdefs.h <<\EOF
2956 #define DYNODUMP 1
2957 EOF
2958 }
2959
2960   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2961   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2962   case "$machine" in
2963     sparc   ) dynodump_arch=sparc ;;
2964     *86*    ) dynodump_arch=i386  ;;
2965     powerpc ) dynodump_arch=ppc   ;;
2966   esac
2967     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
2968 fi
2969
2970
2971 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2972
2973 if test "$unexec" = "unexaix.o"; then
2974   if   test "$dynamic" = "no"; then
2975   start_flags="-Wl,-bnso,-bnodelcsect"
2976   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2977   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2978     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2979   done
2980   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2981     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2982   done
2983   
2984 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2985 echo "configure:2986: checking for terminateAndUnload in -lC" >&5
2986 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2987
2988 xe_check_libs=" -lC "
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 /* Override any gcc2 internal prototype to avoid an error.  */
2993 /* We use char because int might match the return type of a gcc2
2994     builtin and then its argument prototype would still apply.  */
2995 char terminateAndUnload();
2996
2997 int main() {
2998 terminateAndUnload()
2999 ; return 0; }
3000 EOF
3001 if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3002   rm -rf conftest*
3003   eval "ac_cv_lib_$ac_lib_var=yes"
3004 else
3005   echo "configure: failed program was:" >&5
3006   cat conftest.$ac_ext >&5
3007   rm -rf conftest*
3008   eval "ac_cv_lib_$ac_lib_var=no"
3009 fi
3010 rm -f conftest*
3011 xe_check_libs=""
3012
3013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3014   echo "$ac_t""yes" 1>&6
3015   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3016 else
3017   echo "$ac_t""no" 1>&6
3018 fi
3019
3020
3021   fi
3022 elif test -n "$ld_text_start_addr"; then
3023   start_flags="-T $ld_text_start_addr -e __start"
3024 fi
3025
3026
3027
3028
3029 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3030  test -z "$linker" &&  linker='$(CC) -nostdlib'
3031  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3032 fi
3033 test "$GCC" != "yes" && lib_gcc=
3034
3035
3036
3037
3038
3039 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3040 if test -n "$site_libraries"; then
3041   for arg in $site_libraries; do
3042     case "$arg" in
3043      -* ) ;;
3044      * ) test -d "$arg" || \
3045            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3046        arg="-L${arg}" ;;
3047     esac
3048     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3049   done
3050 fi
3051
3052 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3053 if test -n "$site_includes"; then
3054   for arg in $site_includes; do
3055     case "$arg" in
3056       -* ) ;;
3057       * ) test -d "$arg" || \
3058            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3059       arg="-I${arg}" ;;
3060     esac
3061     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3062   done
3063 fi
3064
3065 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3066 if test -n "$site_prefixes"; then
3067   for dir in $site_prefixes; do
3068     lib_dir="${dir}/lib"
3069     inc_dir="${dir}/include"
3070     if test ! -d "$dir"; then
3071       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3072     elif test ! -d "$lib_dir"; then
3073       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3074     else
3075       if test -d "$inc_dir"; then
3076         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
3077       fi
3078       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
3079     fi
3080   done
3081 fi
3082
3083
3084 for dir in "/usr/ccs/lib"; do
3085   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
3086 done
3087
3088 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3089 if test -n "$site_runtime_libraries"; then
3090   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3091   export LD_RUN_PATH
3092 fi
3093
3094
3095
3096
3097
3098 if test -n "$add_runtime_path"; then :;
3099 elif test "$dynamic" = "no"; then add_runtime_path=no
3100 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3101 else case "$opsys" in
3102        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3103        * ) add_runtime_path=no ;;
3104      esac
3105 fi
3106
3107 if test "$add_runtime_path" = "yes"; then
3108       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3109 echo "configure:3110: checking "for runtime libraries flag"" >&5
3110   case "$opsys" in
3111     sol2 ) dash_r="-R" ;;
3112     decosf* | linux* | irix*) dash_r="-rpath " ;;
3113     *)
3114       dash_r=""
3115       for try_dash_r in "-R" "-R " "-rpath "; do
3116         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3117         
3118 if test "$GCC" = "yes"; then
3119   set x $xe_check_libs; shift; xe_check_libs=""
3120   while test -n "$1"; do
3121     case $1 in
3122       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3123       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3124       -Xlinker* ) ;;
3125       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3126     esac
3127     shift
3128   done
3129 fi
3130         cat > conftest.$ac_ext <<EOF
3131 #line 3132 "configure"
3132 #include "confdefs.h"
3133
3134 int main() {
3135
3136 ; return 0; }
3137 EOF
3138 if { (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3139   rm -rf conftest*
3140   dash_r="$try_dash_r"
3141 else
3142   echo "configure: failed program was:" >&5
3143   cat conftest.$ac_ext >&5
3144 fi
3145 rm -f conftest*
3146         xe_check_libs=""
3147         test -n "$dash_r" && break
3148       done ;;
3149   esac
3150   if test -n "$dash_r";
3151     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3152     else echo "$ac_t""NONE" 1>&6
3153   fi
3154 fi
3155
3156 xe_add_unique_runpath_dir='
3157   xe_add_p=yes
3158   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3159   done
3160   if test "$xe_add_p" = "yes"; then
3161     test -n "$runpath" && runpath="${runpath}:"
3162     runpath="${runpath}${xe_runpath_dir}"
3163     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3164   fi'
3165
3166
3167
3168
3169 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3170     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3171   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3172   
3173         runpath="" runpath_dirs=""
3174   if test -n "$LD_RUN_PATH"; then
3175     runpath="$LD_RUN_PATH"
3176   elif test "$GCC" = "yes"; then
3177         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3178     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3179     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3180     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3181       case "$arg" in P,* | -L* | -R* )
3182         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3183           {
3184 xe_runpath_dir="$dir"
3185   test "$xe_runpath_dir" != "/lib"     -a \
3186         "$xe_runpath_dir" != "/usr/lib" -a \
3187         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3188   eval "$xe_add_unique_runpath_dir"
3189 }
3190         done ;;
3191       esac
3192     done
3193     ld_switch_run="$ld_switch_run_save"
3194     rm -f conftest*
3195   else
3196         for arg in $ld_switch_site $ld_switch_x_site; do
3197       case "$arg" in -L*) {
3198 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3199   test "$xe_runpath_dir" != "/lib"     -a \
3200         "$xe_runpath_dir" != "/usr/lib" -a \
3201         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3202   eval "$xe_add_unique_runpath_dir"
3203 };; esac
3204     done
3205         if test "$opsys $need_motif" = "sol2 yes"; then
3206       xe_runpath_dir="/opt/SUNWdt/lib";
3207       eval "$xe_add_unique_runpath_dir";
3208     fi
3209   fi 
3210   if test -n "$runpath"; then
3211     ld_switch_run="${dash_r}${runpath}"
3212     
3213 if test "$GCC" = "yes"; then
3214   set x $ld_switch_run; shift; ld_switch_run=""
3215   while test -n "$1"; do
3216     case $1 in
3217       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3218       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3219       -Xlinker* ) ;;
3220       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3221     esac
3222     shift
3223   done
3224 fi
3225     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3226   fi
3227 fi
3228
3229
3230
3231 GNU_MALLOC=yes
3232 if test "$with_dlmalloc" != "no"; then
3233         doug_lea_malloc=yes
3234 else
3235         doug_lea_malloc=no
3236 fi
3237 after_morecore_hook_exists=yes
3238 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3239 echo "configure:3240: checking for malloc_set_state" >&5
3240
3241 cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244 /* System header to define __stub macros and hopefully few prototypes,
3245     which can conflict with char malloc_set_state(); below.  */
3246 #include <assert.h>
3247 /* Override any gcc2 internal prototype to avoid an error.  */
3248 /* We use char because int might match the return type of a gcc2
3249     builtin and then its argument prototype would still apply.  */
3250 char malloc_set_state();
3251
3252 int main() {
3253
3254 /* The GNU C library defines this for functions which it implements
3255     to always fail with ENOSYS.  Some functions are actually named
3256     something starting with __ and the normal name is an alias.  */
3257 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3258 choke me
3259 #else
3260 malloc_set_state();
3261 #endif
3262
3263 ; return 0; }
3264 EOF
3265 if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3266   rm -rf conftest*
3267   eval "ac_cv_func_malloc_set_state=yes"
3268 else
3269   echo "configure: failed program was:" >&5
3270   cat conftest.$ac_ext >&5
3271   rm -rf conftest*
3272   eval "ac_cv_func_malloc_set_state=no"
3273 fi
3274 rm -f conftest*
3275
3276 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3277   echo "$ac_t""yes" 1>&6
3278   :
3279 else
3280   echo "$ac_t""no" 1>&6
3281 doug_lea_malloc=no
3282 fi
3283
3284 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3285 echo "configure:3286: checking whether __after_morecore_hook exists" >&5
3286 cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 extern void (* __after_morecore_hook)();
3290 int main() {
3291 __after_morecore_hook = 0
3292 ; return 0; }
3293 EOF
3294 if { (eval echo configure:3295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3295   rm -rf conftest*
3296   echo "$ac_t""yes" 1>&6
3297 else
3298   echo "configure: failed program was:" >&5
3299   cat conftest.$ac_ext >&5
3300   rm -rf conftest*
3301   echo "$ac_t""no" 1>&6
3302    after_morecore_hook_exists=no
3303 fi
3304 rm -f conftest*
3305 if test "$system_malloc" = "yes" ; then
3306   GNU_MALLOC=no
3307   GNU_MALLOC_reason="
3308     - The GNU allocators don't work with this system configuration."
3309 elif test "$with_system_malloc" = "yes" ; then
3310   GNU_MALLOC=no
3311   GNU_MALLOC_reason="
3312     - User chose not to use GNU allocators."
3313 elif test "$with_debug_malloc" = "yes" ; then
3314   GNU_MALLOC=no
3315   GNU_MALLOC_reason="
3316     - User chose to use Debugging Malloc."
3317 fi
3318
3319 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3320   GNU_MALLOC_reason="
3321     - Using Doug Lea's new malloc from the GNU C Library."
3322   { test "$extra_verbose" = "yes" && cat << \EOF
3323     Defining DOUG_LEA_MALLOC
3324 EOF
3325 cat >> confdefs.h <<\EOF
3326 #define DOUG_LEA_MALLOC 1
3327 EOF
3328 }
3329
3330   if test "$after_morecore_hook_exists" = "no" ; then
3331     GNU_MALLOC_reason="
3332     - Using Doug Lea's new malloc from the Linux C Library."
3333     { test "$extra_verbose" = "yes" && cat << \EOF
3334     Defining _NO_MALLOC_WARNING_
3335 EOF
3336 cat >> confdefs.h <<\EOF
3337 #define _NO_MALLOC_WARNING_ 1
3338 EOF
3339 }
3340
3341   fi
3342 fi
3343
3344
3345
3346
3347 # Extract the first word of "ranlib", so it can be a program name with args.
3348 set dummy ranlib; ac_word=$2
3349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_word" >&5
3351
3352 if test -n "$RANLIB"; then
3353   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3354 else
3355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3356   ac_dummy="$PATH"
3357   for ac_dir in $ac_dummy; do
3358     test -z "$ac_dir" && ac_dir=.
3359     if test -f $ac_dir/$ac_word; then
3360       ac_cv_prog_RANLIB="ranlib"
3361       break
3362     fi
3363   done
3364   IFS="$ac_save_ifs"
3365   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3366 fi
3367 RANLIB="$ac_cv_prog_RANLIB"
3368 if test -n "$RANLIB"; then
3369   echo "$ac_t""$RANLIB" 1>&6
3370 else
3371   echo "$ac_t""no" 1>&6
3372 fi
3373
3374 ac_aux_dir=
3375 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3376   if test -f $ac_dir/install-sh; then
3377     ac_aux_dir=$ac_dir
3378     ac_install_sh="$ac_aux_dir/install-sh -c"
3379     break
3380   elif test -f $ac_dir/install.sh; then
3381     ac_aux_dir=$ac_dir
3382     ac_install_sh="$ac_aux_dir/install.sh -c"
3383     break
3384   fi
3385 done
3386 if test -z "$ac_aux_dir"; then
3387   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3388 fi
3389 ac_config_guess=$ac_aux_dir/config.guess
3390 ac_config_sub=$ac_aux_dir/config.sub
3391 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3392
3393 # Find a good install program.  We prefer a C program (faster),
3394 # so one script is as good as another.  But avoid the broken or
3395 # incompatible versions:
3396 # SysV /etc/install, /usr/sbin/install
3397 # SunOS /usr/etc/install
3398 # IRIX /sbin/install
3399 # AIX /bin/install
3400 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3401 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3402 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3403 # ./install, which can be erroneously created by make from ./install.sh.
3404 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3405 echo "configure:3406: checking for a BSD compatible install" >&5
3406 if test -z "$INSTALL"; then
3407
3408   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3409   for ac_dir in $PATH; do
3410     # Account for people who put trailing slashes in PATH elements.
3411     case "$ac_dir/" in
3412     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3413     *)
3414       # OSF1 and SCO ODT 3.0 have their own names for install.
3415       # Don't use installbsd from OSF since it installs stuff as root
3416       # by default.
3417       for ac_prog in ginstall scoinst install; do
3418         if test -f $ac_dir/$ac_prog; then
3419           if test $ac_prog = install &&
3420             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3421             # AIX install.  It has an incompatible calling convention.
3422             :
3423           else
3424             ac_cv_path_install="$ac_dir/$ac_prog -c"
3425             break 2
3426           fi
3427         fi
3428       done
3429       ;;
3430     esac
3431   done
3432   IFS="$ac_save_IFS"
3433
3434   if test "${ac_cv_path_install+set}" = set; then
3435     INSTALL="$ac_cv_path_install"
3436   else
3437     # As a last resort, use the slow shell script.  We don't cache a
3438     # path for INSTALL within a source directory, because that will
3439     # break other packages using the cache if that directory is
3440     # removed, or if the path is relative.
3441     INSTALL="$ac_install_sh"
3442   fi
3443 fi
3444 echo "$ac_t""$INSTALL" 1>&6
3445
3446 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3447 # It thinks the first close brace ends the variable substitution.
3448 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3449
3450 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3451
3452 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3453
3454 for ac_prog in 'bison -y' byacc
3455 do
3456 # Extract the first word of "$ac_prog", so it can be a program name with args.
3457 set dummy $ac_prog; ac_word=$2
3458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3459 echo "configure:3460: checking for $ac_word" >&5
3460
3461 if test -n "$YACC"; then
3462   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3463 else
3464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3465   ac_dummy="$PATH"
3466   for ac_dir in $ac_dummy; do
3467     test -z "$ac_dir" && ac_dir=.
3468     if test -f $ac_dir/$ac_word; then
3469       ac_cv_prog_YACC="$ac_prog"
3470       break
3471     fi
3472   done
3473   IFS="$ac_save_ifs"
3474 fi
3475 YACC="$ac_cv_prog_YACC"
3476 if test -n "$YACC"; then
3477   echo "$ac_t""$YACC" 1>&6
3478 else
3479   echo "$ac_t""no" 1>&6
3480 fi
3481
3482 test -n "$YACC" && break
3483 done
3484 test -n "$YACC" || YACC="yacc"
3485
3486
3487 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 
3488 do
3489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3491 echo "configure:3492: checking for $ac_hdr" >&5
3492
3493 cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 #include <$ac_hdr>
3497 EOF
3498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3499 { (eval echo configure:3500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3501 if test -z "$ac_err"; then
3502   rm -rf conftest*
3503   eval "ac_cv_header_$ac_safe=yes"
3504 else
3505   echo "$ac_err" >&5
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   eval "ac_cv_header_$ac_safe=no"
3510 fi
3511 rm -f conftest*
3512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3513   echo "$ac_t""yes" 1>&6
3514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3515   { test "$extra_verbose" = "yes" && cat << EOF
3516     Defining $ac_tr_hdr
3517 EOF
3518 cat >> confdefs.h <<EOF
3519 #define $ac_tr_hdr 1
3520 EOF
3521 }
3522  
3523 else
3524   echo "$ac_t""no" 1>&6
3525 fi
3526 done
3527
3528 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3529 echo "configure:3530: checking for sys/wait.h that is POSIX.1 compatible" >&5
3530
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 #include <sys/types.h>
3535 #include <sys/wait.h>
3536 #ifndef WEXITSTATUS
3537 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3538 #endif
3539 #ifndef WIFEXITED
3540 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3541 #endif
3542 int main() {
3543 int s;
3544 wait (&s);
3545 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3549   rm -rf conftest*
3550   ac_cv_header_sys_wait_h=yes
3551 else
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   ac_cv_header_sys_wait_h=no
3556 fi
3557 rm -f conftest*
3558
3559 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3560 if test $ac_cv_header_sys_wait_h = yes; then
3561   { test "$extra_verbose" = "yes" && cat << \EOF
3562     Defining HAVE_SYS_WAIT_H
3563 EOF
3564 cat >> confdefs.h <<\EOF
3565 #define HAVE_SYS_WAIT_H 1
3566 EOF
3567 }
3568
3569 fi
3570
3571 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3572 echo "configure:3573: checking for ANSI C header files" >&5
3573
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <stdlib.h>
3578 #include <stdarg.h>
3579 #include <string.h>
3580 #include <float.h>
3581 EOF
3582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3583 { (eval echo configure:3584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3585 if test -z "$ac_err"; then
3586   rm -rf conftest*
3587   ac_cv_header_stdc=yes
3588 else
3589   echo "$ac_err" >&5
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   ac_cv_header_stdc=no
3594 fi
3595 rm -f conftest*
3596
3597 if test $ac_cv_header_stdc = yes; then
3598   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3599 cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <string.h>
3603 EOF
3604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3605   egrep "memchr" >/dev/null 2>&1; then
3606   :
3607 else
3608   rm -rf conftest*
3609   ac_cv_header_stdc=no
3610 fi
3611 rm -f conftest*
3612
3613 fi
3614
3615 if test $ac_cv_header_stdc = yes; then
3616   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <stdlib.h>
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "free" >/dev/null 2>&1; then
3624   :
3625 else
3626   rm -rf conftest*
3627   ac_cv_header_stdc=no
3628 fi
3629 rm -f conftest*
3630
3631 fi
3632
3633 if test $ac_cv_header_stdc = yes; then
3634   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3638 #include <ctype.h>
3639 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3640 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3641 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3642 int main () { int i; for (i = 0; i < 256; i++)
3643 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3644 exit (0); }
3645
3646 EOF
3647 if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3648 then
3649   :
3650 else
3651   conftest_rc="$?"
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -fr conftest*
3655   ac_cv_header_stdc=no
3656 fi
3657 rm -fr conftest*
3658 fi
3659
3660 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3661 if test $ac_cv_header_stdc = yes; then
3662   { test "$extra_verbose" = "yes" && cat << \EOF
3663     Defining STDC_HEADERS
3664 EOF
3665 cat >> confdefs.h <<\EOF
3666 #define STDC_HEADERS 1
3667 EOF
3668 }
3669
3670 fi
3671
3672 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3673 echo "configure:3674: checking whether time.h and sys/time.h may both be included" >&5
3674
3675 cat > conftest.$ac_ext <<EOF
3676 #line 3677 "configure"
3677 #include "confdefs.h"
3678 #include <sys/types.h>
3679 #include <sys/time.h>
3680 #include <time.h>
3681 int main() {
3682 struct tm *tp;
3683 ; return 0; }
3684 EOF
3685 if { (eval echo configure:3686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3686   rm -rf conftest*
3687   ac_cv_header_time=yes
3688 else
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   ac_cv_header_time=no
3693 fi
3694 rm -f conftest*
3695
3696 echo "$ac_t""$ac_cv_header_time" 1>&6
3697 if test $ac_cv_header_time = yes; then
3698   { test "$extra_verbose" = "yes" && cat << \EOF
3699     Defining TIME_WITH_SYS_TIME
3700 EOF
3701 cat >> confdefs.h <<\EOF
3702 #define TIME_WITH_SYS_TIME 1
3703 EOF
3704 }
3705
3706 fi
3707
3708 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3709 echo "configure:3710: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3710
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <sys/types.h>
3715 #include <signal.h>
3716 /* NetBSD declares sys_siglist in unistd.h.  */
3717 #ifdef HAVE_UNISTD_H
3718 #include <unistd.h>
3719 #endif
3720 int main() {
3721 char *msg = *(sys_siglist + 1);
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3725   rm -rf conftest*
3726   ac_cv_decl_sys_siglist=yes
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   ac_cv_decl_sys_siglist=no
3732 fi
3733 rm -f conftest*
3734
3735 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3736 if test $ac_cv_decl_sys_siglist = yes; then
3737   { test "$extra_verbose" = "yes" && cat << \EOF
3738     Defining SYS_SIGLIST_DECLARED
3739 EOF
3740 cat >> confdefs.h <<\EOF
3741 #define SYS_SIGLIST_DECLARED 1
3742 EOF
3743 }
3744
3745 fi
3746
3747
3748
3749 echo $ac_n "checking for utime""... $ac_c" 1>&6
3750 echo "configure:3751: checking for utime" >&5
3751 cat > conftest.$ac_ext <<EOF
3752 #line 3753 "configure"
3753 #include "confdefs.h"
3754 #include <sys/types.h>
3755 #include <utime.h>
3756 int main() {
3757 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3758 ; return 0; }
3759 EOF
3760 if { (eval echo configure:3761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3761   rm -rf conftest*
3762   echo "$ac_t""yes" 1>&6
3763    { test "$extra_verbose" = "yes" && cat << \EOF
3764     Defining HAVE_UTIME
3765 EOF
3766 cat >> confdefs.h <<\EOF
3767 #define HAVE_UTIME 1
3768 EOF
3769 }
3770
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   echo "$ac_t""no" 1>&6
3776       for ac_func in utimes
3777 do
3778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3779 echo "configure:3780: checking for $ac_func" >&5
3780
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 /* System header to define __stub macros and hopefully few prototypes,
3785     which can conflict with char $ac_func(); below.  */
3786 #include <assert.h>
3787 /* Override any gcc2 internal prototype to avoid an error.  */
3788 /* We use char because int might match the return type of a gcc2
3789     builtin and then its argument prototype would still apply.  */
3790 char $ac_func();
3791
3792 int main() {
3793
3794 /* The GNU C library defines this for functions which it implements
3795     to always fail with ENOSYS.  Some functions are actually named
3796     something starting with __ and the normal name is an alias.  */
3797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3798 choke me
3799 #else
3800 $ac_func();
3801 #endif
3802
3803 ; return 0; }
3804 EOF
3805 if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3806   rm -rf conftest*
3807   eval "ac_cv_func_$ac_func=yes"
3808 else
3809   echo "configure: failed program was:" >&5
3810   cat conftest.$ac_ext >&5
3811   rm -rf conftest*
3812   eval "ac_cv_func_$ac_func=no"
3813 fi
3814 rm -f conftest*
3815
3816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3817   echo "$ac_t""yes" 1>&6
3818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3819   { test "$extra_verbose" = "yes" && cat << EOF
3820     Defining $ac_tr_func
3821 EOF
3822 cat >> confdefs.h <<EOF
3823 #define $ac_tr_func 1
3824 EOF
3825 }
3826  
3827 else
3828   echo "$ac_t""no" 1>&6
3829 fi
3830 done
3831
3832 fi
3833 rm -f conftest*
3834
3835
3836 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3837 echo "configure:3838: checking return type of signal handlers" >&5
3838
3839 cat > conftest.$ac_ext <<EOF
3840 #line 3841 "configure"
3841 #include "confdefs.h"
3842 #include <sys/types.h>
3843 #include <signal.h>
3844 #ifdef signal
3845 #undef signal
3846 #endif
3847 #ifdef __cplusplus
3848 extern "C" void (*signal (int, void (*)(int)))(int);
3849 #else
3850 void (*signal ()) ();
3851 #endif
3852
3853 int main() {
3854 int i;
3855 ; return 0; }
3856 EOF
3857 if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3858   rm -rf conftest*
3859   ac_cv_type_signal=void
3860 else
3861   echo "configure: failed program was:" >&5
3862   cat conftest.$ac_ext >&5
3863   rm -rf conftest*
3864   ac_cv_type_signal=int
3865 fi
3866 rm -f conftest*
3867
3868 echo "$ac_t""$ac_cv_type_signal" 1>&6
3869 { test "$extra_verbose" = "yes" && cat << EOF
3870     Defining RETSIGTYPE = $ac_cv_type_signal
3871 EOF
3872 cat >> confdefs.h <<EOF
3873 #define RETSIGTYPE $ac_cv_type_signal
3874 EOF
3875 }
3876
3877
3878 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3879 echo "configure:3880: checking for size_t" >&5
3880
3881 cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <sys/types.h>
3885 #if STDC_HEADERS
3886 #include <stdlib.h>
3887 #include <stddef.h>
3888 #endif
3889 EOF
3890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3891   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3892   rm -rf conftest*
3893   ac_cv_type_size_t=yes
3894 else
3895   rm -rf conftest*
3896   ac_cv_type_size_t=no
3897 fi
3898 rm -f conftest*
3899
3900 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3901 if test $ac_cv_type_size_t = no; then
3902   { test "$extra_verbose" = "yes" && cat << \EOF
3903     Defining size_t = unsigned
3904 EOF
3905 cat >> confdefs.h <<\EOF
3906 #define size_t unsigned
3907 EOF
3908 }
3909
3910 fi
3911
3912 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3913 echo "configure:3914: checking for pid_t" >&5
3914
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 #include <sys/types.h>
3919 #if STDC_HEADERS
3920 #include <stdlib.h>
3921 #include <stddef.h>
3922 #endif
3923 EOF
3924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3925   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3926   rm -rf conftest*
3927   ac_cv_type_pid_t=yes
3928 else
3929   rm -rf conftest*
3930   ac_cv_type_pid_t=no
3931 fi
3932 rm -f conftest*
3933
3934 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3935 if test $ac_cv_type_pid_t = no; then
3936   { test "$extra_verbose" = "yes" && cat << \EOF
3937     Defining pid_t = int
3938 EOF
3939 cat >> confdefs.h <<\EOF
3940 #define pid_t int
3941 EOF
3942 }
3943
3944 fi
3945
3946 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3947 echo "configure:3948: checking for uid_t in sys/types.h" >&5
3948
3949 cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <sys/types.h>
3953 EOF
3954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3955   egrep "uid_t" >/dev/null 2>&1; then
3956   rm -rf conftest*
3957   ac_cv_type_uid_t=yes
3958 else
3959   rm -rf conftest*
3960   ac_cv_type_uid_t=no
3961 fi
3962 rm -f conftest*
3963
3964
3965 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3966 if test $ac_cv_type_uid_t = no; then
3967   { test "$extra_verbose" = "yes" && cat << \EOF
3968     Defining uid_t = int
3969 EOF
3970 cat >> confdefs.h <<\EOF
3971 #define uid_t int
3972 EOF
3973 }
3974
3975   { test "$extra_verbose" = "yes" && cat << \EOF
3976     Defining gid_t = int
3977 EOF
3978 cat >> confdefs.h <<\EOF
3979 #define gid_t int
3980 EOF
3981 }
3982
3983 fi
3984
3985 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3986 echo "configure:3987: checking for mode_t" >&5
3987
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <sys/types.h>
3992 #if STDC_HEADERS
3993 #include <stdlib.h>
3994 #include <stddef.h>
3995 #endif
3996 EOF
3997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3998   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3999   rm -rf conftest*
4000   ac_cv_type_mode_t=yes
4001 else
4002   rm -rf conftest*
4003   ac_cv_type_mode_t=no
4004 fi
4005 rm -f conftest*
4006
4007 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4008 if test $ac_cv_type_mode_t = no; then
4009   { test "$extra_verbose" = "yes" && cat << \EOF
4010     Defining mode_t = int
4011 EOF
4012 cat >> confdefs.h <<\EOF
4013 #define mode_t int
4014 EOF
4015 }
4016
4017 fi
4018
4019 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4020 echo "configure:4021: checking for off_t" >&5
4021
4022 cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <sys/types.h>
4026 #if STDC_HEADERS
4027 #include <stdlib.h>
4028 #include <stddef.h>
4029 #endif
4030 EOF
4031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4032   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4033   rm -rf conftest*
4034   ac_cv_type_off_t=yes
4035 else
4036   rm -rf conftest*
4037   ac_cv_type_off_t=no
4038 fi
4039 rm -f conftest*
4040
4041 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4042 if test $ac_cv_type_off_t = no; then
4043   { test "$extra_verbose" = "yes" && cat << \EOF
4044     Defining off_t = long
4045 EOF
4046 cat >> confdefs.h <<\EOF
4047 #define off_t long
4048 EOF
4049 }
4050
4051 fi
4052
4053 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4054 echo "configure:4055: checking for ssize_t" >&5
4055
4056 cat > conftest.$ac_ext <<EOF
4057 #line 4058 "configure"
4058 #include "confdefs.h"
4059 #include <sys/types.h>
4060 #if STDC_HEADERS
4061 #include <stdlib.h>
4062 #include <stddef.h>
4063 #endif
4064 EOF
4065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4066   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4067   rm -rf conftest*
4068   ac_cv_type_ssize_t=yes
4069 else
4070   rm -rf conftest*
4071   ac_cv_type_ssize_t=no
4072 fi
4073 rm -f conftest*
4074
4075 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4076 if test $ac_cv_type_ssize_t = no; then
4077   { test "$extra_verbose" = "yes" && cat << \EOF
4078     Defining ssize_t = int
4079 EOF
4080 cat >> confdefs.h <<\EOF
4081 #define ssize_t int
4082 EOF
4083 }
4084
4085 fi
4086
4087
4088 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4089 echo "configure:4090: checking for socklen_t" >&5
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 #include <sys/types.h>
4094 #include <sys/socket.h>
4095 socklen_t x;
4096
4097 int main() {
4098
4099 ; return 0; }
4100 EOF
4101 if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4102   rm -rf conftest*
4103   echo "$ac_t""yes" 1>&6
4104 else
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -rf conftest*
4108   
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <sys/types.h>
4113 #include <sys/socket.h>
4114 int accept (int, struct sockaddr *, size_t *);
4115
4116 int main() {
4117
4118 ; return 0; }
4119 EOF
4120 if { (eval echo configure:4121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4121   rm -rf conftest*
4122   
4123 echo "$ac_t""size_t" 1>&6
4124 { test "$extra_verbose" = "yes" && cat << \EOF
4125     Defining socklen_t = size_t
4126 EOF
4127 cat >> confdefs.h <<\EOF
4128 #define socklen_t size_t
4129 EOF
4130 }
4131
4132 else
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -rf conftest*
4136   
4137 echo "$ac_t""int" 1>&6
4138 { test "$extra_verbose" = "yes" && cat << \EOF
4139     Defining socklen_t = int
4140 EOF
4141 cat >> confdefs.h <<\EOF
4142 #define socklen_t int
4143 EOF
4144 }
4145
4146 fi
4147 rm -f conftest*
4148 fi
4149 rm -f conftest*
4150
4151 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4152 echo "configure:4153: checking for struct timeval" >&5
4153 cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #ifdef TIME_WITH_SYS_TIME
4157 #include <sys/time.h>
4158 #include <time.h>
4159 #else
4160 #ifdef HAVE_SYS_TIME_H
4161 #include <sys/time.h>
4162 #else
4163 #include <time.h>
4164 #endif
4165 #endif
4166 int main() {
4167 static struct timeval x; x.tv_sec = x.tv_usec;
4168 ; return 0; }
4169 EOF
4170 if { (eval echo configure:4171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4171   rm -rf conftest*
4172   echo "$ac_t""yes" 1>&6
4173   HAVE_TIMEVAL=yes
4174   { test "$extra_verbose" = "yes" && cat << \EOF
4175     Defining HAVE_TIMEVAL
4176 EOF
4177 cat >> confdefs.h <<\EOF
4178 #define HAVE_TIMEVAL 1
4179 EOF
4180 }
4181
4182 else
4183   echo "configure: failed program was:" >&5
4184   cat conftest.$ac_ext >&5
4185   rm -rf conftest*
4186   echo "$ac_t""no" 1>&6
4187    HAVE_TIMEVAL=no
4188 fi
4189 rm -f conftest*
4190
4191 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4192 echo "configure:4193: checking whether struct tm is in sys/time.h or time.h" >&5
4193
4194 cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <sys/types.h>
4198 #include <time.h>
4199 int main() {
4200 struct tm *tp; tp->tm_sec;
4201 ; return 0; }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4204   rm -rf conftest*
4205   ac_cv_struct_tm=time.h
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   ac_cv_struct_tm=sys/time.h
4211 fi
4212 rm -f conftest*
4213
4214 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4215 if test $ac_cv_struct_tm = sys/time.h; then
4216   { test "$extra_verbose" = "yes" && cat << \EOF
4217     Defining TM_IN_SYS_TIME
4218 EOF
4219 cat >> confdefs.h <<\EOF
4220 #define TM_IN_SYS_TIME 1
4221 EOF
4222 }
4223
4224 fi
4225
4226 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4227 echo "configure:4228: checking for tm_zone in struct tm" >&5
4228
4229 cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4232 #include <sys/types.h>
4233 #include <$ac_cv_struct_tm>
4234 int main() {
4235 struct tm tm; tm.tm_zone;
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4239   rm -rf conftest*
4240   ac_cv_struct_tm_zone=yes
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ac_cv_struct_tm_zone=no
4246 fi
4247 rm -f conftest*
4248
4249 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4250 if test "$ac_cv_struct_tm_zone" = yes; then
4251   { test "$extra_verbose" = "yes" && cat << \EOF
4252     Defining HAVE_TM_ZONE
4253 EOF
4254 cat >> confdefs.h <<\EOF
4255 #define HAVE_TM_ZONE 1
4256 EOF
4257 }
4258
4259 else
4260   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4261 echo "configure:4262: checking for tzname" >&5
4262
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 #include <time.h>
4267 #ifndef tzname /* For SGI.  */
4268 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4269 #endif
4270 int main() {
4271 atoi(*tzname);
4272 ; return 0; }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4275   rm -rf conftest*
4276   ac_cv_var_tzname=yes
4277 else
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -rf conftest*
4281   ac_cv_var_tzname=no
4282 fi
4283 rm -f conftest*
4284
4285 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4286   if test $ac_cv_var_tzname = yes; then
4287     { test "$extra_verbose" = "yes" && cat << \EOF
4288     Defining HAVE_TZNAME
4289 EOF
4290 cat >> confdefs.h <<\EOF
4291 #define HAVE_TZNAME 1
4292 EOF
4293 }
4294
4295   fi
4296 fi
4297
4298
4299 echo $ac_n "checking for working const""... $ac_c" 1>&6
4300 echo "configure:4301: checking for working const" >&5
4301
4302 cat > conftest.$ac_ext <<EOF
4303 #line 4304 "configure"
4304 #include "confdefs.h"
4305
4306 int main() {
4307
4308 /* Ultrix mips cc rejects this.  */
4309 typedef int charset[2]; const charset x;
4310 /* SunOS 4.1.1 cc rejects this.  */
4311 char const *const *ccp;
4312 char **p;
4313 /* NEC SVR4.0.2 mips cc rejects this.  */
4314 struct point {int x, y;};
4315 static struct point const zero = {0,0};
4316 /* AIX XL C 1.02.0.0 rejects this.
4317    It does not let you subtract one const X* pointer from another in an arm
4318    of an if-expression whose if-part is not a constant expression */
4319 const char *g = "string";
4320 ccp = &g + (g ? g-g : 0);
4321 /* HPUX 7.0 cc rejects these. */
4322 ++ccp;
4323 p = (char**) ccp;
4324 ccp = (char const *const *) p;
4325 { /* SCO 3.2v4 cc rejects this.  */
4326   char *t;
4327   char const *s = 0 ? (char *) 0 : (char const *) 0;
4328
4329   *t++ = 0;
4330 }
4331 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4332   int x[] = {25, 17};
4333   const int *foo = &x[0];
4334   ++foo;
4335 }
4336 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4337   typedef const int *iptr;
4338   iptr p = 0;
4339   ++p;
4340 }
4341 { /* AIX XL C 1.02.0.0 rejects this saying
4342      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4343   struct s { int j; const int *ap[3]; };
4344   struct s *b; b->j = 5;
4345 }
4346 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4347   const int foo = 10;
4348 }
4349
4350 ; return 0; }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4353   rm -rf conftest*
4354   ac_cv_c_const=yes
4355 else
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   ac_cv_c_const=no
4360 fi
4361 rm -f conftest*
4362
4363 echo "$ac_t""$ac_cv_c_const" 1>&6
4364 if test $ac_cv_c_const = no; then
4365   { test "$extra_verbose" = "yes" && cat << \EOF
4366     Defining const = 
4367 EOF
4368 cat >> confdefs.h <<\EOF
4369 #define const 
4370 EOF
4371 }
4372
4373 fi
4374
4375
4376 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4377 echo "configure:4378: checking whether ${MAKE-make} sets \${MAKE}" >&5
4378 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4379
4380 cat > conftestmake <<\EOF
4381 all:
4382         @echo 'ac_maketemp="${MAKE}"'
4383 EOF
4384 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4385 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4386 if test -n "$ac_maketemp"; then
4387   eval ac_cv_prog_make_${ac_make}_set=yes
4388 else
4389   eval ac_cv_prog_make_${ac_make}_set=no
4390 fi
4391 rm -f conftestmake
4392 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4393   echo "$ac_t""yes" 1>&6
4394   SET_MAKE=
4395 else
4396   echo "$ac_t""no" 1>&6
4397   SET_MAKE="MAKE=${MAKE-make}"
4398 fi
4399
4400
4401 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4402 echo "configure:4403: checking whether byte ordering is bigendian" >&5
4403
4404 ac_cv_c_bigendian=unknown
4405 # See if sys/param.h defines the BYTE_ORDER macro.
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 #include <sys/types.h>
4410 #include <sys/param.h>
4411 int main() {
4412
4413 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4414  bogus endian macros
4415 #endif
4416 ; return 0; }
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4419   rm -rf conftest*
4420   # It does; now see whether it defined to BIG_ENDIAN or not.
4421 cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 #include <sys/types.h>
4425 #include <sys/param.h>
4426 int main() {
4427
4428 #if BYTE_ORDER != BIG_ENDIAN
4429  not big endian
4430 #endif
4431 ; return 0; }
4432 EOF
4433 if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4434   rm -rf conftest*
4435   ac_cv_c_bigendian=yes
4436 else
4437   echo "configure: failed program was:" >&5
4438   cat conftest.$ac_ext >&5
4439   rm -rf conftest*
4440   ac_cv_c_bigendian=no
4441 fi
4442 rm -f conftest*
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446 fi
4447 rm -f conftest*
4448 if test $ac_cv_c_bigendian = unknown; then
4449 cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 main () {
4453   /* Are we little or big endian?  From Harbison&Steele.  */
4454   union
4455   {
4456     long l;
4457     char c[sizeof (long)];
4458   } u;
4459   u.l = 1;
4460   exit (u.c[sizeof (long) - 1] == 1);
4461 }
4462 EOF
4463 if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4464 then
4465   ac_cv_c_bigendian=no
4466 else
4467   conftest_rc="$?"
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -fr conftest*
4471   ac_cv_c_bigendian=yes
4472 fi
4473 rm -fr conftest*
4474 fi
4475
4476 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4477 if test $ac_cv_c_bigendian = yes; then
4478   { test "$extra_verbose" = "yes" && cat << \EOF
4479     Defining WORDS_BIGENDIAN
4480 EOF
4481 cat >> confdefs.h <<\EOF
4482 #define WORDS_BIGENDIAN 1
4483 EOF
4484 }
4485
4486 fi
4487
4488
4489 echo $ac_n "checking size of short""... $ac_c" 1>&6
4490 echo "configure:4491: checking size of short" >&5
4491
4492 cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495 #include <stdio.h>
4496 #include <sys/types.h>
4497 main()
4498 {
4499   FILE *f=fopen("conftestval", "w");
4500   if (!f) exit(1);
4501   fprintf(f, "%d\n", sizeof(short));
4502   exit(0);
4503 }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4506 then
4507   ac_cv_sizeof_short=`cat conftestval`
4508 else
4509   conftest_rc="$?"
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -fr conftest*
4513   ac_cv_sizeof_short=0
4514 fi
4515 rm -fr conftest*
4516 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4517 { test "$extra_verbose" = "yes" && cat << EOF
4518     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4519 EOF
4520 cat >> confdefs.h <<EOF
4521 #define SIZEOF_SHORT $ac_cv_sizeof_short
4522 EOF
4523 }
4524
4525
4526 if test "$ac_cv_sizeof_short" = 0; then
4527   echo ""
4528   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4529   echo "*** PANIC *** Please examine config.log for compilation errors."
4530   exit 1
4531 fi
4532 echo $ac_n "checking size of int""... $ac_c" 1>&6
4533 echo "configure:4534: checking size of int" >&5
4534
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdio.h>
4539 #include <sys/types.h>
4540 main()
4541 {
4542   FILE *f=fopen("conftestval", "w");
4543   if (!f) exit(1);
4544   fprintf(f, "%d\n", sizeof(int));
4545   exit(0);
4546 }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4549 then
4550   ac_cv_sizeof_int=`cat conftestval`
4551 else
4552   conftest_rc="$?"
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -fr conftest*
4556   ac_cv_sizeof_int=0
4557 fi
4558 rm -fr conftest*
4559 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4560 { test "$extra_verbose" = "yes" && cat << EOF
4561     Defining SIZEOF_INT = $ac_cv_sizeof_int
4562 EOF
4563 cat >> confdefs.h <<EOF
4564 #define SIZEOF_INT $ac_cv_sizeof_int
4565 EOF
4566 }
4567
4568
4569 echo $ac_n "checking size of long""... $ac_c" 1>&6
4570 echo "configure:4571: checking size of long" >&5
4571
4572 cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575 #include <stdio.h>
4576 #include <sys/types.h>
4577 main()
4578 {
4579   FILE *f=fopen("conftestval", "w");
4580   if (!f) exit(1);
4581   fprintf(f, "%d\n", sizeof(long));
4582   exit(0);
4583 }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4586 then
4587   ac_cv_sizeof_long=`cat conftestval`
4588 else
4589   conftest_rc="$?"
4590   echo "configure: failed program was:" >&5
4591   cat conftest.$ac_ext >&5
4592   rm -fr conftest*
4593   ac_cv_sizeof_long=0
4594 fi
4595 rm -fr conftest*
4596 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4597 { test "$extra_verbose" = "yes" && cat << EOF
4598     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4599 EOF
4600 cat >> confdefs.h <<EOF
4601 #define SIZEOF_LONG $ac_cv_sizeof_long
4602 EOF
4603 }
4604
4605
4606 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4607 echo "configure:4608: checking size of long long" >&5
4608
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 #include <stdio.h>
4613 #include <sys/types.h>
4614 main()
4615 {
4616   FILE *f=fopen("conftestval", "w");
4617   if (!f) exit(1);
4618   fprintf(f, "%d\n", sizeof(long long));
4619   exit(0);
4620 }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4623 then
4624   ac_cv_sizeof_long_long=`cat conftestval`
4625 else
4626   conftest_rc="$?"
4627   echo "configure: failed program was:" >&5
4628   cat conftest.$ac_ext >&5
4629   rm -fr conftest*
4630   ac_cv_sizeof_long_long=0
4631 fi
4632 rm -fr conftest*
4633 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4634 { test "$extra_verbose" = "yes" && cat << EOF
4635     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4636 EOF
4637 cat >> confdefs.h <<EOF
4638 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4639 EOF
4640 }
4641
4642
4643 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4644 echo "configure:4645: checking size of void *" >&5
4645
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 #include <stdio.h>
4650 #include <sys/types.h>
4651 main()
4652 {
4653   FILE *f=fopen("conftestval", "w");
4654   if (!f) exit(1);
4655   fprintf(f, "%d\n", sizeof(void *));
4656   exit(0);
4657 }
4658 EOF
4659 if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4660 then
4661   ac_cv_sizeof_void_p=`cat conftestval`
4662 else
4663   conftest_rc="$?"
4664   echo "configure: failed program was:" >&5
4665   cat conftest.$ac_ext >&5
4666   rm -fr conftest*
4667   ac_cv_sizeof_void_p=0
4668 fi
4669 rm -fr conftest*
4670 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4671 { test "$extra_verbose" = "yes" && cat << EOF
4672     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4673 EOF
4674 cat >> confdefs.h <<EOF
4675 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4676 EOF
4677 }
4678
4679
4680
4681 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4682 echo "configure:4683: checking for long file names" >&5
4683
4684 ac_cv_sys_long_file_names=yes
4685 # Test for long file names in all the places we know might matter:
4686 #      .                the current directory, where building will happen
4687 #      $prefix/lib      where we will be installing things
4688 #      $exec_prefix/lib likewise
4689 # eval it to expand exec_prefix.
4690 #      $TMPDIR          if set, where it might want to write temporary files
4691 # if $TMPDIR is not set:
4692 #      /tmp             where it might want to write temporary files
4693 #      /var/tmp         likewise
4694 #      /usr/tmp         likewise
4695 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4696   ac_tmpdirs="$TMPDIR"
4697 else
4698   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4699 fi
4700 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4701   test -d $ac_dir || continue
4702   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4703   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4704   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4705   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4706   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4707     ac_cv_sys_long_file_names=no
4708     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4709     break
4710   fi
4711   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4712 done
4713
4714 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4715 if test $ac_cv_sys_long_file_names = yes; then
4716   { test "$extra_verbose" = "yes" && cat << \EOF
4717     Defining HAVE_LONG_FILE_NAMES
4718 EOF
4719 cat >> confdefs.h <<\EOF
4720 #define HAVE_LONG_FILE_NAMES 1
4721 EOF
4722 }
4723
4724 fi
4725
4726
4727 echo $ac_n "checking for sin""... $ac_c" 1>&6
4728 echo "configure:4729: checking for sin" >&5
4729
4730 cat > conftest.$ac_ext <<EOF
4731 #line 4732 "configure"
4732 #include "confdefs.h"
4733 /* System header to define __stub macros and hopefully few prototypes,
4734     which can conflict with char sin(); below.  */
4735 #include <assert.h>
4736 /* Override any gcc2 internal prototype to avoid an error.  */
4737 /* We use char because int might match the return type of a gcc2
4738     builtin and then its argument prototype would still apply.  */
4739 char sin();
4740
4741 int main() {
4742
4743 /* The GNU C library defines this for functions which it implements
4744     to always fail with ENOSYS.  Some functions are actually named
4745     something starting with __ and the normal name is an alias.  */
4746 #if defined (__stub_sin) || defined (__stub___sin)
4747 choke me
4748 #else
4749 sin();
4750 #endif
4751
4752 ; return 0; }
4753 EOF
4754 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4755   rm -rf conftest*
4756   eval "ac_cv_func_sin=yes"
4757 else
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   eval "ac_cv_func_sin=no"
4762 fi
4763 rm -f conftest*
4764
4765 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4766   echo "$ac_t""yes" 1>&6
4767   :
4768 else
4769   echo "$ac_t""no" 1>&6
4770
4771 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4772 echo "configure:4773: checking for sin in -lm" >&5
4773 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4774
4775 xe_check_libs=" -lm "
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* Override any gcc2 internal prototype to avoid an error.  */
4780 /* We use char because int might match the return type of a gcc2
4781     builtin and then its argument prototype would still apply.  */
4782 char sin();
4783
4784 int main() {
4785 sin()
4786 ; return 0; }
4787 EOF
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789   rm -rf conftest*
4790   eval "ac_cv_lib_$ac_lib_var=yes"
4791 else
4792   echo "configure: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   rm -rf conftest*
4795   eval "ac_cv_lib_$ac_lib_var=no"
4796 fi
4797 rm -f conftest*
4798 xe_check_libs=""
4799
4800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4801   echo "$ac_t""yes" 1>&6
4802     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4804   { test "$extra_verbose" = "yes" && cat << EOF
4805     Defining $ac_tr_lib
4806 EOF
4807 cat >> confdefs.h <<EOF
4808 #define $ac_tr_lib 1
4809 EOF
4810 }
4811
4812   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4813
4814 else
4815   echo "$ac_t""no" 1>&6
4816 fi
4817
4818
4819 fi
4820
4821
4822 { test "$extra_verbose" = "yes" && cat << \EOF
4823     Defining LISP_FLOAT_TYPE
4824 EOF
4825 cat >> confdefs.h <<\EOF
4826 #define LISP_FLOAT_TYPE 1
4827 EOF
4828 }
4829
4830
4831 cat > conftest.$ac_ext <<EOF
4832 #line 4833 "configure"
4833 #include "confdefs.h"
4834 #include <math.h>
4835 int main() {
4836 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4837 ; return 0; }
4838 EOF
4839 if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4840   rm -rf conftest*
4841   { test "$extra_verbose" = "yes" && cat << \EOF
4842     Defining HAVE_INVERSE_HYPERBOLIC
4843 EOF
4844 cat >> confdefs.h <<\EOF
4845 #define HAVE_INVERSE_HYPERBOLIC 1
4846 EOF
4847 }
4848
4849 else
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852 fi
4853 rm -f conftest*
4854
4855 echo "checking type of mail spool file locking" 1>&6
4856 echo "configure:4857: checking type of mail spool file locking" >&5
4857 for ac_func in lockf flock
4858 do
4859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4860 echo "configure:4861: checking for $ac_func" >&5
4861
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* System header to define __stub macros and hopefully few prototypes,
4866     which can conflict with char $ac_func(); below.  */
4867 #include <assert.h>
4868 /* Override any gcc2 internal prototype to avoid an error.  */
4869 /* We use char because int might match the return type of a gcc2
4870     builtin and then its argument prototype would still apply.  */
4871 char $ac_func();
4872
4873 int main() {
4874
4875 /* The GNU C library defines this for functions which it implements
4876     to always fail with ENOSYS.  Some functions are actually named
4877     something starting with __ and the normal name is an alias.  */
4878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4879 choke me
4880 #else
4881 $ac_func();
4882 #endif
4883
4884 ; return 0; }
4885 EOF
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887   rm -rf conftest*
4888   eval "ac_cv_func_$ac_func=yes"
4889 else
4890   echo "configure: failed program was:" >&5
4891   cat conftest.$ac_ext >&5
4892   rm -rf conftest*
4893   eval "ac_cv_func_$ac_func=no"
4894 fi
4895 rm -f conftest*
4896
4897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4898   echo "$ac_t""yes" 1>&6
4899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4900   { test "$extra_verbose" = "yes" && cat << EOF
4901     Defining $ac_tr_func
4902 EOF
4903 cat >> confdefs.h <<EOF
4904 #define $ac_tr_func 1
4905 EOF
4906 }
4907  
4908 else
4909   echo "$ac_t""no" 1>&6
4910 fi
4911 done
4912
4913 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4914 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4915 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4916 if   test -z "$mail_locking"; then
4917   case "$opsys" in cygwin* | mingw*)
4918     mail_locking=pop ;;
4919   esac
4920 fi
4921
4922 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4923     Defining MAIL_LOCK_LOCKF
4924 EOF
4925 cat >> confdefs.h <<\EOF
4926 #define MAIL_LOCK_LOCKF 1
4927 EOF
4928 }
4929
4930 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4931     Defining MAIL_LOCK_FLOCK
4932 EOF
4933 cat >> confdefs.h <<\EOF
4934 #define MAIL_LOCK_FLOCK 1
4935 EOF
4936 }
4937
4938 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4939     Defining MAIL_LOCK_LOCKING
4940 EOF
4941 cat >> confdefs.h <<\EOF
4942 #define MAIL_LOCK_LOCKING 1
4943 EOF
4944 }
4945
4946 elif test "$mail_locking" = "pop"; then
4947   with_pop=yes
4948   mail_locking=
4949 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4950     Defining MAIL_LOCK_DOT
4951 EOF
4952 cat >> confdefs.h <<\EOF
4953 #define MAIL_LOCK_DOT 1
4954 EOF
4955 }
4956
4957 fi
4958 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4959   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4960 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4961   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4962 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4963   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4964
4965 case "$opsys" in decosf*)
4966   
4967 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4968 echo "configure:4969: checking for cma_open in -lpthreads" >&5
4969 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4970
4971 xe_check_libs=" -lpthreads "
4972 cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975 /* Override any gcc2 internal prototype to avoid an error.  */
4976 /* We use char because int might match the return type of a gcc2
4977     builtin and then its argument prototype would still apply.  */
4978 char cma_open();
4979
4980 int main() {
4981 cma_open()
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985   rm -rf conftest*
4986   eval "ac_cv_lib_$ac_lib_var=yes"
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   eval "ac_cv_lib_$ac_lib_var=no"
4992 fi
4993 rm -f conftest*
4994 xe_check_libs=""
4995
4996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4997   echo "$ac_t""yes" 1>&6
4998     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5000   { test "$extra_verbose" = "yes" && cat << EOF
5001     Defining $ac_tr_lib
5002 EOF
5003 cat >> confdefs.h <<EOF
5004 #define $ac_tr_lib 1
5005 EOF
5006 }
5007
5008   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5009
5010 else
5011   echo "$ac_t""no" 1>&6
5012 fi
5013
5014
5015   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5016     c_switch_site="$c_switch_site -threads" ;;
5017 esac
5018
5019
5020 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5021 echo "configure:5022: checking whether the -xildoff compiler flag is required" >&5
5022 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5023   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5024     then echo "$ac_t""no" 1>&6;
5025     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
5026   fi
5027   else echo "$ac_t""no" 1>&6
5028 fi
5029
5030 if test "$opsys" = "sol2"; then
5031   if test "$os_release" -ge 56; then
5032     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5033 echo "configure:5034: checking for \"-z ignore\" linker flag" >&5
5034     case "`ld -h 2>&1`" in
5035       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5036         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5037       *) echo "$ac_t""no" 1>&6 ;;
5038     esac
5039   fi
5040 fi
5041
5042
5043 echo "checking "for specified window system"" 1>&6
5044 echo "configure:5045: checking "for specified window system"" >&5
5045
5046
5047 GNOME_CONFIG=no
5048 GTK_CONFIG=no
5049
5050 if test "$with_gnome" != "no"; then
5051    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5052 echo "configure:5053: checking for GNOME configuration script" >&5
5053    for possible in gnome-config
5054    do
5055       possible_version=`${possible} --version 2> /dev/null`
5056       if test "x${possible_version}" != "x"; then
5057               GNOME_CONFIG="${possible}"
5058               with_gnome=yes
5059               with_gtk=yes
5060               break
5061       fi
5062    done
5063    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5064 fi
5065
5066 if test "${GNOME_CONFIG}" != "no"; then
5067       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5068       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5069       { test "$extra_verbose" = "yes" && cat << \EOF
5070     Defining HAVE_GNOME
5071 EOF
5072 cat >> confdefs.h <<\EOF
5073 #define HAVE_GNOME 1
5074 EOF
5075 }
5076
5077       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5078       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5079 fi
5080
5081 if test "$with_gtk" != "no";then
5082    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5083 echo "configure:5084: checking for GTK configuration script" >&5
5084    for possible in gtk12-config gtk14-config gtk-config
5085    do
5086       possible_version=`${possible} --version 2> /dev/null`
5087       if test "x${possible_version}" != "x"; then
5088               GTK_CONFIG="${possible}"
5089       fi
5090       case "${possible_version}" in
5091         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5092         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5093         1.2.*)
5094                 with_gtk=yes
5095                 break
5096                 ;;
5097         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5098       esac
5099    done
5100    echo "$ac_t""${GTK_CONFIG}" 1>&6
5101 fi
5102
5103 if test "${GTK_CONFIG}" != "no"; then
5104       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5105 echo "configure:5106: checking gtk version" >&5
5106       GTK_VERSION=`${GTK_CONFIG} --version`
5107       echo "$ac_t""${GTK_VERSION}" 1>&6
5108
5109       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5110 echo "configure:5111: checking gtk libs" >&5
5111       GTK_LIBS=`${GTK_CONFIG} --libs`
5112       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5113       echo "$ac_t""${GTK_LIBS}" 1>&6
5114
5115       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5116 echo "configure:5117: checking gtk cflags" >&5
5117       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5118       if test "$GCC" = "yes"; then
5119         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5120       fi
5121       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5122       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5123
5124       
5125 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5126 echo "configure:5127: checking for main in -lgdk_imlib" >&5
5127 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5128
5129 xe_check_libs=" -lgdk_imlib "
5130 cat > conftest.$ac_ext <<EOF
5131 #line 5132 "configure"
5132 #include "confdefs.h"
5133
5134 int main() {
5135 main()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 xe_check_libs=""
5149
5150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5151   echo "$ac_t""yes" 1>&6
5152   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5153 else
5154   echo "$ac_t""no" 1>&6
5155 fi
5156
5157
5158       
5159 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5160 echo "configure:5161: checking for Imlib_init in -lImlib" >&5
5161 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5162
5163 xe_check_libs=" -lImlib "
5164 cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5167 /* Override any gcc2 internal prototype to avoid an error.  */
5168 /* We use char because int might match the return type of a gcc2
5169     builtin and then its argument prototype would still apply.  */
5170 char Imlib_init();
5171
5172 int main() {
5173 Imlib_init()
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177   rm -rf conftest*
5178   eval "ac_cv_lib_$ac_lib_var=yes"
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=no"
5184 fi
5185 rm -f conftest*
5186 xe_check_libs=""
5187
5188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5189   echo "$ac_t""yes" 1>&6
5190   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5191 else
5192   echo "$ac_t""no" 1>&6
5193 fi
5194
5195
5196       for ac_func in gdk_imlib_init
5197 do
5198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5199 echo "configure:5200: checking for $ac_func" >&5
5200
5201 cat > conftest.$ac_ext <<EOF
5202 #line 5203 "configure"
5203 #include "confdefs.h"
5204 /* System header to define __stub macros and hopefully few prototypes,
5205     which can conflict with char $ac_func(); below.  */
5206 #include <assert.h>
5207 /* Override any gcc2 internal prototype to avoid an error.  */
5208 /* We use char because int might match the return type of a gcc2
5209     builtin and then its argument prototype would still apply.  */
5210 char $ac_func();
5211
5212 int main() {
5213
5214 /* The GNU C library defines this for functions which it implements
5215     to always fail with ENOSYS.  Some functions are actually named
5216     something starting with __ and the normal name is an alias.  */
5217 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5218 choke me
5219 #else
5220 $ac_func();
5221 #endif
5222
5223 ; return 0; }
5224 EOF
5225 if { (eval echo configure:5226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5226   rm -rf conftest*
5227   eval "ac_cv_func_$ac_func=yes"
5228 else
5229   echo "configure: failed program was:" >&5
5230   cat conftest.$ac_ext >&5
5231   rm -rf conftest*
5232   eval "ac_cv_func_$ac_func=no"
5233 fi
5234 rm -f conftest*
5235
5236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5237   echo "$ac_t""yes" 1>&6
5238     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5239   { test "$extra_verbose" = "yes" && cat << EOF
5240     Defining $ac_tr_func
5241 EOF
5242 cat >> confdefs.h <<EOF
5243 #define $ac_tr_func 1
5244 EOF
5245 }
5246  
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250 done
5251
5252
5253       { test "$extra_verbose" = "yes" && cat << \EOF
5254     Defining HAVE_XPM
5255 EOF
5256 cat >> confdefs.h <<\EOF
5257 #define HAVE_XPM 1
5258 EOF
5259 }
5260
5261       { test "$extra_verbose" = "yes" && cat << \EOF
5262     Defining HAVE_GTK
5263 EOF
5264 cat >> confdefs.h <<\EOF
5265 #define HAVE_GTK 1
5266 EOF
5267 }
5268
5269       
5270
5271       window_system=gtk
5272       with_gtk=yes
5273       with_x11=no
5274
5275       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5276       test "${with_toolbars}" != no && with_toolbars=gtk
5277       test "${with_menubars}" != "no" && with_menubars=gtk
5278       test "${with_dialogs}" != "no" && with_dialogs=gtk
5279       test "${with_widgets}" != "no" && with_widgets=gtk
5280
5281       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5282    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5283  fi
5284       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5285    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5286  fi
5287       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5288    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5289  fi
5290       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5291    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5292  fi
5293
5294             OLD_CFLAGS="${CFLAGS}"
5295       OLD_CPPFLAGS="${CPPFLAGS}"
5296       OLD_LDFLAGS="${LDFLAGS}"
5297       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5298       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5299       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5300       for ac_hdr in glade/glade.h glade.h
5301 do
5302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5304 echo "configure:5305: checking for $ac_hdr" >&5
5305
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 #include <$ac_hdr>
5310 EOF
5311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5312 { (eval echo configure:5313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5314 if test -z "$ac_err"; then
5315   rm -rf conftest*
5316   eval "ac_cv_header_$ac_safe=yes"
5317 else
5318   echo "$ac_err" >&5
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321   rm -rf conftest*
5322   eval "ac_cv_header_$ac_safe=no"
5323 fi
5324 rm -f conftest*
5325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5326   echo "$ac_t""yes" 1>&6
5327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5328   { test "$extra_verbose" = "yes" && cat << EOF
5329     Defining $ac_tr_hdr
5330 EOF
5331 cat >> confdefs.h <<EOF
5332 #define $ac_tr_hdr 1
5333 EOF
5334 }
5335  
5336 else
5337   echo "$ac_t""no" 1>&6
5338 fi
5339 done
5340
5341       
5342 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5343 echo "configure:5344: checking for main in -lxml" >&5
5344 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5345
5346 xe_check_libs=" -lxml "
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350
5351 int main() {
5352 main()
5353 ; return 0; }
5354 EOF
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=yes"
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361   rm -rf conftest*
5362   eval "ac_cv_lib_$ac_lib_var=no"
5363 fi
5364 rm -f conftest*
5365 xe_check_libs=""
5366
5367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5368   echo "$ac_t""yes" 1>&6
5369   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5370 else
5371   echo "$ac_t""no" 1>&6
5372 fi
5373
5374
5375       
5376 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5377 echo "configure:5378: checking for main in -lglade" >&5
5378 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5379
5380 xe_check_libs=" -lglade "
5381 cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384
5385 int main() {
5386 main()
5387 ; return 0; }
5388 EOF
5389 if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5390   rm -rf conftest*
5391   eval "ac_cv_lib_$ac_lib_var=yes"
5392 else
5393   echo "configure: failed program was:" >&5
5394   cat conftest.$ac_ext >&5
5395   rm -rf conftest*
5396   eval "ac_cv_lib_$ac_lib_var=no"
5397 fi
5398 rm -f conftest*
5399 xe_check_libs=""
5400
5401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5402   echo "$ac_t""yes" 1>&6
5403   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5404 else
5405   echo "$ac_t""no" 1>&6
5406 fi
5407
5408
5409       
5410 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5411 echo "configure:5412: checking for main in -lglade-gnome" >&5
5412 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5413
5414 xe_check_libs=" -lglade-gnome "
5415 cat > conftest.$ac_ext <<EOF
5416 #line 5417 "configure"
5417 #include "confdefs.h"
5418
5419 int main() {
5420 main()
5421 ; return 0; }
5422 EOF
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424   rm -rf conftest*
5425   eval "ac_cv_lib_$ac_lib_var=yes"
5426 else
5427   echo "configure: failed program was:" >&5
5428   cat conftest.$ac_ext >&5
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=no"
5431 fi
5432 rm -f conftest*
5433 xe_check_libs=""
5434
5435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5436   echo "$ac_t""yes" 1>&6
5437   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5438 else
5439   echo "$ac_t""no" 1>&6
5440 fi
5441
5442
5443       cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446 #include <glade/glade-xml.h>
5447 EOF
5448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5449   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5450   rm -rf conftest*
5451   echo "$ac_t""yes" 1>&6
5452                        { test "$extra_verbose" = "yes" && cat << \EOF
5453     Defining LIBGLADE_XML_TXTDOMAIN = 1
5454 EOF
5455 cat >> confdefs.h <<\EOF
5456 #define LIBGLADE_XML_TXTDOMAIN 1
5457 EOF
5458 }
5459
5460 else
5461   rm -rf conftest*
5462   echo "$ac_t""no" 1>&6
5463 fi
5464 rm -f conftest*
5465
5466       CFLAGS="${OLD_CFLAGS}"
5467       CPPFLAGS="${OLD_CPPFLAGS}"
5468       LDFLAGS="${OLD_LDFLAGS}"
5469 fi
5470
5471
5472 if test "$with_x11" != "no"; then
5473     test "$x_includes $x_libraries" != "NONE NONE" && \
5474    window_system=x11 with_x11=yes
5475
5476         
5477       if test "$x_includes $x_libraries" = "NONE NONE" \
5478     -a -n "$OPENWINHOME" \
5479     -a "$OPENWINHOME" != "/usr/openwin" \
5480     -a -d "$OPENWINHOME"; then
5481       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5482       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5483       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5484   fi
5485
5486   if test "$x_includes" = "NONE"; then
5487                     for dir in "/usr/X11" "/usr/X11R6"; do
5488       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5489     done
5490   fi
5491
5492   if test "$x_libraries" = "NONE"; then
5493     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5494       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5495     done
5496   fi
5497
5498   # If we find X, set shell vars x_includes and x_libraries to the
5499 # paths, otherwise set no_x=yes.
5500 # Uses ac_ vars as temps to allow command line to override cache and checks.
5501 # --without-x overrides everything else, but does not touch the cache.
5502 echo $ac_n "checking for X""... $ac_c" 1>&6
5503 echo "configure:5504: checking for X" >&5
5504
5505 # Check whether --with-x or --without-x was given.
5506 if test "${with_x+set}" = set; then
5507   withval="$with_x"
5508   :
5509 fi
5510
5511 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5512 if test "x$with_x" = xno; then
5513   # The user explicitly disabled X.
5514   have_x=disabled
5515 else
5516   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5517     # Both variables are already set.
5518     have_x=yes
5519   else
5520
5521 # One or both of the vars are not set, and there is no cached value.
5522 ac_x_includes=NO ac_x_libraries=NO
5523 rm -fr conftestdir
5524 if mkdir conftestdir; then
5525   cd conftestdir
5526   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5527   cat > Imakefile <<'EOF'
5528 acfindx:
5529         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5530 EOF
5531   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5532     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5533     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5534     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5535     for ac_extension in a so sl; do
5536       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5537         test -f $ac_im_libdir/libX11.$ac_extension; then
5538         ac_im_usrlibdir=$ac_im_libdir; break
5539       fi
5540     done
5541     # Screen out bogus values from the imake configuration.  They are
5542     # bogus both because they are the default anyway, and because
5543     # using them would break gcc on systems where it needs fixed includes.
5544     case "$ac_im_incroot" in
5545         /usr/include) ;;
5546         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5547     esac
5548     case "$ac_im_usrlibdir" in
5549         /usr/lib | /lib) ;;
5550         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5551     esac
5552   fi
5553   cd ..
5554   rm -fr conftestdir
5555 fi
5556
5557 if test "$ac_x_includes" = NO; then
5558   # Guess where to find include files, by looking for this one X11 .h file.
5559   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5560
5561   # First, try using that file with no special directory specified.
5562 cat > conftest.$ac_ext <<EOF
5563 #line 5564 "configure"
5564 #include "confdefs.h"
5565 #include <$x_direct_test_include>
5566 EOF
5567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5568 { (eval echo configure:5569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5570 if test -z "$ac_err"; then
5571   rm -rf conftest*
5572   # We can compile using X headers with no special include directory.
5573 ac_x_includes=
5574 else
5575   echo "$ac_err" >&5
5576   echo "configure: failed program was:" >&5
5577   cat conftest.$ac_ext >&5
5578   rm -rf conftest*
5579   # Look for the header file in a standard set of common directories.
5580 # Check X11 before X11Rn because it is often a symlink to the current release.
5581   for ac_dir in               \
5582     /usr/X11/include          \
5583     /usr/X11R6/include        \
5584     /usr/X11R5/include        \
5585     /usr/X11R4/include        \
5586                               \
5587     /usr/include/X11          \
5588     /usr/include/X11R6        \
5589     /usr/include/X11R5        \
5590     /usr/include/X11R4        \
5591                               \
5592     /usr/local/X11/include    \
5593     /usr/local/X11R6/include  \
5594     /usr/local/X11R5/include  \
5595     /usr/local/X11R4/include  \
5596                               \
5597     /usr/local/include/X11    \
5598     /usr/local/include/X11R6  \
5599     /usr/local/include/X11R5  \
5600     /usr/local/include/X11R4  \
5601                               \
5602     /usr/X386/include         \
5603     /usr/x386/include         \
5604     /usr/XFree86/include/X11  \
5605                               \
5606     /usr/include              \
5607     /usr/local/include        \
5608     /usr/unsupported/include  \
5609     /usr/athena/include       \
5610     /usr/local/x11r5/include  \
5611     /usr/lpp/Xamples/include  \
5612                               \
5613     /usr/openwin/include      \
5614     /usr/openwin/share/include \
5615     ; \
5616   do
5617     if test -r "$ac_dir/$x_direct_test_include"; then
5618       ac_x_includes=$ac_dir
5619       break
5620     fi
5621   done
5622 fi
5623 rm -f conftest*
5624 fi # $ac_x_includes = NO
5625
5626 if test "$ac_x_libraries" = NO; then
5627   # Check for the libraries.
5628
5629   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5630   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5631
5632   # See if we find them without any special options.
5633   # Don't add to $LIBS permanently.
5634   ac_save_LIBS="$LIBS"
5635   LIBS="-l$x_direct_test_library $LIBS"
5636 cat > conftest.$ac_ext <<EOF
5637 #line 5638 "configure"
5638 #include "confdefs.h"
5639
5640 int main() {
5641 ${x_direct_test_function}()
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   LIBS="$ac_save_LIBS"
5647 # We can link X programs with no special library path.
5648 ac_x_libraries=
5649 else
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   LIBS="$ac_save_LIBS"
5654 # First see if replacing the include by lib works.
5655 # Check X11 before X11Rn because it is often a symlink to the current release.
5656 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5657     /usr/X11/lib          \
5658     /usr/X11R6/lib        \
5659     /usr/X11R5/lib        \
5660     /usr/X11R4/lib        \
5661                           \
5662     /usr/lib/X11          \
5663     /usr/lib/X11R6        \
5664     /usr/lib/X11R5        \
5665     /usr/lib/X11R4        \
5666                           \
5667     /usr/local/X11/lib    \
5668     /usr/local/X11R6/lib  \
5669     /usr/local/X11R5/lib  \
5670     /usr/local/X11R4/lib  \
5671                           \
5672     /usr/local/lib/X11    \
5673     /usr/local/lib/X11R6  \
5674     /usr/local/lib/X11R5  \
5675     /usr/local/lib/X11R4  \
5676                           \
5677     /usr/X386/lib         \
5678     /usr/x386/lib         \
5679     /usr/XFree86/lib/X11  \
5680                           \
5681     /usr/lib              \
5682     /usr/local/lib        \
5683     /usr/unsupported/lib  \
5684     /usr/athena/lib       \
5685     /usr/local/x11r5/lib  \
5686     /usr/lpp/Xamples/lib  \
5687     /lib/usr/lib/X11      \
5688                           \
5689     /usr/openwin/lib      \
5690     /usr/openwin/share/lib \
5691     ; \
5692 do
5693   for ac_extension in a so sl; do
5694     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5695       ac_x_libraries=$ac_dir
5696       break 2
5697     fi
5698   done
5699 done
5700 fi
5701 rm -f conftest*
5702 fi # $ac_x_libraries = NO
5703
5704 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5705   # Didn't find X anywhere.  Cache the known absence of X.
5706   ac_cv_have_x="have_x=no"
5707 else
5708   # Record where we found X for the cache.
5709   ac_cv_have_x="have_x=yes \
5710                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5711 fi
5712   fi
5713   eval "$ac_cv_have_x"
5714 fi # $with_x != no
5715
5716 if test "$have_x" != yes; then
5717   echo "$ac_t""$have_x" 1>&6
5718   no_x=yes
5719 else
5720   # If each of the values was on the command line, it overrides each guess.
5721   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5722   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5723   # Update the cache value to reflect the command line values.
5724   ac_cv_have_x="have_x=yes \
5725                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5726   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5727 fi
5728
5729 if test "$no_x" = yes; then
5730   # Not all programs may use this symbol, but it does not hurt to define it.
5731   { test "$extra_verbose" = "yes" && cat << \EOF
5732     Defining X_DISPLAY_MISSING
5733 EOF
5734 cat >> confdefs.h <<\EOF
5735 #define X_DISPLAY_MISSING 1
5736 EOF
5737 }
5738
5739   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5740 else
5741   if test -n "$x_includes"; then
5742     X_CFLAGS="$X_CFLAGS -I$x_includes"
5743   fi
5744
5745   # It would also be nice to do this for all -L options, not just this one.
5746   if test -n "$x_libraries"; then
5747     X_LIBS="$X_LIBS -L$x_libraries"
5748     # For Solaris; some versions of Sun CC require a space after -R and
5749     # others require no space.  Words are not sufficient . . . .
5750     case "`(uname -sr) 2>/dev/null`" in
5751     "SunOS 5"*)
5752       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5753 echo "configure:5754: checking whether -R must be followed by a space" >&5
5754       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5755       cat > conftest.$ac_ext <<EOF
5756 #line 5757 "configure"
5757 #include "confdefs.h"
5758
5759 int main() {
5760
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   ac_R_nospace=yes
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   ac_R_nospace=no
5771 fi
5772 rm -f conftest*
5773       if test $ac_R_nospace = yes; then
5774         echo "$ac_t""no" 1>&6
5775         X_LIBS="$X_LIBS -R$x_libraries"
5776       else
5777         LIBS="$ac_xsave_LIBS -R $x_libraries"
5778         cat > conftest.$ac_ext <<EOF
5779 #line 5780 "configure"
5780 #include "confdefs.h"
5781
5782 int main() {
5783
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787   rm -rf conftest*
5788   ac_R_space=yes
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   ac_R_space=no
5794 fi
5795 rm -f conftest*
5796         if test $ac_R_space = yes; then
5797           echo "$ac_t""yes" 1>&6
5798           X_LIBS="$X_LIBS -R $x_libraries"
5799         else
5800           echo "$ac_t""neither works" 1>&6
5801         fi
5802       fi
5803       LIBS="$ac_xsave_LIBS"
5804     esac
5805   fi
5806
5807   # Check for system-dependent libraries X programs must link with.
5808   # Do this before checking for the system-independent R6 libraries
5809   # (-lICE), since we may need -lsocket or whatever for X linking.
5810
5811   if test "$ISC" = yes; then
5812     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5813   else
5814     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5815     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5816     # the Alpha needs dnet_stub (dnet does not exist).
5817     if test "$with_dnet" = "no" ; then
5818 ac_cv_lib_dnet_dnet_ntoa=no
5819 else
5820
5821 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5822 echo "configure:5823: checking for dnet_ntoa in -ldnet" >&5
5823 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5824
5825 xe_check_libs=" -ldnet "
5826 cat > conftest.$ac_ext <<EOF
5827 #line 5828 "configure"
5828 #include "confdefs.h"
5829 /* Override any gcc2 internal prototype to avoid an error.  */
5830 /* We use char because int might match the return type of a gcc2
5831     builtin and then its argument prototype would still apply.  */
5832 char dnet_ntoa();
5833
5834 int main() {
5835 dnet_ntoa()
5836 ; return 0; }
5837 EOF
5838 if { (eval echo configure:5839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5839   rm -rf conftest*
5840   eval "ac_cv_lib_$ac_lib_var=yes"
5841 else
5842   echo "configure: failed program was:" >&5
5843   cat conftest.$ac_ext >&5
5844   rm -rf conftest*
5845   eval "ac_cv_lib_$ac_lib_var=no"
5846 fi
5847 rm -f conftest*
5848 xe_check_libs=""
5849
5850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5851   echo "$ac_t""yes" 1>&6
5852   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5853 else
5854   echo "$ac_t""no" 1>&6
5855 fi
5856
5857 fi
5858
5859     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5860       
5861 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5862 echo "configure:5863: checking for dnet_ntoa in -ldnet_stub" >&5
5863 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5864
5865 xe_check_libs=" -ldnet_stub "
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869 /* Override any gcc2 internal prototype to avoid an error.  */
5870 /* We use char because int might match the return type of a gcc2
5871     builtin and then its argument prototype would still apply.  */
5872 char dnet_ntoa();
5873
5874 int main() {
5875 dnet_ntoa()
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_lib_$ac_lib_var=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=no"
5886 fi
5887 rm -f conftest*
5888 xe_check_libs=""
5889
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5891   echo "$ac_t""yes" 1>&6
5892   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5893 else
5894   echo "$ac_t""no" 1>&6
5895 fi
5896
5897
5898     fi
5899
5900     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5901     # to get the SysV transport functions.
5902     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5903     # needs -lnsl.
5904     # The nsl library prevents programs from opening the X display
5905     # on Irix 5.2, according to dickey@clark.net.
5906     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5907 echo "configure:5908: checking for gethostbyname" >&5
5908
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 /* System header to define __stub macros and hopefully few prototypes,
5913     which can conflict with char gethostbyname(); below.  */
5914 #include <assert.h>
5915 /* Override any gcc2 internal prototype to avoid an error.  */
5916 /* We use char because int might match the return type of a gcc2
5917     builtin and then its argument prototype would still apply.  */
5918 char gethostbyname();
5919
5920 int main() {
5921
5922 /* The GNU C library defines this for functions which it implements
5923     to always fail with ENOSYS.  Some functions are actually named
5924     something starting with __ and the normal name is an alias.  */
5925 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5926 choke me
5927 #else
5928 gethostbyname();
5929 #endif
5930
5931 ; return 0; }
5932 EOF
5933 if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5934   rm -rf conftest*
5935   eval "ac_cv_func_gethostbyname=yes"
5936 else
5937   echo "configure: failed program was:" >&5
5938   cat conftest.$ac_ext >&5
5939   rm -rf conftest*
5940   eval "ac_cv_func_gethostbyname=no"
5941 fi
5942 rm -f conftest*
5943
5944 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5945   echo "$ac_t""yes" 1>&6
5946   :
5947 else
5948   echo "$ac_t""no" 1>&6
5949 fi
5950
5951     if test $ac_cv_func_gethostbyname = no; then
5952       
5953 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5954 echo "configure:5955: checking for gethostbyname in -lnsl" >&5
5955 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5956
5957 xe_check_libs=" -lnsl "
5958 cat > conftest.$ac_ext <<EOF
5959 #line 5960 "configure"
5960 #include "confdefs.h"
5961 /* Override any gcc2 internal prototype to avoid an error.  */
5962 /* We use char because int might match the return type of a gcc2
5963     builtin and then its argument prototype would still apply.  */
5964 char gethostbyname();
5965
5966 int main() {
5967 gethostbyname()
5968 ; return 0; }
5969 EOF
5970 if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971   rm -rf conftest*
5972   eval "ac_cv_lib_$ac_lib_var=yes"
5973 else
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_lib_$ac_lib_var=no"
5978 fi
5979 rm -f conftest*
5980 xe_check_libs=""
5981
5982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5983   echo "$ac_t""yes" 1>&6
5984   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5985 else
5986   echo "$ac_t""no" 1>&6
5987 fi
5988
5989
5990     fi
5991
5992     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5993     # socket/setsockopt and other routines are undefined under SCO ODT
5994     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5995     # on later versions), says simon@lia.di.epfl.ch: it contains
5996     # gethostby* variants that don't use the nameserver (or something).
5997     # -lsocket must be given before -lnsl if both are needed.
5998     # We assume that if connect needs -lnsl, so does gethostbyname.
5999     echo $ac_n "checking for connect""... $ac_c" 1>&6
6000 echo "configure:6001: checking for connect" >&5
6001
6002 cat > conftest.$ac_ext <<EOF
6003 #line 6004 "configure"
6004 #include "confdefs.h"
6005 /* System header to define __stub macros and hopefully few prototypes,
6006     which can conflict with char connect(); below.  */
6007 #include <assert.h>
6008 /* Override any gcc2 internal prototype to avoid an error.  */
6009 /* We use char because int might match the return type of a gcc2
6010     builtin and then its argument prototype would still apply.  */
6011 char connect();
6012
6013 int main() {
6014
6015 /* The GNU C library defines this for functions which it implements
6016     to always fail with ENOSYS.  Some functions are actually named
6017     something starting with __ and the normal name is an alias.  */
6018 #if defined (__stub_connect) || defined (__stub___connect)
6019 choke me
6020 #else
6021 connect();
6022 #endif
6023
6024 ; return 0; }
6025 EOF
6026 if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6027   rm -rf conftest*
6028   eval "ac_cv_func_connect=yes"
6029 else
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_func_connect=no"
6034 fi
6035 rm -f conftest*
6036
6037 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039   :
6040 else
6041   echo "$ac_t""no" 1>&6
6042 fi
6043
6044     if test $ac_cv_func_connect = no; then
6045       
6046 xe_msg_checking="for connect in -lsocket"
6047 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6048 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6049 echo "configure:6050: checking "$xe_msg_checking"" >&5
6050 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6051
6052 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6053 cat > conftest.$ac_ext <<EOF
6054 #line 6055 "configure"
6055 #include "confdefs.h"
6056 /* Override any gcc2 internal prototype to avoid an error.  */
6057 /* We use char because int might match the return type of a gcc2
6058     builtin and then its argument prototype would still apply.  */
6059 char connect();
6060
6061 int main() {
6062 connect()
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_lib_$ac_lib_var=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=no"
6073 fi
6074 rm -f conftest*
6075 xe_check_libs=""
6076
6077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6078   echo "$ac_t""yes" 1>&6
6079   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6080 else
6081   echo "$ac_t""no" 1>&6
6082 fi
6083
6084
6085     fi
6086
6087     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6088     echo $ac_n "checking for remove""... $ac_c" 1>&6
6089 echo "configure:6090: checking for remove" >&5
6090
6091 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 /* System header to define __stub macros and hopefully few prototypes,
6095     which can conflict with char remove(); below.  */
6096 #include <assert.h>
6097 /* Override any gcc2 internal prototype to avoid an error.  */
6098 /* We use char because int might match the return type of a gcc2
6099     builtin and then its argument prototype would still apply.  */
6100 char remove();
6101
6102 int main() {
6103
6104 /* The GNU C library defines this for functions which it implements
6105     to always fail with ENOSYS.  Some functions are actually named
6106     something starting with __ and the normal name is an alias.  */
6107 #if defined (__stub_remove) || defined (__stub___remove)
6108 choke me
6109 #else
6110 remove();
6111 #endif
6112
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116   rm -rf conftest*
6117   eval "ac_cv_func_remove=yes"
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   eval "ac_cv_func_remove=no"
6123 fi
6124 rm -f conftest*
6125
6126 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6127   echo "$ac_t""yes" 1>&6
6128   :
6129 else
6130   echo "$ac_t""no" 1>&6
6131 fi
6132
6133     if test $ac_cv_func_remove = no; then
6134       
6135 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6136 echo "configure:6137: checking for remove in -lposix" >&5
6137 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6138
6139 xe_check_libs=" -lposix "
6140 cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char remove();
6147
6148 int main() {
6149 remove()
6150 ; return 0; }
6151 EOF
6152 if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6153   rm -rf conftest*
6154   eval "ac_cv_lib_$ac_lib_var=yes"
6155 else
6156   echo "configure: failed program was:" >&5
6157   cat conftest.$ac_ext >&5
6158   rm -rf conftest*
6159   eval "ac_cv_lib_$ac_lib_var=no"
6160 fi
6161 rm -f conftest*
6162 xe_check_libs=""
6163
6164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6165   echo "$ac_t""yes" 1>&6
6166   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6167 else
6168   echo "$ac_t""no" 1>&6
6169 fi
6170
6171
6172     fi
6173
6174     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6175     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6176 echo "configure:6177: checking for shmat" >&5
6177
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181 /* System header to define __stub macros and hopefully few prototypes,
6182     which can conflict with char shmat(); below.  */
6183 #include <assert.h>
6184 /* Override any gcc2 internal prototype to avoid an error.  */
6185 /* We use char because int might match the return type of a gcc2
6186     builtin and then its argument prototype would still apply.  */
6187 char shmat();
6188
6189 int main() {
6190
6191 /* The GNU C library defines this for functions which it implements
6192     to always fail with ENOSYS.  Some functions are actually named
6193     something starting with __ and the normal name is an alias.  */
6194 #if defined (__stub_shmat) || defined (__stub___shmat)
6195 choke me
6196 #else
6197 shmat();
6198 #endif
6199
6200 ; return 0; }
6201 EOF
6202 if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6203   rm -rf conftest*
6204   eval "ac_cv_func_shmat=yes"
6205 else
6206   echo "configure: failed program was:" >&5
6207   cat conftest.$ac_ext >&5
6208   rm -rf conftest*
6209   eval "ac_cv_func_shmat=no"
6210 fi
6211 rm -f conftest*
6212
6213 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6214   echo "$ac_t""yes" 1>&6
6215   :
6216 else
6217   echo "$ac_t""no" 1>&6
6218 fi
6219
6220     if test $ac_cv_func_shmat = no; then
6221       
6222 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6223 echo "configure:6224: checking for shmat in -lipc" >&5
6224 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6225
6226 xe_check_libs=" -lipc "
6227 cat > conftest.$ac_ext <<EOF
6228 #line 6229 "configure"
6229 #include "confdefs.h"
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char shmat();
6234
6235 int main() {
6236 shmat()
6237 ; return 0; }
6238 EOF
6239 if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6240   rm -rf conftest*
6241   eval "ac_cv_lib_$ac_lib_var=yes"
6242 else
6243   echo "configure: failed program was:" >&5
6244   cat conftest.$ac_ext >&5
6245   rm -rf conftest*
6246   eval "ac_cv_lib_$ac_lib_var=no"
6247 fi
6248 rm -f conftest*
6249 xe_check_libs=""
6250
6251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6252   echo "$ac_t""yes" 1>&6
6253   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6254 else
6255   echo "$ac_t""no" 1>&6
6256 fi
6257
6258
6259     fi
6260   fi
6261
6262   # Check for libraries that X11R6 Xt/Xaw programs need.
6263   ac_save_LDFLAGS="$LDFLAGS"
6264   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6265   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6266   # check for ICE first), but we must link in the order -lSM -lICE or
6267   # we get undefined symbols.  So assume we have SM if we have ICE.
6268   # These have to be linked with before -lX11, unlike the other
6269   # libraries we check for below, so use a different variable.
6270   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6271   
6272 xe_msg_checking="for IceConnectionNumber in -lICE"
6273 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6274 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6275 echo "configure:6276: checking "$xe_msg_checking"" >&5
6276 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6277
6278 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6279 cat > conftest.$ac_ext <<EOF
6280 #line 6281 "configure"
6281 #include "confdefs.h"
6282 /* Override any gcc2 internal prototype to avoid an error.  */
6283 /* We use char because int might match the return type of a gcc2
6284     builtin and then its argument prototype would still apply.  */
6285 char IceConnectionNumber();
6286
6287 int main() {
6288 IceConnectionNumber()
6289 ; return 0; }
6290 EOF
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6292   rm -rf conftest*
6293   eval "ac_cv_lib_$ac_lib_var=yes"
6294 else
6295   echo "configure: failed program was:" >&5
6296   cat conftest.$ac_ext >&5
6297   rm -rf conftest*
6298   eval "ac_cv_lib_$ac_lib_var=no"
6299 fi
6300 rm -f conftest*
6301 xe_check_libs=""
6302
6303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6304   echo "$ac_t""yes" 1>&6
6305   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6306 else
6307   echo "$ac_t""no" 1>&6
6308 fi
6309
6310
6311   LDFLAGS="$ac_save_LDFLAGS"
6312
6313 fi
6314  # Autoconf claims to find X library and include dirs for us.
6315   if test "$no_x" = "yes"
6316   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6317   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6318   fi
6319 fi
6320
6321
6322 if test "$with_x11" = "yes"; then
6323   { test "$extra_verbose" = "yes" && cat << \EOF
6324     Defining HAVE_X_WINDOWS
6325 EOF
6326 cat >> confdefs.h <<\EOF
6327 #define HAVE_X_WINDOWS 1
6328 EOF
6329 }
6330
6331   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6332   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6333
6334       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6335     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6336     if test -d "$lib_dir" -a -d "$inc_dir"; then
6337       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6338         x_libraries="$lib_dir $x_libraries"
6339         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6340       esac
6341       case "$x_includes" in "$inc_dir"* ) ;; *)
6342         x_includes="$inc_dir $x_includes"
6343         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6344       esac
6345       break;       fi
6346   done
6347
6348     for rel in "X11R6" "X11R5" "X11R4"; do
6349     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6350     if test -d "$lib_dir" -a -d "$inc_dir"; then
6351       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6352         x_libraries="$x_libraries $lib_dir"
6353         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6354       esac
6355       case "$x_includes" in "$inc_dir"* ) ;; *)
6356         x_includes="$x_includes $inc_dir"
6357         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6358       esac
6359       break;     fi
6360   done
6361
6362     case "$opsys" in
6363   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 ;;
6364   esac
6365
6366   ld_switch_x_site="$X_LIBS"
6367
6368   
6369 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6370     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6371   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6372   
6373         runpath="" runpath_dirs=""
6374   if test -n "$LD_RUN_PATH"; then
6375     runpath="$LD_RUN_PATH"
6376   elif test "$GCC" = "yes"; then
6377         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6378     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6379     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6380     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6381       case "$arg" in P,* | -L* | -R* )
6382         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6383           {
6384 xe_runpath_dir="$dir"
6385   test "$xe_runpath_dir" != "/lib"     -a \
6386         "$xe_runpath_dir" != "/usr/lib" -a \
6387         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6388   eval "$xe_add_unique_runpath_dir"
6389 }
6390         done ;;
6391       esac
6392     done
6393     ld_switch_run="$ld_switch_run_save"
6394     rm -f conftest*
6395   else
6396         for arg in $ld_switch_site $ld_switch_x_site; do
6397       case "$arg" in -L*) {
6398 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6399   test "$xe_runpath_dir" != "/lib"     -a \
6400         "$xe_runpath_dir" != "/usr/lib" -a \
6401         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6402   eval "$xe_add_unique_runpath_dir"
6403 };; esac
6404     done
6405         if test "$opsys $need_motif" = "sol2 yes"; then
6406       xe_runpath_dir="/opt/SUNWdt/lib";
6407       eval "$xe_add_unique_runpath_dir";
6408     fi
6409   fi 
6410   if test -n "$runpath"; then
6411     ld_switch_run="${dash_r}${runpath}"
6412     
6413 if test "$GCC" = "yes"; then
6414   set x $ld_switch_run; shift; ld_switch_run=""
6415   while test -n "$1"; do
6416     case $1 in
6417       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6418       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6419       -Xlinker* ) ;;
6420       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6421     esac
6422     shift
6423   done
6424 fi
6425     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6426   fi
6427 fi
6428
6429
6430   if test "$extra_verbose" = "yes"; then
6431     echo; echo "X11 compilation variables:"
6432     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6433     echo
6434   fi
6435
6436             bitmapdirs=
6437   if test "$x_includes" != NONE; then
6438     for i in $x_includes; do
6439       if test -d "$i/bitmaps"; then
6440         bitmapdirs="$i/bitmaps:$bitmapdirs"
6441       fi
6442       if test -d "$i/X11/bitmaps"; then
6443         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6444       fi
6445     done
6446     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6447   fi
6448   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6449     Defining BITMAPDIR = "$bitmapdirs"
6450 EOF
6451 cat >> confdefs.h <<EOF
6452 #define BITMAPDIR "$bitmapdirs"
6453 EOF
6454 }
6455
6456
6457     echo "checking for X defines extracted by xmkmf" 1>&6
6458 echo "configure:6459: checking for X defines extracted by xmkmf" >&5
6459   rm -fr conftestdir
6460   if mkdir conftestdir; then
6461     cd conftestdir
6462     cat > Imakefile <<'EOF'
6463 xetest:
6464         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6465 EOF
6466     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6467       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6468       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6469     fi
6470     cd ..
6471     rm -fr conftestdir
6472     for word in $xmkmf_defines; do
6473       case "$word" in 
6474       -D__STDC__*) ;;
6475       -D* )
6476         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6477         case "$word" in
6478           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6479           *     ) val=1 ;;
6480         esac
6481         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6482           if test "$val" = "1"
6483             then { test "$extra_verbose" = "yes" && cat << EOF
6484     Defining $sym
6485 EOF
6486 cat >> confdefs.h <<EOF
6487 #define $sym 1
6488 EOF
6489 }
6490
6491             else { test "$extra_verbose" = "yes" && cat << EOF
6492     Defining $sym = $val
6493 EOF
6494 cat >> confdefs.h <<EOF
6495 #define $sym $val
6496 EOF
6497 }
6498
6499           fi
6500         fi  ;;
6501       esac
6502     done
6503   fi
6504
6505     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6506 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6507 echo "configure:6508: checking for X11/Intrinsic.h" >&5
6508
6509 cat > conftest.$ac_ext <<EOF
6510 #line 6511 "configure"
6511 #include "confdefs.h"
6512 #include <X11/Intrinsic.h>
6513 EOF
6514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6515 { (eval echo configure:6516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6517 if test -z "$ac_err"; then
6518   rm -rf conftest*
6519   eval "ac_cv_header_$ac_safe=yes"
6520 else
6521   echo "$ac_err" >&5
6522   echo "configure: failed program was:" >&5
6523   cat conftest.$ac_ext >&5
6524   rm -rf conftest*
6525   eval "ac_cv_header_$ac_safe=no"
6526 fi
6527 rm -f conftest*
6528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6529   echo "$ac_t""yes" 1>&6
6530   :
6531 else
6532   echo "$ac_t""no" 1>&6
6533 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6534 fi
6535
6536
6537       
6538 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6539 echo "configure:6540: checking for XOpenDisplay in -lX11" >&5
6540 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6541
6542 xe_check_libs=" -lX11 "
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* Override any gcc2 internal prototype to avoid an error.  */
6547 /* We use char because int might match the return type of a gcc2
6548     builtin and then its argument prototype would still apply.  */
6549 char XOpenDisplay();
6550
6551 int main() {
6552 XOpenDisplay()
6553 ; return 0; }
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6556   rm -rf conftest*
6557   eval "ac_cv_lib_$ac_lib_var=yes"
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   eval "ac_cv_lib_$ac_lib_var=no"
6563 fi
6564 rm -f conftest*
6565 xe_check_libs=""
6566
6567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6568   echo "$ac_t""yes" 1>&6
6569   have_lib_x11=yes
6570 else
6571   echo "$ac_t""no" 1>&6
6572 fi
6573
6574
6575   if test "$have_lib_x11" != "yes"; then
6576     
6577 xe_msg_checking="for XGetFontProperty in -lX11"
6578 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6579 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6580 echo "configure:6581: checking "$xe_msg_checking"" >&5
6581 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6582
6583 xe_check_libs=" -lX11 -b i486-linuxaout"
6584 cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* Override any gcc2 internal prototype to avoid an error.  */
6588 /* We use char because int might match the return type of a gcc2
6589     builtin and then its argument prototype would still apply.  */
6590 char XGetFontProperty();
6591
6592 int main() {
6593 XGetFontProperty()
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597   rm -rf conftest*
6598   eval "ac_cv_lib_$ac_lib_var=yes"
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=no"
6604 fi
6605 rm -f conftest*
6606 xe_check_libs=""
6607
6608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6609   echo "$ac_t""yes" 1>&6
6610   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6611 else
6612   echo "$ac_t""no" 1>&6
6613 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6614 fi
6615
6616
6617   fi
6618   libs_x="-lX11"
6619   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6620
6621     
6622 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6623 echo "configure:6624: checking for XShapeSelectInput in -lXext" >&5
6624 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6625
6626 xe_check_libs=" -lXext "
6627 cat > conftest.$ac_ext <<EOF
6628 #line 6629 "configure"
6629 #include "confdefs.h"
6630 /* Override any gcc2 internal prototype to avoid an error.  */
6631 /* We use char because int might match the return type of a gcc2
6632     builtin and then its argument prototype would still apply.  */
6633 char XShapeSelectInput();
6634
6635 int main() {
6636 XShapeSelectInput()
6637 ; return 0; }
6638 EOF
6639 if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6640   rm -rf conftest*
6641   eval "ac_cv_lib_$ac_lib_var=yes"
6642 else
6643   echo "configure: failed program was:" >&5
6644   cat conftest.$ac_ext >&5
6645   rm -rf conftest*
6646   eval "ac_cv_lib_$ac_lib_var=no"
6647 fi
6648 rm -f conftest*
6649 xe_check_libs=""
6650
6651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6652   echo "$ac_t""yes" 1>&6
6653   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6654 else
6655   echo "$ac_t""no" 1>&6
6656 fi
6657
6658
6659
6660     
6661 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6662 echo "configure:6663: checking for XtOpenDisplay in -lXt" >&5
6663 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6664
6665 xe_check_libs=" -lXt "
6666 cat > conftest.$ac_ext <<EOF
6667 #line 6668 "configure"
6668 #include "confdefs.h"
6669 /* Override any gcc2 internal prototype to avoid an error.  */
6670 /* We use char because int might match the return type of a gcc2
6671     builtin and then its argument prototype would still apply.  */
6672 char XtOpenDisplay();
6673
6674 int main() {
6675 XtOpenDisplay()
6676 ; return 0; }
6677 EOF
6678 if { (eval echo configure:6679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=yes"
6681 else
6682   echo "configure: failed program was:" >&5
6683   cat conftest.$ac_ext >&5
6684   rm -rf conftest*
6685   eval "ac_cv_lib_$ac_lib_var=no"
6686 fi
6687 rm -f conftest*
6688 xe_check_libs=""
6689
6690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6691   echo "$ac_t""yes" 1>&6
6692   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6693 else
6694   echo "$ac_t""no" 1>&6
6695 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6696 fi
6697
6698
6699
6700   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6701 echo "configure:6702: checking the version of X11 being used" >&5
6702   cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705 #include <X11/Intrinsic.h>
6706     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6709 then
6710   ./conftest foobar; x11_release=$?
6711 else
6712   conftest_rc="$?"
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -fr conftest*
6716   x11_release=4
6717 fi
6718 rm -fr conftest*
6719   echo "$ac_t""R${x11_release}" 1>&6
6720   { test "$extra_verbose" = "yes" && cat << EOF
6721     Defining THIS_IS_X11R${x11_release}
6722 EOF
6723 cat >> confdefs.h <<EOF
6724 #define THIS_IS_X11R${x11_release} 1
6725 EOF
6726 }
6727
6728
6729   if test "${x11_release}" = "4"; then
6730     case "$with_widgets" in
6731       "" | "no") with_widgets=no ;;
6732       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6733     esac
6734   fi
6735
6736   for ac_func in XConvertCase
6737 do
6738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6739 echo "configure:6740: checking for $ac_func" >&5
6740
6741 cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* System header to define __stub macros and hopefully few prototypes,
6745     which can conflict with char $ac_func(); below.  */
6746 #include <assert.h>
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char $ac_func();
6751
6752 int main() {
6753
6754 /* The GNU C library defines this for functions which it implements
6755     to always fail with ENOSYS.  Some functions are actually named
6756     something starting with __ and the normal name is an alias.  */
6757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6758 choke me
6759 #else
6760 $ac_func();
6761 #endif
6762
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6766   rm -rf conftest*
6767   eval "ac_cv_func_$ac_func=yes"
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   eval "ac_cv_func_$ac_func=no"
6773 fi
6774 rm -f conftest*
6775
6776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6777   echo "$ac_t""yes" 1>&6
6778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6779   { test "$extra_verbose" = "yes" && cat << EOF
6780     Defining $ac_tr_func
6781 EOF
6782 cat >> confdefs.h <<EOF
6783 #define $ac_tr_func 1
6784 EOF
6785 }
6786  
6787 else
6788   echo "$ac_t""no" 1>&6
6789 fi
6790 done
6791
6792
6793   for ac_hdr in X11/Xlocale.h
6794 do
6795 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6796 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6797 echo "configure:6798: checking for $ac_hdr" >&5
6798
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 #include <$ac_hdr>
6803 EOF
6804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6805 { (eval echo configure:6806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6807 if test -z "$ac_err"; then
6808   rm -rf conftest*
6809   eval "ac_cv_header_$ac_safe=yes"
6810 else
6811   echo "$ac_err" >&5
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -rf conftest*
6815   eval "ac_cv_header_$ac_safe=no"
6816 fi
6817 rm -f conftest*
6818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6821   { test "$extra_verbose" = "yes" && cat << EOF
6822     Defining $ac_tr_hdr
6823 EOF
6824 cat >> confdefs.h <<EOF
6825 #define $ac_tr_hdr 1
6826 EOF
6827 }
6828  
6829 else
6830   echo "$ac_t""no" 1>&6
6831 fi
6832 done
6833
6834
6835     for ac_func in XRegisterIMInstantiateCallback
6836 do
6837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6838 echo "configure:6839: checking for $ac_func" >&5
6839
6840 cat > conftest.$ac_ext <<EOF
6841 #line 6842 "configure"
6842 #include "confdefs.h"
6843 /* System header to define __stub macros and hopefully few prototypes,
6844     which can conflict with char $ac_func(); below.  */
6845 #include <assert.h>
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 /* We use char because int might match the return type of a gcc2
6848     builtin and then its argument prototype would still apply.  */
6849 char $ac_func();
6850
6851 int main() {
6852
6853 /* The GNU C library defines this for functions which it implements
6854     to always fail with ENOSYS.  Some functions are actually named
6855     something starting with __ and the normal name is an alias.  */
6856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6857 choke me
6858 #else
6859 $ac_func();
6860 #endif
6861
6862 ; return 0; }
6863 EOF
6864 if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6865   rm -rf conftest*
6866   eval "ac_cv_func_$ac_func=yes"
6867 else
6868   echo "configure: failed program was:" >&5
6869   cat conftest.$ac_ext >&5
6870   rm -rf conftest*
6871   eval "ac_cv_func_$ac_func=no"
6872 fi
6873 rm -f conftest*
6874
6875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6876   echo "$ac_t""yes" 1>&6
6877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6878   { test "$extra_verbose" = "yes" && cat << EOF
6879     Defining $ac_tr_func
6880 EOF
6881 cat >> confdefs.h <<EOF
6882 #define $ac_tr_func 1
6883 EOF
6884 }
6885  
6886 else
6887   echo "$ac_t""no" 1>&6
6888 fi
6889 done
6890
6891   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6892 echo "configure:6893: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6893   cat > conftest.$ac_ext <<EOF
6894 #line 6895 "configure"
6895 #include "confdefs.h"
6896
6897 #define NeedFunctionPrototypes 1
6898 #include <X11/Xlib.h>
6899 extern Bool XRegisterIMInstantiateCallback(
6900    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6901
6902 int main() {
6903
6904 ; return 0; }
6905 EOF
6906 if { (eval echo configure:6907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6907   rm -rf conftest*
6908   echo "$ac_t""yes" 1>&6
6909 else
6910   echo "configure: failed program was:" >&5
6911   cat conftest.$ac_ext >&5
6912   rm -rf conftest*
6913   echo "$ac_t""no" 1>&6
6914    { test "$extra_verbose" = "yes" && cat << \EOF
6915     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6916 EOF
6917 cat >> confdefs.h <<\EOF
6918 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6919 EOF
6920 }
6921
6922 fi
6923 rm -f conftest*
6924
6925     test -z "$with_xmu" && { 
6926 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6927 echo "configure:6928: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6928 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6929
6930 xe_check_libs=" -lXmu "
6931 cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 /* We use char because int might match the return type of a gcc2
6936     builtin and then its argument prototype would still apply.  */
6937 char XmuReadBitmapDataFromFile();
6938
6939 int main() {
6940 XmuReadBitmapDataFromFile()
6941 ; return 0; }
6942 EOF
6943 if { (eval echo configure:6944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6944   rm -rf conftest*
6945   eval "ac_cv_lib_$ac_lib_var=yes"
6946 else
6947   echo "configure: failed program was:" >&5
6948   cat conftest.$ac_ext >&5
6949   rm -rf conftest*
6950   eval "ac_cv_lib_$ac_lib_var=no"
6951 fi
6952 rm -f conftest*
6953 xe_check_libs=""
6954
6955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6956   echo "$ac_t""yes" 1>&6
6957   with_xmu=yes
6958 else
6959   echo "$ac_t""no" 1>&6
6960 with_xmu=no
6961 fi
6962
6963  }
6964   if test "$with_xmu" = "no"; then
6965     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6966    echo "    xemacs will be linked with \"xmu.o\""
6967  fi
6968   else
6969     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6970     { test "$extra_verbose" = "yes" && cat << \EOF
6971     Defining HAVE_XMU
6972 EOF
6973 cat >> confdefs.h <<\EOF
6974 #define HAVE_XMU 1
6975 EOF
6976 }
6977
6978   fi
6979
6980       
6981 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6982 echo "configure:6983: checking for main in -lXbsd" >&5
6983 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6984
6985 xe_check_libs=" -lXbsd "
6986 cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989
6990 int main() {
6991 main()
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_lib_$ac_lib_var=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=no"
7002 fi
7003 rm -f conftest*
7004 xe_check_libs=""
7005
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7007   echo "$ac_t""yes" 1>&6
7008   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7009 else
7010   echo "$ac_t""no" 1>&6
7011 fi
7012
7013
7014
7015     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7016         if test "$GCC" = "yes"; then
7017       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
7018       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
7019     else
7020       case "$CC" in
7021         "xlc" ) CC="xlc_r" ;;
7022         "xlC" ) CC="xlC_r" ;;
7023         "cc"  ) CC="cc_r" ;;
7024       esac
7025     fi
7026   fi
7027
7028 fi 
7029 if test "$with_msw" != "no"; then
7030   echo "checking for MS-Windows" 1>&6
7031 echo "configure:7032: checking for MS-Windows" >&5
7032   
7033 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7034 echo "configure:7035: checking for main in -lgdi32" >&5
7035 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7036
7037 xe_check_libs=" -lgdi32 "
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041
7042 int main() {
7043 main()
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   eval "ac_cv_lib_$ac_lib_var=yes"
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   eval "ac_cv_lib_$ac_lib_var=no"
7054 fi
7055 rm -f conftest*
7056 xe_check_libs=""
7057
7058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7059   echo "$ac_t""yes" 1>&6
7060   with_msw=yes
7061 else
7062   echo "$ac_t""no" 1>&6
7063 fi
7064
7065
7066   if test "$with_msw" = "yes"; then
7067     { test "$extra_verbose" = "yes" && cat << \EOF
7068     Defining HAVE_MS_WINDOWS
7069 EOF
7070 cat >> confdefs.h <<\EOF
7071 #define HAVE_MS_WINDOWS 1
7072 EOF
7073 }
7074
7075
7076         if test "$with_netinstall" = "yes"; then
7077       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7078       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7079       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7080     fi
7081
7082     install_pp="$blddir/lib-src/installexe.sh"
7083     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
7084     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7085     if test "$window_system" != x11; then
7086         window_system=msw
7087         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7088             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7089    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7090  fi
7091         test "$with_menubars"   != "no" && with_menubars=msw \
7092             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7093    echo "    xemacs will be linked with \"menubar-msw.o\""
7094  fi
7095         test "$with_toolbars"   != "no" && with_toolbars=msw \
7096             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7097    echo "    xemacs will be linked with \"toolbar-msw.o\""
7098  fi
7099         test "$with_dialogs"   != "no" && with_dialogs=msw \
7100             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7101    echo "    xemacs will be linked with \"dialog-msw.o\""
7102  fi
7103         test "$with_widgets"   != "no" && with_widgets=msw
7104     else
7105         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7106    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7107  fi
7108         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7109    echo "    xemacs will be linked with \"menubar-msw.o\""
7110  fi
7111         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7112    echo "    xemacs will be linked with \"toolbar-msw.o\""
7113  fi
7114         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7115    echo "    xemacs will be linked with \"dialog-msw.o\""
7116  fi
7117     fi
7118         cat > conftest.$ac_ext <<EOF
7119 #line 7120 "configure"
7120 #include "confdefs.h"
7121 #include <fcntl.h>
7122     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7123 EOF
7124 if { (eval echo configure:7125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7125 then
7126   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7127     Defining HAVE_MSG_SELECT
7128 EOF
7129 cat >> confdefs.h <<\EOF
7130 #define HAVE_MSG_SELECT 1
7131 EOF
7132 }
7133
7134 else
7135   conftest_rc="$?"
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138 fi
7139 rm -fr conftest*
7140     with_file_coding=yes
7141     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
7142    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\""
7143  fi
7144   fi
7145 fi
7146
7147
7148
7149 test -z "$window_system" && window_system="none"
7150
7151 if test "$window_system" = "none"; then
7152   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7153   do
7154     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7155        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7156     fi
7157     eval "with_${feature}=no"
7158   done
7159 else
7160   test -z "$with_toolbars" && with_toolbars=yes
7161 fi
7162
7163 if test "$with_msw" != "yes"; then
7164   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7165   do
7166     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7167        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7168     fi
7169     eval "with_${feature}=no"
7170   done
7171 else
7172   :
7173 fi
7174
7175 if test "$with_x11" != "yes"; then
7176             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7177   do
7178     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7179        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7180     fi
7181     eval "with_${feature}=no"
7182   done
7183 fi
7184
7185 if test "$with_x11" = "yes"; then
7186   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7187 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7188 echo "configure:7189: checking for X11/extensions/shape.h" >&5
7189
7190 cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 #include <X11/extensions/shape.h>
7194 EOF
7195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7196 { (eval echo configure:7197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7198 if test -z "$ac_err"; then
7199   rm -rf conftest*
7200   eval "ac_cv_header_$ac_safe=yes"
7201 else
7202   echo "$ac_err" >&5
7203   echo "configure: failed program was:" >&5
7204   cat conftest.$ac_ext >&5
7205   rm -rf conftest*
7206   eval "ac_cv_header_$ac_safe=no"
7207 fi
7208 rm -f conftest*
7209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7210   echo "$ac_t""yes" 1>&6
7211   
7212    { test "$extra_verbose" = "yes" && cat << \EOF
7213     Defining HAVE_BALLOON_HELP
7214 EOF
7215 cat >> confdefs.h <<\EOF
7216 #define HAVE_BALLOON_HELP 1
7217 EOF
7218 }
7219
7220    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7221    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7222  fi
7223 else
7224   echo "$ac_t""no" 1>&6
7225 fi
7226
7227 fi
7228
7229 bitmapdir=
7230
7231 case "$window_system" in
7232   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7233   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7234   gtk  )
7235        HAVE_X_WINDOWS=no
7236        test "$with_gnome" = "yes" && echo "  Using GNOME."
7237        test "$with_gnome" = "no" && echo "  Using GTK."
7238        ;;
7239   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7240 esac
7241
7242 case "$x_libraries" in *X11R4* )
7243   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7244   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7245 esac
7246
7247 echo "checking for WM_COMMAND option" 1>&6
7248 echo "configure:7249: checking for WM_COMMAND option" >&5;
7249 if test "$with_wmcommand" != "no"; then
7250   { test "$extra_verbose" = "yes" && cat << \EOF
7251     Defining HAVE_WMCOMMAND
7252 EOF
7253 cat >> confdefs.h <<\EOF
7254 #define HAVE_WMCOMMAND 1
7255 EOF
7256 }
7257
7258 fi
7259
7260 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7261 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7262 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7263 echo "configure:7264: checking for X11/Xauth.h" >&5
7264
7265 cat > conftest.$ac_ext <<EOF
7266 #line 7267 "configure"
7267 #include "confdefs.h"
7268 #include <X11/Xauth.h>
7269 EOF
7270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7271 { (eval echo configure:7272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7273 if test -z "$ac_err"; then
7274   rm -rf conftest*
7275   eval "ac_cv_header_$ac_safe=yes"
7276 else
7277   echo "$ac_err" >&5
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   eval "ac_cv_header_$ac_safe=no"
7282 fi
7283 rm -f conftest*
7284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7285   echo "$ac_t""yes" 1>&6
7286   :
7287 else
7288   echo "$ac_t""no" 1>&6
7289 with_xauth=no
7290 fi
7291  }
7292 test -z "$with_xauth" && { 
7293 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7294 echo "configure:7295: checking for XauGetAuthByAddr in -lXau" >&5
7295 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7296
7297 xe_check_libs=" -lXau "
7298 cat > conftest.$ac_ext <<EOF
7299 #line 7300 "configure"
7300 #include "confdefs.h"
7301 /* Override any gcc2 internal prototype to avoid an error.  */
7302 /* We use char because int might match the return type of a gcc2
7303     builtin and then its argument prototype would still apply.  */
7304 char XauGetAuthByAddr();
7305
7306 int main() {
7307 XauGetAuthByAddr()
7308 ; return 0; }
7309 EOF
7310 if { (eval echo configure:7311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7311   rm -rf conftest*
7312   eval "ac_cv_lib_$ac_lib_var=yes"
7313 else
7314   echo "configure: failed program was:" >&5
7315   cat conftest.$ac_ext >&5
7316   rm -rf conftest*
7317   eval "ac_cv_lib_$ac_lib_var=no"
7318 fi
7319 rm -f conftest*
7320 xe_check_libs=""
7321
7322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7323   echo "$ac_t""yes" 1>&6
7324   :
7325 else
7326   echo "$ac_t""no" 1>&6
7327 with_xauth=no
7328 fi
7329
7330  }
7331 test -z "$with_xauth" && with_xauth=yes
7332 if test "$with_xauth" = "yes"; then
7333   { test "$extra_verbose" = "yes" && cat << \EOF
7334     Defining HAVE_XAUTH
7335 EOF
7336 cat >> confdefs.h <<\EOF
7337 #define HAVE_XAUTH 1
7338 EOF
7339 }
7340
7341   
7342 T=""
7343 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
7344 libs_xauth="$T"
7345
7346 fi
7347
7348
7349
7350
7351 if test "$with_tooltalk" != "no" ; then
7352       for dir in "" "Tt/" "desktop/" ; do
7353     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7354 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7355 echo "configure:7356: checking for ${dir}tt_c.h" >&5
7356
7357 cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 #include <${dir}tt_c.h>
7361 EOF
7362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7363 { (eval echo configure:7364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7365 if test -z "$ac_err"; then
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=yes"
7368 else
7369   echo "$ac_err" >&5
7370   echo "configure: failed program was:" >&5
7371   cat conftest.$ac_ext >&5
7372   rm -rf conftest*
7373   eval "ac_cv_header_$ac_safe=no"
7374 fi
7375 rm -f conftest*
7376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7377   echo "$ac_t""yes" 1>&6
7378   tt_c_h_file="${dir}tt_c.h"; break
7379 else
7380   echo "$ac_t""no" 1>&6
7381 fi
7382
7383   done
7384   if test -z "$tt_c_h_file"; then
7385     if test "$with_tooltalk" = "yes"; then
7386       (echo "$progname: Usage error:"
7387 echo " " "Unable to find required tooltalk header files."
7388 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7389     fi
7390     with_tooltalk=no
7391   fi
7392 fi
7393 if test "$with_tooltalk" != "no" ; then
7394   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7395     
7396 xe_msg_checking="for tt_message_create in -ltt"
7397 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7398 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7399 echo "configure:7400: checking "$xe_msg_checking"" >&5
7400 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7401
7402 xe_check_libs=" -ltt $extra_libs"
7403 cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 /* Override any gcc2 internal prototype to avoid an error.  */
7407 /* We use char because int might match the return type of a gcc2
7408     builtin and then its argument prototype would still apply.  */
7409 char tt_message_create();
7410
7411 int main() {
7412 tt_message_create()
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416   rm -rf conftest*
7417   eval "ac_cv_lib_$ac_lib_var=yes"
7418 else
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_lib_$ac_lib_var=no"
7423 fi
7424 rm -f conftest*
7425 xe_check_libs=""
7426
7427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7428   echo "$ac_t""yes" 1>&6
7429   tt_libs="-ltt $extra_libs"; break
7430 else
7431   echo "$ac_t""no" 1>&6
7432 :
7433 fi
7434
7435
7436   done
7437   if test -z "$tt_libs"; then
7438     if test "$with_tooltalk" = "yes"; then
7439       (echo "$progname: Usage error:"
7440 echo " " "Unable to find required tooltalk libraries."
7441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7442     fi
7443     with_tooltalk=no
7444   fi
7445 fi
7446 test -z "$with_tooltalk" && with_tooltalk=yes
7447 if test "$with_tooltalk" = "yes"; then
7448   { test "$extra_verbose" = "yes" && cat << \EOF
7449     Defining TOOLTALK
7450 EOF
7451 cat >> confdefs.h <<\EOF
7452 #define TOOLTALK 1
7453 EOF
7454 }
7455
7456   { test "$extra_verbose" = "yes" && cat << EOF
7457     Defining TT_C_H_FILE = "$tt_c_h_file"
7458 EOF
7459 cat >> confdefs.h <<EOF
7460 #define TT_C_H_FILE "$tt_c_h_file"
7461 EOF
7462 }
7463
7464   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7465   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7466    echo "    xemacs will be linked with \"tooltalk.o\""
7467  fi
7468 fi
7469
7470 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7471 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7472 echo "configure:7473: checking for Dt/Dt.h" >&5
7473
7474 cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477 #include <Dt/Dt.h>
7478 EOF
7479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7480 { (eval echo configure:7481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7482 if test -z "$ac_err"; then
7483   rm -rf conftest*
7484   eval "ac_cv_header_$ac_safe=yes"
7485 else
7486   echo "$ac_err" >&5
7487   echo "configure: failed program was:" >&5
7488   cat conftest.$ac_ext >&5
7489   rm -rf conftest*
7490   eval "ac_cv_header_$ac_safe=no"
7491 fi
7492 rm -f conftest*
7493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7494   echo "$ac_t""yes" 1>&6
7495   :
7496 else
7497   echo "$ac_t""no" 1>&6
7498 with_cde=no
7499 fi
7500  }
7501 test -z "$with_cde" && { 
7502 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7503 echo "configure:7504: checking for DtDndDragStart in -lDtSvc" >&5
7504 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7505
7506 xe_check_libs=" -lDtSvc "
7507 cat > conftest.$ac_ext <<EOF
7508 #line 7509 "configure"
7509 #include "confdefs.h"
7510 /* Override any gcc2 internal prototype to avoid an error.  */
7511 /* We use char because int might match the return type of a gcc2
7512     builtin and then its argument prototype would still apply.  */
7513 char DtDndDragStart();
7514
7515 int main() {
7516 DtDndDragStart()
7517 ; return 0; }
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7520   rm -rf conftest*
7521   eval "ac_cv_lib_$ac_lib_var=yes"
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -rf conftest*
7526   eval "ac_cv_lib_$ac_lib_var=no"
7527 fi
7528 rm -f conftest*
7529 xe_check_libs=""
7530
7531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7532   echo "$ac_t""yes" 1>&6
7533   :
7534 else
7535   echo "$ac_t""no" 1>&6
7536 with_cde=no
7537 fi
7538
7539  }
7540 test -z "$with_cde" && with_cde=yes
7541 if test "$with_dragndrop" = no; then
7542   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7543   with_cde=no
7544 fi
7545 if test "$with_cde" = "yes" ; then
7546   { test "$extra_verbose" = "yes" && cat << \EOF
7547     Defining HAVE_CDE
7548 EOF
7549 cat >> confdefs.h <<\EOF
7550 #define HAVE_CDE 1
7551 EOF
7552 }
7553
7554   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7555   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7556   with_tooltalk=yes # CDE requires Tooltalk
7557   need_motif=yes    # CDE requires Motif
7558 fi
7559
7560 test "$window_system" != "x11" && with_offix=no
7561 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7562   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7563   with_offix=no
7564 fi
7565 if test "$with_dragndrop" = no; then
7566   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7567   with_offix=no
7568 fi
7569 if test "$with_cde" = yes; then
7570   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7571   with_offix=no
7572 fi
7573 test -z "$with_offix" && with_offix=no
7574 if test "$with_offix" = "yes"; then
7575   { test "$extra_verbose" = "yes" && cat << \EOF
7576     Defining HAVE_OFFIX_DND
7577 EOF
7578 cat >> confdefs.h <<\EOF
7579 #define HAVE_OFFIX_DND 1
7580 EOF
7581 }
7582
7583   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7584   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7585 fi
7586 if test "$with_gtk" = "yes"; then
7587    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7588 fi
7589
7590 if test "$with_dragndrop" != "no" ; then
7591   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7592 echo "configure:7593: checking if drag and drop API is needed" >&5
7593   if test -n "$dragndrop_proto" ; then
7594     with_dragndrop=yes
7595     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7596     { test "$extra_verbose" = "yes" && cat << \EOF
7597     Defining HAVE_DRAGNDROP
7598 EOF
7599 cat >> confdefs.h <<\EOF
7600 #define HAVE_DRAGNDROP 1
7601 EOF
7602 }
7603
7604     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7605   else
7606     with_dragndrop=no
7607     echo "$ac_t""no" 1>&6
7608   fi
7609 fi
7610
7611 echo "checking for LDAP" 1>&6
7612 echo "configure:7613: checking for LDAP" >&5
7613 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7614 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7615 echo "configure:7616: checking for ldap.h" >&5
7616
7617 cat > conftest.$ac_ext <<EOF
7618 #line 7619 "configure"
7619 #include "confdefs.h"
7620 #include <ldap.h>
7621 EOF
7622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7623 { (eval echo configure:7624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7625 if test -z "$ac_err"; then
7626   rm -rf conftest*
7627   eval "ac_cv_header_$ac_safe=yes"
7628 else
7629   echo "$ac_err" >&5
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_header_$ac_safe=no"
7634 fi
7635 rm -f conftest*
7636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7637   echo "$ac_t""yes" 1>&6
7638   :
7639 else
7640   echo "$ac_t""no" 1>&6
7641 with_ldap=no
7642 fi
7643  }
7644 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7645 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7646 echo "configure:7647: checking for lber.h" >&5
7647
7648 cat > conftest.$ac_ext <<EOF
7649 #line 7650 "configure"
7650 #include "confdefs.h"
7651 #include <lber.h>
7652 EOF
7653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7654 { (eval echo configure:7655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7656 if test -z "$ac_err"; then
7657   rm -rf conftest*
7658   eval "ac_cv_header_$ac_safe=yes"
7659 else
7660   echo "$ac_err" >&5
7661   echo "configure: failed program was:" >&5
7662   cat conftest.$ac_ext >&5
7663   rm -rf conftest*
7664   eval "ac_cv_header_$ac_safe=no"
7665 fi
7666 rm -f conftest*
7667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7668   echo "$ac_t""yes" 1>&6
7669   :
7670 else
7671   echo "$ac_t""no" 1>&6
7672 with_ldap=no
7673 fi
7674  }
7675 if test "$with_ldap" != "no"; then
7676   
7677 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7678 echo "configure:7679: checking for ldap_search in -lldap" >&5
7679 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7680
7681 xe_check_libs=" -lldap "
7682 cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 /* Override any gcc2 internal prototype to avoid an error.  */
7686 /* We use char because int might match the return type of a gcc2
7687     builtin and then its argument prototype would still apply.  */
7688 char ldap_search();
7689
7690 int main() {
7691 ldap_search()
7692 ; return 0; }
7693 EOF
7694 if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7695   rm -rf conftest*
7696   eval "ac_cv_lib_$ac_lib_var=yes"
7697 else
7698   echo "configure: failed program was:" >&5
7699   cat conftest.$ac_ext >&5
7700   rm -rf conftest*
7701   eval "ac_cv_lib_$ac_lib_var=no"
7702 fi
7703 rm -f conftest*
7704 xe_check_libs=""
7705
7706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7707   echo "$ac_t""yes" 1>&6
7708   with_ldap_nolber=yes
7709 else
7710   echo "$ac_t""no" 1>&6
7711 with_ldap_nolber=no
7712 fi
7713
7714
7715   test "$with_ldap_nolber" = "no" && { 
7716 xe_msg_checking="for ldap_open in -lldap"
7717 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7718 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7719 echo "configure:7720: checking "$xe_msg_checking"" >&5
7720 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7721
7722 xe_check_libs=" -lldap -llber"
7723 cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* Override any gcc2 internal prototype to avoid an error.  */
7727 /* We use char because int might match the return type of a gcc2
7728     builtin and then its argument prototype would still apply.  */
7729 char ldap_open();
7730
7731 int main() {
7732 ldap_open()
7733 ; return 0; }
7734 EOF
7735 if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7736   rm -rf conftest*
7737   eval "ac_cv_lib_$ac_lib_var=yes"
7738 else
7739   echo "configure: failed program was:" >&5
7740   cat conftest.$ac_ext >&5
7741   rm -rf conftest*
7742   eval "ac_cv_lib_$ac_lib_var=no"
7743 fi
7744 rm -f conftest*
7745 xe_check_libs=""
7746
7747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7748   echo "$ac_t""yes" 1>&6
7749   with_ldap_lber=yes
7750 else
7751   echo "$ac_t""no" 1>&6
7752 with_ldap_lber=no
7753 fi
7754
7755  }
7756   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7757 xe_msg_checking="for ldap_open in -lldap"
7758 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7759 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7760 echo "configure:7761: checking "$xe_msg_checking"" >&5
7761 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7762
7763 xe_check_libs=" -lldap -llber -lkrb"
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 /* Override any gcc2 internal prototype to avoid an error.  */
7768 /* We use char because int might match the return type of a gcc2
7769     builtin and then its argument prototype would still apply.  */
7770 char ldap_open();
7771
7772 int main() {
7773 ldap_open()
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7777   rm -rf conftest*
7778   eval "ac_cv_lib_$ac_lib_var=yes"
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783   eval "ac_cv_lib_$ac_lib_var=no"
7784 fi
7785 rm -f conftest*
7786 xe_check_libs=""
7787
7788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7789   echo "$ac_t""yes" 1>&6
7790   with_ldap_krb=yes
7791 else
7792   echo "$ac_t""no" 1>&6
7793 with_ldap_krb=no
7794 fi
7795
7796  }
7797   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7798 xe_msg_checking="for ldap_open in -lldap"
7799 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7800 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7801 echo "configure:7802: checking "$xe_msg_checking"" >&5
7802 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7803
7804 xe_check_libs=" -lldap -llber -lkrb -ldes"
7805 cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 /* We use char because int might match the return type of a gcc2
7810     builtin and then its argument prototype would still apply.  */
7811 char ldap_open();
7812
7813 int main() {
7814 ldap_open()
7815 ; return 0; }
7816 EOF
7817 if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7818   rm -rf conftest*
7819   eval "ac_cv_lib_$ac_lib_var=yes"
7820 else
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   eval "ac_cv_lib_$ac_lib_var=no"
7825 fi
7826 rm -f conftest*
7827 xe_check_libs=""
7828
7829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7830   echo "$ac_t""yes" 1>&6
7831   with_ldap_krbdes=yes
7832 else
7833   echo "$ac_t""no" 1>&6
7834 with_ldap_krbdes=no
7835 fi
7836
7837  }
7838   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
7839 fi
7840 if test "$with_ldap" = "yes"; then
7841   { test "$extra_verbose" = "yes" && cat << \EOF
7842     Defining HAVE_LDAP
7843 EOF
7844 cat >> confdefs.h <<\EOF
7845 #define HAVE_LDAP 1
7846 EOF
7847 }
7848
7849   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7850    echo "    xemacs will be linked with \"eldap.o\""
7851  fi
7852   if test "$with_ldap_nolber" = "yes" ; then
7853     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7854   else
7855     if test "$with_ldap_krb" = "yes" ; then
7856       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7857     fi
7858     if test "$with_ldap_krbdes" = "yes" ; then
7859       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7860       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7861     fi
7862     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7863     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7864   fi
7865   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7866 do
7867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7868 echo "configure:7869: checking for $ac_func" >&5
7869
7870 cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 /* System header to define __stub macros and hopefully few prototypes,
7874     which can conflict with char $ac_func(); below.  */
7875 #include <assert.h>
7876 /* Override any gcc2 internal prototype to avoid an error.  */
7877 /* We use char because int might match the return type of a gcc2
7878     builtin and then its argument prototype would still apply.  */
7879 char $ac_func();
7880
7881 int main() {
7882
7883 /* The GNU C library defines this for functions which it implements
7884     to always fail with ENOSYS.  Some functions are actually named
7885     something starting with __ and the normal name is an alias.  */
7886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7887 choke me
7888 #else
7889 $ac_func();
7890 #endif
7891
7892 ; return 0; }
7893 EOF
7894 if { (eval echo configure:7895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7895   rm -rf conftest*
7896   eval "ac_cv_func_$ac_func=yes"
7897 else
7898   echo "configure: failed program was:" >&5
7899   cat conftest.$ac_ext >&5
7900   rm -rf conftest*
7901   eval "ac_cv_func_$ac_func=no"
7902 fi
7903 rm -f conftest*
7904
7905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7906   echo "$ac_t""yes" 1>&6
7907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7908   { test "$extra_verbose" = "yes" && cat << EOF
7909     Defining $ac_tr_func
7910 EOF
7911 cat >> confdefs.h <<EOF
7912 #define $ac_tr_func 1
7913 EOF
7914 }
7915  
7916 else
7917   echo "$ac_t""no" 1>&6
7918 fi
7919 done
7920
7921 fi
7922
7923 if test "$with_postgresql" != "no"; then
7924   echo "checking for PostgreSQL" 1>&6
7925 echo "configure:7926: checking for PostgreSQL" >&5
7926
7927   for header_dir in "" "pgsql/" "postgresql/"; do
7928     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7929 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7930 echo "configure:7931: checking for ${header_dir}libpq-fe.h" >&5
7931
7932 cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 #include <${header_dir}libpq-fe.h>
7936 EOF
7937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7938 { (eval echo configure:7939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7940 if test -z "$ac_err"; then
7941   rm -rf conftest*
7942   eval "ac_cv_header_$ac_safe=yes"
7943 else
7944   echo "$ac_err" >&5
7945   echo "configure: failed program was:" >&5
7946   cat conftest.$ac_ext >&5
7947   rm -rf conftest*
7948   eval "ac_cv_header_$ac_safe=no"
7949 fi
7950 rm -f conftest*
7951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7952   echo "$ac_t""yes" 1>&6
7953   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7954 else
7955   echo "$ac_t""no" 1>&6
7956 fi
7957
7958   done
7959
7960   test -n "$libpq_fe_h_file" && { 
7961 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7962 echo "configure:7963: checking for PQconnectdb in -lpq" >&5
7963 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7964
7965 xe_check_libs=" -lpq "
7966 cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 /* We use char because int might match the return type of a gcc2
7971     builtin and then its argument prototype would still apply.  */
7972 char PQconnectdb();
7973
7974 int main() {
7975 PQconnectdb()
7976 ; return 0; }
7977 EOF
7978 if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=yes"
7981 else
7982   echo "configure: failed program was:" >&5
7983   cat conftest.$ac_ext >&5
7984   rm -rf conftest*
7985   eval "ac_cv_lib_$ac_lib_var=no"
7986 fi
7987 rm -f conftest*
7988 xe_check_libs=""
7989
7990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7991   echo "$ac_t""yes" 1>&6
7992   have_libpq=yes
7993 else
7994   echo "$ac_t""no" 1>&6
7995 fi
7996
7997  }
7998
7999   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8000     with_postgresql=yes
8001     { test "$extra_verbose" = "yes" && cat << \EOF
8002     Defining HAVE_POSTGRESQL
8003 EOF
8004 cat >> confdefs.h <<\EOF
8005 #define HAVE_POSTGRESQL 1
8006 EOF
8007 }
8008
8009     
8010 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8011 echo "configure:8012: checking for PQconnectStart in -lpq" >&5
8012 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8013
8014 xe_check_libs=" -lpq "
8015 cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char PQconnectStart();
8022
8023 int main() {
8024 PQconnectStart()
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=yes"
8030 else
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_lib_$ac_lib_var=no"
8035 fi
8036 rm -f conftest*
8037 xe_check_libs=""
8038
8039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8040   echo "$ac_t""yes" 1>&6
8041   with_postgresqlv7=yes;
8042                  { test "$extra_verbose" = "yes" && cat << \EOF
8043     Defining HAVE_POSTGRESQLV7
8044 EOF
8045 cat >> confdefs.h <<\EOF
8046 #define HAVE_POSTGRESQLV7 1
8047 EOF
8048 }
8049
8050 else
8051   echo "$ac_t""no" 1>&6
8052 fi
8053
8054
8055     { test "$extra_verbose" = "yes" && cat << EOF
8056     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8057 EOF
8058 cat >> confdefs.h <<EOF
8059 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8060 EOF
8061 }
8062
8063     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8064     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8065    echo "    xemacs will be linked with \"postgresql.o\""
8066  fi
8067   elif test "$with_postgresql" = "yes"; then
8068     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8069   fi
8070 fi
8071
8072
8073 if test "$window_system" != "none"; then
8074   echo "checking for graphics libraries" 1>&6
8075 echo "configure:8076: checking for graphics libraries" >&5
8076
8077       libpath_xpm=
8078   incpath_xpm=
8079   case "$opsys" in 
8080     cygwin*)
8081       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8082       cygwin_top=`eval "dirname ${cygwin_top}"`;
8083       cygwin_top="${cygwin_top}/..";
8084       case "$window_system" in
8085                 x11)  ;;
8086                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8087              incpath_xpm="-I${cygwin_top}/include/noX"
8088               ;;
8089                 gtk)  ;;
8090                 none) ;;
8091                 *)    ;;
8092       esac
8093       ;;
8094         *) ;;
8095   esac
8096     xpm_problem=""
8097   if test -z "$with_xpm"; then
8098     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8099     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8100     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8101 echo "configure:8102: checking for Xpm - no older than 3.4f" >&5
8102     xe_check_libs=-lXpm
8103     cat > conftest.$ac_ext <<EOF
8104 #line 8105 "configure"
8105 #include "confdefs.h"
8106 #define XPM_NUMBERS
8107 #include <X11/xpm.h>
8108     int main(int c, char **v) {
8109     return c == 1 ? 0 :
8110       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8111       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8112 EOF
8113 if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8114 then
8115   ./conftest dummy_arg; xpm_status=$?;
8116       if test "$xpm_status" = "0"; then
8117         with_xpm=yes;
8118       else
8119         with_xpm=no;
8120         if test "$xpm_status" = "1"; then
8121           xpm_problem="Xpm library version and header file version don't match!"
8122         elif test "$xpm_status" = "2"; then
8123           xpm_problem="Xpm library version is too old!"
8124         else
8125           xpm_problem="Internal xpm detection logic error!"
8126         fi
8127         echo "
8128 *** WARNING *** $xpm_problem
8129   I'm not touching that with a 10-foot pole!
8130   If you really want to use the installed version of Xpm, rerun
8131   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8132     fi
8133 else
8134   conftest_rc="$?"
8135   echo "configure: failed program was:" >&5
8136   cat conftest.$ac_ext >&5
8137   rm -fr conftest*
8138   with_xpm=no
8139 fi
8140 rm -fr conftest*
8141     xe_check_libs=
8142     echo "$ac_t""$with_xpm" 1>&6
8143   fi
8144   if test "$with_xpm" = "yes"; then
8145                 { test "$extra_verbose" = "yes" && cat << \EOF
8146     Defining HAVE_XPM
8147 EOF
8148 cat >> confdefs.h <<\EOF
8149 #define HAVE_XPM 1
8150 EOF
8151 }
8152
8153     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8154     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8155     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8156     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8157 echo "configure:8158: checking for \"FOR_MSW\" xpm" >&5
8158     xe_check_libs=-lXpm
8159     cat > conftest.$ac_ext <<EOF
8160 #line 8161 "configure"
8161 #include "confdefs.h"
8162
8163 int main() {
8164 XpmCreatePixmapFromData()
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   xpm_for_msw=no
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   xpm_for_msw=yes
8175 fi
8176 rm -f conftest*
8177     xe_check_libs=
8178     echo "$ac_t""$xpm_for_msw" 1>&6
8179     if test "$xpm_for_msw" = "yes"; then
8180       { test "$extra_verbose" = "yes" && cat << \EOF
8181     Defining FOR_MSW
8182 EOF
8183 cat >> confdefs.h <<\EOF
8184 #define FOR_MSW 1
8185 EOF
8186 }
8187
8188     fi
8189   fi
8190
8191     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8192 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8193 echo "configure:8194: checking for compface.h" >&5
8194
8195 cat > conftest.$ac_ext <<EOF
8196 #line 8197 "configure"
8197 #include "confdefs.h"
8198 #include <compface.h>
8199 EOF
8200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8201 { (eval echo configure:8202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8203 if test -z "$ac_err"; then
8204   rm -rf conftest*
8205   eval "ac_cv_header_$ac_safe=yes"
8206 else
8207   echo "$ac_err" >&5
8208   echo "configure: failed program was:" >&5
8209   cat conftest.$ac_ext >&5
8210   rm -rf conftest*
8211   eval "ac_cv_header_$ac_safe=no"
8212 fi
8213 rm -f conftest*
8214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8215   echo "$ac_t""yes" 1>&6
8216   :
8217 else
8218   echo "$ac_t""no" 1>&6
8219 with_xface=no
8220 fi
8221  }
8222   test -z "$with_xface" && { 
8223 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8224 echo "configure:8225: checking for UnGenFace in -lcompface" >&5
8225 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8226
8227 xe_check_libs=" -lcompface "
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char UnGenFace();
8235
8236 int main() {
8237 UnGenFace()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 xe_check_libs=""
8251
8252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8253   echo "$ac_t""yes" 1>&6
8254   : 
8255 else
8256   echo "$ac_t""no" 1>&6
8257 with_xface=no
8258 fi
8259
8260  }
8261   test -z "$with_xface" && with_xface=yes
8262   if test "$with_xface" = "yes"; then
8263     { test "$extra_verbose" = "yes" && cat << \EOF
8264     Defining HAVE_XFACE
8265 EOF
8266 cat >> confdefs.h <<\EOF
8267 #define HAVE_XFACE 1
8268 EOF
8269 }
8270
8271     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8272   fi
8273
8274         if test "$with_gif" != "no"; then
8275     with_gif="yes"
8276     { test "$extra_verbose" = "yes" && cat << \EOF
8277     Defining HAVE_GIF
8278 EOF
8279 cat >> confdefs.h <<\EOF
8280 #define HAVE_GIF 1
8281 EOF
8282 }
8283
8284     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8285    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8286  fi
8287   fi
8288
8289       if test "$with_png $with_tiff" != "no no"; then
8290     
8291 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8292 echo "configure:8293: checking for inflate in -lc" >&5
8293 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8294
8295 xe_check_libs=" -lc "
8296 cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299 /* Override any gcc2 internal prototype to avoid an error.  */
8300 /* We use char because int might match the return type of a gcc2
8301     builtin and then its argument prototype would still apply.  */
8302 char inflate();
8303
8304 int main() {
8305 inflate()
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8309   rm -rf conftest*
8310   eval "ac_cv_lib_$ac_lib_var=yes"
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=no"
8316 fi
8317 rm -f conftest*
8318 xe_check_libs=""
8319
8320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8321   echo "$ac_t""yes" 1>&6
8322   :
8323 else
8324   echo "$ac_t""no" 1>&6
8325
8326 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8327 echo "configure:8328: checking for inflate in -lz" >&5
8328 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8329
8330 xe_check_libs=" -lz "
8331 cat > conftest.$ac_ext <<EOF
8332 #line 8333 "configure"
8333 #include "confdefs.h"
8334 /* Override any gcc2 internal prototype to avoid an error.  */
8335 /* We use char because int might match the return type of a gcc2
8336     builtin and then its argument prototype would still apply.  */
8337 char inflate();
8338
8339 int main() {
8340 inflate()
8341 ; return 0; }
8342 EOF
8343 if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8344   rm -rf conftest*
8345   eval "ac_cv_lib_$ac_lib_var=yes"
8346 else
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -rf conftest*
8350   eval "ac_cv_lib_$ac_lib_var=no"
8351 fi
8352 rm -f conftest*
8353 xe_check_libs=""
8354
8355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8356   echo "$ac_t""yes" 1>&6
8357   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8358 else
8359   echo "$ac_t""no" 1>&6
8360
8361 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8362 echo "configure:8363: checking for inflate in -lgz" >&5
8363 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8364
8365 xe_check_libs=" -lgz "
8366 cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 /* Override any gcc2 internal prototype to avoid an error.  */
8370 /* We use char because int might match the return type of a gcc2
8371     builtin and then its argument prototype would still apply.  */
8372 char inflate();
8373
8374 int main() {
8375 inflate()
8376 ; return 0; }
8377 EOF
8378 if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8379   rm -rf conftest*
8380   eval "ac_cv_lib_$ac_lib_var=yes"
8381 else
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_lib_$ac_lib_var=no"
8386 fi
8387 rm -f conftest*
8388 xe_check_libs=""
8389
8390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8391   echo "$ac_t""yes" 1>&6
8392   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8393 else
8394   echo "$ac_t""no" 1>&6
8395 fi
8396
8397
8398 fi
8399
8400
8401 fi
8402
8403
8404   fi
8405
8406     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8407 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8408 echo "configure:8409: checking for jpeglib.h" >&5
8409
8410 cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413 #include <jpeglib.h>
8414 EOF
8415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8416 { (eval echo configure:8417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8418 if test -z "$ac_err"; then
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=yes"
8421 else
8422   echo "$ac_err" >&5
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   eval "ac_cv_header_$ac_safe=no"
8427 fi
8428 rm -f conftest*
8429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8430   echo "$ac_t""yes" 1>&6
8431   :
8432 else
8433   echo "$ac_t""no" 1>&6
8434 with_jpeg=no
8435 fi
8436  }
8437   test -z "$with_jpeg" && { 
8438 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8439 echo "configure:8440: checking for jpeg_destroy_decompress in -ljpeg" >&5
8440 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8441
8442 xe_check_libs=" -ljpeg "
8443 cat > conftest.$ac_ext <<EOF
8444 #line 8445 "configure"
8445 #include "confdefs.h"
8446 /* Override any gcc2 internal prototype to avoid an error.  */
8447 /* We use char because int might match the return type of a gcc2
8448     builtin and then its argument prototype would still apply.  */
8449 char jpeg_destroy_decompress();
8450
8451 int main() {
8452 jpeg_destroy_decompress()
8453 ; return 0; }
8454 EOF
8455 if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8456   rm -rf conftest*
8457   eval "ac_cv_lib_$ac_lib_var=yes"
8458 else
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   eval "ac_cv_lib_$ac_lib_var=no"
8463 fi
8464 rm -f conftest*
8465 xe_check_libs=""
8466
8467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8468   echo "$ac_t""yes" 1>&6
8469   :
8470 else
8471   echo "$ac_t""no" 1>&6
8472 with_jpeg=no
8473 fi
8474
8475  }
8476   test -z "$with_jpeg" && with_jpeg=yes
8477   if test "$with_jpeg" = "yes"; then
8478     { test "$extra_verbose" = "yes" && cat << \EOF
8479     Defining HAVE_JPEG
8480 EOF
8481 cat >> confdefs.h <<\EOF
8482 #define HAVE_JPEG 1
8483 EOF
8484 }
8485
8486     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8487   fi
8488
8489     png_problem=""
8490   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8491 echo "configure:8492: checking for pow" >&5
8492
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* System header to define __stub macros and hopefully few prototypes,
8497     which can conflict with char pow(); below.  */
8498 #include <assert.h>
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 /* We use char because int might match the return type of a gcc2
8501     builtin and then its argument prototype would still apply.  */
8502 char pow();
8503
8504 int main() {
8505
8506 /* The GNU C library defines this for functions which it implements
8507     to always fail with ENOSYS.  Some functions are actually named
8508     something starting with __ and the normal name is an alias.  */
8509 #if defined (__stub_pow) || defined (__stub___pow)
8510 choke me
8511 #else
8512 pow();
8513 #endif
8514
8515 ; return 0; }
8516 EOF
8517 if { (eval echo configure:8518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8518   rm -rf conftest*
8519   eval "ac_cv_func_pow=yes"
8520 else
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523   rm -rf conftest*
8524   eval "ac_cv_func_pow=no"
8525 fi
8526 rm -f conftest*
8527
8528 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8529   echo "$ac_t""yes" 1>&6
8530   :
8531 else
8532   echo "$ac_t""no" 1>&6
8533 with_png=no
8534 fi
8535  }
8536   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8537 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8538 echo "configure:8539: checking for png.h" >&5
8539
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <png.h>
8544 EOF
8545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8546 { (eval echo configure:8547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8548 if test -z "$ac_err"; then
8549   rm -rf conftest*
8550   eval "ac_cv_header_$ac_safe=yes"
8551 else
8552   echo "$ac_err" >&5
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_header_$ac_safe=no"
8557 fi
8558 rm -f conftest*
8559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8560   echo "$ac_t""yes" 1>&6
8561   :
8562 else
8563   echo "$ac_t""no" 1>&6
8564 with_png=no
8565 fi
8566  }
8567   test -z "$with_png" && { 
8568 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8569 echo "configure:8570: checking for png_read_image in -lpng" >&5
8570 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8571
8572 xe_check_libs=" -lpng "
8573 cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 /* Override any gcc2 internal prototype to avoid an error.  */
8577 /* We use char because int might match the return type of a gcc2
8578     builtin and then its argument prototype would still apply.  */
8579 char png_read_image();
8580
8581 int main() {
8582 png_read_image()
8583 ; return 0; }
8584 EOF
8585 if { (eval echo configure:8586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8586   rm -rf conftest*
8587   eval "ac_cv_lib_$ac_lib_var=yes"
8588 else
8589   echo "configure: failed program was:" >&5
8590   cat conftest.$ac_ext >&5
8591   rm -rf conftest*
8592   eval "ac_cv_lib_$ac_lib_var=no"
8593 fi
8594 rm -f conftest*
8595 xe_check_libs=""
8596
8597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8598   echo "$ac_t""yes" 1>&6
8599   :
8600 else
8601   echo "$ac_t""no" 1>&6
8602 with_png=no
8603 fi
8604
8605  }
8606   if test -z "$with_png"; then
8607     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8608 echo "configure:8609: checking for workable png version information" >&5
8609     xe_check_libs="-lpng -lz"
8610     cat > conftest.$ac_ext <<EOF
8611 #line 8612 "configure"
8612 #include "confdefs.h"
8613 #include <png.h>
8614     int main(int c, char **v) {
8615     if (c == 1) return 0;
8616     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8617     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8618 EOF
8619 if { (eval echo configure:8620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8620 then
8621   ./conftest dummy_arg; png_status=$?;
8622       if test "$png_status" = "0"; then
8623         with_png=yes;
8624       else
8625         with_png=no;
8626         if test "$png_status" = "1"; then
8627           png_problem="PNG library version and header file don't match!"
8628         elif test "$png_status" = "2"; then
8629           png_problem="PNG library version too old (pre 1.0.2)!"
8630         fi
8631         echo "
8632 *** WARNING *** $png_problem
8633   I'm not touching that with a 10-foot pole!
8634   If you really want to use the installed version of libPNG, rerun
8635   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8636     fi
8637 else
8638   conftest_rc="$?"
8639   echo "configure: failed program was:" >&5
8640   cat conftest.$ac_ext >&5
8641   rm -fr conftest*
8642   with_png=no
8643 fi
8644 rm -fr conftest*
8645     xe_check_libs=
8646     echo "$ac_t""$with_png" 1>&6
8647   fi
8648   if test "$with_png" = "yes"; then
8649     { test "$extra_verbose" = "yes" && cat << \EOF
8650     Defining HAVE_PNG
8651 EOF
8652 cat >> confdefs.h <<\EOF
8653 #define HAVE_PNG 1
8654 EOF
8655 }
8656
8657     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8658   fi
8659
8660     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8661 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8662 echo "configure:8663: checking for tiffio.h" >&5
8663
8664 cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667 #include <tiffio.h>
8668 EOF
8669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8670 { (eval echo configure:8671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8672 if test -z "$ac_err"; then
8673   rm -rf conftest*
8674   eval "ac_cv_header_$ac_safe=yes"
8675 else
8676   echo "$ac_err" >&5
8677   echo "configure: failed program was:" >&5
8678   cat conftest.$ac_ext >&5
8679   rm -rf conftest*
8680   eval "ac_cv_header_$ac_safe=no"
8681 fi
8682 rm -f conftest*
8683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8684   echo "$ac_t""yes" 1>&6
8685   :
8686 else
8687   echo "$ac_t""no" 1>&6
8688 with_tiff=no
8689 fi
8690  }
8691   test -z "$with_tiff" && { 
8692 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8693 echo "configure:8694: checking for TIFFClientOpen in -ltiff" >&5
8694 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8695
8696 xe_check_libs=" -ltiff "
8697 cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* Override any gcc2 internal prototype to avoid an error.  */
8701 /* We use char because int might match the return type of a gcc2
8702     builtin and then its argument prototype would still apply.  */
8703 char TIFFClientOpen();
8704
8705 int main() {
8706 TIFFClientOpen()
8707 ; return 0; }
8708 EOF
8709 if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8710   rm -rf conftest*
8711   eval "ac_cv_lib_$ac_lib_var=yes"
8712 else
8713   echo "configure: failed program was:" >&5
8714   cat conftest.$ac_ext >&5
8715   rm -rf conftest*
8716   eval "ac_cv_lib_$ac_lib_var=no"
8717 fi
8718 rm -f conftest*
8719 xe_check_libs=""
8720
8721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8722   echo "$ac_t""yes" 1>&6
8723   :
8724 else
8725   echo "$ac_t""no" 1>&6
8726 with_tiff=no
8727 fi
8728
8729  }
8730   test -z "$with_tiff" && with_tiff=yes
8731   if test "$with_tiff" = "yes"; then
8732     { test "$extra_verbose" = "yes" && cat << \EOF
8733     Defining HAVE_TIFF
8734 EOF
8735 cat >> confdefs.h <<\EOF
8736 #define HAVE_TIFF 1
8737 EOF
8738 }
8739
8740     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8741   fi
8742 fi
8743
8744
8745 if test "$with_gtk" = "yes"; then
8746     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8747 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8748 echo "configure:8749: checking for compface.h" >&5
8749
8750 cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 #include <compface.h>
8754 EOF
8755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8756 { (eval echo configure:8757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8758 if test -z "$ac_err"; then
8759   rm -rf conftest*
8760   eval "ac_cv_header_$ac_safe=yes"
8761 else
8762   echo "$ac_err" >&5
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -rf conftest*
8766   eval "ac_cv_header_$ac_safe=no"
8767 fi
8768 rm -f conftest*
8769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8770   echo "$ac_t""yes" 1>&6
8771   :
8772 else
8773   echo "$ac_t""no" 1>&6
8774 with_xface=no
8775 fi
8776  }
8777   test -z "$with_xface" && { 
8778 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8779 echo "configure:8780: checking for UnGenFace in -lcompface" >&5
8780 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8781
8782 xe_check_libs=" -lcompface "
8783 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 /* Override any gcc2 internal prototype to avoid an error.  */
8787 /* We use char because int might match the return type of a gcc2
8788     builtin and then its argument prototype would still apply.  */
8789 char UnGenFace();
8790
8791 int main() {
8792 UnGenFace()
8793 ; return 0; }
8794 EOF
8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8796   rm -rf conftest*
8797   eval "ac_cv_lib_$ac_lib_var=yes"
8798 else
8799   echo "configure: failed program was:" >&5
8800   cat conftest.$ac_ext >&5
8801   rm -rf conftest*
8802   eval "ac_cv_lib_$ac_lib_var=no"
8803 fi
8804 rm -f conftest*
8805 xe_check_libs=""
8806
8807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8808   echo "$ac_t""yes" 1>&6
8809   : 
8810 else
8811   echo "$ac_t""no" 1>&6
8812 with_xface=no
8813 fi
8814
8815  }
8816   test -z "$with_xface" && with_xface=yes
8817   if test "$with_xface" = "yes"; then
8818     { test "$extra_verbose" = "yes" && cat << \EOF
8819     Defining HAVE_XFACE
8820 EOF
8821 cat >> confdefs.h <<\EOF
8822 #define HAVE_XFACE 1
8823 EOF
8824 }
8825
8826     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8827   fi
8828 fi
8829
8830
8831
8832 if test "$with_x11" = "yes"; then
8833   echo "checking for X11 graphics libraries" 1>&6
8834 echo "configure:8835: checking for X11 graphics libraries" >&5
8835 fi
8836
8837 case "$with_widgets" in
8838   "yes" | "athena")             detect_athena=yes ;;
8839    *)                           detect_athena=no ;;
8840 esac
8841
8842 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8843   echo "checking for the Athena widgets" 1>&6
8844 echo "configure:8845: checking for the Athena widgets" >&5
8845
8846     case "$with_athena" in
8847         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8848     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8849     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8850     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8851     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8852     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8853   esac
8854
8855     if test "$athena_3d" = "no"; then
8856     
8857 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8858 echo "configure:8859: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8859 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8860
8861 xe_check_libs=" -l$athena_variant "
8862 cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865 /* Override any gcc2 internal prototype to avoid an error.  */
8866 /* We use char because int might match the return type of a gcc2
8867     builtin and then its argument prototype would still apply.  */
8868 char XawScrollbarSetThumb();
8869
8870 int main() {
8871 XawScrollbarSetThumb()
8872 ; return 0; }
8873 EOF
8874 if { (eval echo configure:8875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8875   rm -rf conftest*
8876   eval "ac_cv_lib_$ac_lib_var=yes"
8877 else
8878   echo "configure: failed program was:" >&5
8879   cat conftest.$ac_ext >&5
8880   rm -rf conftest*
8881   eval "ac_cv_lib_$ac_lib_var=no"
8882 fi
8883 rm -f conftest*
8884 xe_check_libs=""
8885
8886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8887   echo "$ac_t""yes" 1>&6
8888           
8889 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8890 echo "configure:8891: checking for threeDClassRec in -l$athena_variant" >&5
8891 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8892
8893 xe_check_libs=" -l$athena_variant "
8894 cat > conftest.$ac_ext <<EOF
8895 #line 8896 "configure"
8896 #include "confdefs.h"
8897 /* Override any gcc2 internal prototype to avoid an error.  */
8898 /* We use char because int might match the return type of a gcc2
8899     builtin and then its argument prototype would still apply.  */
8900 char threeDClassRec();
8901
8902 int main() {
8903 threeDClassRec()
8904 ; return 0; }
8905 EOF
8906 if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=yes"
8909 else
8910   echo "configure: failed program was:" >&5
8911   cat conftest.$ac_ext >&5
8912   rm -rf conftest*
8913   eval "ac_cv_lib_$ac_lib_var=no"
8914 fi
8915 rm -f conftest*
8916 xe_check_libs=""
8917
8918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8919   echo "$ac_t""yes" 1>&6
8920   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8921 else
8922   echo "$ac_t""no" 1>&6
8923 athena_lib=$athena_variant
8924 fi
8925
8926
8927       
8928 else
8929   echo "$ac_t""no" 1>&6
8930 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8931 fi
8932
8933
8934   else
8935         
8936 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8937 echo "configure:8938: checking for threeDClassRec in -l$athena_variant" >&5
8938 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8939
8940 xe_check_libs=" -l$athena_variant "
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 /* Override any gcc2 internal prototype to avoid an error.  */
8945 /* We use char because int might match the return type of a gcc2
8946     builtin and then its argument prototype would still apply.  */
8947 char threeDClassRec();
8948
8949 int main() {
8950 threeDClassRec()
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8954   rm -rf conftest*
8955   eval "ac_cv_lib_$ac_lib_var=yes"
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   eval "ac_cv_lib_$ac_lib_var=no"
8961 fi
8962 rm -f conftest*
8963 xe_check_libs=""
8964
8965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8966   echo "$ac_t""yes" 1>&6
8967   athena_lib=$athena_variant
8968 else
8969   echo "$ac_t""no" 1>&6
8970 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8971 echo "configure:8972: checking for threeDClassRec in -lXaw" >&5
8972 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8973
8974 xe_check_libs=" -lXaw "
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 /* Override any gcc2 internal prototype to avoid an error.  */
8979 /* We use char because int might match the return type of a gcc2
8980     builtin and then its argument prototype would still apply.  */
8981 char threeDClassRec();
8982
8983 int main() {
8984 threeDClassRec()
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   eval "ac_cv_lib_$ac_lib_var=yes"
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   eval "ac_cv_lib_$ac_lib_var=no"
8995 fi
8996 rm -f conftest*
8997 xe_check_libs=""
8998
8999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9000   echo "$ac_t""yes" 1>&6
9001   athena_lib=Xaw;
9002           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9003         
9004 else
9005   echo "$ac_t""no" 1>&6
9006 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9007 fi
9008
9009
9010 fi
9011
9012
9013   fi
9014
9015     if test "$athena_3d" = "no"; then
9016     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9017 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9018 echo "configure:9019: checking for X11/Xaw/ThreeD.h" >&5
9019
9020 cat > conftest.$ac_ext <<EOF
9021 #line 9022 "configure"
9022 #include "confdefs.h"
9023 #include <X11/Xaw/ThreeD.h>
9024 EOF
9025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9026 { (eval echo configure:9027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9028 if test -z "$ac_err"; then
9029   rm -rf conftest*
9030   eval "ac_cv_header_$ac_safe=yes"
9031 else
9032   echo "$ac_err" >&5
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   eval "ac_cv_header_$ac_safe=no"
9037 fi
9038 rm -f conftest*
9039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9040   echo "$ac_t""yes" 1>&6
9041   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9042 else
9043   echo "$ac_t""no" 1>&6
9044 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9045 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9046 echo "configure:9047: checking for X11/Xaw/XawInit.h" >&5
9047
9048 cat > conftest.$ac_ext <<EOF
9049 #line 9050 "configure"
9050 #include "confdefs.h"
9051 #include <X11/Xaw/XawInit.h>
9052 EOF
9053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9054 { (eval echo configure:9055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9056 if test -z "$ac_err"; then
9057   rm -rf conftest*
9058   eval "ac_cv_header_$ac_safe=yes"
9059 else
9060   echo "$ac_err" >&5
9061   echo "configure: failed program was:" >&5
9062   cat conftest.$ac_ext >&5
9063   rm -rf conftest*
9064   eval "ac_cv_header_$ac_safe=no"
9065 fi
9066 rm -f conftest*
9067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069   athena_h_path=X11/Xaw
9070 else
9071   echo "$ac_t""no" 1>&6
9072 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9073 fi
9074
9075 fi
9076
9077   else
9078             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9079 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9080 echo "configure:9081: checking for X11/$athena_variant/XawInit.h" >&5
9081
9082 cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085 #include <X11/$athena_variant/XawInit.h>
9086 EOF
9087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9088 { (eval echo configure:9089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9090 if test -z "$ac_err"; then
9091   rm -rf conftest*
9092   eval "ac_cv_header_$ac_safe=yes"
9093 else
9094   echo "$ac_err" >&5
9095   echo "configure: failed program was:" >&5
9096   cat conftest.$ac_ext >&5
9097   rm -rf conftest*
9098   eval "ac_cv_header_$ac_safe=no"
9099 fi
9100 rm -f conftest*
9101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9102   echo "$ac_t""yes" 1>&6
9103   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9104 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9105 echo "configure:9106: checking for X11/$athena_variant/ThreeD.h" >&5
9106
9107 cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110 #include <X11/$athena_variant/ThreeD.h>
9111 EOF
9112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9113 { (eval echo configure:9114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9115 if test -z "$ac_err"; then
9116   rm -rf conftest*
9117   eval "ac_cv_header_$ac_safe=yes"
9118 else
9119   echo "$ac_err" >&5
9120   echo "configure: failed program was:" >&5
9121   cat conftest.$ac_ext >&5
9122   rm -rf conftest*
9123   eval "ac_cv_header_$ac_safe=no"
9124 fi
9125 rm -f conftest*
9126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9127   echo "$ac_t""yes" 1>&6
9128   athena_h_path=X11/$athena_variant
9129 else
9130   echo "$ac_t""no" 1>&6
9131 fi
9132
9133 else
9134   echo "$ac_t""no" 1>&6
9135 fi
9136
9137
9138         if test -z "$athena_h_path"; then
9139       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9140 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9141 echo "configure:9142: checking for $athena_variant/XawInit.h" >&5
9142
9143 cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146 #include <$athena_variant/XawInit.h>
9147 EOF
9148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9149 { (eval echo configure:9150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9151 if test -z "$ac_err"; then
9152   rm -rf conftest*
9153   eval "ac_cv_header_$ac_safe=yes"
9154 else
9155   echo "$ac_err" >&5
9156   echo "configure: failed program was:" >&5
9157   cat conftest.$ac_ext >&5
9158   rm -rf conftest*
9159   eval "ac_cv_header_$ac_safe=no"
9160 fi
9161 rm -f conftest*
9162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9165 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9166 echo "configure:9167: checking for $athena_variant/ThreeD.h" >&5
9167
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 #include <$athena_variant/ThreeD.h>
9172 EOF
9173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9174 { (eval echo configure:9175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9176 if test -z "$ac_err"; then
9177   rm -rf conftest*
9178   eval "ac_cv_header_$ac_safe=yes"
9179 else
9180   echo "$ac_err" >&5
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   eval "ac_cv_header_$ac_safe=no"
9185 fi
9186 rm -f conftest*
9187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9188   echo "$ac_t""yes" 1>&6
9189   athena_h_path=$athena_variant
9190 else
9191   echo "$ac_t""no" 1>&6
9192 fi
9193
9194 else
9195   echo "$ac_t""no" 1>&6
9196 fi
9197
9198     fi
9199
9200         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9201       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9202 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9203 echo "configure:9204: checking for X11/Xaw3d/XawInit.h" >&5
9204
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 #include <X11/Xaw3d/XawInit.h>
9209 EOF
9210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9211 { (eval echo configure:9212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9213 if test -z "$ac_err"; then
9214   rm -rf conftest*
9215   eval "ac_cv_header_$ac_safe=yes"
9216 else
9217   echo "$ac_err" >&5
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -rf conftest*
9221   eval "ac_cv_header_$ac_safe=no"
9222 fi
9223 rm -f conftest*
9224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9225   echo "$ac_t""yes" 1>&6
9226   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9227 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9228 echo "configure:9229: checking for X11/Xaw3d/ThreeD.h" >&5
9229
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <X11/Xaw3d/ThreeD.h>
9234 EOF
9235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9236 { (eval echo configure:9237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9238 if test -z "$ac_err"; then
9239   rm -rf conftest*
9240   eval "ac_cv_header_$ac_safe=yes"
9241 else
9242   echo "$ac_err" >&5
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -rf conftest*
9246   eval "ac_cv_header_$ac_safe=no"
9247 fi
9248 rm -f conftest*
9249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251   
9252             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9253             athena_h_path=X11/Xaw3d
9254           
9255 else
9256   echo "$ac_t""no" 1>&6
9257 fi
9258
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262
9263     fi
9264
9265         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9266       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9267 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9268 echo "configure:9269: checking for Xaw3d/XawInit.h" >&5
9269
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 #include <Xaw3d/XawInit.h>
9274 EOF
9275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9276 { (eval echo configure:9277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9278 if test -z "$ac_err"; then
9279   rm -rf conftest*
9280   eval "ac_cv_header_$ac_safe=yes"
9281 else
9282   echo "$ac_err" >&5
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_header_$ac_safe=no"
9287 fi
9288 rm -f conftest*
9289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9290   echo "$ac_t""yes" 1>&6
9291   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9292 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9293 echo "configure:9294: checking for Xaw3d/ThreeD.h" >&5
9294
9295 cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 #include <Xaw3d/ThreeD.h>
9299 EOF
9300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9301 { (eval echo configure:9302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9303 if test -z "$ac_err"; then
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=yes"
9306 else
9307   echo "$ac_err" >&5
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -rf conftest*
9311   eval "ac_cv_header_$ac_safe=no"
9312 fi
9313 rm -f conftest*
9314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316   
9317             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9318             athena_h_path=Xaw3d
9319           
9320 else
9321   echo "$ac_t""no" 1>&6
9322 fi
9323
9324 else
9325   echo "$ac_t""no" 1>&6
9326 fi
9327
9328     fi
9329
9330             if test -z "$athena_h_path"; then
9331       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9332 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9333 echo "configure:9334: checking for X11/Xaw/ThreeD.h" >&5
9334
9335 cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338 #include <X11/Xaw/ThreeD.h>
9339 EOF
9340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9341 { (eval echo configure:9342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9343 if test -z "$ac_err"; then
9344   rm -rf conftest*
9345   eval "ac_cv_header_$ac_safe=yes"
9346 else
9347   echo "$ac_err" >&5
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   eval "ac_cv_header_$ac_safe=no"
9352 fi
9353 rm -f conftest*
9354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356   
9357           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9358           athena_h_path=X11/Xaw
9359         
9360 else
9361   echo "$ac_t""no" 1>&6
9362 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9363 fi
9364
9365     fi
9366   fi
9367
9368     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9369     have_xaw=yes
9370   else
9371     have_xaw=no
9372   fi
9373
9374 else
9375   have_xaw=no
9376 fi 
9377 if test "$with_x11" = "yes"; then
9378     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9379 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9380 echo "configure:9381: checking for Xm/Xm.h" >&5
9381
9382 cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 #include <Xm/Xm.h>
9386 EOF
9387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9388 { (eval echo configure:9389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9390 if test -z "$ac_err"; then
9391   rm -rf conftest*
9392   eval "ac_cv_header_$ac_safe=yes"
9393 else
9394   echo "$ac_err" >&5
9395   echo "configure: failed program was:" >&5
9396   cat conftest.$ac_ext >&5
9397   rm -rf conftest*
9398   eval "ac_cv_header_$ac_safe=no"
9399 fi
9400 rm -f conftest*
9401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9402   echo "$ac_t""yes" 1>&6
9403   
9404 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9405 echo "configure:9406: checking for XmStringFree in -lXm" >&5
9406 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9407
9408 xe_check_libs=" -lXm "
9409 cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 /* Override any gcc2 internal prototype to avoid an error.  */
9413 /* We use char because int might match the return type of a gcc2
9414     builtin and then its argument prototype would still apply.  */
9415 char XmStringFree();
9416
9417 int main() {
9418 XmStringFree()
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9422   rm -rf conftest*
9423   eval "ac_cv_lib_$ac_lib_var=yes"
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   eval "ac_cv_lib_$ac_lib_var=no"
9429 fi
9430 rm -f conftest*
9431 xe_check_libs=""
9432
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9434   echo "$ac_t""yes" 1>&6
9435   have_motif=yes
9436 else
9437   echo "$ac_t""no" 1>&6
9438 have_motif=no
9439 fi
9440
9441
9442 else
9443   echo "$ac_t""no" 1>&6
9444 have_motif=no
9445 fi
9446
9447
9448   if test "$have_motif" = "yes"; then
9449         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9450 echo "configure:9451: checking for Lesstif" >&5
9451     cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 #include <Xm/Xm.h>
9455 #ifdef LESSTIF_VERSION
9456 yes
9457 #endif
9458
9459 EOF
9460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9461   egrep "yes" >/dev/null 2>&1; then
9462   rm -rf conftest*
9463   have_lesstif=yes
9464 else
9465   rm -rf conftest*
9466   have_lesstif=no
9467 fi
9468 rm -f conftest*
9469
9470   echo "$ac_t""$have_lesstif" 1>&6
9471   fi
9472
9473 fi 
9474
9475 case "$with_menubars" in "" | "yes" | "athena" )
9476   with_menubars="lucid" ;;
9477 esac
9478 case "$with_dialogs" in "" | "yes" | "lucid" )
9479   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9480   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9481   else with_dialogs=no
9482   fi ;;
9483 esac
9484 case "$with_scrollbars" in "" | "yes" )
9485   with_scrollbars="lucid" ;;
9486 esac
9487 case "$with_widgets" in "" | "yes" | "lucid")
9488   if   test "$have_motif" = "yes"; then with_widgets="motif"
9489   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9490   else with_widgets=no
9491   fi ;;
9492 esac
9493
9494 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9495
9496 case "$all_widgets" in
9497   *athena* )
9498     if test "$have_xaw" != "yes"; then
9499       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9500     fi
9501
9502         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9503
9504         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9505
9506                     { test "$extra_verbose" = "yes" && cat << EOF
9507     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9508 EOF
9509 cat >> confdefs.h <<EOF
9510 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9511 EOF
9512 }
9513
9514     { test "$extra_verbose" = "yes" && cat << EOF
9515     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9516 EOF
9517 cat >> confdefs.h <<EOF
9518 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9519 EOF
9520 }
9521
9522     { test "$extra_verbose" = "yes" && cat << EOF
9523     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9524 EOF
9525 cat >> confdefs.h <<EOF
9526 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9527 EOF
9528 }
9529
9530     { test "$extra_verbose" = "yes" && cat << EOF
9531     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9532 EOF
9533 cat >> confdefs.h <<EOF
9534 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9535 EOF
9536 }
9537
9538     { test "$extra_verbose" = "yes" && cat << EOF
9539     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9540 EOF
9541 cat >> confdefs.h <<EOF
9542 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9543 EOF
9544 }
9545
9546     { test "$extra_verbose" = "yes" && cat << EOF
9547     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9548 EOF
9549 cat >> confdefs.h <<EOF
9550 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9551 EOF
9552 }
9553
9554     { test "$extra_verbose" = "yes" && cat << EOF
9555     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9556 EOF
9557 cat >> confdefs.h <<EOF
9558 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9559 EOF
9560 }
9561
9562     { test "$extra_verbose" = "yes" && cat << EOF
9563     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9564 EOF
9565 cat >> confdefs.h <<EOF
9566 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9567 EOF
9568 }
9569
9570     { test "$extra_verbose" = "yes" && cat << EOF
9571     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9572 EOF
9573 cat >> confdefs.h <<EOF
9574 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9575 EOF
9576 }
9577
9578     { test "$extra_verbose" = "yes" && cat << EOF
9579     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9580 EOF
9581 cat >> confdefs.h <<EOF
9582 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9583 EOF
9584 }
9585
9586
9587     { test "$extra_verbose" = "yes" && cat << \EOF
9588     Defining LWLIB_USES_ATHENA
9589 EOF
9590 cat >> confdefs.h <<\EOF
9591 #define LWLIB_USES_ATHENA 1
9592 EOF
9593 }
9594
9595     { test "$extra_verbose" = "yes" && cat << \EOF
9596     Defining NEED_ATHENA
9597 EOF
9598 cat >> confdefs.h <<\EOF
9599 #define NEED_ATHENA 1
9600 EOF
9601 }
9602
9603     need_athena="yes"
9604
9605     if test "$athena_3d" = "yes"; then
9606       { test "$extra_verbose" = "yes" && cat << \EOF
9607     Defining HAVE_ATHENA_3D
9608 EOF
9609 cat >> confdefs.h <<\EOF
9610 #define HAVE_ATHENA_3D 1
9611 EOF
9612 }
9613
9614     fi
9615   ;;
9616 esac
9617
9618 case "$all_widgets" in *motif* )
9619   { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining LWLIB_USES_MOTIF
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define LWLIB_USES_MOTIF 1
9624 EOF
9625 }
9626
9627   { test "$extra_verbose" = "yes" && cat << \EOF
9628     Defining NEED_MOTIF
9629 EOF
9630 cat >> confdefs.h <<\EOF
9631 #define NEED_MOTIF 1
9632 EOF
9633 }
9634
9635   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9636   need_motif=yes ;;
9637 esac
9638
9639 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9640 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9641 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9642 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9643         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9644 case "$with_widgets" in athena* )
9645         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;;
9646 esac
9647 case "$all_widgets" in *lucid* )
9648   { test "$extra_verbose" = "yes" && cat << \EOF
9649     Defining NEED_LUCID
9650 EOF
9651 cat >> confdefs.h <<\EOF
9652 #define NEED_LUCID 1
9653 EOF
9654 }
9655
9656   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9657 esac
9658
9659
9660
9661 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9662     Defining LWLIB_SCROLLBARS_ATHENA
9663 EOF
9664 cat >> confdefs.h <<\EOF
9665 #define LWLIB_SCROLLBARS_ATHENA 1
9666 EOF
9667 }
9668
9669 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining LWLIB_DIALOGS_ATHENA
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define LWLIB_DIALOGS_ATHENA 1
9674 EOF
9675 }
9676
9677
9678 if test "$athena_3d" = "yes"; then
9679   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9680     Defining LWLIB_SCROLLBARS_ATHENA3D
9681 EOF
9682 cat >> confdefs.h <<\EOF
9683 #define LWLIB_SCROLLBARS_ATHENA3D 1
9684 EOF
9685 }
9686
9687   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9688     Defining LWLIB_DIALOGS_ATHENA3D
9689 EOF
9690 cat >> confdefs.h <<\EOF
9691 #define LWLIB_DIALOGS_ATHENA3D 1
9692 EOF
9693 }
9694
9695 fi
9696
9697 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9698     Defining LWLIB_WIDGETS_ATHENA
9699 EOF
9700 cat >> confdefs.h <<\EOF
9701 #define LWLIB_WIDGETS_ATHENA 1
9702 EOF
9703 }
9704 ;; esac
9705 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9706         { test "$extra_verbose" = "yes" && cat << \EOF
9707     Defining LWLIB_TABS_LUCID
9708 EOF
9709 cat >> confdefs.h <<\EOF
9710 #define LWLIB_TABS_LUCID 1
9711 EOF
9712 }
9713
9714
9715 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9716     Defining HAVE_MENUBARS
9717 EOF
9718 cat >> confdefs.h <<\EOF
9719 #define HAVE_MENUBARS 1
9720 EOF
9721 }
9722
9723 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9724     Defining HAVE_SCROLLBARS
9725 EOF
9726 cat >> confdefs.h <<\EOF
9727 #define HAVE_SCROLLBARS 1
9728 EOF
9729 }
9730
9731 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9732     Defining HAVE_DIALOGS
9733 EOF
9734 cat >> confdefs.h <<\EOF
9735 #define HAVE_DIALOGS 1
9736 EOF
9737 }
9738
9739 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9740     Defining HAVE_TOOLBARS
9741 EOF
9742 cat >> confdefs.h <<\EOF
9743 #define HAVE_TOOLBARS 1
9744 EOF
9745 }
9746
9747 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9748     Defining HAVE_WIDGETS
9749 EOF
9750 cat >> confdefs.h <<\EOF
9751 #define HAVE_WIDGETS 1
9752 EOF
9753 }
9754
9755
9756 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9757     Defining LWLIB_MENUBARS_LUCID
9758 EOF
9759 cat >> confdefs.h <<\EOF
9760 #define LWLIB_MENUBARS_LUCID 1
9761 EOF
9762 }
9763
9764 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9765     Defining LWLIB_SCROLLBARS_LUCID
9766 EOF
9767 cat >> confdefs.h <<\EOF
9768 #define LWLIB_SCROLLBARS_LUCID 1
9769 EOF
9770 }
9771
9772
9773 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9774     Defining LWLIB_MENUBARS_MOTIF
9775 EOF
9776 cat >> confdefs.h <<\EOF
9777 #define LWLIB_MENUBARS_MOTIF 1
9778 EOF
9779 }
9780
9781 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9782     Defining LWLIB_SCROLLBARS_MOTIF
9783 EOF
9784 cat >> confdefs.h <<\EOF
9785 #define LWLIB_SCROLLBARS_MOTIF 1
9786 EOF
9787 }
9788
9789 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9790     Defining LWLIB_DIALOGS_MOTIF
9791 EOF
9792 cat >> confdefs.h <<\EOF
9793 #define LWLIB_DIALOGS_MOTIF 1
9794 EOF
9795 }
9796
9797 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9798     Defining LWLIB_WIDGETS_MOTIF
9799 EOF
9800 cat >> confdefs.h <<\EOF
9801 #define LWLIB_WIDGETS_MOTIF 1
9802 EOF
9803 }
9804
9805
9806 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9807    echo "    xemacs will be linked with \"menubar.o\""
9808  fi
9809 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9810    echo "    xemacs will be linked with \"scrollbar.o\""
9811  fi
9812 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9813    echo "    xemacs will be linked with \"dialog.o\""
9814  fi
9815 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9816    echo "    xemacs will be linked with \"toolbar.o\""
9817  fi
9818
9819 if test "$with_gtk" = "yes"; then
9820   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"menubar-gtk.o\""
9822  fi
9823   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9824    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9825  fi
9826   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9827    echo "    xemacs will be linked with \"dialog-gtk.o\""
9828  fi
9829   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9830    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9831  fi
9832   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9833    echo "    xemacs will be linked with \"gui-gtk.o\""
9834  fi
9835 fi
9836
9837 if test "$with_x11" = "yes"; then
9838   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9839    echo "    xemacs will be linked with \"menubar-x.o\""
9840  fi
9841   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9842    echo "    xemacs will be linked with \"scrollbar-x.o\""
9843  fi
9844   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9845    echo "    xemacs will be linked with \"dialog-x.o\""
9846  fi
9847   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9848    echo "    xemacs will be linked with \"toolbar-x.o\""
9849  fi
9850   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9851    echo "    xemacs will be linked with \"gui-x.o\""
9852  fi
9853 fi
9854
9855
9856 test -z "$with_mule" && with_mule=no
9857 test -z "$with_file_coding" && with_file_coding=no
9858
9859
9860 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9861   { test "$extra_verbose" = "yes" && cat << \EOF
9862     Defining FILE_CODING
9863 EOF
9864 cat >> confdefs.h <<\EOF
9865 #define FILE_CODING 1
9866 EOF
9867 }
9868
9869   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9870    echo "    xemacs will be linked with \"file-coding.o\""
9871  fi
9872 fi
9873
9874 if test "$with_mule" = "yes" ; then
9875   echo "checking for Mule-related features" 1>&6
9876 echo "configure:9877: checking for Mule-related features" >&5
9877   { test "$extra_verbose" = "yes" && cat << \EOF
9878     Defining MULE
9879 EOF
9880 cat >> confdefs.h <<\EOF
9881 #define MULE 1
9882 EOF
9883 }
9884
9885   { test "$extra_verbose" = "yes" && cat << \EOF
9886     Defining FILE_CODING
9887 EOF
9888 cat >> confdefs.h <<\EOF
9889 #define FILE_CODING 1
9890 EOF
9891 }
9892
9893   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9894    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9895  fi
9896   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9897     { test "$extra_verbose" = "yes" && cat << \EOF
9898     Defining TEXT_CODING
9899 EOF
9900 cat >> confdefs.h <<\EOF
9901 #define TEXT_CODING 1
9902 EOF
9903 }
9904
9905     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9906    echo "    xemacs will be linked with \"text-coding.o\""
9907  fi
9908   else
9909     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9910    echo "    xemacs will be linked with \"file-coding.o\""
9911  fi
9912   fi
9913     for ac_hdr in libintl.h
9914 do
9915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9917 echo "configure:9918: checking for $ac_hdr" >&5
9918
9919 cat > conftest.$ac_ext <<EOF
9920 #line 9921 "configure"
9921 #include "confdefs.h"
9922 #include <$ac_hdr>
9923 EOF
9924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9925 { (eval echo configure:9926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9927 if test -z "$ac_err"; then
9928   rm -rf conftest*
9929   eval "ac_cv_header_$ac_safe=yes"
9930 else
9931   echo "$ac_err" >&5
9932   echo "configure: failed program was:" >&5
9933   cat conftest.$ac_ext >&5
9934   rm -rf conftest*
9935   eval "ac_cv_header_$ac_safe=no"
9936 fi
9937 rm -f conftest*
9938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9939   echo "$ac_t""yes" 1>&6
9940     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9941   { test "$extra_verbose" = "yes" && cat << EOF
9942     Defining $ac_tr_hdr
9943 EOF
9944 cat >> confdefs.h <<EOF
9945 #define $ac_tr_hdr 1
9946 EOF
9947 }
9948  
9949 else
9950   echo "$ac_t""no" 1>&6
9951 fi
9952 done
9953
9954   
9955 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9956 echo "configure:9957: checking for strerror in -lintl" >&5
9957 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9958
9959 xe_check_libs=" -lintl "
9960 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char strerror();
9967
9968 int main() {
9969 strerror()
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9973   rm -rf conftest*
9974   eval "ac_cv_lib_$ac_lib_var=yes"
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=no"
9980 fi
9981 rm -f conftest*
9982 xe_check_libs=""
9983
9984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9985   echo "$ac_t""yes" 1>&6
9986     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9987     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9988   { test "$extra_verbose" = "yes" && cat << EOF
9989     Defining $ac_tr_lib
9990 EOF
9991 cat >> confdefs.h <<EOF
9992 #define $ac_tr_lib 1
9993 EOF
9994 }
9995
9996   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9997
9998 else
9999   echo "$ac_t""no" 1>&6
10000 fi
10001
10002
10003
10004   if test "$with_utf_2000" = "yes" ; then
10005     { test "$extra_verbose" = "yes" && cat << \EOF
10006     Defining CHAR_IS_UCS4
10007 EOF
10008 cat >> confdefs.h <<\EOF
10009 #define CHAR_IS_UCS4 1
10010 EOF
10011 }
10012
10013     { test "$extra_verbose" = "yes" && cat << \EOF
10014     Defining UTF2000
10015 EOF
10016 cat >> confdefs.h <<\EOF
10017 #define UTF2000 1
10018 EOF
10019 }
10020
10021   fi
10022
10023   echo "checking for Mule input methods" 1>&6
10024 echo "configure:10025: checking for Mule input methods" >&5
10025         case "$with_xim" in "" | "yes" )
10026     echo "checking for XIM" 1>&6
10027 echo "configure:10028: checking for XIM" >&5
10028     
10029 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10030 echo "configure:10031: checking for XOpenIM in -lX11" >&5
10031 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10032
10033 xe_check_libs=" -lX11 "
10034 cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 /* Override any gcc2 internal prototype to avoid an error.  */
10038 /* We use char because int might match the return type of a gcc2
10039     builtin and then its argument prototype would still apply.  */
10040 char XOpenIM();
10041
10042 int main() {
10043 XOpenIM()
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=yes"
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   eval "ac_cv_lib_$ac_lib_var=no"
10054 fi
10055 rm -f conftest*
10056 xe_check_libs=""
10057
10058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10059   echo "$ac_t""yes" 1>&6
10060   with_xim=xlib
10061 else
10062   echo "$ac_t""no" 1>&6
10063 with_xim=no
10064 fi
10065
10066
10067         if test "$have_motif $have_lesstif" = "yes no"; then
10068       
10069 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10070 echo "configure:10071: checking for XmImMbLookupString in -lXm" >&5
10071 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10072
10073 xe_check_libs=" -lXm "
10074 cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 /* Override any gcc2 internal prototype to avoid an error.  */
10078 /* We use char because int might match the return type of a gcc2
10079     builtin and then its argument prototype would still apply.  */
10080 char XmImMbLookupString();
10081
10082 int main() {
10083 XmImMbLookupString()
10084 ; return 0; }
10085 EOF
10086 if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10087   rm -rf conftest*
10088   eval "ac_cv_lib_$ac_lib_var=yes"
10089 else
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   eval "ac_cv_lib_$ac_lib_var=no"
10094 fi
10095 rm -f conftest*
10096 xe_check_libs=""
10097
10098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10099   echo "$ac_t""yes" 1>&6
10100   with_xim=motif
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104
10105
10106     fi ;;
10107   esac
10108   if test "$with_xim" != "no"; then
10109     { test "$extra_verbose" = "yes" && cat << \EOF
10110     Defining HAVE_XIM
10111 EOF
10112 cat >> confdefs.h <<\EOF
10113 #define HAVE_XIM 1
10114 EOF
10115 }
10116
10117     if test "$with_xim" = "xlib"; then
10118       { test "$extra_verbose" = "yes" && cat << \EOF
10119     Defining XIM_XLIB
10120 EOF
10121 cat >> confdefs.h <<\EOF
10122 #define XIM_XLIB 1
10123 EOF
10124 }
10125
10126       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10127    echo "    xemacs will be linked with \"input-method-xlib.o\""
10128  fi
10129     fi
10130     if test "$with_xim" = "motif"; then
10131       { test "$extra_verbose" = "yes" && cat << \EOF
10132     Defining XIM_MOTIF
10133 EOF
10134 cat >> confdefs.h <<\EOF
10135 #define XIM_MOTIF 1
10136 EOF
10137 }
10138
10139       need_motif=yes
10140       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10141    echo "    xemacs will be linked with \"input-method-motif.o\""
10142  fi
10143     fi
10144     if test "$with_xim" = "motif"; then
10145       with_xfs=no
10146     fi
10147   fi
10148
10149     if test "$with_xfs" = "yes" ; then
10150     echo "checking for XFontSet" 1>&6
10151 echo "configure:10152: checking for XFontSet" >&5
10152     
10153 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10154 echo "configure:10155: checking for XmbDrawString in -lX11" >&5
10155 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10156
10157 xe_check_libs=" -lX11 "
10158 cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 /* Override any gcc2 internal prototype to avoid an error.  */
10162 /* We use char because int might match the return type of a gcc2
10163     builtin and then its argument prototype would still apply.  */
10164 char XmbDrawString();
10165
10166 int main() {
10167 XmbDrawString()
10168 ; return 0; }
10169 EOF
10170 if { (eval echo configure:10171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10171   rm -rf conftest*
10172   eval "ac_cv_lib_$ac_lib_var=yes"
10173 else
10174   echo "configure: failed program was:" >&5
10175   cat conftest.$ac_ext >&5
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=no"
10178 fi
10179 rm -f conftest*
10180 xe_check_libs=""
10181
10182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10183   echo "$ac_t""yes" 1>&6
10184   :
10185 else
10186   echo "$ac_t""no" 1>&6
10187 with_xfs=no
10188 fi
10189
10190
10191     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10192       { test "$extra_verbose" = "yes" && cat << \EOF
10193     Defining USE_XFONTSET
10194 EOF
10195 cat >> confdefs.h <<\EOF
10196 #define USE_XFONTSET 1
10197 EOF
10198 }
10199
10200       if test "$with_xim" = "no" ; then
10201         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10202    echo "    xemacs will be linked with \"input-method-xlib.o\""
10203  fi
10204       fi
10205     fi
10206   fi 
10207     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10208   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10209 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10210 echo "configure:10211: checking for wnn/jllib.h" >&5
10211
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 #include <wnn/jllib.h>
10216 EOF
10217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10218 { (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10220 if test -z "$ac_err"; then
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=yes"
10223 else
10224   echo "$ac_err" >&5
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   eval "ac_cv_header_$ac_safe=no"
10229 fi
10230 rm -f conftest*
10231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233   :
10234 else
10235   echo "$ac_t""no" 1>&6
10236 with_wnn=no
10237 fi
10238  }
10239     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10240 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10241 echo "configure:10242: checking for wnn/commonhd.h" >&5
10242
10243 cat > conftest.$ac_ext <<EOF
10244 #line 10245 "configure"
10245 #include "confdefs.h"
10246 #include <wnn/commonhd.h>
10247 EOF
10248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10249 { (eval echo configure:10250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10251 if test -z "$ac_err"; then
10252   rm -rf conftest*
10253   eval "ac_cv_header_$ac_safe=yes"
10254 else
10255   echo "$ac_err" >&5
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_header_$ac_safe=no"
10260 fi
10261 rm -f conftest*
10262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10263   echo "$ac_t""yes" 1>&6
10264   :
10265 else
10266   echo "$ac_t""no" 1>&6
10267 with_wnn=no
10268 fi
10269  }
10270     if test "$with_wnn" != "no"; then
10271     for ac_func in crypt
10272 do
10273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10274 echo "configure:10275: checking for $ac_func" >&5
10275
10276 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279 /* System header to define __stub macros and hopefully few prototypes,
10280     which can conflict with char $ac_func(); below.  */
10281 #include <assert.h>
10282 /* Override any gcc2 internal prototype to avoid an error.  */
10283 /* We use char because int might match the return type of a gcc2
10284     builtin and then its argument prototype would still apply.  */
10285 char $ac_func();
10286
10287 int main() {
10288
10289 /* The GNU C library defines this for functions which it implements
10290     to always fail with ENOSYS.  Some functions are actually named
10291     something starting with __ and the normal name is an alias.  */
10292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10293 choke me
10294 #else
10295 $ac_func();
10296 #endif
10297
10298 ; return 0; }
10299 EOF
10300 if { (eval echo configure:10301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10301   rm -rf conftest*
10302   eval "ac_cv_func_$ac_func=yes"
10303 else
10304   echo "configure: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306   rm -rf conftest*
10307   eval "ac_cv_func_$ac_func=no"
10308 fi
10309 rm -f conftest*
10310
10311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10312   echo "$ac_t""yes" 1>&6
10313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10314   { test "$extra_verbose" = "yes" && cat << EOF
10315     Defining $ac_tr_func
10316 EOF
10317 cat >> confdefs.h <<EOF
10318 #define $ac_tr_func 1
10319 EOF
10320 }
10321  
10322 else
10323   echo "$ac_t""no" 1>&6
10324 fi
10325 done
10326
10327     test "$ac_cv_func_crypt" != "yes" && { 
10328 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10329 echo "configure:10330: checking for crypt in -lcrypt" >&5
10330 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10331
10332 xe_check_libs=" -lcrypt "
10333 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 /* Override any gcc2 internal prototype to avoid an error.  */
10337 /* We use char because int might match the return type of a gcc2
10338     builtin and then its argument prototype would still apply.  */
10339 char crypt();
10340
10341 int main() {
10342 crypt()
10343 ; return 0; }
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10346   rm -rf conftest*
10347   eval "ac_cv_lib_$ac_lib_var=yes"
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   eval "ac_cv_lib_$ac_lib_var=no"
10353 fi
10354 rm -f conftest*
10355 xe_check_libs=""
10356
10357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10358   echo "$ac_t""yes" 1>&6
10359     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10361   { test "$extra_verbose" = "yes" && cat << EOF
10362     Defining $ac_tr_lib
10363 EOF
10364 cat >> confdefs.h <<EOF
10365 #define $ac_tr_lib 1
10366 EOF
10367 }
10368
10369   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10370
10371 else
10372   echo "$ac_t""no" 1>&6
10373 fi
10374
10375  }
10376   fi
10377     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10378     
10379 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10380 echo "configure:10381: checking for jl_dic_list_e in -lwnn" >&5
10381 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10382
10383 xe_check_libs=" -lwnn "
10384 cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387 /* Override any gcc2 internal prototype to avoid an error.  */
10388 /* We use char because int might match the return type of a gcc2
10389     builtin and then its argument prototype would still apply.  */
10390 char jl_dic_list_e();
10391
10392 int main() {
10393 jl_dic_list_e()
10394 ; return 0; }
10395 EOF
10396 if { (eval echo configure:10397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10397   rm -rf conftest*
10398   eval "ac_cv_lib_$ac_lib_var=yes"
10399 else
10400   echo "configure: failed program was:" >&5
10401   cat conftest.$ac_ext >&5
10402   rm -rf conftest*
10403   eval "ac_cv_lib_$ac_lib_var=no"
10404 fi
10405 rm -f conftest*
10406 xe_check_libs=""
10407
10408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10409   echo "$ac_t""yes" 1>&6
10410   libwnn=wnn
10411 else
10412   echo "$ac_t""no" 1>&6
10413 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10414 echo "configure:10415: checking for jl_dic_list_e in -lwnn4" >&5
10415 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10416
10417 xe_check_libs=" -lwnn4 "
10418 cat > conftest.$ac_ext <<EOF
10419 #line 10420 "configure"
10420 #include "confdefs.h"
10421 /* Override any gcc2 internal prototype to avoid an error.  */
10422 /* We use char because int might match the return type of a gcc2
10423     builtin and then its argument prototype would still apply.  */
10424 char jl_dic_list_e();
10425
10426 int main() {
10427 jl_dic_list_e()
10428 ; return 0; }
10429 EOF
10430 if { (eval echo configure:10431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10431   rm -rf conftest*
10432   eval "ac_cv_lib_$ac_lib_var=yes"
10433 else
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_lib_$ac_lib_var=no"
10438 fi
10439 rm -f conftest*
10440 xe_check_libs=""
10441
10442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10443   echo "$ac_t""yes" 1>&6
10444   libwnn=wnn4
10445 else
10446   echo "$ac_t""no" 1>&6
10447 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10448 echo "configure:10449: checking for jl_dic_list_e in -lwnn6" >&5
10449 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10450
10451 xe_check_libs=" -lwnn6 "
10452 cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 /* Override any gcc2 internal prototype to avoid an error.  */
10456 /* We use char because int might match the return type of a gcc2
10457     builtin and then its argument prototype would still apply.  */
10458 char jl_dic_list_e();
10459
10460 int main() {
10461 jl_dic_list_e()
10462 ; return 0; }
10463 EOF
10464 if { (eval echo configure:10465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10465   rm -rf conftest*
10466   eval "ac_cv_lib_$ac_lib_var=yes"
10467 else
10468   echo "configure: failed program was:" >&5
10469   cat conftest.$ac_ext >&5
10470   rm -rf conftest*
10471   eval "ac_cv_lib_$ac_lib_var=no"
10472 fi
10473 rm -f conftest*
10474 xe_check_libs=""
10475
10476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10477   echo "$ac_t""yes" 1>&6
10478   libwnn=wnn6
10479 else
10480   echo "$ac_t""no" 1>&6
10481 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10482 echo "configure:10483: checking for dic_list_e in -lwnn6_fromsrc" >&5
10483 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10484
10485 xe_check_libs=" -lwnn6_fromsrc "
10486 cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 /* Override any gcc2 internal prototype to avoid an error.  */
10490 /* We use char because int might match the return type of a gcc2
10491     builtin and then its argument prototype would still apply.  */
10492 char dic_list_e();
10493
10494 int main() {
10495 dic_list_e()
10496 ; return 0; }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10499   rm -rf conftest*
10500   eval "ac_cv_lib_$ac_lib_var=yes"
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_lib_$ac_lib_var=no"
10506 fi
10507 rm -f conftest*
10508 xe_check_libs=""
10509
10510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10511   echo "$ac_t""yes" 1>&6
10512   libwnn=wnn6_fromsrc
10513 else
10514   echo "$ac_t""no" 1>&6
10515 with_wnn=no
10516 fi
10517
10518
10519 fi
10520
10521
10522 fi
10523
10524
10525 fi
10526
10527
10528   fi
10529   test -z "$with_wnn" && with_wnn=yes
10530   if test "$with_wnn" = "yes"; then
10531     { test "$extra_verbose" = "yes" && cat << \EOF
10532     Defining HAVE_WNN
10533 EOF
10534 cat >> confdefs.h <<\EOF
10535 #define HAVE_WNN 1
10536 EOF
10537 }
10538
10539     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10540     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10541    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10542  fi
10543     if test "$with_wnn6" != "no"; then
10544       
10545 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10546 echo "configure:10547: checking for jl_fi_dic_list in -l$libwnn" >&5
10547 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10548
10549 xe_check_libs=" -l$libwnn "
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_fi_dic_list();
10557
10558 int main() {
10559 jl_fi_dic_list()
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   with_wnn6=yes
10577 else
10578   echo "$ac_t""no" 1>&6
10579 fi
10580
10581
10582       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10583     Defining WNN6
10584 EOF
10585 cat >> confdefs.h <<\EOF
10586 #define WNN6 1
10587 EOF
10588 }
10589
10590     fi
10591   fi
10592
10593     canna_includes_found=no
10594   if test "$with_canna" != "no"; then
10595     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10596 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10597 echo "configure:10598: checking for canna/jrkanji.h" >&5
10598
10599 cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 #include <canna/jrkanji.h>
10603 EOF
10604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10605 { (eval echo configure:10606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10607 if test -z "$ac_err"; then
10608   rm -rf conftest*
10609   eval "ac_cv_header_$ac_safe=yes"
10610 else
10611   echo "$ac_err" >&5
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_header_$ac_safe=no"
10616 fi
10617 rm -f conftest*
10618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10619   echo "$ac_t""yes" 1>&6
10620   canna_includes_found=yes
10621 else
10622   echo "$ac_t""no" 1>&6
10623 fi
10624
10625   fi
10626   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10627       -d "/usr/local/canna/include"; then
10628     save_c_switch_site="$c_switch_site"
10629     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10630     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10631 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10632 echo "configure:10633: checking for canna/jrkanji.h" >&5
10633
10634 cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637 #include <canna/jrkanji.h>
10638 EOF
10639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10640 { (eval echo configure:10641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10642 if test -z "$ac_err"; then
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=yes"
10645 else
10646   echo "$ac_err" >&5
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -rf conftest*
10650   eval "ac_cv_header_$ac_safe=no"
10651 fi
10652 rm -f conftest*
10653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10654   echo "$ac_t""yes" 1>&6
10655   canna_includes_found=yes
10656 else
10657   echo "$ac_t""no" 1>&6
10658 fi
10659
10660     if test "$canna_includes_found" != "yes"; then
10661       c_switch_site="$save_c_switch_site"
10662       with_canna="no"
10663     fi
10664   fi
10665
10666   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10667 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10668 echo "configure:10669: checking for canna/RK.h" >&5
10669
10670 cat > conftest.$ac_ext <<EOF
10671 #line 10672 "configure"
10672 #include "confdefs.h"
10673 #include <canna/RK.h>
10674 EOF
10675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10676 { (eval echo configure:10677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10678 if test -z "$ac_err"; then
10679   rm -rf conftest*
10680   eval "ac_cv_header_$ac_safe=yes"
10681 else
10682   echo "$ac_err" >&5
10683   echo "configure: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   rm -rf conftest*
10686   eval "ac_cv_header_$ac_safe=no"
10687 fi
10688 rm -f conftest*
10689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10690   echo "$ac_t""yes" 1>&6
10691   :
10692 else
10693   echo "$ac_t""no" 1>&6
10694 with_canna=no
10695 fi
10696  }
10697   test -z "$with_canna" && { 
10698 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10699 echo "configure:10700: checking for RkBgnBun in -lRKC" >&5
10700 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10701
10702 xe_check_libs=" -lRKC "
10703 cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706 /* Override any gcc2 internal prototype to avoid an error.  */
10707 /* We use char because int might match the return type of a gcc2
10708     builtin and then its argument prototype would still apply.  */
10709 char RkBgnBun();
10710
10711 int main() {
10712 RkBgnBun()
10713 ; return 0; }
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10716   rm -rf conftest*
10717   eval "ac_cv_lib_$ac_lib_var=yes"
10718 else
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -rf conftest*
10722   eval "ac_cv_lib_$ac_lib_var=no"
10723 fi
10724 rm -f conftest*
10725 xe_check_libs=""
10726
10727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10728   echo "$ac_t""yes" 1>&6
10729   :
10730 else
10731   echo "$ac_t""no" 1>&6
10732 with_canna=no
10733 fi
10734
10735  }
10736   test -z "$with_canna" && { 
10737 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10738 echo "configure:10739: checking for jrKanjiControl in -lcanna" >&5
10739 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10740
10741 xe_check_libs=" -lcanna "
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char jrKanjiControl();
10749
10750 int main() {
10751 jrKanjiControl()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 xe_check_libs=""
10765
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10767   echo "$ac_t""yes" 1>&6
10768   :
10769 else
10770   echo "$ac_t""no" 1>&6
10771 with_canna=no
10772 fi
10773
10774  }
10775   test -z "$with_canna" && with_canna=yes
10776   if test "$with_canna" = "yes"; then
10777     { test "$extra_verbose" = "yes" && cat << \EOF
10778     Defining HAVE_CANNA
10779 EOF
10780 cat >> confdefs.h <<\EOF
10781 #define HAVE_CANNA 1
10782 EOF
10783 }
10784
10785     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10786     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10787    echo "    xemacs will be linked with \"mule-canna.o\""
10788  fi
10789   fi
10790
10791 else   for feature in xim canna wnn; do
10792     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10793       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10794     fi
10795     eval "with_${feature}=no"
10796   done
10797 fi 
10798
10799 if test "$need_motif" = "yes" ; then
10800   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10801     
10802 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10803 echo "configure:10804: checking for layout_object_getvalue in -li18n" >&5
10804 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10805
10806 xe_check_libs=" -li18n "
10807 cat > conftest.$ac_ext <<EOF
10808 #line 10809 "configure"
10809 #include "confdefs.h"
10810 /* Override any gcc2 internal prototype to avoid an error.  */
10811 /* We use char because int might match the return type of a gcc2
10812     builtin and then its argument prototype would still apply.  */
10813 char layout_object_getvalue();
10814
10815 int main() {
10816 layout_object_getvalue()
10817 ; return 0; }
10818 EOF
10819 if { (eval echo configure:10820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10820   rm -rf conftest*
10821   eval "ac_cv_lib_$ac_lib_var=yes"
10822 else
10823   echo "configure: failed program was:" >&5
10824   cat conftest.$ac_ext >&5
10825   rm -rf conftest*
10826   eval "ac_cv_lib_$ac_lib_var=no"
10827 fi
10828 rm -f conftest*
10829 xe_check_libs=""
10830
10831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10832   echo "$ac_t""yes" 1>&6
10833   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10834 else
10835   echo "$ac_t""no" 1>&6
10836 fi
10837
10838
10839   
10840 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10841     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10842   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10843   
10844         runpath="" runpath_dirs=""
10845   if test -n "$LD_RUN_PATH"; then
10846     runpath="$LD_RUN_PATH"
10847   elif test "$GCC" = "yes"; then
10848         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10849     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10850     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10851     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10852       case "$arg" in P,* | -L* | -R* )
10853         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10854           {
10855 xe_runpath_dir="$dir"
10856   test "$xe_runpath_dir" != "/lib"     -a \
10857         "$xe_runpath_dir" != "/usr/lib" -a \
10858         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10859   eval "$xe_add_unique_runpath_dir"
10860 }
10861         done ;;
10862       esac
10863     done
10864     ld_switch_run="$ld_switch_run_save"
10865     rm -f conftest*
10866   else
10867         for arg in $ld_switch_site $ld_switch_x_site; do
10868       case "$arg" in -L*) {
10869 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10870   test "$xe_runpath_dir" != "/lib"     -a \
10871         "$xe_runpath_dir" != "/usr/lib" -a \
10872         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10873   eval "$xe_add_unique_runpath_dir"
10874 };; esac
10875     done
10876         if test "$opsys $need_motif" = "sol2 yes"; then
10877       xe_runpath_dir="/opt/SUNWdt/lib";
10878       eval "$xe_add_unique_runpath_dir";
10879     fi
10880   fi 
10881   if test -n "$runpath"; then
10882     ld_switch_run="${dash_r}${runpath}"
10883     
10884 if test "$GCC" = "yes"; then
10885   set x $ld_switch_run; shift; ld_switch_run=""
10886   while test -n "$1"; do
10887     case $1 in
10888       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10889       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10890       -Xlinker* ) ;;
10891       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10892     esac
10893     shift
10894   done
10895 fi
10896     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10897   fi
10898 fi
10899
10900 fi
10901
10902
10903 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
10904 do
10905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10906 echo "configure:10907: checking for $ac_func" >&5
10907
10908 cat > conftest.$ac_ext <<EOF
10909 #line 10910 "configure"
10910 #include "confdefs.h"
10911 /* System header to define __stub macros and hopefully few prototypes,
10912     which can conflict with char $ac_func(); below.  */
10913 #include <assert.h>
10914 /* Override any gcc2 internal prototype to avoid an error.  */
10915 /* We use char because int might match the return type of a gcc2
10916     builtin and then its argument prototype would still apply.  */
10917 char $ac_func();
10918
10919 int main() {
10920
10921 /* The GNU C library defines this for functions which it implements
10922     to always fail with ENOSYS.  Some functions are actually named
10923     something starting with __ and the normal name is an alias.  */
10924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10925 choke me
10926 #else
10927 $ac_func();
10928 #endif
10929
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10933   rm -rf conftest*
10934   eval "ac_cv_func_$ac_func=yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_func_$ac_func=no"
10940 fi
10941 rm -f conftest*
10942
10943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10946   { test "$extra_verbose" = "yes" && cat << EOF
10947     Defining $ac_tr_func
10948 EOF
10949 cat >> confdefs.h <<EOF
10950 #define $ac_tr_func 1
10951 EOF
10952 }
10953  
10954 else
10955   echo "$ac_t""no" 1>&6
10956 fi
10957 done
10958
10959
10960 if test "$ac_cv_func_getaddrinfo" != "no" ; then
10961   case "$opsys" in
10962     hpux11* )
10963       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
10964       ac_cv_func_getaddrinfo=no
10965       ;;
10966   esac
10967 fi
10968
10969
10970 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10971 do
10972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10973 echo "configure:10974: checking for $ac_func" >&5
10974
10975 cat > conftest.$ac_ext <<EOF
10976 #line 10977 "configure"
10977 #include "confdefs.h"
10978 /* System header to define __stub macros and hopefully few prototypes,
10979     which can conflict with char $ac_func(); below.  */
10980 #include <assert.h>
10981 /* Override any gcc2 internal prototype to avoid an error.  */
10982 /* We use char because int might match the return type of a gcc2
10983     builtin and then its argument prototype would still apply.  */
10984 char $ac_func();
10985
10986 int main() {
10987
10988 /* The GNU C library defines this for functions which it implements
10989     to always fail with ENOSYS.  Some functions are actually named
10990     something starting with __ and the normal name is an alias.  */
10991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10992 choke me
10993 #else
10994 $ac_func();
10995 #endif
10996
10997 ; return 0; }
10998 EOF
10999 if { (eval echo configure:11000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11000   rm -rf conftest*
11001   eval "ac_cv_func_$ac_func=yes"
11002 else
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_func_$ac_func=no"
11007 fi
11008 rm -f conftest*
11009
11010 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11013   { test "$extra_verbose" = "yes" && cat << EOF
11014     Defining $ac_tr_func
11015 EOF
11016 cat >> confdefs.h <<EOF
11017 #define $ac_tr_func 1
11018 EOF
11019 }
11020  
11021 else
11022   echo "$ac_t""no" 1>&6
11023 fi
11024 done
11025
11026
11027 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11028 echo "configure:11029: checking for openpty" >&5
11029
11030 cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033 /* System header to define __stub macros and hopefully few prototypes,
11034     which can conflict with char openpty(); below.  */
11035 #include <assert.h>
11036 /* Override any gcc2 internal prototype to avoid an error.  */
11037 /* We use char because int might match the return type of a gcc2
11038     builtin and then its argument prototype would still apply.  */
11039 char openpty();
11040
11041 int main() {
11042
11043 /* The GNU C library defines this for functions which it implements
11044     to always fail with ENOSYS.  Some functions are actually named
11045     something starting with __ and the normal name is an alias.  */
11046 #if defined (__stub_openpty) || defined (__stub___openpty)
11047 choke me
11048 #else
11049 openpty();
11050 #endif
11051
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11055   rm -rf conftest*
11056   eval "ac_cv_func_openpty=yes"
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   eval "ac_cv_func_openpty=no"
11062 fi
11063 rm -f conftest*
11064
11065 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11066   echo "$ac_t""yes" 1>&6
11067   have_openpty=yes
11068 else
11069   echo "$ac_t""no" 1>&6
11070
11071   
11072 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11073 echo "configure:11074: checking for openpty in -lutil" >&5
11074 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11075
11076 xe_check_libs=" -lutil "
11077 cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 /* Override any gcc2 internal prototype to avoid an error.  */
11081 /* We use char because int might match the return type of a gcc2
11082     builtin and then its argument prototype would still apply.  */
11083 char openpty();
11084
11085 int main() {
11086 openpty()
11087 ; return 0; }
11088 EOF
11089 if { (eval echo configure:11090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=yes"
11092 else
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=no"
11097 fi
11098 rm -f conftest*
11099 xe_check_libs=""
11100
11101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11102   echo "$ac_t""yes" 1>&6
11103   have_openpty=yes need_libutil=yes
11104 else
11105   echo "$ac_t""no" 1>&6
11106 fi
11107
11108
11109 fi
11110
11111 if test "$have_openpty" = "yes"; then
11112   { test "$extra_verbose" = "yes" && cat << \EOF
11113     Defining HAVE_OPENPTY
11114 EOF
11115 cat >> confdefs.h <<\EOF
11116 #define HAVE_OPENPTY 1
11117 EOF
11118 }
11119
11120   for ac_hdr in pty.h libutil.h util.h
11121 do
11122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11124 echo "configure:11125: checking for $ac_hdr" >&5
11125
11126 cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <$ac_hdr>
11130 EOF
11131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11132 { (eval echo configure:11133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11134 if test -z "$ac_err"; then
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=yes"
11137 else
11138   echo "$ac_err" >&5
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   eval "ac_cv_header_$ac_safe=no"
11143 fi
11144 rm -f conftest*
11145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11148   { test "$extra_verbose" = "yes" && cat << EOF
11149     Defining $ac_tr_hdr
11150 EOF
11151 cat >> confdefs.h <<EOF
11152 #define $ac_tr_hdr 1
11153 EOF
11154 }
11155  break
11156 else
11157   echo "$ac_t""no" 1>&6
11158 fi
11159 done
11160
11161   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11162 fi
11163
11164 for ac_hdr in stropts.h
11165 do
11166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11168 echo "configure:11169: checking for $ac_hdr" >&5
11169
11170 cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <$ac_hdr>
11174 EOF
11175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11176 { (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11178 if test -z "$ac_err"; then
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=yes"
11181 else
11182   echo "$ac_err" >&5
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_header_$ac_safe=no"
11187 fi
11188 rm -f conftest*
11189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11190   echo "$ac_t""yes" 1>&6
11191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11192   { test "$extra_verbose" = "yes" && cat << EOF
11193     Defining $ac_tr_hdr
11194 EOF
11195 cat >> confdefs.h <<EOF
11196 #define $ac_tr_hdr 1
11197 EOF
11198 }
11199  
11200 else
11201   echo "$ac_t""no" 1>&6
11202 fi
11203 done
11204
11205 if test "$ac_cv_header_stropts_h" = "yes"; then
11206   for ac_func in isastream
11207 do
11208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11209 echo "configure:11210: checking for $ac_func" >&5
11210
11211 cat > conftest.$ac_ext <<EOF
11212 #line 11213 "configure"
11213 #include "confdefs.h"
11214 /* System header to define __stub macros and hopefully few prototypes,
11215     which can conflict with char $ac_func(); below.  */
11216 #include <assert.h>
11217 /* Override any gcc2 internal prototype to avoid an error.  */
11218 /* We use char because int might match the return type of a gcc2
11219     builtin and then its argument prototype would still apply.  */
11220 char $ac_func();
11221
11222 int main() {
11223
11224 /* The GNU C library defines this for functions which it implements
11225     to always fail with ENOSYS.  Some functions are actually named
11226     something starting with __ and the normal name is an alias.  */
11227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11228 choke me
11229 #else
11230 $ac_func();
11231 #endif
11232
11233 ; return 0; }
11234 EOF
11235 if { (eval echo configure:11236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11236   rm -rf conftest*
11237   eval "ac_cv_func_$ac_func=yes"
11238 else
11239   echo "configure: failed program was:" >&5
11240   cat conftest.$ac_ext >&5
11241   rm -rf conftest*
11242   eval "ac_cv_func_$ac_func=no"
11243 fi
11244 rm -f conftest*
11245
11246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11247   echo "$ac_t""yes" 1>&6
11248     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11249   { test "$extra_verbose" = "yes" && cat << EOF
11250     Defining $ac_tr_func
11251 EOF
11252 cat >> confdefs.h <<EOF
11253 #define $ac_tr_func 1
11254 EOF
11255 }
11256  
11257 else
11258   echo "$ac_t""no" 1>&6
11259 fi
11260 done
11261
11262   for ac_hdr in strtio.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  fi
11303
11304 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11305    echo "    xemacs will be linked with \"realpath.o\""
11306  fi
11307
11308 for ac_func in getloadavg
11309 do
11310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11311 echo "configure:11312: checking for $ac_func" >&5
11312
11313 cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 /* System header to define __stub macros and hopefully few prototypes,
11317     which can conflict with char $ac_func(); below.  */
11318 #include <assert.h>
11319 /* Override any gcc2 internal prototype to avoid an error.  */
11320 /* We use char because int might match the return type of a gcc2
11321     builtin and then its argument prototype would still apply.  */
11322 char $ac_func();
11323
11324 int main() {
11325
11326 /* The GNU C library defines this for functions which it implements
11327     to always fail with ENOSYS.  Some functions are actually named
11328     something starting with __ and the normal name is an alias.  */
11329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11330 choke me
11331 #else
11332 $ac_func();
11333 #endif
11334
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11338   rm -rf conftest*
11339   eval "ac_cv_func_$ac_func=yes"
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   eval "ac_cv_func_$ac_func=no"
11345 fi
11346 rm -f conftest*
11347
11348 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11349   echo "$ac_t""yes" 1>&6
11350     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11351   { test "$extra_verbose" = "yes" && cat << EOF
11352     Defining $ac_tr_func
11353 EOF
11354 cat >> confdefs.h <<EOF
11355 #define $ac_tr_func 1
11356 EOF
11357 }
11358  
11359 else
11360   echo "$ac_t""no" 1>&6
11361 fi
11362 done
11363
11364
11365 if test "$ac_cv_func_getloadavg" = "yes"; then
11366         for ac_hdr in sys/loadavg.h
11367 do
11368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11370 echo "configure:11371: checking for $ac_hdr" >&5
11371
11372 cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375 #include <$ac_hdr>
11376 EOF
11377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11378 { (eval echo configure:11379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11380 if test -z "$ac_err"; then
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=yes"
11383 else
11384   echo "$ac_err" >&5
11385   echo "configure: failed program was:" >&5
11386   cat conftest.$ac_ext >&5
11387   rm -rf conftest*
11388   eval "ac_cv_header_$ac_safe=no"
11389 fi
11390 rm -f conftest*
11391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11394   { test "$extra_verbose" = "yes" && cat << EOF
11395     Defining $ac_tr_hdr
11396 EOF
11397 cat >> confdefs.h <<EOF
11398 #define $ac_tr_hdr 1
11399 EOF
11400 }
11401  
11402 else
11403   echo "$ac_t""no" 1>&6
11404 fi
11405 done
11406
11407 else
11408     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11409    echo "    xemacs will be linked with \"getloadavg.o\""
11410  fi
11411
11412     
11413 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11414 echo "configure:11415: checking for kstat_open in -lkstat" >&5
11415 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11416
11417 xe_check_libs=" -lkstat "
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* Override any gcc2 internal prototype to avoid an error.  */
11422 /* We use char because int might match the return type of a gcc2
11423     builtin and then its argument prototype would still apply.  */
11424 char kstat_open();
11425
11426 int main() {
11427 kstat_open()
11428 ; return 0; }
11429 EOF
11430 if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=yes"
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=no"
11438 fi
11439 rm -f conftest*
11440 xe_check_libs=""
11441
11442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11443   echo "$ac_t""yes" 1>&6
11444     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11446   { test "$extra_verbose" = "yes" && cat << EOF
11447     Defining $ac_tr_lib
11448 EOF
11449 cat >> confdefs.h <<EOF
11450 #define $ac_tr_lib 1
11451 EOF
11452 }
11453
11454   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11455
11456 else
11457   echo "$ac_t""no" 1>&6
11458 fi
11459
11460
11461   for ac_hdr in kstat.h
11462 do
11463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11465 echo "configure:11466: checking for $ac_hdr" >&5
11466
11467 cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 #include <$ac_hdr>
11471 EOF
11472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11473 { (eval echo configure:11474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11475 if test -z "$ac_err"; then
11476   rm -rf conftest*
11477   eval "ac_cv_header_$ac_safe=yes"
11478 else
11479   echo "$ac_err" >&5
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_header_$ac_safe=no"
11484 fi
11485 rm -f conftest*
11486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11487   echo "$ac_t""yes" 1>&6
11488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11489   { test "$extra_verbose" = "yes" && cat << EOF
11490     Defining $ac_tr_hdr
11491 EOF
11492 cat >> confdefs.h <<EOF
11493 #define $ac_tr_hdr 1
11494 EOF
11495 }
11496  
11497 else
11498   echo "$ac_t""no" 1>&6
11499 fi
11500 done
11501
11502
11503     
11504 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11505 echo "configure:11506: checking for kvm_read in -lkvm" >&5
11506 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11507
11508 xe_check_libs=" -lkvm "
11509 cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 /* Override any gcc2 internal prototype to avoid an error.  */
11513 /* We use char because int might match the return type of a gcc2
11514     builtin and then its argument prototype would still apply.  */
11515 char kvm_read();
11516
11517 int main() {
11518 kvm_read()
11519 ; return 0; }
11520 EOF
11521 if { (eval echo configure:11522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11522   rm -rf conftest*
11523   eval "ac_cv_lib_$ac_lib_var=yes"
11524 else
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -rf conftest*
11528   eval "ac_cv_lib_$ac_lib_var=no"
11529 fi
11530 rm -f conftest*
11531 xe_check_libs=""
11532
11533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11534   echo "$ac_t""yes" 1>&6
11535     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11537   { test "$extra_verbose" = "yes" && cat << EOF
11538     Defining $ac_tr_lib
11539 EOF
11540 cat >> confdefs.h <<EOF
11541 #define $ac_tr_lib 1
11542 EOF
11543 }
11544
11545   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11546
11547 else
11548   echo "$ac_t""no" 1>&6
11549 fi
11550
11551
11552 fi
11553
11554 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11555 echo "configure:11556: checking whether netdb declares h_errno" >&5
11556 cat > conftest.$ac_ext <<EOF
11557 #line 11558 "configure"
11558 #include "confdefs.h"
11559 #include <netdb.h>
11560 int main() {
11561 return h_errno;
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   echo "$ac_t""yes" 1>&6
11567    { test "$extra_verbose" = "yes" && cat << \EOF
11568     Defining HAVE_H_ERRNO
11569 EOF
11570 cat >> confdefs.h <<\EOF
11571 #define HAVE_H_ERRNO 1
11572 EOF
11573 }
11574
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   echo "$ac_t""no" 1>&6
11580 fi
11581 rm -f conftest*
11582
11583 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11584 echo "configure:11585: checking for sigsetjmp" >&5
11585 cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include <setjmp.h>
11589 int main() {
11590 sigjmp_buf bar; sigsetjmp (bar, 0);
11591 ; return 0; }
11592 EOF
11593 if { (eval echo configure:11594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11594   rm -rf conftest*
11595   echo "$ac_t""yes" 1>&6
11596    { test "$extra_verbose" = "yes" && cat << \EOF
11597     Defining HAVE_SIGSETJMP
11598 EOF
11599 cat >> confdefs.h <<\EOF
11600 #define HAVE_SIGSETJMP 1
11601 EOF
11602 }
11603
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607   rm -rf conftest*
11608   echo "$ac_t""no" 1>&6
11609 fi
11610 rm -f conftest*
11611
11612 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11613 echo "configure:11614: checking whether localtime caches TZ" >&5
11614
11615 if test "$ac_cv_func_tzset" = "yes"; then
11616 cat > conftest.$ac_ext <<EOF
11617 #line 11618 "configure"
11618 #include "confdefs.h"
11619 #include <time.h>
11620 #if STDC_HEADERS
11621 # include <stdlib.h>
11622 #endif
11623 extern char **environ;
11624 unset_TZ ()
11625 {
11626   char **from, **to;
11627   for (to = from = environ; (*to = *from); from++)
11628     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11629       to++;
11630 }
11631 char TZ_GMT0[] = "TZ=GMT0";
11632 char TZ_PST8[] = "TZ=PST8";
11633 main()
11634 {
11635   time_t now = time ((time_t *) 0);
11636   int hour_GMT0, hour_unset;
11637   if (putenv (TZ_GMT0) != 0)
11638     exit (1);
11639   hour_GMT0 = localtime (&now)->tm_hour;
11640   unset_TZ ();
11641   hour_unset = localtime (&now)->tm_hour;
11642   if (putenv (TZ_PST8) != 0)
11643     exit (1);
11644   if (localtime (&now)->tm_hour == hour_GMT0)
11645     exit (1);
11646   unset_TZ ();
11647   if (localtime (&now)->tm_hour != hour_unset)
11648     exit (1);
11649   exit (0);
11650 }
11651 EOF
11652 if { (eval echo configure:11653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11653 then
11654   emacs_cv_localtime_cache=no
11655 else
11656   conftest_rc="$?"
11657   echo "configure: failed program was:" >&5
11658   cat conftest.$ac_ext >&5
11659   rm -fr conftest*
11660   emacs_cv_localtime_cache=yes
11661 fi
11662 rm -fr conftest*
11663 else
11664         # If we lack tzset, report that localtime does not cache TZ,
11665         # since we can't invalidate the cache if we don't have tzset.
11666         emacs_cv_localtime_cache=no
11667 fi
11668 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11669 if test $emacs_cv_localtime_cache = yes; then
11670   { test "$extra_verbose" = "yes" && cat << \EOF
11671     Defining LOCALTIME_CACHE
11672 EOF
11673 cat >> confdefs.h <<\EOF
11674 #define LOCALTIME_CACHE 1
11675 EOF
11676 }
11677
11678 fi
11679
11680 if test "$HAVE_TIMEVAL" = "yes"; then
11681 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11682 echo "configure:11683: checking whether gettimeofday accepts one or two arguments" >&5
11683 cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686
11687 #ifdef TIME_WITH_SYS_TIME
11688 #include <sys/time.h>
11689 #include <time.h>
11690 #else
11691 #ifdef HAVE_SYS_TIME_H
11692 #include <sys/time.h>
11693 #else
11694 #include <time.h>
11695 #endif
11696 #endif
11697   
11698 int main() {
11699
11700   struct timeval time;
11701   gettimeofday (&time, 0);
11702
11703 ; return 0; }
11704 EOF
11705 if { (eval echo configure:11706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11706   rm -rf conftest*
11707   echo "$ac_t""two" 1>&6
11708 else
11709   echo "configure: failed program was:" >&5
11710   cat conftest.$ac_ext >&5
11711   rm -rf conftest*
11712   echo "$ac_t""one" 1>&6
11713    { test "$extra_verbose" = "yes" && cat << \EOF
11714     Defining GETTIMEOFDAY_ONE_ARGUMENT
11715 EOF
11716 cat >> confdefs.h <<\EOF
11717 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11718 EOF
11719 }
11720
11721 fi
11722 rm -f conftest*
11723 fi
11724
11725
11726 echo $ac_n "checking for inline""... $ac_c" 1>&6
11727 echo "configure:11728: checking for inline" >&5
11728
11729 ac_cv_c_inline=no
11730 for ac_kw in inline __inline__ __inline; do
11731   cat > conftest.$ac_ext <<EOF
11732 #line 11733 "configure"
11733 #include "confdefs.h"
11734
11735 int main() {
11736 } $ac_kw foo() {
11737 ; return 0; }
11738 EOF
11739 if { (eval echo configure:11740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11740   rm -rf conftest*
11741   ac_cv_c_inline=$ac_kw; break
11742 else
11743   echo "configure: failed program was:" >&5
11744   cat conftest.$ac_ext >&5
11745 fi
11746 rm -f conftest*
11747 done
11748
11749
11750 echo "$ac_t""$ac_cv_c_inline" 1>&6
11751 case "$ac_cv_c_inline" in
11752   inline | yes) ;;
11753   no) { test "$extra_verbose" = "yes" && cat << \EOF
11754     Defining inline = 
11755 EOF
11756 cat >> confdefs.h <<\EOF
11757 #define inline 
11758 EOF
11759 }
11760  ;;
11761   *)  { test "$extra_verbose" = "yes" && cat << EOF
11762     Defining inline = $ac_cv_c_inline
11763 EOF
11764 cat >> confdefs.h <<EOF
11765 #define inline $ac_cv_c_inline
11766 EOF
11767 }
11768  ;;
11769 esac
11770
11771 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11772    echo "    xemacs will be linked with \"inline.o\""
11773  fi
11774
11775
11776 if test "$__DECC" != "yes"; then
11777   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11778 # for constant arguments.  Useless!
11779 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11780 echo "configure:11781: checking for working alloca.h" >&5
11781
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <alloca.h>
11786 int main() {
11787 char *p = alloca(2 * sizeof(int));
11788 ; return 0; }
11789 EOF
11790 if { (eval echo configure:11791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11791   rm -rf conftest*
11792   ac_cv_header_alloca_h=yes
11793 else
11794   echo "configure: failed program was:" >&5
11795   cat conftest.$ac_ext >&5
11796   rm -rf conftest*
11797   ac_cv_header_alloca_h=no
11798 fi
11799 rm -f conftest*
11800
11801 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11802 if test $ac_cv_header_alloca_h = yes; then
11803   { test "$extra_verbose" = "yes" && cat << \EOF
11804     Defining HAVE_ALLOCA_H
11805 EOF
11806 cat >> confdefs.h <<\EOF
11807 #define HAVE_ALLOCA_H 1
11808 EOF
11809 }
11810
11811 fi
11812
11813 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11814 echo "configure:11815: checking for alloca" >&5
11815
11816 cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819
11820 #ifdef __GNUC__
11821 # define alloca __builtin_alloca
11822 #else
11823 # ifdef _MSC_VER
11824 #  include <malloc.h>
11825 #  define alloca _alloca
11826 # else
11827 #  if HAVE_ALLOCA_H
11828 #   include <alloca.h>
11829 #  else
11830 #   ifdef _AIX
11831  #pragma alloca
11832 #   else
11833 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11834 char *alloca ();
11835 #    endif
11836 #   endif
11837 #  endif
11838 # endif
11839 #endif
11840
11841 int main() {
11842 char *p = (char *) alloca(1);
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11846   rm -rf conftest*
11847   ac_cv_func_alloca_works=yes
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   ac_cv_func_alloca_works=no
11853 fi
11854 rm -f conftest*
11855
11856 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11857 if test $ac_cv_func_alloca_works = yes; then
11858   { test "$extra_verbose" = "yes" && cat << \EOF
11859     Defining HAVE_ALLOCA
11860 EOF
11861 cat >> confdefs.h <<\EOF
11862 #define HAVE_ALLOCA 1
11863 EOF
11864 }
11865
11866 fi
11867
11868 if test $ac_cv_func_alloca_works = no; then
11869   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11870   # that cause trouble.  Some versions do not even contain alloca or
11871   # contain a buggy version.  If you still want to use their alloca,
11872   # use ar to extract alloca.o from them instead of compiling alloca.c.
11873   ALLOCA=alloca.${ac_objext}
11874   { test "$extra_verbose" = "yes" && cat << \EOF
11875     Defining C_ALLOCA
11876 EOF
11877 cat >> confdefs.h <<\EOF
11878 #define C_ALLOCA 1
11879 EOF
11880 }
11881
11882
11883 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11884 echo "configure:11885: checking whether alloca needs Cray hooks" >&5
11885
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 #if defined(CRAY) && ! defined(CRAY2)
11890 webecray
11891 #else
11892 wenotbecray
11893 #endif
11894
11895 EOF
11896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11897   egrep "webecray" >/dev/null 2>&1; then
11898   rm -rf conftest*
11899   ac_cv_os_cray=yes
11900 else
11901   rm -rf conftest*
11902   ac_cv_os_cray=no
11903 fi
11904 rm -f conftest*
11905
11906
11907 echo "$ac_t""$ac_cv_os_cray" 1>&6
11908 if test $ac_cv_os_cray = yes; then
11909 for ac_func in _getb67 GETB67 getb67; do
11910   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11911 echo "configure:11912: checking for $ac_func" >&5
11912
11913 cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916 /* System header to define __stub macros and hopefully few prototypes,
11917     which can conflict with char $ac_func(); below.  */
11918 #include <assert.h>
11919 /* Override any gcc2 internal prototype to avoid an error.  */
11920 /* We use char because int might match the return type of a gcc2
11921     builtin and then its argument prototype would still apply.  */
11922 char $ac_func();
11923
11924 int main() {
11925
11926 /* The GNU C library defines this for functions which it implements
11927     to always fail with ENOSYS.  Some functions are actually named
11928     something starting with __ and the normal name is an alias.  */
11929 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11930 choke me
11931 #else
11932 $ac_func();
11933 #endif
11934
11935 ; return 0; }
11936 EOF
11937 if { (eval echo configure:11938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11938   rm -rf conftest*
11939   eval "ac_cv_func_$ac_func=yes"
11940 else
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   eval "ac_cv_func_$ac_func=no"
11945 fi
11946 rm -f conftest*
11947
11948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11949   echo "$ac_t""yes" 1>&6
11950   { test "$extra_verbose" = "yes" && cat << EOF
11951     Defining CRAY_STACKSEG_END = $ac_func
11952 EOF
11953 cat >> confdefs.h <<EOF
11954 #define CRAY_STACKSEG_END $ac_func
11955 EOF
11956 }
11957
11958   break
11959 else
11960   echo "$ac_t""no" 1>&6
11961 fi
11962
11963 done
11964 fi
11965
11966 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11967 echo "configure:11968: checking stack direction for C alloca" >&5
11968
11969 cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 find_stack_direction ()
11973 {
11974   static char *addr = 0;
11975   auto char dummy;
11976   if (addr == 0)
11977     {
11978       addr = &dummy;
11979       return find_stack_direction ();
11980     }
11981   else
11982     return (&dummy > addr) ? 1 : -1;
11983 }
11984 main ()
11985 {
11986   exit (find_stack_direction() < 0);
11987 }
11988 EOF
11989 if { (eval echo configure:11990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11990 then
11991   ac_cv_c_stack_direction=1
11992 else
11993   conftest_rc="$?"
11994   echo "configure: failed program was:" >&5
11995   cat conftest.$ac_ext >&5
11996   rm -fr conftest*
11997   ac_cv_c_stack_direction=-1
11998 fi
11999 rm -fr conftest*
12000
12001 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12002 { test "$extra_verbose" = "yes" && cat << EOF
12003     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12004 EOF
12005 cat >> confdefs.h <<EOF
12006 #define STACK_DIRECTION $ac_cv_c_stack_direction
12007 EOF
12008 }
12009
12010 fi
12011
12012   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12013    echo "    xemacs will be linked with \"$ALLOCA\""
12014  fi
12015 fi
12016
12017 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12018 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12019 echo "configure:12020: checking for vfork.h" >&5
12020
12021 cat > conftest.$ac_ext <<EOF
12022 #line 12023 "configure"
12023 #include "confdefs.h"
12024 #include <vfork.h>
12025 EOF
12026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12027 { (eval echo configure:12028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12029 if test -z "$ac_err"; then
12030   rm -rf conftest*
12031   eval "ac_cv_header_$ac_safe=yes"
12032 else
12033   echo "$ac_err" >&5
12034   echo "configure: failed program was:" >&5
12035   cat conftest.$ac_ext >&5
12036   rm -rf conftest*
12037   eval "ac_cv_header_$ac_safe=no"
12038 fi
12039 rm -f conftest*
12040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12041   echo "$ac_t""yes" 1>&6
12042   { test "$extra_verbose" = "yes" && cat << \EOF
12043     Defining HAVE_VFORK_H
12044 EOF
12045 cat >> confdefs.h <<\EOF
12046 #define HAVE_VFORK_H 1
12047 EOF
12048 }
12049
12050 else
12051   echo "$ac_t""no" 1>&6
12052 fi
12053
12054 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12055 echo "configure:12056: checking for working vfork" >&5
12056
12057 cat > conftest.$ac_ext <<EOF
12058 #line 12059 "configure"
12059 #include "confdefs.h"
12060 /* Thanks to Paul Eggert for this test.  */
12061 #include <stdio.h>
12062 #include <sys/types.h>
12063 #include <sys/stat.h>
12064 #ifdef HAVE_UNISTD_H
12065 #include <unistd.h>
12066 #endif
12067 #ifdef HAVE_VFORK_H
12068 #include <vfork.h>
12069 #endif
12070 /* On some sparc systems, changes by the child to local and incoming
12071    argument registers are propagated back to the parent.
12072    The compiler is told about this with #include <vfork.h>,
12073    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12074    Test for this by using a static variable whose address
12075    is put into a register that is clobbered by the vfork.  */
12076 static
12077 #ifdef __cplusplus
12078 sparc_address_test (int arg)
12079 #else
12080 sparc_address_test (arg) int arg;
12081 #endif
12082 {
12083   static pid_t child;
12084   if (!child) {
12085     child = vfork ();
12086     if (child < 0) {
12087       perror ("vfork");
12088       _exit(2);
12089     }
12090     if (!child) {
12091       arg = getpid();
12092       write(-1, "", 0);
12093       _exit (arg);
12094     }
12095   }
12096 }
12097 main() {
12098   pid_t parent = getpid ();
12099   pid_t child;
12100
12101   sparc_address_test ();
12102
12103   child = vfork ();
12104
12105   if (child == 0) {
12106     /* Here is another test for sparc vfork register problems.
12107        This test uses lots of local variables, at least
12108        as many local variables as main has allocated so far
12109        including compiler temporaries.  4 locals are enough for
12110        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12111        A buggy compiler should reuse the register of parent
12112        for one of the local variables, since it will think that
12113        parent can't possibly be used any more in this routine.
12114        Assigning to the local variable will thus munge parent
12115        in the parent process.  */
12116     pid_t
12117       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12118       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12119     /* Convince the compiler that p..p7 are live; otherwise, it might
12120        use the same hardware register for all 8 local variables.  */
12121     if (p != p1 || p != p2 || p != p3 || p != p4
12122         || p != p5 || p != p6 || p != p7)
12123       _exit(1);
12124
12125     /* On some systems (e.g. IRIX 3.3),
12126        vfork doesn't separate parent from child file descriptors.
12127        If the child closes a descriptor before it execs or exits,
12128        this munges the parent's descriptor as well.
12129        Test for this by closing stdout in the child.  */
12130     _exit(close(fileno(stdout)) != 0);
12131   } else {
12132     int status;
12133     struct stat st;
12134
12135     while (wait(&status) != child)
12136       ;
12137     exit(
12138          /* Was there some problem with vforking?  */
12139          child < 0
12140
12141          /* Did the child fail?  (This shouldn't happen.)  */
12142          || status
12143
12144          /* Did the vfork/compiler bug occur?  */
12145          || parent != getpid()
12146
12147          /* Did the file descriptor bug occur?  */
12148          || fstat(fileno(stdout), &st) != 0
12149          );
12150   }
12151 }
12152 EOF
12153 if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12154 then
12155   ac_cv_func_vfork_works=yes
12156 else
12157   conftest_rc="$?"
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -fr conftest*
12161   ac_cv_func_vfork_works=no
12162 fi
12163 rm -fr conftest*
12164
12165 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12166 if test $ac_cv_func_vfork_works = no; then
12167   { test "$extra_verbose" = "yes" && cat << \EOF
12168     Defining vfork = fork
12169 EOF
12170 cat >> confdefs.h <<\EOF
12171 #define vfork fork
12172 EOF
12173 }
12174
12175 fi
12176
12177
12178 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12179 echo "configure:12180: checking for working strcoll" >&5
12180
12181 cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184 #include <string.h>
12185 main ()
12186 {
12187   exit (strcoll ("abc", "def") >= 0 ||
12188         strcoll ("ABC", "DEF") >= 0 ||
12189         strcoll ("123", "456") >= 0);
12190 }
12191 EOF
12192 if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12193 then
12194   ac_cv_func_strcoll_works=yes
12195 else
12196   conftest_rc="$?"
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -fr conftest*
12200   ac_cv_func_strcoll_works=no
12201 fi
12202 rm -fr conftest*
12203
12204 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12205 if test $ac_cv_func_strcoll_works = yes; then
12206   { test "$extra_verbose" = "yes" && cat << \EOF
12207     Defining HAVE_STRCOLL
12208 EOF
12209 cat >> confdefs.h <<\EOF
12210 #define HAVE_STRCOLL 1
12211 EOF
12212 }
12213
12214 fi
12215
12216
12217 for ac_func in getpgrp
12218 do
12219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12220 echo "configure:12221: checking for $ac_func" >&5
12221
12222 cat > conftest.$ac_ext <<EOF
12223 #line 12224 "configure"
12224 #include "confdefs.h"
12225 /* System header to define __stub macros and hopefully few prototypes,
12226     which can conflict with char $ac_func(); below.  */
12227 #include <assert.h>
12228 /* Override any gcc2 internal prototype to avoid an error.  */
12229 /* We use char because int might match the return type of a gcc2
12230     builtin and then its argument prototype would still apply.  */
12231 char $ac_func();
12232
12233 int main() {
12234
12235 /* The GNU C library defines this for functions which it implements
12236     to always fail with ENOSYS.  Some functions are actually named
12237     something starting with __ and the normal name is an alias.  */
12238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12239 choke me
12240 #else
12241 $ac_func();
12242 #endif
12243
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   eval "ac_cv_func_$ac_func=yes"
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   eval "ac_cv_func_$ac_func=no"
12254 fi
12255 rm -f conftest*
12256
12257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12258   echo "$ac_t""yes" 1>&6
12259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12260   { test "$extra_verbose" = "yes" && cat << EOF
12261     Defining $ac_tr_func
12262 EOF
12263 cat >> confdefs.h <<EOF
12264 #define $ac_tr_func 1
12265 EOF
12266 }
12267  
12268 else
12269   echo "$ac_t""no" 1>&6
12270 fi
12271 done
12272
12273 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12274 echo "configure:12275: checking whether getpgrp takes no argument" >&5
12275
12276 cat > conftest.$ac_ext <<EOF
12277 #line 12278 "configure"
12278 #include "confdefs.h"
12279
12280 /*
12281  * If this system has a BSD-style getpgrp(),
12282  * which takes a pid argument, exit unsuccessfully.
12283  *
12284  * Snarfed from Chet Ramey's bash pgrp.c test program
12285  */
12286 #include <stdio.h>
12287 #include <sys/types.h>
12288
12289 int     pid;
12290 int     pg1, pg2, pg3, pg4;
12291 int     ng, np, s, child;
12292
12293 main()
12294 {
12295         pid = getpid();
12296         pg1 = getpgrp(0);
12297         pg2 = getpgrp();
12298         pg3 = getpgrp(pid);
12299         pg4 = getpgrp(1);
12300
12301         /*
12302          * If all of these values are the same, it's pretty sure that
12303          * we're on a system that ignores getpgrp's first argument.
12304          */
12305         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12306                 exit(0);
12307
12308         child = fork();
12309         if (child < 0)
12310                 exit(1);
12311         else if (child == 0) {
12312                 np = getpid();
12313                 /*
12314                  * If this is Sys V, this will not work; pgrp will be
12315                  * set to np because setpgrp just changes a pgrp to be
12316                  * the same as the pid.
12317                  */
12318                 setpgrp(np, pg1);
12319                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12320                 if (ng == pg1) {
12321                         exit(1);
12322                 } else {
12323                         exit(0);
12324                 }
12325         } else {
12326                 wait(&s);
12327                 exit(s>>8);
12328         }
12329 }
12330
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12333 then
12334   ac_cv_func_getpgrp_void=yes
12335 else
12336   conftest_rc="$?"
12337   echo "configure: failed program was:" >&5
12338   cat conftest.$ac_ext >&5
12339   rm -fr conftest*
12340   ac_cv_func_getpgrp_void=no
12341 fi
12342 rm -fr conftest*
12343
12344
12345 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12346 if test $ac_cv_func_getpgrp_void = yes; then
12347   { test "$extra_verbose" = "yes" && cat << \EOF
12348     Defining GETPGRP_VOID
12349 EOF
12350 cat >> confdefs.h <<\EOF
12351 #define GETPGRP_VOID 1
12352 EOF
12353 }
12354
12355 fi
12356
12357
12358 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12359 echo "configure:12360: checking for working mmap" >&5
12360 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12361 cat > conftest.$ac_ext <<EOF
12362 #line 12363 "configure"
12363 #include "confdefs.h"
12364 #include <stdio.h>
12365 #include <unistd.h>
12366 #include <fcntl.h>
12367 #include <sys/mman.h>
12368
12369 #ifndef MAP_VARIABLE
12370 #define MAP_VARIABLE 0
12371 #endif
12372
12373 #ifndef MAP_FAILED
12374 #define MAP_FAILED -1
12375 #endif
12376
12377 int main (int argc, char *argv[])
12378 {
12379   int fd = -1;
12380   caddr_t p;
12381 #ifndef MAP_ANONYMOUS
12382   fd = open ("/dev/zero", O_RDWR);
12383   if (fd < 0)
12384     return 1;
12385 #define MAP_ANONYMOUS 0
12386 #endif
12387   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12388            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12389            fd, 0) != (void *) MAP_FAILED)
12390     return 0;
12391   perror ("conftest: mmap failed");
12392   return 1;
12393 }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12396 then
12397   have_mmap=yes
12398 else
12399   conftest_rc="$?"
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -fr conftest*
12403   have_mmap=no
12404 fi
12405 rm -fr conftest* ;;
12406 esac
12407 echo "$ac_t""$have_mmap" 1>&6
12408 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12409     Defining HAVE_MMAP
12410 EOF
12411 cat >> confdefs.h <<\EOF
12412 #define HAVE_MMAP 1
12413 EOF
12414 }
12415
12416
12417 case "$opsys" in cygwin*) 
12418         test "$rel_alloc" = "default" && rel_alloc=no ;;
12419 esac
12420 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12421 if test "$rel_alloc $have_mmap" = "default yes"; then
12422   if test "$doug_lea_malloc" = "yes"; then
12423         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12424 echo "configure:12425: checking for M_MMAP_THRESHOLD" >&5
12425     cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 #include <malloc.h>
12429 int main() {
12430
12431 #ifndef M_MMAP_THRESHOLD
12432 #error No M_MMAP_THRESHOLD :-(
12433 !@+$%^&*_)(_ - unlikely to compile...
12434 #endif
12435
12436 ; return 0; }
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12439   rm -rf conftest*
12440   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12441 else
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -rf conftest*
12445   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12446 fi
12447 rm -f conftest*
12448   else
12449     rel_alloc=yes
12450   fi
12451 fi
12452 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12453     Defining REL_ALLOC
12454 EOF
12455 cat >> confdefs.h <<\EOF
12456 #define REL_ALLOC 1
12457 EOF
12458 }
12459
12460
12461 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12462 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12463 echo "configure:12464: checking for termios.h" >&5
12464
12465 cat > conftest.$ac_ext <<EOF
12466 #line 12467 "configure"
12467 #include "confdefs.h"
12468 #include <termios.h>
12469 EOF
12470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12471 { (eval echo configure:12472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12473 if test -z "$ac_err"; then
12474   rm -rf conftest*
12475   eval "ac_cv_header_$ac_safe=yes"
12476 else
12477   echo "$ac_err" >&5
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   eval "ac_cv_header_$ac_safe=no"
12482 fi
12483 rm -f conftest*
12484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12485   echo "$ac_t""yes" 1>&6
12486   { test "$extra_verbose" = "yes" && cat << \EOF
12487     Defining HAVE_TERMIOS
12488 EOF
12489 cat >> confdefs.h <<\EOF
12490 #define HAVE_TERMIOS 1
12491 EOF
12492 }
12493
12494   { test "$extra_verbose" = "yes" && cat << \EOF
12495     Defining SIGNALS_VIA_CHARACTERS
12496 EOF
12497 cat >> confdefs.h <<\EOF
12498 #define SIGNALS_VIA_CHARACTERS 1
12499 EOF
12500 }
12501
12502   { test "$extra_verbose" = "yes" && cat << \EOF
12503     Defining NO_TERMIO
12504 EOF
12505 cat >> confdefs.h <<\EOF
12506 #define NO_TERMIO 1
12507 EOF
12508 }
12509
12510 else
12511   echo "$ac_t""no" 1>&6
12512 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12513 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12514 echo "configure:12515: checking for termio.h" >&5
12515
12516 cat > conftest.$ac_ext <<EOF
12517 #line 12518 "configure"
12518 #include "confdefs.h"
12519 #include <termio.h>
12520 EOF
12521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12522 { (eval echo configure:12523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12524 if test -z "$ac_err"; then
12525   rm -rf conftest*
12526   eval "ac_cv_header_$ac_safe=yes"
12527 else
12528   echo "$ac_err" >&5
12529   echo "configure: failed program was:" >&5
12530   cat conftest.$ac_ext >&5
12531   rm -rf conftest*
12532   eval "ac_cv_header_$ac_safe=no"
12533 fi
12534 rm -f conftest*
12535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12536   echo "$ac_t""yes" 1>&6
12537   { test "$extra_verbose" = "yes" && cat << \EOF
12538     Defining HAVE_TERMIO
12539 EOF
12540 cat >> confdefs.h <<\EOF
12541 #define HAVE_TERMIO 1
12542 EOF
12543 }
12544
12545 else
12546   echo "$ac_t""no" 1>&6
12547 fi
12548
12549 fi
12550
12551
12552
12553 echo $ac_n "checking for socket""... $ac_c" 1>&6
12554 echo "configure:12555: checking for socket" >&5
12555
12556 cat > conftest.$ac_ext <<EOF
12557 #line 12558 "configure"
12558 #include "confdefs.h"
12559 /* System header to define __stub macros and hopefully few prototypes,
12560     which can conflict with char socket(); below.  */
12561 #include <assert.h>
12562 /* Override any gcc2 internal prototype to avoid an error.  */
12563 /* We use char because int might match the return type of a gcc2
12564     builtin and then its argument prototype would still apply.  */
12565 char socket();
12566
12567 int main() {
12568
12569 /* The GNU C library defines this for functions which it implements
12570     to always fail with ENOSYS.  Some functions are actually named
12571     something starting with __ and the normal name is an alias.  */
12572 #if defined (__stub_socket) || defined (__stub___socket)
12573 choke me
12574 #else
12575 socket();
12576 #endif
12577
12578 ; return 0; }
12579 EOF
12580 if { (eval echo configure:12581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12581   rm -rf conftest*
12582   eval "ac_cv_func_socket=yes"
12583 else
12584   echo "configure: failed program was:" >&5
12585   cat conftest.$ac_ext >&5
12586   rm -rf conftest*
12587   eval "ac_cv_func_socket=no"
12588 fi
12589 rm -f conftest*
12590
12591 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12592   echo "$ac_t""yes" 1>&6
12593   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12594 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12595 echo "configure:12596: checking for netinet/in.h" >&5
12596
12597 cat > conftest.$ac_ext <<EOF
12598 #line 12599 "configure"
12599 #include "confdefs.h"
12600 #include <netinet/in.h>
12601 EOF
12602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12603 { (eval echo configure:12604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12605 if test -z "$ac_err"; then
12606   rm -rf conftest*
12607   eval "ac_cv_header_$ac_safe=yes"
12608 else
12609   echo "$ac_err" >&5
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_header_$ac_safe=no"
12614 fi
12615 rm -f conftest*
12616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12617   echo "$ac_t""yes" 1>&6
12618   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12619 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12620 echo "configure:12621: checking for arpa/inet.h" >&5
12621
12622 cat > conftest.$ac_ext <<EOF
12623 #line 12624 "configure"
12624 #include "confdefs.h"
12625 #include <arpa/inet.h>
12626 EOF
12627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12628 { (eval echo configure:12629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12630 if test -z "$ac_err"; then
12631   rm -rf conftest*
12632   eval "ac_cv_header_$ac_safe=yes"
12633 else
12634   echo "$ac_err" >&5
12635   echo "configure: failed program was:" >&5
12636   cat conftest.$ac_ext >&5
12637   rm -rf conftest*
12638   eval "ac_cv_header_$ac_safe=no"
12639 fi
12640 rm -f conftest*
12641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12642   echo "$ac_t""yes" 1>&6
12643   
12644   { test "$extra_verbose" = "yes" && cat << \EOF
12645     Defining HAVE_SOCKETS
12646 EOF
12647 cat >> confdefs.h <<\EOF
12648 #define HAVE_SOCKETS 1
12649 EOF
12650 }
12651
12652       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12653 echo "configure:12654: checking "for sun_len member in struct sockaddr_un"" >&5
12654       cat > conftest.$ac_ext <<EOF
12655 #line 12656 "configure"
12656 #include "confdefs.h"
12657
12658 #include <sys/types.h>
12659 #include <sys/socket.h>
12660 #include <sys/un.h>
12661       
12662 int main() {
12663 static struct sockaddr_un x; x.sun_len = 1;
12664 ; return 0; }
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12667   rm -rf conftest*
12668   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12669     Defining HAVE_SOCKADDR_SUN_LEN
12670 EOF
12671 cat >> confdefs.h <<\EOF
12672 #define HAVE_SOCKADDR_SUN_LEN 1
12673 EOF
12674 }
12675
12676 else
12677   echo "configure: failed program was:" >&5
12678   cat conftest.$ac_ext >&5
12679   rm -rf conftest*
12680   echo "$ac_t""no" 1>&6
12681 fi
12682 rm -f conftest*
12683       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12684 echo "configure:12685: checking "for ip_mreq struct in netinet/in.h"" >&5
12685       cat > conftest.$ac_ext <<EOF
12686 #line 12687 "configure"
12687 #include "confdefs.h"
12688
12689 #include <sys/types.h>
12690 #include <netinet/in.h>
12691       
12692 int main() {
12693 static struct ip_mreq x;
12694 ; return 0; }
12695 EOF
12696 if { (eval echo configure:12697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12697   rm -rf conftest*
12698   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12699     Defining HAVE_MULTICAST
12700 EOF
12701 cat >> confdefs.h <<\EOF
12702 #define HAVE_MULTICAST 1
12703 EOF
12704 }
12705
12706 else
12707   echo "configure: failed program was:" >&5
12708   cat conftest.$ac_ext >&5
12709   rm -rf conftest*
12710   echo "$ac_t""no" 1>&6
12711 fi
12712 rm -f conftest*
12713 else
12714   echo "$ac_t""no" 1>&6
12715 fi
12716
12717 else
12718   echo "$ac_t""no" 1>&6
12719 fi
12720
12721 else
12722   echo "$ac_t""no" 1>&6
12723 fi
12724
12725
12726 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12727 echo "configure:12728: checking for msgget" >&5
12728
12729 cat > conftest.$ac_ext <<EOF
12730 #line 12731 "configure"
12731 #include "confdefs.h"
12732 /* System header to define __stub macros and hopefully few prototypes,
12733     which can conflict with char msgget(); below.  */
12734 #include <assert.h>
12735 /* Override any gcc2 internal prototype to avoid an error.  */
12736 /* We use char because int might match the return type of a gcc2
12737     builtin and then its argument prototype would still apply.  */
12738 char msgget();
12739
12740 int main() {
12741
12742 /* The GNU C library defines this for functions which it implements
12743     to always fail with ENOSYS.  Some functions are actually named
12744     something starting with __ and the normal name is an alias.  */
12745 #if defined (__stub_msgget) || defined (__stub___msgget)
12746 choke me
12747 #else
12748 msgget();
12749 #endif
12750
12751 ; return 0; }
12752 EOF
12753 if { (eval echo configure:12754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12754   rm -rf conftest*
12755   eval "ac_cv_func_msgget=yes"
12756 else
12757   echo "configure: failed program was:" >&5
12758   cat conftest.$ac_ext >&5
12759   rm -rf conftest*
12760   eval "ac_cv_func_msgget=no"
12761 fi
12762 rm -f conftest*
12763
12764 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12765   echo "$ac_t""yes" 1>&6
12766   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12767 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12768 echo "configure:12769: checking for sys/ipc.h" >&5
12769
12770 cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 #include <sys/ipc.h>
12774 EOF
12775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12776 { (eval echo configure:12777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12778 if test -z "$ac_err"; then
12779   rm -rf conftest*
12780   eval "ac_cv_header_$ac_safe=yes"
12781 else
12782   echo "$ac_err" >&5
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   eval "ac_cv_header_$ac_safe=no"
12787 fi
12788 rm -f conftest*
12789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12790   echo "$ac_t""yes" 1>&6
12791   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12792 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12793 echo "configure:12794: checking for sys/msg.h" >&5
12794
12795 cat > conftest.$ac_ext <<EOF
12796 #line 12797 "configure"
12797 #include "confdefs.h"
12798 #include <sys/msg.h>
12799 EOF
12800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12801 { (eval echo configure:12802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12803 if test -z "$ac_err"; then
12804   rm -rf conftest*
12805   eval "ac_cv_header_$ac_safe=yes"
12806 else
12807   echo "$ac_err" >&5
12808   echo "configure: failed program was:" >&5
12809   cat conftest.$ac_ext >&5
12810   rm -rf conftest*
12811   eval "ac_cv_header_$ac_safe=no"
12812 fi
12813 rm -f conftest*
12814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12815   echo "$ac_t""yes" 1>&6
12816   { test "$extra_verbose" = "yes" && cat << \EOF
12817     Defining HAVE_SYSVIPC
12818 EOF
12819 cat >> confdefs.h <<\EOF
12820 #define HAVE_SYSVIPC 1
12821 EOF
12822 }
12823
12824 else
12825   echo "$ac_t""no" 1>&6
12826 fi
12827
12828 else
12829   echo "$ac_t""no" 1>&6
12830 fi
12831
12832 else
12833   echo "$ac_t""no" 1>&6
12834 fi
12835
12836
12837 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12838 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12839 echo "configure:12840: checking for dirent.h" >&5
12840
12841 cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 #include <dirent.h>
12845 EOF
12846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12847 { (eval echo configure:12848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12849 if test -z "$ac_err"; then
12850   rm -rf conftest*
12851   eval "ac_cv_header_$ac_safe=yes"
12852 else
12853   echo "$ac_err" >&5
12854   echo "configure: failed program was:" >&5
12855   cat conftest.$ac_ext >&5
12856   rm -rf conftest*
12857   eval "ac_cv_header_$ac_safe=no"
12858 fi
12859 rm -f conftest*
12860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12861   echo "$ac_t""yes" 1>&6
12862   { test "$extra_verbose" = "yes" && cat << \EOF
12863     Defining SYSV_SYSTEM_DIR
12864 EOF
12865 cat >> confdefs.h <<\EOF
12866 #define SYSV_SYSTEM_DIR 1
12867 EOF
12868 }
12869
12870 else
12871   echo "$ac_t""no" 1>&6
12872 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12873 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12874 echo "configure:12875: checking for sys/dir.h" >&5
12875
12876 cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879 #include <sys/dir.h>
12880 EOF
12881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12882 { (eval echo configure:12883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12884 if test -z "$ac_err"; then
12885   rm -rf conftest*
12886   eval "ac_cv_header_$ac_safe=yes"
12887 else
12888   echo "$ac_err" >&5
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -rf conftest*
12892   eval "ac_cv_header_$ac_safe=no"
12893 fi
12894 rm -f conftest*
12895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12896   echo "$ac_t""yes" 1>&6
12897   :
12898 else
12899   echo "$ac_t""no" 1>&6
12900 { test "$extra_verbose" = "yes" && cat << \EOF
12901     Defining NONSYSTEM_DIR_LIBRARY
12902 EOF
12903 cat >> confdefs.h <<\EOF
12904 #define NONSYSTEM_DIR_LIBRARY 1
12905 EOF
12906 }
12907
12908 fi
12909
12910 fi
12911
12912
12913 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12914 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12915 echo "configure:12916: checking for nlist.h" >&5
12916
12917 cat > conftest.$ac_ext <<EOF
12918 #line 12919 "configure"
12919 #include "confdefs.h"
12920 #include <nlist.h>
12921 EOF
12922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12923 { (eval echo configure:12924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12925 if test -z "$ac_err"; then
12926   rm -rf conftest*
12927   eval "ac_cv_header_$ac_safe=yes"
12928 else
12929   echo "$ac_err" >&5
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_header_$ac_safe=no"
12934 fi
12935 rm -f conftest*
12936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12937   echo "$ac_t""yes" 1>&6
12938   { test "$extra_verbose" = "yes" && cat << \EOF
12939     Defining NLIST_STRUCT
12940 EOF
12941 cat >> confdefs.h <<\EOF
12942 #define NLIST_STRUCT 1
12943 EOF
12944 }
12945
12946 else
12947   echo "$ac_t""no" 1>&6
12948 fi
12949
12950
12951
12952 echo "checking "for sound support"" 1>&6
12953 echo "configure:12954: checking "for sound support"" >&5
12954 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12955
12956 if test "$with_native_sound" != "no"; then
12957     if test -n "$native_sound_lib"; then
12958     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12959 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12960 echo "configure:12961: checking for multimedia/audio_device.h" >&5
12961
12962 cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965 #include <multimedia/audio_device.h>
12966 EOF
12967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12968 { (eval echo configure:12969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12970 if test -z "$ac_err"; then
12971   rm -rf conftest*
12972   eval "ac_cv_header_$ac_safe=yes"
12973 else
12974   echo "$ac_err" >&5
12975   echo "configure: failed program was:" >&5
12976   cat conftest.$ac_ext >&5
12977   rm -rf conftest*
12978   eval "ac_cv_header_$ac_safe=no"
12979 fi
12980 rm -f conftest*
12981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12982   echo "$ac_t""yes" 1>&6
12983   sound_found=yes sound_cflags=""
12984       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12985    echo "    xemacs will be linked with \"sunplay.o\""
12986  fi
12987 else
12988   echo "$ac_t""no" 1>&6
12989 fi
12990
12991   fi
12992
12993     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12994     sound_found=yes
12995     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12996    echo "    xemacs will be linked with \"sunplay.o\""
12997  fi
12998     if test -d "/usr/demo/SOUND/include"
12999       then sound_cflags="-I/usr/demo/SOUND/include"
13000       else sound_cflags="-I/usr/demo/SOUND"
13001     fi
13002     if test -z "$native_sound_lib" ; then
13003       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13004         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13005         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13006       fi
13007     fi
13008   fi
13009
13010     if test -z "$sound_found"; then
13011     case "$canonical" in
13012     *-sgi-* )
13013       if test -z "$native_sound_lib"; then
13014         
13015 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13016 echo "configure:13017: checking for ALopenport in -laudio" >&5
13017 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13018
13019 xe_check_libs=" -laudio "
13020 cat > conftest.$ac_ext <<EOF
13021 #line 13022 "configure"
13022 #include "confdefs.h"
13023 /* Override any gcc2 internal prototype to avoid an error.  */
13024 /* We use char because int might match the return type of a gcc2
13025     builtin and then its argument prototype would still apply.  */
13026 char ALopenport();
13027
13028 int main() {
13029 ALopenport()
13030 ; return 0; }
13031 EOF
13032 if { (eval echo configure:13033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13033   rm -rf conftest*
13034   eval "ac_cv_lib_$ac_lib_var=yes"
13035 else
13036   echo "configure: failed program was:" >&5
13037   cat conftest.$ac_ext >&5
13038   rm -rf conftest*
13039   eval "ac_cv_lib_$ac_lib_var=no"
13040 fi
13041 rm -f conftest*
13042 xe_check_libs=""
13043
13044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13045   echo "$ac_t""yes" 1>&6
13046   native_sound_lib="-laudio"
13047 else
13048   echo "$ac_t""no" 1>&6
13049 fi
13050
13051
13052       fi
13053       if test -n "$native_sound_lib"; then
13054         sound_found=yes sound_cflags=""
13055         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13056    echo "    xemacs will be linked with \"sgiplay.o\""
13057  fi
13058       fi ;;
13059     hppa*-hp-hpux* )
13060       if test -z "$native_sound_lib"; then
13061         
13062 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13063 echo "configure:13064: checking for AOpenAudio in -lAlib" >&5
13064 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13065
13066 xe_check_libs=" -lAlib "
13067 cat > conftest.$ac_ext <<EOF
13068 #line 13069 "configure"
13069 #include "confdefs.h"
13070 /* Override any gcc2 internal prototype to avoid an error.  */
13071 /* We use char because int might match the return type of a gcc2
13072     builtin and then its argument prototype would still apply.  */
13073 char AOpenAudio();
13074
13075 int main() {
13076 AOpenAudio()
13077 ; return 0; }
13078 EOF
13079 if { (eval echo configure:13080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13080   rm -rf conftest*
13081   eval "ac_cv_lib_$ac_lib_var=yes"
13082 else
13083   echo "configure: failed program was:" >&5
13084   cat conftest.$ac_ext >&5
13085   rm -rf conftest*
13086   eval "ac_cv_lib_$ac_lib_var=no"
13087 fi
13088 rm -f conftest*
13089 xe_check_libs=""
13090
13091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13092   echo "$ac_t""yes" 1>&6
13093   native_sound_lib="-lAlib"
13094 else
13095   echo "$ac_t""no" 1>&6
13096 fi
13097
13098
13099       fi
13100       if test -n "$native_sound_lib"; then
13101         sound_found=yes
13102         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13103    echo "    xemacs will be linked with \"hpplay.o\""
13104  fi
13105         if test "$GCC" = "yes" # Kludge city
13106           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13107           else sound_cflags="+e -I/usr/audio/examples"
13108         fi
13109       fi ;;
13110     esac
13111   fi
13112
13113     if test -z "$sound_found"; then
13114     if test "$with_msw" = "yes"; then
13115     sound_found=yes
13116     native_sound_lib=
13117     fi
13118   fi
13119
13120     if test -z "$sound_found"; then
13121     for dir in "machine" "sys" "linux"; do
13122       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13123 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13124 echo "configure:13125: checking for ${dir}/soundcard.h" >&5
13125
13126 cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 #include <${dir}/soundcard.h>
13130 EOF
13131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13132 { (eval echo configure:13133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13134 if test -z "$ac_err"; then
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=yes"
13137 else
13138   echo "$ac_err" >&5
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=no"
13143 fi
13144 rm -f conftest*
13145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13146   echo "$ac_t""yes" 1>&6
13147   sound_found=yes
13148        need_miscplay=yes
13149         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13150    echo "    xemacs will be linked with \"linuxplay.o\""
13151  fi
13152         { test "$extra_verbose" = "yes" && cat << EOF
13153     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13154 EOF
13155 cat >> confdefs.h <<EOF
13156 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13157 EOF
13158 }
13159
13160         break
13161 else
13162   echo "$ac_t""no" 1>&6
13163 fi
13164
13165     done
13166   fi
13167
13168   test "$sound_found" = "yes" && with_native_sound=yes
13169 fi
13170
13171 if test "$with_native_sound" = "yes"; then
13172   { test "$extra_verbose" = "yes" && cat << \EOF
13173     Defining HAVE_NATIVE_SOUND
13174 EOF
13175 cat >> confdefs.h <<\EOF
13176 #define HAVE_NATIVE_SOUND 1
13177 EOF
13178 }
13179
13180   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13181 fi
13182
13183 if test "$with_nas_sound" != "no"; then
13184   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13185 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13186 echo "configure:13187: checking for audio/audiolib.h" >&5
13187
13188 cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 #include <audio/audiolib.h>
13192 EOF
13193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13194 { (eval echo configure:13195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13196 if test -z "$ac_err"; then
13197   rm -rf conftest*
13198   eval "ac_cv_header_$ac_safe=yes"
13199 else
13200   echo "$ac_err" >&5
13201   echo "configure: failed program was:" >&5
13202   cat conftest.$ac_ext >&5
13203   rm -rf conftest*
13204   eval "ac_cv_header_$ac_safe=no"
13205 fi
13206 rm -f conftest*
13207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13208   echo "$ac_t""yes" 1>&6
13209   
13210     
13211 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13212 echo "configure:13213: checking for AuOpenServer in -laudio" >&5
13213 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13214
13215 xe_check_libs=" -laudio "
13216 cat > conftest.$ac_ext <<EOF
13217 #line 13218 "configure"
13218 #include "confdefs.h"
13219 /* Override any gcc2 internal prototype to avoid an error.  */
13220 /* We use char because int might match the return type of a gcc2
13221     builtin and then its argument prototype would still apply.  */
13222 char AuOpenServer();
13223
13224 int main() {
13225 AuOpenServer()
13226 ; return 0; }
13227 EOF
13228 if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13229   rm -rf conftest*
13230   eval "ac_cv_lib_$ac_lib_var=yes"
13231 else
13232   echo "configure: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   rm -rf conftest*
13235   eval "ac_cv_lib_$ac_lib_var=no"
13236 fi
13237 rm -f conftest*
13238 xe_check_libs=""
13239
13240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13241   echo "$ac_t""yes" 1>&6
13242   have_nas_sound=yes
13243 else
13244   echo "$ac_t""no" 1>&6
13245 fi
13246
13247
13248 else
13249   echo "$ac_t""no" 1>&6
13250 fi
13251
13252   if test "$have_nas_sound" = "yes"; then
13253     with_nas_sound=yes
13254     { test "$extra_verbose" = "yes" && cat << \EOF
13255     Defining HAVE_NAS_SOUND
13256 EOF
13257 cat >> confdefs.h <<\EOF
13258 #define HAVE_NAS_SOUND 1
13259 EOF
13260 }
13261
13262     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13263    echo "    xemacs will be linked with \"nas.o\""
13264  fi
13265     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13266             cat > conftest.$ac_ext <<EOF
13267 #line 13268 "configure"
13268 #include "confdefs.h"
13269 #include <audio/Xtutil.h>
13270 EOF
13271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13272   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13273   :
13274 else
13275   rm -rf conftest*
13276   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13277     Defining NAS_NO_ERROR_JUMP
13278 EOF
13279 cat >> confdefs.h <<\EOF
13280 #define NAS_NO_ERROR_JUMP 1
13281 EOF
13282 }
13283
13284 fi
13285 rm -f conftest*
13286
13287   else
13288     test "$with_nas_sound" = "yes" && \
13289       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13290     with_nas_sound=no
13291   fi
13292 fi
13293
13294 if test "$with_esd_sound" != "no"; then
13295   # Extract the first word of "esd-config", so it can be a program name with args.
13296 set dummy esd-config; ac_word=$2
13297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13298 echo "configure:13299: checking for $ac_word" >&5
13299
13300 if test -n "$have_esd_config"; then
13301   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13302 else
13303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13304   ac_dummy="$PATH"
13305   for ac_dir in $ac_dummy; do
13306     test -z "$ac_dir" && ac_dir=.
13307     if test -f $ac_dir/$ac_word; then
13308       ac_cv_prog_have_esd_config="yes"
13309       break
13310     fi
13311   done
13312   IFS="$ac_save_ifs"
13313   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13314 fi
13315 have_esd_config="$ac_cv_prog_have_esd_config"
13316 if test -n "$have_esd_config"; then
13317   echo "$ac_t""$have_esd_config" 1>&6
13318 else
13319   echo "$ac_t""no" 1>&6
13320 fi
13321
13322   if test "$have_esd_config" = "yes"; then
13323     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13324     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
13325     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13326     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13327 echo "configure:13328: checking for esd_play_stream" >&5
13328
13329 cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 /* System header to define __stub macros and hopefully few prototypes,
13333     which can conflict with char esd_play_stream(); below.  */
13334 #include <assert.h>
13335 /* Override any gcc2 internal prototype to avoid an error.  */
13336 /* We use char because int might match the return type of a gcc2
13337     builtin and then its argument prototype would still apply.  */
13338 char esd_play_stream();
13339
13340 int main() {
13341
13342 /* The GNU C library defines this for functions which it implements
13343     to always fail with ENOSYS.  Some functions are actually named
13344     something starting with __ and the normal name is an alias.  */
13345 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13346 choke me
13347 #else
13348 esd_play_stream();
13349 #endif
13350
13351 ; return 0; }
13352 EOF
13353 if { (eval echo configure:13354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13354   rm -rf conftest*
13355   eval "ac_cv_func_esd_play_stream=yes"
13356 else
13357   echo "configure: failed program was:" >&5
13358   cat conftest.$ac_ext >&5
13359   rm -rf conftest*
13360   eval "ac_cv_func_esd_play_stream=no"
13361 fi
13362 rm -f conftest*
13363
13364 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13365   echo "$ac_t""yes" 1>&6
13366   have_esd_sound=yes
13367 else
13368   echo "$ac_t""no" 1>&6
13369 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13370 fi
13371
13372   fi
13373
13374   if test "$have_esd_sound" = "yes"; then
13375     with_esd_sound=yes
13376     need_miscplay=yes
13377     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13378    echo "    xemacs will be linked with \"esd.o\""
13379  fi
13380     { test "$extra_verbose" = "yes" && cat << \EOF
13381     Defining HAVE_ESD_SOUND
13382 EOF
13383 cat >> confdefs.h <<\EOF
13384 #define HAVE_ESD_SOUND 1
13385 EOF
13386 }
13387
13388   else
13389     test "$with_esd_sound" = "yes" && \
13390       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13391     with_esd_sound=no
13392   fi
13393 fi
13394
13395 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13396    echo "    xemacs will be linked with \"miscplay.o\""
13397  fi
13398
13399
13400 test -z "$with_tty" && with_tty=yes
13401
13402 if test "$with_tty" = "yes"  ; then
13403   echo "checking for TTY-related features" 1>&6
13404 echo "configure:13405: checking for TTY-related features" >&5
13405   { test "$extra_verbose" = "yes" && cat << \EOF
13406     Defining HAVE_TTY
13407 EOF
13408 cat >> confdefs.h <<\EOF
13409 #define HAVE_TTY 1
13410 EOF
13411 }
13412
13413   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
13414    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\""
13415  fi
13416
13417     if test -z "$with_ncurses"; then
13418     
13419 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13420 echo "configure:13421: checking for tgetent in -lncurses" >&5
13421 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13422
13423 xe_check_libs=" -lncurses "
13424 cat > conftest.$ac_ext <<EOF
13425 #line 13426 "configure"
13426 #include "confdefs.h"
13427 /* Override any gcc2 internal prototype to avoid an error.  */
13428 /* We use char because int might match the return type of a gcc2
13429     builtin and then its argument prototype would still apply.  */
13430 char tgetent();
13431
13432 int main() {
13433 tgetent()
13434 ; return 0; }
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13437   rm -rf conftest*
13438   eval "ac_cv_lib_$ac_lib_var=yes"
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -rf conftest*
13443   eval "ac_cv_lib_$ac_lib_var=no"
13444 fi
13445 rm -f conftest*
13446 xe_check_libs=""
13447
13448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13449   echo "$ac_t""yes" 1>&6
13450   with_ncurses=yes
13451 else
13452   echo "$ac_t""no" 1>&6
13453 with_ncurses=no
13454 fi
13455
13456
13457   fi
13458   if test "$with_ncurses" = "yes"; then
13459     { test "$extra_verbose" = "yes" && cat << \EOF
13460     Defining HAVE_NCURSES
13461 EOF
13462 cat >> confdefs.h <<\EOF
13463 #define HAVE_NCURSES 1
13464 EOF
13465 }
13466
13467     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13468 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13469 echo "configure:13470: checking for ncurses/curses.h" >&5
13470
13471 cat > conftest.$ac_ext <<EOF
13472 #line 13473 "configure"
13473 #include "confdefs.h"
13474 #include <ncurses/curses.h>
13475 EOF
13476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13477 { (eval echo configure:13478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13479 if test -z "$ac_err"; then
13480   rm -rf conftest*
13481   eval "ac_cv_header_$ac_safe=yes"
13482 else
13483   echo "$ac_err" >&5
13484   echo "configure: failed program was:" >&5
13485   cat conftest.$ac_ext >&5
13486   rm -rf conftest*
13487   eval "ac_cv_header_$ac_safe=no"
13488 fi
13489 rm -f conftest*
13490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13491   echo "$ac_t""yes" 1>&6
13492   curses_h_file=ncurses/curses.h
13493 else
13494   echo "$ac_t""no" 1>&6
13495 fi
13496
13497     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13498 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13499 echo "configure:13500: checking for ncurses/term.h" >&5
13500
13501 cat > conftest.$ac_ext <<EOF
13502 #line 13503 "configure"
13503 #include "confdefs.h"
13504 #include <ncurses/term.h>
13505 EOF
13506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13507 { (eval echo configure:13508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13509 if test -z "$ac_err"; then
13510   rm -rf conftest*
13511   eval "ac_cv_header_$ac_safe=yes"
13512 else
13513   echo "$ac_err" >&5
13514   echo "configure: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   rm -rf conftest*
13517   eval "ac_cv_header_$ac_safe=no"
13518 fi
13519 rm -f conftest*
13520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13521   echo "$ac_t""yes" 1>&6
13522   term_h_file=ncurses/term.h
13523 else
13524   echo "$ac_t""no" 1>&6
13525 fi
13526
13527     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13528    echo "    xemacs will be linked with \"terminfo.o\""
13529  fi
13530     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13531
13532     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13533                         save_c_switch_site="$c_switch_site"
13534       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13535       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13536 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13537 echo "configure:13538: checking for ncurses/curses.h" >&5
13538
13539 cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542 #include <ncurses/curses.h>
13543 EOF
13544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13545 { (eval echo configure:13546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13547 if test -z "$ac_err"; then
13548   rm -rf conftest*
13549   eval "ac_cv_header_$ac_safe=yes"
13550 else
13551   echo "$ac_err" >&5
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -rf conftest*
13555   eval "ac_cv_header_$ac_safe=no"
13556 fi
13557 rm -f conftest*
13558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13559   echo "$ac_t""yes" 1>&6
13560   curses_h_file=ncurses/curses.h
13561 else
13562   echo "$ac_t""no" 1>&6
13563 fi
13564
13565       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13566         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13567         else c_switch_site="$save_c_switch_site"
13568       fi
13569     fi
13570   else         if test "$have_terminfo" = "yes"; then
13571       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13572    echo "    xemacs will be linked with \"terminfo.o\""
13573  fi
13574       if test -n "$libs_termcap"; then
13575         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13576       else
13577         for lib in curses termlib termcap; do
13578           
13579 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13580 echo "configure:13581: checking for tgetent in -l$lib" >&5
13581 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13582
13583 xe_check_libs=" -l$lib "
13584 cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587 /* Override any gcc2 internal prototype to avoid an error.  */
13588 /* We use char because int might match the return type of a gcc2
13589     builtin and then its argument prototype would still apply.  */
13590 char tgetent();
13591
13592 int main() {
13593 tgetent()
13594 ; return 0; }
13595 EOF
13596 if { (eval echo configure:13597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13597   rm -rf conftest*
13598   eval "ac_cv_lib_$ac_lib_var=yes"
13599 else
13600   echo "configure: failed program was:" >&5
13601   cat conftest.$ac_ext >&5
13602   rm -rf conftest*
13603   eval "ac_cv_lib_$ac_lib_var=no"
13604 fi
13605 rm -f conftest*
13606 xe_check_libs=""
13607
13608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13609   echo "$ac_t""yes" 1>&6
13610   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13611 else
13612   echo "$ac_t""no" 1>&6
13613 fi
13614
13615
13616         done
13617       fi
13618     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13619                                 
13620 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13621 echo "configure:13622: checking for tgoto in -ltermcap" >&5
13622 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13623
13624 xe_check_libs=" -ltermcap "
13625 cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 /* Override any gcc2 internal prototype to avoid an error.  */
13629 /* We use char because int might match the return type of a gcc2
13630     builtin and then its argument prototype would still apply.  */
13631 char tgoto();
13632
13633 int main() {
13634 tgoto()
13635 ; return 0; }
13636 EOF
13637 if { (eval echo configure:13638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13638   rm -rf conftest*
13639   eval "ac_cv_lib_$ac_lib_var=yes"
13640 else
13641   echo "configure: failed program was:" >&5
13642   cat conftest.$ac_ext >&5
13643   rm -rf conftest*
13644   eval "ac_cv_lib_$ac_lib_var=no"
13645 fi
13646 rm -f conftest*
13647 xe_check_libs=""
13648
13649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13650   echo "$ac_t""yes" 1>&6
13651     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13652     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13653   { test "$extra_verbose" = "yes" && cat << EOF
13654     Defining $ac_tr_lib
13655 EOF
13656 cat >> confdefs.h <<EOF
13657 #define $ac_tr_lib 1
13658 EOF
13659 }
13660
13661   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13662
13663 else
13664   echo "$ac_t""no" 1>&6
13665 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13666    echo "    xemacs will be linked with \"tparam.o\""
13667  fi
13668 fi
13669
13670
13671       else
13672         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13673    echo "    xemacs will be linked with \"tparam.o\""
13674  fi
13675       fi
13676                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13677       if test -n "$libs_termcap"; then
13678         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13679       else
13680         
13681 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13682 echo "configure:13683: checking for tgetent in -lcurses" >&5
13683 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13684
13685 xe_check_libs=" -lcurses "
13686 cat > conftest.$ac_ext <<EOF
13687 #line 13688 "configure"
13688 #include "confdefs.h"
13689 /* Override any gcc2 internal prototype to avoid an error.  */
13690 /* We use char because int might match the return type of a gcc2
13691     builtin and then its argument prototype would still apply.  */
13692 char tgetent();
13693
13694 int main() {
13695 tgetent()
13696 ; return 0; }
13697 EOF
13698 if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13699   rm -rf conftest*
13700   eval "ac_cv_lib_$ac_lib_var=yes"
13701 else
13702   echo "configure: failed program was:" >&5
13703   cat conftest.$ac_ext >&5
13704   rm -rf conftest*
13705   eval "ac_cv_lib_$ac_lib_var=no"
13706 fi
13707 rm -f conftest*
13708 xe_check_libs=""
13709
13710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13711   echo "$ac_t""yes" 1>&6
13712   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13713 else
13714   echo "$ac_t""no" 1>&6
13715 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13716 echo "configure:13717: checking for tgetent in -ltermcap" >&5
13717 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13718
13719 xe_check_libs=" -ltermcap "
13720 cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 /* Override any gcc2 internal prototype to avoid an error.  */
13724 /* We use char because int might match the return type of a gcc2
13725     builtin and then its argument prototype would still apply.  */
13726 char tgetent();
13727
13728 int main() {
13729 tgetent()
13730 ; return 0; }
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13733   rm -rf conftest*
13734   eval "ac_cv_lib_$ac_lib_var=yes"
13735 else
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -rf conftest*
13739   eval "ac_cv_lib_$ac_lib_var=no"
13740 fi
13741 rm -f conftest*
13742 xe_check_libs=""
13743
13744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13745   echo "$ac_t""yes" 1>&6
13746   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13747 else
13748   echo "$ac_t""no" 1>&6
13749 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13750    echo "    xemacs will be linked with \"termcap.o\""
13751  fi
13752 fi
13753
13754
13755 fi
13756
13757
13758       fi
13759     fi
13760   fi
13761   { test "$extra_verbose" = "yes" && cat << EOF
13762     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13763 EOF
13764 cat >> confdefs.h <<EOF
13765 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13766 EOF
13767 }
13768
13769   { test "$extra_verbose" = "yes" && cat << EOF
13770     Defining TERM_H_FILE = "${term_h_file-term.h}"
13771 EOF
13772 cat >> confdefs.h <<EOF
13773 #define TERM_H_FILE "${term_h_file-term.h}"
13774 EOF
13775 }
13776
13777
13778     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13779 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13780 echo "configure:13781: checking for gpm.h" >&5
13781
13782 cat > conftest.$ac_ext <<EOF
13783 #line 13784 "configure"
13784 #include "confdefs.h"
13785 #include <gpm.h>
13786 EOF
13787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13788 { (eval echo configure:13789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13790 if test -z "$ac_err"; then
13791   rm -rf conftest*
13792   eval "ac_cv_header_$ac_safe=yes"
13793 else
13794   echo "$ac_err" >&5
13795   echo "configure: failed program was:" >&5
13796   cat conftest.$ac_ext >&5
13797   rm -rf conftest*
13798   eval "ac_cv_header_$ac_safe=no"
13799 fi
13800 rm -f conftest*
13801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13802   echo "$ac_t""yes" 1>&6
13803   :
13804 else
13805   echo "$ac_t""no" 1>&6
13806 with_gpm=no
13807 fi
13808  }
13809   test -z "$with_gpm" && { 
13810 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13811 echo "configure:13812: checking for Gpm_Open in -lgpm" >&5
13812 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13813
13814 xe_check_libs=" -lgpm "
13815 cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 /* Override any gcc2 internal prototype to avoid an error.  */
13819 /* We use char because int might match the return type of a gcc2
13820     builtin and then its argument prototype would still apply.  */
13821 char Gpm_Open();
13822
13823 int main() {
13824 Gpm_Open()
13825 ; return 0; }
13826 EOF
13827 if { (eval echo configure:13828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13828   rm -rf conftest*
13829   eval "ac_cv_lib_$ac_lib_var=yes"
13830 else
13831   echo "configure: failed program was:" >&5
13832   cat conftest.$ac_ext >&5
13833   rm -rf conftest*
13834   eval "ac_cv_lib_$ac_lib_var=no"
13835 fi
13836 rm -f conftest*
13837 xe_check_libs=""
13838
13839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13840   echo "$ac_t""yes" 1>&6
13841   with_gpm=yes
13842 else
13843   echo "$ac_t""no" 1>&6
13844 with_gpm=no
13845 fi
13846
13847  }
13848   if test "$with_gpm" = "yes"; then
13849     { test "$extra_verbose" = "yes" && cat << \EOF
13850     Defining HAVE_GPM
13851 EOF
13852 cat >> confdefs.h <<\EOF
13853 #define HAVE_GPM 1
13854 EOF
13855 }
13856
13857     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13858    echo "    xemacs will be linked with \"gpmevent.o\""
13859  fi
13860     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13861   fi
13862
13863 else   for feature in ncurses gpm; do
13864     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13865       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13866     fi
13867     eval "with_${feature}=no"
13868   done
13869 fi 
13870 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
13871    echo "    xemacs will be linked with \"event-unixoid.o\""
13872  fi
13873
13874
13875 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13876   != "no no no" && echo "checking for database support" 1>&6
13877 echo "configure:13878: checking for database support" >&5
13878
13879 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13880   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13881 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13882 echo "configure:13883: checking for ndbm.h" >&5
13883
13884 cat > conftest.$ac_ext <<EOF
13885 #line 13886 "configure"
13886 #include "confdefs.h"
13887 #include <ndbm.h>
13888 EOF
13889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13890 { (eval echo configure:13891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13892 if test -z "$ac_err"; then
13893   rm -rf conftest*
13894   eval "ac_cv_header_$ac_safe=yes"
13895 else
13896   echo "$ac_err" >&5
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -rf conftest*
13900   eval "ac_cv_header_$ac_safe=no"
13901 fi
13902 rm -f conftest*
13903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13904   echo "$ac_t""yes" 1>&6
13905   :
13906 else
13907   echo "$ac_t""no" 1>&6
13908
13909     test "$with_database_gdbm" = "yes" -o \
13910          "$with_database_dbm"  = "yes" && \
13911       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13912     with_database_gdbm=no with_database_dbm=no
13913 fi
13914
13915 fi
13916
13917 if test "$with_database_gdbm" != "no"; then
13918   
13919 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13920 echo "configure:13921: checking for dbm_open in -lgdbm" >&5
13921 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13922
13923 xe_check_libs=" -lgdbm "
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 /* Override any gcc2 internal prototype to avoid an error.  */
13928 /* We use char because int might match the return type of a gcc2
13929     builtin and then its argument prototype would still apply.  */
13930 char dbm_open();
13931
13932 int main() {
13933 dbm_open()
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13937   rm -rf conftest*
13938   eval "ac_cv_lib_$ac_lib_var=yes"
13939 else
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   eval "ac_cv_lib_$ac_lib_var=no"
13944 fi
13945 rm -f conftest*
13946 xe_check_libs=""
13947
13948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13949   echo "$ac_t""yes" 1>&6
13950   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13951 else
13952   echo "$ac_t""no" 1>&6
13953 if test "$with_database_gdbm" = "yes"; then
13954      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13955    fi
13956    with_database_gdbm=no
13957 fi
13958
13959
13960 fi
13961
13962 if test "$with_database_dbm" != "no"; then
13963   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13964 echo "configure:13965: checking for dbm_open" >&5
13965
13966 cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13969 /* System header to define __stub macros and hopefully few prototypes,
13970     which can conflict with char dbm_open(); below.  */
13971 #include <assert.h>
13972 /* Override any gcc2 internal prototype to avoid an error.  */
13973 /* We use char because int might match the return type of a gcc2
13974     builtin and then its argument prototype would still apply.  */
13975 char dbm_open();
13976
13977 int main() {
13978
13979 /* The GNU C library defines this for functions which it implements
13980     to always fail with ENOSYS.  Some functions are actually named
13981     something starting with __ and the normal name is an alias.  */
13982 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13983 choke me
13984 #else
13985 dbm_open();
13986 #endif
13987
13988 ; return 0; }
13989 EOF
13990 if { (eval echo configure:13991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13991   rm -rf conftest*
13992   eval "ac_cv_func_dbm_open=yes"
13993 else
13994   echo "configure: failed program was:" >&5
13995   cat conftest.$ac_ext >&5
13996   rm -rf conftest*
13997   eval "ac_cv_func_dbm_open=no"
13998 fi
13999 rm -f conftest*
14000
14001 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14002   echo "$ac_t""yes" 1>&6
14003   with_database_dbm=yes libdbm=
14004 else
14005   echo "$ac_t""no" 1>&6
14006
14007     
14008 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14009 echo "configure:14010: checking for dbm_open in -ldbm" >&5
14010 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14011
14012 xe_check_libs=" -ldbm "
14013 cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 /* Override any gcc2 internal prototype to avoid an error.  */
14017 /* We use char because int might match the return type of a gcc2
14018     builtin and then its argument prototype would still apply.  */
14019 char dbm_open();
14020
14021 int main() {
14022 dbm_open()
14023 ; return 0; }
14024 EOF
14025 if { (eval echo configure:14026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14026   rm -rf conftest*
14027   eval "ac_cv_lib_$ac_lib_var=yes"
14028 else
14029   echo "configure: failed program was:" >&5
14030   cat conftest.$ac_ext >&5
14031   rm -rf conftest*
14032   eval "ac_cv_lib_$ac_lib_var=no"
14033 fi
14034 rm -f conftest*
14035 xe_check_libs=""
14036
14037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14038   echo "$ac_t""yes" 1>&6
14039   with_database_dbm=yes libdbm=-ldbm
14040 else
14041   echo "$ac_t""no" 1>&6
14042 test "$with_database_dbm" = "yes" && \
14043         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14044       with_database_dbm=no
14045 fi
14046
14047
14048 fi
14049
14050 fi
14051
14052 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14053 test "$with_database_gdbm" = "yes" -o \
14054      "$with_database_dbm"  = "yes" && \
14055   { test "$extra_verbose" = "yes" && cat << \EOF
14056     Defining HAVE_DBM
14057 EOF
14058 cat >> confdefs.h <<\EOF
14059 #define HAVE_DBM 1
14060 EOF
14061 }
14062
14063
14064 if test "$with_database_berkdb" != "no"; then
14065   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14066 echo "configure:14067: checking for Berkeley db.h" >&5
14067   for header in "db/db.h" "db.h"; do
14068     cat > conftest.$ac_ext <<EOF
14069 #line 14070 "configure"
14070 #include "confdefs.h"
14071
14072 #include <stdlib.h>
14073 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14074 #ifdef HAVE_INTTYPES_H
14075 #define __BIT_TYPES_DEFINED__
14076 #include <inttypes.h>
14077 typedef uint8_t  u_int8_t;
14078 typedef uint16_t u_int16_t;
14079 typedef uint32_t u_int32_t;
14080 #ifdef WE_DONT_NEED_QUADS
14081 typedef uint64_t u_int64_t;
14082 #endif
14083 #endif
14084 #endif
14085 #include <$header>
14086
14087 int main() {
14088
14089 ; return 0; }
14090 EOF
14091 if { (eval echo configure:14092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14092   rm -rf conftest*
14093   db_h_file="$header"; break
14094 else
14095   echo "configure: failed program was:" >&5
14096   cat conftest.$ac_ext >&5
14097 fi
14098 rm -f conftest*
14099   done
14100   if test -z "$db_h_file"
14101   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14102   else echo "$ac_t""$db_h_file" 1>&6
14103   fi
14104
14105   if test "$with_database_berkdb" != "no"; then
14106     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14107 echo "configure:14108: checking for Berkeley DB version" >&5
14108     cat > conftest.$ac_ext <<EOF
14109 #line 14110 "configure"
14110 #include "confdefs.h"
14111 #include <$db_h_file>
14112 #if DB_VERSION_MAJOR > 1
14113 yes
14114 #endif
14115
14116 EOF
14117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14118   egrep "yes" >/dev/null 2>&1; then
14119   rm -rf conftest*
14120   cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 #include <$db_h_file>
14124 #if DB_VERSION_MAJOR > 2
14125 yes
14126 #endif
14127
14128 EOF
14129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14130   egrep "yes" >/dev/null 2>&1; then
14131   rm -rf conftest*
14132   echo "$ac_t""3" 1>&6; dbfunc=db_create
14133 else
14134   rm -rf conftest*
14135   
14136     echo "$ac_t""2" 1>&6; dbfunc=db_open
14137 fi
14138 rm -f conftest*
14139
14140 else
14141   rm -rf conftest*
14142   
14143     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14144 fi
14145 rm -f conftest*
14146
14147     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14148 echo "configure:14149: checking for $dbfunc" >&5
14149
14150 cat > conftest.$ac_ext <<EOF
14151 #line 14152 "configure"
14152 #include "confdefs.h"
14153 /* System header to define __stub macros and hopefully few prototypes,
14154     which can conflict with char $dbfunc(); below.  */
14155 #include <assert.h>
14156 /* Override any gcc2 internal prototype to avoid an error.  */
14157 /* We use char because int might match the return type of a gcc2
14158     builtin and then its argument prototype would still apply.  */
14159 char $dbfunc();
14160
14161 int main() {
14162
14163 /* The GNU C library defines this for functions which it implements
14164     to always fail with ENOSYS.  Some functions are actually named
14165     something starting with __ and the normal name is an alias.  */
14166 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14167 choke me
14168 #else
14169 $dbfunc();
14170 #endif
14171
14172 ; return 0; }
14173 EOF
14174 if { (eval echo configure:14175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14175   rm -rf conftest*
14176   eval "ac_cv_func_$dbfunc=yes"
14177 else
14178   echo "configure: failed program was:" >&5
14179   cat conftest.$ac_ext >&5
14180   rm -rf conftest*
14181   eval "ac_cv_func_$dbfunc=no"
14182 fi
14183 rm -f conftest*
14184
14185 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14186   echo "$ac_t""yes" 1>&6
14187   with_database_berkdb=yes need_libdb=no
14188 else
14189   echo "$ac_t""no" 1>&6
14190
14191     
14192 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14193 echo "configure:14194: checking for $dbfunc in -ldb" >&5
14194 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14195
14196 xe_check_libs=" -ldb "
14197 cat > conftest.$ac_ext <<EOF
14198 #line 14199 "configure"
14199 #include "confdefs.h"
14200 /* Override any gcc2 internal prototype to avoid an error.  */
14201 /* We use char because int might match the return type of a gcc2
14202     builtin and then its argument prototype would still apply.  */
14203 char $dbfunc();
14204
14205 int main() {
14206 $dbfunc()
14207 ; return 0; }
14208 EOF
14209 if { (eval echo configure:14210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14210   rm -rf conftest*
14211   eval "ac_cv_lib_$ac_lib_var=yes"
14212 else
14213   echo "configure: failed program was:" >&5
14214   cat conftest.$ac_ext >&5
14215   rm -rf conftest*
14216   eval "ac_cv_lib_$ac_lib_var=no"
14217 fi
14218 rm -f conftest*
14219 xe_check_libs=""
14220
14221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14222   echo "$ac_t""yes" 1>&6
14223   with_database_berkdb=yes need_libdb=yes
14224 else
14225   echo "$ac_t""no" 1>&6
14226 fi
14227
14228
14229 fi
14230
14231   fi
14232
14233   if test "$with_database_berkdb" = "yes"; then
14234     { test "$extra_verbose" = "yes" && cat << EOF
14235     Defining DB_H_FILE = "$db_h_file"
14236 EOF
14237 cat >> confdefs.h <<EOF
14238 #define DB_H_FILE "$db_h_file"
14239 EOF
14240 }
14241
14242     { test "$extra_verbose" = "yes" && cat << \EOF
14243     Defining HAVE_BERKELEY_DB
14244 EOF
14245 cat >> confdefs.h <<\EOF
14246 #define HAVE_BERKELEY_DB 1
14247 EOF
14248 }
14249
14250     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14251   else with_database_berkdb=no
14252   fi
14253 fi
14254
14255 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14256      != "no no no"; then
14257   { test "$extra_verbose" = "yes" && cat << \EOF
14258     Defining HAVE_DATABASE
14259 EOF
14260 cat >> confdefs.h <<\EOF
14261 #define HAVE_DATABASE 1
14262 EOF
14263 }
14264
14265   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14266    echo "    xemacs will be linked with \"database.o\""
14267  fi
14268   if test "$with_utf_2000" = "yes"; then
14269     { test "$extra_verbose" = "yes" && cat << \EOF
14270     Defining HAVE_CHISE_CLIENT
14271 EOF
14272 cat >> confdefs.h <<\EOF
14273 #define HAVE_CHISE_CLIENT 1
14274 EOF
14275 }
14276
14277   fi
14278 fi
14279
14280 if test "$with_socks" = "yes"; then
14281   
14282 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14283 echo "configure:14284: checking for SOCKSinit in -lsocks" >&5
14284 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14285
14286 xe_check_libs=" -lsocks "
14287 cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290 /* Override any gcc2 internal prototype to avoid an error.  */
14291 /* We use char because int might match the return type of a gcc2
14292     builtin and then its argument prototype would still apply.  */
14293 char SOCKSinit();
14294
14295 int main() {
14296 SOCKSinit()
14297 ; return 0; }
14298 EOF
14299 if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14300   rm -rf conftest*
14301   eval "ac_cv_lib_$ac_lib_var=yes"
14302 else
14303   echo "configure: failed program was:" >&5
14304   cat conftest.$ac_ext >&5
14305   rm -rf conftest*
14306   eval "ac_cv_lib_$ac_lib_var=no"
14307 fi
14308 rm -f conftest*
14309 xe_check_libs=""
14310
14311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14312   echo "$ac_t""yes" 1>&6
14313     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14315   { test "$extra_verbose" = "yes" && cat << EOF
14316     Defining $ac_tr_lib
14317 EOF
14318 cat >> confdefs.h <<EOF
14319 #define $ac_tr_lib 1
14320 EOF
14321 }
14322
14323   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14324
14325 else
14326   echo "$ac_t""no" 1>&6
14327 fi
14328
14329
14330   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14331     Defining HAVE_SOCKS
14332 EOF
14333 cat >> confdefs.h <<\EOF
14334 #define HAVE_SOCKS 1
14335 EOF
14336 }
14337
14338 fi
14339
14340 if test "$usage_tracking" = "yes"; then
14341   { test "$extra_verbose" = "yes" && cat << \EOF
14342     Defining USAGE_TRACKING
14343 EOF
14344 cat >> confdefs.h <<\EOF
14345 #define USAGE_TRACKING 1
14346 EOF
14347 }
14348
14349   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14350 fi
14351
14352 if test "$with_modules" != "no"; then
14353   echo "checking for module support" 1>&6
14354 echo "configure:14355: checking for module support" >&5
14355
14356     if test "$with_msw" = "yes"; then
14357     have_dl=yes;
14358   else
14359         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14360 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14361 echo "configure:14362: checking for dlfcn.h" >&5
14362
14363 cat > conftest.$ac_ext <<EOF
14364 #line 14365 "configure"
14365 #include "confdefs.h"
14366 #include <dlfcn.h>
14367 EOF
14368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14369 { (eval echo configure:14370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14371 if test -z "$ac_err"; then
14372   rm -rf conftest*
14373   eval "ac_cv_header_$ac_safe=yes"
14374 else
14375   echo "$ac_err" >&5
14376   echo "configure: failed program was:" >&5
14377   cat conftest.$ac_ext >&5
14378   rm -rf conftest*
14379   eval "ac_cv_header_$ac_safe=no"
14380 fi
14381 rm -f conftest*
14382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14383   echo "$ac_t""yes" 1>&6
14384   
14385       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14386 echo "configure:14387: checking for dlopen in -lc" >&5
14387       cat > conftest.$ac_ext <<EOF
14388 #line 14389 "configure"
14389 #include "confdefs.h"
14390 #include <dlfcn.h>
14391 int main() {
14392         dlopen ("", 0);
14393 ; return 0; }
14394 EOF
14395 if { (eval echo configure:14396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14396   rm -rf conftest*
14397    have_dl=yes 
14398 else
14399   echo "configure: failed program was:" >&5
14400   cat conftest.$ac_ext >&5
14401   rm -rf conftest*
14402   
14403       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14404 echo "configure:14405: checking for dlopen in -ldl" >&5
14405       ac_save_LIBS="$LIBS"
14406       LIBS="-ldl $LIBS"
14407       cat > conftest.$ac_ext <<EOF
14408 #line 14409 "configure"
14409 #include "confdefs.h"
14410 #include <dlfcn.h>
14411 int main() {
14412         dlopen ("", 0);
14413 ; return 0; }
14414 EOF
14415 if { (eval echo configure:14416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14416   rm -rf conftest*
14417    have_dl=yes 
14418 else
14419   echo "configure: failed program was:" >&5
14420   cat conftest.$ac_ext >&5
14421   rm -rf conftest*
14422   LIBS="$ac_save_LIBS"
14423 fi
14424 rm -f conftest*
14425       ac_save_LIBS=
14426 fi
14427 rm -f conftest*
14428 else
14429   echo "$ac_t""no" 1>&6
14430 fi
14431
14432     if test -n "$have_dl"; then
14433       { test "$extra_verbose" = "yes" && cat << \EOF
14434     Defining HAVE_DLOPEN
14435 EOF
14436 cat >> confdefs.h <<\EOF
14437 #define HAVE_DLOPEN 1
14438 EOF
14439 }
14440
14441     else
14442       
14443 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14444 echo "configure:14445: checking for shl_load in -ldld" >&5
14445 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14446
14447 xe_check_libs=" -ldld "
14448 cat > conftest.$ac_ext <<EOF
14449 #line 14450 "configure"
14450 #include "confdefs.h"
14451 /* Override any gcc2 internal prototype to avoid an error.  */
14452 /* We use char because int might match the return type of a gcc2
14453     builtin and then its argument prototype would still apply.  */
14454 char shl_load();
14455
14456 int main() {
14457 shl_load()
14458 ; return 0; }
14459 EOF
14460 if { (eval echo configure:14461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14461   rm -rf conftest*
14462   eval "ac_cv_lib_$ac_lib_var=yes"
14463 else
14464   echo "configure: failed program was:" >&5
14465   cat conftest.$ac_ext >&5
14466   rm -rf conftest*
14467   eval "ac_cv_lib_$ac_lib_var=no"
14468 fi
14469 rm -f conftest*
14470 xe_check_libs=""
14471
14472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14473   echo "$ac_t""yes" 1>&6
14474   libdl=dld have_dl=yes;
14475         { test "$extra_verbose" = "yes" && cat << \EOF
14476     Defining HAVE_SHL_LOAD
14477 EOF
14478 cat >> confdefs.h <<\EOF
14479 #define HAVE_SHL_LOAD 1
14480 EOF
14481 }
14482
14483 else
14484   echo "$ac_t""no" 1>&6
14485
14486 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14487 echo "configure:14488: checking for dld_init in -ldld" >&5
14488 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14489
14490 xe_check_libs=" -ldld "
14491 cat > conftest.$ac_ext <<EOF
14492 #line 14493 "configure"
14493 #include "confdefs.h"
14494 /* Override any gcc2 internal prototype to avoid an error.  */
14495 /* We use char because int might match the return type of a gcc2
14496     builtin and then its argument prototype would still apply.  */
14497 char dld_init();
14498
14499 int main() {
14500 dld_init()
14501 ; return 0; }
14502 EOF
14503 if { (eval echo configure:14504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14504   rm -rf conftest*
14505   eval "ac_cv_lib_$ac_lib_var=yes"
14506 else
14507   echo "configure: failed program was:" >&5
14508   cat conftest.$ac_ext >&5
14509   rm -rf conftest*
14510   eval "ac_cv_lib_$ac_lib_var=no"
14511 fi
14512 rm -f conftest*
14513 xe_check_libs=""
14514
14515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14516   echo "$ac_t""yes" 1>&6
14517   libdl=dld have_dl=yes;
14518         { test "$extra_verbose" = "yes" && cat << \EOF
14519     Defining HAVE_DLD_INIT
14520 EOF
14521 cat >> confdefs.h <<\EOF
14522 #define HAVE_DLD_INIT 1
14523 EOF
14524 }
14525
14526 else
14527   echo "$ac_t""no" 1>&6
14528 fi
14529
14530
14531 fi
14532
14533
14534     fi
14535   fi 
14536   if test -n "$have_dl"; then
14537         
14538 dll_ld=
14539 dll_ldflags=
14540 dll_cflags=
14541 dll_post=
14542 dll_ldo="-o"
14543 ld_dynamic_link_flags=
14544 xehost=$canonical
14545 xealias=$internal_configuration
14546
14547 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14548 echo "configure:14549: checking how to build dynamic libraries for ${xehost}" >&5
14549 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14550 case "$xehost" in
14551 *-*-linux-gnu*) ;;
14552 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14553 esac
14554
14555 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14556 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14557 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14558
14559 case "$xehost_os" in
14560 aix3*)
14561   # AIX sometimes has problems with the GCC collect2 program.  For some
14562   # reason, if we set the COLLECT_NAMES environment variable, the problems
14563   # vanish in a puff of smoke.
14564   if test "${COLLECT_NAMES+set}" != set; then
14565     COLLECT_NAMES=
14566     export COLLECT_NAMES
14567   fi
14568   ;;
14569 esac
14570
14571 # Now see if the compiler is really GCC.
14572 if test "$GCC" = "yes"; then
14573   XEGCC=yes
14574 else
14575   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14576 echo "configure:14577: checking checking whether we are using GNU C" >&5
14577   cat > conftest.$ac_ext <<EOF
14578 #line 14579 "configure"
14579 #include "confdefs.h"
14580
14581 #ifdef __GNUC__
14582   yes;
14583 #endif
14584
14585 EOF
14586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14587   egrep "yes" >/dev/null 2>&1; then
14588   rm -rf conftest*
14589   XEGCC=yes
14590 else
14591   rm -rf conftest*
14592   XEGCC=no
14593 fi
14594 rm -f conftest*
14595
14596   echo "$ac_t""${XEGCC}" 1>&6
14597 fi
14598
14599 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14600 echo "configure:14601: checking how to produce PIC code" >&5
14601 wl=
14602
14603 can_build_shared=yes
14604 if test "$XEGCC" = yes; then
14605   wl='-Wl,'
14606
14607   case "$xehost_os" in
14608   aix[3-9]* | irix[5-9]* | osf[3-9])
14609     # PIC is the default for these OSes.
14610     ;;
14611
14612   os2*)
14613     # We can build DLLs from non-PIC.
14614     ;;
14615   amigaos*)
14616     # FIXME: we need at least 68020 code to build shared libraries, but
14617     # adding the `-m68020' flag to GCC prevents building anything better,
14618     # like `-m68040'.
14619     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14620     ;;
14621   *cygwin* | *mingw* )
14622     # PIC is the default
14623     ;;
14624   *)
14625     dll_cflags='-fPIC'
14626     ;;
14627   esac
14628 else
14629   # PORTME Check for PIC flags for the system compiler.
14630   case "$xehost_os" in
14631   hpux9* | hpux1[0-9]*)
14632     # Is there a better link_static_flag that works with the bundled CC?
14633     wl='-Wl,'
14634     dll_cflags='+Z'
14635     ;;
14636
14637   irix[5-9]*)
14638     wl='-Wl,'
14639     # PIC (with -KPIC) is the default.
14640     ;;
14641
14642   os2*)
14643     # We can build DLLs from non-PIC.
14644     ;;
14645
14646   osf[3-9]*)
14647     # All OSF/1 code is PIC.
14648     wl='-Wl,'
14649     ;;
14650
14651   aix[3-9]*)
14652     # All AIX code is PIC.
14653     wl='-Wl,'
14654     ;;
14655
14656   sco3.2v5*)
14657     dll_cflags='-belf -Kpic'
14658     wl='-Wl,'
14659     ;;
14660
14661   unixware*)
14662     dll_cflags="-KPIC"
14663     wl="-Wl,"
14664     ;;
14665
14666   sysv4*)
14667     dll_cflags="-KPIC"
14668     wl="-Wl,"
14669     ;;
14670
14671   sysv5*)
14672     dll_cflags="-KPIC"
14673     wl="-Wl,"
14674     ;;
14675
14676   solaris2*)
14677     dll_cflags='-KPIC'
14678     wl='-Wl,'
14679     ;;
14680
14681   sunos4*)
14682     dll_cflags='-PIC'
14683     wl='-Qoption ld '
14684     ;;
14685
14686   uts4*)
14687     dll_cflags='-pic'
14688     ;;
14689
14690   *)
14691     can_build_shared=no
14692     ;;
14693   esac
14694 fi
14695
14696 if test -n "$dll_cflags"; then
14697   echo "$ac_t""${dll_cflags}" 1>&6
14698
14699   # Check to make sure the dll_cflags actually works.
14700   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14701 echo "configure:14702: checking if PIC flag ${dll_cflags} really works" >&5
14702   save_CFLAGS="$CFLAGS"
14703   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14704   cat > conftest.$ac_ext <<EOF
14705 #line 14706 "configure"
14706 #include "confdefs.h"
14707
14708 int main() {
14709 int x=0;
14710 ; return 0; }
14711 EOF
14712 if { (eval echo configure:14713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14713   rm -rf conftest*
14714   
14715     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14716     # reports no error.  So, we need to grep stderr for (Bundled).
14717     if grep '(Bundled)' config.log >/dev/null; then
14718       echo "$ac_t""no" 1>&6
14719       can_build_shared=no
14720       dll_cflags=
14721     else
14722       echo "$ac_t""yes" 1>&6
14723     fi
14724 else
14725   echo "configure: failed program was:" >&5
14726   cat conftest.$ac_ext >&5
14727   rm -rf conftest*
14728   echo "$ac_t""no" 1>&6
14729     can_build_shared=no
14730     dll_cflags=
14731 fi
14732 rm -f conftest*
14733   CFLAGS="$save_CFLAGS"
14734 else
14735   echo "$ac_t""none" 1>&6
14736 fi
14737
14738 if test "$can_build_shared" = "yes"; then
14739 cc_produces_so=no
14740 xldf=
14741 xcldf=
14742 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14743 echo "configure:14744: checking if C compiler can produce shared libraries" >&5
14744 if test "$XEGCC" = yes; then
14745   xcldf="-shared"
14746   xldf="-shared"
14747 else # Not using GCC
14748   case "$xehost_os" in
14749     aix[3-9]*)
14750       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14751       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14752       ;;
14753
14754     freebsd2* | netbsd* | openbsd*)
14755       xldf="-Bshareable"
14756       xcldf="${wl}-Bshareable"
14757       ;;
14758
14759     freebsd3*)
14760       xcldf="-shared"
14761       ;;
14762
14763     hpux*)
14764       xldf="-b +s"
14765       xcldf="${wl}-b ${wl}+s"
14766       ;;
14767
14768     irix[5-9]* | osf[3-9]*)
14769       xcldf="${wl}-shared"
14770       xldf="-shared"
14771       ;;
14772
14773     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14774       xcldf="-G"
14775       xldf="-G"
14776       ;;
14777
14778     sunos4*)
14779       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14780       xldf="-assert pure-text -Bstatic"
14781       ;;
14782   esac
14783 fi # End if if we are using gcc
14784
14785 if test -n "$xcldf"; then
14786   save_LDFLAGS=$LDFLAGS
14787   save_LIBS=$LIBS
14788   save_xe_libs=$xe_libs
14789   LDFLAGS="$xcldf $LDFLAGS"
14790   LIBS=
14791   xe_libs=
14792   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14793   cat > conftest.$ac_ext <<EOF
14794 #line 14795 "configure"
14795 #include "confdefs.h"
14796
14797 int main() {
14798 int x=0;
14799 ; return 0; }
14800 EOF
14801 if { (eval echo configure:14802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14802   rm -rf conftest*
14803   cc_produces_so=yes
14804 else
14805   echo "configure: failed program was:" >&5
14806   cat conftest.$ac_ext >&5
14807   rm -rf conftest*
14808   cc_produces_so=no
14809 fi
14810 rm -f conftest*
14811   LDFLAGS=$save_LDFLAGS
14812   LIBS=$save_LIBS
14813   xe_libs=$save_xe_libs
14814   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14815 else
14816   cc_produces_so=no
14817 fi
14818 echo "$ac_t""${cc_produces_so}" 1>&6
14819
14820 LTLD=$LD
14821 if test -z "$LTLD"; then
14822   ac_prog=ld
14823   if test "$XEGCC" = yes; then
14824     # Check if gcc -print-prog-name=ld gives a path.
14825     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14826 echo "configure:14827: checking for ld used by GCC" >&5
14827     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14828     case "$ac_prog" in
14829     # Accept absolute paths.
14830     /*)
14831       if test -z "$LTLD"; then
14832 #        case "$ac_prog" in
14833 #          *gcc-lib*) LTLD="$CC"
14834 #                     ;;
14835 #          *)
14836          LTLD="$ac_prog"
14837 #                     ;;
14838 #        esac
14839       fi
14840       ;;
14841     "")
14842       # If it fails, then pretend we aren't using GCC.
14843       ac_prog=ld
14844       ;;
14845     *)
14846       # If it is relative, then search for the first ld in PATH.
14847       with_gnu_ld=unknown
14848       ;;
14849     esac
14850   else
14851     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14852 echo "configure:14853: checking for GNU ld" >&5
14853   fi
14854
14855   if test -z "$LTLD"; then
14856     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14857     for ac_dir in $PATH; do
14858       test -z "$ac_dir" && ac_dir=.
14859       if test -f "$ac_dir/$ac_prog"; then
14860         LTLD="$ac_dir/$ac_prog"
14861         # Check to see if the program is GNU ld.  I'd rather use --version,
14862         # but apparently some GNU ld's only accept -v.
14863         # Break only if it was the GNU/non-GNU ld that we prefer.
14864         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14865           xe_gnu_ld=yes
14866         else
14867           xe_gnu_ld=no
14868         fi
14869       fi
14870     done
14871     IFS="$ac_save_ifs"
14872   fi
14873
14874   if test -n "$LTLD"; then
14875     echo "$ac_t""${LTLD}" 1>&6
14876   else
14877     echo "$ac_t""no" 1>&6
14878   fi
14879
14880   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14881     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14882     exit 1
14883   fi
14884 fi
14885
14886 ld_dynamic_link_flags=
14887
14888 # Check to see if it really is or isn't GNU ld.
14889 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14890 echo "configure:14891: checking if the linker is GNU ld" >&5
14891 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14892 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14893   xe_gnu_ld=yes
14894 else
14895   xe_gnu_ld=no
14896 fi
14897 echo "$ac_t""${xe_gnu_ld}" 1>&6
14898
14899 case "$xehost_os" in
14900   amigaos* | sunos4*)
14901     # On these operating systems, we should treat GNU ld like the system ld.
14902     gnu_ld_acts_native=yes
14903     ;;
14904   *)
14905     gnu_ld_acts_native=no
14906     ;;
14907 esac
14908
14909 if test "$cc_produces_so" = "yes"; then
14910   dll_ld=$CC
14911   dll_ldflags=$xcldf
14912   can_build_shared=yes
14913   ld_shlibs=yes
14914 else
14915   # OK - only NOW do we futz about with ld.
14916   # See if the linker supports building shared libraries.
14917   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14918 echo "configure:14919: checking whether the linker supports shared libraries" >&5
14919   dll_ld=$CC
14920   dll_ldflags=$LDFLAGS
14921   ld_shlibs=yes
14922   can_build_shared=yes
14923   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14924     # See if GNU ld supports shared libraries.
14925     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14926       dll_ld=$CC
14927       dll_ldflags="-shared"
14928       ld_shlibs=yes
14929     else
14930       ld_shlibs=no
14931     fi
14932   else
14933     # PORTME fill in a description of your system's linker (not GNU ld)
14934     case "$xehost_os" in
14935     aix3*)
14936       dll_ld=$LTLD
14937       dll_ldflags=$xldf
14938       ;;
14939
14940     aix[4-9]*)
14941       dll_ldflags=$xcldf
14942       ;;
14943
14944     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14945     # support.  Future versions do this automatically, but an explicit c++rt0.o
14946     # doesn't break anything, and helps significantly (at the cost of a little
14947     # extra space).
14948     freebsd2.2*)
14949       dll_ld=$LTLD
14950       dll_ldflags=$xldf
14951       dll_post="/usr/lib/c++rt0.o"
14952       ;;
14953
14954     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14955     freebsd2*)
14956       dll_ld=$LTLD
14957       dll_ldflags="-Bshareable"
14958       ;;
14959
14960     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14961     freebsd3*)
14962       dll_ldflags="-shared"
14963       ;;
14964
14965     hpux*)
14966       dll_ld=$LTLD
14967       dll_ldflags=$xldf
14968       ;;
14969
14970     irix[5-9]*)
14971       dll_ld=$LTLD
14972       dll_ldflags=$xldf
14973       ;;
14974
14975     netbsd*)
14976       # Tested with NetBSD 1.2 ld
14977       dll_ld=$LTLD
14978       dll_ldflags=$xldf
14979       ;;
14980
14981     openbsd*)
14982       dll_ld=$LTLD
14983       dll_ldflags=$xldf
14984       ;;
14985
14986     osf3* | osf4*)
14987       dll_ld=$LTLD
14988       dll_ldflags=$xldf
14989       ;;
14990
14991     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14992     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14993       dll_ld=$LTLD
14994       case "$dll_ld" in
14995         *gcc*) dll_ldflags="-shared"
14996                dll_ld=$CC
14997                ;;
14998         *)     dll_ldflags="-G"
14999                ;;
15000       esac
15001       ;;
15002
15003     sunos4*)
15004       if test "$XEGCC" = yes; then
15005         dll_ld=$CC
15006       else
15007         dll_ld=$LTLD
15008       fi
15009       dll_ldflags=$xldf
15010       ;;
15011
15012     uts4*)
15013       dll_ld=$LTLD
15014       dll_ldflags="-G"
15015       ;;
15016
15017     bsdi*)
15018       dll_ldflags="-r"
15019       dll_ld="shlicc2"
15020       ;;
15021
15022     *)
15023       ld_shlibs=no
15024       can_build_shared=no
15025       ;;
15026     esac
15027   fi
15028   echo "$ac_t""${ld_shlibs}" 1>&6
15029   if test "$ld_shlibs" = "no"; then
15030     can_build_shared=no
15031   fi
15032 fi # End of if cc_produces_so = no
15033
15034
15035 if test "$xe_gnu_ld" = yes; then
15036   if test "$ld_shlibs" = yes; then
15037     ld_dynamic_link_flags="${wl}-export-dynamic"
15038   fi
15039 fi
15040
15041 if test -z "$ld_dynamic_link_flags"; then
15042   case "$xehost_os" in
15043   aix[3-9]*)
15044     ld_dynamic_link_flags=
15045     ;;
15046
15047   freebsd2.2*)
15048     ld_dynamic_link_flags=
15049     ;;
15050
15051   freebsd2*)
15052     ld_dynamic_link_flags=
15053     ;;
15054
15055   freebsd3*)
15056     ld_dynamic_link_flags=
15057     ;;
15058
15059   hpux*)
15060     ld_dynamic_link_flags="${wl}-E"
15061     ;;
15062
15063   irix[5-9]*)
15064     ld_dynamic_link_flags=
15065     ;;
15066
15067   netbsd*)
15068     ld_dynamic_link_flags=
15069     ;;
15070
15071   openbsd*)
15072     ld_dynamic_link_flags=
15073     ;;
15074
15075   osf3* | osf4*)
15076     ld_dynamic_link_flags=
15077     ;;
15078
15079   solaris2* | solaris7*)
15080     ld_dynamic_link_flags=
15081     ;;
15082
15083   sco3.2v5* | unixware* | sysv5* | sysv4*)
15084     ld_dynamic_link_flags="${wl}-Bexport"
15085     ;;
15086
15087   sunos4*)
15088     ld_dynamic_link_flags=
15089     ;;
15090
15091   uts4*)
15092     ld_dynamic_link_flags=
15093     ;;
15094
15095   bsdi*)
15096     ld_dynamic_link_flags=
15097     ;;
15098
15099   esac
15100 fi # End of if -z ld_dynamic_link_flags
15101 fi # End of if test "$can_build_shared" = "yes"
15102
15103
15104
15105
15106
15107
15108
15109
15110   fi
15111
15112   if test "$can_build_shared" = "yes"; then
15113     { test "$extra_verbose" = "yes" && cat << \EOF
15114     Defining HAVE_SHLIB
15115 EOF
15116 cat >> confdefs.h <<\EOF
15117 #define HAVE_SHLIB 1
15118 EOF
15119 }
15120
15121     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15122    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15123  fi
15124     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15125     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15126     for ac_func in dlerror _dlerror
15127 do
15128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15129 echo "configure:15130: checking for $ac_func" >&5
15130
15131 cat > conftest.$ac_ext <<EOF
15132 #line 15133 "configure"
15133 #include "confdefs.h"
15134 /* System header to define __stub macros and hopefully few prototypes,
15135     which can conflict with char $ac_func(); below.  */
15136 #include <assert.h>
15137 /* Override any gcc2 internal prototype to avoid an error.  */
15138 /* We use char because int might match the return type of a gcc2
15139     builtin and then its argument prototype would still apply.  */
15140 char $ac_func();
15141
15142 int main() {
15143
15144 /* The GNU C library defines this for functions which it implements
15145     to always fail with ENOSYS.  Some functions are actually named
15146     something starting with __ and the normal name is an alias.  */
15147 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15148 choke me
15149 #else
15150 $ac_func();
15151 #endif
15152
15153 ; return 0; }
15154 EOF
15155 if { (eval echo configure:15156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15156   rm -rf conftest*
15157   eval "ac_cv_func_$ac_func=yes"
15158 else
15159   echo "configure: failed program was:" >&5
15160   cat conftest.$ac_ext >&5
15161   rm -rf conftest*
15162   eval "ac_cv_func_$ac_func=no"
15163 fi
15164 rm -f conftest*
15165
15166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15167   echo "$ac_t""yes" 1>&6
15168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15169   { test "$extra_verbose" = "yes" && cat << EOF
15170     Defining $ac_tr_func
15171 EOF
15172 cat >> confdefs.h <<EOF
15173 #define $ac_tr_func 1
15174 EOF
15175 }
15176  
15177 else
15178   echo "$ac_t""no" 1>&6
15179 fi
15180 done
15181
15182     with_modules=yes
15183   else
15184     if test "$with_modules" = "yes"; then
15185       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15186     else
15187       echo "configure: warning: "Module support cannot be provided."" 1>&2
15188     fi
15189     with_modules=no
15190   fi
15191 fi
15192
15193 cat > conftest.$ac_ext <<EOF
15194 #line 15195 "configure"
15195 #include "confdefs.h"
15196 int main(int c,char *v[]){return 0;}
15197 EOF
15198 if { (eval echo configure:15199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15199 then
15200   :
15201 else
15202   conftest_rc="$?"
15203   echo "configure: failed program was:" >&5
15204   cat conftest.$ac_ext >&5
15205   rm -fr conftest*
15206   
15207   echo ""
15208   echo "*** PANIC *** configure forgot how to build working executables!"
15209   echo ""
15210   echo "*** This is most commonly due to an unforeseen environment, causing"
15211   echo "*** configure to incorrectly compute the sequence of libraries to link."
15212   echo "*** Please examine the tail of config.log for runtime errors."
15213   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15214   echo "*** Often adding or removing explicit options in the configure"
15215   echo "*** invocation can work around this kind of problem.  If so, please"
15216   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15217   echo "***"
15218   echo "*** Other possible causes are inability to write to the file system"
15219   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15220   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15221   echo "*** necessary.  On other systems, try telling configure where to find"
15222   echo "*** the shared libraries using the --site-runtime-libraries option."
15223   echo "***"
15224   echo "*** Another way to shoot yourself in the foot is to specify"
15225   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15226   echo "*** system.  Don't do that."
15227   exit 1
15228 fi
15229 rm -fr conftest*
15230
15231 if test "$win32_processes" = "yes"; then
15232   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15233    echo "    xemacs will be linked with \"process-nt.o\""
15234  fi
15235 else
15236   { test "$extra_verbose" = "yes" && cat << \EOF
15237     Defining HAVE_UNIX_PROCESSES
15238 EOF
15239 cat >> confdefs.h <<\EOF
15240 #define HAVE_UNIX_PROCESSES 1
15241 EOF
15242 }
15243
15244   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15245    echo "    xemacs will be linked with \"process-unix.o\""
15246  fi
15247 fi
15248
15249
15250
15251 T=""
15252 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15253 CFLAGS="$T"
15254
15255
15256 T=""
15257 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15258 extra_objs="$T"
15259
15260
15261 T=""
15262 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
15263 c_switch_general="$T"
15264
15265
15266 T=""
15267 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
15268 c_switch_window_system="$T"
15269
15270
15271 T=""
15272 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15273 c_switch_all="$T"
15274
15275
15276 T=""
15277 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
15278 ld_switch_general="$T"
15279
15280
15281 T=""
15282 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15283 ld_switch_window_system="$T"
15284
15285
15286 T=""
15287 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15288 ld_switch_all="$T"
15289
15290
15291 T=""
15292 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15293 ld_libs_general="$T"
15294
15295
15296 T=""
15297 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
15298 ld_libs_window_system="$T"
15299
15300
15301 T=""
15302 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15303 ld_libs_all="$T"
15304
15305
15306
15307 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15308 internal_makefile_list="Makefile.in"
15309 SUBDIR_MAKEFILES=''
15310 test -d lock || mkdir lock
15311 for dir in $MAKE_SUBDIR; do
15312   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15313         test -d "$d" || mkdir "$d"; cd "$d"
15314       done ) ;;
15315    * ) test -d "$dir" || mkdir "$dir" ;;
15316   esac
15317   
15318 T=""
15319 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15320 SUBDIR_MAKEFILES="$T"
15321
15322   
15323 T=""
15324 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15325 internal_makefile_list="$T"
15326
15327 done
15328
15329
15330
15331
15332 for dir in src/s src/m; do
15333   if test ! -d "$dir" ; then
15334     echo Making symbolic link to "$srcdir/$dir"
15335     ${LN_S} "$srcdir/$dir" "$dir"
15336   fi
15337 done
15338
15339 if test "$extra_verbose" = "yes"; then
15340   echo ""
15341   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
15342   echo ""
15343 fi
15344
15345
15346 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15347   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15348   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15349 fi
15350
15351 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15352   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15353   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15354 fi
15355
15356 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15357   test "$extra_verbose" = "yes" && echo "creating TAGS"
15358   echo "\f
15359 $srcdir/TAGS,include" > "TAGS"
15360 fi
15361
15362 if test "$__SUNPRO_C" = "yes"; then
15363   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15364   ( echo "# For use with Sun WorkShop's Source browser."
15365     echo "# See sbquery(1) and sbinit(4) for more information"
15366     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15367   ) > .sbinit
15368 fi
15369
15370 rm -f core
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391 PREFIX=$prefix
15392 while true; do
15393   case "$PREFIX" in
15394     *\$* ) eval "PREFIX=$PREFIX" ;;
15395     *) break ;;
15396   esac
15397 done
15398
15399
15400
15401
15402 EXEC_PREFIX=$exec_prefix
15403 while true; do
15404   case "$EXEC_PREFIX" in
15405     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15406     *) break ;;
15407   esac
15408 done
15409
15410
15411
15412
15413 INFODIR=$infodir
15414 while true; do
15415   case "$INFODIR" in
15416     *\$* ) eval "INFODIR=$INFODIR" ;;
15417     *) break ;;
15418   esac
15419 done
15420
15421
15422
15423
15424 INFOPATH=$infopath
15425 while true; do
15426   case "$INFOPATH" in
15427     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15428     *) break ;;
15429   esac
15430 done
15431
15432
15433
15434
15435 PACKAGE_PATH=$package_path
15436 while true; do
15437   case "$PACKAGE_PATH" in
15438     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15439     *) break ;;
15440   esac
15441 done
15442
15443
15444
15445
15446 LISPDIR=$lispdir
15447 while true; do
15448   case "$LISPDIR" in
15449     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15450     *) break ;;
15451   esac
15452 done
15453
15454
15455
15456
15457 MODULEDIR=$moduledir
15458 while true; do
15459   case "$MODULEDIR" in
15460     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15461     *) break ;;
15462   esac
15463 done
15464
15465
15466
15467
15468 SITELISPDIR=$sitelispdir
15469 while true; do
15470   case "$SITELISPDIR" in
15471     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15472     *) break ;;
15473   esac
15474 done
15475
15476
15477
15478
15479 SITEMODULEDIR=$sitemoduledir
15480 while true; do
15481   case "$SITEMODULEDIR" in
15482     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15483     *) break ;;
15484   esac
15485 done
15486
15487
15488
15489
15490 ETCDIR=$etcdir
15491 while true; do
15492   case "$ETCDIR" in
15493     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15494     *) break ;;
15495   esac
15496 done
15497
15498
15499
15500
15501 DOCDIR=$docdir
15502 while true; do
15503   case "$DOCDIR" in
15504     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15505     *) break ;;
15506   esac
15507 done
15508
15509
15510
15511
15512 ARCHLIBDIR=$archlibdir
15513 while true; do
15514   case "$ARCHLIBDIR" in
15515     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15516     *) break ;;
15517   esac
15518 done
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15540
15541
15542
15543
15544
15545
15546
15547 : ${XEMACS_CC:=$CC}
15548
15549
15550 if test "$with_prefix" = "yes"; then
15551   { test "$extra_verbose" = "yes" && cat << \EOF
15552     Defining PREFIX_USER_DEFINED
15553 EOF
15554 cat >> confdefs.h <<\EOF
15555 #define PREFIX_USER_DEFINED 1
15556 EOF
15557 }
15558
15559 fi
15560
15561 if test "$with_site_lisp" = "no"; then
15562   { test "$extra_verbose" = "yes" && cat << \EOF
15563     Defining INHIBIT_SITE_LISP
15564 EOF
15565 cat >> confdefs.h <<\EOF
15566 #define INHIBIT_SITE_LISP 1
15567 EOF
15568 }
15569
15570 fi
15571 if test "$with_site_modules" = "no"; then
15572   { test "$extra_verbose" = "yes" && cat << \EOF
15573     Defining INHIBIT_SITE_MODULES
15574 EOF
15575 cat >> confdefs.h <<\EOF
15576 #define INHIBIT_SITE_MODULES 1
15577 EOF
15578 }
15579
15580 fi
15581
15582
15583 T=""
15584 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15585 ac_configure_args="$T"
15586
15587 { test "$extra_verbose" = "yes" && cat << EOF
15588     Defining EMACS_CONFIGURATION = "$configuration"
15589 EOF
15590 cat >> confdefs.h <<EOF
15591 #define EMACS_CONFIGURATION "$configuration"
15592 EOF
15593 }
15594
15595 { test "$extra_verbose" = "yes" && cat << EOF
15596     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15597 EOF
15598 cat >> confdefs.h <<EOF
15599 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15600 EOF
15601 }
15602
15603
15604
15605 null_string=""
15606 { test "$extra_verbose" = "yes" && cat << EOF
15607     Defining LD_SWITCH_X_SITE = $null_string
15608 EOF
15609 cat >> confdefs.h <<EOF
15610 #define LD_SWITCH_X_SITE $null_string
15611 EOF
15612 }
15613
15614 { test "$extra_verbose" = "yes" && cat << EOF
15615     Defining LD_SWITCH_X_SITE_AUX = $null_string
15616 EOF
15617 cat >> confdefs.h <<EOF
15618 #define LD_SWITCH_X_SITE_AUX $null_string
15619 EOF
15620 }
15621
15622 { test "$extra_verbose" = "yes" && cat << EOF
15623     Defining C_SWITCH_X_SITE = $null_string
15624 EOF
15625 cat >> confdefs.h <<EOF
15626 #define C_SWITCH_X_SITE $null_string
15627 EOF
15628 }
15629
15630 { test "$extra_verbose" = "yes" && cat << EOF
15631     Defining LD_SWITCH_SITE = $null_string
15632 EOF
15633 cat >> confdefs.h <<EOF
15634 #define LD_SWITCH_SITE $null_string
15635 EOF
15636 }
15637
15638 { test "$extra_verbose" = "yes" && cat << EOF
15639     Defining C_SWITCH_SITE = $null_string
15640 EOF
15641 cat >> confdefs.h <<EOF
15642 #define C_SWITCH_SITE $null_string
15643 EOF
15644 }
15645
15646
15647
15648 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15649     Defining GNU_MALLOC
15650 EOF
15651 cat >> confdefs.h <<\EOF
15652 #define GNU_MALLOC 1
15653 EOF
15654 }
15655
15656 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15657     Defining USE_SYSTEM_MALLOC
15658 EOF
15659 cat >> confdefs.h <<\EOF
15660 #define USE_SYSTEM_MALLOC 1
15661 EOF
15662 }
15663
15664 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15665     Defining USE_DEBUG_MALLOC
15666 EOF
15667 cat >> confdefs.h <<\EOF
15668 #define USE_DEBUG_MALLOC 1
15669 EOF
15670 }
15671
15672                                               { test "$extra_verbose" = "yes" && cat << \EOF
15673     Defining USE_SYSTEM_MALLOC
15674 EOF
15675 cat >> confdefs.h <<\EOF
15676 #define USE_SYSTEM_MALLOC 1
15677 EOF
15678 }
15679
15680 fi
15681 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15682     Defining I18N3
15683 EOF
15684 cat >> confdefs.h <<\EOF
15685 #define I18N3 1
15686 EOF
15687 }
15688
15689 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15690     Defining USE_GCC
15691 EOF
15692 cat >> confdefs.h <<\EOF
15693 #define USE_GCC 1
15694 EOF
15695 }
15696
15697 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15698     Defining EXTERNAL_WIDGET
15699 EOF
15700 cat >> confdefs.h <<\EOF
15701 #define EXTERNAL_WIDGET 1
15702 EOF
15703 }
15704
15705 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15706     Defining QUICK_BUILD
15707 EOF
15708 cat >> confdefs.h <<\EOF
15709 #define QUICK_BUILD 1
15710 EOF
15711 }
15712
15713 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15714     Defining PURIFY
15715 EOF
15716 cat >> confdefs.h <<\EOF
15717 #define PURIFY 1
15718 EOF
15719 }
15720
15721 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15722     Defining QUANTIFY
15723 EOF
15724 cat >> confdefs.h <<\EOF
15725 #define QUANTIFY 1
15726 EOF
15727 }
15728
15729 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15730     Defining MAIL_USE_POP
15731 EOF
15732 cat >> confdefs.h <<\EOF
15733 #define MAIL_USE_POP 1
15734 EOF
15735 }
15736
15737 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15738     Defining KERBEROS
15739 EOF
15740 cat >> confdefs.h <<\EOF
15741 #define KERBEROS 1
15742 EOF
15743 }
15744
15745 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15746     Defining HESIOD
15747 EOF
15748 cat >> confdefs.h <<\EOF
15749 #define HESIOD 1
15750 EOF
15751 }
15752
15753 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15754     Defining USE_UNION_TYPE
15755 EOF
15756 cat >> confdefs.h <<\EOF
15757 #define USE_UNION_TYPE 1
15758 EOF
15759 }
15760
15761 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15762     Defining PDUMP
15763 EOF
15764 cat >> confdefs.h <<\EOF
15765 #define PDUMP 1
15766 EOF
15767 }
15768
15769 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15770     Defining IPV6_CANONICALIZE
15771 EOF
15772 cat >> confdefs.h <<\EOF
15773 #define IPV6_CANONICALIZE 1
15774 EOF
15775 }
15776
15777
15778
15779 (
15780 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15781 else
15782   echo "uname -a: `uname -a`"
15783 fi
15784 echo ""
15785 echo "$0 $quoted_arguments"
15786 ) > Installation
15787
15788 if test ! -z ${emacs_beta_version} ; then
15789   if test -z "${emacs_is_beta}" ; then
15790         xemacs_betaname=".${emacs_beta_version}"
15791   else
15792         xemacs_betaname="-b${emacs_beta_version}"
15793   fi
15794 else
15795   xemacs_betaname=""
15796 fi
15797
15798 (
15799 echo "
15800
15801 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15802 "
15803 echo "
15804 Compilation / Installation:"
15805 echo "  Source code location:              $srcdir"
15806 echo "  Installation prefix:               $prefix"
15807 if test -n "$site_includes"; then
15808   echo "  Additional header files:           $site_includes"
15809 fi
15810 if test -n "$site_libraries"; then
15811   echo "  Additional libraries:              $site_libraries"
15812 fi
15813 if test -n "$site_prefixes"; then
15814   echo "  Additional prefixes:               $site_prefixes"
15815 fi
15816 if test -n "$runpath"; then
15817   echo "  Runtime library search path:       $runpath"
15818 fi
15819
15820 if test -n "$opsysfile"
15821 then echo "  Operating system description file: \`$opsysfile'"
15822 else echo "  Not using any operating system description file"
15823 fi
15824 if test -n "$machfile"
15825 then echo "  Machine description file:          \`$machfile'"
15826 else echo "  Not using any machine description file"
15827 fi
15828
15829 echo "  Compiler:                          $CC $CFLAGS"
15830 echo "  Relocating allocator for buffers:  $rel_alloc"
15831 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15832 case "$ld_switch_site" in
15833   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15834     - Consider configuring with --pdump." ;;
15835 esac
15836
15837 echo "
15838 Window System:"
15839 if test "$with_msw" = "yes"; then
15840   echo "  Compiling in support for the Microsoft window system."
15841 fi
15842 if test "$with_x11" = "yes"; then
15843   echo "  Compiling in support for the X window system:"
15844   echo "    - X Windows headers location:                 $x_includes"
15845   echo "    - X Windows libraries location:               $x_libraries"
15846   if test "$with_xauth" != yes; then
15847     echo "    - Xau (X authority) not available."
15848   fi
15849   if test "$with_xmu" != yes; then
15850     echo "    - Xmu library not available; substituting equivalent routines."
15851   fi
15852   if test "$with_wmcommand" != no; then
15853     echo "    - Handling WM_COMMAND properly."
15854   fi
15855 fi
15856 if test "$need_athena" = "yes"; then
15857   echo "  Compiling in support for the Athena widget set:"
15858   echo "    - Athena headers location:                    $athena_h_path"
15859   echo "    - Athena library to link:                     $athena_lib"
15860 fi
15861 case "$with_menubars" in
15862   gtk   ) echo "  Using GTK menubars."   ;;
15863   lucid ) echo "  Using Lucid menubars." ;;
15864   motif ) echo "  Using Motif menubars."
15865           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15866           echo "             We recommend using the Lucid menubar instead."
15867           echo "             Re-run configure with --with-menubars='lucid'." ;;
15868     msw ) echo "  Using MS-Windows menubars." ;;
15869 esac
15870 case "$with_scrollbars" in
15871   gtk    ) echo "  Using GTK scrollbars."        ;;
15872   lucid  ) echo "  Using Lucid scrollbars."      ;;
15873   motif  ) echo "  Using Motif scrollbars."      ;;
15874   athena ) echo "  Using Athena scrollbars."     ;;
15875      msw ) echo "  Using MS-Windows scrollbars." ;;
15876 esac
15877 case "$with_dialogs" in
15878   gtk    ) echo "  Using GTK dialog boxes." ;;
15879   motif  ) echo "  Using Motif dialog boxes."
15880            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15881              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15882              echo "             We recommend using the Athena dialog boxes instead."
15883              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15884              echo "             Read the PROBLEMS file for more information."
15885            fi; fi ;;
15886   athena ) echo "  Using Athena dialog boxes."     ;;
15887      msw ) echo "  Using MS-Windows dialog boxes." ;;
15888 esac
15889 case "$with_widgets" in
15890   gtk    ) echo "  Using GTK native widgets."        ;;
15891   motif  ) echo "  Using Motif native widgets."      ;;
15892   athena ) echo "  Using Athena native widgets."     ;;
15893      msw ) echo "  Using MS-Windows native widgets." ;;
15894 esac
15895 if test "$with_dragndrop" = yes; then
15896   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15897   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15898 fi
15899
15900 echo "
15901 TTY:"
15902 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15903 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15904
15905 echo "
15906 Images:"
15907 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15908 if test "$with_xpm" = yes; then
15909   echo "  Compiling in support for XPM  images."
15910 elif test "$with_x11" = yes; then
15911   echo "  WARNING: -----------------------------------------------------------"
15912   echo "  WARNING: Compiling without XPM image support."
15913   if test "$xpm_problem" != ""; then
15914     echo "  Reason: $xpm_problem"
15915   fi
15916   echo "  WARNING: You should strongly consider installing XPM."
15917   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15918   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15919   echo "  WARNING: -----------------------------------------------------------"
15920 fi
15921 if test "$with_png" = yes; then
15922   echo "  Compiling in support for PNG  images."
15923 elif test "$window_system" != "none"; then
15924   echo "  WARNING: -----------------------------------------------------------"
15925   echo "  WARNING: Compiling without PNG image support."
15926   if test "$png_problem" != ""; then
15927     echo "  Reason: $png_problem"
15928   fi
15929   echo "  WARNING: You should strongly consider installing the PNG libraries."
15930   echo "  WARNING: Otherwise certain images and glyphs may not display."
15931   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15932   echo "  WARNING: -----------------------------------------------------------"
15933 fi
15934 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15935 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15936 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15937
15938 echo "
15939 Sound:"
15940 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15941 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15942 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15943 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15944
15945 echo "
15946 Databases:"
15947 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15948 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15949 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15950 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15951 if test "$with_postgresql" = yes; then
15952   echo "  Compiling in support for PostgreSQL."
15953   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15954   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15955 fi
15956
15957 echo "
15958 Internationalization:"
15959 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15960 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15961 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15962 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15963 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15964 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15965 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15966 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15967 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15968 if test "$with_wnn" = yes; then
15969   echo "  Compiling in support for the WNN input method on Mule."
15970   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15971 fi
15972 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15973
15974 echo "
15975 Mail:"
15976 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15977 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15978 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15979 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15980
15981 echo "
15982 Other Features:"
15983 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15984 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15985 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15986 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15987 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15988 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15989 if test "$use_union_type" = yes; then
15990   echo "  WARNING: ---------------------------------------------------------"
15991   echo "  Using the union type for Lisp_Objects."
15992   echo "  Union type has been implicated in hard-to-debug runtime crashes."
15993   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
15994   echo "  WARNING: ---------------------------------------------------------"
15995 fi
15996 test "$pdump" = yes && echo "  Using the new portable dumper."
15997 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15998 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15999 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16000   != "no no no no no no"; then
16001   echo "  WARNING: ---------------------------------------------------------"
16002   echo "  WARNING: Compiling in support for runtime error checking."
16003   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16004   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16005   echo "  WARNING: ---------------------------------------------------------"
16006 fi
16007 echo ""
16008 ) | tee -a Installation
16009 echo ""
16010
16011
16012 # Remove any trailing slashes in these variables.
16013 test -n "$prefix" &&
16014   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16015 test -n "$exec_prefix" &&
16016   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16017
16018
16019 for file in $internal_makefile_list; do
16020   test "$file" = src/Makefile.in && \
16021     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16022   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16023 done
16024 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16025 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
16026
16027 trap '' 1 2 15
16028
16029 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16030
16031 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16032 # Let make expand exec_prefix.
16033 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16034
16035 # Any assignment to VPATH causes Sun make to only execute
16036 # the first set of double-colon rules, so remove it if not needed.
16037 # If there is a colon in the path, we need to keep it.
16038 if test "x$srcdir" = x.; then
16039   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16040 fi
16041
16042 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16043
16044 DEFS=-DHAVE_CONFIG_H
16045
16046 # Without the "./", some shells look in PATH for config.status.
16047 : ${CONFIG_STATUS=./config.status}
16048
16049 echo creating $CONFIG_STATUS
16050 rm -f $CONFIG_STATUS
16051 cat > $CONFIG_STATUS <<EOF
16052 #! /bin/sh
16053 # Generated automatically by configure.
16054 # Run this file to recreate the current configuration.
16055 # This directory was configured as follows,
16056 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16057 #
16058 # $0 $ac_configure_args
16059 #
16060 # Compiler output produced by configure, useful for debugging
16061 # configure, is in ./config.log if it exists.
16062
16063 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16064 for ac_option
16065 do
16066   case "\$ac_option" in
16067   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16068     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16069     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16070   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16071     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16072     exit 0 ;;
16073   -help | --help | --hel | --he | --h)
16074     echo "\$ac_cs_usage"; exit 0 ;;
16075   *) echo "\$ac_cs_usage"; exit 1 ;;
16076   esac
16077 done
16078
16079 ac_given_srcdir=$srcdir
16080 ac_given_INSTALL="$INSTALL"
16081
16082 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16083 EOF
16084 cat >> $CONFIG_STATUS <<EOF
16085
16086 # Protect against being on the right side of a sed subst in config.status.
16087 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16088  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16089 $ac_vpsub
16090 $extrasub
16091 s%@SHELL@%$SHELL%g
16092 s%@CFLAGS@%$CFLAGS%g
16093 s%@CPPFLAGS@%$CPPFLAGS%g
16094 s%@CXXFLAGS@%$CXXFLAGS%g
16095 s%@FFLAGS@%$FFLAGS%g
16096 s%@DEFS@%$DEFS%g
16097 s%@LDFLAGS@%$LDFLAGS%g
16098 s%@LIBS@%$LIBS%g
16099 s%@exec_prefix@%$exec_prefix%g
16100 s%@prefix@%$prefix%g
16101 s%@program_transform_name@%$program_transform_name%g
16102 s%@bindir@%$bindir%g
16103 s%@sbindir@%$sbindir%g
16104 s%@libexecdir@%$libexecdir%g
16105 s%@datadir@%$datadir%g
16106 s%@sysconfdir@%$sysconfdir%g
16107 s%@sharedstatedir@%$sharedstatedir%g
16108 s%@localstatedir@%$localstatedir%g
16109 s%@libdir@%$libdir%g
16110 s%@includedir@%$includedir%g
16111 s%@oldincludedir@%$oldincludedir%g
16112 s%@infodir@%$infodir%g
16113 s%@mandir@%$mandir%g
16114 s%@LN_S@%$LN_S%g
16115 s%@blddir@%$blddir%g
16116 s%@CC@%$CC%g
16117 s%@CPP@%$CPP%g
16118 s%@start_flags@%$start_flags%g
16119 s%@ld_switch_shared@%$ld_switch_shared%g
16120 s%@start_files@%$start_files%g
16121 s%@ld@%$ld%g
16122 s%@lib_gcc@%$lib_gcc%g
16123 s%@RANLIB@%$RANLIB%g
16124 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16125 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16126 s%@INSTALL_DATA@%$INSTALL_DATA%g
16127 s%@YACC@%$YACC%g
16128 s%@SET_MAKE@%$SET_MAKE%g
16129 s%@GTK_CONFIG@%$GTK_CONFIG%g
16130 s%@X_CFLAGS@%$X_CFLAGS%g
16131 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16132 s%@X_LIBS@%$X_LIBS%g
16133 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16134 s%@install_pp@%$install_pp%g
16135 s%@libs_xauth@%$libs_xauth%g
16136 s%@dnd_objs@%$dnd_objs%g
16137 s%@lwlib_objs@%$lwlib_objs%g
16138 s%@ALLOCA@%$ALLOCA%g
16139 s%@have_esd_config@%$have_esd_config%g
16140 s%@dll_ld@%$dll_ld%g
16141 s%@dll_cflags@%$dll_cflags%g
16142 s%@dll_ldflags@%$dll_ldflags%g
16143 s%@dll_post@%$dll_post%g
16144 s%@dll_ldo@%$dll_ldo%g
16145 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16146 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16147 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16148 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16149 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16150 s%@PROGNAME@%$PROGNAME%g
16151 s%@version@%$version%g
16152 s%@configuration@%$configuration%g
16153 s%@canonical@%$canonical%g
16154 s%@inststaticdir@%$inststaticdir%g
16155 s%@instvardir@%$instvardir%g
16156 s%@srcdir@%$srcdir%g
16157 s%@pkgdir@%$pkgdir%g
16158 s%@statedir@%$statedir%g
16159 s%@extra_includes@%$extra_includes%g
16160 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16161 s%@PREFIX@%$PREFIX%g
16162 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16163 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16164 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16165 s%@INFODIR@%$INFODIR%g
16166 s%@infopath@%$infopath%g
16167 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16168 s%@INFOPATH@%$INFOPATH%g
16169 s%@package_path@%$package_path%g
16170 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16171 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16172 s%@lispdir@%$lispdir%g
16173 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16174 s%@LISPDIR@%$LISPDIR%g
16175 s%@moduledir@%$moduledir%g
16176 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16177 s%@MODULEDIR@%$MODULEDIR%g
16178 s%@sitelispdir@%$sitelispdir%g
16179 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16180 s%@SITELISPDIR@%$SITELISPDIR%g
16181 s%@sitemoduledir@%$sitemoduledir%g
16182 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16183 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16184 s%@etcdir@%$etcdir%g
16185 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16186 s%@ETCDIR@%$ETCDIR%g
16187 s%@docdir@%$docdir%g
16188 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16189 s%@DOCDIR@%$DOCDIR%g
16190 s%@archlibdir@%$archlibdir%g
16191 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16192 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16193 s%@bitmapdir@%$bitmapdir%g
16194 s%@extra_objs@%$extra_objs%g
16195 s%@machfile@%$machfile%g
16196 s%@opsysfile@%$opsysfile%g
16197 s%@c_switch_general@%$c_switch_general%g
16198 s%@c_switch_window_system@%$c_switch_window_system%g
16199 s%@c_switch_all@%$c_switch_all%g
16200 s%@ld_switch_general@%$ld_switch_general%g
16201 s%@ld_switch_window_system@%$ld_switch_window_system%g
16202 s%@ld_switch_all@%$ld_switch_all%g
16203 s%@ld_libs_general@%$ld_libs_general%g
16204 s%@ld_libs_window_system@%$ld_libs_window_system%g
16205 s%@ld_libs_all@%$ld_libs_all%g
16206 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16207 s%@native_sound_lib@%$native_sound_lib%g
16208 s%@sound_cflags@%$sound_cflags%g
16209 s%@dynodump_arch@%$dynodump_arch%g
16210 s%@XEMACS_CC@%$XEMACS_CC%g
16211 s%@internal_makefile_list@%$internal_makefile_list%g
16212
16213 CEOF
16214 EOF
16215
16216 cat >> $CONFIG_STATUS <<\EOF
16217
16218 # Split the substitutions into bite-sized pieces for seds with
16219 # small command number limits, like on Digital OSF/1 and HP-UX.
16220 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16221 ac_file=1 # Number of current file.
16222 ac_beg=1 # First line for current file.
16223 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16224 ac_more_lines=:
16225 ac_sed_cmds=""
16226 while $ac_more_lines; do
16227   if test $ac_beg -gt 1; then
16228     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16229   else
16230     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16231   fi
16232   if test ! -s conftest.s$ac_file; then
16233     ac_more_lines=false
16234     rm -f conftest.s$ac_file
16235   else
16236     if test -z "$ac_sed_cmds"; then
16237       ac_sed_cmds="sed -f conftest.s$ac_file"
16238     else
16239       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16240     fi
16241     ac_file=`expr $ac_file + 1`
16242     ac_beg=$ac_end
16243     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16244   fi
16245 done
16246 if test -z "$ac_sed_cmds"; then
16247   ac_sed_cmds=cat
16248 fi
16249 EOF
16250
16251 cat >> $CONFIG_STATUS <<EOF
16252
16253 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16254 EOF
16255 cat >> $CONFIG_STATUS <<\EOF
16256 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16257   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16258   case "$ac_file" in
16259   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16260        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16261   *) ac_file_in="${ac_file}.in" ;;
16262   esac
16263
16264   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16265
16266   # Remove last slash and all that follows it.  Not all systems have dirname.
16267   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16268   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16269     # The file is in a subdirectory.
16270     test ! -d "$ac_dir" && mkdir "$ac_dir"
16271     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16272     # A "../" for each directory in $ac_dir_suffix.
16273     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16274   else
16275     ac_dir_suffix= ac_dots=
16276   fi
16277
16278   case "$ac_given_srcdir" in
16279   .)  srcdir=.
16280       if test -z "$ac_dots"; then top_srcdir=.
16281       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16282   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16283   *) # Relative path.
16284     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16285     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16286   esac
16287
16288   case "$ac_given_INSTALL" in
16289   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16290   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16291   esac
16292
16293   echo creating "$ac_file"
16294   rm -f "$ac_file"
16295   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16296   case "$ac_file" in
16297   *Makefile*) ac_comsub="1i\\
16298 # $configure_input" ;;
16299   *) ac_comsub= ;;
16300   esac
16301
16302   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16303   sed -e "$ac_comsub
16304 s%@configure_input@%$configure_input%g
16305 s%@srcdir@%$srcdir%g
16306 s%@top_srcdir@%$top_srcdir%g
16307 s%@INSTALL@%$INSTALL%g
16308 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16309 fi; done
16310 rm -f conftest.s*
16311
16312 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16313 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16314 #
16315 # ac_d sets the value in "#define NAME VALUE" lines.
16316 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16317 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16318 ac_dC='\3'
16319 ac_dD='%g'
16320 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16321 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16322 ac_uB='\([      ]\)%\1#\2define\3'
16323 ac_uC=' '
16324 ac_uD='\4%g'
16325 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16326 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16327 ac_eB='$%\1#\2define\3'
16328 ac_eC=' '
16329 ac_eD='%g'
16330
16331 if test "${CONFIG_HEADERS+set}" != set; then
16332 EOF
16333 cat >> $CONFIG_STATUS <<EOF
16334   CONFIG_HEADERS="src/config.h lwlib/config.h"
16335 EOF
16336 cat >> $CONFIG_STATUS <<\EOF
16337 fi
16338 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16339   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16340   case "$ac_file" in
16341   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16342        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16343   *) ac_file_in="${ac_file}.in" ;;
16344   esac
16345
16346   echo creating $ac_file
16347
16348   rm -f conftest.frag conftest.in conftest.out
16349   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16350   cat $ac_file_inputs > conftest.in
16351
16352 EOF
16353
16354 # Transform confdefs.h into a sed script conftest.vals that substitutes
16355 # the proper values into config.h.in to produce config.h.  And first:
16356 # Protect against being on the right side of a sed subst in config.status.
16357 # Protect against being in an unquoted here document in config.status.
16358 rm -f conftest.vals
16359 cat > conftest.hdr <<\EOF
16360 s/[\\&%]/\\&/g
16361 s%[\\$`]%\\&%g
16362 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16363 s%ac_d%ac_u%gp
16364 s%ac_u%ac_e%gp
16365 EOF
16366 sed -n -f conftest.hdr confdefs.h > conftest.vals
16367 rm -f conftest.hdr
16368
16369 # This sed command replaces #undef with comments.  This is necessary, for
16370 # example, in the case of _POSIX_SOURCE, which is predefined and required
16371 # on some systems where configure will not decide to define it.
16372 cat >> conftest.vals <<\EOF
16373 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16374 EOF
16375
16376 # Break up conftest.vals because some shells have a limit on
16377 # the size of here documents, and old seds have small limits too.
16378
16379 rm -f conftest.tail
16380 while :
16381 do
16382   ac_lines=`grep -c . conftest.vals`
16383   # grep -c gives empty output for an empty file on some AIX systems.
16384   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16385   # Write a limited-size here document to conftest.frag.
16386   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16387   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16388   echo 'CEOF
16389   sed -f conftest.frag conftest.in > conftest.out
16390   rm -f conftest.in
16391   mv conftest.out conftest.in
16392 ' >> $CONFIG_STATUS
16393   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16394   rm -f conftest.vals
16395   mv conftest.tail conftest.vals
16396 done
16397 rm -f conftest.vals
16398
16399 cat >> $CONFIG_STATUS <<\EOF
16400   rm -f conftest.frag conftest.h
16401   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16402   cat conftest.in >> conftest.h
16403   rm -f conftest.in
16404   if cmp -s $ac_file conftest.h 2>/dev/null; then
16405     echo "$ac_file is unchanged"
16406     rm -f conftest.h
16407   else
16408     # Remove last slash and all that follows it.  Not all systems have dirname.
16409       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16410       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16411       # The file is in a subdirectory.
16412       test ! -d "$ac_dir" && mkdir "$ac_dir"
16413     fi
16414     rm -f $ac_file
16415     mv conftest.h $ac_file
16416   fi
16417 fi; done
16418
16419 EOF
16420 cat >> $CONFIG_STATUS <<EOF
16421 CPP="$CPP"
16422  top_srcdir="$srcdir"
16423  MAKE_SUBDIR="$MAKE_SUBDIR"
16424
16425 EOF
16426 cat >> $CONFIG_STATUS <<\EOF
16427 for dir in . $MAKE_SUBDIR; do
16428   (
16429     cd $dir
16430     rm -f junk.c
16431     < Makefile.in \
16432       sed -e '/^# Generated/d' \
16433           -e 's%/\*\*/#.*%%' \
16434           -e 's/^ *# */#/' \
16435           -e '/^##/d' \
16436           -e '/^#/ {
16437 p
16438 d
16439 }'        \
16440           -e '/./ {
16441 s/\([\"]\)/\\\1/g
16442 s/^/"/
16443 s/$/"/
16444 }'  > junk.c;
16445
16446
16447
16448     echo creating $dir/Makefile
16449 $CPP -I. -I${top_srcdir}/src  junk.c \
16450   | sed -e 's/^\#.*//'          \
16451         -e 's/^[        ][      ]*$//'\
16452         -e 's/^ /       /'              \
16453         -e '/^[ \f]*$/d' \
16454         -e '/^\"/ {
16455         s/\\\([\"]\)/\1/g
16456         s/^[    ]*\"//
16457         s/\"[   ]*$//
16458 }' > Makefile.new
16459     chmod 444 Makefile.new
16460     mv -f Makefile.new Makefile
16461
16462     echo creating $dir/GNUmakefile
16463 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16464   | sed -e 's/^\#.*//'          \
16465         -e 's/^[        ][      ]*$//'\
16466         -e 's/^ /       /'              \
16467         -e '/^[ \f]*$/d' \
16468         -e '/^\"/ {
16469         s/\\\([\"]\)/\1/g
16470         s/^[    ]*\"//
16471         s/\"[   ]*$//
16472 }' > Makefile.new
16473     chmod 444 Makefile.new
16474     mv -f Makefile.new GNUmakefile
16475
16476     rm -f junk.c
16477   )
16478 done
16479
16480 sed < config.status >> lib-src/config.values \
16481   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16482   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16483   -e 's/^\([^ ]*\) $/\1 ""/' \
16484   -e 's/ 1$/ t/'
16485
16486
16487 exit 0
16488 EOF
16489 chmod +x $CONFIG_STATUS
16490 rm -fr confdefs* $ac_clean_files
16491 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1