(ideograph-daikanwa-2): New coded-charsets when `utf-2000' is provided
[chise/xemacs-chise.git-] / 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="no"
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"     pdump=yes              ;;
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 "$dynamic"; then
1553   case "$opsys" in
1554     hpux* | sunos4* ) dynamic=no ;;
1555     *) dynamic=yes ;;
1556   esac
1557 fi
1558 if test "$dynamic" = "yes"; then
1559   case "$opsys" in
1560     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1561     decosf* ) ld_call_shared="-call_shared" ;;
1562   esac
1563 else   case "$opsys" in
1564     sol2 )
1565       echo "Static linking is not supported on Solaris 2."
1566       echo "Rerun configure without specifying --dynamic=no."
1567       exit 1 ;;
1568     linux   ) ld_call_shared="-Bstatic" ;;
1569     decosf* ) ld_call_shared="-non_shared" ;;
1570   esac
1571 fi
1572
1573 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1574
1575 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1576 { test "$extra_verbose" = "yes" && cat << EOF
1577     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1578 EOF
1579 cat >> confdefs.h <<EOF
1580 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1581 EOF
1582 }
1583
1584
1585
1586 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1587 if test "$with_workshop $with_tooltalk" = "yes no"; then
1588   (echo "$progname: Usage error:"
1589 echo " " "--with-workshop requires --with-tooltalk"
1590 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1591 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1592 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1593 fi
1594
1595 if test "$with_workshop" = "yes"; then
1596   { test "$extra_verbose" = "yes" && cat << \EOF
1597     Defining SUNPRO
1598 EOF
1599 cat >> confdefs.h <<\EOF
1600 #define SUNPRO 1
1601 EOF
1602 }
1603
1604   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1605    echo "    xemacs will be linked with \"sunpro.o\""
1606  fi
1607 fi
1608
1609 if test "$with_clash_detection" != "no"; then
1610   { test "$extra_verbose" = "yes" && cat << \EOF
1611     Defining CLASH_DETECTION
1612 EOF
1613 cat >> confdefs.h <<\EOF
1614 #define CLASH_DETECTION 1
1615 EOF
1616 }
1617
1618   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1619    echo "    xemacs will be linked with \"filelock.o\""
1620  fi
1621 fi
1622
1623 test -n "$compiler" && CC="$compiler"
1624 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1625 fi
1626
1627 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1628 if test "${CFLAGS-unset}" != unset
1629   then cflags_specified=yes;
1630   else cflags_specified=no;
1631 fi
1632
1633 xe_save_CFLAGS="$CFLAGS"
1634
1635 # Extract the first word of "gcc", so it can be a program name with args.
1636 set dummy gcc; ac_word=$2
1637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1638 echo "configure:1639: checking for $ac_word" >&5
1639
1640 if test -n "$CC"; then
1641   ac_cv_prog_CC="$CC" # Let the user override the test.
1642 else
1643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1644   ac_dummy="$PATH"
1645   for ac_dir in $ac_dummy; do
1646     test -z "$ac_dir" && ac_dir=.
1647     if test -f $ac_dir/$ac_word; then
1648       ac_cv_prog_CC="gcc"
1649       break
1650     fi
1651   done
1652   IFS="$ac_save_ifs"
1653 fi
1654 CC="$ac_cv_prog_CC"
1655 if test -n "$CC"; then
1656   echo "$ac_t""$CC" 1>&6
1657 else
1658   echo "$ac_t""no" 1>&6
1659 fi
1660
1661 if test -z "$CC"; then
1662   # Extract the first word of "cc", so it can be a program name with args.
1663 set dummy cc; ac_word=$2
1664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1665 echo "configure:1666: checking for $ac_word" >&5
1666
1667 if test -n "$CC"; then
1668   ac_cv_prog_CC="$CC" # Let the user override the test.
1669 else
1670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1671   ac_prog_rejected=no
1672   ac_dummy="$PATH"
1673   for ac_dir in $ac_dummy; do
1674     test -z "$ac_dir" && ac_dir=.
1675     if test -f $ac_dir/$ac_word; then
1676       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1677         ac_prog_rejected=yes
1678         continue
1679       fi
1680       ac_cv_prog_CC="cc"
1681       break
1682     fi
1683   done
1684   IFS="$ac_save_ifs"
1685 if test $ac_prog_rejected = yes; then
1686   # We found a bogon in the path, so make sure we never use it.
1687   set dummy $ac_cv_prog_CC
1688   shift
1689   if test $# -gt 0; then
1690     # We chose a different compiler from the bogus one.
1691     # However, it has the same basename, so the bogon will be chosen
1692     # first if we set CC to just the basename; use the full file name.
1693     shift
1694     set dummy "$ac_dir/$ac_word" "$@"
1695     shift
1696     ac_cv_prog_CC="$@"
1697   fi
1698 fi
1699 fi
1700 CC="$ac_cv_prog_CC"
1701 if test -n "$CC"; then
1702   echo "$ac_t""$CC" 1>&6
1703 else
1704   echo "$ac_t""no" 1>&6
1705 fi
1706
1707   if test -z "$CC"; then
1708     case "`uname -s`" in
1709     *win32* | *WIN32*)
1710       # Extract the first word of "cl", so it can be a program name with args.
1711 set dummy cl; ac_word=$2
1712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1713 echo "configure:1714: checking for $ac_word" >&5
1714
1715 if test -n "$CC"; then
1716   ac_cv_prog_CC="$CC" # Let the user override the test.
1717 else
1718   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1719   ac_dummy="$PATH"
1720   for ac_dir in $ac_dummy; do
1721     test -z "$ac_dir" && ac_dir=.
1722     if test -f $ac_dir/$ac_word; then
1723       ac_cv_prog_CC="cl"
1724       break
1725     fi
1726   done
1727   IFS="$ac_save_ifs"
1728 fi
1729 CC="$ac_cv_prog_CC"
1730 if test -n "$CC"; then
1731   echo "$ac_t""$CC" 1>&6
1732 else
1733   echo "$ac_t""no" 1>&6
1734 fi
1735  ;;
1736     esac
1737   fi
1738   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1739 fi
1740
1741 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1742 echo "configure:1743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1743
1744 ac_ext=c
1745 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1746 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1747 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'
1748 ac_cpp='$CPP '"$xe_cppflags"
1749 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1750 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1751 cross_compiling=no
1752
1753 cat > conftest.$ac_ext << EOF
1754
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757
1758 main(){return(0);}
1759 EOF
1760 if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1761   ac_cv_prog_cc_works=yes
1762   # If we can't run a trivial program, we are probably using a cross compiler.
1763   if (./conftest; exit) 2>/dev/null; then
1764     ac_cv_prog_cc_cross=no
1765   else
1766     ac_cv_prog_cc_cross=yes
1767   fi
1768 else
1769   echo "configure: failed program was:" >&5
1770   cat conftest.$ac_ext >&5
1771   ac_cv_prog_cc_works=no
1772 fi
1773 rm -fr conftest*
1774 ac_ext=c
1775 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1776 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1777 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'
1778 ac_cpp='$CPP '"$xe_cppflags"
1779 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1780 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1781 cross_compiling=no
1782
1783 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1784 if test $ac_cv_prog_cc_works = no; then
1785   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1786 fi
1787 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1788 echo "configure:1789: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1789 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1790 cross_compiling=$ac_cv_prog_cc_cross
1791
1792 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1793 echo "configure:1794: checking whether we are using GNU C" >&5
1794
1795 cat > conftest.c <<EOF
1796 #ifdef __GNUC__
1797   yes;
1798 #endif
1799 EOF
1800 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1801   ac_cv_prog_gcc=yes
1802 else
1803   ac_cv_prog_gcc=no
1804 fi
1805
1806 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1807
1808 if test $ac_cv_prog_gcc = yes; then
1809   GCC=yes
1810 else
1811   GCC=
1812 fi
1813
1814 ac_test_CFLAGS="${CFLAGS+set}"
1815 ac_save_CFLAGS="$CFLAGS"
1816 CFLAGS=
1817 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1818 echo "configure:1819: checking whether ${CC-cc} accepts -g" >&5
1819
1820 echo 'void f(){}' > conftest.c
1821 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1822   ac_cv_prog_cc_g=yes
1823 else
1824   ac_cv_prog_cc_g=no
1825 fi
1826 rm -f conftest*
1827
1828
1829 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1830 if test "$ac_test_CFLAGS" = set; then
1831   CFLAGS="$ac_save_CFLAGS"
1832 elif test $ac_cv_prog_cc_g = yes; then
1833   if test "$GCC" = yes; then
1834     CFLAGS="-g -O2"
1835   else
1836     CFLAGS="-g"
1837   fi
1838 else
1839   if test "$GCC" = yes; then
1840     CFLAGS="-O2"
1841   else
1842     CFLAGS=
1843   fi
1844 fi
1845  
1846 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1847   CC=${NON_GNU_CC-cc}
1848   # Extract the first word of "gcc", so it can be a program name with args.
1849 set dummy gcc; ac_word=$2
1850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1851 echo "configure:1852: checking for $ac_word" >&5
1852
1853 if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="gcc"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 CC="$ac_cv_prog_CC"
1868 if test -n "$CC"; then
1869   echo "$ac_t""$CC" 1>&6
1870 else
1871   echo "$ac_t""no" 1>&6
1872 fi
1873
1874 if test -z "$CC"; then
1875   # Extract the first word of "cc", so it can be a program name with args.
1876 set dummy cc; ac_word=$2
1877 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1878 echo "configure:1879: checking for $ac_word" >&5
1879
1880 if test -n "$CC"; then
1881   ac_cv_prog_CC="$CC" # Let the user override the test.
1882 else
1883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1884   ac_prog_rejected=no
1885   ac_dummy="$PATH"
1886   for ac_dir in $ac_dummy; do
1887     test -z "$ac_dir" && ac_dir=.
1888     if test -f $ac_dir/$ac_word; then
1889       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1890         ac_prog_rejected=yes
1891         continue
1892       fi
1893       ac_cv_prog_CC="cc"
1894       break
1895     fi
1896   done
1897   IFS="$ac_save_ifs"
1898 if test $ac_prog_rejected = yes; then
1899   # We found a bogon in the path, so make sure we never use it.
1900   set dummy $ac_cv_prog_CC
1901   shift
1902   if test $# -gt 0; then
1903     # We chose a different compiler from the bogus one.
1904     # However, it has the same basename, so the bogon will be chosen
1905     # first if we set CC to just the basename; use the full file name.
1906     shift
1907     set dummy "$ac_dir/$ac_word" "$@"
1908     shift
1909     ac_cv_prog_CC="$@"
1910   fi
1911 fi
1912 fi
1913 CC="$ac_cv_prog_CC"
1914 if test -n "$CC"; then
1915   echo "$ac_t""$CC" 1>&6
1916 else
1917   echo "$ac_t""no" 1>&6
1918 fi
1919
1920   if test -z "$CC"; then
1921     case "`uname -s`" in
1922     *win32* | *WIN32*)
1923       # Extract the first word of "cl", so it can be a program name with args.
1924 set dummy cl; ac_word=$2
1925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1926 echo "configure:1927: checking for $ac_word" >&5
1927
1928 if test -n "$CC"; then
1929   ac_cv_prog_CC="$CC" # Let the user override the test.
1930 else
1931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1932   ac_dummy="$PATH"
1933   for ac_dir in $ac_dummy; do
1934     test -z "$ac_dir" && ac_dir=.
1935     if test -f $ac_dir/$ac_word; then
1936       ac_cv_prog_CC="cl"
1937       break
1938     fi
1939   done
1940   IFS="$ac_save_ifs"
1941 fi
1942 CC="$ac_cv_prog_CC"
1943 if test -n "$CC"; then
1944   echo "$ac_t""$CC" 1>&6
1945 else
1946   echo "$ac_t""no" 1>&6
1947 fi
1948  ;;
1949     esac
1950   fi
1951   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1952 fi
1953
1954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1955 echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1956
1957 ac_ext=c
1958 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1959 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1960 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'
1961 ac_cpp='$CPP '"$xe_cppflags"
1962 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1963 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1964 cross_compiling=no
1965
1966 cat > conftest.$ac_ext << EOF
1967
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970
1971 main(){return(0);}
1972 EOF
1973 if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1974   ac_cv_prog_cc_works=yes
1975   # If we can't run a trivial program, we are probably using a cross compiler.
1976   if (./conftest; exit) 2>/dev/null; then
1977     ac_cv_prog_cc_cross=no
1978   else
1979     ac_cv_prog_cc_cross=yes
1980   fi
1981 else
1982   echo "configure: failed program was:" >&5
1983   cat conftest.$ac_ext >&5
1984   ac_cv_prog_cc_works=no
1985 fi
1986 rm -fr conftest*
1987 ac_ext=c
1988 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1989 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1990 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'
1991 ac_cpp='$CPP '"$xe_cppflags"
1992 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1993 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1994 cross_compiling=no
1995
1996 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1997 if test $ac_cv_prog_cc_works = no; then
1998   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1999 fi
2000 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2002 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2003 cross_compiling=$ac_cv_prog_cc_cross
2004
2005 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2006 echo "configure:2007: checking whether we are using GNU C" >&5
2007
2008 cat > conftest.c <<EOF
2009 #ifdef __GNUC__
2010   yes;
2011 #endif
2012 EOF
2013 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2014   ac_cv_prog_gcc=yes
2015 else
2016   ac_cv_prog_gcc=no
2017 fi
2018
2019 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2020
2021 if test $ac_cv_prog_gcc = yes; then
2022   GCC=yes
2023 else
2024   GCC=
2025 fi
2026
2027 ac_test_CFLAGS="${CFLAGS+set}"
2028 ac_save_CFLAGS="$CFLAGS"
2029 CFLAGS=
2030 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2031 echo "configure:2032: checking whether ${CC-cc} accepts -g" >&5
2032
2033 echo 'void f(){}' > conftest.c
2034 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2035   ac_cv_prog_cc_g=yes
2036 else
2037   ac_cv_prog_cc_g=no
2038 fi
2039 rm -f conftest*
2040
2041
2042 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2043 if test "$ac_test_CFLAGS" = set; then
2044   CFLAGS="$ac_save_CFLAGS"
2045 elif test $ac_cv_prog_cc_g = yes; then
2046   if test "$GCC" = yes; then
2047     CFLAGS="-g -O2"
2048   else
2049     CFLAGS="-g"
2050   fi
2051 else
2052   if test "$GCC" = yes; then
2053     CFLAGS="-O2"
2054   else
2055     CFLAGS=
2056   fi
2057 fi
2058
2059 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2060   CC=gcc
2061   # Extract the first word of "gcc", so it can be a program name with args.
2062 set dummy gcc; ac_word=$2
2063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2064 echo "configure:2065: checking for $ac_word" >&5
2065
2066 if test -n "$CC"; then
2067   ac_cv_prog_CC="$CC" # Let the user override the test.
2068 else
2069   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2070   ac_dummy="$PATH"
2071   for ac_dir in $ac_dummy; do
2072     test -z "$ac_dir" && ac_dir=.
2073     if test -f $ac_dir/$ac_word; then
2074       ac_cv_prog_CC="gcc"
2075       break
2076     fi
2077   done
2078   IFS="$ac_save_ifs"
2079 fi
2080 CC="$ac_cv_prog_CC"
2081 if test -n "$CC"; then
2082   echo "$ac_t""$CC" 1>&6
2083 else
2084   echo "$ac_t""no" 1>&6
2085 fi
2086
2087 if test -z "$CC"; then
2088   # Extract the first word of "cc", so it can be a program name with args.
2089 set dummy cc; ac_word=$2
2090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2091 echo "configure:2092: checking for $ac_word" >&5
2092
2093 if test -n "$CC"; then
2094   ac_cv_prog_CC="$CC" # Let the user override the test.
2095 else
2096   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2097   ac_prog_rejected=no
2098   ac_dummy="$PATH"
2099   for ac_dir in $ac_dummy; do
2100     test -z "$ac_dir" && ac_dir=.
2101     if test -f $ac_dir/$ac_word; then
2102       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2103         ac_prog_rejected=yes
2104         continue
2105       fi
2106       ac_cv_prog_CC="cc"
2107       break
2108     fi
2109   done
2110   IFS="$ac_save_ifs"
2111 if test $ac_prog_rejected = yes; then
2112   # We found a bogon in the path, so make sure we never use it.
2113   set dummy $ac_cv_prog_CC
2114   shift
2115   if test $# -gt 0; then
2116     # We chose a different compiler from the bogus one.
2117     # However, it has the same basename, so the bogon will be chosen
2118     # first if we set CC to just the basename; use the full file name.
2119     shift
2120     set dummy "$ac_dir/$ac_word" "$@"
2121     shift
2122     ac_cv_prog_CC="$@"
2123   fi
2124 fi
2125 fi
2126 CC="$ac_cv_prog_CC"
2127 if test -n "$CC"; then
2128   echo "$ac_t""$CC" 1>&6
2129 else
2130   echo "$ac_t""no" 1>&6
2131 fi
2132
2133   if test -z "$CC"; then
2134     case "`uname -s`" in
2135     *win32* | *WIN32*)
2136       # Extract the first word of "cl", so it can be a program name with args.
2137 set dummy cl; ac_word=$2
2138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2139 echo "configure:2140: checking for $ac_word" >&5
2140
2141 if test -n "$CC"; then
2142   ac_cv_prog_CC="$CC" # Let the user override the test.
2143 else
2144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2145   ac_dummy="$PATH"
2146   for ac_dir in $ac_dummy; do
2147     test -z "$ac_dir" && ac_dir=.
2148     if test -f $ac_dir/$ac_word; then
2149       ac_cv_prog_CC="cl"
2150       break
2151     fi
2152   done
2153   IFS="$ac_save_ifs"
2154 fi
2155 CC="$ac_cv_prog_CC"
2156 if test -n "$CC"; then
2157   echo "$ac_t""$CC" 1>&6
2158 else
2159   echo "$ac_t""no" 1>&6
2160 fi
2161  ;;
2162     esac
2163   fi
2164   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2165 fi
2166
2167 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2168 echo "configure:2169: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2169
2170 ac_ext=c
2171 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2172 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2173 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'
2174 ac_cpp='$CPP '"$xe_cppflags"
2175 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2176 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2177 cross_compiling=no
2178
2179 cat > conftest.$ac_ext << EOF
2180
2181 #line 2182 "configure"
2182 #include "confdefs.h"
2183
2184 main(){return(0);}
2185 EOF
2186 if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2187   ac_cv_prog_cc_works=yes
2188   # If we can't run a trivial program, we are probably using a cross compiler.
2189   if (./conftest; exit) 2>/dev/null; then
2190     ac_cv_prog_cc_cross=no
2191   else
2192     ac_cv_prog_cc_cross=yes
2193   fi
2194 else
2195   echo "configure: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   ac_cv_prog_cc_works=no
2198 fi
2199 rm -fr conftest*
2200 ac_ext=c
2201 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2202 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2203 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'
2204 ac_cpp='$CPP '"$xe_cppflags"
2205 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2206 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2207 cross_compiling=no
2208
2209 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2210 if test $ac_cv_prog_cc_works = no; then
2211   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2212 fi
2213 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2214 echo "configure:2215: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2215 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2216 cross_compiling=$ac_cv_prog_cc_cross
2217
2218 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2219 echo "configure:2220: checking whether we are using GNU C" >&5
2220
2221 cat > conftest.c <<EOF
2222 #ifdef __GNUC__
2223   yes;
2224 #endif
2225 EOF
2226 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2227   ac_cv_prog_gcc=yes
2228 else
2229   ac_cv_prog_gcc=no
2230 fi
2231
2232 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2233
2234 if test $ac_cv_prog_gcc = yes; then
2235   GCC=yes
2236 else
2237   GCC=
2238 fi
2239
2240 ac_test_CFLAGS="${CFLAGS+set}"
2241 ac_save_CFLAGS="$CFLAGS"
2242 CFLAGS=
2243 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2244 echo "configure:2245: checking whether ${CC-cc} accepts -g" >&5
2245
2246 echo 'void f(){}' > conftest.c
2247 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2248   ac_cv_prog_cc_g=yes
2249 else
2250   ac_cv_prog_cc_g=no
2251 fi
2252 rm -f conftest*
2253
2254
2255 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2256 if test "$ac_test_CFLAGS" = set; then
2257   CFLAGS="$ac_save_CFLAGS"
2258 elif test $ac_cv_prog_cc_g = yes; then
2259   if test "$GCC" = yes; then
2260     CFLAGS="-g -O2"
2261   else
2262     CFLAGS="-g"
2263   fi
2264 else
2265   if test "$GCC" = yes; then
2266     CFLAGS="-O2"
2267   else
2268     CFLAGS=
2269   fi
2270 fi
2271
2272 fi
2273 CFLAGS="$xe_save_CFLAGS"
2274
2275
2276 test -n "$CPP" -a -d "$CPP" && CPP=
2277
2278 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2279
2280 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2281 echo "configure:2282: checking how to run the C preprocessor" >&5
2282 # On Suns, sometimes $CPP names a directory.
2283 if test -n "$CPP" && test -d "$CPP"; then
2284   CPP=
2285 fi
2286 if test -z "$CPP"; then
2287
2288   # This must be in double quotes, not single quotes, because CPP may get
2289   # substituted into the Makefile and "${CC-cc}" will confuse make.
2290   CPP="${CC-cc} -E"
2291   # On the NeXT, cc -E runs the code through the compiler's parser,
2292   # not just through cpp.
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 #include <assert.h>
2297 Syntax Error
2298 EOF
2299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2300 { (eval echo configure:2301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2302 if test -z "$ac_err"; then
2303   :
2304 else
2305   echo "$ac_err" >&5
2306   echo "configure: failed program was:" >&5
2307   cat conftest.$ac_ext >&5
2308   rm -rf conftest*
2309   CPP="${CC-cc} -E -traditional-cpp"
2310   cat > conftest.$ac_ext <<EOF
2311 #line 2312 "configure"
2312 #include "confdefs.h"
2313 #include <assert.h>
2314 Syntax Error
2315 EOF
2316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2317 { (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2319 if test -z "$ac_err"; then
2320   :
2321 else
2322   echo "$ac_err" >&5
2323   echo "configure: failed program was:" >&5
2324   cat conftest.$ac_ext >&5
2325   rm -rf conftest*
2326   CPP="${CC-cc} -nologo -E"
2327   cat > conftest.$ac_ext <<EOF
2328 #line 2329 "configure"
2329 #include "confdefs.h"
2330 #include <assert.h>
2331 Syntax Error
2332 EOF
2333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2334 { (eval echo configure:2335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2336 if test -z "$ac_err"; then
2337   :
2338 else
2339   echo "$ac_err" >&5
2340   echo "configure: failed program was:" >&5
2341   cat conftest.$ac_ext >&5
2342   rm -rf conftest*
2343   CPP=/lib/cpp
2344 fi
2345 rm -f conftest*
2346 fi
2347 rm -f conftest*
2348 fi
2349 rm -f conftest*
2350   ac_cv_prog_CPP="$CPP"
2351   CPP="$ac_cv_prog_CPP"
2352 else
2353   ac_cv_prog_CPP="$CPP"
2354 fi
2355 echo "$ac_t""$CPP" 1>&6
2356
2357
2358
2359 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2360 echo "configure:2361: checking for AIX" >&5
2361 cat > conftest.$ac_ext <<EOF
2362 #line 2363 "configure"
2363 #include "confdefs.h"
2364 #ifdef _AIX
2365   yes
2366 #endif
2367
2368 EOF
2369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2370   egrep "yes" >/dev/null 2>&1; then
2371   rm -rf conftest*
2372   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2373     Defining _ALL_SOURCE
2374 EOF
2375 cat >> confdefs.h <<\EOF
2376 #define _ALL_SOURCE 1
2377 EOF
2378 }
2379
2380 else
2381   rm -rf conftest*
2382   echo "$ac_t""no" 1>&6
2383 fi
2384 rm -f conftest*
2385
2386  
2387
2388 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2389 echo "configure:2390: checking for GNU libc" >&5
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include <features.h>
2394 int main() {
2395
2396 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2397 #error Not a GNU libc system :-(
2398 ******* ======= ******** &&&&&&&&
2399 #endif
2400
2401 ; return 0; }
2402 EOF
2403 if { (eval echo configure:2404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2404   rm -rf conftest*
2405   have_glibc=yes
2406 else
2407   echo "configure: failed program was:" >&5
2408   cat conftest.$ac_ext >&5
2409   rm -rf conftest*
2410   have_glibc=no
2411 fi
2412 rm -f conftest*
2413 echo "$ac_t""$have_glibc" 1>&6
2414 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2415     Defining _GNU_SOURCE
2416 EOF
2417 cat >> confdefs.h <<\EOF
2418 #define _GNU_SOURCE 1
2419 EOF
2420 }
2421
2422
2423 case "$opsys" in
2424   sol2)
2425    { test "$extra_verbose" = "yes" && cat << \EOF
2426     Defining __EXTENSIONS__
2427 EOF
2428 cat >> confdefs.h <<\EOF
2429 #define __EXTENSIONS__ 1
2430 EOF
2431 }
2432
2433       if test "$os_release" -ge 55; then
2434      { test "$extra_verbose" = "yes" && cat << \EOF
2435     Defining _XOPEN_SOURCE = 500
2436 EOF
2437 cat >> confdefs.h <<\EOF
2438 #define _XOPEN_SOURCE 500
2439 EOF
2440 }
2441
2442      { test "$extra_verbose" = "yes" && cat << \EOF
2443     Defining _XOPEN_SOURCE_EXTENDED
2444 EOF
2445 cat >> confdefs.h <<\EOF
2446 #define _XOPEN_SOURCE_EXTENDED 1
2447 EOF
2448 }
2449
2450    fi ;;
2451   linux)
2452     { test "$extra_verbose" = "yes" && cat << \EOF
2453     Defining _POSIX_C_SOURCE = 199506L
2454 EOF
2455 cat >> confdefs.h <<\EOF
2456 #define _POSIX_C_SOURCE 199506L
2457 EOF
2458 }
2459
2460     { test "$extra_verbose" = "yes" && cat << \EOF
2461     Defining _XOPEN_SOURCE = 500
2462 EOF
2463 cat >> confdefs.h <<\EOF
2464 #define _XOPEN_SOURCE 500
2465 EOF
2466 }
2467
2468     { test "$extra_verbose" = "yes" && cat << \EOF
2469     Defining _XOPEN_SOURCE_EXTENDED
2470 EOF
2471 cat >> confdefs.h <<\EOF
2472 #define _XOPEN_SOURCE_EXTENDED 1
2473 EOF
2474 }
2475
2476     ;;
2477 esac
2478
2479 cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 int main () {
2483 #if defined __SUNPRO_C
2484 return 11;
2485 #elif defined __DECC
2486 return 12;
2487 #elif defined __USLC__ && defined __SCO_VERSION__
2488 return 13;
2489 #else
2490 return 0;
2491 #endif
2492 }
2493 EOF
2494 if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2495 then
2496   :
2497 else
2498   conftest_rc="$?"
2499   echo "configure: failed program was:" >&5
2500   cat conftest.$ac_ext >&5
2501   rm -fr conftest*
2502   case "$conftest_rc" in
2503   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2504   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2505   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2506 esac
2507 fi
2508 rm -fr conftest*
2509
2510
2511
2512
2513 echo "Extracting information from the machine- and system-dependent headers..."
2514
2515 tempcname="conftest.c"
2516
2517
2518
2519 cat > $tempcname < confdefs.h
2520 cat >> $tempcname <<EOF
2521 #define NOT_C_CODE
2522 #define C_SWITCH_SITE
2523 #define C_SWITCH_X_SITE
2524 #define LD_SWITCH_SITE
2525 #define LD_SWITCH_X_SITE
2526 #define LD_SWITCH_X_SITE_AUX
2527 #define OS_RELEASE $os_release
2528
2529 #ifdef config_opsysfile
2530 #include "$srcdir/src/$opsysfile"
2531 #endif
2532
2533 #ifdef config_machfile
2534 #include "$srcdir/src/$machfile"
2535 #endif
2536
2537 #ifndef LIBS_MACHINE
2538 #define LIBS_MACHINE
2539 #endif
2540 configure___ libs_machine=LIBS_MACHINE
2541
2542 #ifndef LIBS_SYSTEM
2543 #define LIBS_SYSTEM
2544 #endif
2545 configure___ libs_system=LIBS_SYSTEM
2546
2547 #ifndef LIBS_TERMCAP
2548 #define LIBS_TERMCAP
2549 #endif
2550 configure___ libs_termcap=LIBS_TERMCAP
2551
2552 #ifndef LIB_STANDARD
2553 #define LIB_STANDARD
2554 #endif
2555 configure___ libs_standard=LIB_STANDARD
2556
2557
2558 #ifndef OBJECTS_MACHINE
2559 #define OBJECTS_MACHINE
2560 #endif
2561 configure___ objects_machine=OBJECTS_MACHINE
2562
2563 #ifndef OBJECTS_SYSTEM
2564 #define OBJECTS_SYSTEM
2565 #endif
2566 configure___ objects_system=OBJECTS_SYSTEM
2567
2568
2569 #ifndef C_SWITCH_MACHINE
2570 #define C_SWITCH_MACHINE
2571 #endif
2572 configure___ c_switch_machine=C_SWITCH_MACHINE
2573
2574 #ifndef C_SWITCH_SYSTEM
2575 #define C_SWITCH_SYSTEM
2576 #endif
2577 configure___ c_switch_system=C_SWITCH_SYSTEM
2578
2579
2580 #ifndef LD_SWITCH_MACHINE
2581 #define LD_SWITCH_MACHINE
2582 #endif
2583 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2584
2585 #ifndef LD_SWITCH_SYSTEM
2586 #define LD_SWITCH_SYSTEM
2587 #endif
2588 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2589
2590
2591 #ifndef UNEXEC
2592 #define UNEXEC "unexec.o"
2593 #endif
2594 configure___ unexec=UNEXEC
2595
2596
2597 #ifndef LD_SWITCH_SHARED
2598 #define LD_SWITCH_SHARED "-c"
2599 #endif
2600 configure___ ld_switch_shared=LD_SWITCH_SHARED
2601
2602
2603 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2604 configure___ ordinary_ld=ORDINARY_LD
2605
2606 #ifdef ORDINARY_LINK
2607 #define LD ORDINARY_LD
2608 #else /* no ORDINARY LINK */
2609 #ifdef COFF_ENCAPSULATE
2610 #define LD "\$(CC) -nostdlib"
2611 #else /* not COFF_ENCAPSULATE */
2612 #ifdef LINKER
2613 #define LD LINKER
2614 #else /* ! defined (LINKER) */
2615 #define LD "ld"
2616 #endif /* ! defined (LINKER) */
2617 #endif /* ! defined (COFF_ENCAPSULATE) */
2618 #endif /* not ORDINARY_LINK */
2619 configure___ ld=LD
2620
2621 #ifndef LIB_GCC
2622 #define LIB_GCC
2623 #endif
2624 configure___ lib_gcc=LIB_GCC
2625
2626 #ifndef LD_TEXT_START_ADDR
2627 #define LD_TEXT_START_ADDR
2628 #endif
2629 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2630
2631
2632 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2633 #ifdef NO_REMAP
2634 #ifdef COFF_ENCAPSULATE
2635 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2636 #else /* ! defined (COFF_ENCAPSULATE) */
2637 #define START_FILES "pre-crt0.o /lib/crt0.o"
2638 #endif /* ! defined (COFF_ENCAPSULATE) */
2639 #else /* ! defined (NO_REMAP) */
2640 #define START_FILES "ecrt0.o"
2641 #endif /* ! defined (NO_REMAP) */
2642 #endif /* no ORDINARY_LINK */
2643 #ifndef START_FILES
2644 #define START_FILES
2645 #endif
2646 configure___ start_files=START_FILES
2647
2648 #ifdef ORDINARY_LINK
2649 configure___ ordinary_link=yes
2650 #else
2651 configure___ ordinary_link=no
2652 #endif
2653
2654 #ifdef SYSTEM_MALLOC
2655 configure___ system_malloc=yes
2656 #else
2657 configure___ system_malloc=no
2658 #endif
2659
2660 #ifdef TERMINFO
2661 configure___ have_terminfo=yes
2662 #else
2663 configure___ have_terminfo=no
2664 #endif
2665
2666 #ifdef MAIL_USE_FLOCK
2667 configure___ mail_use_flock=yes
2668 #else
2669 configure___ mail_use_flock=no
2670 #endif
2671
2672 #ifdef MAIL_USE_LOCKF
2673 configure___ mail_use_lockf=yes
2674 #else
2675 configure___ mail_use_lockf=no
2676 #endif
2677
2678 #ifdef MAIL_USE_LOCKING
2679 configure___ mail_use_locking=yes
2680 #else
2681 configure___ mail_use_locking=no
2682 #endif
2683
2684 #ifdef HAVE_WIN32_PROCESSES
2685 configure___ win32_processes=yes
2686 #else
2687 configure___ win32_processes=no
2688 #endif
2689
2690 EOF
2691
2692 CPP=`eval "echo $CPP $CPPFLAGS"`
2693 eval `$CPP -Isrc $tempcname \
2694         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2695
2696 rm $tempcname
2697
2698 if test "$pdump" = "yes"; then
2699   ordinary_link="yes"
2700   ld="${ordinary_ld}"
2701   start_files=
2702   libs_standard=
2703   unexec=
2704   lib_gcc=
2705 fi
2706
2707 test "$extra_verbose" = "yes" && \
2708   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 ""
2709
2710 case "$opsys" in mingw* | cygwin*)
2711   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2712   cygwin_include=`eval "dirname $cygwin_include"` ;
2713   cygwin_include="-I$cygwin_include/../include" ;
2714   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2715   case "$opsys" in mingw*)
2716     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2717   esac
2718   ;;
2719 esac
2720
2721 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2722
2723
2724 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2725
2726 if test "$__USLC__" = yes; then
2727   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2728 echo "configure:2729: checking for whether the -Kalloca compiler flag is needed" >&5
2729   need_kalloca=no
2730   cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733
2734 int main() {
2735 void *x = alloca(4);
2736 ; return 0; }
2737 EOF
2738 if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2739   rm -rf conftest*
2740   :
2741 else
2742   echo "configure: failed program was:" >&5
2743   cat conftest.$ac_ext >&5
2744   rm -rf conftest*
2745   
2746     xe_save_c_switch_system="$c_switch_system"
2747     c_switch_system="$c_switch_system -Kalloca"
2748     cat > conftest.$ac_ext <<EOF
2749 #line 2750 "configure"
2750 #include "confdefs.h"
2751
2752 int main() {
2753 void *x = alloca(4);
2754 ; return 0; }
2755 EOF
2756 if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2757   rm -rf conftest*
2758    need_kalloca=yes 
2759 else
2760   echo "configure: failed program was:" >&5
2761   cat conftest.$ac_ext >&5
2762 fi
2763 rm -f conftest*
2764     c_switch_system="$xe_save_c_switch_system"
2765 fi
2766 rm -f conftest*
2767   echo "$ac_t""$need_kalloca" 1>&6
2768   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
2769 fi
2770
2771 if test "$cflags_specified" = "no"; then
2772       if   test "$GCC" = "yes"; then
2773     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2774         CFLAGS="$CFLAGS -Wsign-compare"
2775                 if test "$xemacs_compiler" != "g++"; then
2776       CFLAGS="$CFLAGS -Wshadow"
2777     fi
2778             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2779               elif test "$__SUNPRO_C" = "yes"; then
2780     case "$opsys" in
2781       sol2    ) CFLAGS="-v -xO4" ;;
2782       sunos4* ) CFLAGS="-xO2";;
2783     esac
2784   elif test "$__DECC" = "yes"; then
2785     CFLAGS="-O3"
2786   elif test "$CC" = "xlc"; then
2787     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2788     else
2789     CFLAGS="-O" ;  fi
2790 fi
2791
2792 if test "$GCC" = "yes"; then
2793 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2794 echo "configure:2795: checking for buggy gcc versions" >&5
2795 GCC_VERSION=`$CC --version`
2796 case `uname -s`:`uname -m`:$GCC_VERSION in
2797                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2798                         case "$CFLAGS" in
2799             *-O2*|*-O3*)
2800                 case "$CFLAGS" in
2801                     *-fno-schedule-insns*) ;;
2802                     *)
2803                         echo "$ac_t""yes" 1>&6
2804                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2805                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2806                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2807                         ;;
2808                 esac
2809                 ;;
2810         esac
2811         ;;
2812                     Linux:alpha:egcs-2.91.*)
2813         echo "$ac_t""yes" 1>&6
2814         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2815         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2816         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2817         ;;
2818     *:i*86*:2.7.2*)
2819         case "$CFLAGS" in
2820             *-O2*|*-O3*)
2821                 case "$GCC_VERSION" in
2822                     2.7.2)
2823                         case "$CFLAGS" in
2824                             *-fno-strength-reduce*) ;;
2825                             *)
2826                                 echo "$ac_t""yes" 1>&6
2827                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2828                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2829                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2830                                 ;;
2831                         esac
2832                         ;;
2833                 esac
2834                 case "$CFLAGS" in
2835                  *-fno-caller-saves*) ;;
2836                  *)
2837                     echo "$ac_t""yes" 1>&6
2838                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2839                     echo "configure: warning: -fno-caller-saves." 1>&2
2840                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2841                     ;;
2842                 esac
2843                 ;;
2844         esac
2845         ;;
2846 esac
2847 echo "$ac_t""no" 1>&6
2848 fi
2849
2850 if test "$pdump" != "yes"; then
2851   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2852 echo "configure:2853: checking for \"-z nocombreloc\" linker flag" >&5
2853   case "`ld --help 2>&1`" in
2854     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2855       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2856     *) echo "$ac_t""no" 1>&6 ;;
2857   esac
2858 fi
2859
2860
2861
2862 if test "$GCC" = "yes"; then
2863   set x $ld_switch_system; shift; ld_switch_system=""
2864   while test -n "$1"; do
2865     case $1 in
2866       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2867       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2868       -Xlinker* ) ;;
2869       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2870     esac
2871     shift
2872   done
2873 fi
2874
2875 if test "$GCC" = "yes"; then
2876   set x $ld_switch_machine; shift; ld_switch_machine=""
2877   while test -n "$1"; do
2878     case $1 in
2879       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2880       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2881       -Xlinker* ) ;;
2882       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2883     esac
2884     shift
2885   done
2886 fi
2887
2888 if test "$GCC" = "yes"; then
2889   set x $ld_switch_site; shift; ld_switch_site=""
2890   while test -n "$1"; do
2891     case $1 in
2892       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2893       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2894       -Xlinker* ) ;;
2895       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2896     esac
2897     shift
2898   done
2899 fi
2900
2901 if test "$GCC" = "yes"; then
2902   set x $LDFLAGS; shift; LDFLAGS=""
2903   while test -n "$1"; do
2904     case $1 in
2905       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2906       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2907       -Xlinker* ) ;;
2908       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2909     esac
2910     shift
2911   done
2912 fi
2913
2914 if test "$GCC" = "yes"; then
2915   set x $ld_call_shared; shift; ld_call_shared=""
2916   while test -n "$1"; do
2917     case $1 in
2918       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2919       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2920       -Xlinker* ) ;;
2921       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2922     esac
2923     shift
2924   done
2925 fi
2926
2927 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2928    echo "    xemacs will be linked with \"$objects_machine\""
2929  fi
2930 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2931    echo "    xemacs will be linked with \"$objects_system\""
2932  fi
2933 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2934    echo "    xemacs will be linked with \"$unexec\""
2935  fi
2936 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2937    echo "    xemacs will be linked with \"dumper.o\""
2938  fi
2939
2940 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2941 echo "configure:2942: checking for dynodump" >&5
2942 if test "$unexec" != "unexsol2.o"; then
2943   echo "$ac_t""no" 1>&6
2944 else
2945   echo "$ac_t""yes" 1>&6
2946   { test "$extra_verbose" = "yes" && cat << \EOF
2947     Defining DYNODUMP
2948 EOF
2949 cat >> confdefs.h <<\EOF
2950 #define DYNODUMP 1
2951 EOF
2952 }
2953
2954   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2955   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2956   case "$machine" in
2957     sparc   ) dynodump_arch=sparc ;;
2958     *86*    ) dynodump_arch=i386  ;;
2959     powerpc ) dynodump_arch=ppc   ;;
2960   esac
2961     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
2962 fi
2963
2964
2965 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2966
2967 if test "$unexec" = "unexaix.o"; then
2968   if   test "$dynamic" = "no"; then
2969   start_flags="-Wl,-bnso,-bnodelcsect"
2970   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2971   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2972     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2973   done
2974   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2975     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2976   done
2977   
2978 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2979 echo "configure:2980: checking for terminateAndUnload in -lC" >&5
2980 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2981
2982 xe_check_libs=" -lC "
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 /* Override any gcc2 internal prototype to avoid an error.  */
2987 /* We use char because int might match the return type of a gcc2
2988     builtin and then its argument prototype would still apply.  */
2989 char terminateAndUnload();
2990
2991 int main() {
2992 terminateAndUnload()
2993 ; return 0; }
2994 EOF
2995 if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2996   rm -rf conftest*
2997   eval "ac_cv_lib_$ac_lib_var=yes"
2998 else
2999   echo "configure: failed program was:" >&5
3000   cat conftest.$ac_ext >&5
3001   rm -rf conftest*
3002   eval "ac_cv_lib_$ac_lib_var=no"
3003 fi
3004 rm -f conftest*
3005 xe_check_libs=""
3006
3007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3008   echo "$ac_t""yes" 1>&6
3009   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3010 else
3011   echo "$ac_t""no" 1>&6
3012 fi
3013
3014
3015   fi
3016 elif test -n "$ld_text_start_addr"; then
3017   start_flags="-T $ld_text_start_addr -e __start"
3018 fi
3019
3020
3021
3022
3023 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3024  test -z "$linker" &&  linker='$(CC) -nostdlib'
3025  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3026 fi
3027 test "$GCC" != "yes" && lib_gcc=
3028
3029
3030
3031
3032
3033 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3034 if test -n "$site_libraries"; then
3035   for arg in $site_libraries; do
3036     case "$arg" in
3037      -* ) ;;
3038      * ) test -d "$arg" || \
3039            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3040        arg="-L${arg}" ;;
3041     esac
3042     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3043   done
3044 fi
3045
3046 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3047 if test -n "$site_includes"; then
3048   for arg in $site_includes; do
3049     case "$arg" in
3050       -* ) ;;
3051       * ) test -d "$arg" || \
3052            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3053       arg="-I${arg}" ;;
3054     esac
3055     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3056   done
3057 fi
3058
3059 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3060 if test -n "$site_prefixes"; then
3061   for dir in $site_prefixes; do
3062     lib_dir="${dir}/lib"
3063     inc_dir="${dir}/include"
3064     if test ! -d "$dir"; then
3065       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3066     elif test ! -d "$lib_dir"; then
3067       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3068     else
3069       if test -d "$inc_dir"; then
3070         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
3071       fi
3072       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
3073     fi
3074   done
3075 fi
3076
3077
3078 for dir in "/usr/ccs/lib"; do
3079   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
3080 done
3081
3082 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3083 if test -n "$site_runtime_libraries"; then
3084   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3085   export LD_RUN_PATH
3086 fi
3087
3088
3089
3090
3091
3092 if test -n "$add_runtime_path"; then :;
3093 elif test "$dynamic" = "no"; then add_runtime_path=no
3094 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3095 else case "$opsys" in
3096        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3097        * ) add_runtime_path=no ;;
3098      esac
3099 fi
3100
3101 if test "$add_runtime_path" = "yes"; then
3102       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3103 echo "configure:3104: checking "for runtime libraries flag"" >&5
3104   case "$opsys" in
3105     sol2 ) dash_r="-R" ;;
3106     decosf* | linux* | irix*) dash_r="-rpath " ;;
3107     *)
3108       dash_r=""
3109       for try_dash_r in "-R" "-R " "-rpath "; do
3110         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3111         
3112 if test "$GCC" = "yes"; then
3113   set x $xe_check_libs; shift; xe_check_libs=""
3114   while test -n "$1"; do
3115     case $1 in
3116       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3117       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3118       -Xlinker* ) ;;
3119       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3120     esac
3121     shift
3122   done
3123 fi
3124         cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127
3128 int main() {
3129
3130 ; return 0; }
3131 EOF
3132 if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3133   rm -rf conftest*
3134   dash_r="$try_dash_r"
3135 else
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138 fi
3139 rm -f conftest*
3140         xe_check_libs=""
3141         test -n "$dash_r" && break
3142       done ;;
3143   esac
3144   if test -n "$dash_r";
3145     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3146     else echo "$ac_t""NONE" 1>&6
3147   fi
3148 fi
3149
3150 xe_add_unique_runpath_dir='
3151   xe_add_p=yes
3152   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3153   done
3154   if test "$xe_add_p" = "yes"; then
3155     test -n "$runpath" && runpath="${runpath}:"
3156     runpath="${runpath}${xe_runpath_dir}"
3157     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3158   fi'
3159
3160
3161
3162
3163 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3164     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3165   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3166   
3167         runpath="" runpath_dirs=""
3168   if test -n "$LD_RUN_PATH"; then
3169     runpath="$LD_RUN_PATH"
3170   elif test "$GCC" = "yes"; then
3171         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3172     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3173     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3174     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3175       case "$arg" in P,* | -L* | -R* )
3176         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3177           {
3178 xe_runpath_dir="$dir"
3179   test "$xe_runpath_dir" != "/lib"     -a \
3180         "$xe_runpath_dir" != "/usr/lib" -a \
3181         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3182   eval "$xe_add_unique_runpath_dir"
3183 }
3184         done ;;
3185       esac
3186     done
3187     ld_switch_run="$ld_switch_run_save"
3188     rm -f conftest*
3189   else
3190         for arg in $ld_switch_site $ld_switch_x_site; do
3191       case "$arg" in -L*) {
3192 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3193   test "$xe_runpath_dir" != "/lib"     -a \
3194         "$xe_runpath_dir" != "/usr/lib" -a \
3195         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3196   eval "$xe_add_unique_runpath_dir"
3197 };; esac
3198     done
3199         if test "$opsys $need_motif" = "sol2 yes"; then
3200       xe_runpath_dir="/opt/SUNWdt/lib";
3201       eval "$xe_add_unique_runpath_dir";
3202     fi
3203   fi 
3204   if test -n "$runpath"; then
3205     ld_switch_run="${dash_r}${runpath}"
3206     
3207 if test "$GCC" = "yes"; then
3208   set x $ld_switch_run; shift; ld_switch_run=""
3209   while test -n "$1"; do
3210     case $1 in
3211       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3212       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3213       -Xlinker* ) ;;
3214       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3215     esac
3216     shift
3217   done
3218 fi
3219     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3220   fi
3221 fi
3222
3223
3224
3225 GNU_MALLOC=yes
3226 if test "$with_dlmalloc" != "no"; then
3227         doug_lea_malloc=yes
3228 else
3229         doug_lea_malloc=no
3230 fi
3231 after_morecore_hook_exists=yes
3232 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3233 echo "configure:3234: checking for malloc_set_state" >&5
3234
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 /* System header to define __stub macros and hopefully few prototypes,
3239     which can conflict with char malloc_set_state(); below.  */
3240 #include <assert.h>
3241 /* Override any gcc2 internal prototype to avoid an error.  */
3242 /* We use char because int might match the return type of a gcc2
3243     builtin and then its argument prototype would still apply.  */
3244 char malloc_set_state();
3245
3246 int main() {
3247
3248 /* The GNU C library defines this for functions which it implements
3249     to always fail with ENOSYS.  Some functions are actually named
3250     something starting with __ and the normal name is an alias.  */
3251 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3252 choke me
3253 #else
3254 malloc_set_state();
3255 #endif
3256
3257 ; return 0; }
3258 EOF
3259 if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3260   rm -rf conftest*
3261   eval "ac_cv_func_malloc_set_state=yes"
3262 else
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   eval "ac_cv_func_malloc_set_state=no"
3267 fi
3268 rm -f conftest*
3269
3270 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3271   echo "$ac_t""yes" 1>&6
3272   :
3273 else
3274   echo "$ac_t""no" 1>&6
3275 doug_lea_malloc=no
3276 fi
3277
3278 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3279 echo "configure:3280: checking whether __after_morecore_hook exists" >&5
3280 cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 extern void (* __after_morecore_hook)();
3284 int main() {
3285 __after_morecore_hook = 0
3286 ; return 0; }
3287 EOF
3288 if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3289   rm -rf conftest*
3290   echo "$ac_t""yes" 1>&6
3291 else
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   echo "$ac_t""no" 1>&6
3296    after_morecore_hook_exists=no
3297 fi
3298 rm -f conftest*
3299 if test "$system_malloc" = "yes" ; then
3300   GNU_MALLOC=no
3301   GNU_MALLOC_reason="
3302     - The GNU allocators don't work with this system configuration."
3303 elif test "$with_system_malloc" = "yes" ; then
3304   GNU_MALLOC=no
3305   GNU_MALLOC_reason="
3306     - User chose not to use GNU allocators."
3307 elif test "$with_debug_malloc" = "yes" ; then
3308   GNU_MALLOC=no
3309   GNU_MALLOC_reason="
3310     - User chose to use Debugging Malloc."
3311 fi
3312
3313 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3314   GNU_MALLOC_reason="
3315     - Using Doug Lea's new malloc from the GNU C Library."
3316   { test "$extra_verbose" = "yes" && cat << \EOF
3317     Defining DOUG_LEA_MALLOC
3318 EOF
3319 cat >> confdefs.h <<\EOF
3320 #define DOUG_LEA_MALLOC 1
3321 EOF
3322 }
3323
3324   if test "$after_morecore_hook_exists" = "no" ; then
3325     GNU_MALLOC_reason="
3326     - Using Doug Lea's new malloc from the Linux C Library."
3327     { test "$extra_verbose" = "yes" && cat << \EOF
3328     Defining _NO_MALLOC_WARNING_
3329 EOF
3330 cat >> confdefs.h <<\EOF
3331 #define _NO_MALLOC_WARNING_ 1
3332 EOF
3333 }
3334
3335   fi
3336 fi
3337
3338
3339
3340
3341 # Extract the first word of "ranlib", so it can be a program name with args.
3342 set dummy ranlib; ac_word=$2
3343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $ac_word" >&5
3345
3346 if test -n "$RANLIB"; then
3347   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3348 else
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3350   ac_dummy="$PATH"
3351   for ac_dir in $ac_dummy; do
3352     test -z "$ac_dir" && ac_dir=.
3353     if test -f $ac_dir/$ac_word; then
3354       ac_cv_prog_RANLIB="ranlib"
3355       break
3356     fi
3357   done
3358   IFS="$ac_save_ifs"
3359   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3360 fi
3361 RANLIB="$ac_cv_prog_RANLIB"
3362 if test -n "$RANLIB"; then
3363   echo "$ac_t""$RANLIB" 1>&6
3364 else
3365   echo "$ac_t""no" 1>&6
3366 fi
3367
3368 ac_aux_dir=
3369 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3370   if test -f $ac_dir/install-sh; then
3371     ac_aux_dir=$ac_dir
3372     ac_install_sh="$ac_aux_dir/install-sh -c"
3373     break
3374   elif test -f $ac_dir/install.sh; then
3375     ac_aux_dir=$ac_dir
3376     ac_install_sh="$ac_aux_dir/install.sh -c"
3377     break
3378   fi
3379 done
3380 if test -z "$ac_aux_dir"; then
3381   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3382 fi
3383 ac_config_guess=$ac_aux_dir/config.guess
3384 ac_config_sub=$ac_aux_dir/config.sub
3385 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3386
3387 # Find a good install program.  We prefer a C program (faster),
3388 # so one script is as good as another.  But avoid the broken or
3389 # incompatible versions:
3390 # SysV /etc/install, /usr/sbin/install
3391 # SunOS /usr/etc/install
3392 # IRIX /sbin/install
3393 # AIX /bin/install
3394 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3395 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3396 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3397 # ./install, which can be erroneously created by make from ./install.sh.
3398 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3399 echo "configure:3400: checking for a BSD compatible install" >&5
3400 if test -z "$INSTALL"; then
3401
3402   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3403   for ac_dir in $PATH; do
3404     # Account for people who put trailing slashes in PATH elements.
3405     case "$ac_dir/" in
3406     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3407     *)
3408       # OSF1 and SCO ODT 3.0 have their own names for install.
3409       # Don't use installbsd from OSF since it installs stuff as root
3410       # by default.
3411       for ac_prog in ginstall scoinst install; do
3412         if test -f $ac_dir/$ac_prog; then
3413           if test $ac_prog = install &&
3414             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3415             # AIX install.  It has an incompatible calling convention.
3416             :
3417           else
3418             ac_cv_path_install="$ac_dir/$ac_prog -c"
3419             break 2
3420           fi
3421         fi
3422       done
3423       ;;
3424     esac
3425   done
3426   IFS="$ac_save_IFS"
3427
3428   if test "${ac_cv_path_install+set}" = set; then
3429     INSTALL="$ac_cv_path_install"
3430   else
3431     # As a last resort, use the slow shell script.  We don't cache a
3432     # path for INSTALL within a source directory, because that will
3433     # break other packages using the cache if that directory is
3434     # removed, or if the path is relative.
3435     INSTALL="$ac_install_sh"
3436   fi
3437 fi
3438 echo "$ac_t""$INSTALL" 1>&6
3439
3440 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3441 # It thinks the first close brace ends the variable substitution.
3442 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3443
3444 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3445
3446 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3447
3448 for ac_prog in 'bison -y' byacc
3449 do
3450 # Extract the first word of "$ac_prog", so it can be a program name with args.
3451 set dummy $ac_prog; ac_word=$2
3452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3453 echo "configure:3454: checking for $ac_word" >&5
3454
3455 if test -n "$YACC"; then
3456   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3457 else
3458   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3459   ac_dummy="$PATH"
3460   for ac_dir in $ac_dummy; do
3461     test -z "$ac_dir" && ac_dir=.
3462     if test -f $ac_dir/$ac_word; then
3463       ac_cv_prog_YACC="$ac_prog"
3464       break
3465     fi
3466   done
3467   IFS="$ac_save_ifs"
3468 fi
3469 YACC="$ac_cv_prog_YACC"
3470 if test -n "$YACC"; then
3471   echo "$ac_t""$YACC" 1>&6
3472 else
3473   echo "$ac_t""no" 1>&6
3474 fi
3475
3476 test -n "$YACC" && break
3477 done
3478 test -n "$YACC" || YACC="yacc"
3479
3480
3481 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 
3482 do
3483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3485 echo "configure:3486: checking for $ac_hdr" >&5
3486
3487 cat > conftest.$ac_ext <<EOF
3488 #line 3489 "configure"
3489 #include "confdefs.h"
3490 #include <$ac_hdr>
3491 EOF
3492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3493 { (eval echo configure:3494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3495 if test -z "$ac_err"; then
3496   rm -rf conftest*
3497   eval "ac_cv_header_$ac_safe=yes"
3498 else
3499   echo "$ac_err" >&5
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   eval "ac_cv_header_$ac_safe=no"
3504 fi
3505 rm -f conftest*
3506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3507   echo "$ac_t""yes" 1>&6
3508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3509   { test "$extra_verbose" = "yes" && cat << EOF
3510     Defining $ac_tr_hdr
3511 EOF
3512 cat >> confdefs.h <<EOF
3513 #define $ac_tr_hdr 1
3514 EOF
3515 }
3516  
3517 else
3518   echo "$ac_t""no" 1>&6
3519 fi
3520 done
3521
3522 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3523 echo "configure:3524: checking for sys/wait.h that is POSIX.1 compatible" >&5
3524
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 #include <sys/types.h>
3529 #include <sys/wait.h>
3530 #ifndef WEXITSTATUS
3531 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3532 #endif
3533 #ifndef WIFEXITED
3534 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3535 #endif
3536 int main() {
3537 int s;
3538 wait (&s);
3539 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3540 ; return 0; }
3541 EOF
3542 if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3543   rm -rf conftest*
3544   ac_cv_header_sys_wait_h=yes
3545 else
3546   echo "configure: failed program was:" >&5
3547   cat conftest.$ac_ext >&5
3548   rm -rf conftest*
3549   ac_cv_header_sys_wait_h=no
3550 fi
3551 rm -f conftest*
3552
3553 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3554 if test $ac_cv_header_sys_wait_h = yes; then
3555   { test "$extra_verbose" = "yes" && cat << \EOF
3556     Defining HAVE_SYS_WAIT_H
3557 EOF
3558 cat >> confdefs.h <<\EOF
3559 #define HAVE_SYS_WAIT_H 1
3560 EOF
3561 }
3562
3563 fi
3564
3565 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3566 echo "configure:3567: checking for ANSI C header files" >&5
3567
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <stdlib.h>
3572 #include <stdarg.h>
3573 #include <string.h>
3574 #include <float.h>
3575 EOF
3576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3577 { (eval echo configure:3578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3579 if test -z "$ac_err"; then
3580   rm -rf conftest*
3581   ac_cv_header_stdc=yes
3582 else
3583   echo "$ac_err" >&5
3584   echo "configure: failed program was:" >&5
3585   cat conftest.$ac_ext >&5
3586   rm -rf conftest*
3587   ac_cv_header_stdc=no
3588 fi
3589 rm -f conftest*
3590
3591 if test $ac_cv_header_stdc = yes; then
3592   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <string.h>
3597 EOF
3598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3599   egrep "memchr" >/dev/null 2>&1; then
3600   :
3601 else
3602   rm -rf conftest*
3603   ac_cv_header_stdc=no
3604 fi
3605 rm -f conftest*
3606
3607 fi
3608
3609 if test $ac_cv_header_stdc = yes; then
3610   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3611 cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614 #include <stdlib.h>
3615 EOF
3616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3617   egrep "free" >/dev/null 2>&1; then
3618   :
3619 else
3620   rm -rf conftest*
3621   ac_cv_header_stdc=no
3622 fi
3623 rm -f conftest*
3624
3625 fi
3626
3627 if test $ac_cv_header_stdc = yes; then
3628   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #include <ctype.h>
3633 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3634 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3635 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3636 int main () { int i; for (i = 0; i < 256; i++)
3637 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3638 exit (0); }
3639
3640 EOF
3641 if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3642 then
3643   :
3644 else
3645   conftest_rc="$?"
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -fr conftest*
3649   ac_cv_header_stdc=no
3650 fi
3651 rm -fr conftest*
3652 fi
3653
3654 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3655 if test $ac_cv_header_stdc = yes; then
3656   { test "$extra_verbose" = "yes" && cat << \EOF
3657     Defining STDC_HEADERS
3658 EOF
3659 cat >> confdefs.h <<\EOF
3660 #define STDC_HEADERS 1
3661 EOF
3662 }
3663
3664 fi
3665
3666 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3667 echo "configure:3668: checking whether time.h and sys/time.h may both be included" >&5
3668
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <sys/types.h>
3673 #include <sys/time.h>
3674 #include <time.h>
3675 int main() {
3676 struct tm *tp;
3677 ; return 0; }
3678 EOF
3679 if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3680   rm -rf conftest*
3681   ac_cv_header_time=yes
3682 else
3683   echo "configure: failed program was:" >&5
3684   cat conftest.$ac_ext >&5
3685   rm -rf conftest*
3686   ac_cv_header_time=no
3687 fi
3688 rm -f conftest*
3689
3690 echo "$ac_t""$ac_cv_header_time" 1>&6
3691 if test $ac_cv_header_time = yes; then
3692   { test "$extra_verbose" = "yes" && cat << \EOF
3693     Defining TIME_WITH_SYS_TIME
3694 EOF
3695 cat >> confdefs.h <<\EOF
3696 #define TIME_WITH_SYS_TIME 1
3697 EOF
3698 }
3699
3700 fi
3701
3702 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3703 echo "configure:3704: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3704
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <sys/types.h>
3709 #include <signal.h>
3710 /* NetBSD declares sys_siglist in unistd.h.  */
3711 #ifdef HAVE_UNISTD_H
3712 #include <unistd.h>
3713 #endif
3714 int main() {
3715 char *msg = *(sys_siglist + 1);
3716 ; return 0; }
3717 EOF
3718 if { (eval echo configure:3719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3719   rm -rf conftest*
3720   ac_cv_decl_sys_siglist=yes
3721 else
3722   echo "configure: failed program was:" >&5
3723   cat conftest.$ac_ext >&5
3724   rm -rf conftest*
3725   ac_cv_decl_sys_siglist=no
3726 fi
3727 rm -f conftest*
3728
3729 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3730 if test $ac_cv_decl_sys_siglist = yes; then
3731   { test "$extra_verbose" = "yes" && cat << \EOF
3732     Defining SYS_SIGLIST_DECLARED
3733 EOF
3734 cat >> confdefs.h <<\EOF
3735 #define SYS_SIGLIST_DECLARED 1
3736 EOF
3737 }
3738
3739 fi
3740
3741
3742
3743 echo $ac_n "checking for utime""... $ac_c" 1>&6
3744 echo "configure:3745: checking for utime" >&5
3745 cat > conftest.$ac_ext <<EOF
3746 #line 3747 "configure"
3747 #include "confdefs.h"
3748 #include <sys/types.h>
3749 #include <utime.h>
3750 int main() {
3751 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3752 ; return 0; }
3753 EOF
3754 if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3755   rm -rf conftest*
3756   echo "$ac_t""yes" 1>&6
3757    { test "$extra_verbose" = "yes" && cat << \EOF
3758     Defining HAVE_UTIME
3759 EOF
3760 cat >> confdefs.h <<\EOF
3761 #define HAVE_UTIME 1
3762 EOF
3763 }
3764
3765 else
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -rf conftest*
3769   echo "$ac_t""no" 1>&6
3770       for ac_func in utimes
3771 do
3772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3773 echo "configure:3774: checking for $ac_func" >&5
3774
3775 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 /* System header to define __stub macros and hopefully few prototypes,
3779     which can conflict with char $ac_func(); below.  */
3780 #include <assert.h>
3781 /* Override any gcc2 internal prototype to avoid an error.  */
3782 /* We use char because int might match the return type of a gcc2
3783     builtin and then its argument prototype would still apply.  */
3784 char $ac_func();
3785
3786 int main() {
3787
3788 /* The GNU C library defines this for functions which it implements
3789     to always fail with ENOSYS.  Some functions are actually named
3790     something starting with __ and the normal name is an alias.  */
3791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3792 choke me
3793 #else
3794 $ac_func();
3795 #endif
3796
3797 ; return 0; }
3798 EOF
3799 if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3800   rm -rf conftest*
3801   eval "ac_cv_func_$ac_func=yes"
3802 else
3803   echo "configure: failed program was:" >&5
3804   cat conftest.$ac_ext >&5
3805   rm -rf conftest*
3806   eval "ac_cv_func_$ac_func=no"
3807 fi
3808 rm -f conftest*
3809
3810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3811   echo "$ac_t""yes" 1>&6
3812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3813   { test "$extra_verbose" = "yes" && cat << EOF
3814     Defining $ac_tr_func
3815 EOF
3816 cat >> confdefs.h <<EOF
3817 #define $ac_tr_func 1
3818 EOF
3819 }
3820  
3821 else
3822   echo "$ac_t""no" 1>&6
3823 fi
3824 done
3825
3826 fi
3827 rm -f conftest*
3828
3829
3830 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3831 echo "configure:3832: checking return type of signal handlers" >&5
3832
3833 cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #include <signal.h>
3838 #ifdef signal
3839 #undef signal
3840 #endif
3841 #ifdef __cplusplus
3842 extern "C" void (*signal (int, void (*)(int)))(int);
3843 #else
3844 void (*signal ()) ();
3845 #endif
3846
3847 int main() {
3848 int i;
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3852   rm -rf conftest*
3853   ac_cv_type_signal=void
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   ac_cv_type_signal=int
3859 fi
3860 rm -f conftest*
3861
3862 echo "$ac_t""$ac_cv_type_signal" 1>&6
3863 { test "$extra_verbose" = "yes" && cat << EOF
3864     Defining RETSIGTYPE = $ac_cv_type_signal
3865 EOF
3866 cat >> confdefs.h <<EOF
3867 #define RETSIGTYPE $ac_cv_type_signal
3868 EOF
3869 }
3870
3871
3872 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3873 echo "configure:3874: checking for size_t" >&5
3874
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 #include <sys/types.h>
3879 #if STDC_HEADERS
3880 #include <stdlib.h>
3881 #include <stddef.h>
3882 #endif
3883 EOF
3884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3885   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3886   rm -rf conftest*
3887   ac_cv_type_size_t=yes
3888 else
3889   rm -rf conftest*
3890   ac_cv_type_size_t=no
3891 fi
3892 rm -f conftest*
3893
3894 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3895 if test $ac_cv_type_size_t = no; then
3896   { test "$extra_verbose" = "yes" && cat << \EOF
3897     Defining size_t = unsigned
3898 EOF
3899 cat >> confdefs.h <<\EOF
3900 #define size_t unsigned
3901 EOF
3902 }
3903
3904 fi
3905
3906 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3907 echo "configure:3908: checking for pid_t" >&5
3908
3909 cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <sys/types.h>
3913 #if STDC_HEADERS
3914 #include <stdlib.h>
3915 #include <stddef.h>
3916 #endif
3917 EOF
3918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3919   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3920   rm -rf conftest*
3921   ac_cv_type_pid_t=yes
3922 else
3923   rm -rf conftest*
3924   ac_cv_type_pid_t=no
3925 fi
3926 rm -f conftest*
3927
3928 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3929 if test $ac_cv_type_pid_t = no; then
3930   { test "$extra_verbose" = "yes" && cat << \EOF
3931     Defining pid_t = int
3932 EOF
3933 cat >> confdefs.h <<\EOF
3934 #define pid_t int
3935 EOF
3936 }
3937
3938 fi
3939
3940 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3941 echo "configure:3942: checking for uid_t in sys/types.h" >&5
3942
3943 cat > conftest.$ac_ext <<EOF
3944 #line 3945 "configure"
3945 #include "confdefs.h"
3946 #include <sys/types.h>
3947 EOF
3948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3949   egrep "uid_t" >/dev/null 2>&1; then
3950   rm -rf conftest*
3951   ac_cv_type_uid_t=yes
3952 else
3953   rm -rf conftest*
3954   ac_cv_type_uid_t=no
3955 fi
3956 rm -f conftest*
3957
3958
3959 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3960 if test $ac_cv_type_uid_t = no; then
3961   { test "$extra_verbose" = "yes" && cat << \EOF
3962     Defining uid_t = int
3963 EOF
3964 cat >> confdefs.h <<\EOF
3965 #define uid_t int
3966 EOF
3967 }
3968
3969   { test "$extra_verbose" = "yes" && cat << \EOF
3970     Defining gid_t = int
3971 EOF
3972 cat >> confdefs.h <<\EOF
3973 #define gid_t int
3974 EOF
3975 }
3976
3977 fi
3978
3979 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3980 echo "configure:3981: checking for mode_t" >&5
3981
3982 cat > conftest.$ac_ext <<EOF
3983 #line 3984 "configure"
3984 #include "confdefs.h"
3985 #include <sys/types.h>
3986 #if STDC_HEADERS
3987 #include <stdlib.h>
3988 #include <stddef.h>
3989 #endif
3990 EOF
3991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3992   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3993   rm -rf conftest*
3994   ac_cv_type_mode_t=yes
3995 else
3996   rm -rf conftest*
3997   ac_cv_type_mode_t=no
3998 fi
3999 rm -f conftest*
4000
4001 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4002 if test $ac_cv_type_mode_t = no; then
4003   { test "$extra_verbose" = "yes" && cat << \EOF
4004     Defining mode_t = int
4005 EOF
4006 cat >> confdefs.h <<\EOF
4007 #define mode_t int
4008 EOF
4009 }
4010
4011 fi
4012
4013 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4014 echo "configure:4015: checking for off_t" >&5
4015
4016 cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 #include <sys/types.h>
4020 #if STDC_HEADERS
4021 #include <stdlib.h>
4022 #include <stddef.h>
4023 #endif
4024 EOF
4025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4026   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4027   rm -rf conftest*
4028   ac_cv_type_off_t=yes
4029 else
4030   rm -rf conftest*
4031   ac_cv_type_off_t=no
4032 fi
4033 rm -f conftest*
4034
4035 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4036 if test $ac_cv_type_off_t = no; then
4037   { test "$extra_verbose" = "yes" && cat << \EOF
4038     Defining off_t = long
4039 EOF
4040 cat >> confdefs.h <<\EOF
4041 #define off_t long
4042 EOF
4043 }
4044
4045 fi
4046
4047 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4048 echo "configure:4049: checking for ssize_t" >&5
4049
4050 cat > conftest.$ac_ext <<EOF
4051 #line 4052 "configure"
4052 #include "confdefs.h"
4053 #include <sys/types.h>
4054 #if STDC_HEADERS
4055 #include <stdlib.h>
4056 #include <stddef.h>
4057 #endif
4058 EOF
4059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4060   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4061   rm -rf conftest*
4062   ac_cv_type_ssize_t=yes
4063 else
4064   rm -rf conftest*
4065   ac_cv_type_ssize_t=no
4066 fi
4067 rm -f conftest*
4068
4069 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4070 if test $ac_cv_type_ssize_t = no; then
4071   { test "$extra_verbose" = "yes" && cat << \EOF
4072     Defining ssize_t = int
4073 EOF
4074 cat >> confdefs.h <<\EOF
4075 #define ssize_t int
4076 EOF
4077 }
4078
4079 fi
4080
4081
4082 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4083 echo "configure:4084: checking for socklen_t" >&5
4084 cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 #include <sys/types.h>
4088 #include <sys/socket.h>
4089 socklen_t x;
4090
4091 int main() {
4092
4093 ; return 0; }
4094 EOF
4095 if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4096   rm -rf conftest*
4097   echo "$ac_t""yes" 1>&6
4098 else
4099   echo "configure: failed program was:" >&5
4100   cat conftest.$ac_ext >&5
4101   rm -rf conftest*
4102   
4103 cat > conftest.$ac_ext <<EOF
4104 #line 4105 "configure"
4105 #include "confdefs.h"
4106 #include <sys/types.h>
4107 #include <sys/socket.h>
4108 int accept (int, struct sockaddr *, size_t *);
4109
4110 int main() {
4111
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4115   rm -rf conftest*
4116   
4117 echo "$ac_t""size_t" 1>&6
4118 { test "$extra_verbose" = "yes" && cat << \EOF
4119     Defining socklen_t = size_t
4120 EOF
4121 cat >> confdefs.h <<\EOF
4122 #define socklen_t size_t
4123 EOF
4124 }
4125
4126 else
4127   echo "configure: failed program was:" >&5
4128   cat conftest.$ac_ext >&5
4129   rm -rf conftest*
4130   
4131 echo "$ac_t""int" 1>&6
4132 { test "$extra_verbose" = "yes" && cat << \EOF
4133     Defining socklen_t = int
4134 EOF
4135 cat >> confdefs.h <<\EOF
4136 #define socklen_t int
4137 EOF
4138 }
4139
4140 fi
4141 rm -f conftest*
4142 fi
4143 rm -f conftest*
4144
4145 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4146 echo "configure:4147: checking for struct timeval" >&5
4147 cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 #ifdef TIME_WITH_SYS_TIME
4151 #include <sys/time.h>
4152 #include <time.h>
4153 #else
4154 #ifdef HAVE_SYS_TIME_H
4155 #include <sys/time.h>
4156 #else
4157 #include <time.h>
4158 #endif
4159 #endif
4160 int main() {
4161 static struct timeval x; x.tv_sec = x.tv_usec;
4162 ; return 0; }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4165   rm -rf conftest*
4166   echo "$ac_t""yes" 1>&6
4167   HAVE_TIMEVAL=yes
4168   { test "$extra_verbose" = "yes" && cat << \EOF
4169     Defining HAVE_TIMEVAL
4170 EOF
4171 cat >> confdefs.h <<\EOF
4172 #define HAVE_TIMEVAL 1
4173 EOF
4174 }
4175
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -rf conftest*
4180   echo "$ac_t""no" 1>&6
4181    HAVE_TIMEVAL=no
4182 fi
4183 rm -f conftest*
4184
4185 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4186 echo "configure:4187: checking whether struct tm is in sys/time.h or time.h" >&5
4187
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <sys/types.h>
4192 #include <time.h>
4193 int main() {
4194 struct tm *tp; tp->tm_sec;
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4198   rm -rf conftest*
4199   ac_cv_struct_tm=time.h
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   ac_cv_struct_tm=sys/time.h
4205 fi
4206 rm -f conftest*
4207
4208 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4209 if test $ac_cv_struct_tm = sys/time.h; then
4210   { test "$extra_verbose" = "yes" && cat << \EOF
4211     Defining TM_IN_SYS_TIME
4212 EOF
4213 cat >> confdefs.h <<\EOF
4214 #define TM_IN_SYS_TIME 1
4215 EOF
4216 }
4217
4218 fi
4219
4220 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4221 echo "configure:4222: checking for tm_zone in struct tm" >&5
4222
4223 cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <sys/types.h>
4227 #include <$ac_cv_struct_tm>
4228 int main() {
4229 struct tm tm; tm.tm_zone;
4230 ; return 0; }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4233   rm -rf conftest*
4234   ac_cv_struct_tm_zone=yes
4235 else
4236   echo "configure: failed program was:" >&5
4237   cat conftest.$ac_ext >&5
4238   rm -rf conftest*
4239   ac_cv_struct_tm_zone=no
4240 fi
4241 rm -f conftest*
4242
4243 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4244 if test "$ac_cv_struct_tm_zone" = yes; then
4245   { test "$extra_verbose" = "yes" && cat << \EOF
4246     Defining HAVE_TM_ZONE
4247 EOF
4248 cat >> confdefs.h <<\EOF
4249 #define HAVE_TM_ZONE 1
4250 EOF
4251 }
4252
4253 else
4254   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4255 echo "configure:4256: checking for tzname" >&5
4256
4257 cat > conftest.$ac_ext <<EOF
4258 #line 4259 "configure"
4259 #include "confdefs.h"
4260 #include <time.h>
4261 #ifndef tzname /* For SGI.  */
4262 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4263 #endif
4264 int main() {
4265 atoi(*tzname);
4266 ; return 0; }
4267 EOF
4268 if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4269   rm -rf conftest*
4270   ac_cv_var_tzname=yes
4271 else
4272   echo "configure: failed program was:" >&5
4273   cat conftest.$ac_ext >&5
4274   rm -rf conftest*
4275   ac_cv_var_tzname=no
4276 fi
4277 rm -f conftest*
4278
4279 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4280   if test $ac_cv_var_tzname = yes; then
4281     { test "$extra_verbose" = "yes" && cat << \EOF
4282     Defining HAVE_TZNAME
4283 EOF
4284 cat >> confdefs.h <<\EOF
4285 #define HAVE_TZNAME 1
4286 EOF
4287 }
4288
4289   fi
4290 fi
4291
4292
4293 echo $ac_n "checking for working const""... $ac_c" 1>&6
4294 echo "configure:4295: checking for working const" >&5
4295
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299
4300 int main() {
4301
4302 /* Ultrix mips cc rejects this.  */
4303 typedef int charset[2]; const charset x;
4304 /* SunOS 4.1.1 cc rejects this.  */
4305 char const *const *ccp;
4306 char **p;
4307 /* NEC SVR4.0.2 mips cc rejects this.  */
4308 struct point {int x, y;};
4309 static struct point const zero = {0,0};
4310 /* AIX XL C 1.02.0.0 rejects this.
4311    It does not let you subtract one const X* pointer from another in an arm
4312    of an if-expression whose if-part is not a constant expression */
4313 const char *g = "string";
4314 ccp = &g + (g ? g-g : 0);
4315 /* HPUX 7.0 cc rejects these. */
4316 ++ccp;
4317 p = (char**) ccp;
4318 ccp = (char const *const *) p;
4319 { /* SCO 3.2v4 cc rejects this.  */
4320   char *t;
4321   char const *s = 0 ? (char *) 0 : (char const *) 0;
4322
4323   *t++ = 0;
4324 }
4325 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4326   int x[] = {25, 17};
4327   const int *foo = &x[0];
4328   ++foo;
4329 }
4330 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4331   typedef const int *iptr;
4332   iptr p = 0;
4333   ++p;
4334 }
4335 { /* AIX XL C 1.02.0.0 rejects this saying
4336      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4337   struct s { int j; const int *ap[3]; };
4338   struct s *b; b->j = 5;
4339 }
4340 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4341   const int foo = 10;
4342 }
4343
4344 ; return 0; }
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4347   rm -rf conftest*
4348   ac_cv_c_const=yes
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352   rm -rf conftest*
4353   ac_cv_c_const=no
4354 fi
4355 rm -f conftest*
4356
4357 echo "$ac_t""$ac_cv_c_const" 1>&6
4358 if test $ac_cv_c_const = no; then
4359   { test "$extra_verbose" = "yes" && cat << \EOF
4360     Defining const = 
4361 EOF
4362 cat >> confdefs.h <<\EOF
4363 #define const 
4364 EOF
4365 }
4366
4367 fi
4368
4369
4370 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4371 echo "configure:4372: checking whether ${MAKE-make} sets \${MAKE}" >&5
4372 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4373
4374 cat > conftestmake <<\EOF
4375 all:
4376         @echo 'ac_maketemp="${MAKE}"'
4377 EOF
4378 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4379 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4380 if test -n "$ac_maketemp"; then
4381   eval ac_cv_prog_make_${ac_make}_set=yes
4382 else
4383   eval ac_cv_prog_make_${ac_make}_set=no
4384 fi
4385 rm -f conftestmake
4386 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4387   echo "$ac_t""yes" 1>&6
4388   SET_MAKE=
4389 else
4390   echo "$ac_t""no" 1>&6
4391   SET_MAKE="MAKE=${MAKE-make}"
4392 fi
4393
4394
4395 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4396 echo "configure:4397: checking whether byte ordering is bigendian" >&5
4397
4398 ac_cv_c_bigendian=unknown
4399 # See if sys/param.h defines the BYTE_ORDER macro.
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <sys/types.h>
4404 #include <sys/param.h>
4405 int main() {
4406
4407 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4408  bogus endian macros
4409 #endif
4410 ; return 0; }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4413   rm -rf conftest*
4414   # It does; now see whether it defined to BIG_ENDIAN or not.
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 #include <sys/types.h>
4419 #include <sys/param.h>
4420 int main() {
4421
4422 #if BYTE_ORDER != BIG_ENDIAN
4423  not big endian
4424 #endif
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4428   rm -rf conftest*
4429   ac_cv_c_bigendian=yes
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   ac_cv_c_bigendian=no
4435 fi
4436 rm -f conftest*
4437 else
4438   echo "configure: failed program was:" >&5
4439   cat conftest.$ac_ext >&5
4440 fi
4441 rm -f conftest*
4442 if test $ac_cv_c_bigendian = unknown; then
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 main () {
4447   /* Are we little or big endian?  From Harbison&Steele.  */
4448   union
4449   {
4450     long l;
4451     char c[sizeof (long)];
4452   } u;
4453   u.l = 1;
4454   exit (u.c[sizeof (long) - 1] == 1);
4455 }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4458 then
4459   ac_cv_c_bigendian=no
4460 else
4461   conftest_rc="$?"
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -fr conftest*
4465   ac_cv_c_bigendian=yes
4466 fi
4467 rm -fr conftest*
4468 fi
4469
4470 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4471 if test $ac_cv_c_bigendian = yes; then
4472   { test "$extra_verbose" = "yes" && cat << \EOF
4473     Defining WORDS_BIGENDIAN
4474 EOF
4475 cat >> confdefs.h <<\EOF
4476 #define WORDS_BIGENDIAN 1
4477 EOF
4478 }
4479
4480 fi
4481
4482
4483 echo $ac_n "checking size of short""... $ac_c" 1>&6
4484 echo "configure:4485: checking size of short" >&5
4485
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <stdio.h>
4490 #include <sys/types.h>
4491 main()
4492 {
4493   FILE *f=fopen("conftestval", "w");
4494   if (!f) exit(1);
4495   fprintf(f, "%d\n", sizeof(short));
4496   exit(0);
4497 }
4498 EOF
4499 if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4500 then
4501   ac_cv_sizeof_short=`cat conftestval`
4502 else
4503   conftest_rc="$?"
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -fr conftest*
4507   ac_cv_sizeof_short=0
4508 fi
4509 rm -fr conftest*
4510 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4511 { test "$extra_verbose" = "yes" && cat << EOF
4512     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4513 EOF
4514 cat >> confdefs.h <<EOF
4515 #define SIZEOF_SHORT $ac_cv_sizeof_short
4516 EOF
4517 }
4518
4519
4520 if test "$ac_cv_sizeof_short" = 0; then
4521   echo ""
4522   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4523   echo "*** PANIC *** Please examine config.log for compilation errors."
4524   exit 1
4525 fi
4526 echo $ac_n "checking size of int""... $ac_c" 1>&6
4527 echo "configure:4528: checking size of int" >&5
4528
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <stdio.h>
4533 #include <sys/types.h>
4534 main()
4535 {
4536   FILE *f=fopen("conftestval", "w");
4537   if (!f) exit(1);
4538   fprintf(f, "%d\n", sizeof(int));
4539   exit(0);
4540 }
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4543 then
4544   ac_cv_sizeof_int=`cat conftestval`
4545 else
4546   conftest_rc="$?"
4547   echo "configure: failed program was:" >&5
4548   cat conftest.$ac_ext >&5
4549   rm -fr conftest*
4550   ac_cv_sizeof_int=0
4551 fi
4552 rm -fr conftest*
4553 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4554 { test "$extra_verbose" = "yes" && cat << EOF
4555     Defining SIZEOF_INT = $ac_cv_sizeof_int
4556 EOF
4557 cat >> confdefs.h <<EOF
4558 #define SIZEOF_INT $ac_cv_sizeof_int
4559 EOF
4560 }
4561
4562
4563 echo $ac_n "checking size of long""... $ac_c" 1>&6
4564 echo "configure:4565: checking size of long" >&5
4565
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <stdio.h>
4570 #include <sys/types.h>
4571 main()
4572 {
4573   FILE *f=fopen("conftestval", "w");
4574   if (!f) exit(1);
4575   fprintf(f, "%d\n", sizeof(long));
4576   exit(0);
4577 }
4578 EOF
4579 if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4580 then
4581   ac_cv_sizeof_long=`cat conftestval`
4582 else
4583   conftest_rc="$?"
4584   echo "configure: failed program was:" >&5
4585   cat conftest.$ac_ext >&5
4586   rm -fr conftest*
4587   ac_cv_sizeof_long=0
4588 fi
4589 rm -fr conftest*
4590 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4591 { test "$extra_verbose" = "yes" && cat << EOF
4592     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4593 EOF
4594 cat >> confdefs.h <<EOF
4595 #define SIZEOF_LONG $ac_cv_sizeof_long
4596 EOF
4597 }
4598
4599
4600 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4601 echo "configure:4602: checking size of long long" >&5
4602
4603 cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 #include <stdio.h>
4607 #include <sys/types.h>
4608 main()
4609 {
4610   FILE *f=fopen("conftestval", "w");
4611   if (!f) exit(1);
4612   fprintf(f, "%d\n", sizeof(long long));
4613   exit(0);
4614 }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4617 then
4618   ac_cv_sizeof_long_long=`cat conftestval`
4619 else
4620   conftest_rc="$?"
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -fr conftest*
4624   ac_cv_sizeof_long_long=0
4625 fi
4626 rm -fr conftest*
4627 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4628 { test "$extra_verbose" = "yes" && cat << EOF
4629     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4630 EOF
4631 cat >> confdefs.h <<EOF
4632 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4633 EOF
4634 }
4635
4636
4637 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4638 echo "configure:4639: checking size of void *" >&5
4639
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include <stdio.h>
4644 #include <sys/types.h>
4645 main()
4646 {
4647   FILE *f=fopen("conftestval", "w");
4648   if (!f) exit(1);
4649   fprintf(f, "%d\n", sizeof(void *));
4650   exit(0);
4651 }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4654 then
4655   ac_cv_sizeof_void_p=`cat conftestval`
4656 else
4657   conftest_rc="$?"
4658   echo "configure: failed program was:" >&5
4659   cat conftest.$ac_ext >&5
4660   rm -fr conftest*
4661   ac_cv_sizeof_void_p=0
4662 fi
4663 rm -fr conftest*
4664 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4665 { test "$extra_verbose" = "yes" && cat << EOF
4666     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4667 EOF
4668 cat >> confdefs.h <<EOF
4669 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4670 EOF
4671 }
4672
4673
4674
4675 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4676 echo "configure:4677: checking for long file names" >&5
4677
4678 ac_cv_sys_long_file_names=yes
4679 # Test for long file names in all the places we know might matter:
4680 #      .                the current directory, where building will happen
4681 #      $prefix/lib      where we will be installing things
4682 #      $exec_prefix/lib likewise
4683 # eval it to expand exec_prefix.
4684 #      $TMPDIR          if set, where it might want to write temporary files
4685 # if $TMPDIR is not set:
4686 #      /tmp             where it might want to write temporary files
4687 #      /var/tmp         likewise
4688 #      /usr/tmp         likewise
4689 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4690   ac_tmpdirs="$TMPDIR"
4691 else
4692   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4693 fi
4694 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4695   test -d $ac_dir || continue
4696   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4697   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4698   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4699   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4700   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4701     ac_cv_sys_long_file_names=no
4702     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4703     break
4704   fi
4705   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4706 done
4707
4708 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4709 if test $ac_cv_sys_long_file_names = yes; then
4710   { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining HAVE_LONG_FILE_NAMES
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define HAVE_LONG_FILE_NAMES 1
4715 EOF
4716 }
4717
4718 fi
4719
4720
4721 echo $ac_n "checking for sin""... $ac_c" 1>&6
4722 echo "configure:4723: checking for sin" >&5
4723
4724 cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727 /* System header to define __stub macros and hopefully few prototypes,
4728     which can conflict with char sin(); below.  */
4729 #include <assert.h>
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 /* We use char because int might match the return type of a gcc2
4732     builtin and then its argument prototype would still apply.  */
4733 char sin();
4734
4735 int main() {
4736
4737 /* The GNU C library defines this for functions which it implements
4738     to always fail with ENOSYS.  Some functions are actually named
4739     something starting with __ and the normal name is an alias.  */
4740 #if defined (__stub_sin) || defined (__stub___sin)
4741 choke me
4742 #else
4743 sin();
4744 #endif
4745
4746 ; return 0; }
4747 EOF
4748 if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4749   rm -rf conftest*
4750   eval "ac_cv_func_sin=yes"
4751 else
4752   echo "configure: failed program was:" >&5
4753   cat conftest.$ac_ext >&5
4754   rm -rf conftest*
4755   eval "ac_cv_func_sin=no"
4756 fi
4757 rm -f conftest*
4758
4759 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4760   echo "$ac_t""yes" 1>&6
4761   :
4762 else
4763   echo "$ac_t""no" 1>&6
4764
4765 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4766 echo "configure:4767: checking for sin in -lm" >&5
4767 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4768
4769 xe_check_libs=" -lm "
4770 cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773 /* Override any gcc2 internal prototype to avoid an error.  */
4774 /* We use char because int might match the return type of a gcc2
4775     builtin and then its argument prototype would still apply.  */
4776 char sin();
4777
4778 int main() {
4779 sin()
4780 ; return 0; }
4781 EOF
4782 if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783   rm -rf conftest*
4784   eval "ac_cv_lib_$ac_lib_var=yes"
4785 else
4786   echo "configure: failed program was:" >&5
4787   cat conftest.$ac_ext >&5
4788   rm -rf conftest*
4789   eval "ac_cv_lib_$ac_lib_var=no"
4790 fi
4791 rm -f conftest*
4792 xe_check_libs=""
4793
4794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4795   echo "$ac_t""yes" 1>&6
4796     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4797     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4798   { test "$extra_verbose" = "yes" && cat << EOF
4799     Defining $ac_tr_lib
4800 EOF
4801 cat >> confdefs.h <<EOF
4802 #define $ac_tr_lib 1
4803 EOF
4804 }
4805
4806   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4807
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811
4812
4813 fi
4814
4815
4816 { test "$extra_verbose" = "yes" && cat << \EOF
4817     Defining LISP_FLOAT_TYPE
4818 EOF
4819 cat >> confdefs.h <<\EOF
4820 #define LISP_FLOAT_TYPE 1
4821 EOF
4822 }
4823
4824
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 #include <math.h>
4829 int main() {
4830 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   { test "$extra_verbose" = "yes" && cat << \EOF
4836     Defining HAVE_INVERSE_HYPERBOLIC
4837 EOF
4838 cat >> confdefs.h <<\EOF
4839 #define HAVE_INVERSE_HYPERBOLIC 1
4840 EOF
4841 }
4842
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846 fi
4847 rm -f conftest*
4848
4849 echo "checking type of mail spool file locking" 1>&6
4850 echo "configure:4851: checking type of mail spool file locking" >&5
4851 for ac_func in lockf flock
4852 do
4853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4854 echo "configure:4855: checking for $ac_func" >&5
4855
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 /* System header to define __stub macros and hopefully few prototypes,
4860     which can conflict with char $ac_func(); below.  */
4861 #include <assert.h>
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 /* We use char because int might match the return type of a gcc2
4864     builtin and then its argument prototype would still apply.  */
4865 char $ac_func();
4866
4867 int main() {
4868
4869 /* The GNU C library defines this for functions which it implements
4870     to always fail with ENOSYS.  Some functions are actually named
4871     something starting with __ and the normal name is an alias.  */
4872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4873 choke me
4874 #else
4875 $ac_func();
4876 #endif
4877
4878 ; return 0; }
4879 EOF
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881   rm -rf conftest*
4882   eval "ac_cv_func_$ac_func=yes"
4883 else
4884   echo "configure: failed program was:" >&5
4885   cat conftest.$ac_ext >&5
4886   rm -rf conftest*
4887   eval "ac_cv_func_$ac_func=no"
4888 fi
4889 rm -f conftest*
4890
4891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4892   echo "$ac_t""yes" 1>&6
4893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4894   { test "$extra_verbose" = "yes" && cat << EOF
4895     Defining $ac_tr_func
4896 EOF
4897 cat >> confdefs.h <<EOF
4898 #define $ac_tr_func 1
4899 EOF
4900 }
4901  
4902 else
4903   echo "$ac_t""no" 1>&6
4904 fi
4905 done
4906
4907 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4908 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4909 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4910 if   test -z "$mail_locking"; then
4911   case "$opsys" in cygwin* | mingw*)
4912     mail_locking=pop ;;
4913   esac
4914 fi
4915
4916 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4917     Defining MAIL_LOCK_LOCKF
4918 EOF
4919 cat >> confdefs.h <<\EOF
4920 #define MAIL_LOCK_LOCKF 1
4921 EOF
4922 }
4923
4924 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4925     Defining MAIL_LOCK_FLOCK
4926 EOF
4927 cat >> confdefs.h <<\EOF
4928 #define MAIL_LOCK_FLOCK 1
4929 EOF
4930 }
4931
4932 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4933     Defining MAIL_LOCK_LOCKING
4934 EOF
4935 cat >> confdefs.h <<\EOF
4936 #define MAIL_LOCK_LOCKING 1
4937 EOF
4938 }
4939
4940 elif test "$mail_locking" = "pop"; then
4941   with_pop=yes
4942   mail_locking=
4943 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4944     Defining MAIL_LOCK_DOT
4945 EOF
4946 cat >> confdefs.h <<\EOF
4947 #define MAIL_LOCK_DOT 1
4948 EOF
4949 }
4950
4951 fi
4952 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4953   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4954 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4955   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4956 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4957   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4958
4959 case "$opsys" in decosf*)
4960   
4961 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4962 echo "configure:4963: checking for cma_open in -lpthreads" >&5
4963 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4964
4965 xe_check_libs=" -lpthreads "
4966 cat > conftest.$ac_ext <<EOF
4967 #line 4968 "configure"
4968 #include "confdefs.h"
4969 /* Override any gcc2 internal prototype to avoid an error.  */
4970 /* We use char because int might match the return type of a gcc2
4971     builtin and then its argument prototype would still apply.  */
4972 char cma_open();
4973
4974 int main() {
4975 cma_open()
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=yes"
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   rm -rf conftest*
4985   eval "ac_cv_lib_$ac_lib_var=no"
4986 fi
4987 rm -f conftest*
4988 xe_check_libs=""
4989
4990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4991   echo "$ac_t""yes" 1>&6
4992     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4994   { test "$extra_verbose" = "yes" && cat << EOF
4995     Defining $ac_tr_lib
4996 EOF
4997 cat >> confdefs.h <<EOF
4998 #define $ac_tr_lib 1
4999 EOF
5000 }
5001
5002   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5003
5004 else
5005   echo "$ac_t""no" 1>&6
5006 fi
5007
5008
5009   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5010     c_switch_site="$c_switch_site -threads" ;;
5011 esac
5012
5013
5014 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5015 echo "configure:5016: checking whether the -xildoff compiler flag is required" >&5
5016 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5017   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5018     then echo "$ac_t""no" 1>&6;
5019     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
5020   fi
5021   else echo "$ac_t""no" 1>&6
5022 fi
5023
5024 if test "$opsys" = "sol2"; then
5025   if test "$os_release" -ge 56; then
5026     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5027 echo "configure:5028: checking for \"-z ignore\" linker flag" >&5
5028     case "`ld -h 2>&1`" in
5029       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5030         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5031       *) echo "$ac_t""no" 1>&6 ;;
5032     esac
5033   fi
5034 fi
5035
5036
5037 echo "checking "for specified window system"" 1>&6
5038 echo "configure:5039: checking "for specified window system"" >&5
5039
5040
5041 GNOME_CONFIG=no
5042 GTK_CONFIG=no
5043
5044 if test "$with_gnome" != "no"; then
5045    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5046 echo "configure:5047: checking for GNOME configuration script" >&5
5047    for possible in gnome-config
5048    do
5049       possible_version=`${possible} --version 2> /dev/null`
5050       if test "x${possible_version}" != "x"; then
5051               GNOME_CONFIG="${possible}"
5052               with_gnome=yes
5053               with_gtk=yes
5054               break
5055       fi
5056    done
5057    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5058 fi
5059
5060 if test "${GNOME_CONFIG}" != "no"; then
5061       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5062       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5063       { test "$extra_verbose" = "yes" && cat << \EOF
5064     Defining HAVE_GNOME
5065 EOF
5066 cat >> confdefs.h <<\EOF
5067 #define HAVE_GNOME 1
5068 EOF
5069 }
5070
5071       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5072       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5073 fi
5074
5075 if test "$with_gtk" != "no";then
5076    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5077 echo "configure:5078: checking for GTK configuration script" >&5
5078    for possible in gtk12-config gtk14-config gtk-config
5079    do
5080       possible_version=`${possible} --version 2> /dev/null`
5081       if test "x${possible_version}" != "x"; then
5082               GTK_CONFIG="${possible}"
5083       fi
5084       case "${possible_version}" in
5085         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5086         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5087         1.2.*)
5088                 with_gtk=yes
5089                 break
5090                 ;;
5091         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5092       esac
5093    done
5094    echo "$ac_t""${GTK_CONFIG}" 1>&6
5095 fi
5096
5097 if test "${GTK_CONFIG}" != "no"; then
5098       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5099 echo "configure:5100: checking gtk version" >&5
5100       GTK_VERSION=`${GTK_CONFIG} --version`
5101       echo "$ac_t""${GTK_VERSION}" 1>&6
5102
5103       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5104 echo "configure:5105: checking gtk libs" >&5
5105       GTK_LIBS=`${GTK_CONFIG} --libs`
5106       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5107       echo "$ac_t""${GTK_LIBS}" 1>&6
5108
5109       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5110 echo "configure:5111: checking gtk cflags" >&5
5111       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5112       if test "$GCC" = "yes"; then
5113         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5114       fi
5115       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5116       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5117
5118       
5119 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5120 echo "configure:5121: checking for main in -lgdk_imlib" >&5
5121 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5122
5123 xe_check_libs=" -lgdk_imlib "
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127
5128 int main() {
5129 main()
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=no"
5140 fi
5141 rm -f conftest*
5142 xe_check_libs=""
5143
5144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5145   echo "$ac_t""yes" 1>&6
5146   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5147 else
5148   echo "$ac_t""no" 1>&6
5149 fi
5150
5151
5152       
5153 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5154 echo "configure:5155: checking for Imlib_init in -lImlib" >&5
5155 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5156
5157 xe_check_libs=" -lImlib "
5158 cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* Override any gcc2 internal prototype to avoid an error.  */
5162 /* We use char because int might match the return type of a gcc2
5163     builtin and then its argument prototype would still apply.  */
5164 char Imlib_init();
5165
5166 int main() {
5167 Imlib_init()
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=no"
5178 fi
5179 rm -f conftest*
5180 xe_check_libs=""
5181
5182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5183   echo "$ac_t""yes" 1>&6
5184   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5185 else
5186   echo "$ac_t""no" 1>&6
5187 fi
5188
5189
5190       for ac_func in gdk_imlib_init
5191 do
5192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5193 echo "configure:5194: checking for $ac_func" >&5
5194
5195 cat > conftest.$ac_ext <<EOF
5196 #line 5197 "configure"
5197 #include "confdefs.h"
5198 /* System header to define __stub macros and hopefully few prototypes,
5199     which can conflict with char $ac_func(); below.  */
5200 #include <assert.h>
5201 /* Override any gcc2 internal prototype to avoid an error.  */
5202 /* We use char because int might match the return type of a gcc2
5203     builtin and then its argument prototype would still apply.  */
5204 char $ac_func();
5205
5206 int main() {
5207
5208 /* The GNU C library defines this for functions which it implements
5209     to always fail with ENOSYS.  Some functions are actually named
5210     something starting with __ and the normal name is an alias.  */
5211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5212 choke me
5213 #else
5214 $ac_func();
5215 #endif
5216
5217 ; return 0; }
5218 EOF
5219 if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5220   rm -rf conftest*
5221   eval "ac_cv_func_$ac_func=yes"
5222 else
5223   echo "configure: failed program was:" >&5
5224   cat conftest.$ac_ext >&5
5225   rm -rf conftest*
5226   eval "ac_cv_func_$ac_func=no"
5227 fi
5228 rm -f conftest*
5229
5230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5231   echo "$ac_t""yes" 1>&6
5232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5233   { test "$extra_verbose" = "yes" && cat << EOF
5234     Defining $ac_tr_func
5235 EOF
5236 cat >> confdefs.h <<EOF
5237 #define $ac_tr_func 1
5238 EOF
5239 }
5240  
5241 else
5242   echo "$ac_t""no" 1>&6
5243 fi
5244 done
5245
5246
5247       { test "$extra_verbose" = "yes" && cat << \EOF
5248     Defining HAVE_XPM
5249 EOF
5250 cat >> confdefs.h <<\EOF
5251 #define HAVE_XPM 1
5252 EOF
5253 }
5254
5255       { test "$extra_verbose" = "yes" && cat << \EOF
5256     Defining HAVE_GTK
5257 EOF
5258 cat >> confdefs.h <<\EOF
5259 #define HAVE_GTK 1
5260 EOF
5261 }
5262
5263       
5264
5265       window_system=gtk
5266       with_gtk=yes
5267       with_x11=no
5268
5269       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5270       test "${with_toolbars}" != no && with_toolbars=gtk
5271       test "${with_menubars}" != "no" && with_menubars=gtk
5272       test "${with_dialogs}" != "no" && with_dialogs=gtk
5273       test "${with_widgets}" != "no" && with_widgets=gtk
5274
5275       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5276    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5277  fi
5278       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5279    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5280  fi
5281       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5282    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5283  fi
5284       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5285    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5286  fi
5287
5288             OLD_CFLAGS="${CFLAGS}"
5289       OLD_CPPFLAGS="${CPPFLAGS}"
5290       OLD_LDFLAGS="${LDFLAGS}"
5291       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5292       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5293       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5294       for ac_hdr in glade/glade.h glade.h
5295 do
5296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_hdr" >&5
5299
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303 #include <$ac_hdr>
5304 EOF
5305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5306 { (eval echo configure:5307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5308 if test -z "$ac_err"; then
5309   rm -rf conftest*
5310   eval "ac_cv_header_$ac_safe=yes"
5311 else
5312   echo "$ac_err" >&5
5313   echo "configure: failed program was:" >&5
5314   cat conftest.$ac_ext >&5
5315   rm -rf conftest*
5316   eval "ac_cv_header_$ac_safe=no"
5317 fi
5318 rm -f conftest*
5319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5320   echo "$ac_t""yes" 1>&6
5321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5322   { test "$extra_verbose" = "yes" && cat << EOF
5323     Defining $ac_tr_hdr
5324 EOF
5325 cat >> confdefs.h <<EOF
5326 #define $ac_tr_hdr 1
5327 EOF
5328 }
5329  
5330 else
5331   echo "$ac_t""no" 1>&6
5332 fi
5333 done
5334
5335       
5336 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5337 echo "configure:5338: checking for main in -lxml" >&5
5338 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5339
5340 xe_check_libs=" -lxml "
5341 cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344
5345 int main() {
5346 main()
5347 ; return 0; }
5348 EOF
5349 if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5350   rm -rf conftest*
5351   eval "ac_cv_lib_$ac_lib_var=yes"
5352 else
5353   echo "configure: failed program was:" >&5
5354   cat conftest.$ac_ext >&5
5355   rm -rf conftest*
5356   eval "ac_cv_lib_$ac_lib_var=no"
5357 fi
5358 rm -f conftest*
5359 xe_check_libs=""
5360
5361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5362   echo "$ac_t""yes" 1>&6
5363   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5364 else
5365   echo "$ac_t""no" 1>&6
5366 fi
5367
5368
5369       
5370 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5371 echo "configure:5372: checking for main in -lglade" >&5
5372 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5373
5374 xe_check_libs=" -lglade "
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378
5379 int main() {
5380 main()
5381 ; return 0; }
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5384   rm -rf conftest*
5385   eval "ac_cv_lib_$ac_lib_var=yes"
5386 else
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389   rm -rf conftest*
5390   eval "ac_cv_lib_$ac_lib_var=no"
5391 fi
5392 rm -f conftest*
5393 xe_check_libs=""
5394
5395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5396   echo "$ac_t""yes" 1>&6
5397   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5398 else
5399   echo "$ac_t""no" 1>&6
5400 fi
5401
5402
5403       
5404 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5405 echo "configure:5406: checking for main in -lglade-gnome" >&5
5406 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5407
5408 xe_check_libs=" -lglade-gnome "
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412
5413 int main() {
5414 main()
5415 ; return 0; }
5416 EOF
5417 if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=yes"
5420 else
5421   echo "configure: failed program was:" >&5
5422   cat conftest.$ac_ext >&5
5423   rm -rf conftest*
5424   eval "ac_cv_lib_$ac_lib_var=no"
5425 fi
5426 rm -f conftest*
5427 xe_check_libs=""
5428
5429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5430   echo "$ac_t""yes" 1>&6
5431   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5432 else
5433   echo "$ac_t""no" 1>&6
5434 fi
5435
5436
5437       cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 #include <glade/glade-xml.h>
5441 EOF
5442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5443   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5444   rm -rf conftest*
5445   echo "$ac_t""yes" 1>&6
5446                        { test "$extra_verbose" = "yes" && cat << \EOF
5447     Defining LIBGLADE_XML_TXTDOMAIN = 1
5448 EOF
5449 cat >> confdefs.h <<\EOF
5450 #define LIBGLADE_XML_TXTDOMAIN 1
5451 EOF
5452 }
5453
5454 else
5455   rm -rf conftest*
5456   echo "$ac_t""no" 1>&6
5457 fi
5458 rm -f conftest*
5459
5460       CFLAGS="${OLD_CFLAGS}"
5461       CPPFLAGS="${OLD_CPPFLAGS}"
5462       LDFLAGS="${OLD_LDFLAGS}"
5463 fi
5464
5465
5466 if test "$with_x11" != "no"; then
5467     test "$x_includes $x_libraries" != "NONE NONE" && \
5468    window_system=x11 with_x11=yes
5469
5470         
5471       if test "$x_includes $x_libraries" = "NONE NONE" \
5472     -a -n "$OPENWINHOME" \
5473     -a "$OPENWINHOME" != "/usr/openwin" \
5474     -a -d "$OPENWINHOME"; then
5475       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5476       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5477       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5478   fi
5479
5480   if test "$x_includes" = "NONE"; then
5481                     for dir in "/usr/X11" "/usr/X11R6"; do
5482       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5483     done
5484   fi
5485
5486   if test "$x_libraries" = "NONE"; then
5487     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5488       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5489     done
5490   fi
5491
5492   # If we find X, set shell vars x_includes and x_libraries to the
5493 # paths, otherwise set no_x=yes.
5494 # Uses ac_ vars as temps to allow command line to override cache and checks.
5495 # --without-x overrides everything else, but does not touch the cache.
5496 echo $ac_n "checking for X""... $ac_c" 1>&6
5497 echo "configure:5498: checking for X" >&5
5498
5499 # Check whether --with-x or --without-x was given.
5500 if test "${with_x+set}" = set; then
5501   withval="$with_x"
5502   :
5503 fi
5504
5505 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5506 if test "x$with_x" = xno; then
5507   # The user explicitly disabled X.
5508   have_x=disabled
5509 else
5510   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5511     # Both variables are already set.
5512     have_x=yes
5513   else
5514
5515 # One or both of the vars are not set, and there is no cached value.
5516 ac_x_includes=NO ac_x_libraries=NO
5517 rm -fr conftestdir
5518 if mkdir conftestdir; then
5519   cd conftestdir
5520   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5521   cat > Imakefile <<'EOF'
5522 acfindx:
5523         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5524 EOF
5525   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5526     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5527     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5528     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5529     for ac_extension in a so sl; do
5530       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5531         test -f $ac_im_libdir/libX11.$ac_extension; then
5532         ac_im_usrlibdir=$ac_im_libdir; break
5533       fi
5534     done
5535     # Screen out bogus values from the imake configuration.  They are
5536     # bogus both because they are the default anyway, and because
5537     # using them would break gcc on systems where it needs fixed includes.
5538     case "$ac_im_incroot" in
5539         /usr/include) ;;
5540         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5541     esac
5542     case "$ac_im_usrlibdir" in
5543         /usr/lib | /lib) ;;
5544         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5545     esac
5546   fi
5547   cd ..
5548   rm -fr conftestdir
5549 fi
5550
5551 if test "$ac_x_includes" = NO; then
5552   # Guess where to find include files, by looking for this one X11 .h file.
5553   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5554
5555   # First, try using that file with no special directory specified.
5556 cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559 #include <$x_direct_test_include>
5560 EOF
5561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5562 { (eval echo configure:5563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5564 if test -z "$ac_err"; then
5565   rm -rf conftest*
5566   # We can compile using X headers with no special include directory.
5567 ac_x_includes=
5568 else
5569   echo "$ac_err" >&5
5570   echo "configure: failed program was:" >&5
5571   cat conftest.$ac_ext >&5
5572   rm -rf conftest*
5573   # Look for the header file in a standard set of common directories.
5574 # Check X11 before X11Rn because it is often a symlink to the current release.
5575   for ac_dir in               \
5576     /usr/X11/include          \
5577     /usr/X11R6/include        \
5578     /usr/X11R5/include        \
5579     /usr/X11R4/include        \
5580                               \
5581     /usr/include/X11          \
5582     /usr/include/X11R6        \
5583     /usr/include/X11R5        \
5584     /usr/include/X11R4        \
5585                               \
5586     /usr/local/X11/include    \
5587     /usr/local/X11R6/include  \
5588     /usr/local/X11R5/include  \
5589     /usr/local/X11R4/include  \
5590                               \
5591     /usr/local/include/X11    \
5592     /usr/local/include/X11R6  \
5593     /usr/local/include/X11R5  \
5594     /usr/local/include/X11R4  \
5595                               \
5596     /usr/X386/include         \
5597     /usr/x386/include         \
5598     /usr/XFree86/include/X11  \
5599                               \
5600     /usr/include              \
5601     /usr/local/include        \
5602     /usr/unsupported/include  \
5603     /usr/athena/include       \
5604     /usr/local/x11r5/include  \
5605     /usr/lpp/Xamples/include  \
5606                               \
5607     /usr/openwin/include      \
5608     /usr/openwin/share/include \
5609     ; \
5610   do
5611     if test -r "$ac_dir/$x_direct_test_include"; then
5612       ac_x_includes=$ac_dir
5613       break
5614     fi
5615   done
5616 fi
5617 rm -f conftest*
5618 fi # $ac_x_includes = NO
5619
5620 if test "$ac_x_libraries" = NO; then
5621   # Check for the libraries.
5622
5623   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5624   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5625
5626   # See if we find them without any special options.
5627   # Don't add to $LIBS permanently.
5628   ac_save_LIBS="$LIBS"
5629   LIBS="-l$x_direct_test_library $LIBS"
5630 cat > conftest.$ac_ext <<EOF
5631 #line 5632 "configure"
5632 #include "confdefs.h"
5633
5634 int main() {
5635 ${x_direct_test_function}()
5636 ; return 0; }
5637 EOF
5638 if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639   rm -rf conftest*
5640   LIBS="$ac_save_LIBS"
5641 # We can link X programs with no special library path.
5642 ac_x_libraries=
5643 else
5644   echo "configure: failed program was:" >&5
5645   cat conftest.$ac_ext >&5
5646   rm -rf conftest*
5647   LIBS="$ac_save_LIBS"
5648 # First see if replacing the include by lib works.
5649 # Check X11 before X11Rn because it is often a symlink to the current release.
5650 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5651     /usr/X11/lib          \
5652     /usr/X11R6/lib        \
5653     /usr/X11R5/lib        \
5654     /usr/X11R4/lib        \
5655                           \
5656     /usr/lib/X11          \
5657     /usr/lib/X11R6        \
5658     /usr/lib/X11R5        \
5659     /usr/lib/X11R4        \
5660                           \
5661     /usr/local/X11/lib    \
5662     /usr/local/X11R6/lib  \
5663     /usr/local/X11R5/lib  \
5664     /usr/local/X11R4/lib  \
5665                           \
5666     /usr/local/lib/X11    \
5667     /usr/local/lib/X11R6  \
5668     /usr/local/lib/X11R5  \
5669     /usr/local/lib/X11R4  \
5670                           \
5671     /usr/X386/lib         \
5672     /usr/x386/lib         \
5673     /usr/XFree86/lib/X11  \
5674                           \
5675     /usr/lib              \
5676     /usr/local/lib        \
5677     /usr/unsupported/lib  \
5678     /usr/athena/lib       \
5679     /usr/local/x11r5/lib  \
5680     /usr/lpp/Xamples/lib  \
5681     /lib/usr/lib/X11      \
5682                           \
5683     /usr/openwin/lib      \
5684     /usr/openwin/share/lib \
5685     ; \
5686 do
5687   for ac_extension in a so sl; do
5688     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5689       ac_x_libraries=$ac_dir
5690       break 2
5691     fi
5692   done
5693 done
5694 fi
5695 rm -f conftest*
5696 fi # $ac_x_libraries = NO
5697
5698 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5699   # Didn't find X anywhere.  Cache the known absence of X.
5700   ac_cv_have_x="have_x=no"
5701 else
5702   # Record where we found X for the cache.
5703   ac_cv_have_x="have_x=yes \
5704                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5705 fi
5706   fi
5707   eval "$ac_cv_have_x"
5708 fi # $with_x != no
5709
5710 if test "$have_x" != yes; then
5711   echo "$ac_t""$have_x" 1>&6
5712   no_x=yes
5713 else
5714   # If each of the values was on the command line, it overrides each guess.
5715   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5716   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5717   # Update the cache value to reflect the command line values.
5718   ac_cv_have_x="have_x=yes \
5719                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5720   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5721 fi
5722
5723 if test "$no_x" = yes; then
5724   # Not all programs may use this symbol, but it does not hurt to define it.
5725   { test "$extra_verbose" = "yes" && cat << \EOF
5726     Defining X_DISPLAY_MISSING
5727 EOF
5728 cat >> confdefs.h <<\EOF
5729 #define X_DISPLAY_MISSING 1
5730 EOF
5731 }
5732
5733   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5734 else
5735   if test -n "$x_includes"; then
5736     X_CFLAGS="$X_CFLAGS -I$x_includes"
5737   fi
5738
5739   # It would also be nice to do this for all -L options, not just this one.
5740   if test -n "$x_libraries"; then
5741     X_LIBS="$X_LIBS -L$x_libraries"
5742     # For Solaris; some versions of Sun CC require a space after -R and
5743     # others require no space.  Words are not sufficient . . . .
5744     case "`(uname -sr) 2>/dev/null`" in
5745     "SunOS 5"*)
5746       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5747 echo "configure:5748: checking whether -R must be followed by a space" >&5
5748       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5749       cat > conftest.$ac_ext <<EOF
5750 #line 5751 "configure"
5751 #include "confdefs.h"
5752
5753 int main() {
5754
5755 ; return 0; }
5756 EOF
5757 if { (eval echo configure:5758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5758   rm -rf conftest*
5759   ac_R_nospace=yes
5760 else
5761   echo "configure: failed program was:" >&5
5762   cat conftest.$ac_ext >&5
5763   rm -rf conftest*
5764   ac_R_nospace=no
5765 fi
5766 rm -f conftest*
5767       if test $ac_R_nospace = yes; then
5768         echo "$ac_t""no" 1>&6
5769         X_LIBS="$X_LIBS -R$x_libraries"
5770       else
5771         LIBS="$ac_xsave_LIBS -R $x_libraries"
5772         cat > conftest.$ac_ext <<EOF
5773 #line 5774 "configure"
5774 #include "confdefs.h"
5775
5776 int main() {
5777
5778 ; return 0; }
5779 EOF
5780 if { (eval echo configure:5781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5781   rm -rf conftest*
5782   ac_R_space=yes
5783 else
5784   echo "configure: failed program was:" >&5
5785   cat conftest.$ac_ext >&5
5786   rm -rf conftest*
5787   ac_R_space=no
5788 fi
5789 rm -f conftest*
5790         if test $ac_R_space = yes; then
5791           echo "$ac_t""yes" 1>&6
5792           X_LIBS="$X_LIBS -R $x_libraries"
5793         else
5794           echo "$ac_t""neither works" 1>&6
5795         fi
5796       fi
5797       LIBS="$ac_xsave_LIBS"
5798     esac
5799   fi
5800
5801   # Check for system-dependent libraries X programs must link with.
5802   # Do this before checking for the system-independent R6 libraries
5803   # (-lICE), since we may need -lsocket or whatever for X linking.
5804
5805   if test "$ISC" = yes; then
5806     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5807   else
5808     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5809     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5810     # the Alpha needs dnet_stub (dnet does not exist).
5811     if test "$with_dnet" = "no" ; then
5812 ac_cv_lib_dnet_dnet_ntoa=no
5813 else
5814
5815 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5816 echo "configure:5817: checking for dnet_ntoa in -ldnet" >&5
5817 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5818
5819 xe_check_libs=" -ldnet "
5820 cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 /* Override any gcc2 internal prototype to avoid an error.  */
5824 /* We use char because int might match the return type of a gcc2
5825     builtin and then its argument prototype would still apply.  */
5826 char dnet_ntoa();
5827
5828 int main() {
5829 dnet_ntoa()
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   eval "ac_cv_lib_$ac_lib_var=yes"
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_lib_$ac_lib_var=no"
5840 fi
5841 rm -f conftest*
5842 xe_check_libs=""
5843
5844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5845   echo "$ac_t""yes" 1>&6
5846   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5847 else
5848   echo "$ac_t""no" 1>&6
5849 fi
5850
5851 fi
5852
5853     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5854       
5855 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5856 echo "configure:5857: checking for dnet_ntoa in -ldnet_stub" >&5
5857 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5858
5859 xe_check_libs=" -ldnet_stub "
5860 cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 /* We use char because int might match the return type of a gcc2
5865     builtin and then its argument prototype would still apply.  */
5866 char dnet_ntoa();
5867
5868 int main() {
5869 dnet_ntoa()
5870 ; return 0; }
5871 EOF
5872 if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873   rm -rf conftest*
5874   eval "ac_cv_lib_$ac_lib_var=yes"
5875 else
5876   echo "configure: failed program was:" >&5
5877   cat conftest.$ac_ext >&5
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=no"
5880 fi
5881 rm -f conftest*
5882 xe_check_libs=""
5883
5884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5885   echo "$ac_t""yes" 1>&6
5886   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5887 else
5888   echo "$ac_t""no" 1>&6
5889 fi
5890
5891
5892     fi
5893
5894     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5895     # to get the SysV transport functions.
5896     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5897     # needs -lnsl.
5898     # The nsl library prevents programs from opening the X display
5899     # on Irix 5.2, according to dickey@clark.net.
5900     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5901 echo "configure:5902: checking for gethostbyname" >&5
5902
5903 cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 /* System header to define __stub macros and hopefully few prototypes,
5907     which can conflict with char gethostbyname(); below.  */
5908 #include <assert.h>
5909 /* Override any gcc2 internal prototype to avoid an error.  */
5910 /* We use char because int might match the return type of a gcc2
5911     builtin and then its argument prototype would still apply.  */
5912 char gethostbyname();
5913
5914 int main() {
5915
5916 /* The GNU C library defines this for functions which it implements
5917     to always fail with ENOSYS.  Some functions are actually named
5918     something starting with __ and the normal name is an alias.  */
5919 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5920 choke me
5921 #else
5922 gethostbyname();
5923 #endif
5924
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928   rm -rf conftest*
5929   eval "ac_cv_func_gethostbyname=yes"
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   eval "ac_cv_func_gethostbyname=no"
5935 fi
5936 rm -f conftest*
5937
5938 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5939   echo "$ac_t""yes" 1>&6
5940   :
5941 else
5942   echo "$ac_t""no" 1>&6
5943 fi
5944
5945     if test $ac_cv_func_gethostbyname = no; then
5946       
5947 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5948 echo "configure:5949: checking for gethostbyname in -lnsl" >&5
5949 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5950
5951 xe_check_libs=" -lnsl "
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955 /* Override any gcc2 internal prototype to avoid an error.  */
5956 /* We use char because int might match the return type of a gcc2
5957     builtin and then its argument prototype would still apply.  */
5958 char gethostbyname();
5959
5960 int main() {
5961 gethostbyname()
5962 ; return 0; }
5963 EOF
5964 if { (eval echo configure:5965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5965   rm -rf conftest*
5966   eval "ac_cv_lib_$ac_lib_var=yes"
5967 else
5968   echo "configure: failed program was:" >&5
5969   cat conftest.$ac_ext >&5
5970   rm -rf conftest*
5971   eval "ac_cv_lib_$ac_lib_var=no"
5972 fi
5973 rm -f conftest*
5974 xe_check_libs=""
5975
5976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5977   echo "$ac_t""yes" 1>&6
5978   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5979 else
5980   echo "$ac_t""no" 1>&6
5981 fi
5982
5983
5984     fi
5985
5986     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5987     # socket/setsockopt and other routines are undefined under SCO ODT
5988     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5989     # on later versions), says simon@lia.di.epfl.ch: it contains
5990     # gethostby* variants that don't use the nameserver (or something).
5991     # -lsocket must be given before -lnsl if both are needed.
5992     # We assume that if connect needs -lnsl, so does gethostbyname.
5993     echo $ac_n "checking for connect""... $ac_c" 1>&6
5994 echo "configure:5995: checking for connect" >&5
5995
5996 cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 /* System header to define __stub macros and hopefully few prototypes,
6000     which can conflict with char connect(); below.  */
6001 #include <assert.h>
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char connect();
6006
6007 int main() {
6008
6009 /* The GNU C library defines this for functions which it implements
6010     to always fail with ENOSYS.  Some functions are actually named
6011     something starting with __ and the normal name is an alias.  */
6012 #if defined (__stub_connect) || defined (__stub___connect)
6013 choke me
6014 #else
6015 connect();
6016 #endif
6017
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_func_connect=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_func_connect=no"
6028 fi
6029 rm -f conftest*
6030
6031 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6032   echo "$ac_t""yes" 1>&6
6033   :
6034 else
6035   echo "$ac_t""no" 1>&6
6036 fi
6037
6038     if test $ac_cv_func_connect = no; then
6039       
6040 xe_msg_checking="for connect in -lsocket"
6041 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6042 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6043 echo "configure:6044: checking "$xe_msg_checking"" >&5
6044 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6045
6046 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char connect();
6054
6055 int main() {
6056 connect()
6057 ; return 0; }
6058 EOF
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6060   rm -rf conftest*
6061   eval "ac_cv_lib_$ac_lib_var=yes"
6062 else
6063   echo "configure: failed program was:" >&5
6064   cat conftest.$ac_ext >&5
6065   rm -rf conftest*
6066   eval "ac_cv_lib_$ac_lib_var=no"
6067 fi
6068 rm -f conftest*
6069 xe_check_libs=""
6070
6071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6072   echo "$ac_t""yes" 1>&6
6073   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6074 else
6075   echo "$ac_t""no" 1>&6
6076 fi
6077
6078
6079     fi
6080
6081     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6082     echo $ac_n "checking for remove""... $ac_c" 1>&6
6083 echo "configure:6084: checking for remove" >&5
6084
6085 cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* System header to define __stub macros and hopefully few prototypes,
6089     which can conflict with char remove(); below.  */
6090 #include <assert.h>
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char remove();
6095
6096 int main() {
6097
6098 /* The GNU C library defines this for functions which it implements
6099     to always fail with ENOSYS.  Some functions are actually named
6100     something starting with __ and the normal name is an alias.  */
6101 #if defined (__stub_remove) || defined (__stub___remove)
6102 choke me
6103 #else
6104 remove();
6105 #endif
6106
6107 ; return 0; }
6108 EOF
6109 if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6110   rm -rf conftest*
6111   eval "ac_cv_func_remove=yes"
6112 else
6113   echo "configure: failed program was:" >&5
6114   cat conftest.$ac_ext >&5
6115   rm -rf conftest*
6116   eval "ac_cv_func_remove=no"
6117 fi
6118 rm -f conftest*
6119
6120 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6121   echo "$ac_t""yes" 1>&6
6122   :
6123 else
6124   echo "$ac_t""no" 1>&6
6125 fi
6126
6127     if test $ac_cv_func_remove = no; then
6128       
6129 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6130 echo "configure:6131: checking for remove in -lposix" >&5
6131 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6132
6133 xe_check_libs=" -lposix "
6134 cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 /* Override any gcc2 internal prototype to avoid an error.  */
6138 /* We use char because int might match the return type of a gcc2
6139     builtin and then its argument prototype would still apply.  */
6140 char remove();
6141
6142 int main() {
6143 remove()
6144 ; return 0; }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=yes"
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   eval "ac_cv_lib_$ac_lib_var=no"
6154 fi
6155 rm -f conftest*
6156 xe_check_libs=""
6157
6158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6159   echo "$ac_t""yes" 1>&6
6160   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164
6165
6166     fi
6167
6168     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6169     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6170 echo "configure:6171: checking for shmat" >&5
6171
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* System header to define __stub macros and hopefully few prototypes,
6176     which can conflict with char shmat(); below.  */
6177 #include <assert.h>
6178 /* Override any gcc2 internal prototype to avoid an error.  */
6179 /* We use char because int might match the return type of a gcc2
6180     builtin and then its argument prototype would still apply.  */
6181 char shmat();
6182
6183 int main() {
6184
6185 /* The GNU C library defines this for functions which it implements
6186     to always fail with ENOSYS.  Some functions are actually named
6187     something starting with __ and the normal name is an alias.  */
6188 #if defined (__stub_shmat) || defined (__stub___shmat)
6189 choke me
6190 #else
6191 shmat();
6192 #endif
6193
6194 ; return 0; }
6195 EOF
6196 if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6197   rm -rf conftest*
6198   eval "ac_cv_func_shmat=yes"
6199 else
6200   echo "configure: failed program was:" >&5
6201   cat conftest.$ac_ext >&5
6202   rm -rf conftest*
6203   eval "ac_cv_func_shmat=no"
6204 fi
6205 rm -f conftest*
6206
6207 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6208   echo "$ac_t""yes" 1>&6
6209   :
6210 else
6211   echo "$ac_t""no" 1>&6
6212 fi
6213
6214     if test $ac_cv_func_shmat = no; then
6215       
6216 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6217 echo "configure:6218: checking for shmat in -lipc" >&5
6218 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6219
6220 xe_check_libs=" -lipc "
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 /* Override any gcc2 internal prototype to avoid an error.  */
6225 /* We use char because int might match the return type of a gcc2
6226     builtin and then its argument prototype would still apply.  */
6227 char shmat();
6228
6229 int main() {
6230 shmat()
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6234   rm -rf conftest*
6235   eval "ac_cv_lib_$ac_lib_var=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=no"
6241 fi
6242 rm -f conftest*
6243 xe_check_libs=""
6244
6245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6246   echo "$ac_t""yes" 1>&6
6247   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6248 else
6249   echo "$ac_t""no" 1>&6
6250 fi
6251
6252
6253     fi
6254   fi
6255
6256   # Check for libraries that X11R6 Xt/Xaw programs need.
6257   ac_save_LDFLAGS="$LDFLAGS"
6258   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6259   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6260   # check for ICE first), but we must link in the order -lSM -lICE or
6261   # we get undefined symbols.  So assume we have SM if we have ICE.
6262   # These have to be linked with before -lX11, unlike the other
6263   # libraries we check for below, so use a different variable.
6264   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6265   
6266 xe_msg_checking="for IceConnectionNumber in -lICE"
6267 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6268 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6269 echo "configure:6270: checking "$xe_msg_checking"" >&5
6270 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char IceConnectionNumber();
6280
6281 int main() {
6282 IceConnectionNumber()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 xe_check_libs=""
6296
6297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6298   echo "$ac_t""yes" 1>&6
6299   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6300 else
6301   echo "$ac_t""no" 1>&6
6302 fi
6303
6304
6305   LDFLAGS="$ac_save_LDFLAGS"
6306
6307 fi
6308  # Autoconf claims to find X library and include dirs for us.
6309   if test "$no_x" = "yes"
6310   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6311   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6312   fi
6313 fi
6314
6315
6316 if test "$with_x11" = "yes"; then
6317   { test "$extra_verbose" = "yes" && cat << \EOF
6318     Defining HAVE_X_WINDOWS
6319 EOF
6320 cat >> confdefs.h <<\EOF
6321 #define HAVE_X_WINDOWS 1
6322 EOF
6323 }
6324
6325   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6326   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6327
6328       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6329     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6330     if test -d "$lib_dir" -a -d "$inc_dir"; then
6331       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6332         x_libraries="$lib_dir $x_libraries"
6333         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6334       esac
6335       case "$x_includes" in "$inc_dir"* ) ;; *)
6336         x_includes="$inc_dir $x_includes"
6337         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6338       esac
6339       break;       fi
6340   done
6341
6342     for rel in "X11R6" "X11R5" "X11R4"; do
6343     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6344     if test -d "$lib_dir" -a -d "$inc_dir"; then
6345       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6346         x_libraries="$x_libraries $lib_dir"
6347         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6348       esac
6349       case "$x_includes" in "$inc_dir"* ) ;; *)
6350         x_includes="$x_includes $inc_dir"
6351         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6352       esac
6353       break;     fi
6354   done
6355
6356     case "$opsys" in
6357   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 ;;
6358   esac
6359
6360   ld_switch_x_site="$X_LIBS"
6361
6362   
6363 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6364     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6365   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6366   
6367         runpath="" runpath_dirs=""
6368   if test -n "$LD_RUN_PATH"; then
6369     runpath="$LD_RUN_PATH"
6370   elif test "$GCC" = "yes"; then
6371         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6372     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6373     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6374     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6375       case "$arg" in P,* | -L* | -R* )
6376         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6377           {
6378 xe_runpath_dir="$dir"
6379   test "$xe_runpath_dir" != "/lib"     -a \
6380         "$xe_runpath_dir" != "/usr/lib" -a \
6381         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6382   eval "$xe_add_unique_runpath_dir"
6383 }
6384         done ;;
6385       esac
6386     done
6387     ld_switch_run="$ld_switch_run_save"
6388     rm -f conftest*
6389   else
6390         for arg in $ld_switch_site $ld_switch_x_site; do
6391       case "$arg" in -L*) {
6392 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6393   test "$xe_runpath_dir" != "/lib"     -a \
6394         "$xe_runpath_dir" != "/usr/lib" -a \
6395         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6396   eval "$xe_add_unique_runpath_dir"
6397 };; esac
6398     done
6399         if test "$opsys $need_motif" = "sol2 yes"; then
6400       xe_runpath_dir="/opt/SUNWdt/lib";
6401       eval "$xe_add_unique_runpath_dir";
6402     fi
6403   fi 
6404   if test -n "$runpath"; then
6405     ld_switch_run="${dash_r}${runpath}"
6406     
6407 if test "$GCC" = "yes"; then
6408   set x $ld_switch_run; shift; ld_switch_run=""
6409   while test -n "$1"; do
6410     case $1 in
6411       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6412       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6413       -Xlinker* ) ;;
6414       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6415     esac
6416     shift
6417   done
6418 fi
6419     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6420   fi
6421 fi
6422
6423
6424   if test "$extra_verbose" = "yes"; then
6425     echo; echo "X11 compilation variables:"
6426     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6427     echo
6428   fi
6429
6430             bitmapdirs=
6431   if test "$x_includes" != NONE; then
6432     for i in $x_includes; do
6433       if test -d "$i/bitmaps"; then
6434         bitmapdirs="$i/bitmaps:$bitmapdirs"
6435       fi
6436       if test -d "$i/X11/bitmaps"; then
6437         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6438       fi
6439     done
6440     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6441   fi
6442   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6443     Defining BITMAPDIR = "$bitmapdirs"
6444 EOF
6445 cat >> confdefs.h <<EOF
6446 #define BITMAPDIR "$bitmapdirs"
6447 EOF
6448 }
6449
6450
6451     echo "checking for X defines extracted by xmkmf" 1>&6
6452 echo "configure:6453: checking for X defines extracted by xmkmf" >&5
6453   rm -fr conftestdir
6454   if mkdir conftestdir; then
6455     cd conftestdir
6456     cat > Imakefile <<'EOF'
6457 xetest:
6458         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6459 EOF
6460     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6461       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6462       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6463     fi
6464     cd ..
6465     rm -fr conftestdir
6466     for word in $xmkmf_defines; do
6467       case "$word" in 
6468       -D__STDC__*) ;;
6469       -D* )
6470         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6471         case "$word" in
6472           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6473           *     ) val=1 ;;
6474         esac
6475         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6476           if test "$val" = "1"
6477             then { test "$extra_verbose" = "yes" && cat << EOF
6478     Defining $sym
6479 EOF
6480 cat >> confdefs.h <<EOF
6481 #define $sym 1
6482 EOF
6483 }
6484
6485             else { test "$extra_verbose" = "yes" && cat << EOF
6486     Defining $sym = $val
6487 EOF
6488 cat >> confdefs.h <<EOF
6489 #define $sym $val
6490 EOF
6491 }
6492
6493           fi
6494         fi  ;;
6495       esac
6496     done
6497   fi
6498
6499     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6500 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6501 echo "configure:6502: checking for X11/Intrinsic.h" >&5
6502
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 #include <X11/Intrinsic.h>
6507 EOF
6508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6509 { (eval echo configure:6510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6511 if test -z "$ac_err"; then
6512   rm -rf conftest*
6513   eval "ac_cv_header_$ac_safe=yes"
6514 else
6515   echo "$ac_err" >&5
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_header_$ac_safe=no"
6520 fi
6521 rm -f conftest*
6522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6523   echo "$ac_t""yes" 1>&6
6524   :
6525 else
6526   echo "$ac_t""no" 1>&6
6527 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6528 fi
6529
6530
6531       
6532 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6533 echo "configure:6534: checking for XOpenDisplay in -lX11" >&5
6534 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6535
6536 xe_check_libs=" -lX11 "
6537 cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* Override any gcc2 internal prototype to avoid an error.  */
6541 /* We use char because int might match the return type of a gcc2
6542     builtin and then its argument prototype would still apply.  */
6543 char XOpenDisplay();
6544
6545 int main() {
6546 XOpenDisplay()
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6550   rm -rf conftest*
6551   eval "ac_cv_lib_$ac_lib_var=yes"
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   eval "ac_cv_lib_$ac_lib_var=no"
6557 fi
6558 rm -f conftest*
6559 xe_check_libs=""
6560
6561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6562   echo "$ac_t""yes" 1>&6
6563   have_lib_x11=yes
6564 else
6565   echo "$ac_t""no" 1>&6
6566 fi
6567
6568
6569   if test "$have_lib_x11" != "yes"; then
6570     
6571 xe_msg_checking="for XGetFontProperty in -lX11"
6572 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6573 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6574 echo "configure:6575: checking "$xe_msg_checking"" >&5
6575 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6576
6577 xe_check_libs=" -lX11 -b i486-linuxaout"
6578 cat > conftest.$ac_ext <<EOF
6579 #line 6580 "configure"
6580 #include "confdefs.h"
6581 /* Override any gcc2 internal prototype to avoid an error.  */
6582 /* We use char because int might match the return type of a gcc2
6583     builtin and then its argument prototype would still apply.  */
6584 char XGetFontProperty();
6585
6586 int main() {
6587 XGetFontProperty()
6588 ; return 0; }
6589 EOF
6590 if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6591   rm -rf conftest*
6592   eval "ac_cv_lib_$ac_lib_var=yes"
6593 else
6594   echo "configure: failed program was:" >&5
6595   cat conftest.$ac_ext >&5
6596   rm -rf conftest*
6597   eval "ac_cv_lib_$ac_lib_var=no"
6598 fi
6599 rm -f conftest*
6600 xe_check_libs=""
6601
6602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6603   echo "$ac_t""yes" 1>&6
6604   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6605 else
6606   echo "$ac_t""no" 1>&6
6607 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6608 fi
6609
6610
6611   fi
6612   libs_x="-lX11"
6613   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6614
6615     
6616 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6617 echo "configure:6618: checking for XShapeSelectInput in -lXext" >&5
6618 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6619
6620 xe_check_libs=" -lXext "
6621 cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6624 /* Override any gcc2 internal prototype to avoid an error.  */
6625 /* We use char because int might match the return type of a gcc2
6626     builtin and then its argument prototype would still apply.  */
6627 char XShapeSelectInput();
6628
6629 int main() {
6630 XShapeSelectInput()
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   eval "ac_cv_lib_$ac_lib_var=yes"
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   eval "ac_cv_lib_$ac_lib_var=no"
6641 fi
6642 rm -f conftest*
6643 xe_check_libs=""
6644
6645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6646   echo "$ac_t""yes" 1>&6
6647   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6648 else
6649   echo "$ac_t""no" 1>&6
6650 fi
6651
6652
6653
6654     
6655 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6656 echo "configure:6657: checking for XtOpenDisplay in -lXt" >&5
6657 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6658
6659 xe_check_libs=" -lXt "
6660 cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* Override any gcc2 internal prototype to avoid an error.  */
6664 /* We use char because int might match the return type of a gcc2
6665     builtin and then its argument prototype would still apply.  */
6666 char XtOpenDisplay();
6667
6668 int main() {
6669 XtOpenDisplay()
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   eval "ac_cv_lib_$ac_lib_var=yes"
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_lib_$ac_lib_var=no"
6680 fi
6681 rm -f conftest*
6682 xe_check_libs=""
6683
6684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6685   echo "$ac_t""yes" 1>&6
6686   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6687 else
6688   echo "$ac_t""no" 1>&6
6689 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6690 fi
6691
6692
6693
6694   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6695 echo "configure:6696: checking the version of X11 being used" >&5
6696   cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 #include <X11/Intrinsic.h>
6700     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6703 then
6704   ./conftest foobar; x11_release=$?
6705 else
6706   conftest_rc="$?"
6707   echo "configure: failed program was:" >&5
6708   cat conftest.$ac_ext >&5
6709   rm -fr conftest*
6710   x11_release=4
6711 fi
6712 rm -fr conftest*
6713   echo "$ac_t""R${x11_release}" 1>&6
6714   { test "$extra_verbose" = "yes" && cat << EOF
6715     Defining THIS_IS_X11R${x11_release}
6716 EOF
6717 cat >> confdefs.h <<EOF
6718 #define THIS_IS_X11R${x11_release} 1
6719 EOF
6720 }
6721
6722
6723   if test "${x11_release}" = "4"; then
6724     case "$with_widgets" in
6725       "" | "no") with_widgets=no ;;
6726       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6727     esac
6728   fi
6729
6730   for ac_func in XConvertCase
6731 do
6732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6733 echo "configure:6734: checking for $ac_func" >&5
6734
6735 cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738 /* System header to define __stub macros and hopefully few prototypes,
6739     which can conflict with char $ac_func(); below.  */
6740 #include <assert.h>
6741 /* Override any gcc2 internal prototype to avoid an error.  */
6742 /* We use char because int might match the return type of a gcc2
6743     builtin and then its argument prototype would still apply.  */
6744 char $ac_func();
6745
6746 int main() {
6747
6748 /* The GNU C library defines this for functions which it implements
6749     to always fail with ENOSYS.  Some functions are actually named
6750     something starting with __ and the normal name is an alias.  */
6751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6752 choke me
6753 #else
6754 $ac_func();
6755 #endif
6756
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   eval "ac_cv_func_$ac_func=yes"
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   eval "ac_cv_func_$ac_func=no"
6767 fi
6768 rm -f conftest*
6769
6770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6771   echo "$ac_t""yes" 1>&6
6772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6773   { test "$extra_verbose" = "yes" && cat << EOF
6774     Defining $ac_tr_func
6775 EOF
6776 cat >> confdefs.h <<EOF
6777 #define $ac_tr_func 1
6778 EOF
6779 }
6780  
6781 else
6782   echo "$ac_t""no" 1>&6
6783 fi
6784 done
6785
6786
6787   for ac_hdr in X11/Xlocale.h
6788 do
6789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6791 echo "configure:6792: checking for $ac_hdr" >&5
6792
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 #include <$ac_hdr>
6797 EOF
6798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6799 { (eval echo configure:6800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6801 if test -z "$ac_err"; then
6802   rm -rf conftest*
6803   eval "ac_cv_header_$ac_safe=yes"
6804 else
6805   echo "$ac_err" >&5
6806   echo "configure: failed program was:" >&5
6807   cat conftest.$ac_ext >&5
6808   rm -rf conftest*
6809   eval "ac_cv_header_$ac_safe=no"
6810 fi
6811 rm -f conftest*
6812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6815   { test "$extra_verbose" = "yes" && cat << EOF
6816     Defining $ac_tr_hdr
6817 EOF
6818 cat >> confdefs.h <<EOF
6819 #define $ac_tr_hdr 1
6820 EOF
6821 }
6822  
6823 else
6824   echo "$ac_t""no" 1>&6
6825 fi
6826 done
6827
6828
6829     for ac_func in XRegisterIMInstantiateCallback
6830 do
6831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6832 echo "configure:6833: checking for $ac_func" >&5
6833
6834 cat > conftest.$ac_ext <<EOF
6835 #line 6836 "configure"
6836 #include "confdefs.h"
6837 /* System header to define __stub macros and hopefully few prototypes,
6838     which can conflict with char $ac_func(); below.  */
6839 #include <assert.h>
6840 /* Override any gcc2 internal prototype to avoid an error.  */
6841 /* We use char because int might match the return type of a gcc2
6842     builtin and then its argument prototype would still apply.  */
6843 char $ac_func();
6844
6845 int main() {
6846
6847 /* The GNU C library defines this for functions which it implements
6848     to always fail with ENOSYS.  Some functions are actually named
6849     something starting with __ and the normal name is an alias.  */
6850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6851 choke me
6852 #else
6853 $ac_func();
6854 #endif
6855
6856 ; return 0; }
6857 EOF
6858 if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6859   rm -rf conftest*
6860   eval "ac_cv_func_$ac_func=yes"
6861 else
6862   echo "configure: failed program was:" >&5
6863   cat conftest.$ac_ext >&5
6864   rm -rf conftest*
6865   eval "ac_cv_func_$ac_func=no"
6866 fi
6867 rm -f conftest*
6868
6869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6870   echo "$ac_t""yes" 1>&6
6871     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6872   { test "$extra_verbose" = "yes" && cat << EOF
6873     Defining $ac_tr_func
6874 EOF
6875 cat >> confdefs.h <<EOF
6876 #define $ac_tr_func 1
6877 EOF
6878 }
6879  
6880 else
6881   echo "$ac_t""no" 1>&6
6882 fi
6883 done
6884
6885   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6886 echo "configure:6887: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6887   cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890
6891 #define NeedFunctionPrototypes 1
6892 #include <X11/Xlib.h>
6893 extern Bool XRegisterIMInstantiateCallback(
6894    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6895
6896 int main() {
6897
6898 ; return 0; }
6899 EOF
6900 if { (eval echo configure:6901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6901   rm -rf conftest*
6902   echo "$ac_t""yes" 1>&6
6903 else
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   echo "$ac_t""no" 1>&6
6908    { test "$extra_verbose" = "yes" && cat << \EOF
6909     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6910 EOF
6911 cat >> confdefs.h <<\EOF
6912 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6913 EOF
6914 }
6915
6916 fi
6917 rm -f conftest*
6918
6919     test -z "$with_xmu" && { 
6920 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6921 echo "configure:6922: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6922 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6923
6924 xe_check_libs=" -lXmu "
6925 cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 /* Override any gcc2 internal prototype to avoid an error.  */
6929 /* We use char because int might match the return type of a gcc2
6930     builtin and then its argument prototype would still apply.  */
6931 char XmuReadBitmapDataFromFile();
6932
6933 int main() {
6934 XmuReadBitmapDataFromFile()
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=yes"
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=no"
6945 fi
6946 rm -f conftest*
6947 xe_check_libs=""
6948
6949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6950   echo "$ac_t""yes" 1>&6
6951   with_xmu=yes
6952 else
6953   echo "$ac_t""no" 1>&6
6954 with_xmu=no
6955 fi
6956
6957  }
6958   if test "$with_xmu" = "no"; then
6959     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6960    echo "    xemacs will be linked with \"xmu.o\""
6961  fi
6962   else
6963     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6964     { test "$extra_verbose" = "yes" && cat << \EOF
6965     Defining HAVE_XMU
6966 EOF
6967 cat >> confdefs.h <<\EOF
6968 #define HAVE_XMU 1
6969 EOF
6970 }
6971
6972   fi
6973
6974       
6975 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6976 echo "configure:6977: checking for main in -lXbsd" >&5
6977 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6978
6979 xe_check_libs=" -lXbsd "
6980 cat > conftest.$ac_ext <<EOF
6981 #line 6982 "configure"
6982 #include "confdefs.h"
6983
6984 int main() {
6985 main()
6986 ; return 0; }
6987 EOF
6988 if { (eval echo configure:6989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6989   rm -rf conftest*
6990   eval "ac_cv_lib_$ac_lib_var=yes"
6991 else
6992   echo "configure: failed program was:" >&5
6993   cat conftest.$ac_ext >&5
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=no"
6996 fi
6997 rm -f conftest*
6998 xe_check_libs=""
6999
7000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7001   echo "$ac_t""yes" 1>&6
7002   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7003 else
7004   echo "$ac_t""no" 1>&6
7005 fi
7006
7007
7008
7009     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7010         if test "$GCC" = "yes"; then
7011       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
7012       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
7013     else
7014       case "$CC" in
7015         "xlc" ) CC="xlc_r" ;;
7016         "xlC" ) CC="xlC_r" ;;
7017         "cc"  ) CC="cc_r" ;;
7018       esac
7019     fi
7020   fi
7021
7022 fi 
7023 if test "$with_msw" != "no"; then
7024   echo "checking for MS-Windows" 1>&6
7025 echo "configure:7026: checking for MS-Windows" >&5
7026   
7027 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7028 echo "configure:7029: checking for main in -lgdi32" >&5
7029 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7030
7031 xe_check_libs=" -lgdi32 "
7032 cat > conftest.$ac_ext <<EOF
7033 #line 7034 "configure"
7034 #include "confdefs.h"
7035
7036 int main() {
7037 main()
7038 ; return 0; }
7039 EOF
7040 if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7041   rm -rf conftest*
7042   eval "ac_cv_lib_$ac_lib_var=yes"
7043 else
7044   echo "configure: failed program was:" >&5
7045   cat conftest.$ac_ext >&5
7046   rm -rf conftest*
7047   eval "ac_cv_lib_$ac_lib_var=no"
7048 fi
7049 rm -f conftest*
7050 xe_check_libs=""
7051
7052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7053   echo "$ac_t""yes" 1>&6
7054   with_msw=yes
7055 else
7056   echo "$ac_t""no" 1>&6
7057 fi
7058
7059
7060   if test "$with_msw" = "yes"; then
7061     { test "$extra_verbose" = "yes" && cat << \EOF
7062     Defining HAVE_MS_WINDOWS
7063 EOF
7064 cat >> confdefs.h <<\EOF
7065 #define HAVE_MS_WINDOWS 1
7066 EOF
7067 }
7068
7069
7070         if test "$with_netinstall" = "yes"; then
7071       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7072       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7073       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7074     fi
7075
7076     install_pp="$blddir/lib-src/installexe.sh"
7077     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
7078     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7079     if test "$window_system" != x11; then
7080         window_system=msw
7081         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7082             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7083    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7084  fi
7085         test "$with_menubars"   != "no" && with_menubars=msw \
7086             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7087    echo "    xemacs will be linked with \"menubar-msw.o\""
7088  fi
7089         test "$with_toolbars"   != "no" && with_toolbars=msw \
7090             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7091    echo "    xemacs will be linked with \"toolbar-msw.o\""
7092  fi
7093         test "$with_dialogs"   != "no" && with_dialogs=msw \
7094             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7095    echo "    xemacs will be linked with \"dialog-msw.o\""
7096  fi
7097         test "$with_widgets"   != "no" && with_widgets=msw
7098     else
7099         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7100    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7101  fi
7102         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7103    echo "    xemacs will be linked with \"menubar-msw.o\""
7104  fi
7105         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7106    echo "    xemacs will be linked with \"toolbar-msw.o\""
7107  fi
7108         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7109    echo "    xemacs will be linked with \"dialog-msw.o\""
7110  fi
7111     fi
7112         cat > conftest.$ac_ext <<EOF
7113 #line 7114 "configure"
7114 #include "confdefs.h"
7115 #include <fcntl.h>
7116     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7117 EOF
7118 if { (eval echo configure:7119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7119 then
7120   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7121     Defining HAVE_MSG_SELECT
7122 EOF
7123 cat >> confdefs.h <<\EOF
7124 #define HAVE_MSG_SELECT 1
7125 EOF
7126 }
7127
7128 else
7129   conftest_rc="$?"
7130   echo "configure: failed program was:" >&5
7131   cat conftest.$ac_ext >&5
7132 fi
7133 rm -fr conftest*
7134     with_file_coding=yes
7135     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
7136    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\""
7137  fi
7138   fi
7139 fi
7140
7141
7142
7143 test -z "$window_system" && window_system="none"
7144
7145 if test "$window_system" = "none"; then
7146   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7147   do
7148     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7149        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7150     fi
7151     eval "with_${feature}=no"
7152   done
7153 else
7154   test -z "$with_toolbars" && with_toolbars=yes
7155 fi
7156
7157 if test "$with_msw" != "yes"; then
7158   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7159   do
7160     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7161        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7162     fi
7163     eval "with_${feature}=no"
7164   done
7165 else
7166   :
7167 fi
7168
7169 if test "$with_x11" != "yes"; then
7170             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7171   do
7172     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7173        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7174     fi
7175     eval "with_${feature}=no"
7176   done
7177 fi
7178
7179 if test "$with_x11" = "yes"; then
7180   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7181 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7182 echo "configure:7183: checking for X11/extensions/shape.h" >&5
7183
7184 cat > conftest.$ac_ext <<EOF
7185 #line 7186 "configure"
7186 #include "confdefs.h"
7187 #include <X11/extensions/shape.h>
7188 EOF
7189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7190 { (eval echo configure:7191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7192 if test -z "$ac_err"; then
7193   rm -rf conftest*
7194   eval "ac_cv_header_$ac_safe=yes"
7195 else
7196   echo "$ac_err" >&5
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_header_$ac_safe=no"
7201 fi
7202 rm -f conftest*
7203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7204   echo "$ac_t""yes" 1>&6
7205   
7206    { test "$extra_verbose" = "yes" && cat << \EOF
7207     Defining HAVE_BALLOON_HELP
7208 EOF
7209 cat >> confdefs.h <<\EOF
7210 #define HAVE_BALLOON_HELP 1
7211 EOF
7212 }
7213
7214    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7215    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7216  fi
7217 else
7218   echo "$ac_t""no" 1>&6
7219 fi
7220
7221 fi
7222
7223 bitmapdir=
7224
7225 case "$window_system" in
7226   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7227   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7228   gtk  )
7229        HAVE_X_WINDOWS=no
7230        test "$with_gnome" = "yes" && echo "  Using GNOME."
7231        test "$with_gnome" = "no" && echo "  Using GTK."
7232        ;;
7233   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7234 esac
7235
7236 case "$x_libraries" in *X11R4* )
7237   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7238   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7239 esac
7240
7241 echo "checking for WM_COMMAND option" 1>&6
7242 echo "configure:7243: checking for WM_COMMAND option" >&5;
7243 if test "$with_wmcommand" != "no"; then
7244   { test "$extra_verbose" = "yes" && cat << \EOF
7245     Defining HAVE_WMCOMMAND
7246 EOF
7247 cat >> confdefs.h <<\EOF
7248 #define HAVE_WMCOMMAND 1
7249 EOF
7250 }
7251
7252 fi
7253
7254 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7255 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7256 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7257 echo "configure:7258: checking for X11/Xauth.h" >&5
7258
7259 cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 #include <X11/Xauth.h>
7263 EOF
7264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7265 { (eval echo configure:7266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7267 if test -z "$ac_err"; then
7268   rm -rf conftest*
7269   eval "ac_cv_header_$ac_safe=yes"
7270 else
7271   echo "$ac_err" >&5
7272   echo "configure: failed program was:" >&5
7273   cat conftest.$ac_ext >&5
7274   rm -rf conftest*
7275   eval "ac_cv_header_$ac_safe=no"
7276 fi
7277 rm -f conftest*
7278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7279   echo "$ac_t""yes" 1>&6
7280   :
7281 else
7282   echo "$ac_t""no" 1>&6
7283 with_xauth=no
7284 fi
7285  }
7286 test -z "$with_xauth" && { 
7287 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7288 echo "configure:7289: checking for XauGetAuthByAddr in -lXau" >&5
7289 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7290
7291 xe_check_libs=" -lXau "
7292 cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7295 /* Override any gcc2 internal prototype to avoid an error.  */
7296 /* We use char because int might match the return type of a gcc2
7297     builtin and then its argument prototype would still apply.  */
7298 char XauGetAuthByAddr();
7299
7300 int main() {
7301 XauGetAuthByAddr()
7302 ; return 0; }
7303 EOF
7304 if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7305   rm -rf conftest*
7306   eval "ac_cv_lib_$ac_lib_var=yes"
7307 else
7308   echo "configure: failed program was:" >&5
7309   cat conftest.$ac_ext >&5
7310   rm -rf conftest*
7311   eval "ac_cv_lib_$ac_lib_var=no"
7312 fi
7313 rm -f conftest*
7314 xe_check_libs=""
7315
7316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7317   echo "$ac_t""yes" 1>&6
7318   :
7319 else
7320   echo "$ac_t""no" 1>&6
7321 with_xauth=no
7322 fi
7323
7324  }
7325 test -z "$with_xauth" && with_xauth=yes
7326 if test "$with_xauth" = "yes"; then
7327   { test "$extra_verbose" = "yes" && cat << \EOF
7328     Defining HAVE_XAUTH
7329 EOF
7330 cat >> confdefs.h <<\EOF
7331 #define HAVE_XAUTH 1
7332 EOF
7333 }
7334
7335   
7336 T=""
7337 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
7338 libs_xauth="$T"
7339
7340 fi
7341
7342
7343
7344
7345 if test "$with_tooltalk" != "no" ; then
7346       for dir in "" "Tt/" "desktop/" ; do
7347     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7348 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7349 echo "configure:7350: checking for ${dir}tt_c.h" >&5
7350
7351 cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 #include <${dir}tt_c.h>
7355 EOF
7356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7357 { (eval echo configure:7358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7359 if test -z "$ac_err"; then
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=yes"
7362 else
7363   echo "$ac_err" >&5
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=no"
7368 fi
7369 rm -f conftest*
7370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372   tt_c_h_file="${dir}tt_c.h"; break
7373 else
7374   echo "$ac_t""no" 1>&6
7375 fi
7376
7377   done
7378   if test -z "$tt_c_h_file"; then
7379     if test "$with_tooltalk" = "yes"; then
7380       (echo "$progname: Usage error:"
7381 echo " " "Unable to find required tooltalk header files."
7382 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7383     fi
7384     with_tooltalk=no
7385   fi
7386 fi
7387 if test "$with_tooltalk" != "no" ; then
7388   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7389     
7390 xe_msg_checking="for tt_message_create in -ltt"
7391 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7392 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7393 echo "configure:7394: checking "$xe_msg_checking"" >&5
7394 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7395
7396 xe_check_libs=" -ltt $extra_libs"
7397 cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 /* Override any gcc2 internal prototype to avoid an error.  */
7401 /* We use char because int might match the return type of a gcc2
7402     builtin and then its argument prototype would still apply.  */
7403 char tt_message_create();
7404
7405 int main() {
7406 tt_message_create()
7407 ; return 0; }
7408 EOF
7409 if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7410   rm -rf conftest*
7411   eval "ac_cv_lib_$ac_lib_var=yes"
7412 else
7413   echo "configure: failed program was:" >&5
7414   cat conftest.$ac_ext >&5
7415   rm -rf conftest*
7416   eval "ac_cv_lib_$ac_lib_var=no"
7417 fi
7418 rm -f conftest*
7419 xe_check_libs=""
7420
7421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7422   echo "$ac_t""yes" 1>&6
7423   tt_libs="-ltt $extra_libs"; break
7424 else
7425   echo "$ac_t""no" 1>&6
7426 :
7427 fi
7428
7429
7430   done
7431   if test -z "$tt_libs"; then
7432     if test "$with_tooltalk" = "yes"; then
7433       (echo "$progname: Usage error:"
7434 echo " " "Unable to find required tooltalk libraries."
7435 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7436     fi
7437     with_tooltalk=no
7438   fi
7439 fi
7440 test -z "$with_tooltalk" && with_tooltalk=yes
7441 if test "$with_tooltalk" = "yes"; then
7442   { test "$extra_verbose" = "yes" && cat << \EOF
7443     Defining TOOLTALK
7444 EOF
7445 cat >> confdefs.h <<\EOF
7446 #define TOOLTALK 1
7447 EOF
7448 }
7449
7450   { test "$extra_verbose" = "yes" && cat << EOF
7451     Defining TT_C_H_FILE = "$tt_c_h_file"
7452 EOF
7453 cat >> confdefs.h <<EOF
7454 #define TT_C_H_FILE "$tt_c_h_file"
7455 EOF
7456 }
7457
7458   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7459   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7460    echo "    xemacs will be linked with \"tooltalk.o\""
7461  fi
7462 fi
7463
7464 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7465 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7466 echo "configure:7467: checking for Dt/Dt.h" >&5
7467
7468 cat > conftest.$ac_ext <<EOF
7469 #line 7470 "configure"
7470 #include "confdefs.h"
7471 #include <Dt/Dt.h>
7472 EOF
7473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7474 { (eval echo configure:7475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7476 if test -z "$ac_err"; then
7477   rm -rf conftest*
7478   eval "ac_cv_header_$ac_safe=yes"
7479 else
7480   echo "$ac_err" >&5
7481   echo "configure: failed program was:" >&5
7482   cat conftest.$ac_ext >&5
7483   rm -rf conftest*
7484   eval "ac_cv_header_$ac_safe=no"
7485 fi
7486 rm -f conftest*
7487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7488   echo "$ac_t""yes" 1>&6
7489   :
7490 else
7491   echo "$ac_t""no" 1>&6
7492 with_cde=no
7493 fi
7494  }
7495 test -z "$with_cde" && { 
7496 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7497 echo "configure:7498: checking for DtDndDragStart in -lDtSvc" >&5
7498 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7499
7500 xe_check_libs=" -lDtSvc "
7501 cat > conftest.$ac_ext <<EOF
7502 #line 7503 "configure"
7503 #include "confdefs.h"
7504 /* Override any gcc2 internal prototype to avoid an error.  */
7505 /* We use char because int might match the return type of a gcc2
7506     builtin and then its argument prototype would still apply.  */
7507 char DtDndDragStart();
7508
7509 int main() {
7510 DtDndDragStart()
7511 ; return 0; }
7512 EOF
7513 if { (eval echo configure:7514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7514   rm -rf conftest*
7515   eval "ac_cv_lib_$ac_lib_var=yes"
7516 else
7517   echo "configure: failed program was:" >&5
7518   cat conftest.$ac_ext >&5
7519   rm -rf conftest*
7520   eval "ac_cv_lib_$ac_lib_var=no"
7521 fi
7522 rm -f conftest*
7523 xe_check_libs=""
7524
7525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7526   echo "$ac_t""yes" 1>&6
7527   :
7528 else
7529   echo "$ac_t""no" 1>&6
7530 with_cde=no
7531 fi
7532
7533  }
7534 test -z "$with_cde" && with_cde=yes
7535 if test "$with_dragndrop" = no; then
7536   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7537   with_cde=no
7538 fi
7539 if test "$with_cde" = "yes" ; then
7540   { test "$extra_verbose" = "yes" && cat << \EOF
7541     Defining HAVE_CDE
7542 EOF
7543 cat >> confdefs.h <<\EOF
7544 #define HAVE_CDE 1
7545 EOF
7546 }
7547
7548   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7549   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7550   with_tooltalk=yes # CDE requires Tooltalk
7551   need_motif=yes    # CDE requires Motif
7552 fi
7553
7554 test "$window_system" != "x11" && with_offix=no
7555 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7556   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7557   with_offix=no
7558 fi
7559 if test "$with_dragndrop" = no; then
7560   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7561   with_offix=no
7562 fi
7563 if test "$with_cde" = yes; then
7564   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7565   with_offix=no
7566 fi
7567 test -z "$with_offix" && with_offix=no
7568 if test "$with_offix" = "yes"; then
7569   { test "$extra_verbose" = "yes" && cat << \EOF
7570     Defining HAVE_OFFIX_DND
7571 EOF
7572 cat >> confdefs.h <<\EOF
7573 #define HAVE_OFFIX_DND 1
7574 EOF
7575 }
7576
7577   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7578   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7579 fi
7580 if test "$with_gtk" = "yes"; then
7581    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7582 fi
7583
7584 if test "$with_dragndrop" != "no" ; then
7585   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7586 echo "configure:7587: checking if drag and drop API is needed" >&5
7587   if test -n "$dragndrop_proto" ; then
7588     with_dragndrop=yes
7589     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7590     { test "$extra_verbose" = "yes" && cat << \EOF
7591     Defining HAVE_DRAGNDROP
7592 EOF
7593 cat >> confdefs.h <<\EOF
7594 #define HAVE_DRAGNDROP 1
7595 EOF
7596 }
7597
7598     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7599   else
7600     with_dragndrop=no
7601     echo "$ac_t""no" 1>&6
7602   fi
7603 fi
7604
7605 echo "checking for LDAP" 1>&6
7606 echo "configure:7607: checking for LDAP" >&5
7607 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7608 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7609 echo "configure:7610: checking for ldap.h" >&5
7610
7611 cat > conftest.$ac_ext <<EOF
7612 #line 7613 "configure"
7613 #include "confdefs.h"
7614 #include <ldap.h>
7615 EOF
7616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7617 { (eval echo configure:7618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7619 if test -z "$ac_err"; then
7620   rm -rf conftest*
7621   eval "ac_cv_header_$ac_safe=yes"
7622 else
7623   echo "$ac_err" >&5
7624   echo "configure: failed program was:" >&5
7625   cat conftest.$ac_ext >&5
7626   rm -rf conftest*
7627   eval "ac_cv_header_$ac_safe=no"
7628 fi
7629 rm -f conftest*
7630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7631   echo "$ac_t""yes" 1>&6
7632   :
7633 else
7634   echo "$ac_t""no" 1>&6
7635 with_ldap=no
7636 fi
7637  }
7638 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7639 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7640 echo "configure:7641: checking for lber.h" >&5
7641
7642 cat > conftest.$ac_ext <<EOF
7643 #line 7644 "configure"
7644 #include "confdefs.h"
7645 #include <lber.h>
7646 EOF
7647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7648 { (eval echo configure:7649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7650 if test -z "$ac_err"; then
7651   rm -rf conftest*
7652   eval "ac_cv_header_$ac_safe=yes"
7653 else
7654   echo "$ac_err" >&5
7655   echo "configure: failed program was:" >&5
7656   cat conftest.$ac_ext >&5
7657   rm -rf conftest*
7658   eval "ac_cv_header_$ac_safe=no"
7659 fi
7660 rm -f conftest*
7661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7662   echo "$ac_t""yes" 1>&6
7663   :
7664 else
7665   echo "$ac_t""no" 1>&6
7666 with_ldap=no
7667 fi
7668  }
7669 if test "$with_ldap" != "no"; then
7670   
7671 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7672 echo "configure:7673: checking for ldap_search in -lldap" >&5
7673 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7674
7675 xe_check_libs=" -lldap "
7676 cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* Override any gcc2 internal prototype to avoid an error.  */
7680 /* We use char because int might match the return type of a gcc2
7681     builtin and then its argument prototype would still apply.  */
7682 char ldap_search();
7683
7684 int main() {
7685 ldap_search()
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7689   rm -rf conftest*
7690   eval "ac_cv_lib_$ac_lib_var=yes"
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   eval "ac_cv_lib_$ac_lib_var=no"
7696 fi
7697 rm -f conftest*
7698 xe_check_libs=""
7699
7700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7701   echo "$ac_t""yes" 1>&6
7702   with_ldap_nolber=yes
7703 else
7704   echo "$ac_t""no" 1>&6
7705 with_ldap_nolber=no
7706 fi
7707
7708
7709   test "$with_ldap_nolber" = "no" && { 
7710 xe_msg_checking="for ldap_open in -lldap"
7711 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7712 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7713 echo "configure:7714: checking "$xe_msg_checking"" >&5
7714 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7715
7716 xe_check_libs=" -lldap -llber"
7717 cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char ldap_open();
7724
7725 int main() {
7726 ldap_open()
7727 ; return 0; }
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7730   rm -rf conftest*
7731   eval "ac_cv_lib_$ac_lib_var=yes"
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -rf conftest*
7736   eval "ac_cv_lib_$ac_lib_var=no"
7737 fi
7738 rm -f conftest*
7739 xe_check_libs=""
7740
7741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7742   echo "$ac_t""yes" 1>&6
7743   with_ldap_lber=yes
7744 else
7745   echo "$ac_t""no" 1>&6
7746 with_ldap_lber=no
7747 fi
7748
7749  }
7750   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7751 xe_msg_checking="for ldap_open in -lldap"
7752 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7753 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7754 echo "configure:7755: checking "$xe_msg_checking"" >&5
7755 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7756
7757 xe_check_libs=" -lldap -llber -lkrb"
7758 cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 /* Override any gcc2 internal prototype to avoid an error.  */
7762 /* We use char because int might match the return type of a gcc2
7763     builtin and then its argument prototype would still apply.  */
7764 char ldap_open();
7765
7766 int main() {
7767 ldap_open()
7768 ; return 0; }
7769 EOF
7770 if { (eval echo configure:7771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7771   rm -rf conftest*
7772   eval "ac_cv_lib_$ac_lib_var=yes"
7773 else
7774   echo "configure: failed program was:" >&5
7775   cat conftest.$ac_ext >&5
7776   rm -rf conftest*
7777   eval "ac_cv_lib_$ac_lib_var=no"
7778 fi
7779 rm -f conftest*
7780 xe_check_libs=""
7781
7782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7783   echo "$ac_t""yes" 1>&6
7784   with_ldap_krb=yes
7785 else
7786   echo "$ac_t""no" 1>&6
7787 with_ldap_krb=no
7788 fi
7789
7790  }
7791   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7792 xe_msg_checking="for ldap_open in -lldap"
7793 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7794 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7795 echo "configure:7796: checking "$xe_msg_checking"" >&5
7796 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7797
7798 xe_check_libs=" -lldap -llber -lkrb -ldes"
7799 cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* Override any gcc2 internal prototype to avoid an error.  */
7803 /* We use char because int might match the return type of a gcc2
7804     builtin and then its argument prototype would still apply.  */
7805 char ldap_open();
7806
7807 int main() {
7808 ldap_open()
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=yes"
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   eval "ac_cv_lib_$ac_lib_var=no"
7819 fi
7820 rm -f conftest*
7821 xe_check_libs=""
7822
7823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7824   echo "$ac_t""yes" 1>&6
7825   with_ldap_krbdes=yes
7826 else
7827   echo "$ac_t""no" 1>&6
7828 with_ldap_krbdes=no
7829 fi
7830
7831  }
7832   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
7833 fi
7834 if test "$with_ldap" = "yes"; then
7835   { test "$extra_verbose" = "yes" && cat << \EOF
7836     Defining HAVE_LDAP
7837 EOF
7838 cat >> confdefs.h <<\EOF
7839 #define HAVE_LDAP 1
7840 EOF
7841 }
7842
7843   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7844    echo "    xemacs will be linked with \"eldap.o\""
7845  fi
7846   if test "$with_ldap_nolber" = "yes" ; then
7847     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7848   else
7849     if test "$with_ldap_krb" = "yes" ; then
7850       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7851     fi
7852     if test "$with_ldap_krbdes" = "yes" ; then
7853       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7854       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7855     fi
7856     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7857     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7858   fi
7859   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7860 do
7861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7862 echo "configure:7863: checking for $ac_func" >&5
7863
7864 cat > conftest.$ac_ext <<EOF
7865 #line 7866 "configure"
7866 #include "confdefs.h"
7867 /* System header to define __stub macros and hopefully few prototypes,
7868     which can conflict with char $ac_func(); below.  */
7869 #include <assert.h>
7870 /* Override any gcc2 internal prototype to avoid an error.  */
7871 /* We use char because int might match the return type of a gcc2
7872     builtin and then its argument prototype would still apply.  */
7873 char $ac_func();
7874
7875 int main() {
7876
7877 /* The GNU C library defines this for functions which it implements
7878     to always fail with ENOSYS.  Some functions are actually named
7879     something starting with __ and the normal name is an alias.  */
7880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7881 choke me
7882 #else
7883 $ac_func();
7884 #endif
7885
7886 ; return 0; }
7887 EOF
7888 if { (eval echo configure:7889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7889   rm -rf conftest*
7890   eval "ac_cv_func_$ac_func=yes"
7891 else
7892   echo "configure: failed program was:" >&5
7893   cat conftest.$ac_ext >&5
7894   rm -rf conftest*
7895   eval "ac_cv_func_$ac_func=no"
7896 fi
7897 rm -f conftest*
7898
7899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7900   echo "$ac_t""yes" 1>&6
7901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7902   { test "$extra_verbose" = "yes" && cat << EOF
7903     Defining $ac_tr_func
7904 EOF
7905 cat >> confdefs.h <<EOF
7906 #define $ac_tr_func 1
7907 EOF
7908 }
7909  
7910 else
7911   echo "$ac_t""no" 1>&6
7912 fi
7913 done
7914
7915 fi
7916
7917 if test "$with_postgresql" != "no"; then
7918   echo "checking for PostgreSQL" 1>&6
7919 echo "configure:7920: checking for PostgreSQL" >&5
7920
7921   for header_dir in "" "pgsql/" "postgresql/"; do
7922     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7923 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7924 echo "configure:7925: checking for ${header_dir}libpq-fe.h" >&5
7925
7926 cat > conftest.$ac_ext <<EOF
7927 #line 7928 "configure"
7928 #include "confdefs.h"
7929 #include <${header_dir}libpq-fe.h>
7930 EOF
7931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7932 { (eval echo configure:7933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7934 if test -z "$ac_err"; then
7935   rm -rf conftest*
7936   eval "ac_cv_header_$ac_safe=yes"
7937 else
7938   echo "$ac_err" >&5
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   eval "ac_cv_header_$ac_safe=no"
7943 fi
7944 rm -f conftest*
7945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7946   echo "$ac_t""yes" 1>&6
7947   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7948 else
7949   echo "$ac_t""no" 1>&6
7950 fi
7951
7952   done
7953
7954   test -n "$libpq_fe_h_file" && { 
7955 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7956 echo "configure:7957: checking for PQconnectdb in -lpq" >&5
7957 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7958
7959 xe_check_libs=" -lpq "
7960 cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 /* We use char because int might match the return type of a gcc2
7965     builtin and then its argument prototype would still apply.  */
7966 char PQconnectdb();
7967
7968 int main() {
7969 PQconnectdb()
7970 ; return 0; }
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=yes"
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   eval "ac_cv_lib_$ac_lib_var=no"
7980 fi
7981 rm -f conftest*
7982 xe_check_libs=""
7983
7984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7985   echo "$ac_t""yes" 1>&6
7986   have_libpq=yes
7987 else
7988   echo "$ac_t""no" 1>&6
7989 fi
7990
7991  }
7992
7993   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7994     with_postgresql=yes
7995     { test "$extra_verbose" = "yes" && cat << \EOF
7996     Defining HAVE_POSTGRESQL
7997 EOF
7998 cat >> confdefs.h <<\EOF
7999 #define HAVE_POSTGRESQL 1
8000 EOF
8001 }
8002
8003     
8004 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8005 echo "configure:8006: checking for PQconnectStart in -lpq" >&5
8006 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8007
8008 xe_check_libs=" -lpq "
8009 cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 /* Override any gcc2 internal prototype to avoid an error.  */
8013 /* We use char because int might match the return type of a gcc2
8014     builtin and then its argument prototype would still apply.  */
8015 char PQconnectStart();
8016
8017 int main() {
8018 PQconnectStart()
8019 ; return 0; }
8020 EOF
8021 if { (eval echo configure:8022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8022   rm -rf conftest*
8023   eval "ac_cv_lib_$ac_lib_var=yes"
8024 else
8025   echo "configure: failed program was:" >&5
8026   cat conftest.$ac_ext >&5
8027   rm -rf conftest*
8028   eval "ac_cv_lib_$ac_lib_var=no"
8029 fi
8030 rm -f conftest*
8031 xe_check_libs=""
8032
8033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8034   echo "$ac_t""yes" 1>&6
8035   with_postgresqlv7=yes;
8036                  { test "$extra_verbose" = "yes" && cat << \EOF
8037     Defining HAVE_POSTGRESQLV7
8038 EOF
8039 cat >> confdefs.h <<\EOF
8040 #define HAVE_POSTGRESQLV7 1
8041 EOF
8042 }
8043
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047
8048
8049     { test "$extra_verbose" = "yes" && cat << EOF
8050     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8051 EOF
8052 cat >> confdefs.h <<EOF
8053 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8054 EOF
8055 }
8056
8057     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8058     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8059    echo "    xemacs will be linked with \"postgresql.o\""
8060  fi
8061   elif test "$with_postgresql" = "yes"; then
8062     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8063   fi
8064 fi
8065
8066
8067 if test "$window_system" != "none"; then
8068   echo "checking for graphics libraries" 1>&6
8069 echo "configure:8070: checking for graphics libraries" >&5
8070
8071       libpath_xpm=
8072   incpath_xpm=
8073   case "$opsys" in 
8074     cygwin*)
8075       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8076       cygwin_top=`eval "dirname ${cygwin_top}"`;
8077       cygwin_top="${cygwin_top}/..";
8078       case "$window_system" in
8079                 x11)  ;;
8080                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8081              incpath_xpm="-I${cygwin_top}/include/noX"
8082               ;;
8083                 gtk)  ;;
8084                 none) ;;
8085                 *)    ;;
8086       esac
8087       ;;
8088         *) ;;
8089   esac
8090     xpm_problem=""
8091   if test -z "$with_xpm"; then
8092     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8093     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8094     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8095 echo "configure:8096: checking for Xpm - no older than 3.4f" >&5
8096     xe_check_libs=-lXpm
8097     cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 #define XPM_NUMBERS
8101 #include <X11/xpm.h>
8102     int main(int c, char **v) {
8103     return c == 1 ? 0 :
8104       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8105       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8108 then
8109   ./conftest dummy_arg; xpm_status=$?;
8110       if test "$xpm_status" = "0"; then
8111         with_xpm=yes;
8112       else
8113         with_xpm=no;
8114         if test "$xpm_status" = "1"; then
8115           xpm_problem="Xpm library version and header file version don't match!"
8116         elif test "$xpm_status" = "2"; then
8117           xpm_problem="Xpm library version is too old!"
8118         else
8119           xpm_problem="Internal xpm detection logic error!"
8120         fi
8121         echo "
8122 *** WARNING *** $xpm_problem
8123   I'm not touching that with a 10-foot pole!
8124   If you really want to use the installed version of Xpm, rerun
8125   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8126     fi
8127 else
8128   conftest_rc="$?"
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -fr conftest*
8132   with_xpm=no
8133 fi
8134 rm -fr conftest*
8135     xe_check_libs=
8136     echo "$ac_t""$with_xpm" 1>&6
8137   fi
8138   if test "$with_xpm" = "yes"; then
8139                 { test "$extra_verbose" = "yes" && cat << \EOF
8140     Defining HAVE_XPM
8141 EOF
8142 cat >> confdefs.h <<\EOF
8143 #define HAVE_XPM 1
8144 EOF
8145 }
8146
8147     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8148     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8149     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8150     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8151 echo "configure:8152: checking for \"FOR_MSW\" xpm" >&5
8152     xe_check_libs=-lXpm
8153     cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156
8157 int main() {
8158 XpmCreatePixmapFromData()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   xpm_for_msw=no
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   xpm_for_msw=yes
8169 fi
8170 rm -f conftest*
8171     xe_check_libs=
8172     echo "$ac_t""$xpm_for_msw" 1>&6
8173     if test "$xpm_for_msw" = "yes"; then
8174       { test "$extra_verbose" = "yes" && cat << \EOF
8175     Defining FOR_MSW
8176 EOF
8177 cat >> confdefs.h <<\EOF
8178 #define FOR_MSW 1
8179 EOF
8180 }
8181
8182     fi
8183   fi
8184
8185     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8186 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8187 echo "configure:8188: checking for compface.h" >&5
8188
8189 cat > conftest.$ac_ext <<EOF
8190 #line 8191 "configure"
8191 #include "confdefs.h"
8192 #include <compface.h>
8193 EOF
8194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8195 { (eval echo configure:8196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8197 if test -z "$ac_err"; then
8198   rm -rf conftest*
8199   eval "ac_cv_header_$ac_safe=yes"
8200 else
8201   echo "$ac_err" >&5
8202   echo "configure: failed program was:" >&5
8203   cat conftest.$ac_ext >&5
8204   rm -rf conftest*
8205   eval "ac_cv_header_$ac_safe=no"
8206 fi
8207 rm -f conftest*
8208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8209   echo "$ac_t""yes" 1>&6
8210   :
8211 else
8212   echo "$ac_t""no" 1>&6
8213 with_xface=no
8214 fi
8215  }
8216   test -z "$with_xface" && { 
8217 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8218 echo "configure:8219: checking for UnGenFace in -lcompface" >&5
8219 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8220
8221 xe_check_libs=" -lcompface "
8222 cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225 /* Override any gcc2 internal prototype to avoid an error.  */
8226 /* We use char because int might match the return type of a gcc2
8227     builtin and then its argument prototype would still apply.  */
8228 char UnGenFace();
8229
8230 int main() {
8231 UnGenFace()
8232 ; return 0; }
8233 EOF
8234 if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=yes"
8237 else
8238   echo "configure: failed program was:" >&5
8239   cat conftest.$ac_ext >&5
8240   rm -rf conftest*
8241   eval "ac_cv_lib_$ac_lib_var=no"
8242 fi
8243 rm -f conftest*
8244 xe_check_libs=""
8245
8246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8247   echo "$ac_t""yes" 1>&6
8248   : 
8249 else
8250   echo "$ac_t""no" 1>&6
8251 with_xface=no
8252 fi
8253
8254  }
8255   test -z "$with_xface" && with_xface=yes
8256   if test "$with_xface" = "yes"; then
8257     { test "$extra_verbose" = "yes" && cat << \EOF
8258     Defining HAVE_XFACE
8259 EOF
8260 cat >> confdefs.h <<\EOF
8261 #define HAVE_XFACE 1
8262 EOF
8263 }
8264
8265     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8266   fi
8267
8268         if test "$with_gif" != "no"; then
8269     with_gif="yes"
8270     { test "$extra_verbose" = "yes" && cat << \EOF
8271     Defining HAVE_GIF
8272 EOF
8273 cat >> confdefs.h <<\EOF
8274 #define HAVE_GIF 1
8275 EOF
8276 }
8277
8278     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8279    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8280  fi
8281   fi
8282
8283       if test "$with_png $with_tiff" != "no no"; then
8284     
8285 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8286 echo "configure:8287: checking for inflate in -lc" >&5
8287 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8288
8289 xe_check_libs=" -lc "
8290 cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* Override any gcc2 internal prototype to avoid an error.  */
8294 /* We use char because int might match the return type of a gcc2
8295     builtin and then its argument prototype would still apply.  */
8296 char inflate();
8297
8298 int main() {
8299 inflate()
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=no"
8310 fi
8311 rm -f conftest*
8312 xe_check_libs=""
8313
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8315   echo "$ac_t""yes" 1>&6
8316   :
8317 else
8318   echo "$ac_t""no" 1>&6
8319
8320 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8321 echo "configure:8322: checking for inflate in -lz" >&5
8322 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8323
8324 xe_check_libs=" -lz "
8325 cat > conftest.$ac_ext <<EOF
8326 #line 8327 "configure"
8327 #include "confdefs.h"
8328 /* Override any gcc2 internal prototype to avoid an error.  */
8329 /* We use char because int might match the return type of a gcc2
8330     builtin and then its argument prototype would still apply.  */
8331 char inflate();
8332
8333 int main() {
8334 inflate()
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   eval "ac_cv_lib_$ac_lib_var=yes"
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   eval "ac_cv_lib_$ac_lib_var=no"
8345 fi
8346 rm -f conftest*
8347 xe_check_libs=""
8348
8349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8350   echo "$ac_t""yes" 1>&6
8351   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8352 else
8353   echo "$ac_t""no" 1>&6
8354
8355 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8356 echo "configure:8357: checking for inflate in -lgz" >&5
8357 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8358
8359 xe_check_libs=" -lgz "
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char inflate();
8367
8368 int main() {
8369 inflate()
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   eval "ac_cv_lib_$ac_lib_var=yes"
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=no"
8380 fi
8381 rm -f conftest*
8382 xe_check_libs=""
8383
8384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8385   echo "$ac_t""yes" 1>&6
8386   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8387 else
8388   echo "$ac_t""no" 1>&6
8389 fi
8390
8391
8392 fi
8393
8394
8395 fi
8396
8397
8398   fi
8399
8400     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8401 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8402 echo "configure:8403: checking for jpeglib.h" >&5
8403
8404 cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 #include <jpeglib.h>
8408 EOF
8409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8410 { (eval echo configure:8411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8412 if test -z "$ac_err"; then
8413   rm -rf conftest*
8414   eval "ac_cv_header_$ac_safe=yes"
8415 else
8416   echo "$ac_err" >&5
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=no"
8421 fi
8422 rm -f conftest*
8423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8424   echo "$ac_t""yes" 1>&6
8425   :
8426 else
8427   echo "$ac_t""no" 1>&6
8428 with_jpeg=no
8429 fi
8430  }
8431   test -z "$with_jpeg" && { 
8432 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8433 echo "configure:8434: checking for jpeg_destroy_decompress in -ljpeg" >&5
8434 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8435
8436 xe_check_libs=" -ljpeg "
8437 cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 /* Override any gcc2 internal prototype to avoid an error.  */
8441 /* We use char because int might match the return type of a gcc2
8442     builtin and then its argument prototype would still apply.  */
8443 char jpeg_destroy_decompress();
8444
8445 int main() {
8446 jpeg_destroy_decompress()
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   eval "ac_cv_lib_$ac_lib_var=yes"
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_lib_$ac_lib_var=no"
8457 fi
8458 rm -f conftest*
8459 xe_check_libs=""
8460
8461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8462   echo "$ac_t""yes" 1>&6
8463   :
8464 else
8465   echo "$ac_t""no" 1>&6
8466 with_jpeg=no
8467 fi
8468
8469  }
8470   test -z "$with_jpeg" && with_jpeg=yes
8471   if test "$with_jpeg" = "yes"; then
8472     { test "$extra_verbose" = "yes" && cat << \EOF
8473     Defining HAVE_JPEG
8474 EOF
8475 cat >> confdefs.h <<\EOF
8476 #define HAVE_JPEG 1
8477 EOF
8478 }
8479
8480     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8481   fi
8482
8483     png_problem=""
8484   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8485 echo "configure:8486: checking for pow" >&5
8486
8487 cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 /* System header to define __stub macros and hopefully few prototypes,
8491     which can conflict with char pow(); below.  */
8492 #include <assert.h>
8493 /* Override any gcc2 internal prototype to avoid an error.  */
8494 /* We use char because int might match the return type of a gcc2
8495     builtin and then its argument prototype would still apply.  */
8496 char pow();
8497
8498 int main() {
8499
8500 /* The GNU C library defines this for functions which it implements
8501     to always fail with ENOSYS.  Some functions are actually named
8502     something starting with __ and the normal name is an alias.  */
8503 #if defined (__stub_pow) || defined (__stub___pow)
8504 choke me
8505 #else
8506 pow();
8507 #endif
8508
8509 ; return 0; }
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8512   rm -rf conftest*
8513   eval "ac_cv_func_pow=yes"
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -rf conftest*
8518   eval "ac_cv_func_pow=no"
8519 fi
8520 rm -f conftest*
8521
8522 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8523   echo "$ac_t""yes" 1>&6
8524   :
8525 else
8526   echo "$ac_t""no" 1>&6
8527 with_png=no
8528 fi
8529  }
8530   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8531 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8532 echo "configure:8533: checking for png.h" >&5
8533
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <png.h>
8538 EOF
8539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8540 { (eval echo configure:8541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8542 if test -z "$ac_err"; then
8543   rm -rf conftest*
8544   eval "ac_cv_header_$ac_safe=yes"
8545 else
8546   echo "$ac_err" >&5
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -rf conftest*
8550   eval "ac_cv_header_$ac_safe=no"
8551 fi
8552 rm -f conftest*
8553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8554   echo "$ac_t""yes" 1>&6
8555   :
8556 else
8557   echo "$ac_t""no" 1>&6
8558 with_png=no
8559 fi
8560  }
8561   test -z "$with_png" && { 
8562 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8563 echo "configure:8564: checking for png_read_image in -lpng" >&5
8564 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8565
8566 xe_check_libs=" -lpng "
8567 cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 /* Override any gcc2 internal prototype to avoid an error.  */
8571 /* We use char because int might match the return type of a gcc2
8572     builtin and then its argument prototype would still apply.  */
8573 char png_read_image();
8574
8575 int main() {
8576 png_read_image()
8577 ; return 0; }
8578 EOF
8579 if { (eval echo configure:8580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8580   rm -rf conftest*
8581   eval "ac_cv_lib_$ac_lib_var=yes"
8582 else
8583   echo "configure: failed program was:" >&5
8584   cat conftest.$ac_ext >&5
8585   rm -rf conftest*
8586   eval "ac_cv_lib_$ac_lib_var=no"
8587 fi
8588 rm -f conftest*
8589 xe_check_libs=""
8590
8591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8592   echo "$ac_t""yes" 1>&6
8593   :
8594 else
8595   echo "$ac_t""no" 1>&6
8596 with_png=no
8597 fi
8598
8599  }
8600   if test -z "$with_png"; then
8601     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8602 echo "configure:8603: checking for workable png version information" >&5
8603     xe_check_libs="-lpng -lz"
8604     cat > conftest.$ac_ext <<EOF
8605 #line 8606 "configure"
8606 #include "confdefs.h"
8607 #include <png.h>
8608     int main(int c, char **v) {
8609     if (c == 1) return 0;
8610     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8611     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8614 then
8615   ./conftest dummy_arg; png_status=$?;
8616       if test "$png_status" = "0"; then
8617         with_png=yes;
8618       else
8619         with_png=no;
8620         if test "$png_status" = "1"; then
8621           png_problem="PNG library version and header file don't match!"
8622         elif test "$png_status" = "2"; then
8623           png_problem="PNG library version too old (pre 1.0.2)!"
8624         fi
8625         echo "
8626 *** WARNING *** $png_problem
8627   I'm not touching that with a 10-foot pole!
8628   If you really want to use the installed version of libPNG, rerun
8629   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8630     fi
8631 else
8632   conftest_rc="$?"
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -fr conftest*
8636   with_png=no
8637 fi
8638 rm -fr conftest*
8639     xe_check_libs=
8640     echo "$ac_t""$with_png" 1>&6
8641   fi
8642   if test "$with_png" = "yes"; then
8643     { test "$extra_verbose" = "yes" && cat << \EOF
8644     Defining HAVE_PNG
8645 EOF
8646 cat >> confdefs.h <<\EOF
8647 #define HAVE_PNG 1
8648 EOF
8649 }
8650
8651     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8652   fi
8653
8654     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8655 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8656 echo "configure:8657: checking for tiffio.h" >&5
8657
8658 cat > conftest.$ac_ext <<EOF
8659 #line 8660 "configure"
8660 #include "confdefs.h"
8661 #include <tiffio.h>
8662 EOF
8663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8664 { (eval echo configure:8665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8666 if test -z "$ac_err"; then
8667   rm -rf conftest*
8668   eval "ac_cv_header_$ac_safe=yes"
8669 else
8670   echo "$ac_err" >&5
8671   echo "configure: failed program was:" >&5
8672   cat conftest.$ac_ext >&5
8673   rm -rf conftest*
8674   eval "ac_cv_header_$ac_safe=no"
8675 fi
8676 rm -f conftest*
8677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8678   echo "$ac_t""yes" 1>&6
8679   :
8680 else
8681   echo "$ac_t""no" 1>&6
8682 with_tiff=no
8683 fi
8684  }
8685   test -z "$with_tiff" && { 
8686 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8687 echo "configure:8688: checking for TIFFClientOpen in -ltiff" >&5
8688 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8689
8690 xe_check_libs=" -ltiff "
8691 cat > conftest.$ac_ext <<EOF
8692 #line 8693 "configure"
8693 #include "confdefs.h"
8694 /* Override any gcc2 internal prototype to avoid an error.  */
8695 /* We use char because int might match the return type of a gcc2
8696     builtin and then its argument prototype would still apply.  */
8697 char TIFFClientOpen();
8698
8699 int main() {
8700 TIFFClientOpen()
8701 ; return 0; }
8702 EOF
8703 if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8704   rm -rf conftest*
8705   eval "ac_cv_lib_$ac_lib_var=yes"
8706 else
8707   echo "configure: failed program was:" >&5
8708   cat conftest.$ac_ext >&5
8709   rm -rf conftest*
8710   eval "ac_cv_lib_$ac_lib_var=no"
8711 fi
8712 rm -f conftest*
8713 xe_check_libs=""
8714
8715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8716   echo "$ac_t""yes" 1>&6
8717   :
8718 else
8719   echo "$ac_t""no" 1>&6
8720 with_tiff=no
8721 fi
8722
8723  }
8724   test -z "$with_tiff" && with_tiff=yes
8725   if test "$with_tiff" = "yes"; then
8726     { test "$extra_verbose" = "yes" && cat << \EOF
8727     Defining HAVE_TIFF
8728 EOF
8729 cat >> confdefs.h <<\EOF
8730 #define HAVE_TIFF 1
8731 EOF
8732 }
8733
8734     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8735   fi
8736 fi
8737
8738
8739 if test "$with_gtk" = "yes"; then
8740     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8741 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8742 echo "configure:8743: checking for compface.h" >&5
8743
8744 cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <compface.h>
8748 EOF
8749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8750 { (eval echo configure:8751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8752 if test -z "$ac_err"; then
8753   rm -rf conftest*
8754   eval "ac_cv_header_$ac_safe=yes"
8755 else
8756   echo "$ac_err" >&5
8757   echo "configure: failed program was:" >&5
8758   cat conftest.$ac_ext >&5
8759   rm -rf conftest*
8760   eval "ac_cv_header_$ac_safe=no"
8761 fi
8762 rm -f conftest*
8763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8764   echo "$ac_t""yes" 1>&6
8765   :
8766 else
8767   echo "$ac_t""no" 1>&6
8768 with_xface=no
8769 fi
8770  }
8771   test -z "$with_xface" && { 
8772 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8773 echo "configure:8774: checking for UnGenFace in -lcompface" >&5
8774 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8775
8776 xe_check_libs=" -lcompface "
8777 cat > conftest.$ac_ext <<EOF
8778 #line 8779 "configure"
8779 #include "confdefs.h"
8780 /* Override any gcc2 internal prototype to avoid an error.  */
8781 /* We use char because int might match the return type of a gcc2
8782     builtin and then its argument prototype would still apply.  */
8783 char UnGenFace();
8784
8785 int main() {
8786 UnGenFace()
8787 ; return 0; }
8788 EOF
8789 if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8790   rm -rf conftest*
8791   eval "ac_cv_lib_$ac_lib_var=yes"
8792 else
8793   echo "configure: failed program was:" >&5
8794   cat conftest.$ac_ext >&5
8795   rm -rf conftest*
8796   eval "ac_cv_lib_$ac_lib_var=no"
8797 fi
8798 rm -f conftest*
8799 xe_check_libs=""
8800
8801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8802   echo "$ac_t""yes" 1>&6
8803   : 
8804 else
8805   echo "$ac_t""no" 1>&6
8806 with_xface=no
8807 fi
8808
8809  }
8810   test -z "$with_xface" && with_xface=yes
8811   if test "$with_xface" = "yes"; then
8812     { test "$extra_verbose" = "yes" && cat << \EOF
8813     Defining HAVE_XFACE
8814 EOF
8815 cat >> confdefs.h <<\EOF
8816 #define HAVE_XFACE 1
8817 EOF
8818 }
8819
8820     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8821   fi
8822 fi
8823
8824
8825
8826 if test "$with_x11" = "yes"; then
8827   echo "checking for X11 graphics libraries" 1>&6
8828 echo "configure:8829: checking for X11 graphics libraries" >&5
8829 fi
8830
8831 case "$with_widgets" in
8832   "yes" | "athena")             detect_athena=yes ;;
8833    *)                           detect_athena=no ;;
8834 esac
8835
8836 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8837   echo "checking for the Athena widgets" 1>&6
8838 echo "configure:8839: checking for the Athena widgets" >&5
8839
8840     case "$with_athena" in
8841         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8842     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8843     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8844     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8845     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8846     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8847   esac
8848
8849     if test "$athena_3d" = "no"; then
8850     
8851 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8852 echo "configure:8853: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8853 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8854
8855 xe_check_libs=" -l$athena_variant "
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* Override any gcc2 internal prototype to avoid an error.  */
8860 /* We use char because int might match the return type of a gcc2
8861     builtin and then its argument prototype would still apply.  */
8862 char XawScrollbarSetThumb();
8863
8864 int main() {
8865 XawScrollbarSetThumb()
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   eval "ac_cv_lib_$ac_lib_var=yes"
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_lib_$ac_lib_var=no"
8876 fi
8877 rm -f conftest*
8878 xe_check_libs=""
8879
8880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8881   echo "$ac_t""yes" 1>&6
8882           
8883 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8884 echo "configure:8885: checking for threeDClassRec in -l$athena_variant" >&5
8885 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8886
8887 xe_check_libs=" -l$athena_variant "
8888 cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* Override any gcc2 internal prototype to avoid an error.  */
8892 /* We use char because int might match the return type of a gcc2
8893     builtin and then its argument prototype would still apply.  */
8894 char threeDClassRec();
8895
8896 int main() {
8897 threeDClassRec()
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   eval "ac_cv_lib_$ac_lib_var=yes"
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=no"
8908 fi
8909 rm -f conftest*
8910 xe_check_libs=""
8911
8912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8913   echo "$ac_t""yes" 1>&6
8914   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8915 else
8916   echo "$ac_t""no" 1>&6
8917 athena_lib=$athena_variant
8918 fi
8919
8920
8921       
8922 else
8923   echo "$ac_t""no" 1>&6
8924 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8925 fi
8926
8927
8928   else
8929         
8930 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8931 echo "configure:8932: checking for threeDClassRec in -l$athena_variant" >&5
8932 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8933
8934 xe_check_libs=" -l$athena_variant "
8935 cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* Override any gcc2 internal prototype to avoid an error.  */
8939 /* We use char because int might match the return type of a gcc2
8940     builtin and then its argument prototype would still apply.  */
8941 char threeDClassRec();
8942
8943 int main() {
8944 threeDClassRec()
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_lib_$ac_lib_var=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=no"
8955 fi
8956 rm -f conftest*
8957 xe_check_libs=""
8958
8959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8960   echo "$ac_t""yes" 1>&6
8961   athena_lib=$athena_variant
8962 else
8963   echo "$ac_t""no" 1>&6
8964 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8965 echo "configure:8966: checking for threeDClassRec in -lXaw" >&5
8966 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8967
8968 xe_check_libs=" -lXaw "
8969 cat > conftest.$ac_ext <<EOF
8970 #line 8971 "configure"
8971 #include "confdefs.h"
8972 /* Override any gcc2 internal prototype to avoid an error.  */
8973 /* We use char because int might match the return type of a gcc2
8974     builtin and then its argument prototype would still apply.  */
8975 char threeDClassRec();
8976
8977 int main() {
8978 threeDClassRec()
8979 ; return 0; }
8980 EOF
8981 if { (eval echo configure:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8982   rm -rf conftest*
8983   eval "ac_cv_lib_$ac_lib_var=yes"
8984 else
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -rf conftest*
8988   eval "ac_cv_lib_$ac_lib_var=no"
8989 fi
8990 rm -f conftest*
8991 xe_check_libs=""
8992
8993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8994   echo "$ac_t""yes" 1>&6
8995   athena_lib=Xaw;
8996           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8997         
8998 else
8999   echo "$ac_t""no" 1>&6
9000 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9001 fi
9002
9003
9004 fi
9005
9006
9007   fi
9008
9009     if test "$athena_3d" = "no"; then
9010     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9011 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9012 echo "configure:9013: checking for X11/Xaw/ThreeD.h" >&5
9013
9014 cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017 #include <X11/Xaw/ThreeD.h>
9018 EOF
9019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9020 { (eval echo configure:9021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9022 if test -z "$ac_err"; then
9023   rm -rf conftest*
9024   eval "ac_cv_header_$ac_safe=yes"
9025 else
9026   echo "$ac_err" >&5
9027   echo "configure: failed program was:" >&5
9028   cat conftest.$ac_ext >&5
9029   rm -rf conftest*
9030   eval "ac_cv_header_$ac_safe=no"
9031 fi
9032 rm -f conftest*
9033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9034   echo "$ac_t""yes" 1>&6
9035   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9036 else
9037   echo "$ac_t""no" 1>&6
9038 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9039 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9040 echo "configure:9041: checking for X11/Xaw/XawInit.h" >&5
9041
9042 cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 #include <X11/Xaw/XawInit.h>
9046 EOF
9047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9048 { (eval echo configure:9049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9050 if test -z "$ac_err"; then
9051   rm -rf conftest*
9052   eval "ac_cv_header_$ac_safe=yes"
9053 else
9054   echo "$ac_err" >&5
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_header_$ac_safe=no"
9059 fi
9060 rm -f conftest*
9061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9062   echo "$ac_t""yes" 1>&6
9063   athena_h_path=X11/Xaw
9064 else
9065   echo "$ac_t""no" 1>&6
9066 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9067 fi
9068
9069 fi
9070
9071   else
9072             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9073 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9074 echo "configure:9075: checking for X11/$athena_variant/XawInit.h" >&5
9075
9076 cat > conftest.$ac_ext <<EOF
9077 #line 9078 "configure"
9078 #include "confdefs.h"
9079 #include <X11/$athena_variant/XawInit.h>
9080 EOF
9081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9082 { (eval echo configure:9083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9084 if test -z "$ac_err"; then
9085   rm -rf conftest*
9086   eval "ac_cv_header_$ac_safe=yes"
9087 else
9088   echo "$ac_err" >&5
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -rf conftest*
9092   eval "ac_cv_header_$ac_safe=no"
9093 fi
9094 rm -f conftest*
9095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9096   echo "$ac_t""yes" 1>&6
9097   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9098 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9099 echo "configure:9100: checking for X11/$athena_variant/ThreeD.h" >&5
9100
9101 cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104 #include <X11/$athena_variant/ThreeD.h>
9105 EOF
9106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9107 { (eval echo configure:9108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9109 if test -z "$ac_err"; then
9110   rm -rf conftest*
9111   eval "ac_cv_header_$ac_safe=yes"
9112 else
9113   echo "$ac_err" >&5
9114   echo "configure: failed program was:" >&5
9115   cat conftest.$ac_ext >&5
9116   rm -rf conftest*
9117   eval "ac_cv_header_$ac_safe=no"
9118 fi
9119 rm -f conftest*
9120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9121   echo "$ac_t""yes" 1>&6
9122   athena_h_path=X11/$athena_variant
9123 else
9124   echo "$ac_t""no" 1>&6
9125 fi
9126
9127 else
9128   echo "$ac_t""no" 1>&6
9129 fi
9130
9131
9132         if test -z "$athena_h_path"; then
9133       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9134 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9135 echo "configure:9136: checking for $athena_variant/XawInit.h" >&5
9136
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 #include <$athena_variant/XawInit.h>
9141 EOF
9142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9143 { (eval echo configure:9144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9145 if test -z "$ac_err"; then
9146   rm -rf conftest*
9147   eval "ac_cv_header_$ac_safe=yes"
9148 else
9149   echo "$ac_err" >&5
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -rf conftest*
9153   eval "ac_cv_header_$ac_safe=no"
9154 fi
9155 rm -f conftest*
9156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9157   echo "$ac_t""yes" 1>&6
9158   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9159 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9160 echo "configure:9161: checking for $athena_variant/ThreeD.h" >&5
9161
9162 cat > conftest.$ac_ext <<EOF
9163 #line 9164 "configure"
9164 #include "confdefs.h"
9165 #include <$athena_variant/ThreeD.h>
9166 EOF
9167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9168 { (eval echo configure:9169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9170 if test -z "$ac_err"; then
9171   rm -rf conftest*
9172   eval "ac_cv_header_$ac_safe=yes"
9173 else
9174   echo "$ac_err" >&5
9175   echo "configure: failed program was:" >&5
9176   cat conftest.$ac_ext >&5
9177   rm -rf conftest*
9178   eval "ac_cv_header_$ac_safe=no"
9179 fi
9180 rm -f conftest*
9181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183   athena_h_path=$athena_variant
9184 else
9185   echo "$ac_t""no" 1>&6
9186 fi
9187
9188 else
9189   echo "$ac_t""no" 1>&6
9190 fi
9191
9192     fi
9193
9194         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9195       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9196 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9197 echo "configure:9198: checking for X11/Xaw3d/XawInit.h" >&5
9198
9199 cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202 #include <X11/Xaw3d/XawInit.h>
9203 EOF
9204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9205 { (eval echo configure:9206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9207 if test -z "$ac_err"; then
9208   rm -rf conftest*
9209   eval "ac_cv_header_$ac_safe=yes"
9210 else
9211   echo "$ac_err" >&5
9212   echo "configure: failed program was:" >&5
9213   cat conftest.$ac_ext >&5
9214   rm -rf conftest*
9215   eval "ac_cv_header_$ac_safe=no"
9216 fi
9217 rm -f conftest*
9218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9219   echo "$ac_t""yes" 1>&6
9220   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9221 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9222 echo "configure:9223: checking for X11/Xaw3d/ThreeD.h" >&5
9223
9224 cat > conftest.$ac_ext <<EOF
9225 #line 9226 "configure"
9226 #include "confdefs.h"
9227 #include <X11/Xaw3d/ThreeD.h>
9228 EOF
9229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9230 { (eval echo configure:9231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9232 if test -z "$ac_err"; then
9233   rm -rf conftest*
9234   eval "ac_cv_header_$ac_safe=yes"
9235 else
9236   echo "$ac_err" >&5
9237   echo "configure: failed program was:" >&5
9238   cat conftest.$ac_ext >&5
9239   rm -rf conftest*
9240   eval "ac_cv_header_$ac_safe=no"
9241 fi
9242 rm -f conftest*
9243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9244   echo "$ac_t""yes" 1>&6
9245   
9246             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9247             athena_h_path=X11/Xaw3d
9248           
9249 else
9250   echo "$ac_t""no" 1>&6
9251 fi
9252
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256
9257     fi
9258
9259         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9260       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9261 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9262 echo "configure:9263: checking for Xaw3d/XawInit.h" >&5
9263
9264 cat > conftest.$ac_ext <<EOF
9265 #line 9266 "configure"
9266 #include "confdefs.h"
9267 #include <Xaw3d/XawInit.h>
9268 EOF
9269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9270 { (eval echo configure:9271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9272 if test -z "$ac_err"; then
9273   rm -rf conftest*
9274   eval "ac_cv_header_$ac_safe=yes"
9275 else
9276   echo "$ac_err" >&5
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_header_$ac_safe=no"
9281 fi
9282 rm -f conftest*
9283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9284   echo "$ac_t""yes" 1>&6
9285   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9286 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9287 echo "configure:9288: checking for Xaw3d/ThreeD.h" >&5
9288
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #include <Xaw3d/ThreeD.h>
9293 EOF
9294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9295 { (eval echo configure:9296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9297 if test -z "$ac_err"; then
9298   rm -rf conftest*
9299   eval "ac_cv_header_$ac_safe=yes"
9300 else
9301   echo "$ac_err" >&5
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=no"
9306 fi
9307 rm -f conftest*
9308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9309   echo "$ac_t""yes" 1>&6
9310   
9311             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9312             athena_h_path=Xaw3d
9313           
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322     fi
9323
9324             if test -z "$athena_h_path"; then
9325       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9326 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9327 echo "configure:9328: checking for X11/Xaw/ThreeD.h" >&5
9328
9329 cat > conftest.$ac_ext <<EOF
9330 #line 9331 "configure"
9331 #include "confdefs.h"
9332 #include <X11/Xaw/ThreeD.h>
9333 EOF
9334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9335 { (eval echo configure:9336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9337 if test -z "$ac_err"; then
9338   rm -rf conftest*
9339   eval "ac_cv_header_$ac_safe=yes"
9340 else
9341   echo "$ac_err" >&5
9342   echo "configure: failed program was:" >&5
9343   cat conftest.$ac_ext >&5
9344   rm -rf conftest*
9345   eval "ac_cv_header_$ac_safe=no"
9346 fi
9347 rm -f conftest*
9348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9349   echo "$ac_t""yes" 1>&6
9350   
9351           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9352           athena_h_path=X11/Xaw
9353         
9354 else
9355   echo "$ac_t""no" 1>&6
9356 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9357 fi
9358
9359     fi
9360   fi
9361
9362     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9363     have_xaw=yes
9364   else
9365     have_xaw=no
9366   fi
9367
9368 else
9369   have_xaw=no
9370 fi 
9371 if test "$with_x11" = "yes"; then
9372     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9373 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9374 echo "configure:9375: checking for Xm/Xm.h" >&5
9375
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 #include <Xm/Xm.h>
9380 EOF
9381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9382 { (eval echo configure:9383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9384 if test -z "$ac_err"; then
9385   rm -rf conftest*
9386   eval "ac_cv_header_$ac_safe=yes"
9387 else
9388   echo "$ac_err" >&5
9389   echo "configure: failed program was:" >&5
9390   cat conftest.$ac_ext >&5
9391   rm -rf conftest*
9392   eval "ac_cv_header_$ac_safe=no"
9393 fi
9394 rm -f conftest*
9395 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397   
9398 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9399 echo "configure:9400: checking for XmStringFree in -lXm" >&5
9400 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9401
9402 xe_check_libs=" -lXm "
9403 cat > conftest.$ac_ext <<EOF
9404 #line 9405 "configure"
9405 #include "confdefs.h"
9406 /* Override any gcc2 internal prototype to avoid an error.  */
9407 /* We use char because int might match the return type of a gcc2
9408     builtin and then its argument prototype would still apply.  */
9409 char XmStringFree();
9410
9411 int main() {
9412 XmStringFree()
9413 ; return 0; }
9414 EOF
9415 if { (eval echo configure:9416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9416   rm -rf conftest*
9417   eval "ac_cv_lib_$ac_lib_var=yes"
9418 else
9419   echo "configure: failed program was:" >&5
9420   cat conftest.$ac_ext >&5
9421   rm -rf conftest*
9422   eval "ac_cv_lib_$ac_lib_var=no"
9423 fi
9424 rm -f conftest*
9425 xe_check_libs=""
9426
9427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9428   echo "$ac_t""yes" 1>&6
9429   have_motif=yes
9430 else
9431   echo "$ac_t""no" 1>&6
9432 have_motif=no
9433 fi
9434
9435
9436 else
9437   echo "$ac_t""no" 1>&6
9438 have_motif=no
9439 fi
9440
9441
9442   if test "$have_motif" = "yes"; then
9443         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9444 echo "configure:9445: checking for Lesstif" >&5
9445     cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 #include <Xm/Xm.h>
9449 #ifdef LESSTIF_VERSION
9450 yes
9451 #endif
9452
9453 EOF
9454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9455   egrep "yes" >/dev/null 2>&1; then
9456   rm -rf conftest*
9457   have_lesstif=yes
9458 else
9459   rm -rf conftest*
9460   have_lesstif=no
9461 fi
9462 rm -f conftest*
9463
9464   echo "$ac_t""$have_lesstif" 1>&6
9465   fi
9466
9467 fi 
9468
9469 case "$with_menubars" in "" | "yes" | "athena" )
9470   with_menubars="lucid" ;;
9471 esac
9472 case "$with_dialogs" in "" | "yes" | "lucid" )
9473   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9474   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9475   else with_dialogs=no
9476   fi ;;
9477 esac
9478 case "$with_scrollbars" in "" | "yes" )
9479   with_scrollbars="lucid" ;;
9480 esac
9481 case "$with_widgets" in "" | "yes" | "lucid")
9482   if   test "$have_motif" = "yes"; then with_widgets="motif"
9483   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9484   else with_widgets=no
9485   fi ;;
9486 esac
9487
9488 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9489
9490 case "$all_widgets" in
9491   *athena* )
9492     if test "$have_xaw" != "yes"; then
9493       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9494     fi
9495
9496         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9497
9498         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9499
9500                     { test "$extra_verbose" = "yes" && cat << EOF
9501     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9502 EOF
9503 cat >> confdefs.h <<EOF
9504 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9505 EOF
9506 }
9507
9508     { test "$extra_verbose" = "yes" && cat << EOF
9509     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9510 EOF
9511 cat >> confdefs.h <<EOF
9512 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9513 EOF
9514 }
9515
9516     { test "$extra_verbose" = "yes" && cat << EOF
9517     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9518 EOF
9519 cat >> confdefs.h <<EOF
9520 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9521 EOF
9522 }
9523
9524     { test "$extra_verbose" = "yes" && cat << EOF
9525     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9526 EOF
9527 cat >> confdefs.h <<EOF
9528 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9529 EOF
9530 }
9531
9532     { test "$extra_verbose" = "yes" && cat << EOF
9533     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9534 EOF
9535 cat >> confdefs.h <<EOF
9536 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9537 EOF
9538 }
9539
9540     { test "$extra_verbose" = "yes" && cat << EOF
9541     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9542 EOF
9543 cat >> confdefs.h <<EOF
9544 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9545 EOF
9546 }
9547
9548     { test "$extra_verbose" = "yes" && cat << EOF
9549     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9550 EOF
9551 cat >> confdefs.h <<EOF
9552 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9553 EOF
9554 }
9555
9556     { test "$extra_verbose" = "yes" && cat << EOF
9557     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9558 EOF
9559 cat >> confdefs.h <<EOF
9560 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9561 EOF
9562 }
9563
9564     { test "$extra_verbose" = "yes" && cat << EOF
9565     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9566 EOF
9567 cat >> confdefs.h <<EOF
9568 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9569 EOF
9570 }
9571
9572     { test "$extra_verbose" = "yes" && cat << EOF
9573     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9574 EOF
9575 cat >> confdefs.h <<EOF
9576 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9577 EOF
9578 }
9579
9580
9581     { test "$extra_verbose" = "yes" && cat << \EOF
9582     Defining LWLIB_USES_ATHENA
9583 EOF
9584 cat >> confdefs.h <<\EOF
9585 #define LWLIB_USES_ATHENA 1
9586 EOF
9587 }
9588
9589     { test "$extra_verbose" = "yes" && cat << \EOF
9590     Defining NEED_ATHENA
9591 EOF
9592 cat >> confdefs.h <<\EOF
9593 #define NEED_ATHENA 1
9594 EOF
9595 }
9596
9597     need_athena="yes"
9598
9599     if test "$athena_3d" = "yes"; then
9600       { test "$extra_verbose" = "yes" && cat << \EOF
9601     Defining HAVE_ATHENA_3D
9602 EOF
9603 cat >> confdefs.h <<\EOF
9604 #define HAVE_ATHENA_3D 1
9605 EOF
9606 }
9607
9608     fi
9609   ;;
9610 esac
9611
9612 case "$all_widgets" in *motif* )
9613   { test "$extra_verbose" = "yes" && cat << \EOF
9614     Defining LWLIB_USES_MOTIF
9615 EOF
9616 cat >> confdefs.h <<\EOF
9617 #define LWLIB_USES_MOTIF 1
9618 EOF
9619 }
9620
9621   { test "$extra_verbose" = "yes" && cat << \EOF
9622     Defining NEED_MOTIF
9623 EOF
9624 cat >> confdefs.h <<\EOF
9625 #define NEED_MOTIF 1
9626 EOF
9627 }
9628
9629   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9630   need_motif=yes ;;
9631 esac
9632
9633 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9634 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9635 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9636 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9637         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9638 case "$with_widgets" in athena* )
9639         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;;
9640 esac
9641 case "$all_widgets" in *lucid* )
9642   { test "$extra_verbose" = "yes" && cat << \EOF
9643     Defining NEED_LUCID
9644 EOF
9645 cat >> confdefs.h <<\EOF
9646 #define NEED_LUCID 1
9647 EOF
9648 }
9649
9650   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9651 esac
9652
9653
9654
9655 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9656     Defining LWLIB_SCROLLBARS_ATHENA
9657 EOF
9658 cat >> confdefs.h <<\EOF
9659 #define LWLIB_SCROLLBARS_ATHENA 1
9660 EOF
9661 }
9662
9663 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9664     Defining LWLIB_DIALOGS_ATHENA
9665 EOF
9666 cat >> confdefs.h <<\EOF
9667 #define LWLIB_DIALOGS_ATHENA 1
9668 EOF
9669 }
9670
9671
9672 if test "$athena_3d" = "yes"; then
9673   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9674     Defining LWLIB_SCROLLBARS_ATHENA3D
9675 EOF
9676 cat >> confdefs.h <<\EOF
9677 #define LWLIB_SCROLLBARS_ATHENA3D 1
9678 EOF
9679 }
9680
9681   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9682     Defining LWLIB_DIALOGS_ATHENA3D
9683 EOF
9684 cat >> confdefs.h <<\EOF
9685 #define LWLIB_DIALOGS_ATHENA3D 1
9686 EOF
9687 }
9688
9689 fi
9690
9691 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9692     Defining LWLIB_WIDGETS_ATHENA
9693 EOF
9694 cat >> confdefs.h <<\EOF
9695 #define LWLIB_WIDGETS_ATHENA 1
9696 EOF
9697 }
9698 ;; esac
9699 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9700         { test "$extra_verbose" = "yes" && cat << \EOF
9701     Defining LWLIB_TABS_LUCID
9702 EOF
9703 cat >> confdefs.h <<\EOF
9704 #define LWLIB_TABS_LUCID 1
9705 EOF
9706 }
9707
9708
9709 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9710     Defining HAVE_MENUBARS
9711 EOF
9712 cat >> confdefs.h <<\EOF
9713 #define HAVE_MENUBARS 1
9714 EOF
9715 }
9716
9717 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9718     Defining HAVE_SCROLLBARS
9719 EOF
9720 cat >> confdefs.h <<\EOF
9721 #define HAVE_SCROLLBARS 1
9722 EOF
9723 }
9724
9725 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9726     Defining HAVE_DIALOGS
9727 EOF
9728 cat >> confdefs.h <<\EOF
9729 #define HAVE_DIALOGS 1
9730 EOF
9731 }
9732
9733 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9734     Defining HAVE_TOOLBARS
9735 EOF
9736 cat >> confdefs.h <<\EOF
9737 #define HAVE_TOOLBARS 1
9738 EOF
9739 }
9740
9741 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9742     Defining HAVE_WIDGETS
9743 EOF
9744 cat >> confdefs.h <<\EOF
9745 #define HAVE_WIDGETS 1
9746 EOF
9747 }
9748
9749
9750 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9751     Defining LWLIB_MENUBARS_LUCID
9752 EOF
9753 cat >> confdefs.h <<\EOF
9754 #define LWLIB_MENUBARS_LUCID 1
9755 EOF
9756 }
9757
9758 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9759     Defining LWLIB_SCROLLBARS_LUCID
9760 EOF
9761 cat >> confdefs.h <<\EOF
9762 #define LWLIB_SCROLLBARS_LUCID 1
9763 EOF
9764 }
9765
9766
9767 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9768     Defining LWLIB_MENUBARS_MOTIF
9769 EOF
9770 cat >> confdefs.h <<\EOF
9771 #define LWLIB_MENUBARS_MOTIF 1
9772 EOF
9773 }
9774
9775 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9776     Defining LWLIB_SCROLLBARS_MOTIF
9777 EOF
9778 cat >> confdefs.h <<\EOF
9779 #define LWLIB_SCROLLBARS_MOTIF 1
9780 EOF
9781 }
9782
9783 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9784     Defining LWLIB_DIALOGS_MOTIF
9785 EOF
9786 cat >> confdefs.h <<\EOF
9787 #define LWLIB_DIALOGS_MOTIF 1
9788 EOF
9789 }
9790
9791 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9792     Defining LWLIB_WIDGETS_MOTIF
9793 EOF
9794 cat >> confdefs.h <<\EOF
9795 #define LWLIB_WIDGETS_MOTIF 1
9796 EOF
9797 }
9798
9799
9800 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9801    echo "    xemacs will be linked with \"menubar.o\""
9802  fi
9803 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9804    echo "    xemacs will be linked with \"scrollbar.o\""
9805  fi
9806 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9807    echo "    xemacs will be linked with \"dialog.o\""
9808  fi
9809 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9810    echo "    xemacs will be linked with \"toolbar.o\""
9811  fi
9812
9813 if test "$with_gtk" = "yes"; then
9814   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9815    echo "    xemacs will be linked with \"menubar-gtk.o\""
9816  fi
9817   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9818    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9819  fi
9820   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"dialog-gtk.o\""
9822  fi
9823   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9824    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9825  fi
9826   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9827    echo "    xemacs will be linked with \"gui-gtk.o\""
9828  fi
9829 fi
9830
9831 if test "$with_x11" = "yes"; then
9832   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9833    echo "    xemacs will be linked with \"menubar-x.o\""
9834  fi
9835   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9836    echo "    xemacs will be linked with \"scrollbar-x.o\""
9837  fi
9838   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9839    echo "    xemacs will be linked with \"dialog-x.o\""
9840  fi
9841   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9842    echo "    xemacs will be linked with \"toolbar-x.o\""
9843  fi
9844   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9845    echo "    xemacs will be linked with \"gui-x.o\""
9846  fi
9847 fi
9848
9849
9850 test -z "$with_mule" && with_mule=no
9851 test -z "$with_file_coding" && with_file_coding=no
9852
9853
9854 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9855   { test "$extra_verbose" = "yes" && cat << \EOF
9856     Defining FILE_CODING
9857 EOF
9858 cat >> confdefs.h <<\EOF
9859 #define FILE_CODING 1
9860 EOF
9861 }
9862
9863   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9864    echo "    xemacs will be linked with \"file-coding.o\""
9865  fi
9866 fi
9867
9868 if test "$with_mule" = "yes" ; then
9869   echo "checking for Mule-related features" 1>&6
9870 echo "configure:9871: checking for Mule-related features" >&5
9871   { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining MULE
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define MULE 1
9876 EOF
9877 }
9878
9879   { test "$extra_verbose" = "yes" && cat << \EOF
9880     Defining FILE_CODING
9881 EOF
9882 cat >> confdefs.h <<\EOF
9883 #define FILE_CODING 1
9884 EOF
9885 }
9886
9887   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9888    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9889  fi
9890   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9891     { test "$extra_verbose" = "yes" && cat << \EOF
9892     Defining TEXT_CODING
9893 EOF
9894 cat >> confdefs.h <<\EOF
9895 #define TEXT_CODING 1
9896 EOF
9897 }
9898
9899     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9900    echo "    xemacs will be linked with \"text-coding.o\""
9901  fi
9902   else
9903     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9904    echo "    xemacs will be linked with \"file-coding.o\""
9905  fi
9906   fi
9907     for ac_hdr in libintl.h
9908 do
9909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9911 echo "configure:9912: checking for $ac_hdr" >&5
9912
9913 cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 #include <$ac_hdr>
9917 EOF
9918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9919 { (eval echo configure:9920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9921 if test -z "$ac_err"; then
9922   rm -rf conftest*
9923   eval "ac_cv_header_$ac_safe=yes"
9924 else
9925   echo "$ac_err" >&5
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   eval "ac_cv_header_$ac_safe=no"
9930 fi
9931 rm -f conftest*
9932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9933   echo "$ac_t""yes" 1>&6
9934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9935   { test "$extra_verbose" = "yes" && cat << EOF
9936     Defining $ac_tr_hdr
9937 EOF
9938 cat >> confdefs.h <<EOF
9939 #define $ac_tr_hdr 1
9940 EOF
9941 }
9942  
9943 else
9944   echo "$ac_t""no" 1>&6
9945 fi
9946 done
9947
9948   
9949 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9950 echo "configure:9951: checking for strerror in -lintl" >&5
9951 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9952
9953 xe_check_libs=" -lintl "
9954 cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 /* We use char because int might match the return type of a gcc2
9959     builtin and then its argument prototype would still apply.  */
9960 char strerror();
9961
9962 int main() {
9963 strerror()
9964 ; return 0; }
9965 EOF
9966 if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9967   rm -rf conftest*
9968   eval "ac_cv_lib_$ac_lib_var=yes"
9969 else
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_lib_$ac_lib_var=no"
9974 fi
9975 rm -f conftest*
9976 xe_check_libs=""
9977
9978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9979   echo "$ac_t""yes" 1>&6
9980     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9981     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9982   { test "$extra_verbose" = "yes" && cat << EOF
9983     Defining $ac_tr_lib
9984 EOF
9985 cat >> confdefs.h <<EOF
9986 #define $ac_tr_lib 1
9987 EOF
9988 }
9989
9990   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9991
9992 else
9993   echo "$ac_t""no" 1>&6
9994 fi
9995
9996
9997
9998   if test "$with_utf_2000" = "yes" ; then
9999     { test "$extra_verbose" = "yes" && cat << \EOF
10000     Defining CHAR_IS_UCS4
10001 EOF
10002 cat >> confdefs.h <<\EOF
10003 #define CHAR_IS_UCS4 1
10004 EOF
10005 }
10006
10007     { test "$extra_verbose" = "yes" && cat << \EOF
10008     Defining UTF2000
10009 EOF
10010 cat >> confdefs.h <<\EOF
10011 #define UTF2000 1
10012 EOF
10013 }
10014
10015   fi
10016
10017   echo "checking for Mule input methods" 1>&6
10018 echo "configure:10019: checking for Mule input methods" >&5
10019         case "$with_xim" in "" | "yes" )
10020     echo "checking for XIM" 1>&6
10021 echo "configure:10022: checking for XIM" >&5
10022     
10023 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10024 echo "configure:10025: checking for XOpenIM in -lX11" >&5
10025 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10026
10027 xe_check_libs=" -lX11 "
10028 cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 /* Override any gcc2 internal prototype to avoid an error.  */
10032 /* We use char because int might match the return type of a gcc2
10033     builtin and then its argument prototype would still apply.  */
10034 char XOpenIM();
10035
10036 int main() {
10037 XOpenIM()
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=yes"
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=no"
10048 fi
10049 rm -f conftest*
10050 xe_check_libs=""
10051
10052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10053   echo "$ac_t""yes" 1>&6
10054   with_xim=xlib
10055 else
10056   echo "$ac_t""no" 1>&6
10057 with_xim=no
10058 fi
10059
10060
10061         if test "$have_motif $have_lesstif" = "yes no"; then
10062       
10063 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10064 echo "configure:10065: checking for XmImMbLookupString in -lXm" >&5
10065 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10066
10067 xe_check_libs=" -lXm "
10068 cat > conftest.$ac_ext <<EOF
10069 #line 10070 "configure"
10070 #include "confdefs.h"
10071 /* Override any gcc2 internal prototype to avoid an error.  */
10072 /* We use char because int might match the return type of a gcc2
10073     builtin and then its argument prototype would still apply.  */
10074 char XmImMbLookupString();
10075
10076 int main() {
10077 XmImMbLookupString()
10078 ; return 0; }
10079 EOF
10080 if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10081   rm -rf conftest*
10082   eval "ac_cv_lib_$ac_lib_var=yes"
10083 else
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -rf conftest*
10087   eval "ac_cv_lib_$ac_lib_var=no"
10088 fi
10089 rm -f conftest*
10090 xe_check_libs=""
10091
10092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10093   echo "$ac_t""yes" 1>&6
10094   with_xim=motif
10095 else
10096   echo "$ac_t""no" 1>&6
10097 fi
10098
10099
10100     fi ;;
10101   esac
10102   if test "$with_xim" != "no"; then
10103     { test "$extra_verbose" = "yes" && cat << \EOF
10104     Defining HAVE_XIM
10105 EOF
10106 cat >> confdefs.h <<\EOF
10107 #define HAVE_XIM 1
10108 EOF
10109 }
10110
10111     if test "$with_xim" = "xlib"; then
10112       { test "$extra_verbose" = "yes" && cat << \EOF
10113     Defining XIM_XLIB
10114 EOF
10115 cat >> confdefs.h <<\EOF
10116 #define XIM_XLIB 1
10117 EOF
10118 }
10119
10120       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10121    echo "    xemacs will be linked with \"input-method-xlib.o\""
10122  fi
10123     fi
10124     if test "$with_xim" = "motif"; then
10125       { test "$extra_verbose" = "yes" && cat << \EOF
10126     Defining XIM_MOTIF
10127 EOF
10128 cat >> confdefs.h <<\EOF
10129 #define XIM_MOTIF 1
10130 EOF
10131 }
10132
10133       need_motif=yes
10134       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10135    echo "    xemacs will be linked with \"input-method-motif.o\""
10136  fi
10137     fi
10138     if test "$with_xim" = "motif"; then
10139       with_xfs=no
10140     fi
10141   fi
10142
10143     if test "$with_xfs" = "yes" ; then
10144     echo "checking for XFontSet" 1>&6
10145 echo "configure:10146: checking for XFontSet" >&5
10146     
10147 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10148 echo "configure:10149: checking for XmbDrawString in -lX11" >&5
10149 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10150
10151 xe_check_libs=" -lX11 "
10152 cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155 /* Override any gcc2 internal prototype to avoid an error.  */
10156 /* We use char because int might match the return type of a gcc2
10157     builtin and then its argument prototype would still apply.  */
10158 char XmbDrawString();
10159
10160 int main() {
10161 XmbDrawString()
10162 ; return 0; }
10163 EOF
10164 if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10165   rm -rf conftest*
10166   eval "ac_cv_lib_$ac_lib_var=yes"
10167 else
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_lib_$ac_lib_var=no"
10172 fi
10173 rm -f conftest*
10174 xe_check_libs=""
10175
10176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10177   echo "$ac_t""yes" 1>&6
10178   :
10179 else
10180   echo "$ac_t""no" 1>&6
10181 with_xfs=no
10182 fi
10183
10184
10185     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10186       { test "$extra_verbose" = "yes" && cat << \EOF
10187     Defining USE_XFONTSET
10188 EOF
10189 cat >> confdefs.h <<\EOF
10190 #define USE_XFONTSET 1
10191 EOF
10192 }
10193
10194       if test "$with_xim" = "no" ; then
10195         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10196    echo "    xemacs will be linked with \"input-method-xlib.o\""
10197  fi
10198       fi
10199     fi
10200   fi 
10201     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10202   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10203 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10204 echo "configure:10205: checking for wnn/jllib.h" >&5
10205
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <wnn/jllib.h>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227   :
10228 else
10229   echo "$ac_t""no" 1>&6
10230 with_wnn=no
10231 fi
10232  }
10233     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10234 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10235 echo "configure:10236: checking for wnn/commonhd.h" >&5
10236
10237 cat > conftest.$ac_ext <<EOF
10238 #line 10239 "configure"
10239 #include "confdefs.h"
10240 #include <wnn/commonhd.h>
10241 EOF
10242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10243 { (eval echo configure:10244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10245 if test -z "$ac_err"; then
10246   rm -rf conftest*
10247   eval "ac_cv_header_$ac_safe=yes"
10248 else
10249   echo "$ac_err" >&5
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   eval "ac_cv_header_$ac_safe=no"
10254 fi
10255 rm -f conftest*
10256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10257   echo "$ac_t""yes" 1>&6
10258   :
10259 else
10260   echo "$ac_t""no" 1>&6
10261 with_wnn=no
10262 fi
10263  }
10264     if test "$with_wnn" != "no"; then
10265     for ac_func in crypt
10266 do
10267 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10268 echo "configure:10269: checking for $ac_func" >&5
10269
10270 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 /* System header to define __stub macros and hopefully few prototypes,
10274     which can conflict with char $ac_func(); below.  */
10275 #include <assert.h>
10276 /* Override any gcc2 internal prototype to avoid an error.  */
10277 /* We use char because int might match the return type of a gcc2
10278     builtin and then its argument prototype would still apply.  */
10279 char $ac_func();
10280
10281 int main() {
10282
10283 /* The GNU C library defines this for functions which it implements
10284     to always fail with ENOSYS.  Some functions are actually named
10285     something starting with __ and the normal name is an alias.  */
10286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10287 choke me
10288 #else
10289 $ac_func();
10290 #endif
10291
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   eval "ac_cv_func_$ac_func=yes"
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   eval "ac_cv_func_$ac_func=no"
10302 fi
10303 rm -f conftest*
10304
10305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10306   echo "$ac_t""yes" 1>&6
10307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10308   { test "$extra_verbose" = "yes" && cat << EOF
10309     Defining $ac_tr_func
10310 EOF
10311 cat >> confdefs.h <<EOF
10312 #define $ac_tr_func 1
10313 EOF
10314 }
10315  
10316 else
10317   echo "$ac_t""no" 1>&6
10318 fi
10319 done
10320
10321     test "$ac_cv_func_crypt" != "yes" && { 
10322 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10323 echo "configure:10324: checking for crypt in -lcrypt" >&5
10324 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10325
10326 xe_check_libs=" -lcrypt "
10327 cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 /* Override any gcc2 internal prototype to avoid an error.  */
10331 /* We use char because int might match the return type of a gcc2
10332     builtin and then its argument prototype would still apply.  */
10333 char crypt();
10334
10335 int main() {
10336 crypt()
10337 ; return 0; }
10338 EOF
10339 if { (eval echo configure:10340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10340   rm -rf conftest*
10341   eval "ac_cv_lib_$ac_lib_var=yes"
10342 else
10343   echo "configure: failed program was:" >&5
10344   cat conftest.$ac_ext >&5
10345   rm -rf conftest*
10346   eval "ac_cv_lib_$ac_lib_var=no"
10347 fi
10348 rm -f conftest*
10349 xe_check_libs=""
10350
10351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10352   echo "$ac_t""yes" 1>&6
10353     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10354     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10355   { test "$extra_verbose" = "yes" && cat << EOF
10356     Defining $ac_tr_lib
10357 EOF
10358 cat >> confdefs.h <<EOF
10359 #define $ac_tr_lib 1
10360 EOF
10361 }
10362
10363   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10364
10365 else
10366   echo "$ac_t""no" 1>&6
10367 fi
10368
10369  }
10370   fi
10371     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10372     
10373 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10374 echo "configure:10375: checking for jl_dic_list_e in -lwnn" >&5
10375 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10376
10377 xe_check_libs=" -lwnn "
10378 cat > conftest.$ac_ext <<EOF
10379 #line 10380 "configure"
10380 #include "confdefs.h"
10381 /* Override any gcc2 internal prototype to avoid an error.  */
10382 /* We use char because int might match the return type of a gcc2
10383     builtin and then its argument prototype would still apply.  */
10384 char jl_dic_list_e();
10385
10386 int main() {
10387 jl_dic_list_e()
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10391   rm -rf conftest*
10392   eval "ac_cv_lib_$ac_lib_var=yes"
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=no"
10398 fi
10399 rm -f conftest*
10400 xe_check_libs=""
10401
10402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10403   echo "$ac_t""yes" 1>&6
10404   libwnn=wnn
10405 else
10406   echo "$ac_t""no" 1>&6
10407 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10408 echo "configure:10409: checking for jl_dic_list_e in -lwnn4" >&5
10409 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10410
10411 xe_check_libs=" -lwnn4 "
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 /* Override any gcc2 internal prototype to avoid an error.  */
10416 /* We use char because int might match the return type of a gcc2
10417     builtin and then its argument prototype would still apply.  */
10418 char jl_dic_list_e();
10419
10420 int main() {
10421 jl_dic_list_e()
10422 ; return 0; }
10423 EOF
10424 if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10425   rm -rf conftest*
10426   eval "ac_cv_lib_$ac_lib_var=yes"
10427 else
10428   echo "configure: failed program was:" >&5
10429   cat conftest.$ac_ext >&5
10430   rm -rf conftest*
10431   eval "ac_cv_lib_$ac_lib_var=no"
10432 fi
10433 rm -f conftest*
10434 xe_check_libs=""
10435
10436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10437   echo "$ac_t""yes" 1>&6
10438   libwnn=wnn4
10439 else
10440   echo "$ac_t""no" 1>&6
10441 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10442 echo "configure:10443: checking for jl_dic_list_e in -lwnn6" >&5
10443 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10444
10445 xe_check_libs=" -lwnn6 "
10446 cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 /* Override any gcc2 internal prototype to avoid an error.  */
10450 /* We use char because int might match the return type of a gcc2
10451     builtin and then its argument prototype would still apply.  */
10452 char jl_dic_list_e();
10453
10454 int main() {
10455 jl_dic_list_e()
10456 ; return 0; }
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10459   rm -rf conftest*
10460   eval "ac_cv_lib_$ac_lib_var=yes"
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_lib_$ac_lib_var=no"
10466 fi
10467 rm -f conftest*
10468 xe_check_libs=""
10469
10470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10471   echo "$ac_t""yes" 1>&6
10472   libwnn=wnn6
10473 else
10474   echo "$ac_t""no" 1>&6
10475 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10476 echo "configure:10477: checking for dic_list_e in -lwnn6_fromsrc" >&5
10477 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10478
10479 xe_check_libs=" -lwnn6_fromsrc "
10480 cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 /* Override any gcc2 internal prototype to avoid an error.  */
10484 /* We use char because int might match the return type of a gcc2
10485     builtin and then its argument prototype would still apply.  */
10486 char dic_list_e();
10487
10488 int main() {
10489 dic_list_e()
10490 ; return 0; }
10491 EOF
10492 if { (eval echo configure:10493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10493   rm -rf conftest*
10494   eval "ac_cv_lib_$ac_lib_var=yes"
10495 else
10496   echo "configure: failed program was:" >&5
10497   cat conftest.$ac_ext >&5
10498   rm -rf conftest*
10499   eval "ac_cv_lib_$ac_lib_var=no"
10500 fi
10501 rm -f conftest*
10502 xe_check_libs=""
10503
10504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10505   echo "$ac_t""yes" 1>&6
10506   libwnn=wnn6_fromsrc
10507 else
10508   echo "$ac_t""no" 1>&6
10509 with_wnn=no
10510 fi
10511
10512
10513 fi
10514
10515
10516 fi
10517
10518
10519 fi
10520
10521
10522   fi
10523   test -z "$with_wnn" && with_wnn=yes
10524   if test "$with_wnn" = "yes"; then
10525     { test "$extra_verbose" = "yes" && cat << \EOF
10526     Defining HAVE_WNN
10527 EOF
10528 cat >> confdefs.h <<\EOF
10529 #define HAVE_WNN 1
10530 EOF
10531 }
10532
10533     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10534     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10535    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10536  fi
10537     if test "$with_wnn6" != "no"; then
10538       
10539 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10540 echo "configure:10541: checking for jl_fi_dic_list in -l$libwnn" >&5
10541 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10542
10543 xe_check_libs=" -l$libwnn "
10544 cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 /* Override any gcc2 internal prototype to avoid an error.  */
10548 /* We use char because int might match the return type of a gcc2
10549     builtin and then its argument prototype would still apply.  */
10550 char jl_fi_dic_list();
10551
10552 int main() {
10553 jl_fi_dic_list()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 xe_check_libs=""
10567
10568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10569   echo "$ac_t""yes" 1>&6
10570   with_wnn6=yes
10571 else
10572   echo "$ac_t""no" 1>&6
10573 fi
10574
10575
10576       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10577     Defining WNN6
10578 EOF
10579 cat >> confdefs.h <<\EOF
10580 #define WNN6 1
10581 EOF
10582 }
10583
10584     fi
10585   fi
10586
10587     canna_includes_found=no
10588   if test "$with_canna" != "no"; then
10589     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10590 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10591 echo "configure:10592: checking for canna/jrkanji.h" >&5
10592
10593 cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596 #include <canna/jrkanji.h>
10597 EOF
10598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10599 { (eval echo configure:10600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10601 if test -z "$ac_err"; then
10602   rm -rf conftest*
10603   eval "ac_cv_header_$ac_safe=yes"
10604 else
10605   echo "$ac_err" >&5
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -rf conftest*
10609   eval "ac_cv_header_$ac_safe=no"
10610 fi
10611 rm -f conftest*
10612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10613   echo "$ac_t""yes" 1>&6
10614   canna_includes_found=yes
10615 else
10616   echo "$ac_t""no" 1>&6
10617 fi
10618
10619   fi
10620   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10621       -d "/usr/local/canna/include"; then
10622     save_c_switch_site="$c_switch_site"
10623     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10624     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10625 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10626 echo "configure:10627: checking for canna/jrkanji.h" >&5
10627
10628 cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <canna/jrkanji.h>
10632 EOF
10633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10634 { (eval echo configure:10635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10636 if test -z "$ac_err"; then
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=yes"
10639 else
10640   echo "$ac_err" >&5
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=no"
10645 fi
10646 rm -f conftest*
10647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10648   echo "$ac_t""yes" 1>&6
10649   canna_includes_found=yes
10650 else
10651   echo "$ac_t""no" 1>&6
10652 fi
10653
10654     if test "$canna_includes_found" != "yes"; then
10655       c_switch_site="$save_c_switch_site"
10656       with_canna="no"
10657     fi
10658   fi
10659
10660   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10661 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10662 echo "configure:10663: checking for canna/RK.h" >&5
10663
10664 cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667 #include <canna/RK.h>
10668 EOF
10669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10670 { (eval echo configure:10671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10672 if test -z "$ac_err"; then
10673   rm -rf conftest*
10674   eval "ac_cv_header_$ac_safe=yes"
10675 else
10676   echo "$ac_err" >&5
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -rf conftest*
10680   eval "ac_cv_header_$ac_safe=no"
10681 fi
10682 rm -f conftest*
10683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10684   echo "$ac_t""yes" 1>&6
10685   :
10686 else
10687   echo "$ac_t""no" 1>&6
10688 with_canna=no
10689 fi
10690  }
10691   test -z "$with_canna" && { 
10692 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10693 echo "configure:10694: checking for RkBgnBun in -lRKC" >&5
10694 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10695
10696 xe_check_libs=" -lRKC "
10697 cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 /* Override any gcc2 internal prototype to avoid an error.  */
10701 /* We use char because int might match the return type of a gcc2
10702     builtin and then its argument prototype would still apply.  */
10703 char RkBgnBun();
10704
10705 int main() {
10706 RkBgnBun()
10707 ; return 0; }
10708 EOF
10709 if { (eval echo configure:10710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10710   rm -rf conftest*
10711   eval "ac_cv_lib_$ac_lib_var=yes"
10712 else
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_lib_$ac_lib_var=no"
10717 fi
10718 rm -f conftest*
10719 xe_check_libs=""
10720
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10722   echo "$ac_t""yes" 1>&6
10723   :
10724 else
10725   echo "$ac_t""no" 1>&6
10726 with_canna=no
10727 fi
10728
10729  }
10730   test -z "$with_canna" && { 
10731 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10732 echo "configure:10733: checking for jrKanjiControl in -lcanna" >&5
10733 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10734
10735 xe_check_libs=" -lcanna "
10736 cat > conftest.$ac_ext <<EOF
10737 #line 10738 "configure"
10738 #include "confdefs.h"
10739 /* Override any gcc2 internal prototype to avoid an error.  */
10740 /* We use char because int might match the return type of a gcc2
10741     builtin and then its argument prototype would still apply.  */
10742 char jrKanjiControl();
10743
10744 int main() {
10745 jrKanjiControl()
10746 ; return 0; }
10747 EOF
10748 if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=yes"
10751 else
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -rf conftest*
10755   eval "ac_cv_lib_$ac_lib_var=no"
10756 fi
10757 rm -f conftest*
10758 xe_check_libs=""
10759
10760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10761   echo "$ac_t""yes" 1>&6
10762   :
10763 else
10764   echo "$ac_t""no" 1>&6
10765 with_canna=no
10766 fi
10767
10768  }
10769   test -z "$with_canna" && with_canna=yes
10770   if test "$with_canna" = "yes"; then
10771     { test "$extra_verbose" = "yes" && cat << \EOF
10772     Defining HAVE_CANNA
10773 EOF
10774 cat >> confdefs.h <<\EOF
10775 #define HAVE_CANNA 1
10776 EOF
10777 }
10778
10779     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10780     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10781    echo "    xemacs will be linked with \"mule-canna.o\""
10782  fi
10783   fi
10784
10785 else   for feature in xim canna wnn; do
10786     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10787       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10788     fi
10789     eval "with_${feature}=no"
10790   done
10791 fi 
10792
10793 if test "$need_motif" = "yes" ; then
10794   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10795     
10796 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10797 echo "configure:10798: checking for layout_object_getvalue in -li18n" >&5
10798 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10799
10800 xe_check_libs=" -li18n "
10801 cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804 /* Override any gcc2 internal prototype to avoid an error.  */
10805 /* We use char because int might match the return type of a gcc2
10806     builtin and then its argument prototype would still apply.  */
10807 char layout_object_getvalue();
10808
10809 int main() {
10810 layout_object_getvalue()
10811 ; return 0; }
10812 EOF
10813 if { (eval echo configure:10814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10814   rm -rf conftest*
10815   eval "ac_cv_lib_$ac_lib_var=yes"
10816 else
10817   echo "configure: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=no"
10821 fi
10822 rm -f conftest*
10823 xe_check_libs=""
10824
10825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10826   echo "$ac_t""yes" 1>&6
10827   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10828 else
10829   echo "$ac_t""no" 1>&6
10830 fi
10831
10832
10833   
10834 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10835     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10836   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10837   
10838         runpath="" runpath_dirs=""
10839   if test -n "$LD_RUN_PATH"; then
10840     runpath="$LD_RUN_PATH"
10841   elif test "$GCC" = "yes"; then
10842         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10843     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10844     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10845     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10846       case "$arg" in P,* | -L* | -R* )
10847         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10848           {
10849 xe_runpath_dir="$dir"
10850   test "$xe_runpath_dir" != "/lib"     -a \
10851         "$xe_runpath_dir" != "/usr/lib" -a \
10852         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10853   eval "$xe_add_unique_runpath_dir"
10854 }
10855         done ;;
10856       esac
10857     done
10858     ld_switch_run="$ld_switch_run_save"
10859     rm -f conftest*
10860   else
10861         for arg in $ld_switch_site $ld_switch_x_site; do
10862       case "$arg" in -L*) {
10863 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10864   test "$xe_runpath_dir" != "/lib"     -a \
10865         "$xe_runpath_dir" != "/usr/lib" -a \
10866         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10867   eval "$xe_add_unique_runpath_dir"
10868 };; esac
10869     done
10870         if test "$opsys $need_motif" = "sol2 yes"; then
10871       xe_runpath_dir="/opt/SUNWdt/lib";
10872       eval "$xe_add_unique_runpath_dir";
10873     fi
10874   fi 
10875   if test -n "$runpath"; then
10876     ld_switch_run="${dash_r}${runpath}"
10877     
10878 if test "$GCC" = "yes"; then
10879   set x $ld_switch_run; shift; ld_switch_run=""
10880   while test -n "$1"; do
10881     case $1 in
10882       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10883       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10884       -Xlinker* ) ;;
10885       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10886     esac
10887     shift
10888   done
10889 fi
10890     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10891   fi
10892 fi
10893
10894 fi
10895
10896
10897 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
10898 do
10899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10900 echo "configure:10901: checking for $ac_func" >&5
10901
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 /* System header to define __stub macros and hopefully few prototypes,
10906     which can conflict with char $ac_func(); below.  */
10907 #include <assert.h>
10908 /* Override any gcc2 internal prototype to avoid an error.  */
10909 /* We use char because int might match the return type of a gcc2
10910     builtin and then its argument prototype would still apply.  */
10911 char $ac_func();
10912
10913 int main() {
10914
10915 /* The GNU C library defines this for functions which it implements
10916     to always fail with ENOSYS.  Some functions are actually named
10917     something starting with __ and the normal name is an alias.  */
10918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10919 choke me
10920 #else
10921 $ac_func();
10922 #endif
10923
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10927   rm -rf conftest*
10928   eval "ac_cv_func_$ac_func=yes"
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_func_$ac_func=no"
10934 fi
10935 rm -f conftest*
10936
10937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10938   echo "$ac_t""yes" 1>&6
10939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10940   { test "$extra_verbose" = "yes" && cat << EOF
10941     Defining $ac_tr_func
10942 EOF
10943 cat >> confdefs.h <<EOF
10944 #define $ac_tr_func 1
10945 EOF
10946 }
10947  
10948 else
10949   echo "$ac_t""no" 1>&6
10950 fi
10951 done
10952
10953
10954 if test "$ac_cv_func_getaddrinfo" != "no" ; then
10955   case "$opsys" in
10956     hpux11 )
10957       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
10958       ac_cv_func_getaddrinfo=no
10959       ;;
10960   esac
10961 fi
10962
10963
10964 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10965 do
10966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10967 echo "configure:10968: checking for $ac_func" >&5
10968
10969 cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972 /* System header to define __stub macros and hopefully few prototypes,
10973     which can conflict with char $ac_func(); below.  */
10974 #include <assert.h>
10975 /* Override any gcc2 internal prototype to avoid an error.  */
10976 /* We use char because int might match the return type of a gcc2
10977     builtin and then its argument prototype would still apply.  */
10978 char $ac_func();
10979
10980 int main() {
10981
10982 /* The GNU C library defines this for functions which it implements
10983     to always fail with ENOSYS.  Some functions are actually named
10984     something starting with __ and the normal name is an alias.  */
10985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10986 choke me
10987 #else
10988 $ac_func();
10989 #endif
10990
10991 ; return 0; }
10992 EOF
10993 if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10994   rm -rf conftest*
10995   eval "ac_cv_func_$ac_func=yes"
10996 else
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_func_$ac_func=no"
11001 fi
11002 rm -f conftest*
11003
11004 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11005   echo "$ac_t""yes" 1>&6
11006     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11007   { test "$extra_verbose" = "yes" && cat << EOF
11008     Defining $ac_tr_func
11009 EOF
11010 cat >> confdefs.h <<EOF
11011 #define $ac_tr_func 1
11012 EOF
11013 }
11014  
11015 else
11016   echo "$ac_t""no" 1>&6
11017 fi
11018 done
11019
11020
11021 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11022 echo "configure:11023: checking for openpty" >&5
11023
11024 cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 /* System header to define __stub macros and hopefully few prototypes,
11028     which can conflict with char openpty(); below.  */
11029 #include <assert.h>
11030 /* Override any gcc2 internal prototype to avoid an error.  */
11031 /* We use char because int might match the return type of a gcc2
11032     builtin and then its argument prototype would still apply.  */
11033 char openpty();
11034
11035 int main() {
11036
11037 /* The GNU C library defines this for functions which it implements
11038     to always fail with ENOSYS.  Some functions are actually named
11039     something starting with __ and the normal name is an alias.  */
11040 #if defined (__stub_openpty) || defined (__stub___openpty)
11041 choke me
11042 #else
11043 openpty();
11044 #endif
11045
11046 ; return 0; }
11047 EOF
11048 if { (eval echo configure:11049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11049   rm -rf conftest*
11050   eval "ac_cv_func_openpty=yes"
11051 else
11052   echo "configure: failed program was:" >&5
11053   cat conftest.$ac_ext >&5
11054   rm -rf conftest*
11055   eval "ac_cv_func_openpty=no"
11056 fi
11057 rm -f conftest*
11058
11059 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11060   echo "$ac_t""yes" 1>&6
11061   have_openpty=yes
11062 else
11063   echo "$ac_t""no" 1>&6
11064
11065   
11066 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11067 echo "configure:11068: checking for openpty in -lutil" >&5
11068 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11069
11070 xe_check_libs=" -lutil "
11071 cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 /* Override any gcc2 internal prototype to avoid an error.  */
11075 /* We use char because int might match the return type of a gcc2
11076     builtin and then its argument prototype would still apply.  */
11077 char openpty();
11078
11079 int main() {
11080 openpty()
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=yes"
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_lib_$ac_lib_var=no"
11091 fi
11092 rm -f conftest*
11093 xe_check_libs=""
11094
11095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11096   echo "$ac_t""yes" 1>&6
11097   have_openpty=yes need_libutil=yes
11098 else
11099   echo "$ac_t""no" 1>&6
11100 fi
11101
11102
11103 fi
11104
11105 if test "$have_openpty" = "yes"; then
11106   { test "$extra_verbose" = "yes" && cat << \EOF
11107     Defining HAVE_OPENPTY
11108 EOF
11109 cat >> confdefs.h <<\EOF
11110 #define HAVE_OPENPTY 1
11111 EOF
11112 }
11113
11114   for ac_hdr in pty.h libutil.h util.h
11115 do
11116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11118 echo "configure:11119: checking for $ac_hdr" >&5
11119
11120 cat > conftest.$ac_ext <<EOF
11121 #line 11122 "configure"
11122 #include "confdefs.h"
11123 #include <$ac_hdr>
11124 EOF
11125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11126 { (eval echo configure:11127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11128 if test -z "$ac_err"; then
11129   rm -rf conftest*
11130   eval "ac_cv_header_$ac_safe=yes"
11131 else
11132   echo "$ac_err" >&5
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=no"
11137 fi
11138 rm -f conftest*
11139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11142   { test "$extra_verbose" = "yes" && cat << EOF
11143     Defining $ac_tr_hdr
11144 EOF
11145 cat >> confdefs.h <<EOF
11146 #define $ac_tr_hdr 1
11147 EOF
11148 }
11149  break
11150 else
11151   echo "$ac_t""no" 1>&6
11152 fi
11153 done
11154
11155   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11156 fi
11157
11158 for ac_hdr in stropts.h
11159 do
11160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11162 echo "configure:11163: checking for $ac_hdr" >&5
11163
11164 cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 #include <$ac_hdr>
11168 EOF
11169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11170 { (eval echo configure:11171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11172 if test -z "$ac_err"; then
11173   rm -rf conftest*
11174   eval "ac_cv_header_$ac_safe=yes"
11175 else
11176   echo "$ac_err" >&5
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=no"
11181 fi
11182 rm -f conftest*
11183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11184   echo "$ac_t""yes" 1>&6
11185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11186   { test "$extra_verbose" = "yes" && cat << EOF
11187     Defining $ac_tr_hdr
11188 EOF
11189 cat >> confdefs.h <<EOF
11190 #define $ac_tr_hdr 1
11191 EOF
11192 }
11193  
11194 else
11195   echo "$ac_t""no" 1>&6
11196 fi
11197 done
11198
11199 if test "$ac_cv_header_stropts_h" = "yes"; then
11200   for ac_func in isastream
11201 do
11202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11203 echo "configure:11204: checking for $ac_func" >&5
11204
11205 cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208 /* System header to define __stub macros and hopefully few prototypes,
11209     which can conflict with char $ac_func(); below.  */
11210 #include <assert.h>
11211 /* Override any gcc2 internal prototype to avoid an error.  */
11212 /* We use char because int might match the return type of a gcc2
11213     builtin and then its argument prototype would still apply.  */
11214 char $ac_func();
11215
11216 int main() {
11217
11218 /* The GNU C library defines this for functions which it implements
11219     to always fail with ENOSYS.  Some functions are actually named
11220     something starting with __ and the normal name is an alias.  */
11221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11222 choke me
11223 #else
11224 $ac_func();
11225 #endif
11226
11227 ; return 0; }
11228 EOF
11229 if { (eval echo configure:11230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11230   rm -rf conftest*
11231   eval "ac_cv_func_$ac_func=yes"
11232 else
11233   echo "configure: failed program was:" >&5
11234   cat conftest.$ac_ext >&5
11235   rm -rf conftest*
11236   eval "ac_cv_func_$ac_func=no"
11237 fi
11238 rm -f conftest*
11239
11240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11241   echo "$ac_t""yes" 1>&6
11242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11243   { test "$extra_verbose" = "yes" && cat << EOF
11244     Defining $ac_tr_func
11245 EOF
11246 cat >> confdefs.h <<EOF
11247 #define $ac_tr_func 1
11248 EOF
11249 }
11250  
11251 else
11252   echo "$ac_t""no" 1>&6
11253 fi
11254 done
11255
11256   for ac_hdr in strtio.h
11257 do
11258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11260 echo "configure:11261: checking for $ac_hdr" >&5
11261
11262 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include <$ac_hdr>
11266 EOF
11267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11268 { (eval echo configure:11269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11270 if test -z "$ac_err"; then
11271   rm -rf conftest*
11272   eval "ac_cv_header_$ac_safe=yes"
11273 else
11274   echo "$ac_err" >&5
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=no"
11279 fi
11280 rm -f conftest*
11281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11282   echo "$ac_t""yes" 1>&6
11283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11284   { test "$extra_verbose" = "yes" && cat << EOF
11285     Defining $ac_tr_hdr
11286 EOF
11287 cat >> confdefs.h <<EOF
11288 #define $ac_tr_hdr 1
11289 EOF
11290 }
11291  
11292 else
11293   echo "$ac_t""no" 1>&6
11294 fi
11295 done
11296  fi
11297
11298 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11299    echo "    xemacs will be linked with \"realpath.o\""
11300  fi
11301
11302 for ac_func in getloadavg
11303 do
11304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11305 echo "configure:11306: checking for $ac_func" >&5
11306
11307 cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310 /* System header to define __stub macros and hopefully few prototypes,
11311     which can conflict with char $ac_func(); below.  */
11312 #include <assert.h>
11313 /* Override any gcc2 internal prototype to avoid an error.  */
11314 /* We use char because int might match the return type of a gcc2
11315     builtin and then its argument prototype would still apply.  */
11316 char $ac_func();
11317
11318 int main() {
11319
11320 /* The GNU C library defines this for functions which it implements
11321     to always fail with ENOSYS.  Some functions are actually named
11322     something starting with __ and the normal name is an alias.  */
11323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11324 choke me
11325 #else
11326 $ac_func();
11327 #endif
11328
11329 ; return 0; }
11330 EOF
11331 if { (eval echo configure:11332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11332   rm -rf conftest*
11333   eval "ac_cv_func_$ac_func=yes"
11334 else
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_func_$ac_func=no"
11339 fi
11340 rm -f conftest*
11341
11342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11343   echo "$ac_t""yes" 1>&6
11344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11345   { test "$extra_verbose" = "yes" && cat << EOF
11346     Defining $ac_tr_func
11347 EOF
11348 cat >> confdefs.h <<EOF
11349 #define $ac_tr_func 1
11350 EOF
11351 }
11352  
11353 else
11354   echo "$ac_t""no" 1>&6
11355 fi
11356 done
11357
11358
11359 if test "$ac_cv_func_getloadavg" = "yes"; then
11360         for ac_hdr in sys/loadavg.h
11361 do
11362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11364 echo "configure:11365: checking for $ac_hdr" >&5
11365
11366 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 #include <$ac_hdr>
11370 EOF
11371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11372 { (eval echo configure:11373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11374 if test -z "$ac_err"; then
11375   rm -rf conftest*
11376   eval "ac_cv_header_$ac_safe=yes"
11377 else
11378   echo "$ac_err" >&5
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=no"
11383 fi
11384 rm -f conftest*
11385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11386   echo "$ac_t""yes" 1>&6
11387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11388   { test "$extra_verbose" = "yes" && cat << EOF
11389     Defining $ac_tr_hdr
11390 EOF
11391 cat >> confdefs.h <<EOF
11392 #define $ac_tr_hdr 1
11393 EOF
11394 }
11395  
11396 else
11397   echo "$ac_t""no" 1>&6
11398 fi
11399 done
11400
11401 else
11402     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11403    echo "    xemacs will be linked with \"getloadavg.o\""
11404  fi
11405
11406     
11407 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11408 echo "configure:11409: checking for kstat_open in -lkstat" >&5
11409 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11410
11411 xe_check_libs=" -lkstat "
11412 cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415 /* Override any gcc2 internal prototype to avoid an error.  */
11416 /* We use char because int might match the return type of a gcc2
11417     builtin and then its argument prototype would still apply.  */
11418 char kstat_open();
11419
11420 int main() {
11421 kstat_open()
11422 ; return 0; }
11423 EOF
11424 if { (eval echo configure:11425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11425   rm -rf conftest*
11426   eval "ac_cv_lib_$ac_lib_var=yes"
11427 else
11428   echo "configure: failed program was:" >&5
11429   cat conftest.$ac_ext >&5
11430   rm -rf conftest*
11431   eval "ac_cv_lib_$ac_lib_var=no"
11432 fi
11433 rm -f conftest*
11434 xe_check_libs=""
11435
11436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11437   echo "$ac_t""yes" 1>&6
11438     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11439     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11440   { test "$extra_verbose" = "yes" && cat << EOF
11441     Defining $ac_tr_lib
11442 EOF
11443 cat >> confdefs.h <<EOF
11444 #define $ac_tr_lib 1
11445 EOF
11446 }
11447
11448   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11449
11450 else
11451   echo "$ac_t""no" 1>&6
11452 fi
11453
11454
11455   for ac_hdr in kstat.h
11456 do
11457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11459 echo "configure:11460: checking for $ac_hdr" >&5
11460
11461 cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 #include <$ac_hdr>
11465 EOF
11466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11467 { (eval echo configure:11468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11469 if test -z "$ac_err"; then
11470   rm -rf conftest*
11471   eval "ac_cv_header_$ac_safe=yes"
11472 else
11473   echo "$ac_err" >&5
11474   echo "configure: failed program was:" >&5
11475   cat conftest.$ac_ext >&5
11476   rm -rf conftest*
11477   eval "ac_cv_header_$ac_safe=no"
11478 fi
11479 rm -f conftest*
11480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11481   echo "$ac_t""yes" 1>&6
11482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11483   { test "$extra_verbose" = "yes" && cat << EOF
11484     Defining $ac_tr_hdr
11485 EOF
11486 cat >> confdefs.h <<EOF
11487 #define $ac_tr_hdr 1
11488 EOF
11489 }
11490  
11491 else
11492   echo "$ac_t""no" 1>&6
11493 fi
11494 done
11495
11496
11497     
11498 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11499 echo "configure:11500: checking for kvm_read in -lkvm" >&5
11500 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11501
11502 xe_check_libs=" -lkvm "
11503 cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 /* Override any gcc2 internal prototype to avoid an error.  */
11507 /* We use char because int might match the return type of a gcc2
11508     builtin and then its argument prototype would still apply.  */
11509 char kvm_read();
11510
11511 int main() {
11512 kvm_read()
11513 ; return 0; }
11514 EOF
11515 if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11516   rm -rf conftest*
11517   eval "ac_cv_lib_$ac_lib_var=yes"
11518 else
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   eval "ac_cv_lib_$ac_lib_var=no"
11523 fi
11524 rm -f conftest*
11525 xe_check_libs=""
11526
11527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11528   echo "$ac_t""yes" 1>&6
11529     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11530     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11531   { test "$extra_verbose" = "yes" && cat << EOF
11532     Defining $ac_tr_lib
11533 EOF
11534 cat >> confdefs.h <<EOF
11535 #define $ac_tr_lib 1
11536 EOF
11537 }
11538
11539   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11540
11541 else
11542   echo "$ac_t""no" 1>&6
11543 fi
11544
11545
11546 fi
11547
11548 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11549 echo "configure:11550: checking whether netdb declares h_errno" >&5
11550 cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553 #include <netdb.h>
11554 int main() {
11555 return h_errno;
11556 ; return 0; }
11557 EOF
11558 if { (eval echo configure:11559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11559   rm -rf conftest*
11560   echo "$ac_t""yes" 1>&6
11561    { test "$extra_verbose" = "yes" && cat << \EOF
11562     Defining HAVE_H_ERRNO
11563 EOF
11564 cat >> confdefs.h <<\EOF
11565 #define HAVE_H_ERRNO 1
11566 EOF
11567 }
11568
11569 else
11570   echo "configure: failed program was:" >&5
11571   cat conftest.$ac_ext >&5
11572   rm -rf conftest*
11573   echo "$ac_t""no" 1>&6
11574 fi
11575 rm -f conftest*
11576
11577 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11578 echo "configure:11579: checking for sigsetjmp" >&5
11579 cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <setjmp.h>
11583 int main() {
11584 sigjmp_buf bar; sigsetjmp (bar, 0);
11585 ; return 0; }
11586 EOF
11587 if { (eval echo configure:11588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11588   rm -rf conftest*
11589   echo "$ac_t""yes" 1>&6
11590    { test "$extra_verbose" = "yes" && cat << \EOF
11591     Defining HAVE_SIGSETJMP
11592 EOF
11593 cat >> confdefs.h <<\EOF
11594 #define HAVE_SIGSETJMP 1
11595 EOF
11596 }
11597
11598 else
11599   echo "configure: failed program was:" >&5
11600   cat conftest.$ac_ext >&5
11601   rm -rf conftest*
11602   echo "$ac_t""no" 1>&6
11603 fi
11604 rm -f conftest*
11605
11606 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11607 echo "configure:11608: checking whether localtime caches TZ" >&5
11608
11609 if test "$ac_cv_func_tzset" = "yes"; then
11610 cat > conftest.$ac_ext <<EOF
11611 #line 11612 "configure"
11612 #include "confdefs.h"
11613 #include <time.h>
11614 #if STDC_HEADERS
11615 # include <stdlib.h>
11616 #endif
11617 extern char **environ;
11618 unset_TZ ()
11619 {
11620   char **from, **to;
11621   for (to = from = environ; (*to = *from); from++)
11622     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11623       to++;
11624 }
11625 char TZ_GMT0[] = "TZ=GMT0";
11626 char TZ_PST8[] = "TZ=PST8";
11627 main()
11628 {
11629   time_t now = time ((time_t *) 0);
11630   int hour_GMT0, hour_unset;
11631   if (putenv (TZ_GMT0) != 0)
11632     exit (1);
11633   hour_GMT0 = localtime (&now)->tm_hour;
11634   unset_TZ ();
11635   hour_unset = localtime (&now)->tm_hour;
11636   if (putenv (TZ_PST8) != 0)
11637     exit (1);
11638   if (localtime (&now)->tm_hour == hour_GMT0)
11639     exit (1);
11640   unset_TZ ();
11641   if (localtime (&now)->tm_hour != hour_unset)
11642     exit (1);
11643   exit (0);
11644 }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11647 then
11648   emacs_cv_localtime_cache=no
11649 else
11650   conftest_rc="$?"
11651   echo "configure: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   rm -fr conftest*
11654   emacs_cv_localtime_cache=yes
11655 fi
11656 rm -fr conftest*
11657 else
11658         # If we lack tzset, report that localtime does not cache TZ,
11659         # since we can't invalidate the cache if we don't have tzset.
11660         emacs_cv_localtime_cache=no
11661 fi
11662 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11663 if test $emacs_cv_localtime_cache = yes; then
11664   { test "$extra_verbose" = "yes" && cat << \EOF
11665     Defining LOCALTIME_CACHE
11666 EOF
11667 cat >> confdefs.h <<\EOF
11668 #define LOCALTIME_CACHE 1
11669 EOF
11670 }
11671
11672 fi
11673
11674 if test "$HAVE_TIMEVAL" = "yes"; then
11675 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11676 echo "configure:11677: checking whether gettimeofday accepts one or two arguments" >&5
11677 cat > conftest.$ac_ext <<EOF
11678 #line 11679 "configure"
11679 #include "confdefs.h"
11680
11681 #ifdef TIME_WITH_SYS_TIME
11682 #include <sys/time.h>
11683 #include <time.h>
11684 #else
11685 #ifdef HAVE_SYS_TIME_H
11686 #include <sys/time.h>
11687 #else
11688 #include <time.h>
11689 #endif
11690 #endif
11691   
11692 int main() {
11693
11694   struct timeval time;
11695   gettimeofday (&time, 0);
11696
11697 ; return 0; }
11698 EOF
11699 if { (eval echo configure:11700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11700   rm -rf conftest*
11701   echo "$ac_t""two" 1>&6
11702 else
11703   echo "configure: failed program was:" >&5
11704   cat conftest.$ac_ext >&5
11705   rm -rf conftest*
11706   echo "$ac_t""one" 1>&6
11707    { test "$extra_verbose" = "yes" && cat << \EOF
11708     Defining GETTIMEOFDAY_ONE_ARGUMENT
11709 EOF
11710 cat >> confdefs.h <<\EOF
11711 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11712 EOF
11713 }
11714
11715 fi
11716 rm -f conftest*
11717 fi
11718
11719
11720 echo $ac_n "checking for inline""... $ac_c" 1>&6
11721 echo "configure:11722: checking for inline" >&5
11722
11723 ac_cv_c_inline=no
11724 for ac_kw in inline __inline__ __inline; do
11725   cat > conftest.$ac_ext <<EOF
11726 #line 11727 "configure"
11727 #include "confdefs.h"
11728
11729 int main() {
11730 } $ac_kw foo() {
11731 ; return 0; }
11732 EOF
11733 if { (eval echo configure:11734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11734   rm -rf conftest*
11735   ac_cv_c_inline=$ac_kw; break
11736 else
11737   echo "configure: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739 fi
11740 rm -f conftest*
11741 done
11742
11743
11744 echo "$ac_t""$ac_cv_c_inline" 1>&6
11745 case "$ac_cv_c_inline" in
11746   inline | yes) ;;
11747   no) { test "$extra_verbose" = "yes" && cat << \EOF
11748     Defining inline = 
11749 EOF
11750 cat >> confdefs.h <<\EOF
11751 #define inline 
11752 EOF
11753 }
11754  ;;
11755   *)  { test "$extra_verbose" = "yes" && cat << EOF
11756     Defining inline = $ac_cv_c_inline
11757 EOF
11758 cat >> confdefs.h <<EOF
11759 #define inline $ac_cv_c_inline
11760 EOF
11761 }
11762  ;;
11763 esac
11764
11765 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11766    echo "    xemacs will be linked with \"inline.o\""
11767  fi
11768
11769
11770 if test "$__DECC" != "yes"; then
11771   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11772 # for constant arguments.  Useless!
11773 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11774 echo "configure:11775: checking for working alloca.h" >&5
11775
11776 cat > conftest.$ac_ext <<EOF
11777 #line 11778 "configure"
11778 #include "confdefs.h"
11779 #include <alloca.h>
11780 int main() {
11781 char *p = alloca(2 * sizeof(int));
11782 ; return 0; }
11783 EOF
11784 if { (eval echo configure:11785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11785   rm -rf conftest*
11786   ac_cv_header_alloca_h=yes
11787 else
11788   echo "configure: failed program was:" >&5
11789   cat conftest.$ac_ext >&5
11790   rm -rf conftest*
11791   ac_cv_header_alloca_h=no
11792 fi
11793 rm -f conftest*
11794
11795 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11796 if test $ac_cv_header_alloca_h = yes; then
11797   { test "$extra_verbose" = "yes" && cat << \EOF
11798     Defining HAVE_ALLOCA_H
11799 EOF
11800 cat >> confdefs.h <<\EOF
11801 #define HAVE_ALLOCA_H 1
11802 EOF
11803 }
11804
11805 fi
11806
11807 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11808 echo "configure:11809: checking for alloca" >&5
11809
11810 cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813
11814 #ifdef __GNUC__
11815 # define alloca __builtin_alloca
11816 #else
11817 # ifdef _MSC_VER
11818 #  include <malloc.h>
11819 #  define alloca _alloca
11820 # else
11821 #  if HAVE_ALLOCA_H
11822 #   include <alloca.h>
11823 #  else
11824 #   ifdef _AIX
11825  #pragma alloca
11826 #   else
11827 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11828 char *alloca ();
11829 #    endif
11830 #   endif
11831 #  endif
11832 # endif
11833 #endif
11834
11835 int main() {
11836 char *p = (char *) alloca(1);
11837 ; return 0; }
11838 EOF
11839 if { (eval echo configure:11840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11840   rm -rf conftest*
11841   ac_cv_func_alloca_works=yes
11842 else
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   ac_cv_func_alloca_works=no
11847 fi
11848 rm -f conftest*
11849
11850 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11851 if test $ac_cv_func_alloca_works = yes; then
11852   { test "$extra_verbose" = "yes" && cat << \EOF
11853     Defining HAVE_ALLOCA
11854 EOF
11855 cat >> confdefs.h <<\EOF
11856 #define HAVE_ALLOCA 1
11857 EOF
11858 }
11859
11860 fi
11861
11862 if test $ac_cv_func_alloca_works = no; then
11863   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11864   # that cause trouble.  Some versions do not even contain alloca or
11865   # contain a buggy version.  If you still want to use their alloca,
11866   # use ar to extract alloca.o from them instead of compiling alloca.c.
11867   ALLOCA=alloca.${ac_objext}
11868   { test "$extra_verbose" = "yes" && cat << \EOF
11869     Defining C_ALLOCA
11870 EOF
11871 cat >> confdefs.h <<\EOF
11872 #define C_ALLOCA 1
11873 EOF
11874 }
11875
11876
11877 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11878 echo "configure:11879: checking whether alloca needs Cray hooks" >&5
11879
11880 cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883 #if defined(CRAY) && ! defined(CRAY2)
11884 webecray
11885 #else
11886 wenotbecray
11887 #endif
11888
11889 EOF
11890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11891   egrep "webecray" >/dev/null 2>&1; then
11892   rm -rf conftest*
11893   ac_cv_os_cray=yes
11894 else
11895   rm -rf conftest*
11896   ac_cv_os_cray=no
11897 fi
11898 rm -f conftest*
11899
11900
11901 echo "$ac_t""$ac_cv_os_cray" 1>&6
11902 if test $ac_cv_os_cray = yes; then
11903 for ac_func in _getb67 GETB67 getb67; do
11904   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11905 echo "configure:11906: checking for $ac_func" >&5
11906
11907 cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 /* System header to define __stub macros and hopefully few prototypes,
11911     which can conflict with char $ac_func(); below.  */
11912 #include <assert.h>
11913 /* Override any gcc2 internal prototype to avoid an error.  */
11914 /* We use char because int might match the return type of a gcc2
11915     builtin and then its argument prototype would still apply.  */
11916 char $ac_func();
11917
11918 int main() {
11919
11920 /* The GNU C library defines this for functions which it implements
11921     to always fail with ENOSYS.  Some functions are actually named
11922     something starting with __ and the normal name is an alias.  */
11923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11924 choke me
11925 #else
11926 $ac_func();
11927 #endif
11928
11929 ; return 0; }
11930 EOF
11931 if { (eval echo configure:11932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11932   rm -rf conftest*
11933   eval "ac_cv_func_$ac_func=yes"
11934 else
11935   echo "configure: failed program was:" >&5
11936   cat conftest.$ac_ext >&5
11937   rm -rf conftest*
11938   eval "ac_cv_func_$ac_func=no"
11939 fi
11940 rm -f conftest*
11941
11942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11943   echo "$ac_t""yes" 1>&6
11944   { test "$extra_verbose" = "yes" && cat << EOF
11945     Defining CRAY_STACKSEG_END = $ac_func
11946 EOF
11947 cat >> confdefs.h <<EOF
11948 #define CRAY_STACKSEG_END $ac_func
11949 EOF
11950 }
11951
11952   break
11953 else
11954   echo "$ac_t""no" 1>&6
11955 fi
11956
11957 done
11958 fi
11959
11960 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11961 echo "configure:11962: checking stack direction for C alloca" >&5
11962
11963 cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966 find_stack_direction ()
11967 {
11968   static char *addr = 0;
11969   auto char dummy;
11970   if (addr == 0)
11971     {
11972       addr = &dummy;
11973       return find_stack_direction ();
11974     }
11975   else
11976     return (&dummy > addr) ? 1 : -1;
11977 }
11978 main ()
11979 {
11980   exit (find_stack_direction() < 0);
11981 }
11982 EOF
11983 if { (eval echo configure:11984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11984 then
11985   ac_cv_c_stack_direction=1
11986 else
11987   conftest_rc="$?"
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -fr conftest*
11991   ac_cv_c_stack_direction=-1
11992 fi
11993 rm -fr conftest*
11994
11995 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11996 { test "$extra_verbose" = "yes" && cat << EOF
11997     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11998 EOF
11999 cat >> confdefs.h <<EOF
12000 #define STACK_DIRECTION $ac_cv_c_stack_direction
12001 EOF
12002 }
12003
12004 fi
12005
12006   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12007    echo "    xemacs will be linked with \"$ALLOCA\""
12008  fi
12009 fi
12010
12011 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12012 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12013 echo "configure:12014: checking for vfork.h" >&5
12014
12015 cat > conftest.$ac_ext <<EOF
12016 #line 12017 "configure"
12017 #include "confdefs.h"
12018 #include <vfork.h>
12019 EOF
12020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12021 { (eval echo configure:12022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12023 if test -z "$ac_err"; then
12024   rm -rf conftest*
12025   eval "ac_cv_header_$ac_safe=yes"
12026 else
12027   echo "$ac_err" >&5
12028   echo "configure: failed program was:" >&5
12029   cat conftest.$ac_ext >&5
12030   rm -rf conftest*
12031   eval "ac_cv_header_$ac_safe=no"
12032 fi
12033 rm -f conftest*
12034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12035   echo "$ac_t""yes" 1>&6
12036   { test "$extra_verbose" = "yes" && cat << \EOF
12037     Defining HAVE_VFORK_H
12038 EOF
12039 cat >> confdefs.h <<\EOF
12040 #define HAVE_VFORK_H 1
12041 EOF
12042 }
12043
12044 else
12045   echo "$ac_t""no" 1>&6
12046 fi
12047
12048 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12049 echo "configure:12050: checking for working vfork" >&5
12050
12051 cat > conftest.$ac_ext <<EOF
12052 #line 12053 "configure"
12053 #include "confdefs.h"
12054 /* Thanks to Paul Eggert for this test.  */
12055 #include <stdio.h>
12056 #include <sys/types.h>
12057 #include <sys/stat.h>
12058 #ifdef HAVE_UNISTD_H
12059 #include <unistd.h>
12060 #endif
12061 #ifdef HAVE_VFORK_H
12062 #include <vfork.h>
12063 #endif
12064 /* On some sparc systems, changes by the child to local and incoming
12065    argument registers are propagated back to the parent.
12066    The compiler is told about this with #include <vfork.h>,
12067    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12068    Test for this by using a static variable whose address
12069    is put into a register that is clobbered by the vfork.  */
12070 static
12071 #ifdef __cplusplus
12072 sparc_address_test (int arg)
12073 #else
12074 sparc_address_test (arg) int arg;
12075 #endif
12076 {
12077   static pid_t child;
12078   if (!child) {
12079     child = vfork ();
12080     if (child < 0) {
12081       perror ("vfork");
12082       _exit(2);
12083     }
12084     if (!child) {
12085       arg = getpid();
12086       write(-1, "", 0);
12087       _exit (arg);
12088     }
12089   }
12090 }
12091 main() {
12092   pid_t parent = getpid ();
12093   pid_t child;
12094
12095   sparc_address_test ();
12096
12097   child = vfork ();
12098
12099   if (child == 0) {
12100     /* Here is another test for sparc vfork register problems.
12101        This test uses lots of local variables, at least
12102        as many local variables as main has allocated so far
12103        including compiler temporaries.  4 locals are enough for
12104        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12105        A buggy compiler should reuse the register of parent
12106        for one of the local variables, since it will think that
12107        parent can't possibly be used any more in this routine.
12108        Assigning to the local variable will thus munge parent
12109        in the parent process.  */
12110     pid_t
12111       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12112       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12113     /* Convince the compiler that p..p7 are live; otherwise, it might
12114        use the same hardware register for all 8 local variables.  */
12115     if (p != p1 || p != p2 || p != p3 || p != p4
12116         || p != p5 || p != p6 || p != p7)
12117       _exit(1);
12118
12119     /* On some systems (e.g. IRIX 3.3),
12120        vfork doesn't separate parent from child file descriptors.
12121        If the child closes a descriptor before it execs or exits,
12122        this munges the parent's descriptor as well.
12123        Test for this by closing stdout in the child.  */
12124     _exit(close(fileno(stdout)) != 0);
12125   } else {
12126     int status;
12127     struct stat st;
12128
12129     while (wait(&status) != child)
12130       ;
12131     exit(
12132          /* Was there some problem with vforking?  */
12133          child < 0
12134
12135          /* Did the child fail?  (This shouldn't happen.)  */
12136          || status
12137
12138          /* Did the vfork/compiler bug occur?  */
12139          || parent != getpid()
12140
12141          /* Did the file descriptor bug occur?  */
12142          || fstat(fileno(stdout), &st) != 0
12143          );
12144   }
12145 }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12148 then
12149   ac_cv_func_vfork_works=yes
12150 else
12151   conftest_rc="$?"
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -fr conftest*
12155   ac_cv_func_vfork_works=no
12156 fi
12157 rm -fr conftest*
12158
12159 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12160 if test $ac_cv_func_vfork_works = no; then
12161   { test "$extra_verbose" = "yes" && cat << \EOF
12162     Defining vfork = fork
12163 EOF
12164 cat >> confdefs.h <<\EOF
12165 #define vfork fork
12166 EOF
12167 }
12168
12169 fi
12170
12171
12172 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12173 echo "configure:12174: checking for working strcoll" >&5
12174
12175 cat > conftest.$ac_ext <<EOF
12176 #line 12177 "configure"
12177 #include "confdefs.h"
12178 #include <string.h>
12179 main ()
12180 {
12181   exit (strcoll ("abc", "def") >= 0 ||
12182         strcoll ("ABC", "DEF") >= 0 ||
12183         strcoll ("123", "456") >= 0);
12184 }
12185 EOF
12186 if { (eval echo configure:12187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12187 then
12188   ac_cv_func_strcoll_works=yes
12189 else
12190   conftest_rc="$?"
12191   echo "configure: failed program was:" >&5
12192   cat conftest.$ac_ext >&5
12193   rm -fr conftest*
12194   ac_cv_func_strcoll_works=no
12195 fi
12196 rm -fr conftest*
12197
12198 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12199 if test $ac_cv_func_strcoll_works = yes; then
12200   { test "$extra_verbose" = "yes" && cat << \EOF
12201     Defining HAVE_STRCOLL
12202 EOF
12203 cat >> confdefs.h <<\EOF
12204 #define HAVE_STRCOLL 1
12205 EOF
12206 }
12207
12208 fi
12209
12210
12211 for ac_func in getpgrp
12212 do
12213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12214 echo "configure:12215: checking for $ac_func" >&5
12215
12216 cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219 /* System header to define __stub macros and hopefully few prototypes,
12220     which can conflict with char $ac_func(); below.  */
12221 #include <assert.h>
12222 /* Override any gcc2 internal prototype to avoid an error.  */
12223 /* We use char because int might match the return type of a gcc2
12224     builtin and then its argument prototype would still apply.  */
12225 char $ac_func();
12226
12227 int main() {
12228
12229 /* The GNU C library defines this for functions which it implements
12230     to always fail with ENOSYS.  Some functions are actually named
12231     something starting with __ and the normal name is an alias.  */
12232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12233 choke me
12234 #else
12235 $ac_func();
12236 #endif
12237
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   eval "ac_cv_func_$ac_func=yes"
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   eval "ac_cv_func_$ac_func=no"
12248 fi
12249 rm -f conftest*
12250
12251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12252   echo "$ac_t""yes" 1>&6
12253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12254   { test "$extra_verbose" = "yes" && cat << EOF
12255     Defining $ac_tr_func
12256 EOF
12257 cat >> confdefs.h <<EOF
12258 #define $ac_tr_func 1
12259 EOF
12260 }
12261  
12262 else
12263   echo "$ac_t""no" 1>&6
12264 fi
12265 done
12266
12267 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12268 echo "configure:12269: checking whether getpgrp takes no argument" >&5
12269
12270 cat > conftest.$ac_ext <<EOF
12271 #line 12272 "configure"
12272 #include "confdefs.h"
12273
12274 /*
12275  * If this system has a BSD-style getpgrp(),
12276  * which takes a pid argument, exit unsuccessfully.
12277  *
12278  * Snarfed from Chet Ramey's bash pgrp.c test program
12279  */
12280 #include <stdio.h>
12281 #include <sys/types.h>
12282
12283 int     pid;
12284 int     pg1, pg2, pg3, pg4;
12285 int     ng, np, s, child;
12286
12287 main()
12288 {
12289         pid = getpid();
12290         pg1 = getpgrp(0);
12291         pg2 = getpgrp();
12292         pg3 = getpgrp(pid);
12293         pg4 = getpgrp(1);
12294
12295         /*
12296          * If all of these values are the same, it's pretty sure that
12297          * we're on a system that ignores getpgrp's first argument.
12298          */
12299         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12300                 exit(0);
12301
12302         child = fork();
12303         if (child < 0)
12304                 exit(1);
12305         else if (child == 0) {
12306                 np = getpid();
12307                 /*
12308                  * If this is Sys V, this will not work; pgrp will be
12309                  * set to np because setpgrp just changes a pgrp to be
12310                  * the same as the pid.
12311                  */
12312                 setpgrp(np, pg1);
12313                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12314                 if (ng == pg1) {
12315                         exit(1);
12316                 } else {
12317                         exit(0);
12318                 }
12319         } else {
12320                 wait(&s);
12321                 exit(s>>8);
12322         }
12323 }
12324
12325 EOF
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12327 then
12328   ac_cv_func_getpgrp_void=yes
12329 else
12330   conftest_rc="$?"
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -fr conftest*
12334   ac_cv_func_getpgrp_void=no
12335 fi
12336 rm -fr conftest*
12337
12338
12339 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12340 if test $ac_cv_func_getpgrp_void = yes; then
12341   { test "$extra_verbose" = "yes" && cat << \EOF
12342     Defining GETPGRP_VOID
12343 EOF
12344 cat >> confdefs.h <<\EOF
12345 #define GETPGRP_VOID 1
12346 EOF
12347 }
12348
12349 fi
12350
12351
12352 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12353 echo "configure:12354: checking for working mmap" >&5
12354 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12355 cat > conftest.$ac_ext <<EOF
12356 #line 12357 "configure"
12357 #include "confdefs.h"
12358 #include <stdio.h>
12359 #include <unistd.h>
12360 #include <fcntl.h>
12361 #include <sys/mman.h>
12362
12363 #ifndef MAP_VARIABLE
12364 #define MAP_VARIABLE 0
12365 #endif
12366
12367 #ifndef MAP_FAILED
12368 #define MAP_FAILED -1
12369 #endif
12370
12371 int main (int argc, char *argv[])
12372 {
12373   int fd = -1;
12374   caddr_t p;
12375 #ifndef MAP_ANONYMOUS
12376   fd = open ("/dev/zero", O_RDWR);
12377   if (fd < 0)
12378     return 1;
12379 #define MAP_ANONYMOUS 0
12380 #endif
12381   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12382            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12383            fd, 0) != (void *) MAP_FAILED)
12384     return 0;
12385   perror ("conftest: mmap failed");
12386   return 1;
12387 }
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12390 then
12391   have_mmap=yes
12392 else
12393   conftest_rc="$?"
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -fr conftest*
12397   have_mmap=no
12398 fi
12399 rm -fr conftest* ;;
12400 esac
12401 echo "$ac_t""$have_mmap" 1>&6
12402 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12403     Defining HAVE_MMAP
12404 EOF
12405 cat >> confdefs.h <<\EOF
12406 #define HAVE_MMAP 1
12407 EOF
12408 }
12409
12410
12411 case "$opsys" in cygwin*) 
12412         test "$rel_alloc" = "default" && rel_alloc=no ;;
12413 esac
12414 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12415 if test "$rel_alloc $have_mmap" = "default yes"; then
12416   if test "$doug_lea_malloc" = "yes"; then
12417         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12418 echo "configure:12419: checking for M_MMAP_THRESHOLD" >&5
12419     cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 #include <malloc.h>
12423 int main() {
12424
12425 #ifndef M_MMAP_THRESHOLD
12426 #error No M_MMAP_THRESHOLD :-(
12427 !@+$%^&*_)(_ - unlikely to compile...
12428 #endif
12429
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12433   rm -rf conftest*
12434   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12440 fi
12441 rm -f conftest*
12442   else
12443     rel_alloc=yes
12444   fi
12445 fi
12446 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12447     Defining REL_ALLOC
12448 EOF
12449 cat >> confdefs.h <<\EOF
12450 #define REL_ALLOC 1
12451 EOF
12452 }
12453
12454
12455 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12456 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12457 echo "configure:12458: checking for termios.h" >&5
12458
12459 cat > conftest.$ac_ext <<EOF
12460 #line 12461 "configure"
12461 #include "confdefs.h"
12462 #include <termios.h>
12463 EOF
12464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12465 { (eval echo configure:12466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12467 if test -z "$ac_err"; then
12468   rm -rf conftest*
12469   eval "ac_cv_header_$ac_safe=yes"
12470 else
12471   echo "$ac_err" >&5
12472   echo "configure: failed program was:" >&5
12473   cat conftest.$ac_ext >&5
12474   rm -rf conftest*
12475   eval "ac_cv_header_$ac_safe=no"
12476 fi
12477 rm -f conftest*
12478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12479   echo "$ac_t""yes" 1>&6
12480   { test "$extra_verbose" = "yes" && cat << \EOF
12481     Defining HAVE_TERMIOS
12482 EOF
12483 cat >> confdefs.h <<\EOF
12484 #define HAVE_TERMIOS 1
12485 EOF
12486 }
12487
12488   { test "$extra_verbose" = "yes" && cat << \EOF
12489     Defining SIGNALS_VIA_CHARACTERS
12490 EOF
12491 cat >> confdefs.h <<\EOF
12492 #define SIGNALS_VIA_CHARACTERS 1
12493 EOF
12494 }
12495
12496   { test "$extra_verbose" = "yes" && cat << \EOF
12497     Defining NO_TERMIO
12498 EOF
12499 cat >> confdefs.h <<\EOF
12500 #define NO_TERMIO 1
12501 EOF
12502 }
12503
12504 else
12505   echo "$ac_t""no" 1>&6
12506 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12507 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12508 echo "configure:12509: checking for termio.h" >&5
12509
12510 cat > conftest.$ac_ext <<EOF
12511 #line 12512 "configure"
12512 #include "confdefs.h"
12513 #include <termio.h>
12514 EOF
12515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12516 { (eval echo configure:12517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12518 if test -z "$ac_err"; then
12519   rm -rf conftest*
12520   eval "ac_cv_header_$ac_safe=yes"
12521 else
12522   echo "$ac_err" >&5
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -rf conftest*
12526   eval "ac_cv_header_$ac_safe=no"
12527 fi
12528 rm -f conftest*
12529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12530   echo "$ac_t""yes" 1>&6
12531   { test "$extra_verbose" = "yes" && cat << \EOF
12532     Defining HAVE_TERMIO
12533 EOF
12534 cat >> confdefs.h <<\EOF
12535 #define HAVE_TERMIO 1
12536 EOF
12537 }
12538
12539 else
12540   echo "$ac_t""no" 1>&6
12541 fi
12542
12543 fi
12544
12545
12546
12547 echo $ac_n "checking for socket""... $ac_c" 1>&6
12548 echo "configure:12549: checking for socket" >&5
12549
12550 cat > conftest.$ac_ext <<EOF
12551 #line 12552 "configure"
12552 #include "confdefs.h"
12553 /* System header to define __stub macros and hopefully few prototypes,
12554     which can conflict with char socket(); below.  */
12555 #include <assert.h>
12556 /* Override any gcc2 internal prototype to avoid an error.  */
12557 /* We use char because int might match the return type of a gcc2
12558     builtin and then its argument prototype would still apply.  */
12559 char socket();
12560
12561 int main() {
12562
12563 /* The GNU C library defines this for functions which it implements
12564     to always fail with ENOSYS.  Some functions are actually named
12565     something starting with __ and the normal name is an alias.  */
12566 #if defined (__stub_socket) || defined (__stub___socket)
12567 choke me
12568 #else
12569 socket();
12570 #endif
12571
12572 ; return 0; }
12573 EOF
12574 if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12575   rm -rf conftest*
12576   eval "ac_cv_func_socket=yes"
12577 else
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -rf conftest*
12581   eval "ac_cv_func_socket=no"
12582 fi
12583 rm -f conftest*
12584
12585 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12586   echo "$ac_t""yes" 1>&6
12587   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12588 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12589 echo "configure:12590: checking for netinet/in.h" >&5
12590
12591 cat > conftest.$ac_ext <<EOF
12592 #line 12593 "configure"
12593 #include "confdefs.h"
12594 #include <netinet/in.h>
12595 EOF
12596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12597 { (eval echo configure:12598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12599 if test -z "$ac_err"; then
12600   rm -rf conftest*
12601   eval "ac_cv_header_$ac_safe=yes"
12602 else
12603   echo "$ac_err" >&5
12604   echo "configure: failed program was:" >&5
12605   cat conftest.$ac_ext >&5
12606   rm -rf conftest*
12607   eval "ac_cv_header_$ac_safe=no"
12608 fi
12609 rm -f conftest*
12610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12611   echo "$ac_t""yes" 1>&6
12612   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12613 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12614 echo "configure:12615: checking for arpa/inet.h" >&5
12615
12616 cat > conftest.$ac_ext <<EOF
12617 #line 12618 "configure"
12618 #include "confdefs.h"
12619 #include <arpa/inet.h>
12620 EOF
12621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12622 { (eval echo configure:12623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12624 if test -z "$ac_err"; then
12625   rm -rf conftest*
12626   eval "ac_cv_header_$ac_safe=yes"
12627 else
12628   echo "$ac_err" >&5
12629   echo "configure: failed program was:" >&5
12630   cat conftest.$ac_ext >&5
12631   rm -rf conftest*
12632   eval "ac_cv_header_$ac_safe=no"
12633 fi
12634 rm -f conftest*
12635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12636   echo "$ac_t""yes" 1>&6
12637   
12638   { test "$extra_verbose" = "yes" && cat << \EOF
12639     Defining HAVE_SOCKETS
12640 EOF
12641 cat >> confdefs.h <<\EOF
12642 #define HAVE_SOCKETS 1
12643 EOF
12644 }
12645
12646       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12647 echo "configure:12648: checking "for sun_len member in struct sockaddr_un"" >&5
12648       cat > conftest.$ac_ext <<EOF
12649 #line 12650 "configure"
12650 #include "confdefs.h"
12651
12652 #include <sys/types.h>
12653 #include <sys/socket.h>
12654 #include <sys/un.h>
12655       
12656 int main() {
12657 static struct sockaddr_un x; x.sun_len = 1;
12658 ; return 0; }
12659 EOF
12660 if { (eval echo configure:12661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12661   rm -rf conftest*
12662   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12663     Defining HAVE_SOCKADDR_SUN_LEN
12664 EOF
12665 cat >> confdefs.h <<\EOF
12666 #define HAVE_SOCKADDR_SUN_LEN 1
12667 EOF
12668 }
12669
12670 else
12671   echo "configure: failed program was:" >&5
12672   cat conftest.$ac_ext >&5
12673   rm -rf conftest*
12674   echo "$ac_t""no" 1>&6
12675 fi
12676 rm -f conftest*
12677       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12678 echo "configure:12679: checking "for ip_mreq struct in netinet/in.h"" >&5
12679       cat > conftest.$ac_ext <<EOF
12680 #line 12681 "configure"
12681 #include "confdefs.h"
12682
12683 #include <sys/types.h>
12684 #include <netinet/in.h>
12685       
12686 int main() {
12687 static struct ip_mreq x;
12688 ; return 0; }
12689 EOF
12690 if { (eval echo configure:12691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12691   rm -rf conftest*
12692   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12693     Defining HAVE_MULTICAST
12694 EOF
12695 cat >> confdefs.h <<\EOF
12696 #define HAVE_MULTICAST 1
12697 EOF
12698 }
12699
12700 else
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703   rm -rf conftest*
12704   echo "$ac_t""no" 1>&6
12705 fi
12706 rm -f conftest*
12707 else
12708   echo "$ac_t""no" 1>&6
12709 fi
12710
12711 else
12712   echo "$ac_t""no" 1>&6
12713 fi
12714
12715 else
12716   echo "$ac_t""no" 1>&6
12717 fi
12718
12719
12720 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12721 echo "configure:12722: checking for msgget" >&5
12722
12723 cat > conftest.$ac_ext <<EOF
12724 #line 12725 "configure"
12725 #include "confdefs.h"
12726 /* System header to define __stub macros and hopefully few prototypes,
12727     which can conflict with char msgget(); below.  */
12728 #include <assert.h>
12729 /* Override any gcc2 internal prototype to avoid an error.  */
12730 /* We use char because int might match the return type of a gcc2
12731     builtin and then its argument prototype would still apply.  */
12732 char msgget();
12733
12734 int main() {
12735
12736 /* The GNU C library defines this for functions which it implements
12737     to always fail with ENOSYS.  Some functions are actually named
12738     something starting with __ and the normal name is an alias.  */
12739 #if defined (__stub_msgget) || defined (__stub___msgget)
12740 choke me
12741 #else
12742 msgget();
12743 #endif
12744
12745 ; return 0; }
12746 EOF
12747 if { (eval echo configure:12748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12748   rm -rf conftest*
12749   eval "ac_cv_func_msgget=yes"
12750 else
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -rf conftest*
12754   eval "ac_cv_func_msgget=no"
12755 fi
12756 rm -f conftest*
12757
12758 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12759   echo "$ac_t""yes" 1>&6
12760   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12761 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12762 echo "configure:12763: checking for sys/ipc.h" >&5
12763
12764 cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767 #include <sys/ipc.h>
12768 EOF
12769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12770 { (eval echo configure:12771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12772 if test -z "$ac_err"; then
12773   rm -rf conftest*
12774   eval "ac_cv_header_$ac_safe=yes"
12775 else
12776   echo "$ac_err" >&5
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   eval "ac_cv_header_$ac_safe=no"
12781 fi
12782 rm -f conftest*
12783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12784   echo "$ac_t""yes" 1>&6
12785   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12786 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12787 echo "configure:12788: checking for sys/msg.h" >&5
12788
12789 cat > conftest.$ac_ext <<EOF
12790 #line 12791 "configure"
12791 #include "confdefs.h"
12792 #include <sys/msg.h>
12793 EOF
12794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12795 { (eval echo configure:12796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12797 if test -z "$ac_err"; then
12798   rm -rf conftest*
12799   eval "ac_cv_header_$ac_safe=yes"
12800 else
12801   echo "$ac_err" >&5
12802   echo "configure: failed program was:" >&5
12803   cat conftest.$ac_ext >&5
12804   rm -rf conftest*
12805   eval "ac_cv_header_$ac_safe=no"
12806 fi
12807 rm -f conftest*
12808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12809   echo "$ac_t""yes" 1>&6
12810   { test "$extra_verbose" = "yes" && cat << \EOF
12811     Defining HAVE_SYSVIPC
12812 EOF
12813 cat >> confdefs.h <<\EOF
12814 #define HAVE_SYSVIPC 1
12815 EOF
12816 }
12817
12818 else
12819   echo "$ac_t""no" 1>&6
12820 fi
12821
12822 else
12823   echo "$ac_t""no" 1>&6
12824 fi
12825
12826 else
12827   echo "$ac_t""no" 1>&6
12828 fi
12829
12830
12831 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12832 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12833 echo "configure:12834: checking for dirent.h" >&5
12834
12835 cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 #include <dirent.h>
12839 EOF
12840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12841 { (eval echo configure:12842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12843 if test -z "$ac_err"; then
12844   rm -rf conftest*
12845   eval "ac_cv_header_$ac_safe=yes"
12846 else
12847   echo "$ac_err" >&5
12848   echo "configure: failed program was:" >&5
12849   cat conftest.$ac_ext >&5
12850   rm -rf conftest*
12851   eval "ac_cv_header_$ac_safe=no"
12852 fi
12853 rm -f conftest*
12854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12855   echo "$ac_t""yes" 1>&6
12856   { test "$extra_verbose" = "yes" && cat << \EOF
12857     Defining SYSV_SYSTEM_DIR
12858 EOF
12859 cat >> confdefs.h <<\EOF
12860 #define SYSV_SYSTEM_DIR 1
12861 EOF
12862 }
12863
12864 else
12865   echo "$ac_t""no" 1>&6
12866 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12867 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12868 echo "configure:12869: checking for sys/dir.h" >&5
12869
12870 cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 #include <sys/dir.h>
12874 EOF
12875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12876 { (eval echo configure:12877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12878 if test -z "$ac_err"; then
12879   rm -rf conftest*
12880   eval "ac_cv_header_$ac_safe=yes"
12881 else
12882   echo "$ac_err" >&5
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -rf conftest*
12886   eval "ac_cv_header_$ac_safe=no"
12887 fi
12888 rm -f conftest*
12889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12890   echo "$ac_t""yes" 1>&6
12891   :
12892 else
12893   echo "$ac_t""no" 1>&6
12894 { test "$extra_verbose" = "yes" && cat << \EOF
12895     Defining NONSYSTEM_DIR_LIBRARY
12896 EOF
12897 cat >> confdefs.h <<\EOF
12898 #define NONSYSTEM_DIR_LIBRARY 1
12899 EOF
12900 }
12901
12902 fi
12903
12904 fi
12905
12906
12907 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12908 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12909 echo "configure:12910: checking for nlist.h" >&5
12910
12911 cat > conftest.$ac_ext <<EOF
12912 #line 12913 "configure"
12913 #include "confdefs.h"
12914 #include <nlist.h>
12915 EOF
12916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12917 { (eval echo configure:12918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12919 if test -z "$ac_err"; then
12920   rm -rf conftest*
12921   eval "ac_cv_header_$ac_safe=yes"
12922 else
12923   echo "$ac_err" >&5
12924   echo "configure: failed program was:" >&5
12925   cat conftest.$ac_ext >&5
12926   rm -rf conftest*
12927   eval "ac_cv_header_$ac_safe=no"
12928 fi
12929 rm -f conftest*
12930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12931   echo "$ac_t""yes" 1>&6
12932   { test "$extra_verbose" = "yes" && cat << \EOF
12933     Defining NLIST_STRUCT
12934 EOF
12935 cat >> confdefs.h <<\EOF
12936 #define NLIST_STRUCT 1
12937 EOF
12938 }
12939
12940 else
12941   echo "$ac_t""no" 1>&6
12942 fi
12943
12944
12945
12946 echo "checking "for sound support"" 1>&6
12947 echo "configure:12948: checking "for sound support"" >&5
12948 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12949
12950 if test "$with_native_sound" != "no"; then
12951     if test -n "$native_sound_lib"; then
12952     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12953 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12954 echo "configure:12955: checking for multimedia/audio_device.h" >&5
12955
12956 cat > conftest.$ac_ext <<EOF
12957 #line 12958 "configure"
12958 #include "confdefs.h"
12959 #include <multimedia/audio_device.h>
12960 EOF
12961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12962 { (eval echo configure:12963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12964 if test -z "$ac_err"; then
12965   rm -rf conftest*
12966   eval "ac_cv_header_$ac_safe=yes"
12967 else
12968   echo "$ac_err" >&5
12969   echo "configure: failed program was:" >&5
12970   cat conftest.$ac_ext >&5
12971   rm -rf conftest*
12972   eval "ac_cv_header_$ac_safe=no"
12973 fi
12974 rm -f conftest*
12975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12976   echo "$ac_t""yes" 1>&6
12977   sound_found=yes sound_cflags=""
12978       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12979    echo "    xemacs will be linked with \"sunplay.o\""
12980  fi
12981 else
12982   echo "$ac_t""no" 1>&6
12983 fi
12984
12985   fi
12986
12987     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12988     sound_found=yes
12989     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12990    echo "    xemacs will be linked with \"sunplay.o\""
12991  fi
12992     if test -d "/usr/demo/SOUND/include"
12993       then sound_cflags="-I/usr/demo/SOUND/include"
12994       else sound_cflags="-I/usr/demo/SOUND"
12995     fi
12996     if test -z "$native_sound_lib" ; then
12997       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12998         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12999         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13000       fi
13001     fi
13002   fi
13003
13004     if test -z "$sound_found"; then
13005     case "$canonical" in
13006     *-sgi-* )
13007       if test -z "$native_sound_lib"; then
13008         
13009 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13010 echo "configure:13011: checking for ALopenport in -laudio" >&5
13011 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13012
13013 xe_check_libs=" -laudio "
13014 cat > conftest.$ac_ext <<EOF
13015 #line 13016 "configure"
13016 #include "confdefs.h"
13017 /* Override any gcc2 internal prototype to avoid an error.  */
13018 /* We use char because int might match the return type of a gcc2
13019     builtin and then its argument prototype would still apply.  */
13020 char ALopenport();
13021
13022 int main() {
13023 ALopenport()
13024 ; return 0; }
13025 EOF
13026 if { (eval echo configure:13027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13027   rm -rf conftest*
13028   eval "ac_cv_lib_$ac_lib_var=yes"
13029 else
13030   echo "configure: failed program was:" >&5
13031   cat conftest.$ac_ext >&5
13032   rm -rf conftest*
13033   eval "ac_cv_lib_$ac_lib_var=no"
13034 fi
13035 rm -f conftest*
13036 xe_check_libs=""
13037
13038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13039   echo "$ac_t""yes" 1>&6
13040   native_sound_lib="-laudio"
13041 else
13042   echo "$ac_t""no" 1>&6
13043 fi
13044
13045
13046       fi
13047       if test -n "$native_sound_lib"; then
13048         sound_found=yes sound_cflags=""
13049         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13050    echo "    xemacs will be linked with \"sgiplay.o\""
13051  fi
13052       fi ;;
13053     hppa*-hp-hpux* )
13054       if test -z "$native_sound_lib"; then
13055         
13056 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13057 echo "configure:13058: checking for AOpenAudio in -lAlib" >&5
13058 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13059
13060 xe_check_libs=" -lAlib "
13061 cat > conftest.$ac_ext <<EOF
13062 #line 13063 "configure"
13063 #include "confdefs.h"
13064 /* Override any gcc2 internal prototype to avoid an error.  */
13065 /* We use char because int might match the return type of a gcc2
13066     builtin and then its argument prototype would still apply.  */
13067 char AOpenAudio();
13068
13069 int main() {
13070 AOpenAudio()
13071 ; return 0; }
13072 EOF
13073 if { (eval echo configure:13074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13074   rm -rf conftest*
13075   eval "ac_cv_lib_$ac_lib_var=yes"
13076 else
13077   echo "configure: failed program was:" >&5
13078   cat conftest.$ac_ext >&5
13079   rm -rf conftest*
13080   eval "ac_cv_lib_$ac_lib_var=no"
13081 fi
13082 rm -f conftest*
13083 xe_check_libs=""
13084
13085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13086   echo "$ac_t""yes" 1>&6
13087   native_sound_lib="-lAlib"
13088 else
13089   echo "$ac_t""no" 1>&6
13090 fi
13091
13092
13093       fi
13094       if test -n "$native_sound_lib"; then
13095         sound_found=yes
13096         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13097    echo "    xemacs will be linked with \"hpplay.o\""
13098  fi
13099         if test "$GCC" = "yes" # Kludge city
13100           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13101           else sound_cflags="+e -I/usr/audio/examples"
13102         fi
13103       fi ;;
13104     esac
13105   fi
13106
13107     if test -z "$sound_found"; then
13108     if test "$with_msw" = "yes"; then
13109     sound_found=yes
13110     native_sound_lib=
13111     fi
13112   fi
13113
13114     if test -z "$sound_found"; then
13115     for dir in "machine" "sys" "linux"; do
13116       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13117 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13118 echo "configure:13119: checking for ${dir}/soundcard.h" >&5
13119
13120 cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 #include <${dir}/soundcard.h>
13124 EOF
13125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13126 { (eval echo configure:13127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13128 if test -z "$ac_err"; then
13129   rm -rf conftest*
13130   eval "ac_cv_header_$ac_safe=yes"
13131 else
13132   echo "$ac_err" >&5
13133   echo "configure: failed program was:" >&5
13134   cat conftest.$ac_ext >&5
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=no"
13137 fi
13138 rm -f conftest*
13139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13140   echo "$ac_t""yes" 1>&6
13141   sound_found=yes
13142        need_miscplay=yes
13143         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13144    echo "    xemacs will be linked with \"linuxplay.o\""
13145  fi
13146         { test "$extra_verbose" = "yes" && cat << EOF
13147     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13148 EOF
13149 cat >> confdefs.h <<EOF
13150 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13151 EOF
13152 }
13153
13154         break
13155 else
13156   echo "$ac_t""no" 1>&6
13157 fi
13158
13159     done
13160   fi
13161
13162   test "$sound_found" = "yes" && with_native_sound=yes
13163 fi
13164
13165 if test "$with_native_sound" = "yes"; then
13166   { test "$extra_verbose" = "yes" && cat << \EOF
13167     Defining HAVE_NATIVE_SOUND
13168 EOF
13169 cat >> confdefs.h <<\EOF
13170 #define HAVE_NATIVE_SOUND 1
13171 EOF
13172 }
13173
13174   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13175 fi
13176
13177 if test "$with_nas_sound" != "no"; then
13178   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13179 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13180 echo "configure:13181: checking for audio/audiolib.h" >&5
13181
13182 cat > conftest.$ac_ext <<EOF
13183 #line 13184 "configure"
13184 #include "confdefs.h"
13185 #include <audio/audiolib.h>
13186 EOF
13187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13188 { (eval echo configure:13189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13190 if test -z "$ac_err"; then
13191   rm -rf conftest*
13192   eval "ac_cv_header_$ac_safe=yes"
13193 else
13194   echo "$ac_err" >&5
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_header_$ac_safe=no"
13199 fi
13200 rm -f conftest*
13201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13202   echo "$ac_t""yes" 1>&6
13203   
13204     
13205 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13206 echo "configure:13207: checking for AuOpenServer in -laudio" >&5
13207 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13208
13209 xe_check_libs=" -laudio "
13210 cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213 /* Override any gcc2 internal prototype to avoid an error.  */
13214 /* We use char because int might match the return type of a gcc2
13215     builtin and then its argument prototype would still apply.  */
13216 char AuOpenServer();
13217
13218 int main() {
13219 AuOpenServer()
13220 ; return 0; }
13221 EOF
13222 if { (eval echo configure:13223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13223   rm -rf conftest*
13224   eval "ac_cv_lib_$ac_lib_var=yes"
13225 else
13226   echo "configure: failed program was:" >&5
13227   cat conftest.$ac_ext >&5
13228   rm -rf conftest*
13229   eval "ac_cv_lib_$ac_lib_var=no"
13230 fi
13231 rm -f conftest*
13232 xe_check_libs=""
13233
13234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13235   echo "$ac_t""yes" 1>&6
13236   have_nas_sound=yes
13237 else
13238   echo "$ac_t""no" 1>&6
13239 fi
13240
13241
13242 else
13243   echo "$ac_t""no" 1>&6
13244 fi
13245
13246   if test "$have_nas_sound" = "yes"; then
13247     with_nas_sound=yes
13248     { test "$extra_verbose" = "yes" && cat << \EOF
13249     Defining HAVE_NAS_SOUND
13250 EOF
13251 cat >> confdefs.h <<\EOF
13252 #define HAVE_NAS_SOUND 1
13253 EOF
13254 }
13255
13256     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13257    echo "    xemacs will be linked with \"nas.o\""
13258  fi
13259     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13260             cat > conftest.$ac_ext <<EOF
13261 #line 13262 "configure"
13262 #include "confdefs.h"
13263 #include <audio/Xtutil.h>
13264 EOF
13265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13266   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13267   :
13268 else
13269   rm -rf conftest*
13270   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13271     Defining NAS_NO_ERROR_JUMP
13272 EOF
13273 cat >> confdefs.h <<\EOF
13274 #define NAS_NO_ERROR_JUMP 1
13275 EOF
13276 }
13277
13278 fi
13279 rm -f conftest*
13280
13281   else
13282     test "$with_nas_sound" = "yes" && \
13283       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13284     with_nas_sound=no
13285   fi
13286 fi
13287
13288 if test "$with_esd_sound" != "no"; then
13289   # Extract the first word of "esd-config", so it can be a program name with args.
13290 set dummy esd-config; ac_word=$2
13291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13292 echo "configure:13293: checking for $ac_word" >&5
13293
13294 if test -n "$have_esd_config"; then
13295   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13296 else
13297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13298   ac_dummy="$PATH"
13299   for ac_dir in $ac_dummy; do
13300     test -z "$ac_dir" && ac_dir=.
13301     if test -f $ac_dir/$ac_word; then
13302       ac_cv_prog_have_esd_config="yes"
13303       break
13304     fi
13305   done
13306   IFS="$ac_save_ifs"
13307   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13308 fi
13309 have_esd_config="$ac_cv_prog_have_esd_config"
13310 if test -n "$have_esd_config"; then
13311   echo "$ac_t""$have_esd_config" 1>&6
13312 else
13313   echo "$ac_t""no" 1>&6
13314 fi
13315
13316   if test "$have_esd_config" = "yes"; then
13317     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13318     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
13319     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13320     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13321 echo "configure:13322: checking for esd_play_stream" >&5
13322
13323 cat > conftest.$ac_ext <<EOF
13324 #line 13325 "configure"
13325 #include "confdefs.h"
13326 /* System header to define __stub macros and hopefully few prototypes,
13327     which can conflict with char esd_play_stream(); below.  */
13328 #include <assert.h>
13329 /* Override any gcc2 internal prototype to avoid an error.  */
13330 /* We use char because int might match the return type of a gcc2
13331     builtin and then its argument prototype would still apply.  */
13332 char esd_play_stream();
13333
13334 int main() {
13335
13336 /* The GNU C library defines this for functions which it implements
13337     to always fail with ENOSYS.  Some functions are actually named
13338     something starting with __ and the normal name is an alias.  */
13339 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13340 choke me
13341 #else
13342 esd_play_stream();
13343 #endif
13344
13345 ; return 0; }
13346 EOF
13347 if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13348   rm -rf conftest*
13349   eval "ac_cv_func_esd_play_stream=yes"
13350 else
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -rf conftest*
13354   eval "ac_cv_func_esd_play_stream=no"
13355 fi
13356 rm -f conftest*
13357
13358 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360   have_esd_sound=yes
13361 else
13362   echo "$ac_t""no" 1>&6
13363 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13364 fi
13365
13366   fi
13367
13368   if test "$have_esd_sound" = "yes"; then
13369     with_esd_sound=yes
13370     need_miscplay=yes
13371     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13372    echo "    xemacs will be linked with \"esd.o\""
13373  fi
13374     { test "$extra_verbose" = "yes" && cat << \EOF
13375     Defining HAVE_ESD_SOUND
13376 EOF
13377 cat >> confdefs.h <<\EOF
13378 #define HAVE_ESD_SOUND 1
13379 EOF
13380 }
13381
13382   else
13383     test "$with_esd_sound" = "yes" && \
13384       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13385     with_esd_sound=no
13386   fi
13387 fi
13388
13389 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13390    echo "    xemacs will be linked with \"miscplay.o\""
13391  fi
13392
13393
13394 test -z "$with_tty" && with_tty=yes
13395
13396 if test "$with_tty" = "yes"  ; then
13397   echo "checking for TTY-related features" 1>&6
13398 echo "configure:13399: checking for TTY-related features" >&5
13399   { test "$extra_verbose" = "yes" && cat << \EOF
13400     Defining HAVE_TTY
13401 EOF
13402 cat >> confdefs.h <<\EOF
13403 #define HAVE_TTY 1
13404 EOF
13405 }
13406
13407   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
13408    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\""
13409  fi
13410
13411     if test -z "$with_ncurses"; then
13412     
13413 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13414 echo "configure:13415: checking for tgetent in -lncurses" >&5
13415 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13416
13417 xe_check_libs=" -lncurses "
13418 cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 /* Override any gcc2 internal prototype to avoid an error.  */
13422 /* We use char because int might match the return type of a gcc2
13423     builtin and then its argument prototype would still apply.  */
13424 char tgetent();
13425
13426 int main() {
13427 tgetent()
13428 ; return 0; }
13429 EOF
13430 if { (eval echo configure:13431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13431   rm -rf conftest*
13432   eval "ac_cv_lib_$ac_lib_var=yes"
13433 else
13434   echo "configure: failed program was:" >&5
13435   cat conftest.$ac_ext >&5
13436   rm -rf conftest*
13437   eval "ac_cv_lib_$ac_lib_var=no"
13438 fi
13439 rm -f conftest*
13440 xe_check_libs=""
13441
13442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13443   echo "$ac_t""yes" 1>&6
13444   with_ncurses=yes
13445 else
13446   echo "$ac_t""no" 1>&6
13447 with_ncurses=no
13448 fi
13449
13450
13451   fi
13452   if test "$with_ncurses" = "yes"; then
13453     { test "$extra_verbose" = "yes" && cat << \EOF
13454     Defining HAVE_NCURSES
13455 EOF
13456 cat >> confdefs.h <<\EOF
13457 #define HAVE_NCURSES 1
13458 EOF
13459 }
13460
13461     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13462 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13463 echo "configure:13464: checking for ncurses/curses.h" >&5
13464
13465 cat > conftest.$ac_ext <<EOF
13466 #line 13467 "configure"
13467 #include "confdefs.h"
13468 #include <ncurses/curses.h>
13469 EOF
13470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13471 { (eval echo configure:13472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13473 if test -z "$ac_err"; then
13474   rm -rf conftest*
13475   eval "ac_cv_header_$ac_safe=yes"
13476 else
13477   echo "$ac_err" >&5
13478   echo "configure: failed program was:" >&5
13479   cat conftest.$ac_ext >&5
13480   rm -rf conftest*
13481   eval "ac_cv_header_$ac_safe=no"
13482 fi
13483 rm -f conftest*
13484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13485   echo "$ac_t""yes" 1>&6
13486   curses_h_file=ncurses/curses.h
13487 else
13488   echo "$ac_t""no" 1>&6
13489 fi
13490
13491     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13492 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13493 echo "configure:13494: checking for ncurses/term.h" >&5
13494
13495 cat > conftest.$ac_ext <<EOF
13496 #line 13497 "configure"
13497 #include "confdefs.h"
13498 #include <ncurses/term.h>
13499 EOF
13500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13501 { (eval echo configure:13502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13503 if test -z "$ac_err"; then
13504   rm -rf conftest*
13505   eval "ac_cv_header_$ac_safe=yes"
13506 else
13507   echo "$ac_err" >&5
13508   echo "configure: failed program was:" >&5
13509   cat conftest.$ac_ext >&5
13510   rm -rf conftest*
13511   eval "ac_cv_header_$ac_safe=no"
13512 fi
13513 rm -f conftest*
13514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13515   echo "$ac_t""yes" 1>&6
13516   term_h_file=ncurses/term.h
13517 else
13518   echo "$ac_t""no" 1>&6
13519 fi
13520
13521     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13522    echo "    xemacs will be linked with \"terminfo.o\""
13523  fi
13524     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13525
13526     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13527                         save_c_switch_site="$c_switch_site"
13528       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13529       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13530 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13531 echo "configure:13532: checking for ncurses/curses.h" >&5
13532
13533 cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 #include <ncurses/curses.h>
13537 EOF
13538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13539 { (eval echo configure:13540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13541 if test -z "$ac_err"; then
13542   rm -rf conftest*
13543   eval "ac_cv_header_$ac_safe=yes"
13544 else
13545   echo "$ac_err" >&5
13546   echo "configure: failed program was:" >&5
13547   cat conftest.$ac_ext >&5
13548   rm -rf conftest*
13549   eval "ac_cv_header_$ac_safe=no"
13550 fi
13551 rm -f conftest*
13552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13553   echo "$ac_t""yes" 1>&6
13554   curses_h_file=ncurses/curses.h
13555 else
13556   echo "$ac_t""no" 1>&6
13557 fi
13558
13559       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13560         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13561         else c_switch_site="$save_c_switch_site"
13562       fi
13563     fi
13564   else         if test "$have_terminfo" = "yes"; then
13565       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13566    echo "    xemacs will be linked with \"terminfo.o\""
13567  fi
13568       if test -n "$libs_termcap"; then
13569         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13570       else
13571         for lib in curses termlib termcap; do
13572           
13573 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13574 echo "configure:13575: checking for tgetent in -l$lib" >&5
13575 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13576
13577 xe_check_libs=" -l$lib "
13578 cat > conftest.$ac_ext <<EOF
13579 #line 13580 "configure"
13580 #include "confdefs.h"
13581 /* Override any gcc2 internal prototype to avoid an error.  */
13582 /* We use char because int might match the return type of a gcc2
13583     builtin and then its argument prototype would still apply.  */
13584 char tgetent();
13585
13586 int main() {
13587 tgetent()
13588 ; return 0; }
13589 EOF
13590 if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13591   rm -rf conftest*
13592   eval "ac_cv_lib_$ac_lib_var=yes"
13593 else
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   eval "ac_cv_lib_$ac_lib_var=no"
13598 fi
13599 rm -f conftest*
13600 xe_check_libs=""
13601
13602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13603   echo "$ac_t""yes" 1>&6
13604   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13605 else
13606   echo "$ac_t""no" 1>&6
13607 fi
13608
13609
13610         done
13611       fi
13612     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13613                                 
13614 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13615 echo "configure:13616: checking for tgoto in -ltermcap" >&5
13616 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13617
13618 xe_check_libs=" -ltermcap "
13619 cat > conftest.$ac_ext <<EOF
13620 #line 13621 "configure"
13621 #include "confdefs.h"
13622 /* Override any gcc2 internal prototype to avoid an error.  */
13623 /* We use char because int might match the return type of a gcc2
13624     builtin and then its argument prototype would still apply.  */
13625 char tgoto();
13626
13627 int main() {
13628 tgoto()
13629 ; return 0; }
13630 EOF
13631 if { (eval echo configure:13632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13632   rm -rf conftest*
13633   eval "ac_cv_lib_$ac_lib_var=yes"
13634 else
13635   echo "configure: failed program was:" >&5
13636   cat conftest.$ac_ext >&5
13637   rm -rf conftest*
13638   eval "ac_cv_lib_$ac_lib_var=no"
13639 fi
13640 rm -f conftest*
13641 xe_check_libs=""
13642
13643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13644   echo "$ac_t""yes" 1>&6
13645     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13647   { test "$extra_verbose" = "yes" && cat << EOF
13648     Defining $ac_tr_lib
13649 EOF
13650 cat >> confdefs.h <<EOF
13651 #define $ac_tr_lib 1
13652 EOF
13653 }
13654
13655   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13656
13657 else
13658   echo "$ac_t""no" 1>&6
13659 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13660    echo "    xemacs will be linked with \"tparam.o\""
13661  fi
13662 fi
13663
13664
13665       else
13666         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13667    echo "    xemacs will be linked with \"tparam.o\""
13668  fi
13669       fi
13670                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13671       if test -n "$libs_termcap"; then
13672         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13673       else
13674         
13675 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13676 echo "configure:13677: checking for tgetent in -lcurses" >&5
13677 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13678
13679 xe_check_libs=" -lcurses "
13680 cat > conftest.$ac_ext <<EOF
13681 #line 13682 "configure"
13682 #include "confdefs.h"
13683 /* Override any gcc2 internal prototype to avoid an error.  */
13684 /* We use char because int might match the return type of a gcc2
13685     builtin and then its argument prototype would still apply.  */
13686 char tgetent();
13687
13688 int main() {
13689 tgetent()
13690 ; return 0; }
13691 EOF
13692 if { (eval echo configure:13693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13693   rm -rf conftest*
13694   eval "ac_cv_lib_$ac_lib_var=yes"
13695 else
13696   echo "configure: failed program was:" >&5
13697   cat conftest.$ac_ext >&5
13698   rm -rf conftest*
13699   eval "ac_cv_lib_$ac_lib_var=no"
13700 fi
13701 rm -f conftest*
13702 xe_check_libs=""
13703
13704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13705   echo "$ac_t""yes" 1>&6
13706   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13707 else
13708   echo "$ac_t""no" 1>&6
13709 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13710 echo "configure:13711: checking for tgetent in -ltermcap" >&5
13711 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13712
13713 xe_check_libs=" -ltermcap "
13714 cat > conftest.$ac_ext <<EOF
13715 #line 13716 "configure"
13716 #include "confdefs.h"
13717 /* Override any gcc2 internal prototype to avoid an error.  */
13718 /* We use char because int might match the return type of a gcc2
13719     builtin and then its argument prototype would still apply.  */
13720 char tgetent();
13721
13722 int main() {
13723 tgetent()
13724 ; return 0; }
13725 EOF
13726 if { (eval echo configure:13727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13727   rm -rf conftest*
13728   eval "ac_cv_lib_$ac_lib_var=yes"
13729 else
13730   echo "configure: failed program was:" >&5
13731   cat conftest.$ac_ext >&5
13732   rm -rf conftest*
13733   eval "ac_cv_lib_$ac_lib_var=no"
13734 fi
13735 rm -f conftest*
13736 xe_check_libs=""
13737
13738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13739   echo "$ac_t""yes" 1>&6
13740   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13741 else
13742   echo "$ac_t""no" 1>&6
13743 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13744    echo "    xemacs will be linked with \"termcap.o\""
13745  fi
13746 fi
13747
13748
13749 fi
13750
13751
13752       fi
13753     fi
13754   fi
13755   { test "$extra_verbose" = "yes" && cat << EOF
13756     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13757 EOF
13758 cat >> confdefs.h <<EOF
13759 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13760 EOF
13761 }
13762
13763   { test "$extra_verbose" = "yes" && cat << EOF
13764     Defining TERM_H_FILE = "${term_h_file-term.h}"
13765 EOF
13766 cat >> confdefs.h <<EOF
13767 #define TERM_H_FILE "${term_h_file-term.h}"
13768 EOF
13769 }
13770
13771
13772     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13773 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13774 echo "configure:13775: checking for gpm.h" >&5
13775
13776 cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 #include <gpm.h>
13780 EOF
13781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13782 { (eval echo configure:13783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13784 if test -z "$ac_err"; then
13785   rm -rf conftest*
13786   eval "ac_cv_header_$ac_safe=yes"
13787 else
13788   echo "$ac_err" >&5
13789   echo "configure: failed program was:" >&5
13790   cat conftest.$ac_ext >&5
13791   rm -rf conftest*
13792   eval "ac_cv_header_$ac_safe=no"
13793 fi
13794 rm -f conftest*
13795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13796   echo "$ac_t""yes" 1>&6
13797   :
13798 else
13799   echo "$ac_t""no" 1>&6
13800 with_gpm=no
13801 fi
13802  }
13803   test -z "$with_gpm" && { 
13804 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13805 echo "configure:13806: checking for Gpm_Open in -lgpm" >&5
13806 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13807
13808 xe_check_libs=" -lgpm "
13809 cat > conftest.$ac_ext <<EOF
13810 #line 13811 "configure"
13811 #include "confdefs.h"
13812 /* Override any gcc2 internal prototype to avoid an error.  */
13813 /* We use char because int might match the return type of a gcc2
13814     builtin and then its argument prototype would still apply.  */
13815 char Gpm_Open();
13816
13817 int main() {
13818 Gpm_Open()
13819 ; return 0; }
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13822   rm -rf conftest*
13823   eval "ac_cv_lib_$ac_lib_var=yes"
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -rf conftest*
13828   eval "ac_cv_lib_$ac_lib_var=no"
13829 fi
13830 rm -f conftest*
13831 xe_check_libs=""
13832
13833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13834   echo "$ac_t""yes" 1>&6
13835   with_gpm=yes
13836 else
13837   echo "$ac_t""no" 1>&6
13838 with_gpm=no
13839 fi
13840
13841  }
13842   if test "$with_gpm" = "yes"; then
13843     { test "$extra_verbose" = "yes" && cat << \EOF
13844     Defining HAVE_GPM
13845 EOF
13846 cat >> confdefs.h <<\EOF
13847 #define HAVE_GPM 1
13848 EOF
13849 }
13850
13851     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13852    echo "    xemacs will be linked with \"gpmevent.o\""
13853  fi
13854     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13855   fi
13856
13857 else   for feature in ncurses gpm; do
13858     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13859       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13860     fi
13861     eval "with_${feature}=no"
13862   done
13863 fi 
13864 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
13865    echo "    xemacs will be linked with \"event-unixoid.o\""
13866  fi
13867
13868
13869 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13870   != "no no no" && echo "checking for database support" 1>&6
13871 echo "configure:13872: checking for database support" >&5
13872
13873 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13874   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13875 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13876 echo "configure:13877: checking for ndbm.h" >&5
13877
13878 cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881 #include <ndbm.h>
13882 EOF
13883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13884 { (eval echo configure:13885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13886 if test -z "$ac_err"; then
13887   rm -rf conftest*
13888   eval "ac_cv_header_$ac_safe=yes"
13889 else
13890   echo "$ac_err" >&5
13891   echo "configure: failed program was:" >&5
13892   cat conftest.$ac_ext >&5
13893   rm -rf conftest*
13894   eval "ac_cv_header_$ac_safe=no"
13895 fi
13896 rm -f conftest*
13897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13898   echo "$ac_t""yes" 1>&6
13899   :
13900 else
13901   echo "$ac_t""no" 1>&6
13902
13903     test "$with_database_gdbm" = "yes" -o \
13904          "$with_database_dbm"  = "yes" && \
13905       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13906     with_database_gdbm=no with_database_dbm=no
13907 fi
13908
13909 fi
13910
13911 if test "$with_database_gdbm" != "no"; then
13912   
13913 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13914 echo "configure:13915: checking for dbm_open in -lgdbm" >&5
13915 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13916
13917 xe_check_libs=" -lgdbm "
13918 cat > conftest.$ac_ext <<EOF
13919 #line 13920 "configure"
13920 #include "confdefs.h"
13921 /* Override any gcc2 internal prototype to avoid an error.  */
13922 /* We use char because int might match the return type of a gcc2
13923     builtin and then its argument prototype would still apply.  */
13924 char dbm_open();
13925
13926 int main() {
13927 dbm_open()
13928 ; return 0; }
13929 EOF
13930 if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13931   rm -rf conftest*
13932   eval "ac_cv_lib_$ac_lib_var=yes"
13933 else
13934   echo "configure: failed program was:" >&5
13935   cat conftest.$ac_ext >&5
13936   rm -rf conftest*
13937   eval "ac_cv_lib_$ac_lib_var=no"
13938 fi
13939 rm -f conftest*
13940 xe_check_libs=""
13941
13942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13943   echo "$ac_t""yes" 1>&6
13944   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13945 else
13946   echo "$ac_t""no" 1>&6
13947 if test "$with_database_gdbm" = "yes"; then
13948      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13949    fi
13950    with_database_gdbm=no
13951 fi
13952
13953
13954 fi
13955
13956 if test "$with_database_dbm" != "no"; then
13957   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13958 echo "configure:13959: checking for dbm_open" >&5
13959
13960 cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 /* System header to define __stub macros and hopefully few prototypes,
13964     which can conflict with char dbm_open(); below.  */
13965 #include <assert.h>
13966 /* Override any gcc2 internal prototype to avoid an error.  */
13967 /* We use char because int might match the return type of a gcc2
13968     builtin and then its argument prototype would still apply.  */
13969 char dbm_open();
13970
13971 int main() {
13972
13973 /* The GNU C library defines this for functions which it implements
13974     to always fail with ENOSYS.  Some functions are actually named
13975     something starting with __ and the normal name is an alias.  */
13976 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13977 choke me
13978 #else
13979 dbm_open();
13980 #endif
13981
13982 ; return 0; }
13983 EOF
13984 if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13985   rm -rf conftest*
13986   eval "ac_cv_func_dbm_open=yes"
13987 else
13988   echo "configure: failed program was:" >&5
13989   cat conftest.$ac_ext >&5
13990   rm -rf conftest*
13991   eval "ac_cv_func_dbm_open=no"
13992 fi
13993 rm -f conftest*
13994
13995 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13996   echo "$ac_t""yes" 1>&6
13997   with_database_dbm=yes libdbm=
13998 else
13999   echo "$ac_t""no" 1>&6
14000
14001     
14002 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14003 echo "configure:14004: checking for dbm_open in -ldbm" >&5
14004 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14005
14006 xe_check_libs=" -ldbm "
14007 cat > conftest.$ac_ext <<EOF
14008 #line 14009 "configure"
14009 #include "confdefs.h"
14010 /* Override any gcc2 internal prototype to avoid an error.  */
14011 /* We use char because int might match the return type of a gcc2
14012     builtin and then its argument prototype would still apply.  */
14013 char dbm_open();
14014
14015 int main() {
14016 dbm_open()
14017 ; return 0; }
14018 EOF
14019 if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14020   rm -rf conftest*
14021   eval "ac_cv_lib_$ac_lib_var=yes"
14022 else
14023   echo "configure: failed program was:" >&5
14024   cat conftest.$ac_ext >&5
14025   rm -rf conftest*
14026   eval "ac_cv_lib_$ac_lib_var=no"
14027 fi
14028 rm -f conftest*
14029 xe_check_libs=""
14030
14031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14032   echo "$ac_t""yes" 1>&6
14033   with_database_dbm=yes libdbm=-ldbm
14034 else
14035   echo "$ac_t""no" 1>&6
14036 test "$with_database_dbm" = "yes" && \
14037         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14038       with_database_dbm=no
14039 fi
14040
14041
14042 fi
14043
14044 fi
14045
14046 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14047 test "$with_database_gdbm" = "yes" -o \
14048      "$with_database_dbm"  = "yes" && \
14049   { test "$extra_verbose" = "yes" && cat << \EOF
14050     Defining HAVE_DBM
14051 EOF
14052 cat >> confdefs.h <<\EOF
14053 #define HAVE_DBM 1
14054 EOF
14055 }
14056
14057
14058 if test "$with_database_berkdb" != "no"; then
14059   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14060 echo "configure:14061: checking for Berkeley db.h" >&5
14061   for header in "db/db.h" "db.h"; do
14062     cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065
14066 #include <stdlib.h>
14067 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14068 #ifdef HAVE_INTTYPES_H
14069 #define __BIT_TYPES_DEFINED__
14070 #include <inttypes.h>
14071 typedef uint8_t  u_int8_t;
14072 typedef uint16_t u_int16_t;
14073 typedef uint32_t u_int32_t;
14074 #ifdef WE_DONT_NEED_QUADS
14075 typedef uint64_t u_int64_t;
14076 #endif
14077 #endif
14078 #endif
14079 #include <$header>
14080
14081 int main() {
14082
14083 ; return 0; }
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14086   rm -rf conftest*
14087   db_h_file="$header"; break
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091 fi
14092 rm -f conftest*
14093   done
14094   if test -z "$db_h_file"
14095   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14096   else echo "$ac_t""$db_h_file" 1>&6
14097   fi
14098
14099   if test "$with_database_berkdb" != "no"; then
14100     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14101 echo "configure:14102: checking for Berkeley DB version" >&5
14102     cat > conftest.$ac_ext <<EOF
14103 #line 14104 "configure"
14104 #include "confdefs.h"
14105 #include <$db_h_file>
14106 #if DB_VERSION_MAJOR > 1
14107 yes
14108 #endif
14109
14110 EOF
14111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14112   egrep "yes" >/dev/null 2>&1; then
14113   rm -rf conftest*
14114   cat > conftest.$ac_ext <<EOF
14115 #line 14116 "configure"
14116 #include "confdefs.h"
14117 #include <$db_h_file>
14118 #if DB_VERSION_MAJOR > 2
14119 yes
14120 #endif
14121
14122 EOF
14123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14124   egrep "yes" >/dev/null 2>&1; then
14125   rm -rf conftest*
14126   echo "$ac_t""3" 1>&6; dbfunc=db_create
14127 else
14128   rm -rf conftest*
14129   
14130     echo "$ac_t""2" 1>&6; dbfunc=db_open
14131 fi
14132 rm -f conftest*
14133
14134 else
14135   rm -rf conftest*
14136   
14137     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14138 fi
14139 rm -f conftest*
14140
14141     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14142 echo "configure:14143: checking for $dbfunc" >&5
14143
14144 cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 /* System header to define __stub macros and hopefully few prototypes,
14148     which can conflict with char $dbfunc(); below.  */
14149 #include <assert.h>
14150 /* Override any gcc2 internal prototype to avoid an error.  */
14151 /* We use char because int might match the return type of a gcc2
14152     builtin and then its argument prototype would still apply.  */
14153 char $dbfunc();
14154
14155 int main() {
14156
14157 /* The GNU C library defines this for functions which it implements
14158     to always fail with ENOSYS.  Some functions are actually named
14159     something starting with __ and the normal name is an alias.  */
14160 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14161 choke me
14162 #else
14163 $dbfunc();
14164 #endif
14165
14166 ; return 0; }
14167 EOF
14168 if { (eval echo configure:14169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14169   rm -rf conftest*
14170   eval "ac_cv_func_$dbfunc=yes"
14171 else
14172   echo "configure: failed program was:" >&5
14173   cat conftest.$ac_ext >&5
14174   rm -rf conftest*
14175   eval "ac_cv_func_$dbfunc=no"
14176 fi
14177 rm -f conftest*
14178
14179 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14180   echo "$ac_t""yes" 1>&6
14181   with_database_berkdb=yes need_libdb=no
14182 else
14183   echo "$ac_t""no" 1>&6
14184
14185     
14186 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14187 echo "configure:14188: checking for $dbfunc in -ldb" >&5
14188 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14189
14190 xe_check_libs=" -ldb "
14191 cat > conftest.$ac_ext <<EOF
14192 #line 14193 "configure"
14193 #include "confdefs.h"
14194 /* Override any gcc2 internal prototype to avoid an error.  */
14195 /* We use char because int might match the return type of a gcc2
14196     builtin and then its argument prototype would still apply.  */
14197 char $dbfunc();
14198
14199 int main() {
14200 $dbfunc()
14201 ; return 0; }
14202 EOF
14203 if { (eval echo configure:14204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14204   rm -rf conftest*
14205   eval "ac_cv_lib_$ac_lib_var=yes"
14206 else
14207   echo "configure: failed program was:" >&5
14208   cat conftest.$ac_ext >&5
14209   rm -rf conftest*
14210   eval "ac_cv_lib_$ac_lib_var=no"
14211 fi
14212 rm -f conftest*
14213 xe_check_libs=""
14214
14215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14216   echo "$ac_t""yes" 1>&6
14217   with_database_berkdb=yes need_libdb=yes
14218 else
14219   echo "$ac_t""no" 1>&6
14220 fi
14221
14222
14223 fi
14224
14225   fi
14226
14227   if test "$with_database_berkdb" = "yes"; then
14228     { test "$extra_verbose" = "yes" && cat << EOF
14229     Defining DB_H_FILE = "$db_h_file"
14230 EOF
14231 cat >> confdefs.h <<EOF
14232 #define DB_H_FILE "$db_h_file"
14233 EOF
14234 }
14235
14236     { test "$extra_verbose" = "yes" && cat << \EOF
14237     Defining HAVE_BERKELEY_DB
14238 EOF
14239 cat >> confdefs.h <<\EOF
14240 #define HAVE_BERKELEY_DB 1
14241 EOF
14242 }
14243
14244     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14245   else with_database_berkdb=no
14246   fi
14247 fi
14248
14249 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14250      != "no no no"; then
14251   { test "$extra_verbose" = "yes" && cat << \EOF
14252     Defining HAVE_DATABASE
14253 EOF
14254 cat >> confdefs.h <<\EOF
14255 #define HAVE_DATABASE 1
14256 EOF
14257 }
14258
14259   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14260    echo "    xemacs will be linked with \"database.o\""
14261  fi
14262   if test "$with_utf_2000" = "yes"; then
14263     { test "$extra_verbose" = "yes" && cat << \EOF
14264     Defining HAVE_CHISE_CLIENT
14265 EOF
14266 cat >> confdefs.h <<\EOF
14267 #define HAVE_CHISE_CLIENT 1
14268 EOF
14269 }
14270
14271   fi
14272 fi
14273
14274 if test "$with_socks" = "yes"; then
14275   
14276 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14277 echo "configure:14278: checking for SOCKSinit in -lsocks" >&5
14278 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14279
14280 xe_check_libs=" -lsocks "
14281 cat > conftest.$ac_ext <<EOF
14282 #line 14283 "configure"
14283 #include "confdefs.h"
14284 /* Override any gcc2 internal prototype to avoid an error.  */
14285 /* We use char because int might match the return type of a gcc2
14286     builtin and then its argument prototype would still apply.  */
14287 char SOCKSinit();
14288
14289 int main() {
14290 SOCKSinit()
14291 ; return 0; }
14292 EOF
14293 if { (eval echo configure:14294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14294   rm -rf conftest*
14295   eval "ac_cv_lib_$ac_lib_var=yes"
14296 else
14297   echo "configure: failed program was:" >&5
14298   cat conftest.$ac_ext >&5
14299   rm -rf conftest*
14300   eval "ac_cv_lib_$ac_lib_var=no"
14301 fi
14302 rm -f conftest*
14303 xe_check_libs=""
14304
14305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14306   echo "$ac_t""yes" 1>&6
14307     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14308     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14309   { test "$extra_verbose" = "yes" && cat << EOF
14310     Defining $ac_tr_lib
14311 EOF
14312 cat >> confdefs.h <<EOF
14313 #define $ac_tr_lib 1
14314 EOF
14315 }
14316
14317   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14318
14319 else
14320   echo "$ac_t""no" 1>&6
14321 fi
14322
14323
14324   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14325     Defining HAVE_SOCKS
14326 EOF
14327 cat >> confdefs.h <<\EOF
14328 #define HAVE_SOCKS 1
14329 EOF
14330 }
14331
14332 fi
14333
14334 if test "$usage_tracking" = "yes"; then
14335   { test "$extra_verbose" = "yes" && cat << \EOF
14336     Defining USAGE_TRACKING
14337 EOF
14338 cat >> confdefs.h <<\EOF
14339 #define USAGE_TRACKING 1
14340 EOF
14341 }
14342
14343   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14344 fi
14345
14346 if test "$with_modules" != "no"; then
14347   echo "checking for module support" 1>&6
14348 echo "configure:14349: checking for module support" >&5
14349
14350     if test "$with_msw" = "yes"; then
14351     have_dl=yes;
14352   else
14353         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14354 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14355 echo "configure:14356: checking for dlfcn.h" >&5
14356
14357 cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 #include <dlfcn.h>
14361 EOF
14362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14363 { (eval echo configure:14364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14365 if test -z "$ac_err"; then
14366   rm -rf conftest*
14367   eval "ac_cv_header_$ac_safe=yes"
14368 else
14369   echo "$ac_err" >&5
14370   echo "configure: failed program was:" >&5
14371   cat conftest.$ac_ext >&5
14372   rm -rf conftest*
14373   eval "ac_cv_header_$ac_safe=no"
14374 fi
14375 rm -f conftest*
14376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14377   echo "$ac_t""yes" 1>&6
14378   
14379       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14380 echo "configure:14381: checking for dlopen in -lc" >&5
14381       cat > conftest.$ac_ext <<EOF
14382 #line 14383 "configure"
14383 #include "confdefs.h"
14384 #include <dlfcn.h>
14385 int main() {
14386         dlopen ("", 0);
14387 ; return 0; }
14388 EOF
14389 if { (eval echo configure:14390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14390   rm -rf conftest*
14391    have_dl=yes 
14392 else
14393   echo "configure: failed program was:" >&5
14394   cat conftest.$ac_ext >&5
14395   rm -rf conftest*
14396   
14397       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14398 echo "configure:14399: checking for dlopen in -ldl" >&5
14399       ac_save_LIBS="$LIBS"
14400       LIBS="-ldl $LIBS"
14401       cat > conftest.$ac_ext <<EOF
14402 #line 14403 "configure"
14403 #include "confdefs.h"
14404 #include <dlfcn.h>
14405 int main() {
14406         dlopen ("", 0);
14407 ; return 0; }
14408 EOF
14409 if { (eval echo configure:14410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14410   rm -rf conftest*
14411    have_dl=yes 
14412 else
14413   echo "configure: failed program was:" >&5
14414   cat conftest.$ac_ext >&5
14415   rm -rf conftest*
14416   LIBS="$ac_save_LIBS"
14417 fi
14418 rm -f conftest*
14419       ac_save_LIBS=
14420 fi
14421 rm -f conftest*
14422 else
14423   echo "$ac_t""no" 1>&6
14424 fi
14425
14426     if test -n "$have_dl"; then
14427       { test "$extra_verbose" = "yes" && cat << \EOF
14428     Defining HAVE_DLOPEN
14429 EOF
14430 cat >> confdefs.h <<\EOF
14431 #define HAVE_DLOPEN 1
14432 EOF
14433 }
14434
14435     else
14436       
14437 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14438 echo "configure:14439: checking for shl_load in -ldld" >&5
14439 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14440
14441 xe_check_libs=" -ldld "
14442 cat > conftest.$ac_ext <<EOF
14443 #line 14444 "configure"
14444 #include "confdefs.h"
14445 /* Override any gcc2 internal prototype to avoid an error.  */
14446 /* We use char because int might match the return type of a gcc2
14447     builtin and then its argument prototype would still apply.  */
14448 char shl_load();
14449
14450 int main() {
14451 shl_load()
14452 ; return 0; }
14453 EOF
14454 if { (eval echo configure:14455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14455   rm -rf conftest*
14456   eval "ac_cv_lib_$ac_lib_var=yes"
14457 else
14458   echo "configure: failed program was:" >&5
14459   cat conftest.$ac_ext >&5
14460   rm -rf conftest*
14461   eval "ac_cv_lib_$ac_lib_var=no"
14462 fi
14463 rm -f conftest*
14464 xe_check_libs=""
14465
14466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14467   echo "$ac_t""yes" 1>&6
14468   libdl=dld have_dl=yes;
14469         { test "$extra_verbose" = "yes" && cat << \EOF
14470     Defining HAVE_SHL_LOAD
14471 EOF
14472 cat >> confdefs.h <<\EOF
14473 #define HAVE_SHL_LOAD 1
14474 EOF
14475 }
14476
14477 else
14478   echo "$ac_t""no" 1>&6
14479
14480 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14481 echo "configure:14482: checking for dld_init in -ldld" >&5
14482 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14483
14484 xe_check_libs=" -ldld "
14485 cat > conftest.$ac_ext <<EOF
14486 #line 14487 "configure"
14487 #include "confdefs.h"
14488 /* Override any gcc2 internal prototype to avoid an error.  */
14489 /* We use char because int might match the return type of a gcc2
14490     builtin and then its argument prototype would still apply.  */
14491 char dld_init();
14492
14493 int main() {
14494 dld_init()
14495 ; return 0; }
14496 EOF
14497 if { (eval echo configure:14498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14498   rm -rf conftest*
14499   eval "ac_cv_lib_$ac_lib_var=yes"
14500 else
14501   echo "configure: failed program was:" >&5
14502   cat conftest.$ac_ext >&5
14503   rm -rf conftest*
14504   eval "ac_cv_lib_$ac_lib_var=no"
14505 fi
14506 rm -f conftest*
14507 xe_check_libs=""
14508
14509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14510   echo "$ac_t""yes" 1>&6
14511   libdl=dld have_dl=yes;
14512         { test "$extra_verbose" = "yes" && cat << \EOF
14513     Defining HAVE_DLD_INIT
14514 EOF
14515 cat >> confdefs.h <<\EOF
14516 #define HAVE_DLD_INIT 1
14517 EOF
14518 }
14519
14520 else
14521   echo "$ac_t""no" 1>&6
14522 fi
14523
14524
14525 fi
14526
14527
14528     fi
14529   fi 
14530   if test -n "$have_dl"; then
14531         
14532 dll_ld=
14533 dll_ldflags=
14534 dll_cflags=
14535 dll_post=
14536 dll_ldo="-o"
14537 ld_dynamic_link_flags=
14538 xehost=$canonical
14539 xealias=$internal_configuration
14540
14541 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14542 echo "configure:14543: checking how to build dynamic libraries for ${xehost}" >&5
14543 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14544 case "$xehost" in
14545 *-*-linux-gnu*) ;;
14546 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14547 esac
14548
14549 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14550 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14551 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14552
14553 case "$xehost_os" in
14554 aix3*)
14555   # AIX sometimes has problems with the GCC collect2 program.  For some
14556   # reason, if we set the COLLECT_NAMES environment variable, the problems
14557   # vanish in a puff of smoke.
14558   if test "${COLLECT_NAMES+set}" != set; then
14559     COLLECT_NAMES=
14560     export COLLECT_NAMES
14561   fi
14562   ;;
14563 esac
14564
14565 # Now see if the compiler is really GCC.
14566 if test "$GCC" = "yes"; then
14567   XEGCC=yes
14568 else
14569   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14570 echo "configure:14571: checking checking whether we are using GNU C" >&5
14571   cat > conftest.$ac_ext <<EOF
14572 #line 14573 "configure"
14573 #include "confdefs.h"
14574
14575 #ifdef __GNUC__
14576   yes;
14577 #endif
14578
14579 EOF
14580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14581   egrep "yes" >/dev/null 2>&1; then
14582   rm -rf conftest*
14583   XEGCC=yes
14584 else
14585   rm -rf conftest*
14586   XEGCC=no
14587 fi
14588 rm -f conftest*
14589
14590   echo "$ac_t""${XEGCC}" 1>&6
14591 fi
14592
14593 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14594 echo "configure:14595: checking how to produce PIC code" >&5
14595 wl=
14596
14597 can_build_shared=yes
14598 if test "$XEGCC" = yes; then
14599   wl='-Wl,'
14600
14601   case "$xehost_os" in
14602   aix[3-9]* | irix[5-9]* | osf[3-9])
14603     # PIC is the default for these OSes.
14604     ;;
14605
14606   os2*)
14607     # We can build DLLs from non-PIC.
14608     ;;
14609   amigaos*)
14610     # FIXME: we need at least 68020 code to build shared libraries, but
14611     # adding the `-m68020' flag to GCC prevents building anything better,
14612     # like `-m68040'.
14613     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14614     ;;
14615   *cygwin* | *mingw* )
14616     # PIC is the default
14617     ;;
14618   *)
14619     dll_cflags='-fPIC'
14620     ;;
14621   esac
14622 else
14623   # PORTME Check for PIC flags for the system compiler.
14624   case "$xehost_os" in
14625   hpux9* | hpux1[0-9]*)
14626     # Is there a better link_static_flag that works with the bundled CC?
14627     wl='-Wl,'
14628     dll_cflags='+Z'
14629     ;;
14630
14631   irix[5-9]*)
14632     wl='-Wl,'
14633     # PIC (with -KPIC) is the default.
14634     ;;
14635
14636   os2*)
14637     # We can build DLLs from non-PIC.
14638     ;;
14639
14640   osf[3-9]*)
14641     # All OSF/1 code is PIC.
14642     wl='-Wl,'
14643     ;;
14644
14645   aix[3-9]*)
14646     # All AIX code is PIC.
14647     wl='-Wl,'
14648     ;;
14649
14650   sco3.2v5*)
14651     dll_cflags='-belf -Kpic'
14652     wl='-Wl,'
14653     ;;
14654
14655   unixware*)
14656     dll_cflags="-KPIC"
14657     wl="-Wl,"
14658     ;;
14659
14660   sysv4*)
14661     dll_cflags="-KPIC"
14662     wl="-Wl,"
14663     ;;
14664
14665   sysv5*)
14666     dll_cflags="-KPIC"
14667     wl="-Wl,"
14668     ;;
14669
14670   solaris2*)
14671     dll_cflags='-KPIC'
14672     wl='-Wl,'
14673     ;;
14674
14675   sunos4*)
14676     dll_cflags='-PIC'
14677     wl='-Qoption ld '
14678     ;;
14679
14680   uts4*)
14681     dll_cflags='-pic'
14682     ;;
14683
14684   *)
14685     can_build_shared=no
14686     ;;
14687   esac
14688 fi
14689
14690 if test -n "$dll_cflags"; then
14691   echo "$ac_t""${dll_cflags}" 1>&6
14692
14693   # Check to make sure the dll_cflags actually works.
14694   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14695 echo "configure:14696: checking if PIC flag ${dll_cflags} really works" >&5
14696   save_CFLAGS="$CFLAGS"
14697   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14698   cat > conftest.$ac_ext <<EOF
14699 #line 14700 "configure"
14700 #include "confdefs.h"
14701
14702 int main() {
14703 int x=0;
14704 ; return 0; }
14705 EOF
14706 if { (eval echo configure:14707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14707   rm -rf conftest*
14708   
14709     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14710     # reports no error.  So, we need to grep stderr for (Bundled).
14711     if grep '(Bundled)' config.log >/dev/null; then
14712       echo "$ac_t""no" 1>&6
14713       can_build_shared=no
14714       dll_cflags=
14715     else
14716       echo "$ac_t""yes" 1>&6
14717     fi
14718 else
14719   echo "configure: failed program was:" >&5
14720   cat conftest.$ac_ext >&5
14721   rm -rf conftest*
14722   echo "$ac_t""no" 1>&6
14723     can_build_shared=no
14724     dll_cflags=
14725 fi
14726 rm -f conftest*
14727   CFLAGS="$save_CFLAGS"
14728 else
14729   echo "$ac_t""none" 1>&6
14730 fi
14731
14732 if test "$can_build_shared" = "yes"; then
14733 cc_produces_so=no
14734 xldf=
14735 xcldf=
14736 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14737 echo "configure:14738: checking if C compiler can produce shared libraries" >&5
14738 if test "$XEGCC" = yes; then
14739   xcldf="-shared"
14740   xldf="-shared"
14741 else # Not using GCC
14742   case "$xehost_os" in
14743     aix[3-9]*)
14744       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14745       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14746       ;;
14747
14748     freebsd2* | netbsd* | openbsd*)
14749       xldf="-Bshareable"
14750       xcldf="${wl}-Bshareable"
14751       ;;
14752
14753     freebsd3*)
14754       xcldf="-shared"
14755       ;;
14756
14757     hpux*)
14758       xldf="-b +s"
14759       xcldf="${wl}-b ${wl}+s"
14760       ;;
14761
14762     irix[5-9]* | osf[3-9]*)
14763       xcldf="${wl}-shared"
14764       xldf="-shared"
14765       ;;
14766
14767     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14768       xcldf="-G"
14769       xldf="-G"
14770       ;;
14771
14772     sunos4*)
14773       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14774       xldf="-assert pure-text -Bstatic"
14775       ;;
14776   esac
14777 fi # End if if we are using gcc
14778
14779 if test -n "$xcldf"; then
14780   save_LDFLAGS=$LDFLAGS
14781   save_LIBS=$LIBS
14782   save_xe_libs=$xe_libs
14783   LDFLAGS="$xcldf $LDFLAGS"
14784   LIBS=
14785   xe_libs=
14786   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790
14791 int main() {
14792 int x=0;
14793 ; return 0; }
14794 EOF
14795 if { (eval echo configure:14796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14796   rm -rf conftest*
14797   cc_produces_so=yes
14798 else
14799   echo "configure: failed program was:" >&5
14800   cat conftest.$ac_ext >&5
14801   rm -rf conftest*
14802   cc_produces_so=no
14803 fi
14804 rm -f conftest*
14805   LDFLAGS=$save_LDFLAGS
14806   LIBS=$save_LIBS
14807   xe_libs=$save_xe_libs
14808   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14809 else
14810   cc_produces_so=no
14811 fi
14812 echo "$ac_t""${cc_produces_so}" 1>&6
14813
14814 LTLD=$LD
14815 if test -z "$LTLD"; then
14816   ac_prog=ld
14817   if test "$XEGCC" = yes; then
14818     # Check if gcc -print-prog-name=ld gives a path.
14819     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14820 echo "configure:14821: checking for ld used by GCC" >&5
14821     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14822     case "$ac_prog" in
14823     # Accept absolute paths.
14824     /*)
14825       if test -z "$LTLD"; then
14826 #        case "$ac_prog" in
14827 #          *gcc-lib*) LTLD="$CC"
14828 #                     ;;
14829 #          *)
14830          LTLD="$ac_prog"
14831 #                     ;;
14832 #        esac
14833       fi
14834       ;;
14835     "")
14836       # If it fails, then pretend we aren't using GCC.
14837       ac_prog=ld
14838       ;;
14839     *)
14840       # If it is relative, then search for the first ld in PATH.
14841       with_gnu_ld=unknown
14842       ;;
14843     esac
14844   else
14845     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14846 echo "configure:14847: checking for GNU ld" >&5
14847   fi
14848
14849   if test -z "$LTLD"; then
14850     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14851     for ac_dir in $PATH; do
14852       test -z "$ac_dir" && ac_dir=.
14853       if test -f "$ac_dir/$ac_prog"; then
14854         LTLD="$ac_dir/$ac_prog"
14855         # Check to see if the program is GNU ld.  I'd rather use --version,
14856         # but apparently some GNU ld's only accept -v.
14857         # Break only if it was the GNU/non-GNU ld that we prefer.
14858         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14859           xe_gnu_ld=yes
14860         else
14861           xe_gnu_ld=no
14862         fi
14863       fi
14864     done
14865     IFS="$ac_save_ifs"
14866   fi
14867
14868   if test -n "$LTLD"; then
14869     echo "$ac_t""${LTLD}" 1>&6
14870   else
14871     echo "$ac_t""no" 1>&6
14872   fi
14873
14874   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14875     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14876     exit 1
14877   fi
14878 fi
14879
14880 ld_dynamic_link_flags=
14881
14882 # Check to see if it really is or isn't GNU ld.
14883 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14884 echo "configure:14885: checking if the linker is GNU ld" >&5
14885 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14886 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14887   xe_gnu_ld=yes
14888 else
14889   xe_gnu_ld=no
14890 fi
14891 echo "$ac_t""${xe_gnu_ld}" 1>&6
14892
14893 case "$xehost_os" in
14894   amigaos* | sunos4*)
14895     # On these operating systems, we should treat GNU ld like the system ld.
14896     gnu_ld_acts_native=yes
14897     ;;
14898   *)
14899     gnu_ld_acts_native=no
14900     ;;
14901 esac
14902
14903 if test "$cc_produces_so" = "yes"; then
14904   dll_ld=$CC
14905   dll_ldflags=$xcldf
14906   can_build_shared=yes
14907   ld_shlibs=yes
14908 else
14909   # OK - only NOW do we futz about with ld.
14910   # See if the linker supports building shared libraries.
14911   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14912 echo "configure:14913: checking whether the linker supports shared libraries" >&5
14913   dll_ld=$CC
14914   dll_ldflags=$LDFLAGS
14915   ld_shlibs=yes
14916   can_build_shared=yes
14917   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14918     # See if GNU ld supports shared libraries.
14919     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14920       dll_ld=$CC
14921       dll_ldflags="-shared"
14922       ld_shlibs=yes
14923     else
14924       ld_shlibs=no
14925     fi
14926   else
14927     # PORTME fill in a description of your system's linker (not GNU ld)
14928     case "$xehost_os" in
14929     aix3*)
14930       dll_ld=$LTLD
14931       dll_ldflags=$xldf
14932       ;;
14933
14934     aix[4-9]*)
14935       dll_ldflags=$xcldf
14936       ;;
14937
14938     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14939     # support.  Future versions do this automatically, but an explicit c++rt0.o
14940     # doesn't break anything, and helps significantly (at the cost of a little
14941     # extra space).
14942     freebsd2.2*)
14943       dll_ld=$LTLD
14944       dll_ldflags=$xldf
14945       dll_post="/usr/lib/c++rt0.o"
14946       ;;
14947
14948     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14949     freebsd2*)
14950       dll_ld=$LTLD
14951       dll_ldflags="-Bshareable"
14952       ;;
14953
14954     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14955     freebsd3*)
14956       dll_ldflags="-shared"
14957       ;;
14958
14959     hpux*)
14960       dll_ld=$LTLD
14961       dll_ldflags=$xldf
14962       ;;
14963
14964     irix[5-9]*)
14965       dll_ld=$LTLD
14966       dll_ldflags=$xldf
14967       ;;
14968
14969     netbsd*)
14970       # Tested with NetBSD 1.2 ld
14971       dll_ld=$LTLD
14972       dll_ldflags=$xldf
14973       ;;
14974
14975     openbsd*)
14976       dll_ld=$LTLD
14977       dll_ldflags=$xldf
14978       ;;
14979
14980     osf3* | osf4*)
14981       dll_ld=$LTLD
14982       dll_ldflags=$xldf
14983       ;;
14984
14985     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14986     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14987       dll_ld=$LTLD
14988       case "$dll_ld" in
14989         *gcc*) dll_ldflags="-shared"
14990                dll_ld=$CC
14991                ;;
14992         *)     dll_ldflags="-G"
14993                ;;
14994       esac
14995       ;;
14996
14997     sunos4*)
14998       if test "$XEGCC" = yes; then
14999         dll_ld=$CC
15000       else
15001         dll_ld=$LTLD
15002       fi
15003       dll_ldflags=$xldf
15004       ;;
15005
15006     uts4*)
15007       dll_ld=$LTLD
15008       dll_ldflags="-G"
15009       ;;
15010
15011     bsdi*)
15012       dll_ldflags="-r"
15013       dll_ld="shlicc2"
15014       ;;
15015
15016     *)
15017       ld_shlibs=no
15018       can_build_shared=no
15019       ;;
15020     esac
15021   fi
15022   echo "$ac_t""${ld_shlibs}" 1>&6
15023   if test "$ld_shlibs" = "no"; then
15024     can_build_shared=no
15025   fi
15026 fi # End of if cc_produces_so = no
15027
15028
15029 if test "$xe_gnu_ld" = yes; then
15030   if test "$ld_shlibs" = yes; then
15031     ld_dynamic_link_flags="${wl}-export-dynamic"
15032   fi
15033 fi
15034
15035 if test -z "$ld_dynamic_link_flags"; then
15036   case "$xehost_os" in
15037   aix[3-9]*)
15038     ld_dynamic_link_flags=
15039     ;;
15040
15041   freebsd2.2*)
15042     ld_dynamic_link_flags=
15043     ;;
15044
15045   freebsd2*)
15046     ld_dynamic_link_flags=
15047     ;;
15048
15049   freebsd3*)
15050     ld_dynamic_link_flags=
15051     ;;
15052
15053   hpux*)
15054     ld_dynamic_link_flags="${wl}-E"
15055     ;;
15056
15057   irix[5-9]*)
15058     ld_dynamic_link_flags=
15059     ;;
15060
15061   netbsd*)
15062     ld_dynamic_link_flags=
15063     ;;
15064
15065   openbsd*)
15066     ld_dynamic_link_flags=
15067     ;;
15068
15069   osf3* | osf4*)
15070     ld_dynamic_link_flags=
15071     ;;
15072
15073   solaris2* | solaris7*)
15074     ld_dynamic_link_flags=
15075     ;;
15076
15077   sco3.2v5* | unixware* | sysv5* | sysv4*)
15078     ld_dynamic_link_flags="${wl}-Bexport"
15079     ;;
15080
15081   sunos4*)
15082     ld_dynamic_link_flags=
15083     ;;
15084
15085   uts4*)
15086     ld_dynamic_link_flags=
15087     ;;
15088
15089   bsdi*)
15090     ld_dynamic_link_flags=
15091     ;;
15092
15093   esac
15094 fi # End of if -z ld_dynamic_link_flags
15095 fi # End of if test "$can_build_shared" = "yes"
15096
15097
15098
15099
15100
15101
15102
15103
15104   fi
15105
15106   if test "$can_build_shared" = "yes"; then
15107     { test "$extra_verbose" = "yes" && cat << \EOF
15108     Defining HAVE_SHLIB
15109 EOF
15110 cat >> confdefs.h <<\EOF
15111 #define HAVE_SHLIB 1
15112 EOF
15113 }
15114
15115     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15116    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15117  fi
15118     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15119     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15120     for ac_func in dlerror _dlerror
15121 do
15122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15123 echo "configure:15124: checking for $ac_func" >&5
15124
15125 cat > conftest.$ac_ext <<EOF
15126 #line 15127 "configure"
15127 #include "confdefs.h"
15128 /* System header to define __stub macros and hopefully few prototypes,
15129     which can conflict with char $ac_func(); below.  */
15130 #include <assert.h>
15131 /* Override any gcc2 internal prototype to avoid an error.  */
15132 /* We use char because int might match the return type of a gcc2
15133     builtin and then its argument prototype would still apply.  */
15134 char $ac_func();
15135
15136 int main() {
15137
15138 /* The GNU C library defines this for functions which it implements
15139     to always fail with ENOSYS.  Some functions are actually named
15140     something starting with __ and the normal name is an alias.  */
15141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15142 choke me
15143 #else
15144 $ac_func();
15145 #endif
15146
15147 ; return 0; }
15148 EOF
15149 if { (eval echo configure:15150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15150   rm -rf conftest*
15151   eval "ac_cv_func_$ac_func=yes"
15152 else
15153   echo "configure: failed program was:" >&5
15154   cat conftest.$ac_ext >&5
15155   rm -rf conftest*
15156   eval "ac_cv_func_$ac_func=no"
15157 fi
15158 rm -f conftest*
15159
15160 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15161   echo "$ac_t""yes" 1>&6
15162     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15163   { test "$extra_verbose" = "yes" && cat << EOF
15164     Defining $ac_tr_func
15165 EOF
15166 cat >> confdefs.h <<EOF
15167 #define $ac_tr_func 1
15168 EOF
15169 }
15170  
15171 else
15172   echo "$ac_t""no" 1>&6
15173 fi
15174 done
15175
15176     with_modules=yes
15177   else
15178     if test "$with_modules" = "yes"; then
15179       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15180     else
15181       echo "configure: warning: "Module support cannot be provided."" 1>&2
15182     fi
15183     with_modules=no
15184   fi
15185 fi
15186
15187 cat > conftest.$ac_ext <<EOF
15188 #line 15189 "configure"
15189 #include "confdefs.h"
15190 int main(int c,char *v[]){return 0;}
15191 EOF
15192 if { (eval echo configure:15193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15193 then
15194   :
15195 else
15196   conftest_rc="$?"
15197   echo "configure: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   rm -fr conftest*
15200   
15201   echo ""
15202   echo "*** PANIC *** The C compiler can no longer build working executables."
15203   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15204   echo "*** PANIC *** The most likely reason for this problem is that configure"
15205   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15206   echo "*** PANIC *** found at run time."
15207   echo "*** PANIC ***"
15208   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15209   echo "*** PANIC *** On other systems, try telling configure where to find the"
15210   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15211   echo "*** PANIC ***"
15212   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15213   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15214   echo "*** PANIC *** on your system.  Don't do that."
15215   exit 1
15216 fi
15217 rm -fr conftest*
15218
15219 if test "$win32_processes" = "yes"; then
15220   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15221    echo "    xemacs will be linked with \"process-nt.o\""
15222  fi
15223 else
15224   { test "$extra_verbose" = "yes" && cat << \EOF
15225     Defining HAVE_UNIX_PROCESSES
15226 EOF
15227 cat >> confdefs.h <<\EOF
15228 #define HAVE_UNIX_PROCESSES 1
15229 EOF
15230 }
15231
15232   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15233    echo "    xemacs will be linked with \"process-unix.o\""
15234  fi
15235 fi
15236
15237
15238
15239 T=""
15240 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15241 CFLAGS="$T"
15242
15243
15244 T=""
15245 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15246 extra_objs="$T"
15247
15248
15249 T=""
15250 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
15251 c_switch_general="$T"
15252
15253
15254 T=""
15255 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
15256 c_switch_window_system="$T"
15257
15258
15259 T=""
15260 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15261 c_switch_all="$T"
15262
15263
15264 T=""
15265 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
15266 ld_switch_general="$T"
15267
15268
15269 T=""
15270 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15271 ld_switch_window_system="$T"
15272
15273
15274 T=""
15275 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15276 ld_switch_all="$T"
15277
15278
15279 T=""
15280 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15281 ld_libs_general="$T"
15282
15283
15284 T=""
15285 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
15286 ld_libs_window_system="$T"
15287
15288
15289 T=""
15290 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15291 ld_libs_all="$T"
15292
15293
15294
15295 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15296 internal_makefile_list="Makefile.in"
15297 SUBDIR_MAKEFILES=''
15298 test -d lock || mkdir lock
15299 for dir in $MAKE_SUBDIR; do
15300   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15301         test -d "$d" || mkdir "$d"; cd "$d"
15302       done ) ;;
15303    * ) test -d "$dir" || mkdir "$dir" ;;
15304   esac
15305   
15306 T=""
15307 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15308 SUBDIR_MAKEFILES="$T"
15309
15310   
15311 T=""
15312 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15313 internal_makefile_list="$T"
15314
15315 done
15316
15317
15318
15319
15320 for dir in src/s src/m; do
15321   if test ! -d "$dir" ; then
15322     echo Making symbolic link to "$srcdir/$dir"
15323     ${LN_S} "$srcdir/$dir" "$dir"
15324   fi
15325 done
15326
15327 if test "$extra_verbose" = "yes"; then
15328   echo ""
15329   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
15330   echo ""
15331 fi
15332
15333
15334 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15335   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15336   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15337 fi
15338
15339 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15340   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15341   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15342 fi
15343
15344 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15345   test "$extra_verbose" = "yes" && echo "creating TAGS"
15346   echo "\f
15347 $srcdir/TAGS,include" > "TAGS"
15348 fi
15349
15350 if test "$__SUNPRO_C" = "yes"; then
15351   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15352   ( echo "# For use with Sun WorkShop's Source browser."
15353     echo "# See sbquery(1) and sbinit(4) for more information"
15354     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15355   ) > .sbinit
15356 fi
15357
15358 rm -f core
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379 PREFIX=$prefix
15380 while true; do
15381   case "$PREFIX" in
15382     *\$* ) eval "PREFIX=$PREFIX" ;;
15383     *) break ;;
15384   esac
15385 done
15386
15387
15388
15389
15390 EXEC_PREFIX=$exec_prefix
15391 while true; do
15392   case "$EXEC_PREFIX" in
15393     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15394     *) break ;;
15395   esac
15396 done
15397
15398
15399
15400
15401 INFODIR=$infodir
15402 while true; do
15403   case "$INFODIR" in
15404     *\$* ) eval "INFODIR=$INFODIR" ;;
15405     *) break ;;
15406   esac
15407 done
15408
15409
15410
15411
15412 INFOPATH=$infopath
15413 while true; do
15414   case "$INFOPATH" in
15415     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15416     *) break ;;
15417   esac
15418 done
15419
15420
15421
15422
15423 PACKAGE_PATH=$package_path
15424 while true; do
15425   case "$PACKAGE_PATH" in
15426     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15427     *) break ;;
15428   esac
15429 done
15430
15431
15432
15433
15434 LISPDIR=$lispdir
15435 while true; do
15436   case "$LISPDIR" in
15437     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15438     *) break ;;
15439   esac
15440 done
15441
15442
15443
15444
15445 MODULEDIR=$moduledir
15446 while true; do
15447   case "$MODULEDIR" in
15448     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15449     *) break ;;
15450   esac
15451 done
15452
15453
15454
15455
15456 SITELISPDIR=$sitelispdir
15457 while true; do
15458   case "$SITELISPDIR" in
15459     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15460     *) break ;;
15461   esac
15462 done
15463
15464
15465
15466
15467 SITEMODULEDIR=$sitemoduledir
15468 while true; do
15469   case "$SITEMODULEDIR" in
15470     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15471     *) break ;;
15472   esac
15473 done
15474
15475
15476
15477
15478 ETCDIR=$etcdir
15479 while true; do
15480   case "$ETCDIR" in
15481     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15482     *) break ;;
15483   esac
15484 done
15485
15486
15487
15488
15489 DOCDIR=$docdir
15490 while true; do
15491   case "$DOCDIR" in
15492     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15493     *) break ;;
15494   esac
15495 done
15496
15497
15498
15499
15500 ARCHLIBDIR=$archlibdir
15501 while true; do
15502   case "$ARCHLIBDIR" in
15503     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15504     *) break ;;
15505   esac
15506 done
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15528
15529
15530
15531
15532
15533
15534
15535 : ${XEMACS_CC:=$CC}
15536
15537
15538 if test "$with_prefix" = "yes"; then
15539   { test "$extra_verbose" = "yes" && cat << \EOF
15540     Defining PREFIX_USER_DEFINED
15541 EOF
15542 cat >> confdefs.h <<\EOF
15543 #define PREFIX_USER_DEFINED 1
15544 EOF
15545 }
15546
15547 fi
15548
15549 if test "$with_site_lisp" = "no"; then
15550   { test "$extra_verbose" = "yes" && cat << \EOF
15551     Defining INHIBIT_SITE_LISP
15552 EOF
15553 cat >> confdefs.h <<\EOF
15554 #define INHIBIT_SITE_LISP 1
15555 EOF
15556 }
15557
15558 fi
15559 if test "$with_site_modules" = "no"; then
15560   { test "$extra_verbose" = "yes" && cat << \EOF
15561     Defining INHIBIT_SITE_MODULES
15562 EOF
15563 cat >> confdefs.h <<\EOF
15564 #define INHIBIT_SITE_MODULES 1
15565 EOF
15566 }
15567
15568 fi
15569
15570
15571 T=""
15572 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15573 ac_configure_args="$T"
15574
15575 { test "$extra_verbose" = "yes" && cat << EOF
15576     Defining EMACS_CONFIGURATION = "$configuration"
15577 EOF
15578 cat >> confdefs.h <<EOF
15579 #define EMACS_CONFIGURATION "$configuration"
15580 EOF
15581 }
15582
15583 { test "$extra_verbose" = "yes" && cat << EOF
15584     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15585 EOF
15586 cat >> confdefs.h <<EOF
15587 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15588 EOF
15589 }
15590
15591
15592
15593 null_string=""
15594 { test "$extra_verbose" = "yes" && cat << EOF
15595     Defining LD_SWITCH_X_SITE = $null_string
15596 EOF
15597 cat >> confdefs.h <<EOF
15598 #define LD_SWITCH_X_SITE $null_string
15599 EOF
15600 }
15601
15602 { test "$extra_verbose" = "yes" && cat << EOF
15603     Defining LD_SWITCH_X_SITE_AUX = $null_string
15604 EOF
15605 cat >> confdefs.h <<EOF
15606 #define LD_SWITCH_X_SITE_AUX $null_string
15607 EOF
15608 }
15609
15610 { test "$extra_verbose" = "yes" && cat << EOF
15611     Defining C_SWITCH_X_SITE = $null_string
15612 EOF
15613 cat >> confdefs.h <<EOF
15614 #define C_SWITCH_X_SITE $null_string
15615 EOF
15616 }
15617
15618 { test "$extra_verbose" = "yes" && cat << EOF
15619     Defining LD_SWITCH_SITE = $null_string
15620 EOF
15621 cat >> confdefs.h <<EOF
15622 #define LD_SWITCH_SITE $null_string
15623 EOF
15624 }
15625
15626 { test "$extra_verbose" = "yes" && cat << EOF
15627     Defining C_SWITCH_SITE = $null_string
15628 EOF
15629 cat >> confdefs.h <<EOF
15630 #define C_SWITCH_SITE $null_string
15631 EOF
15632 }
15633
15634
15635
15636 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15637     Defining GNU_MALLOC
15638 EOF
15639 cat >> confdefs.h <<\EOF
15640 #define GNU_MALLOC 1
15641 EOF
15642 }
15643
15644 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15645     Defining USE_SYSTEM_MALLOC
15646 EOF
15647 cat >> confdefs.h <<\EOF
15648 #define USE_SYSTEM_MALLOC 1
15649 EOF
15650 }
15651
15652 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15653     Defining USE_DEBUG_MALLOC
15654 EOF
15655 cat >> confdefs.h <<\EOF
15656 #define USE_DEBUG_MALLOC 1
15657 EOF
15658 }
15659
15660                                               { test "$extra_verbose" = "yes" && cat << \EOF
15661     Defining USE_SYSTEM_MALLOC
15662 EOF
15663 cat >> confdefs.h <<\EOF
15664 #define USE_SYSTEM_MALLOC 1
15665 EOF
15666 }
15667
15668 fi
15669 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15670     Defining I18N3
15671 EOF
15672 cat >> confdefs.h <<\EOF
15673 #define I18N3 1
15674 EOF
15675 }
15676
15677 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15678     Defining USE_GCC
15679 EOF
15680 cat >> confdefs.h <<\EOF
15681 #define USE_GCC 1
15682 EOF
15683 }
15684
15685 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15686     Defining EXTERNAL_WIDGET
15687 EOF
15688 cat >> confdefs.h <<\EOF
15689 #define EXTERNAL_WIDGET 1
15690 EOF
15691 }
15692
15693 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15694     Defining QUICK_BUILD
15695 EOF
15696 cat >> confdefs.h <<\EOF
15697 #define QUICK_BUILD 1
15698 EOF
15699 }
15700
15701 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15702     Defining PURIFY
15703 EOF
15704 cat >> confdefs.h <<\EOF
15705 #define PURIFY 1
15706 EOF
15707 }
15708
15709 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15710     Defining QUANTIFY
15711 EOF
15712 cat >> confdefs.h <<\EOF
15713 #define QUANTIFY 1
15714 EOF
15715 }
15716
15717 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15718     Defining MAIL_USE_POP
15719 EOF
15720 cat >> confdefs.h <<\EOF
15721 #define MAIL_USE_POP 1
15722 EOF
15723 }
15724
15725 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15726     Defining KERBEROS
15727 EOF
15728 cat >> confdefs.h <<\EOF
15729 #define KERBEROS 1
15730 EOF
15731 }
15732
15733 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15734     Defining HESIOD
15735 EOF
15736 cat >> confdefs.h <<\EOF
15737 #define HESIOD 1
15738 EOF
15739 }
15740
15741 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15742     Defining USE_UNION_TYPE
15743 EOF
15744 cat >> confdefs.h <<\EOF
15745 #define USE_UNION_TYPE 1
15746 EOF
15747 }
15748
15749 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15750     Defining PDUMP
15751 EOF
15752 cat >> confdefs.h <<\EOF
15753 #define PDUMP 1
15754 EOF
15755 }
15756
15757 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15758     Defining IPV6_CANONICALIZE
15759 EOF
15760 cat >> confdefs.h <<\EOF
15761 #define IPV6_CANONICALIZE 1
15762 EOF
15763 }
15764
15765
15766
15767 (
15768 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15769 else
15770   echo "uname -a: `uname -a`"
15771 fi
15772 echo ""
15773 echo "$0 $quoted_arguments"
15774 ) > Installation
15775
15776 if test ! -z ${emacs_beta_version} ; then
15777   if test -z "${emacs_is_beta}" ; then
15778         xemacs_betaname=".${emacs_beta_version}"
15779   else
15780         xemacs_betaname="-b${emacs_beta_version}"
15781   fi
15782 else
15783   xemacs_betaname=""
15784 fi
15785
15786 (
15787 echo "
15788
15789 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15790 "
15791 echo "
15792 Compilation / Installation:"
15793 echo "  Source code location:              $srcdir"
15794 echo "  Installation prefix:               $prefix"
15795 if test -n "$site_includes"; then
15796   echo "  Additional header files:           $site_includes"
15797 fi
15798 if test -n "$site_libraries"; then
15799   echo "  Additional libraries:              $site_libraries"
15800 fi
15801 if test -n "$site_prefixes"; then
15802   echo "  Additional prefixes:               $site_prefixes"
15803 fi
15804 if test -n "$runpath"; then
15805   echo "  Runtime library search path:       $runpath"
15806 fi
15807
15808 if test -n "$opsysfile"
15809 then echo "  Operating system description file: \`$opsysfile'"
15810 else echo "  Not using any operating system description file"
15811 fi
15812 if test -n "$machfile"
15813 then echo "  Machine description file:          \`$machfile'"
15814 else echo "  Not using any machine description file"
15815 fi
15816
15817 echo "  Compiler:                          $CC $CFLAGS"
15818 echo "  Relocating allocator for buffers:  $rel_alloc"
15819 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15820 case "$ld_switch_site" in
15821   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15822     - Consider configuring with --pdump." ;;
15823 esac
15824
15825 echo "
15826 Window System:"
15827 if test "$with_msw" = "yes"; then
15828   echo "  Compiling in support for the Microsoft window system."
15829 fi
15830 if test "$with_x11" = "yes"; then
15831   echo "  Compiling in support for the X window system:"
15832   echo "    - X Windows headers location:                 $x_includes"
15833   echo "    - X Windows libraries location:               $x_libraries"
15834   if test "$with_xauth" != yes; then
15835     echo "    - Xau (X authority) not available."
15836   fi
15837   if test "$with_xmu" != yes; then
15838     echo "    - Xmu library not available; substituting equivalent routines."
15839   fi
15840   if test "$with_wmcommand" != no; then
15841     echo "    - Handling WM_COMMAND properly."
15842   fi
15843 fi
15844 if test "$need_athena" = "yes"; then
15845   echo "  Compiling in support for the Athena widget set:"
15846   echo "    - Athena headers location:                    $athena_h_path"
15847   echo "    - Athena library to link:                     $athena_lib"
15848 fi
15849 case "$with_menubars" in
15850   gtk   ) echo "  Using GTK menubars."   ;;
15851   lucid ) echo "  Using Lucid menubars." ;;
15852   motif ) echo "  Using Motif menubars."
15853           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15854           echo "             We recommend using the Lucid menubar instead."
15855           echo "             Re-run configure with --with-menubars='lucid'." ;;
15856     msw ) echo "  Using MS-Windows menubars." ;;
15857 esac
15858 case "$with_scrollbars" in
15859   gtk    ) echo "  Using GTK scrollbars."        ;;
15860   lucid  ) echo "  Using Lucid scrollbars."      ;;
15861   motif  ) echo "  Using Motif scrollbars."      ;;
15862   athena ) echo "  Using Athena scrollbars."     ;;
15863      msw ) echo "  Using MS-Windows scrollbars." ;;
15864 esac
15865 case "$with_dialogs" in
15866   gtk    ) echo "  Using GTK dialog boxes." ;;
15867   motif  ) echo "  Using Motif dialog boxes."
15868            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15869              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15870              echo "             We recommend using the Athena dialog boxes instead."
15871              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15872              echo "             Read the PROBLEMS file for more information."
15873            fi; fi ;;
15874   athena ) echo "  Using Athena dialog boxes."     ;;
15875      msw ) echo "  Using MS-Windows dialog boxes." ;;
15876 esac
15877 case "$with_widgets" in
15878   gtk    ) echo "  Using GTK native widgets."        ;;
15879   motif  ) echo "  Using Motif native widgets."      ;;
15880   athena ) echo "  Using Athena native widgets."     ;;
15881      msw ) echo "  Using MS-Windows native widgets." ;;
15882 esac
15883 if test "$with_dragndrop" = yes; then
15884   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15885   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15886 fi
15887
15888 echo "
15889 TTY:"
15890 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15891 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15892
15893 echo "
15894 Images:"
15895 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15896 if test "$with_xpm" = yes; then
15897   echo "  Compiling in support for XPM  images."
15898 elif test "$with_x11" = yes; then
15899   echo "  WARNING: -----------------------------------------------------------"
15900   echo "  WARNING: Compiling without XPM image support."
15901   if test "$xpm_problem" != ""; then
15902     echo "  Reason: $xpm_problem"
15903   fi
15904   echo "  WARNING: You should strongly consider installing XPM."
15905   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15906   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15907   echo "  WARNING: -----------------------------------------------------------"
15908 fi
15909 if test "$with_png" = yes; then
15910   echo "  Compiling in support for PNG  images."
15911 elif test "$window_system" != "none"; then
15912   echo "  WARNING: -----------------------------------------------------------"
15913   echo "  WARNING: Compiling without PNG image support."
15914   if test "$png_problem" != ""; then
15915     echo "  Reason: $png_problem"
15916   fi
15917   echo "  WARNING: You should strongly consider installing the PNG libraries."
15918   echo "  WARNING: Otherwise certain images and glyphs may not display."
15919   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15920   echo "  WARNING: -----------------------------------------------------------"
15921 fi
15922 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15923 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15924 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15925
15926 echo "
15927 Sound:"
15928 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15929 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15930 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15931 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15932
15933 echo "
15934 Databases:"
15935 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15936 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15937 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15938 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15939 if test "$with_postgresql" = yes; then
15940   echo "  Compiling in support for PostgreSQL."
15941   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15942   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15943 fi
15944
15945 echo "
15946 Internationalization:"
15947 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15948 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15949 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15950 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15951 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15952 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15953 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15954 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15955 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15956 if test "$with_wnn" = yes; then
15957   echo "  Compiling in support for the WNN input method on Mule."
15958   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15959 fi
15960 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15961
15962 echo "
15963 Mail:"
15964 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15965 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15966 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15967 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15968
15969 echo "
15970 Other Features:"
15971 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15972 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15973 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15974 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15975 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15976 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15977 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15978 test "$pdump" = yes && echo "  Using the new portable dumper."
15979 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15980 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15981 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15982   != "no no no no no no"; then
15983   echo "  WARNING: ---------------------------------------------------------"
15984   echo "  WARNING: Compiling in support for runtime error checking."
15985   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15986   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15987   echo "  WARNING: ---------------------------------------------------------"
15988 fi
15989 echo ""
15990 ) | tee -a Installation
15991 echo ""
15992
15993
15994 # Remove any trailing slashes in these variables.
15995 test -n "$prefix" &&
15996   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15997 test -n "$exec_prefix" &&
15998   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15999
16000
16001 for file in $internal_makefile_list; do
16002   test "$file" = src/Makefile.in && \
16003     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16004   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16005 done
16006 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16007 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
16008
16009 trap '' 1 2 15
16010
16011 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16012
16013 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16014 # Let make expand exec_prefix.
16015 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16016
16017 # Any assignment to VPATH causes Sun make to only execute
16018 # the first set of double-colon rules, so remove it if not needed.
16019 # If there is a colon in the path, we need to keep it.
16020 if test "x$srcdir" = x.; then
16021   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16022 fi
16023
16024 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16025
16026 DEFS=-DHAVE_CONFIG_H
16027
16028 # Without the "./", some shells look in PATH for config.status.
16029 : ${CONFIG_STATUS=./config.status}
16030
16031 echo creating $CONFIG_STATUS
16032 rm -f $CONFIG_STATUS
16033 cat > $CONFIG_STATUS <<EOF
16034 #! /bin/sh
16035 # Generated automatically by configure.
16036 # Run this file to recreate the current configuration.
16037 # This directory was configured as follows,
16038 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16039 #
16040 # $0 $ac_configure_args
16041 #
16042 # Compiler output produced by configure, useful for debugging
16043 # configure, is in ./config.log if it exists.
16044
16045 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16046 for ac_option
16047 do
16048   case "\$ac_option" in
16049   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16050     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16051     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16052   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16053     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16054     exit 0 ;;
16055   -help | --help | --hel | --he | --h)
16056     echo "\$ac_cs_usage"; exit 0 ;;
16057   *) echo "\$ac_cs_usage"; exit 1 ;;
16058   esac
16059 done
16060
16061 ac_given_srcdir=$srcdir
16062 ac_given_INSTALL="$INSTALL"
16063
16064 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16065 EOF
16066 cat >> $CONFIG_STATUS <<EOF
16067
16068 # Protect against being on the right side of a sed subst in config.status.
16069 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16070  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16071 $ac_vpsub
16072 $extrasub
16073 s%@SHELL@%$SHELL%g
16074 s%@CFLAGS@%$CFLAGS%g
16075 s%@CPPFLAGS@%$CPPFLAGS%g
16076 s%@CXXFLAGS@%$CXXFLAGS%g
16077 s%@FFLAGS@%$FFLAGS%g
16078 s%@DEFS@%$DEFS%g
16079 s%@LDFLAGS@%$LDFLAGS%g
16080 s%@LIBS@%$LIBS%g
16081 s%@exec_prefix@%$exec_prefix%g
16082 s%@prefix@%$prefix%g
16083 s%@program_transform_name@%$program_transform_name%g
16084 s%@bindir@%$bindir%g
16085 s%@sbindir@%$sbindir%g
16086 s%@libexecdir@%$libexecdir%g
16087 s%@datadir@%$datadir%g
16088 s%@sysconfdir@%$sysconfdir%g
16089 s%@sharedstatedir@%$sharedstatedir%g
16090 s%@localstatedir@%$localstatedir%g
16091 s%@libdir@%$libdir%g
16092 s%@includedir@%$includedir%g
16093 s%@oldincludedir@%$oldincludedir%g
16094 s%@infodir@%$infodir%g
16095 s%@mandir@%$mandir%g
16096 s%@LN_S@%$LN_S%g
16097 s%@blddir@%$blddir%g
16098 s%@CC@%$CC%g
16099 s%@CPP@%$CPP%g
16100 s%@start_flags@%$start_flags%g
16101 s%@ld_switch_shared@%$ld_switch_shared%g
16102 s%@start_files@%$start_files%g
16103 s%@ld@%$ld%g
16104 s%@lib_gcc@%$lib_gcc%g
16105 s%@RANLIB@%$RANLIB%g
16106 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16107 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16108 s%@INSTALL_DATA@%$INSTALL_DATA%g
16109 s%@YACC@%$YACC%g
16110 s%@SET_MAKE@%$SET_MAKE%g
16111 s%@GTK_CONFIG@%$GTK_CONFIG%g
16112 s%@X_CFLAGS@%$X_CFLAGS%g
16113 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16114 s%@X_LIBS@%$X_LIBS%g
16115 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16116 s%@install_pp@%$install_pp%g
16117 s%@libs_xauth@%$libs_xauth%g
16118 s%@dnd_objs@%$dnd_objs%g
16119 s%@lwlib_objs@%$lwlib_objs%g
16120 s%@ALLOCA@%$ALLOCA%g
16121 s%@have_esd_config@%$have_esd_config%g
16122 s%@dll_ld@%$dll_ld%g
16123 s%@dll_cflags@%$dll_cflags%g
16124 s%@dll_ldflags@%$dll_ldflags%g
16125 s%@dll_post@%$dll_post%g
16126 s%@dll_ldo@%$dll_ldo%g
16127 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16128 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16129 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16130 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16131 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16132 s%@PROGNAME@%$PROGNAME%g
16133 s%@version@%$version%g
16134 s%@configuration@%$configuration%g
16135 s%@canonical@%$canonical%g
16136 s%@inststaticdir@%$inststaticdir%g
16137 s%@instvardir@%$instvardir%g
16138 s%@srcdir@%$srcdir%g
16139 s%@pkgdir@%$pkgdir%g
16140 s%@statedir@%$statedir%g
16141 s%@extra_includes@%$extra_includes%g
16142 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16143 s%@PREFIX@%$PREFIX%g
16144 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16145 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16146 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16147 s%@INFODIR@%$INFODIR%g
16148 s%@infopath@%$infopath%g
16149 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16150 s%@INFOPATH@%$INFOPATH%g
16151 s%@package_path@%$package_path%g
16152 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16153 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16154 s%@lispdir@%$lispdir%g
16155 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16156 s%@LISPDIR@%$LISPDIR%g
16157 s%@moduledir@%$moduledir%g
16158 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16159 s%@MODULEDIR@%$MODULEDIR%g
16160 s%@sitelispdir@%$sitelispdir%g
16161 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16162 s%@SITELISPDIR@%$SITELISPDIR%g
16163 s%@sitemoduledir@%$sitemoduledir%g
16164 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16165 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16166 s%@etcdir@%$etcdir%g
16167 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16168 s%@ETCDIR@%$ETCDIR%g
16169 s%@docdir@%$docdir%g
16170 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16171 s%@DOCDIR@%$DOCDIR%g
16172 s%@archlibdir@%$archlibdir%g
16173 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16174 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16175 s%@bitmapdir@%$bitmapdir%g
16176 s%@extra_objs@%$extra_objs%g
16177 s%@machfile@%$machfile%g
16178 s%@opsysfile@%$opsysfile%g
16179 s%@c_switch_general@%$c_switch_general%g
16180 s%@c_switch_window_system@%$c_switch_window_system%g
16181 s%@c_switch_all@%$c_switch_all%g
16182 s%@ld_switch_general@%$ld_switch_general%g
16183 s%@ld_switch_window_system@%$ld_switch_window_system%g
16184 s%@ld_switch_all@%$ld_switch_all%g
16185 s%@ld_libs_general@%$ld_libs_general%g
16186 s%@ld_libs_window_system@%$ld_libs_window_system%g
16187 s%@ld_libs_all@%$ld_libs_all%g
16188 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16189 s%@native_sound_lib@%$native_sound_lib%g
16190 s%@sound_cflags@%$sound_cflags%g
16191 s%@dynodump_arch@%$dynodump_arch%g
16192 s%@XEMACS_CC@%$XEMACS_CC%g
16193 s%@internal_makefile_list@%$internal_makefile_list%g
16194
16195 CEOF
16196 EOF
16197
16198 cat >> $CONFIG_STATUS <<\EOF
16199
16200 # Split the substitutions into bite-sized pieces for seds with
16201 # small command number limits, like on Digital OSF/1 and HP-UX.
16202 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16203 ac_file=1 # Number of current file.
16204 ac_beg=1 # First line for current file.
16205 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16206 ac_more_lines=:
16207 ac_sed_cmds=""
16208 while $ac_more_lines; do
16209   if test $ac_beg -gt 1; then
16210     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16211   else
16212     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16213   fi
16214   if test ! -s conftest.s$ac_file; then
16215     ac_more_lines=false
16216     rm -f conftest.s$ac_file
16217   else
16218     if test -z "$ac_sed_cmds"; then
16219       ac_sed_cmds="sed -f conftest.s$ac_file"
16220     else
16221       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16222     fi
16223     ac_file=`expr $ac_file + 1`
16224     ac_beg=$ac_end
16225     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16226   fi
16227 done
16228 if test -z "$ac_sed_cmds"; then
16229   ac_sed_cmds=cat
16230 fi
16231 EOF
16232
16233 cat >> $CONFIG_STATUS <<EOF
16234
16235 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16236 EOF
16237 cat >> $CONFIG_STATUS <<\EOF
16238 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16239   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16240   case "$ac_file" in
16241   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16242        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16243   *) ac_file_in="${ac_file}.in" ;;
16244   esac
16245
16246   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16247
16248   # Remove last slash and all that follows it.  Not all systems have dirname.
16249   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16250   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16251     # The file is in a subdirectory.
16252     test ! -d "$ac_dir" && mkdir "$ac_dir"
16253     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16254     # A "../" for each directory in $ac_dir_suffix.
16255     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16256   else
16257     ac_dir_suffix= ac_dots=
16258   fi
16259
16260   case "$ac_given_srcdir" in
16261   .)  srcdir=.
16262       if test -z "$ac_dots"; then top_srcdir=.
16263       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16264   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16265   *) # Relative path.
16266     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16267     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16268   esac
16269
16270   case "$ac_given_INSTALL" in
16271   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16272   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16273   esac
16274
16275   echo creating "$ac_file"
16276   rm -f "$ac_file"
16277   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16278   case "$ac_file" in
16279   *Makefile*) ac_comsub="1i\\
16280 # $configure_input" ;;
16281   *) ac_comsub= ;;
16282   esac
16283
16284   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16285   sed -e "$ac_comsub
16286 s%@configure_input@%$configure_input%g
16287 s%@srcdir@%$srcdir%g
16288 s%@top_srcdir@%$top_srcdir%g
16289 s%@INSTALL@%$INSTALL%g
16290 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16291 fi; done
16292 rm -f conftest.s*
16293
16294 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16295 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16296 #
16297 # ac_d sets the value in "#define NAME VALUE" lines.
16298 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16299 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16300 ac_dC='\3'
16301 ac_dD='%g'
16302 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16303 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16304 ac_uB='\([      ]\)%\1#\2define\3'
16305 ac_uC=' '
16306 ac_uD='\4%g'
16307 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16308 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16309 ac_eB='$%\1#\2define\3'
16310 ac_eC=' '
16311 ac_eD='%g'
16312
16313 if test "${CONFIG_HEADERS+set}" != set; then
16314 EOF
16315 cat >> $CONFIG_STATUS <<EOF
16316   CONFIG_HEADERS="src/config.h lwlib/config.h"
16317 EOF
16318 cat >> $CONFIG_STATUS <<\EOF
16319 fi
16320 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16321   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16322   case "$ac_file" in
16323   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16324        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16325   *) ac_file_in="${ac_file}.in" ;;
16326   esac
16327
16328   echo creating $ac_file
16329
16330   rm -f conftest.frag conftest.in conftest.out
16331   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16332   cat $ac_file_inputs > conftest.in
16333
16334 EOF
16335
16336 # Transform confdefs.h into a sed script conftest.vals that substitutes
16337 # the proper values into config.h.in to produce config.h.  And first:
16338 # Protect against being on the right side of a sed subst in config.status.
16339 # Protect against being in an unquoted here document in config.status.
16340 rm -f conftest.vals
16341 cat > conftest.hdr <<\EOF
16342 s/[\\&%]/\\&/g
16343 s%[\\$`]%\\&%g
16344 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16345 s%ac_d%ac_u%gp
16346 s%ac_u%ac_e%gp
16347 EOF
16348 sed -n -f conftest.hdr confdefs.h > conftest.vals
16349 rm -f conftest.hdr
16350
16351 # This sed command replaces #undef with comments.  This is necessary, for
16352 # example, in the case of _POSIX_SOURCE, which is predefined and required
16353 # on some systems where configure will not decide to define it.
16354 cat >> conftest.vals <<\EOF
16355 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16356 EOF
16357
16358 # Break up conftest.vals because some shells have a limit on
16359 # the size of here documents, and old seds have small limits too.
16360
16361 rm -f conftest.tail
16362 while :
16363 do
16364   ac_lines=`grep -c . conftest.vals`
16365   # grep -c gives empty output for an empty file on some AIX systems.
16366   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16367   # Write a limited-size here document to conftest.frag.
16368   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16369   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16370   echo 'CEOF
16371   sed -f conftest.frag conftest.in > conftest.out
16372   rm -f conftest.in
16373   mv conftest.out conftest.in
16374 ' >> $CONFIG_STATUS
16375   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16376   rm -f conftest.vals
16377   mv conftest.tail conftest.vals
16378 done
16379 rm -f conftest.vals
16380
16381 cat >> $CONFIG_STATUS <<\EOF
16382   rm -f conftest.frag conftest.h
16383   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16384   cat conftest.in >> conftest.h
16385   rm -f conftest.in
16386   if cmp -s $ac_file conftest.h 2>/dev/null; then
16387     echo "$ac_file is unchanged"
16388     rm -f conftest.h
16389   else
16390     # Remove last slash and all that follows it.  Not all systems have dirname.
16391       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16392       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16393       # The file is in a subdirectory.
16394       test ! -d "$ac_dir" && mkdir "$ac_dir"
16395     fi
16396     rm -f $ac_file
16397     mv conftest.h $ac_file
16398   fi
16399 fi; done
16400
16401 EOF
16402 cat >> $CONFIG_STATUS <<EOF
16403 CPP="$CPP"
16404  top_srcdir="$srcdir"
16405  MAKE_SUBDIR="$MAKE_SUBDIR"
16406
16407 EOF
16408 cat >> $CONFIG_STATUS <<\EOF
16409 for dir in . $MAKE_SUBDIR; do
16410   (
16411     cd $dir
16412     rm -f junk.c
16413     < Makefile.in \
16414       sed -e '/^# Generated/d' \
16415           -e 's%/\*\*/#.*%%' \
16416           -e 's/^ *# */#/' \
16417           -e '/^##/d' \
16418           -e '/^#/ {
16419 p
16420 d
16421 }'        \
16422           -e '/./ {
16423 s/\([\"]\)/\\\1/g
16424 s/^/"/
16425 s/$/"/
16426 }'  > junk.c;
16427
16428
16429
16430     echo creating $dir/Makefile
16431 $CPP -I. -I${top_srcdir}/src  junk.c \
16432   | sed -e 's/^\#.*//'          \
16433         -e 's/^[        ][      ]*$//'\
16434         -e 's/^ /       /'              \
16435         -e '/^[ \f]*$/d' \
16436         -e '/^\"/ {
16437         s/\\\([\"]\)/\1/g
16438         s/^[    ]*\"//
16439         s/\"[   ]*$//
16440 }' > Makefile.new
16441     chmod 444 Makefile.new
16442     mv -f Makefile.new Makefile
16443
16444     echo creating $dir/GNUmakefile
16445 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16446   | sed -e 's/^\#.*//'          \
16447         -e 's/^[        ][      ]*$//'\
16448         -e 's/^ /       /'              \
16449         -e '/^[ \f]*$/d' \
16450         -e '/^\"/ {
16451         s/\\\([\"]\)/\1/g
16452         s/^[    ]*\"//
16453         s/\"[   ]*$//
16454 }' > Makefile.new
16455     chmod 444 Makefile.new
16456     mv -f Makefile.new GNUmakefile
16457
16458     rm -f junk.c
16459   )
16460 done
16461
16462 sed < config.status >> lib-src/config.values \
16463   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16464   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16465   -e 's/^\([^ ]*\) $/\1 ""/' \
16466   -e 's/ 1$/ t/'
16467
16468
16469 exit 0
16470 EOF
16471 chmod +x $CONFIG_STATUS
16472 rm -fr confdefs* $ac_clean_files
16473 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1