2af3f3603b726ebf21860a835e66c037162e644f
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 use_regex_malloc='yes'
252 with_esd_sound='no'
253 native_sound_lib=''
254 with_gtk='no'
255 with_gnome='no'
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261 pdump=''
262 with_dragndrop="no"
263 with_ipv6_cname="no"
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_gtk        | \
317         with_gnome      | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_utf_2000   | \
344         with_chise      | \
345         with_text_coding| \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_postgresql | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         with_netinstall | \
361         with_ipv6_cname | \
362         external_widget | \
363         verbose         | \
364         extra_verbose   | \
365         usage_tracking  | \
366         use_union_type  | \
367         pdump           | \
368         debug           | \
369         use_assertions  | \
370         use_regex_malloc | \
371         memory_usage_stats | \
372         with_clash_detection | \
373         with_modules    | \
374         quick_build )
375                   case "$val" in
376             y | ye | yes )      val=yes ;;
377             n | no )            val=no  ;;
378             * ) (echo "$progname: Usage error:"
379 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
380 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
381           esac
382           eval "$opt=\"$val\"" ;;
383
384
385                         srcdir          | \
386         compiler        | \
387         cflags          | \
388         cpp             | \
389         cppflags        | \
390         libs            | \
391         ldflags         | \
392         cache_file      | \
393         native_sound_lib| \
394         site_lisp       | \
395         x_includes      | \
396         x_libraries     | \
397         site_includes   | \
398         site_libraries  | \
399         site_prefixes   | \
400         site_runtime_libraries )
401                   if test "$valomitted" = "yes" ; then
402                     if test "$#" = 0 ; then
403               (echo "$progname: Usage error:"
404 echo " " "The \`--$optname' option requires a value."
405 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
406             fi
407             val="$1"; shift
408           fi
409           eval "$opt=\"$val\""
410         ;;
411
412                 rel_alloc | \
413         with_dlmalloc | \
414         with_debug_malloc  | use_debug_malloc | \
415         with_system_malloc | use_system_malloc )
416           case "$val" in
417             y | ye | yes )      val=yes ;;
418             n | no )            val=no  ;;
419             d | de | def | defa | defau | defaul | default ) val=default ;;
420             * ) (echo "$progname: Usage error:"
421 echo " " "The \`--$optname' option requires one of these values:
422   \`yes', \`no', or \`default'."
423 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
424           esac
425           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
426           eval "$opt=\"$val\""
427         ;;
428
429                 "with_database" )
430           with_database_berkdb=no
431           with_database_dbm=no
432           with_database_gdbm=no
433           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
434             case "$x" in
435               no ) ;;
436               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
437               d | db | dbm )                               with_database_dbm=yes    ;;
438               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
439               * ) (echo "$progname: Usage error:"
440 echo " " "The \`--$optname' option value
441   must be either \`no' or a comma-separated list
442   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
443 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
444             esac
445           done
446           if test "$with_database_dbm"  = "yes" -a \
447                   "$with_database_gdbm" = "yes"; then
448           (echo "$progname: Usage error:"
449 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
450   with the \`--$optname' option."
451 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
452           fi
453         ;;
454
455                 "with_sound" )
456                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
457             case "$x" in
458                       n | no | non | none ) new_sdefault=no ;;
459               a | al | all | both ) new_sdefault=yes ;;
460
461               native )       with_native_sound=yes ;;
462               nonative )     with_native_sound=no ;;
463
464               nas )          with_nas_sound=yes ;;
465               nonas )        with_nas_sound=no ;;
466
467               esd )          with_esd_sound=yes ;;
468               noesd )        with_esd_sound=no ;;
469
470               * ) bogus_sound=yes ;;
471             esac
472             if test "$bogus_sound" -o \
473                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
474                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
475                 (echo "$progname: Usage error:"
476 echo " " "Valid types for the \`--$optname' option are:
477   $types.
478 Option \`all' or \`none' must be first in the list.
479 The default is to autodetect native and NAS sound support."
480 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
481             elif test -n "$new_sdefault" ; then
482                 with_native_sound=$new_sdefault
483                 with_nas_sound=$new_sdefault
484                 with_esd_sound=$new_sdefault
485                 new_sdefault=   # reset this
486             fi
487             sound_notfirst=true
488           done
489         ;;
490
491                         "with_athena" )
492           case "$val" in
493             xa | xaw )                    val=xaw    ;;
494             3 | 3d | xaw3d )              val=3d     ;;
495                         ne | nex | next | naxtaw)     val=next   ;;
496                         9 | 95 | xaw95 )              val=95     ;;
497             xp | xpm | xawxpm )           val=xpm    ;;
498             * ) (echo "$progname: Usage error:"
499 echo " " "The \`--$optname' option must have one of these values:
500   \`xaw', \`3d', \`next', \`95', or \`xpm'."
501 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
502           esac
503           eval "$opt=\"$val\""
504         ;;
505
506                 "with_xim" )
507           case "$val" in
508             y | ye | yes )                val=yes   ;;
509             n | no | non | none )         val=no    ;;
510             x | xl | xli | xlib )         val=xlib  ;;
511             m | mo | mot | moti | motif ) val=motif ;;
512             * ) (echo "$progname: Usage error:"
513 echo " " "The \`--$optname' option must have one of these values:
514   \`motif', \`xlib', \`yes', or \`no'."
515 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
516           esac
517           eval "$opt=\"$val\""
518         ;;
519
520                 "mail_locking" )
521           case "$val" in
522             lockf )     val=lockf ;;
523             flock )     val=flock ;;
524             file | dot ) val=file  ;;
525             locking )   val=locking  ;;
526             * ) (echo "$progname: Usage error:"
527 echo " " "The \`--$optname' option must have one of these values:
528   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
529 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
530           esac
531           eval "$opt=\"$val\""
532         ;;
533
534                 "error_checking" )
535                           
536           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
537             case "$x" in
538                       n | no | non | none ) new_default=no ;;
539               a | al | all )        new_default=yes ;;
540
541               extents )       error_check_extents=yes ;;
542               noextents )     error_check_extents=no ;;
543
544               typecheck )     error_check_typecheck=yes ;;
545               notypecheck )   error_check_typecheck=no ;;
546
547               bufpos )        error_check_bufpos=yes ;;
548               nobufpos )      error_check_bufpos=no ;;
549
550               gc )            error_check_gc=yes ;;
551               nogc )          error_check_gc=no ;;
552
553               malloc )        error_check_malloc=yes ;;
554               nomalloc )      error_check_malloc=no ;;
555
556               byte_code )     error_check_byte_code=yes ;;
557               nobyte_code )   error_check_byte_code=no ;;
558
559               glyphs )     error_check_glyphs=yes ;;
560               noglyphs )   error_check_glyphs=no ;;
561
562               * ) bogus_error_check=yes ;;
563             esac
564             if test "$bogus_error_check" -o \
565                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
566                 if test "$error_check_default" = yes ; then
567                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
568                 else
569                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
570                 fi
571                 (echo "$progname: Usage error:"
572 echo " " "Valid types for the \`--$optname' option are:
573   $types."
574 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
575             elif test -n "$new_default" ; then
576                 error_check_extents=$new_default
577                 error_check_typecheck=$new_default
578                 error_check_bufpos=$new_default
579                 error_check_gc=$new_default
580                 error_check_malloc=$new_default
581                 error_check_byte_code=$new_default
582                 error_check_glyphs=$new_default
583                 new_default=    # reset this
584             fi
585             echeck_notfirst=true
586           done
587         ;;
588
589                                 
590                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
591         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
592         archlibdir | docdir | package_path | moduledir )
593                    if test "$valomitted" = "yes"; then
594              if test "$#" = 0; then
595                  (echo "$progname: Usage error:"
596 echo " " "The \`--$optname' option requires a value."
597 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
598              fi
599              val="$1"; shift
600            fi
601            eval "$opt=\"$val\""
602
603                            case "$opt" in
604                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining EXEC_PREFIX_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define EXEC_PREFIX_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining LISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define LISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining SITELISPDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define SITELISPDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining MODULEDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define MODULEDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining ETCDIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define ETCDIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFODIR_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFODIR_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining INFOPATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define INFOPATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining PACKAGE_PATH_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define PACKAGE_PATH_USER_DEFINED 1
665 EOF
666 }
667  ;;
668              datadir )
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining INFODIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define INFODIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining LISPDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define LISPDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining MODULEDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define MODULEDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining ETCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define ETCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining DOCDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define DOCDIR_USER_DEFINED 1
706 EOF
707 }
708
709                 { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining ARCHLIBDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define ARCHLIBDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining DOCDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define DOCDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
726     Defining ARCHLIBDIR_USER_DEFINED
727 EOF
728 cat >> confdefs.h <<\EOF
729 #define ARCHLIBDIR_USER_DEFINED 1
730 EOF
731 }
732  ;;
733            esac
734         ;;
735
736                 "no_create" ) ;;
737
738                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
739
740                 "with_menubars"   | \
741         "with_scrollbars" | \
742         "with_dialogs"    | \
743         "with_widgets" )
744           case "$val" in
745             l | lu | luc | luci | lucid )               val=lucid  ;;
746             mo | mot | moti | motif )                   val=motif  ;;
747             a | at | ath | athe | athen | athena )      val=athena ;;
748             n | no | non | none )                       val=no     ;;
749             y | ye | yes )                              val=yes    ;;
750                         "")                                             val=yes    ;;
751             g | gt | gtk )                              val=gtk    ;;
752             ms | msw )                                  val=msw    ;;
753             * ) (echo "$progname: Usage error:"
754 echo " " "The \`--$optname' option must have one of these values:
755   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
757           esac
758           eval "$opt=\"$val\""
759         ;;
760
761                 "use_minimal_tagbits" | \
762         "use_indexed_lrecord_implementation" | \
763         "run_in_place"  | \
764         "const_is_losing" | \
765         "with_gnu_make" )
766           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
767         ;;
768
769                 * ) (echo "$progname: Usage error:"
770 echo " " "Unrecognized option: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773       esac
774     ;;
775
776         *-*-*) configuration="$arg" ;;
777
778         *) (echo "$progname: Usage error:"
779 echo " " "Unrecognized argument: $arg"
780 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
781
782   esac
783 done
784
785
786 test -n "$cpp"      && CPP="$cpp"
787 test -n "$cppflags" && CPPFLAGS="$cppflags"
788 test -n "$libs"     && LIBS="$libs"
789 test -n "$ldflags"  && LDFLAGS="$ldflags"
790
791 eval set x "$quoted_arguments"; shift
792
793 test "$extra_verbose" = "yes" && verbose=yes
794
795 test -n "$with_x" && with_x11="$with_x"
796
797 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
798   test "$with_system_malloc" = "default" && with_system_malloc=yes
799 fi
800
801
802
803 if test "$with_cde $with_tooltalk" = "yes no"; then
804   (echo "$progname: Usage error:"
805 echo " " "--with-cde requires --with-tooltalk"
806 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
807 elif test "$with_tooltalk" = "no" ; then with_cde=no
808 elif test "$with_cde" = "yes"; then with_tooltalk=yes
809 fi
810
811
812 case "$srcdir" in
813
814     "" )
815     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
816       if test -f "$dir/src/lisp.h" -a \
817               -f "$dir/lisp/version.el" ; then
818         srcdir="$dir"
819         break
820       fi
821     done
822     if test -z "$srcdir" ; then
823       (echo "$progname: Usage error:"
824 echo " " "Neither the current directory nor its parent seem to
825   contain the XEmacs sources.  If you do not want to build XEmacs in its
826   source tree, you should run \`$progname' in the directory in which
827   you wish to build XEmacs, using the \`--srcdir' option to say where the
828   sources may be found."
829 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
830     fi
831   ;;
832
833     * )
834     if test ! -f "$srcdir/src/lisp.h" -o \
835             ! -f "$srcdir/lisp/version.el" ; then
836       (echo "$progname: Usage error:"
837 echo " " "The directory specified with the \`--srcdir' option,
838   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
839   either run the \`$progname' script at the top of the XEmacs source
840   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
841 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
842     fi
843   ;;
844 esac
845
846 if test -z "$configuration"; then
847     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
848   if test -z "$configuration"; then
849     (echo "$progname: Usage error:"
850 echo " " "XEmacs has not been ported to this host type.
851 Try explicitly specifying the CONFIGURATION when rerunning configure."
852 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
853   fi
854 fi
855
856 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
857 echo "configure:858: checking whether ln -s works" >&5
858
859 rm -f conftestdata
860 if ln -s X conftestdata 2>/dev/null
861 then
862   rm -f conftestdata
863   ac_cv_prog_LN_S="ln -s"
864 else
865   ac_cv_prog_LN_S=ln
866 fi
867 LN_S="$ac_cv_prog_LN_S"
868 if test "$ac_cv_prog_LN_S" = "ln -s"; then
869   echo "$ac_t""yes" 1>&6
870 else
871   echo "$ac_t""no" 1>&6
872 fi
873
874
875 for dir in lisp etc man info tests; do
876   if test ! -d "$dir" ; then
877     echo Making symbolic link to "$srcdir/$dir"
878     ${LN_S} "$srcdir/$dir" "$dir"
879   fi
880 done
881
882
883 absolute_pwd="`pwd`";
884 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
885 then blddir="$PWD"
886 else blddir="$absolute_pwd"; if test -d "/net"; then
887   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888   blddir=`echo "$blddir" | \
889    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi
891 fi
892
893
894 case "$srcdir" in
895   /* ) ;;
896   .  ) srcdir="$blddir" ;;
897   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
898   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
899   srcdir=`echo "$srcdir" | \
900    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
901 fi ;;
902 esac
903
904 if test `pwd` != `sh -c cd $srcdir && pwd`  \
905    && test -f "$srcdir/src/config.h"; then
906   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
907    echo "   as a build directory right now; it has been configured in its own"
908    echo "   right.  To configure in another directory as well, you MUST"
909    echo "   use GNU make.  If you do not have GNU make, then you must"
910    echo "   now do \`make distclean' in $srcdir,"
911    echo "   and then run $progname again.") >&2
912   extrasub='/^VPATH[     ]*=/c\
913 vpath %.c $(srcdir)\
914 vpath %.h $(srcdir)\
915 vpath %.y $(srcdir)\
916 vpath %.l $(srcdir)\
917 vpath %.s $(srcdir)\
918 vpath %.in $(srcdir)'
919 fi
920
921 . "$srcdir/version.sh" || exit 1;
922 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
923 : "${extra_verbose=$beta}"
924 version="${emacs_major_version}.${emacs_minor_version}"
925 { test "$extra_verbose" = "yes" && cat << EOF
926     Defining EMACS_MAJOR_VERSION = $emacs_major_version
927 EOF
928 cat >> confdefs.h <<EOF
929 #define EMACS_MAJOR_VERSION $emacs_major_version
930 EOF
931 }
932
933 { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_MINOR_VERSION = $emacs_minor_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_MINOR_VERSION $emacs_minor_version
938 EOF
939 }
940
941 if test -n "$emacs_beta_version" ; then
942   if test "$beta" = "yes"; then
943         version="${version}-b${emacs_beta_version}"
944         { test "$extra_verbose" = "yes" && cat << EOF
945     Defining EMACS_BETA_VERSION = $emacs_beta_version
946 EOF
947 cat >> confdefs.h <<EOF
948 #define EMACS_BETA_VERSION $emacs_beta_version
949 EOF
950 }
951
952   else
953         version="${version}.${emacs_beta_version}"
954         { test "$extra_verbose" = "yes" && cat << EOF
955     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
956 EOF
957 cat >> confdefs.h <<EOF
958 #define EMACS_PATCH_LEVEL $emacs_beta_version
959 EOF
960 }
961
962   fi
963 fi
964 { test "$extra_verbose" = "yes" && cat << EOF
965     Defining XEMACS_CODENAME = "$xemacs_codename"
966 EOF
967 cat >> confdefs.h <<EOF
968 #define XEMACS_CODENAME "$xemacs_codename"
969 EOF
970 }
971
972 { test "$extra_verbose" = "yes" && cat << EOF
973     Defining EMACS_VERSION = "$version"
974 EOF
975 cat >> confdefs.h <<EOF
976 #define EMACS_VERSION "$version"
977 EOF
978 }
979
980
981 if test "$with_infodock" = "yes"; then
982   if test ! -f ../../ID-INSTALL; then
983     echo "Cannot build InfoDock without InfoDock sources"
984     with_infodock=no
985   fi
986 fi
987
988 if test "$with_infodock" = "yes"; then
989       { test "$extra_verbose" = "yes" && cat << EOF
990     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
991 EOF
992 cat >> confdefs.h <<EOF
993 #define INFODOCK_MAJOR_VERSION $infodock_major_version
994 EOF
995 }
996
997   { test "$extra_verbose" = "yes" && cat << EOF
998     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
999 EOF
1000 cat >> confdefs.h <<EOF
1001 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1002 EOF
1003 }
1004
1005   { test "$extra_verbose" = "yes" && cat << EOF
1006     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1007 EOF
1008 cat >> confdefs.h <<EOF
1009 #define INFODOCK_BUILD_VERSION $infodock_build_version
1010 EOF
1011 }
1012
1013   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1014   PROGNAME=infodock
1015   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1016 else
1017   PROGNAME=xemacs
1018 fi
1019
1020 { test "$extra_verbose" = "yes" && cat << EOF
1021     Defining EMACS_PROGNAME = "$PROGNAME"
1022 EOF
1023 cat >> confdefs.h <<EOF
1024 #define EMACS_PROGNAME "$PROGNAME"
1025 EOF
1026 }
1027
1028
1029 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1030 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_EXTENTS
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_EXTENTS 1
1035 EOF
1036 }
1037
1038 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_TYPECHECK
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_TYPECHECK 1
1043 EOF
1044 }
1045
1046 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_BUFPOS
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_BUFPOS 1
1051 EOF
1052 }
1053
1054 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_GC
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_GC 1
1059 EOF
1060 }
1061
1062 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining ERROR_CHECK_MALLOC
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define ERROR_CHECK_MALLOC 1
1067 EOF
1068 }
1069
1070 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1071     Defining ERROR_CHECK_BYTE_CODE
1072 EOF
1073 cat >> confdefs.h <<\EOF
1074 #define ERROR_CHECK_BYTE_CODE 1
1075 EOF
1076 }
1077
1078 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining ERROR_CHECK_GLYPHS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define ERROR_CHECK_GLYPHS 1
1083 EOF
1084 }
1085
1086 if test "${debug:=$beta}" = "yes"; then
1087   use_assertions=yes memory_usage_stats=yes
1088   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"debug.o\""
1090  fi
1091   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1092    echo "    xemacs will be linked with \"tests.o\""
1093  fi
1094   { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining DEBUG_XEMACS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define DEBUG_XEMACS 1
1099 EOF
1100 }
1101
1102 fi
1103 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1104     Defining USE_ASSERTIONS
1105 EOF
1106 cat >> confdefs.h <<\EOF
1107 #define USE_ASSERTIONS 1
1108 EOF
1109 }
1110
1111 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1112     Defining MEMORY_USAGE_STATS
1113 EOF
1114 cat >> confdefs.h <<\EOF
1115 #define MEMORY_USAGE_STATS 1
1116 EOF
1117 }
1118
1119
1120
1121 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1122 echo "configure:1123: checking "host system type"" >&5
1123 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1124 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1125 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1126 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1127 echo "$ac_t""$configuration" 1>&6
1128
1129
1130
1131
1132
1133 machine='' opsys=''
1134
1135 case "$canonical" in
1136   sparc-*-*        ) machine=sparc ;;
1137   alpha*-*-*       ) machine=alpha ;;
1138   vax-*-*          ) machine=vax ;;
1139   mips-dec-*       ) machine=pmax ;;
1140   mips-sgi-irix6*  ) machine=iris6d ;;
1141   mips-sgi-*       ) machine=iris4d ;;
1142   mips*-linux      ) machine=mips ;;
1143   romp-ibm-*       ) machine=ibmrt ;;
1144   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1145   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1146   powerpc*-*       ) machine=powerpc ;;
1147   hppa-*-*         ) machine=hp800 ;;
1148   m88k-dg-*        ) machine=aviion ;;
1149   m68*-sony-*      ) machine=news ;;
1150   mips-sony-*      ) machine=news-risc ;;
1151   clipper-*        ) machine=clipper ;;
1152   arm*             ) machine=arm ;;
1153   ns32k-*          ) machine=ns32000 ;;
1154 esac
1155
1156 case "$canonical" in
1157   *-*-linux*    ) opsys=linux ;;
1158   *-*-netbsd*   ) opsys=netbsd ;;
1159   *-*-openbsd*  ) opsys=openbsd ;;
1160   *-*-nextstep* ) opsys=nextstep ;;
1161   *-*-vms       ) opsys=vms ;;
1162
1163     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1164   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1165   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1166   *-dec-osf3*                ) opsys=decosf3-1 ;;
1167   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1168
1169     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1170   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1171   *-*-ultrix* )         opsys=ultrix4-3 ;;
1172
1173     *-*-aix3.1*     ) opsys=aix3-1   ;;
1174   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1175   *-*-aix3*       ) opsys=aix3-2   ;;
1176   *-*-aix4.0*     ) opsys=aix4     ;;
1177   *-*-aix4.1*     ) opsys=aix4-1   ;;
1178   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1179
1180     *-gnu* )                    opsys=gnu    ;;
1181   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1182   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1183   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1184   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1185   *-*-aos*   )                  opsys=bsd4-3 ;;
1186   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1187   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1188   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1189   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1190   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1191   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1192         if test -z "$NON_GNU_CPP" ; then
1193           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1194             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1195           done
1196         fi
1197         opsys=usg5-4-2 ;;
1198     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1199     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1200 esac
1201
1202 case "$canonical" in
1203
1204     *-*-netbsd* )
1205     case "$canonical" in
1206       i[3-9]86-*-netbsd*) machine=intel386 ;;
1207       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1208                                             machine=hp9000s300 ;;
1209       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1210       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1211     esac
1212   ;;
1213
1214     *-*-openbsd* )
1215     case "${canonical}" in
1216       i386-*-openbsd*)          machine=intel386 ;;
1217       m68k-*-openbsd*)          machine=hp9000s300 ;;
1218       mipsel-*-openbsd*)        machine=pmax ;;
1219      esac
1220    ;;
1221
1222     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1223   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1224
1225     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1226   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1227
1228     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1229
1230     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1231
1232     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1233
1234     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1235
1236     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1237
1238     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1239   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1240   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1241
1242   
1243     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1244
1245     *-convex-bsd* | *-convex-convexos* )
1246     machine=convex opsys=bsd4-3
1247     NON_GNU_CPP="cc -E -P"
1248   ;;
1249
1250     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1251
1252     *-*-darwin*)
1253     opsys=darwin
1254     RANLIB="ranlib -c"     ;;
1255
1256     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1257   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1258   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1259   m88k-dg-dgux*                           ) opsys=dgux     ;;
1260
1261     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1262   m88k-motorola-sysv4* )
1263                     machine=delta88k opsys=usg5-4-2
1264   ;;
1265   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1266
1267     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1268   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1269
1270     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1271
1272     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1273   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1274   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1275
1276       m88k-harris-cxux* )
1277         case "`uname -r`" in
1278        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1279        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1280     esac
1281     NON_GNU_CPP="/lib/cpp"
1282   ;;
1283     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1284     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1285
1286     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1287
1288     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1289
1290     *-hp-hpux* )
1291         case "$canonical" in
1292       m68*  ) machine=hp9000s300 ;;
1293       hppa* ) machine=hp800      ;;
1294     esac
1295
1296     case "$canonical" in
1297       *-hp-hpux7*  )  opsys=hpux   ;;
1298       *-hp-hpux8*  )  opsys=hpux8  ;;
1299       *-hp-hpux9*  )  opsys=hpux9  ;;
1300       *-hp-hpux10* )  opsys=hpux10 ;;
1301       *-hp-hpux11* )  opsys=hpux11 ;;
1302       *            )  opsys=hpux   ;;
1303     esac
1304
1305         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1306    echo "    xemacs will be linked with \"strcat.o\""
1307  fi ;; esac
1308
1309     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1310         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1311     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1312
1313     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1314   ;;
1315
1316     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1317   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1318
1319     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1320   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1321   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1322   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1323   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1324   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1325
1326     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1327   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1328
1329     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1330
1331     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1332
1333     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1334
1335     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1336
1337       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1338
1339     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1340
1341     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1342
1343     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1344
1345     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1346
1347         mips-mips-usg* ) machine=mips4 ;;
1348   mips-mips-riscos4 )
1349     machine=mips4
1350     NON_GNU_CC="cc -systype bsd43"
1351     NON_GNU_CPP="cc -systype bsd43 -E"
1352     case "$canonical" in
1353       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1354       mips-mips-riscos5* ) opsys=riscos5 ;;
1355     esac
1356   ;;
1357   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1358   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1359
1360     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1361
1362     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1363
1364     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1365   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1366
1367     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1368
1369     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1370
1371     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1372
1373     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1374
1375     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1376   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1377
1378     mips-siemens-sysv* | mips-sni-sysv*)
1379     machine=mips-siemens opsys=usg5-4
1380     NON_GNU_CC=/usr/ccs/bin/cc
1381     NON_GNU_CPP=/usr/ccs/lib/cpp
1382   ;;
1383
1384     mips-nec-sysv*)
1385     machine=mips-nec
1386     NON_GNU_CC=/usr/ccs/bin/cc
1387     NON_GNU_CPP=/usr/ccs/lib/cpp
1388   ;;
1389
1390       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1391   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1392     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1393   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1394   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1395   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1396   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1397   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1398   mips-sgi-irix*      ) opsys=irix5-0 ;;
1399
1400     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1401   *-sony-news* ) opsys=newsos5 ;;
1402
1403     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1404
1405     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1406         case "$canonical" in
1407       m68*-sunos1* )             machine=sun1     ;;
1408       m68*-sunos2* )             machine=sun2     ;;
1409       m68* )                     machine=sun3     ;;
1410       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1411       i*86-*-* )                 machine=intel386 ;;
1412       rs6000* )                  machine=rs6000   ;;
1413     esac
1414
1415         case "$canonical" in *-sunos5*)
1416       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1417     esac
1418
1419                     case "$canonical" in
1420       *-sunos4* )
1421         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1422         : ;;
1423       *-solaris2* )
1424         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1425         RANLIB=':' ;;
1426     esac
1427
1428     case "$canonical" in
1429       *-solaris*          )
1430         opsys=sol2
1431         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1432         { test "$extra_verbose" = "yes" && cat << EOF
1433     Defining OS_RELEASE = $os_release
1434 EOF
1435 cat >> confdefs.h <<EOF
1436 #define OS_RELEASE $os_release
1437 EOF
1438 }
1439  ;;
1440
1441             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1442       *-sunos4.0*         ) opsys=sunos4-0      ;;
1443       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1444       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1445       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1446       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1447       *-mach*             ) opsys=mach-bsd4-3   ;;
1448       *                   ) opsys=bsd4-2        ;;
1449     esac
1450
1451     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1452
1453         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1454   ;;
1455
1456     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1457
1458     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1459   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1460
1461     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1462
1463     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1464
1465     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1466       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1467
1468     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1469
1470     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1471
1472     vax-dec-* )
1473     case "$canonical" in
1474       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1475       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1476       *-mach* )                         opsys=mach-bsd4-3 ;;
1477     esac
1478   ;;
1479
1480     ns16k-whitechapel-* ) machine=mg1 ;;
1481
1482     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1483
1484     i[3-9]86-*-* )
1485     machine=intel386
1486     case "$canonical" in
1487       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1488       *-isc2.2* )               opsys=isc2-2 ;;
1489       *-isc4.0* )               opsys=isc4-0 ;;
1490       *-isc4.* )                opsys=isc4-1
1491                                 GCC_TEST_OPTIONS=-posix
1492                                 NON_GCC_TEST_OPTIONS=-Xp
1493                                 ;;
1494       *-isc* )                  opsys=isc3-0 ;;
1495       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1496       *-esix* )                 opsys=esix ;;
1497       *-mach* )                 opsys=mach-bsd4-3 ;;
1498       *-xenix* )                opsys=xenix ;;
1499       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1500       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1501       *-bsdi4* )                opsys=bsdos4 ;;
1502       *-bsdi3* )                opsys=bsdos3 ;;
1503       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1504       *-bsdi2* )                opsys=bsdos2 ;;
1505       *-sco3.2v5* )             opsys=sco5 ;;
1506       *-sysv5* )                opsys=sco7 ;;
1507       *-386bsd* )               opsys=386bsd ;;
1508       *-freebsd* )              opsys=freebsd ;;
1509       *-nextstep* )             opsys=nextstep ;;
1510       *-pc-cygwin* )            opsys=cygwin32 ;;
1511       *-pc-mingw* )             opsys=mingw32 ;
1512                                 test -z "$with_tty" && with_tty="no";;
1513           esac
1514   ;;
1515
1516     m68k-*-linux* ) machine=m68k opsys=linux ;;
1517
1518 esac
1519
1520 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1521
1522 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1523
1524 if test -r "${srcdir}/src/m/${machine}.h"; then
1525   machfile="m/${machine}.h"
1526   { test "$extra_verbose" = "yes" && cat << EOF
1527     Defining config_machfile = "$machfile"
1528 EOF
1529 cat >> confdefs.h <<EOF
1530 #define config_machfile "$machfile"
1531 EOF
1532 }
1533
1534 else
1535   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1536   echo "Using configure-time autodetection only."
1537 fi
1538
1539 if test -r "${srcdir}/src/s/${opsys}.h"; then
1540   opsysfile="s/${opsys}.h"
1541   { test "$extra_verbose" = "yes" && cat << EOF
1542     Defining config_opsysfile = "$opsysfile"
1543 EOF
1544 cat >> confdefs.h <<EOF
1545 #define config_opsysfile "$opsysfile"
1546 EOF
1547 }
1548
1549 else
1550   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1551   echo "Using configure-time autodetection only."
1552 fi
1553
1554
1555 if test -z "$pdump"; then
1556   case "$opsys" in
1557     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1558   esac
1559 fi
1560
1561 if test -z "$dynamic"; then
1562   case "$opsys" in
1563     hpux* | sunos4* ) dynamic=no ;;
1564     *) dynamic=yes ;;
1565   esac
1566 fi
1567 if test "$dynamic" = "yes"; then
1568   case "$opsys" in
1569     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1570     decosf* ) ld_call_shared="-call_shared" ;;
1571     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1572     Defining DLSYM_NEEDS_UNDERSCORE
1573 EOF
1574 cat >> confdefs.h <<\EOF
1575 #define DLSYM_NEEDS_UNDERSCORE 1
1576 EOF
1577 }
1578  ;;
1579   esac
1580 else   case "$opsys" in
1581     sol2 )
1582       echo "Static linking is not supported on Solaris 2."
1583       echo "Rerun configure without specifying --dynamic=no."
1584       exit 1 ;;
1585     linux   ) ld_call_shared="-Bstatic" ;;
1586     decosf* ) ld_call_shared="-non_shared" ;;
1587   esac
1588 fi
1589
1590 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1591
1592 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1593 { test "$extra_verbose" = "yes" && cat << EOF
1594     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1595 EOF
1596 cat >> confdefs.h <<EOF
1597 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1598 EOF
1599 }
1600
1601
1602
1603 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1604 if test "$with_workshop $with_tooltalk" = "yes no"; then
1605   (echo "$progname: Usage error:"
1606 echo " " "--with-workshop requires --with-tooltalk"
1607 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1608 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1609 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1610 fi
1611
1612 if test "$with_workshop" = "yes"; then
1613   { test "$extra_verbose" = "yes" && cat << \EOF
1614     Defining SUNPRO
1615 EOF
1616 cat >> confdefs.h <<\EOF
1617 #define SUNPRO 1
1618 EOF
1619 }
1620
1621   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1622    echo "    xemacs will be linked with \"sunpro.o\""
1623  fi
1624 fi
1625
1626 if test "$with_clash_detection" != "no"; then
1627   { test "$extra_verbose" = "yes" && cat << \EOF
1628     Defining CLASH_DETECTION
1629 EOF
1630 cat >> confdefs.h <<\EOF
1631 #define CLASH_DETECTION 1
1632 EOF
1633 }
1634
1635   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1636    echo "    xemacs will be linked with \"filelock.o\""
1637  fi
1638 fi
1639
1640 test -n "$compiler" && CC="$compiler"
1641 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1642 fi
1643
1644 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1645 if test "${CFLAGS-unset}" != unset
1646   then cflags_specified=yes;
1647   else cflags_specified=no;
1648 fi
1649
1650 xe_save_CFLAGS="$CFLAGS"
1651
1652 # Extract the first word of "gcc", so it can be a program name with args.
1653 set dummy gcc; ac_word=$2
1654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_word" >&5
1656
1657 if test -n "$CC"; then
1658   ac_cv_prog_CC="$CC" # Let the user override the test.
1659 else
1660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1661   ac_dummy="$PATH"
1662   for ac_dir in $ac_dummy; do
1663     test -z "$ac_dir" && ac_dir=.
1664     if test -f $ac_dir/$ac_word; then
1665       ac_cv_prog_CC="gcc"
1666       break
1667     fi
1668   done
1669   IFS="$ac_save_ifs"
1670 fi
1671 CC="$ac_cv_prog_CC"
1672 if test -n "$CC"; then
1673   echo "$ac_t""$CC" 1>&6
1674 else
1675   echo "$ac_t""no" 1>&6
1676 fi
1677
1678 if test -z "$CC"; then
1679   # Extract the first word of "cc", so it can be a program name with args.
1680 set dummy cc; ac_word=$2
1681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1682 echo "configure:1683: checking for $ac_word" >&5
1683
1684 if test -n "$CC"; then
1685   ac_cv_prog_CC="$CC" # Let the user override the test.
1686 else
1687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1688   ac_prog_rejected=no
1689   ac_dummy="$PATH"
1690   for ac_dir in $ac_dummy; do
1691     test -z "$ac_dir" && ac_dir=.
1692     if test -f $ac_dir/$ac_word; then
1693       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1694         ac_prog_rejected=yes
1695         continue
1696       fi
1697       ac_cv_prog_CC="cc"
1698       break
1699     fi
1700   done
1701   IFS="$ac_save_ifs"
1702 if test $ac_prog_rejected = yes; then
1703   # We found a bogon in the path, so make sure we never use it.
1704   set dummy $ac_cv_prog_CC
1705   shift
1706   if test $# -gt 0; then
1707     # We chose a different compiler from the bogus one.
1708     # However, it has the same basename, so the bogon will be chosen
1709     # first if we set CC to just the basename; use the full file name.
1710     shift
1711     set dummy "$ac_dir/$ac_word" "$@"
1712     shift
1713     ac_cv_prog_CC="$@"
1714   fi
1715 fi
1716 fi
1717 CC="$ac_cv_prog_CC"
1718 if test -n "$CC"; then
1719   echo "$ac_t""$CC" 1>&6
1720 else
1721   echo "$ac_t""no" 1>&6
1722 fi
1723
1724   if test -z "$CC"; then
1725     case "`uname -s`" in
1726     *win32* | *WIN32*)
1727       # Extract the first word of "cl", so it can be a program name with args.
1728 set dummy cl; ac_word=$2
1729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1730 echo "configure:1731: checking for $ac_word" >&5
1731
1732 if test -n "$CC"; then
1733   ac_cv_prog_CC="$CC" # Let the user override the test.
1734 else
1735   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1736   ac_dummy="$PATH"
1737   for ac_dir in $ac_dummy; do
1738     test -z "$ac_dir" && ac_dir=.
1739     if test -f $ac_dir/$ac_word; then
1740       ac_cv_prog_CC="cl"
1741       break
1742     fi
1743   done
1744   IFS="$ac_save_ifs"
1745 fi
1746 CC="$ac_cv_prog_CC"
1747 if test -n "$CC"; then
1748   echo "$ac_t""$CC" 1>&6
1749 else
1750   echo "$ac_t""no" 1>&6
1751 fi
1752  ;;
1753     esac
1754   fi
1755   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1756 fi
1757
1758 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1759 echo "configure:1760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1760
1761 ac_ext=c
1762 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1763 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1764 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'
1765 ac_cpp='$CPP '"$xe_cppflags"
1766 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1767 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1768 cross_compiling=no
1769
1770 cat > conftest.$ac_ext << EOF
1771
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 main(){return(0);}
1776 EOF
1777 if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1778   ac_cv_prog_cc_works=yes
1779   # If we can't run a trivial program, we are probably using a cross compiler.
1780   if (./conftest; exit) 2>/dev/null; then
1781     ac_cv_prog_cc_cross=no
1782   else
1783     ac_cv_prog_cc_cross=yes
1784   fi
1785 else
1786   echo "configure: failed program was:" >&5
1787   cat conftest.$ac_ext >&5
1788   ac_cv_prog_cc_works=no
1789 fi
1790 rm -fr conftest*
1791 ac_ext=c
1792 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1793 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1794 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'
1795 ac_cpp='$CPP '"$xe_cppflags"
1796 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1797 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1798 cross_compiling=no
1799
1800 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1801 if test $ac_cv_prog_cc_works = no; then
1802   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1803 fi
1804 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1805 echo "configure:1806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1806 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1807 cross_compiling=$ac_cv_prog_cc_cross
1808
1809 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1810 echo "configure:1811: checking whether we are using GNU C" >&5
1811
1812 cat > conftest.c <<EOF
1813 #ifdef __GNUC__
1814   yes;
1815 #endif
1816 EOF
1817 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1818   ac_cv_prog_gcc=yes
1819 else
1820   ac_cv_prog_gcc=no
1821 fi
1822
1823 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1824
1825 if test $ac_cv_prog_gcc = yes; then
1826   GCC=yes
1827 else
1828   GCC=
1829 fi
1830
1831 ac_test_CFLAGS="${CFLAGS+set}"
1832 ac_save_CFLAGS="$CFLAGS"
1833 CFLAGS=
1834 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1835 echo "configure:1836: checking whether ${CC-cc} accepts -g" >&5
1836
1837 echo 'void f(){}' > conftest.c
1838 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1839   ac_cv_prog_cc_g=yes
1840 else
1841   ac_cv_prog_cc_g=no
1842 fi
1843 rm -f conftest*
1844
1845
1846 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1847 if test "$ac_test_CFLAGS" = set; then
1848   CFLAGS="$ac_save_CFLAGS"
1849 elif test $ac_cv_prog_cc_g = yes; then
1850   if test "$GCC" = yes; then
1851     CFLAGS="-g -O2"
1852   else
1853     CFLAGS="-g"
1854   fi
1855 else
1856   if test "$GCC" = yes; then
1857     CFLAGS="-O2"
1858   else
1859     CFLAGS=
1860   fi
1861 fi
1862  
1863 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1864   CC=${NON_GNU_CC-cc}
1865   # Extract the first word of "gcc", so it can be a program name with args.
1866 set dummy gcc; ac_word=$2
1867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1868 echo "configure:1869: checking for $ac_word" >&5
1869
1870 if test -n "$CC"; then
1871   ac_cv_prog_CC="$CC" # Let the user override the test.
1872 else
1873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1874   ac_dummy="$PATH"
1875   for ac_dir in $ac_dummy; do
1876     test -z "$ac_dir" && ac_dir=.
1877     if test -f $ac_dir/$ac_word; then
1878       ac_cv_prog_CC="gcc"
1879       break
1880     fi
1881   done
1882   IFS="$ac_save_ifs"
1883 fi
1884 CC="$ac_cv_prog_CC"
1885 if test -n "$CC"; then
1886   echo "$ac_t""$CC" 1>&6
1887 else
1888   echo "$ac_t""no" 1>&6
1889 fi
1890
1891 if test -z "$CC"; then
1892   # Extract the first word of "cc", so it can be a program name with args.
1893 set dummy cc; ac_word=$2
1894 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1895 echo "configure:1896: checking for $ac_word" >&5
1896
1897 if test -n "$CC"; then
1898   ac_cv_prog_CC="$CC" # Let the user override the test.
1899 else
1900   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1901   ac_prog_rejected=no
1902   ac_dummy="$PATH"
1903   for ac_dir in $ac_dummy; do
1904     test -z "$ac_dir" && ac_dir=.
1905     if test -f $ac_dir/$ac_word; then
1906       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1907         ac_prog_rejected=yes
1908         continue
1909       fi
1910       ac_cv_prog_CC="cc"
1911       break
1912     fi
1913   done
1914   IFS="$ac_save_ifs"
1915 if test $ac_prog_rejected = yes; then
1916   # We found a bogon in the path, so make sure we never use it.
1917   set dummy $ac_cv_prog_CC
1918   shift
1919   if test $# -gt 0; then
1920     # We chose a different compiler from the bogus one.
1921     # However, it has the same basename, so the bogon will be chosen
1922     # first if we set CC to just the basename; use the full file name.
1923     shift
1924     set dummy "$ac_dir/$ac_word" "$@"
1925     shift
1926     ac_cv_prog_CC="$@"
1927   fi
1928 fi
1929 fi
1930 CC="$ac_cv_prog_CC"
1931 if test -n "$CC"; then
1932   echo "$ac_t""$CC" 1>&6
1933 else
1934   echo "$ac_t""no" 1>&6
1935 fi
1936
1937   if test -z "$CC"; then
1938     case "`uname -s`" in
1939     *win32* | *WIN32*)
1940       # Extract the first word of "cl", so it can be a program name with args.
1941 set dummy cl; ac_word=$2
1942 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1943 echo "configure:1944: checking for $ac_word" >&5
1944
1945 if test -n "$CC"; then
1946   ac_cv_prog_CC="$CC" # Let the user override the test.
1947 else
1948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1949   ac_dummy="$PATH"
1950   for ac_dir in $ac_dummy; do
1951     test -z "$ac_dir" && ac_dir=.
1952     if test -f $ac_dir/$ac_word; then
1953       ac_cv_prog_CC="cl"
1954       break
1955     fi
1956   done
1957   IFS="$ac_save_ifs"
1958 fi
1959 CC="$ac_cv_prog_CC"
1960 if test -n "$CC"; then
1961   echo "$ac_t""$CC" 1>&6
1962 else
1963   echo "$ac_t""no" 1>&6
1964 fi
1965  ;;
1966     esac
1967   fi
1968   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1969 fi
1970
1971 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1972 echo "configure:1973: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1973
1974 ac_ext=c
1975 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1976 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1977 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'
1978 ac_cpp='$CPP '"$xe_cppflags"
1979 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1980 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1981 cross_compiling=no
1982
1983 cat > conftest.$ac_ext << EOF
1984
1985 #line 1986 "configure"
1986 #include "confdefs.h"
1987
1988 main(){return(0);}
1989 EOF
1990 if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1991   ac_cv_prog_cc_works=yes
1992   # If we can't run a trivial program, we are probably using a cross compiler.
1993   if (./conftest; exit) 2>/dev/null; then
1994     ac_cv_prog_cc_cross=no
1995   else
1996     ac_cv_prog_cc_cross=yes
1997   fi
1998 else
1999   echo "configure: failed program was:" >&5
2000   cat conftest.$ac_ext >&5
2001   ac_cv_prog_cc_works=no
2002 fi
2003 rm -fr conftest*
2004 ac_ext=c
2005 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2006 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2007 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'
2008 ac_cpp='$CPP '"$xe_cppflags"
2009 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2010 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2011 cross_compiling=no
2012
2013 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2014 if test $ac_cv_prog_cc_works = no; then
2015   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2016 fi
2017 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2019 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2020 cross_compiling=$ac_cv_prog_cc_cross
2021
2022 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2023 echo "configure:2024: checking whether we are using GNU C" >&5
2024
2025 cat > conftest.c <<EOF
2026 #ifdef __GNUC__
2027   yes;
2028 #endif
2029 EOF
2030 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2031   ac_cv_prog_gcc=yes
2032 else
2033   ac_cv_prog_gcc=no
2034 fi
2035
2036 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2037
2038 if test $ac_cv_prog_gcc = yes; then
2039   GCC=yes
2040 else
2041   GCC=
2042 fi
2043
2044 ac_test_CFLAGS="${CFLAGS+set}"
2045 ac_save_CFLAGS="$CFLAGS"
2046 CFLAGS=
2047 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2048 echo "configure:2049: checking whether ${CC-cc} accepts -g" >&5
2049
2050 echo 'void f(){}' > conftest.c
2051 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2052   ac_cv_prog_cc_g=yes
2053 else
2054   ac_cv_prog_cc_g=no
2055 fi
2056 rm -f conftest*
2057
2058
2059 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2060 if test "$ac_test_CFLAGS" = set; then
2061   CFLAGS="$ac_save_CFLAGS"
2062 elif test $ac_cv_prog_cc_g = yes; then
2063   if test "$GCC" = yes; then
2064     CFLAGS="-g -O2"
2065   else
2066     CFLAGS="-g"
2067   fi
2068 else
2069   if test "$GCC" = yes; then
2070     CFLAGS="-O2"
2071   else
2072     CFLAGS=
2073   fi
2074 fi
2075
2076 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2077   CC=gcc
2078   # Extract the first word of "gcc", so it can be a program name with args.
2079 set dummy gcc; ac_word=$2
2080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_word" >&5
2082
2083 if test -n "$CC"; then
2084   ac_cv_prog_CC="$CC" # Let the user override the test.
2085 else
2086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2087   ac_dummy="$PATH"
2088   for ac_dir in $ac_dummy; do
2089     test -z "$ac_dir" && ac_dir=.
2090     if test -f $ac_dir/$ac_word; then
2091       ac_cv_prog_CC="gcc"
2092       break
2093     fi
2094   done
2095   IFS="$ac_save_ifs"
2096 fi
2097 CC="$ac_cv_prog_CC"
2098 if test -n "$CC"; then
2099   echo "$ac_t""$CC" 1>&6
2100 else
2101   echo "$ac_t""no" 1>&6
2102 fi
2103
2104 if test -z "$CC"; then
2105   # Extract the first word of "cc", so it can be a program name with args.
2106 set dummy cc; ac_word=$2
2107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2108 echo "configure:2109: checking for $ac_word" >&5
2109
2110 if test -n "$CC"; then
2111   ac_cv_prog_CC="$CC" # Let the user override the test.
2112 else
2113   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2114   ac_prog_rejected=no
2115   ac_dummy="$PATH"
2116   for ac_dir in $ac_dummy; do
2117     test -z "$ac_dir" && ac_dir=.
2118     if test -f $ac_dir/$ac_word; then
2119       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2120         ac_prog_rejected=yes
2121         continue
2122       fi
2123       ac_cv_prog_CC="cc"
2124       break
2125     fi
2126   done
2127   IFS="$ac_save_ifs"
2128 if test $ac_prog_rejected = yes; then
2129   # We found a bogon in the path, so make sure we never use it.
2130   set dummy $ac_cv_prog_CC
2131   shift
2132   if test $# -gt 0; then
2133     # We chose a different compiler from the bogus one.
2134     # However, it has the same basename, so the bogon will be chosen
2135     # first if we set CC to just the basename; use the full file name.
2136     shift
2137     set dummy "$ac_dir/$ac_word" "$@"
2138     shift
2139     ac_cv_prog_CC="$@"
2140   fi
2141 fi
2142 fi
2143 CC="$ac_cv_prog_CC"
2144 if test -n "$CC"; then
2145   echo "$ac_t""$CC" 1>&6
2146 else
2147   echo "$ac_t""no" 1>&6
2148 fi
2149
2150   if test -z "$CC"; then
2151     case "`uname -s`" in
2152     *win32* | *WIN32*)
2153       # Extract the first word of "cl", so it can be a program name with args.
2154 set dummy cl; ac_word=$2
2155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2156 echo "configure:2157: checking for $ac_word" >&5
2157
2158 if test -n "$CC"; then
2159   ac_cv_prog_CC="$CC" # Let the user override the test.
2160 else
2161   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2162   ac_dummy="$PATH"
2163   for ac_dir in $ac_dummy; do
2164     test -z "$ac_dir" && ac_dir=.
2165     if test -f $ac_dir/$ac_word; then
2166       ac_cv_prog_CC="cl"
2167       break
2168     fi
2169   done
2170   IFS="$ac_save_ifs"
2171 fi
2172 CC="$ac_cv_prog_CC"
2173 if test -n "$CC"; then
2174   echo "$ac_t""$CC" 1>&6
2175 else
2176   echo "$ac_t""no" 1>&6
2177 fi
2178  ;;
2179     esac
2180   fi
2181   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2182 fi
2183
2184 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2185 echo "configure:2186: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2186
2187 ac_ext=c
2188 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2189 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2190 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'
2191 ac_cpp='$CPP '"$xe_cppflags"
2192 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2193 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2194 cross_compiling=no
2195
2196 cat > conftest.$ac_ext << EOF
2197
2198 #line 2199 "configure"
2199 #include "confdefs.h"
2200
2201 main(){return(0);}
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204   ac_cv_prog_cc_works=yes
2205   # If we can't run a trivial program, we are probably using a cross compiler.
2206   if (./conftest; exit) 2>/dev/null; then
2207     ac_cv_prog_cc_cross=no
2208   else
2209     ac_cv_prog_cc_cross=yes
2210   fi
2211 else
2212   echo "configure: failed program was:" >&5
2213   cat conftest.$ac_ext >&5
2214   ac_cv_prog_cc_works=no
2215 fi
2216 rm -fr conftest*
2217 ac_ext=c
2218 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2219 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2220 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'
2221 ac_cpp='$CPP '"$xe_cppflags"
2222 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2223 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2224 cross_compiling=no
2225
2226 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2227 if test $ac_cv_prog_cc_works = no; then
2228   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2229 fi
2230 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2231 echo "configure:2232: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2232 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2233 cross_compiling=$ac_cv_prog_cc_cross
2234
2235 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2236 echo "configure:2237: checking whether we are using GNU C" >&5
2237
2238 cat > conftest.c <<EOF
2239 #ifdef __GNUC__
2240   yes;
2241 #endif
2242 EOF
2243 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2244   ac_cv_prog_gcc=yes
2245 else
2246   ac_cv_prog_gcc=no
2247 fi
2248
2249 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2250
2251 if test $ac_cv_prog_gcc = yes; then
2252   GCC=yes
2253 else
2254   GCC=
2255 fi
2256
2257 ac_test_CFLAGS="${CFLAGS+set}"
2258 ac_save_CFLAGS="$CFLAGS"
2259 CFLAGS=
2260 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2261 echo "configure:2262: checking whether ${CC-cc} accepts -g" >&5
2262
2263 echo 'void f(){}' > conftest.c
2264 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2265   ac_cv_prog_cc_g=yes
2266 else
2267   ac_cv_prog_cc_g=no
2268 fi
2269 rm -f conftest*
2270
2271
2272 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2273 if test "$ac_test_CFLAGS" = set; then
2274   CFLAGS="$ac_save_CFLAGS"
2275 elif test $ac_cv_prog_cc_g = yes; then
2276   if test "$GCC" = yes; then
2277     CFLAGS="-g -O2"
2278   else
2279     CFLAGS="-g"
2280   fi
2281 else
2282   if test "$GCC" = yes; then
2283     CFLAGS="-O2"
2284   else
2285     CFLAGS=
2286   fi
2287 fi
2288
2289 fi
2290 CFLAGS="$xe_save_CFLAGS"
2291
2292
2293 test -n "$CPP" -a -d "$CPP" && CPP=
2294
2295 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2296
2297 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2298 echo "configure:2299: checking how to run the C preprocessor" >&5
2299 # On Suns, sometimes $CPP names a directory.
2300 if test -n "$CPP" && test -d "$CPP"; then
2301   CPP=
2302 fi
2303 if test -z "$CPP"; then
2304
2305   # This must be in double quotes, not single quotes, because CPP may get
2306   # substituted into the Makefile and "${CC-cc}" will confuse make.
2307   CPP="${CC-cc} -E"
2308   # On the NeXT, cc -E runs the code through the compiler's parser,
2309   # not just through 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} -E -traditional-cpp"
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="${CC-cc} -nologo -E"
2344   cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347 #include <assert.h>
2348 Syntax Error
2349 EOF
2350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2351 { (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2353 if test -z "$ac_err"; then
2354   :
2355 else
2356   echo "$ac_err" >&5
2357   echo "configure: failed program was:" >&5
2358   cat conftest.$ac_ext >&5
2359   rm -rf conftest*
2360   CPP=/lib/cpp
2361 fi
2362 rm -f conftest*
2363 fi
2364 rm -f conftest*
2365 fi
2366 rm -f conftest*
2367   ac_cv_prog_CPP="$CPP"
2368   CPP="$ac_cv_prog_CPP"
2369 else
2370   ac_cv_prog_CPP="$CPP"
2371 fi
2372 echo "$ac_t""$CPP" 1>&6
2373
2374
2375
2376 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2377 echo "configure:2378: checking for AIX" >&5
2378 cat > conftest.$ac_ext <<EOF
2379 #line 2380 "configure"
2380 #include "confdefs.h"
2381 #ifdef _AIX
2382   yes
2383 #endif
2384
2385 EOF
2386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2387   egrep "yes" >/dev/null 2>&1; then
2388   rm -rf conftest*
2389   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2390     Defining _ALL_SOURCE
2391 EOF
2392 cat >> confdefs.h <<\EOF
2393 #define _ALL_SOURCE 1
2394 EOF
2395 }
2396
2397 else
2398   rm -rf conftest*
2399   echo "$ac_t""no" 1>&6
2400 fi
2401 rm -f conftest*
2402
2403  
2404
2405 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2406 echo "configure:2407: checking for GNU libc" >&5
2407 cat > conftest.$ac_ext <<EOF
2408 #line 2409 "configure"
2409 #include "confdefs.h"
2410 #include <features.h>
2411 int main() {
2412
2413 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2414 #error Not a GNU libc system :-(
2415 ******* ======= ******** &&&&&&&&
2416 #endif
2417
2418 ; return 0; }
2419 EOF
2420 if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2421   rm -rf conftest*
2422   have_glibc=yes
2423 else
2424   echo "configure: failed program was:" >&5
2425   cat conftest.$ac_ext >&5
2426   rm -rf conftest*
2427   have_glibc=no
2428 fi
2429 rm -f conftest*
2430 echo "$ac_t""$have_glibc" 1>&6
2431 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2432     Defining _GNU_SOURCE
2433 EOF
2434 cat >> confdefs.h <<\EOF
2435 #define _GNU_SOURCE 1
2436 EOF
2437 }
2438
2439
2440 case "$opsys" in
2441   sol2)
2442    { test "$extra_verbose" = "yes" && cat << \EOF
2443     Defining __EXTENSIONS__
2444 EOF
2445 cat >> confdefs.h <<\EOF
2446 #define __EXTENSIONS__ 1
2447 EOF
2448 }
2449
2450       if test "$os_release" -ge 55; then
2451      { test "$extra_verbose" = "yes" && cat << \EOF
2452     Defining _XOPEN_SOURCE = 500
2453 EOF
2454 cat >> confdefs.h <<\EOF
2455 #define _XOPEN_SOURCE 500
2456 EOF
2457 }
2458
2459      { test "$extra_verbose" = "yes" && cat << \EOF
2460     Defining _XOPEN_SOURCE_EXTENDED
2461 EOF
2462 cat >> confdefs.h <<\EOF
2463 #define _XOPEN_SOURCE_EXTENDED 1
2464 EOF
2465 }
2466
2467    fi ;;
2468   linux)
2469     { test "$extra_verbose" = "yes" && cat << \EOF
2470     Defining _POSIX_C_SOURCE = 199506L
2471 EOF
2472 cat >> confdefs.h <<\EOF
2473 #define _POSIX_C_SOURCE 199506L
2474 EOF
2475 }
2476
2477     { test "$extra_verbose" = "yes" && cat << \EOF
2478     Defining _XOPEN_SOURCE = 500
2479 EOF
2480 cat >> confdefs.h <<\EOF
2481 #define _XOPEN_SOURCE 500
2482 EOF
2483 }
2484
2485     { test "$extra_verbose" = "yes" && cat << \EOF
2486     Defining _XOPEN_SOURCE_EXTENDED
2487 EOF
2488 cat >> confdefs.h <<\EOF
2489 #define _XOPEN_SOURCE_EXTENDED 1
2490 EOF
2491 }
2492
2493     ;;
2494 esac
2495
2496 cat > conftest.$ac_ext <<EOF
2497 #line 2498 "configure"
2498 #include "confdefs.h"
2499 int main () {
2500 #if defined __SUNPRO_C
2501 return 11;
2502 #elif defined __DECC
2503 return 12;
2504 #elif defined __USLC__ && defined __SCO_VERSION__
2505 return 13;
2506 #else
2507 return 0;
2508 #endif
2509 }
2510 EOF
2511 if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2512 then
2513   :
2514 else
2515   conftest_rc="$?"
2516   echo "configure: failed program was:" >&5
2517   cat conftest.$ac_ext >&5
2518   rm -fr conftest*
2519   case "$conftest_rc" in
2520   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2521   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2522   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2523 esac
2524 fi
2525 rm -fr conftest*
2526
2527
2528
2529
2530 echo "Extracting information from the machine- and system-dependent headers..."
2531
2532 tempcname="conftest.c"
2533
2534
2535
2536 cat > $tempcname < confdefs.h
2537 cat >> $tempcname <<EOF
2538 #define NOT_C_CODE
2539 #define C_SWITCH_SITE
2540 #define C_SWITCH_X_SITE
2541 #define LD_SWITCH_SITE
2542 #define LD_SWITCH_X_SITE
2543 #define LD_SWITCH_X_SITE_AUX
2544 #define OS_RELEASE $os_release
2545
2546 #ifdef config_opsysfile
2547 #include "$srcdir/src/$opsysfile"
2548 #endif
2549
2550 #ifdef config_machfile
2551 #include "$srcdir/src/$machfile"
2552 #endif
2553
2554 #ifndef LIBS_MACHINE
2555 #define LIBS_MACHINE
2556 #endif
2557 configure___ libs_machine=LIBS_MACHINE
2558
2559 #ifndef LIBS_SYSTEM
2560 #define LIBS_SYSTEM
2561 #endif
2562 configure___ libs_system=LIBS_SYSTEM
2563
2564 #ifndef LIBS_TERMCAP
2565 #define LIBS_TERMCAP
2566 #endif
2567 configure___ libs_termcap=LIBS_TERMCAP
2568
2569 #ifndef LIB_STANDARD
2570 #define LIB_STANDARD
2571 #endif
2572 configure___ libs_standard=LIB_STANDARD
2573
2574
2575 #ifndef OBJECTS_MACHINE
2576 #define OBJECTS_MACHINE
2577 #endif
2578 configure___ objects_machine=OBJECTS_MACHINE
2579
2580 #ifndef OBJECTS_SYSTEM
2581 #define OBJECTS_SYSTEM
2582 #endif
2583 configure___ objects_system=OBJECTS_SYSTEM
2584
2585
2586 #ifndef C_SWITCH_MACHINE
2587 #define C_SWITCH_MACHINE
2588 #endif
2589 configure___ c_switch_machine=C_SWITCH_MACHINE
2590
2591 #ifndef C_SWITCH_SYSTEM
2592 #define C_SWITCH_SYSTEM
2593 #endif
2594 configure___ c_switch_system=C_SWITCH_SYSTEM
2595
2596
2597 #ifndef LD_SWITCH_MACHINE
2598 #define LD_SWITCH_MACHINE
2599 #endif
2600 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2601
2602 #ifndef LD_SWITCH_SYSTEM
2603 #define LD_SWITCH_SYSTEM
2604 #endif
2605 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2606
2607
2608 #ifndef UNEXEC
2609 #define UNEXEC "unexec.o"
2610 #endif
2611 configure___ unexec=UNEXEC
2612
2613
2614 #ifndef LD_SWITCH_SHARED
2615 #define LD_SWITCH_SHARED "-c"
2616 #endif
2617 configure___ ld_switch_shared=LD_SWITCH_SHARED
2618
2619
2620 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2621 configure___ ordinary_ld=ORDINARY_LD
2622
2623 #ifdef ORDINARY_LINK
2624 #define LD ORDINARY_LD
2625 #else /* no ORDINARY LINK */
2626 #ifdef COFF_ENCAPSULATE
2627 #define LD "\$(CC) -nostdlib"
2628 #else /* not COFF_ENCAPSULATE */
2629 #ifdef LINKER
2630 #define LD LINKER
2631 #else /* ! defined (LINKER) */
2632 #define LD "ld"
2633 #endif /* ! defined (LINKER) */
2634 #endif /* ! defined (COFF_ENCAPSULATE) */
2635 #endif /* not ORDINARY_LINK */
2636 configure___ ld=LD
2637
2638 #ifndef LIB_GCC
2639 #define LIB_GCC
2640 #endif
2641 configure___ lib_gcc=LIB_GCC
2642
2643 #ifndef LD_TEXT_START_ADDR
2644 #define LD_TEXT_START_ADDR
2645 #endif
2646 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2647
2648
2649 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2650 #ifdef NO_REMAP
2651 #ifdef COFF_ENCAPSULATE
2652 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2653 #else /* ! defined (COFF_ENCAPSULATE) */
2654 #define START_FILES "pre-crt0.o /lib/crt0.o"
2655 #endif /* ! defined (COFF_ENCAPSULATE) */
2656 #else /* ! defined (NO_REMAP) */
2657 #define START_FILES "ecrt0.o"
2658 #endif /* ! defined (NO_REMAP) */
2659 #endif /* no ORDINARY_LINK */
2660 #ifndef START_FILES
2661 #define START_FILES
2662 #endif
2663 configure___ start_files=START_FILES
2664
2665 #ifdef ORDINARY_LINK
2666 configure___ ordinary_link=yes
2667 #else
2668 configure___ ordinary_link=no
2669 #endif
2670
2671 #ifdef SYSTEM_MALLOC
2672 configure___ system_malloc=yes
2673 #else
2674 configure___ system_malloc=no
2675 #endif
2676
2677 #ifdef TERMINFO
2678 configure___ have_terminfo=yes
2679 #else
2680 configure___ have_terminfo=no
2681 #endif
2682
2683 #ifdef MAIL_USE_FLOCK
2684 configure___ mail_use_flock=yes
2685 #else
2686 configure___ mail_use_flock=no
2687 #endif
2688
2689 #ifdef MAIL_USE_LOCKF
2690 configure___ mail_use_lockf=yes
2691 #else
2692 configure___ mail_use_lockf=no
2693 #endif
2694
2695 #ifdef MAIL_USE_LOCKING
2696 configure___ mail_use_locking=yes
2697 #else
2698 configure___ mail_use_locking=no
2699 #endif
2700
2701 #ifdef HAVE_WIN32_PROCESSES
2702 configure___ win32_processes=yes
2703 #else
2704 configure___ win32_processes=no
2705 #endif
2706
2707 EOF
2708
2709 CPP=`eval "echo $CPP $CPPFLAGS"`
2710 eval `$CPP -Isrc $tempcname \
2711         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2712
2713 rm $tempcname
2714
2715 if test "$pdump" = "yes"; then
2716   ordinary_link="yes"
2717   ld="${ordinary_ld}"
2718   start_files=
2719   libs_standard=
2720   unexec=
2721   lib_gcc=
2722 fi
2723
2724 test "$extra_verbose" = "yes" && \
2725   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 ""
2726
2727 case "$opsys" in mingw* | cygwin*)
2728   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2729   cygwin_include=`eval "dirname $cygwin_include"` ;
2730   cygwin_include="-I$cygwin_include/../include" ;
2731   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2732   case "$opsys" in mingw*)
2733     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2734   esac
2735   ;;
2736 esac
2737
2738 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2739
2740
2741 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2742
2743 if test "$__USLC__" = yes; then
2744   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2745 echo "configure:2746: checking for whether the -Kalloca compiler flag is needed" >&5
2746   need_kalloca=no
2747   cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750
2751 int main() {
2752 void *x = alloca(4);
2753 ; return 0; }
2754 EOF
2755 if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756   rm -rf conftest*
2757   :
2758 else
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   rm -rf conftest*
2762   
2763     xe_save_c_switch_system="$c_switch_system"
2764     c_switch_system="$c_switch_system -Kalloca"
2765     cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768
2769 int main() {
2770 void *x = alloca(4);
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2774   rm -rf conftest*
2775    need_kalloca=yes 
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779 fi
2780 rm -f conftest*
2781     c_switch_system="$xe_save_c_switch_system"
2782 fi
2783 rm -f conftest*
2784   echo "$ac_t""$need_kalloca" 1>&6
2785   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
2786 fi
2787
2788 if test "$cflags_specified" = "no"; then
2789       if   test "$GCC" = "yes"; then
2790     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2791         CFLAGS="$CFLAGS -Wsign-compare"
2792         case "`gcc -v --help 2>&1`" in
2793       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2794     esac
2795                 if test "$xemacs_compiler" != "g++"; then
2796       CFLAGS="$CFLAGS -Wshadow"
2797     fi
2798             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2799               elif test "$__SUNPRO_C" = "yes"; then
2800     case "$opsys" in
2801       sol2    ) CFLAGS="-v -xO4" ;;
2802       sunos4* ) CFLAGS="-xO2";;
2803     esac
2804   elif test "$__DECC" = "yes"; then
2805     CFLAGS="-O3"
2806   elif test "$CC" = "xlc"; then
2807     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2808     else
2809     CFLAGS="-O" ;  fi
2810 fi
2811
2812 if test "$GCC" = "yes"; then
2813 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2814 echo "configure:2815: checking for buggy gcc versions" >&5
2815 GCC_VERSION=`$CC --version`
2816 case `uname -s`:`uname -m`:$GCC_VERSION in
2817                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2818                         case "$CFLAGS" in
2819             *-O2*|*-O3*)
2820                 case "$CFLAGS" in
2821                     *-fno-schedule-insns*) ;;
2822                     *)
2823                         echo "$ac_t""yes" 1>&6
2824                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2825                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2826                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2827                         ;;
2828                 esac
2829                 ;;
2830         esac
2831         ;;
2832                     Linux:alpha:egcs-2.91.*)
2833         echo "$ac_t""yes" 1>&6
2834         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2835         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2836         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2837         ;;
2838     *:i*86*:2.7.2*)
2839         case "$CFLAGS" in
2840             *-O2*|*-O3*)
2841                 case "$GCC_VERSION" in
2842                     2.7.2)
2843                         case "$CFLAGS" in
2844                             *-fno-strength-reduce*) ;;
2845                             *)
2846                                 echo "$ac_t""yes" 1>&6
2847                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2848                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2849                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2850                                 ;;
2851                         esac
2852                         ;;
2853                 esac
2854                 case "$CFLAGS" in
2855                  *-fno-caller-saves*) ;;
2856                  *)
2857                     echo "$ac_t""yes" 1>&6
2858                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2859                     echo "configure: warning: -fno-caller-saves." 1>&2
2860                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2861                     ;;
2862                 esac
2863                 ;;
2864         esac
2865         ;;
2866 esac
2867 echo "$ac_t""no" 1>&6
2868 fi
2869
2870 if test "$pdump" != "yes"; then
2871   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2872 echo "configure:2873: checking for \"-z nocombreloc\" linker flag" >&5
2873   case "`ld --help 2>&1`" in
2874     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2875       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2876     *) echo "$ac_t""no" 1>&6 ;;
2877   esac
2878 fi
2879
2880
2881
2882 if test "$GCC" = "yes"; then
2883   set x $ld_switch_system; shift; ld_switch_system=""
2884   while test -n "$1"; do
2885     case $1 in
2886       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2887       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2888       -Xlinker* ) ;;
2889       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2890     esac
2891     shift
2892   done
2893 fi
2894
2895 if test "$GCC" = "yes"; then
2896   set x $ld_switch_machine; shift; ld_switch_machine=""
2897   while test -n "$1"; do
2898     case $1 in
2899       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2900       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2901       -Xlinker* ) ;;
2902       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2903     esac
2904     shift
2905   done
2906 fi
2907
2908 if test "$GCC" = "yes"; then
2909   set x $ld_switch_site; shift; ld_switch_site=""
2910   while test -n "$1"; do
2911     case $1 in
2912       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2913       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2914       -Xlinker* ) ;;
2915       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2916     esac
2917     shift
2918   done
2919 fi
2920
2921 if test "$GCC" = "yes"; then
2922   set x $LDFLAGS; shift; LDFLAGS=""
2923   while test -n "$1"; do
2924     case $1 in
2925       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2926       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2927       -Xlinker* ) ;;
2928       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2929     esac
2930     shift
2931   done
2932 fi
2933
2934 if test "$GCC" = "yes"; then
2935   set x $ld_call_shared; shift; ld_call_shared=""
2936   while test -n "$1"; do
2937     case $1 in
2938       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2939       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2940       -Xlinker* ) ;;
2941       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2942     esac
2943     shift
2944   done
2945 fi
2946
2947 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2948    echo "    xemacs will be linked with \"$objects_machine\""
2949  fi
2950 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2951    echo "    xemacs will be linked with \"$objects_system\""
2952  fi
2953 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2954    echo "    xemacs will be linked with \"$unexec\""
2955  fi
2956 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2957    echo "    xemacs will be linked with \"dumper.o\""
2958  fi
2959
2960 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2961 echo "configure:2962: checking for dynodump" >&5
2962 if test "$unexec" != "unexsol2.o"; then
2963   echo "$ac_t""no" 1>&6
2964 else
2965   echo "$ac_t""yes" 1>&6
2966   { test "$extra_verbose" = "yes" && cat << \EOF
2967     Defining DYNODUMP
2968 EOF
2969 cat >> confdefs.h <<\EOF
2970 #define DYNODUMP 1
2971 EOF
2972 }
2973
2974   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2975   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2976   case "$machine" in
2977     sparc   ) dynodump_arch=sparc ;;
2978     *86*    ) dynodump_arch=i386  ;;
2979     powerpc ) dynodump_arch=ppc   ;;
2980   esac
2981     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
2982 fi
2983
2984
2985 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2986
2987 if test "$unexec" = "unexaix.o"; then
2988   if   test "$dynamic" = "no"; then
2989   start_flags="-Wl,-bnso,-bnodelcsect"
2990   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2991   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2992     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2993   done
2994   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2995     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2996   done
2997   
2998 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2999 echo "configure:3000: checking for terminateAndUnload in -lC" >&5
3000 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3001
3002 xe_check_libs=" -lC "
3003 cat > conftest.$ac_ext <<EOF
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3006 /* Override any gcc2 internal prototype to avoid an error.  */
3007 /* We use char because int might match the return type of a gcc2
3008     builtin and then its argument prototype would still apply.  */
3009 char terminateAndUnload();
3010
3011 int main() {
3012 terminateAndUnload()
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3016   rm -rf conftest*
3017   eval "ac_cv_lib_$ac_lib_var=yes"
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   eval "ac_cv_lib_$ac_lib_var=no"
3023 fi
3024 rm -f conftest*
3025 xe_check_libs=""
3026
3027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3028   echo "$ac_t""yes" 1>&6
3029   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3030 else
3031   echo "$ac_t""no" 1>&6
3032 fi
3033
3034
3035   fi
3036 elif test -n "$ld_text_start_addr"; then
3037   start_flags="-T $ld_text_start_addr -e __start"
3038 fi
3039
3040
3041
3042
3043 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3044  test -z "$linker" &&  linker='$(CC) -nostdlib'
3045  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3046 fi
3047 test "$GCC" != "yes" && lib_gcc=
3048
3049
3050
3051
3052
3053 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3054 if test -n "$site_libraries"; then
3055   for arg in $site_libraries; do
3056     case "$arg" in
3057      -* ) ;;
3058      * ) test -d "$arg" || \
3059            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3060        arg="-L${arg}" ;;
3061     esac
3062     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3063   done
3064 fi
3065
3066 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3067 if test -n "$site_includes"; then
3068   for arg in $site_includes; do
3069     case "$arg" in
3070       -* ) ;;
3071       * ) test -d "$arg" || \
3072            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3073       arg="-I${arg}" ;;
3074     esac
3075     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3076   done
3077 fi
3078
3079 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3080 if test -n "$site_prefixes"; then
3081   for dir in $site_prefixes; do
3082     lib_dir="${dir}/lib"
3083     inc_dir="${dir}/include"
3084     if test ! -d "$dir"; then
3085       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3086     elif test ! -d "$lib_dir"; then
3087       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3088     else
3089       if test -d "$inc_dir"; then
3090         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
3091       fi
3092       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
3093     fi
3094   done
3095 fi
3096
3097
3098 for dir in "/usr/ccs/lib"; do
3099   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
3100 done
3101
3102 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3103 if test -n "$site_runtime_libraries"; then
3104   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3105   export LD_RUN_PATH
3106 fi
3107
3108
3109
3110
3111
3112 if test -n "$add_runtime_path"; then :;
3113 elif test "$dynamic" = "no"; then add_runtime_path=no
3114 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3115 else case "$opsys" in
3116        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3117        * ) add_runtime_path=no ;;
3118      esac
3119 fi
3120
3121 if test "$add_runtime_path" = "yes"; then
3122       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3123 echo "configure:3124: checking "for runtime libraries flag"" >&5
3124   case "$opsys" in
3125     sol2 ) dash_r="-R" ;;
3126     decosf* | linux* | irix*) dash_r="-rpath " ;;
3127     *)
3128       dash_r=""
3129       for try_dash_r in "-R" "-R " "-rpath "; do
3130         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3131         
3132 if test "$GCC" = "yes"; then
3133   set x $xe_check_libs; shift; xe_check_libs=""
3134   while test -n "$1"; do
3135     case $1 in
3136       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3137       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3138       -Xlinker* ) ;;
3139       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3140     esac
3141     shift
3142   done
3143 fi
3144         cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147
3148 int main() {
3149
3150 ; return 0; }
3151 EOF
3152 if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3153   rm -rf conftest*
3154   dash_r="$try_dash_r"
3155 else
3156   echo "configure: failed program was:" >&5
3157   cat conftest.$ac_ext >&5
3158 fi
3159 rm -f conftest*
3160         xe_check_libs=""
3161         test -n "$dash_r" && break
3162       done ;;
3163   esac
3164   if test -n "$dash_r";
3165     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3166     else echo "$ac_t""NONE" 1>&6
3167   fi
3168 fi
3169
3170 xe_add_unique_runpath_dir='
3171   xe_add_p=yes
3172   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3173   done
3174   if test "$xe_add_p" = "yes"; then
3175     test -n "$runpath" && runpath="${runpath}:"
3176     runpath="${runpath}${xe_runpath_dir}"
3177     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3178   fi'
3179
3180
3181
3182
3183 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3184     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3185   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3186   
3187         runpath="" runpath_dirs=""
3188   if test -n "$LD_RUN_PATH"; then
3189     runpath="$LD_RUN_PATH"
3190   elif test "$GCC" = "yes"; then
3191         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3192     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3193     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3194     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3195       case "$arg" in P,* | -L* | -R* )
3196         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3197           {
3198 xe_runpath_dir="$dir"
3199   test "$xe_runpath_dir" != "/lib"     -a \
3200         "$xe_runpath_dir" != "/usr/lib" -a \
3201         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3202   eval "$xe_add_unique_runpath_dir"
3203 }
3204         done ;;
3205       esac
3206     done
3207     ld_switch_run="$ld_switch_run_save"
3208     rm -f conftest*
3209   else
3210         for arg in $ld_switch_site $ld_switch_x_site; do
3211       case "$arg" in -L*) {
3212 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3213   test "$xe_runpath_dir" != "/lib"     -a \
3214         "$xe_runpath_dir" != "/usr/lib" -a \
3215         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3216   eval "$xe_add_unique_runpath_dir"
3217 };; esac
3218     done
3219         if test "$opsys $need_motif" = "sol2 yes"; then
3220       xe_runpath_dir="/opt/SUNWdt/lib";
3221       eval "$xe_add_unique_runpath_dir";
3222     fi
3223   fi 
3224   if test -n "$runpath"; then
3225     ld_switch_run="${dash_r}${runpath}"
3226     
3227 if test "$GCC" = "yes"; then
3228   set x $ld_switch_run; shift; ld_switch_run=""
3229   while test -n "$1"; do
3230     case $1 in
3231       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3232       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3233       -Xlinker* ) ;;
3234       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3235     esac
3236     shift
3237   done
3238 fi
3239     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3240   fi
3241 fi
3242
3243
3244
3245 GNU_MALLOC=yes
3246 if test "$with_dlmalloc" != "no"; then
3247         doug_lea_malloc=yes
3248 else
3249         doug_lea_malloc=no
3250 fi
3251 after_morecore_hook_exists=yes
3252 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3253 echo "configure:3254: checking for malloc_set_state" >&5
3254
3255 cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 /* System header to define __stub macros and hopefully few prototypes,
3259     which can conflict with char malloc_set_state(); below.  */
3260 #include <assert.h>
3261 /* Override any gcc2 internal prototype to avoid an error.  */
3262 /* We use char because int might match the return type of a gcc2
3263     builtin and then its argument prototype would still apply.  */
3264 char malloc_set_state();
3265
3266 int main() {
3267
3268 /* The GNU C library defines this for functions which it implements
3269     to always fail with ENOSYS.  Some functions are actually named
3270     something starting with __ and the normal name is an alias.  */
3271 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3272 choke me
3273 #else
3274 malloc_set_state();
3275 #endif
3276
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3280   rm -rf conftest*
3281   eval "ac_cv_func_malloc_set_state=yes"
3282 else
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   eval "ac_cv_func_malloc_set_state=no"
3287 fi
3288 rm -f conftest*
3289
3290 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3291   echo "$ac_t""yes" 1>&6
3292   :
3293 else
3294   echo "$ac_t""no" 1>&6
3295 doug_lea_malloc=no
3296 fi
3297
3298 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3299 echo "configure:3300: checking whether __after_morecore_hook exists" >&5
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 extern void (* __after_morecore_hook)();
3304 int main() {
3305 __after_morecore_hook = 0
3306 ; return 0; }
3307 EOF
3308 if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3309   rm -rf conftest*
3310   echo "$ac_t""yes" 1>&6
3311 else
3312   echo "configure: failed program was:" >&5
3313   cat conftest.$ac_ext >&5
3314   rm -rf conftest*
3315   echo "$ac_t""no" 1>&6
3316    after_morecore_hook_exists=no
3317 fi
3318 rm -f conftest*
3319 if test "$system_malloc" = "yes" ; then
3320   GNU_MALLOC=no
3321   GNU_MALLOC_reason="
3322     - The GNU allocators don't work with this system configuration."
3323 elif test "$with_system_malloc" = "yes" ; then
3324   GNU_MALLOC=no
3325   GNU_MALLOC_reason="
3326     - User chose not to use GNU allocators."
3327 elif test "$with_debug_malloc" = "yes" ; then
3328   GNU_MALLOC=no
3329   GNU_MALLOC_reason="
3330     - User chose to use Debugging Malloc."
3331 fi
3332
3333 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3334   GNU_MALLOC_reason="
3335     - Using Doug Lea's new malloc from the GNU C Library."
3336   { test "$extra_verbose" = "yes" && cat << \EOF
3337     Defining DOUG_LEA_MALLOC
3338 EOF
3339 cat >> confdefs.h <<\EOF
3340 #define DOUG_LEA_MALLOC 1
3341 EOF
3342 }
3343
3344   if test "$after_morecore_hook_exists" = "no" ; then
3345     GNU_MALLOC_reason="
3346     - Using Doug Lea's new malloc from the Linux C Library."
3347     { test "$extra_verbose" = "yes" && cat << \EOF
3348     Defining _NO_MALLOC_WARNING_
3349 EOF
3350 cat >> confdefs.h <<\EOF
3351 #define _NO_MALLOC_WARNING_ 1
3352 EOF
3353 }
3354
3355   fi
3356 fi
3357
3358
3359
3360
3361 # Extract the first word of "ranlib", so it can be a program name with args.
3362 set dummy ranlib; ac_word=$2
3363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3364 echo "configure:3365: checking for $ac_word" >&5
3365
3366 if test -n "$RANLIB"; then
3367   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3368 else
3369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3370   ac_dummy="$PATH"
3371   for ac_dir in $ac_dummy; do
3372     test -z "$ac_dir" && ac_dir=.
3373     if test -f $ac_dir/$ac_word; then
3374       ac_cv_prog_RANLIB="ranlib"
3375       break
3376     fi
3377   done
3378   IFS="$ac_save_ifs"
3379   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3380 fi
3381 RANLIB="$ac_cv_prog_RANLIB"
3382 if test -n "$RANLIB"; then
3383   echo "$ac_t""$RANLIB" 1>&6
3384 else
3385   echo "$ac_t""no" 1>&6
3386 fi
3387
3388 ac_aux_dir=
3389 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3390   if test -f $ac_dir/install-sh; then
3391     ac_aux_dir=$ac_dir
3392     ac_install_sh="$ac_aux_dir/install-sh -c"
3393     break
3394   elif test -f $ac_dir/install.sh; then
3395     ac_aux_dir=$ac_dir
3396     ac_install_sh="$ac_aux_dir/install.sh -c"
3397     break
3398   fi
3399 done
3400 if test -z "$ac_aux_dir"; then
3401   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3402 fi
3403 ac_config_guess=$ac_aux_dir/config.guess
3404 ac_config_sub=$ac_aux_dir/config.sub
3405 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3406
3407 # Find a good install program.  We prefer a C program (faster),
3408 # so one script is as good as another.  But avoid the broken or
3409 # incompatible versions:
3410 # SysV /etc/install, /usr/sbin/install
3411 # SunOS /usr/etc/install
3412 # IRIX /sbin/install
3413 # AIX /bin/install
3414 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3415 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3416 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3417 # ./install, which can be erroneously created by make from ./install.sh.
3418 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3419 echo "configure:3420: checking for a BSD compatible install" >&5
3420 if test -z "$INSTALL"; then
3421
3422   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3423   for ac_dir in $PATH; do
3424     # Account for people who put trailing slashes in PATH elements.
3425     case "$ac_dir/" in
3426     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3427     *)
3428       # OSF1 and SCO ODT 3.0 have their own names for install.
3429       # Don't use installbsd from OSF since it installs stuff as root
3430       # by default.
3431       for ac_prog in ginstall scoinst install; do
3432         if test -f $ac_dir/$ac_prog; then
3433           if test $ac_prog = install &&
3434             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3435             # AIX install.  It has an incompatible calling convention.
3436             :
3437           else
3438             ac_cv_path_install="$ac_dir/$ac_prog -c"
3439             break 2
3440           fi
3441         fi
3442       done
3443       ;;
3444     esac
3445   done
3446   IFS="$ac_save_IFS"
3447
3448   if test "${ac_cv_path_install+set}" = set; then
3449     INSTALL="$ac_cv_path_install"
3450   else
3451     # As a last resort, use the slow shell script.  We don't cache a
3452     # path for INSTALL within a source directory, because that will
3453     # break other packages using the cache if that directory is
3454     # removed, or if the path is relative.
3455     INSTALL="$ac_install_sh"
3456   fi
3457 fi
3458 echo "$ac_t""$INSTALL" 1>&6
3459
3460 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3461 # It thinks the first close brace ends the variable substitution.
3462 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3463
3464 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3465
3466 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3467
3468 for ac_prog in 'bison -y' byacc
3469 do
3470 # Extract the first word of "$ac_prog", so it can be a program name with args.
3471 set dummy $ac_prog; ac_word=$2
3472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3473 echo "configure:3474: checking for $ac_word" >&5
3474
3475 if test -n "$YACC"; then
3476   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3477 else
3478   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3479   ac_dummy="$PATH"
3480   for ac_dir in $ac_dummy; do
3481     test -z "$ac_dir" && ac_dir=.
3482     if test -f $ac_dir/$ac_word; then
3483       ac_cv_prog_YACC="$ac_prog"
3484       break
3485     fi
3486   done
3487   IFS="$ac_save_ifs"
3488 fi
3489 YACC="$ac_cv_prog_YACC"
3490 if test -n "$YACC"; then
3491   echo "$ac_t""$YACC" 1>&6
3492 else
3493   echo "$ac_t""no" 1>&6
3494 fi
3495
3496 test -n "$YACC" && break
3497 done
3498 test -n "$YACC" || YACC="yacc"
3499
3500
3501 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 
3502 do
3503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3505 echo "configure:3506: checking for $ac_hdr" >&5
3506
3507 cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510 #include <$ac_hdr>
3511 EOF
3512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3513 { (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3515 if test -z "$ac_err"; then
3516   rm -rf conftest*
3517   eval "ac_cv_header_$ac_safe=yes"
3518 else
3519   echo "$ac_err" >&5
3520   echo "configure: failed program was:" >&5
3521   cat conftest.$ac_ext >&5
3522   rm -rf conftest*
3523   eval "ac_cv_header_$ac_safe=no"
3524 fi
3525 rm -f conftest*
3526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3527   echo "$ac_t""yes" 1>&6
3528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3529   { test "$extra_verbose" = "yes" && cat << EOF
3530     Defining $ac_tr_hdr
3531 EOF
3532 cat >> confdefs.h <<EOF
3533 #define $ac_tr_hdr 1
3534 EOF
3535 }
3536  
3537 else
3538   echo "$ac_t""no" 1>&6
3539 fi
3540 done
3541
3542 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3543 echo "configure:3544: checking for sys/wait.h that is POSIX.1 compatible" >&5
3544
3545 cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548 #include <sys/types.h>
3549 #include <sys/wait.h>
3550 #ifndef WEXITSTATUS
3551 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3552 #endif
3553 #ifndef WIFEXITED
3554 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3555 #endif
3556 int main() {
3557 int s;
3558 wait (&s);
3559 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3560 ; return 0; }
3561 EOF
3562 if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3563   rm -rf conftest*
3564   ac_cv_header_sys_wait_h=yes
3565 else
3566   echo "configure: failed program was:" >&5
3567   cat conftest.$ac_ext >&5
3568   rm -rf conftest*
3569   ac_cv_header_sys_wait_h=no
3570 fi
3571 rm -f conftest*
3572
3573 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3574 if test $ac_cv_header_sys_wait_h = yes; then
3575   { test "$extra_verbose" = "yes" && cat << \EOF
3576     Defining HAVE_SYS_WAIT_H
3577 EOF
3578 cat >> confdefs.h <<\EOF
3579 #define HAVE_SYS_WAIT_H 1
3580 EOF
3581 }
3582
3583 fi
3584
3585 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3586 echo "configure:3587: checking for ANSI C header files" >&5
3587
3588 cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 #include <stdlib.h>
3592 #include <stdarg.h>
3593 #include <string.h>
3594 #include <float.h>
3595 EOF
3596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3597 { (eval echo configure:3598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3599 if test -z "$ac_err"; then
3600   rm -rf conftest*
3601   ac_cv_header_stdc=yes
3602 else
3603   echo "$ac_err" >&5
3604   echo "configure: failed program was:" >&5
3605   cat conftest.$ac_ext >&5
3606   rm -rf conftest*
3607   ac_cv_header_stdc=no
3608 fi
3609 rm -f conftest*
3610
3611 if test $ac_cv_header_stdc = yes; then
3612   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3613 cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 #include <string.h>
3617 EOF
3618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3619   egrep "memchr" >/dev/null 2>&1; then
3620   :
3621 else
3622   rm -rf conftest*
3623   ac_cv_header_stdc=no
3624 fi
3625 rm -f conftest*
3626
3627 fi
3628
3629 if test $ac_cv_header_stdc = yes; then
3630   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3631 cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 #include <stdlib.h>
3635 EOF
3636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3637   egrep "free" >/dev/null 2>&1; then
3638   :
3639 else
3640   rm -rf conftest*
3641   ac_cv_header_stdc=no
3642 fi
3643 rm -f conftest*
3644
3645 fi
3646
3647 if test $ac_cv_header_stdc = yes; then
3648   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 #include <ctype.h>
3653 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3654 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3655 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3656 int main () { int i; for (i = 0; i < 256; i++)
3657 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3658 exit (0); }
3659
3660 EOF
3661 if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3662 then
3663   :
3664 else
3665   conftest_rc="$?"
3666   echo "configure: failed program was:" >&5
3667   cat conftest.$ac_ext >&5
3668   rm -fr conftest*
3669   ac_cv_header_stdc=no
3670 fi
3671 rm -fr conftest*
3672 fi
3673
3674 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3675 if test $ac_cv_header_stdc = yes; then
3676   { test "$extra_verbose" = "yes" && cat << \EOF
3677     Defining STDC_HEADERS
3678 EOF
3679 cat >> confdefs.h <<\EOF
3680 #define STDC_HEADERS 1
3681 EOF
3682 }
3683
3684 fi
3685
3686 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3687 echo "configure:3688: checking whether time.h and sys/time.h may both be included" >&5
3688
3689 cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <sys/types.h>
3693 #include <sys/time.h>
3694 #include <time.h>
3695 int main() {
3696 struct tm *tp;
3697 ; return 0; }
3698 EOF
3699 if { (eval echo configure:3700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3700   rm -rf conftest*
3701   ac_cv_header_time=yes
3702 else
3703   echo "configure: failed program was:" >&5
3704   cat conftest.$ac_ext >&5
3705   rm -rf conftest*
3706   ac_cv_header_time=no
3707 fi
3708 rm -f conftest*
3709
3710 echo "$ac_t""$ac_cv_header_time" 1>&6
3711 if test $ac_cv_header_time = yes; then
3712   { test "$extra_verbose" = "yes" && cat << \EOF
3713     Defining TIME_WITH_SYS_TIME
3714 EOF
3715 cat >> confdefs.h <<\EOF
3716 #define TIME_WITH_SYS_TIME 1
3717 EOF
3718 }
3719
3720 fi
3721
3722 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3723 echo "configure:3724: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3724
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728 #include <sys/types.h>
3729 #include <signal.h>
3730 /* NetBSD declares sys_siglist in unistd.h.  */
3731 #ifdef HAVE_UNISTD_H
3732 #include <unistd.h>
3733 #endif
3734 int main() {
3735 char *msg = *(sys_siglist + 1);
3736 ; return 0; }
3737 EOF
3738 if { (eval echo configure:3739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3739   rm -rf conftest*
3740   ac_cv_decl_sys_siglist=yes
3741 else
3742   echo "configure: failed program was:" >&5
3743   cat conftest.$ac_ext >&5
3744   rm -rf conftest*
3745   ac_cv_decl_sys_siglist=no
3746 fi
3747 rm -f conftest*
3748
3749 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3750 if test $ac_cv_decl_sys_siglist = yes; then
3751   { test "$extra_verbose" = "yes" && cat << \EOF
3752     Defining SYS_SIGLIST_DECLARED
3753 EOF
3754 cat >> confdefs.h <<\EOF
3755 #define SYS_SIGLIST_DECLARED 1
3756 EOF
3757 }
3758
3759 fi
3760
3761
3762
3763 echo $ac_n "checking for utime""... $ac_c" 1>&6
3764 echo "configure:3765: checking for utime" >&5
3765 cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 #include <sys/types.h>
3769 #include <utime.h>
3770 int main() {
3771 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3772 ; return 0; }
3773 EOF
3774 if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3775   rm -rf conftest*
3776   echo "$ac_t""yes" 1>&6
3777    { test "$extra_verbose" = "yes" && cat << \EOF
3778     Defining HAVE_UTIME
3779 EOF
3780 cat >> confdefs.h <<\EOF
3781 #define HAVE_UTIME 1
3782 EOF
3783 }
3784
3785 else
3786   echo "configure: failed program was:" >&5
3787   cat conftest.$ac_ext >&5
3788   rm -rf conftest*
3789   echo "$ac_t""no" 1>&6
3790       for ac_func in utimes
3791 do
3792 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3793 echo "configure:3794: checking for $ac_func" >&5
3794
3795 cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 /* System header to define __stub macros and hopefully few prototypes,
3799     which can conflict with char $ac_func(); below.  */
3800 #include <assert.h>
3801 /* Override any gcc2 internal prototype to avoid an error.  */
3802 /* We use char because int might match the return type of a gcc2
3803     builtin and then its argument prototype would still apply.  */
3804 char $ac_func();
3805
3806 int main() {
3807
3808 /* The GNU C library defines this for functions which it implements
3809     to always fail with ENOSYS.  Some functions are actually named
3810     something starting with __ and the normal name is an alias.  */
3811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3812 choke me
3813 #else
3814 $ac_func();
3815 #endif
3816
3817 ; return 0; }
3818 EOF
3819 if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3820   rm -rf conftest*
3821   eval "ac_cv_func_$ac_func=yes"
3822 else
3823   echo "configure: failed program was:" >&5
3824   cat conftest.$ac_ext >&5
3825   rm -rf conftest*
3826   eval "ac_cv_func_$ac_func=no"
3827 fi
3828 rm -f conftest*
3829
3830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3831   echo "$ac_t""yes" 1>&6
3832     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3833   { test "$extra_verbose" = "yes" && cat << EOF
3834     Defining $ac_tr_func
3835 EOF
3836 cat >> confdefs.h <<EOF
3837 #define $ac_tr_func 1
3838 EOF
3839 }
3840  
3841 else
3842   echo "$ac_t""no" 1>&6
3843 fi
3844 done
3845
3846 fi
3847 rm -f conftest*
3848
3849
3850 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3851 echo "configure:3852: checking return type of signal handlers" >&5
3852
3853 cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3856 #include <sys/types.h>
3857 #include <signal.h>
3858 #ifdef signal
3859 #undef signal
3860 #endif
3861 #ifdef __cplusplus
3862 extern "C" void (*signal (int, void (*)(int)))(int);
3863 #else
3864 void (*signal ()) ();
3865 #endif
3866
3867 int main() {
3868 int i;
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3872   rm -rf conftest*
3873   ac_cv_type_signal=void
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   ac_cv_type_signal=int
3879 fi
3880 rm -f conftest*
3881
3882 echo "$ac_t""$ac_cv_type_signal" 1>&6
3883 { test "$extra_verbose" = "yes" && cat << EOF
3884     Defining RETSIGTYPE = $ac_cv_type_signal
3885 EOF
3886 cat >> confdefs.h <<EOF
3887 #define RETSIGTYPE $ac_cv_type_signal
3888 EOF
3889 }
3890
3891
3892 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3893 echo "configure:3894: checking for size_t" >&5
3894
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3897 "configure"
3897 #include "confdefs.h"
3898 #include <sys/types.h>
3899 #if STDC_HEADERS
3900 #include <stdlib.h>
3901 #include <stddef.h>
3902 #endif
3903 EOF
3904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3905   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3906   rm -rf conftest*
3907   ac_cv_type_size_t=yes
3908 else
3909   rm -rf conftest*
3910   ac_cv_type_size_t=no
3911 fi
3912 rm -f conftest*
3913
3914 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3915 if test $ac_cv_type_size_t = no; then
3916   { test "$extra_verbose" = "yes" && cat << \EOF
3917     Defining size_t = unsigned
3918 EOF
3919 cat >> confdefs.h <<\EOF
3920 #define size_t unsigned
3921 EOF
3922 }
3923
3924 fi
3925
3926 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3927 echo "configure:3928: checking for pid_t" >&5
3928
3929 cat > conftest.$ac_ext <<EOF
3930 #line 3931 "configure"
3931 #include "confdefs.h"
3932 #include <sys/types.h>
3933 #if STDC_HEADERS
3934 #include <stdlib.h>
3935 #include <stddef.h>
3936 #endif
3937 EOF
3938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3939   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3940   rm -rf conftest*
3941   ac_cv_type_pid_t=yes
3942 else
3943   rm -rf conftest*
3944   ac_cv_type_pid_t=no
3945 fi
3946 rm -f conftest*
3947
3948 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3949 if test $ac_cv_type_pid_t = no; then
3950   { test "$extra_verbose" = "yes" && cat << \EOF
3951     Defining pid_t = int
3952 EOF
3953 cat >> confdefs.h <<\EOF
3954 #define pid_t int
3955 EOF
3956 }
3957
3958 fi
3959
3960 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3961 echo "configure:3962: checking for uid_t in sys/types.h" >&5
3962
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 #include <sys/types.h>
3967 EOF
3968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3969   egrep "uid_t" >/dev/null 2>&1; then
3970   rm -rf conftest*
3971   ac_cv_type_uid_t=yes
3972 else
3973   rm -rf conftest*
3974   ac_cv_type_uid_t=no
3975 fi
3976 rm -f conftest*
3977
3978
3979 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3980 if test $ac_cv_type_uid_t = no; then
3981   { test "$extra_verbose" = "yes" && cat << \EOF
3982     Defining uid_t = int
3983 EOF
3984 cat >> confdefs.h <<\EOF
3985 #define uid_t int
3986 EOF
3987 }
3988
3989   { test "$extra_verbose" = "yes" && cat << \EOF
3990     Defining gid_t = int
3991 EOF
3992 cat >> confdefs.h <<\EOF
3993 #define gid_t int
3994 EOF
3995 }
3996
3997 fi
3998
3999 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4000 echo "configure:4001: checking for mode_t" >&5
4001
4002 cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <sys/types.h>
4006 #if STDC_HEADERS
4007 #include <stdlib.h>
4008 #include <stddef.h>
4009 #endif
4010 EOF
4011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4012   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4013   rm -rf conftest*
4014   ac_cv_type_mode_t=yes
4015 else
4016   rm -rf conftest*
4017   ac_cv_type_mode_t=no
4018 fi
4019 rm -f conftest*
4020
4021 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4022 if test $ac_cv_type_mode_t = no; then
4023   { test "$extra_verbose" = "yes" && cat << \EOF
4024     Defining mode_t = int
4025 EOF
4026 cat >> confdefs.h <<\EOF
4027 #define mode_t int
4028 EOF
4029 }
4030
4031 fi
4032
4033 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4034 echo "configure:4035: checking for off_t" >&5
4035
4036 cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039 #include <sys/types.h>
4040 #if STDC_HEADERS
4041 #include <stdlib.h>
4042 #include <stddef.h>
4043 #endif
4044 EOF
4045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4046   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4047   rm -rf conftest*
4048   ac_cv_type_off_t=yes
4049 else
4050   rm -rf conftest*
4051   ac_cv_type_off_t=no
4052 fi
4053 rm -f conftest*
4054
4055 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4056 if test $ac_cv_type_off_t = no; then
4057   { test "$extra_verbose" = "yes" && cat << \EOF
4058     Defining off_t = long
4059 EOF
4060 cat >> confdefs.h <<\EOF
4061 #define off_t long
4062 EOF
4063 }
4064
4065 fi
4066
4067 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4068 echo "configure:4069: checking for ssize_t" >&5
4069
4070 cat > conftest.$ac_ext <<EOF
4071 #line 4072 "configure"
4072 #include "confdefs.h"
4073 #include <sys/types.h>
4074 #if STDC_HEADERS
4075 #include <stdlib.h>
4076 #include <stddef.h>
4077 #endif
4078 EOF
4079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4081   rm -rf conftest*
4082   ac_cv_type_ssize_t=yes
4083 else
4084   rm -rf conftest*
4085   ac_cv_type_ssize_t=no
4086 fi
4087 rm -f conftest*
4088
4089 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4090 if test $ac_cv_type_ssize_t = no; then
4091   { test "$extra_verbose" = "yes" && cat << \EOF
4092     Defining ssize_t = int
4093 EOF
4094 cat >> confdefs.h <<\EOF
4095 #define ssize_t int
4096 EOF
4097 }
4098
4099 fi
4100
4101
4102 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4103 echo "configure:4104: checking for socklen_t" >&5
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #include <sys/types.h>
4108 #include <sys/socket.h>
4109 socklen_t x;
4110
4111 int main() {
4112
4113 ; return 0; }
4114 EOF
4115 if { (eval echo configure:4116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4116   rm -rf conftest*
4117   echo "$ac_t""yes" 1>&6
4118 else
4119   echo "configure: failed program was:" >&5
4120   cat conftest.$ac_ext >&5
4121   rm -rf conftest*
4122   
4123 cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 #include <sys/types.h>
4127 #include <sys/socket.h>
4128 int accept (int, struct sockaddr *, size_t *);
4129
4130 int main() {
4131
4132 ; return 0; }
4133 EOF
4134 if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4135   rm -rf conftest*
4136   
4137 echo "$ac_t""size_t" 1>&6
4138 { test "$extra_verbose" = "yes" && cat << \EOF
4139     Defining socklen_t = size_t
4140 EOF
4141 cat >> confdefs.h <<\EOF
4142 #define socklen_t size_t
4143 EOF
4144 }
4145
4146 else
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149   rm -rf conftest*
4150   
4151 echo "$ac_t""int" 1>&6
4152 { test "$extra_verbose" = "yes" && cat << \EOF
4153     Defining socklen_t = int
4154 EOF
4155 cat >> confdefs.h <<\EOF
4156 #define socklen_t int
4157 EOF
4158 }
4159
4160 fi
4161 rm -f conftest*
4162 fi
4163 rm -f conftest*
4164
4165 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4166 echo "configure:4167: checking for struct timeval" >&5
4167 cat > conftest.$ac_ext <<EOF
4168 #line 4169 "configure"
4169 #include "confdefs.h"
4170 #ifdef TIME_WITH_SYS_TIME
4171 #include <sys/time.h>
4172 #include <time.h>
4173 #else
4174 #ifdef HAVE_SYS_TIME_H
4175 #include <sys/time.h>
4176 #else
4177 #include <time.h>
4178 #endif
4179 #endif
4180 int main() {
4181 static struct timeval x; x.tv_sec = x.tv_usec;
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4185   rm -rf conftest*
4186   echo "$ac_t""yes" 1>&6
4187   HAVE_TIMEVAL=yes
4188   { test "$extra_verbose" = "yes" && cat << \EOF
4189     Defining HAVE_TIMEVAL
4190 EOF
4191 cat >> confdefs.h <<\EOF
4192 #define HAVE_TIMEVAL 1
4193 EOF
4194 }
4195
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   echo "$ac_t""no" 1>&6
4201    HAVE_TIMEVAL=no
4202 fi
4203 rm -f conftest*
4204
4205 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4206 echo "configure:4207: checking whether struct tm is in sys/time.h or time.h" >&5
4207
4208 cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211 #include <sys/types.h>
4212 #include <time.h>
4213 int main() {
4214 struct tm *tp; tp->tm_sec;
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4218   rm -rf conftest*
4219   ac_cv_struct_tm=time.h
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   ac_cv_struct_tm=sys/time.h
4225 fi
4226 rm -f conftest*
4227
4228 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4229 if test $ac_cv_struct_tm = sys/time.h; then
4230   { test "$extra_verbose" = "yes" && cat << \EOF
4231     Defining TM_IN_SYS_TIME
4232 EOF
4233 cat >> confdefs.h <<\EOF
4234 #define TM_IN_SYS_TIME 1
4235 EOF
4236 }
4237
4238 fi
4239
4240 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4241 echo "configure:4242: checking for tm_zone in struct tm" >&5
4242
4243 cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246 #include <sys/types.h>
4247 #include <$ac_cv_struct_tm>
4248 int main() {
4249 struct tm tm; tm.tm_zone;
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4253   rm -rf conftest*
4254   ac_cv_struct_tm_zone=yes
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258   rm -rf conftest*
4259   ac_cv_struct_tm_zone=no
4260 fi
4261 rm -f conftest*
4262
4263 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4264 if test "$ac_cv_struct_tm_zone" = yes; then
4265   { test "$extra_verbose" = "yes" && cat << \EOF
4266     Defining HAVE_TM_ZONE
4267 EOF
4268 cat >> confdefs.h <<\EOF
4269 #define HAVE_TM_ZONE 1
4270 EOF
4271 }
4272
4273 else
4274   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4275 echo "configure:4276: checking for tzname" >&5
4276
4277 cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 #include <time.h>
4281 #ifndef tzname /* For SGI.  */
4282 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4283 #endif
4284 int main() {
4285 atoi(*tzname);
4286 ; return 0; }
4287 EOF
4288 if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4289   rm -rf conftest*
4290   ac_cv_var_tzname=yes
4291 else
4292   echo "configure: failed program was:" >&5
4293   cat conftest.$ac_ext >&5
4294   rm -rf conftest*
4295   ac_cv_var_tzname=no
4296 fi
4297 rm -f conftest*
4298
4299 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4300   if test $ac_cv_var_tzname = yes; then
4301     { test "$extra_verbose" = "yes" && cat << \EOF
4302     Defining HAVE_TZNAME
4303 EOF
4304 cat >> confdefs.h <<\EOF
4305 #define HAVE_TZNAME 1
4306 EOF
4307 }
4308
4309   fi
4310 fi
4311
4312
4313 echo $ac_n "checking for working const""... $ac_c" 1>&6
4314 echo "configure:4315: checking for working const" >&5
4315
4316 cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319
4320 int main() {
4321
4322 /* Ultrix mips cc rejects this.  */
4323 typedef int charset[2]; const charset x;
4324 /* SunOS 4.1.1 cc rejects this.  */
4325 char const *const *ccp;
4326 char **p;
4327 /* NEC SVR4.0.2 mips cc rejects this.  */
4328 struct point {int x, y;};
4329 static struct point const zero = {0,0};
4330 /* AIX XL C 1.02.0.0 rejects this.
4331    It does not let you subtract one const X* pointer from another in an arm
4332    of an if-expression whose if-part is not a constant expression */
4333 const char *g = "string";
4334 ccp = &g + (g ? g-g : 0);
4335 /* HPUX 7.0 cc rejects these. */
4336 ++ccp;
4337 p = (char**) ccp;
4338 ccp = (char const *const *) p;
4339 { /* SCO 3.2v4 cc rejects this.  */
4340   char *t;
4341   char const *s = 0 ? (char *) 0 : (char const *) 0;
4342
4343   *t++ = 0;
4344 }
4345 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4346   int x[] = {25, 17};
4347   const int *foo = &x[0];
4348   ++foo;
4349 }
4350 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4351   typedef const int *iptr;
4352   iptr p = 0;
4353   ++p;
4354 }
4355 { /* AIX XL C 1.02.0.0 rejects this saying
4356      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4357   struct s { int j; const int *ap[3]; };
4358   struct s *b; b->j = 5;
4359 }
4360 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4361   const int foo = 10;
4362 }
4363
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4367   rm -rf conftest*
4368   ac_cv_c_const=yes
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   ac_cv_c_const=no
4374 fi
4375 rm -f conftest*
4376
4377 echo "$ac_t""$ac_cv_c_const" 1>&6
4378 if test $ac_cv_c_const = no; then
4379   { test "$extra_verbose" = "yes" && cat << \EOF
4380     Defining const = 
4381 EOF
4382 cat >> confdefs.h <<\EOF
4383 #define const 
4384 EOF
4385 }
4386
4387 fi
4388
4389
4390 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4391 echo "configure:4392: checking whether ${MAKE-make} sets \${MAKE}" >&5
4392 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4393
4394 cat > conftestmake <<\EOF
4395 all:
4396         @echo 'ac_maketemp="${MAKE}"'
4397 EOF
4398 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4399 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4400 if test -n "$ac_maketemp"; then
4401   eval ac_cv_prog_make_${ac_make}_set=yes
4402 else
4403   eval ac_cv_prog_make_${ac_make}_set=no
4404 fi
4405 rm -f conftestmake
4406 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4407   echo "$ac_t""yes" 1>&6
4408   SET_MAKE=
4409 else
4410   echo "$ac_t""no" 1>&6
4411   SET_MAKE="MAKE=${MAKE-make}"
4412 fi
4413
4414
4415 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4416 echo "configure:4417: checking whether byte ordering is bigendian" >&5
4417
4418 ac_cv_c_bigendian=unknown
4419 # See if sys/param.h defines the BYTE_ORDER macro.
4420 cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <sys/types.h>
4424 #include <sys/param.h>
4425 int main() {
4426
4427 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4428  bogus endian macros
4429 #endif
4430 ; return 0; }
4431 EOF
4432 if { (eval echo configure:4433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4433   rm -rf conftest*
4434   # It does; now see whether it defined to BIG_ENDIAN or not.
4435 cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 #include <sys/types.h>
4439 #include <sys/param.h>
4440 int main() {
4441
4442 #if BYTE_ORDER != BIG_ENDIAN
4443  not big endian
4444 #endif
4445 ; return 0; }
4446 EOF
4447 if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4448   rm -rf conftest*
4449   ac_cv_c_bigendian=yes
4450 else
4451   echo "configure: failed program was:" >&5
4452   cat conftest.$ac_ext >&5
4453   rm -rf conftest*
4454   ac_cv_c_bigendian=no
4455 fi
4456 rm -f conftest*
4457 else
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460 fi
4461 rm -f conftest*
4462 if test $ac_cv_c_bigendian = unknown; then
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 main () {
4467   /* Are we little or big endian?  From Harbison&Steele.  */
4468   union
4469   {
4470     long l;
4471     char c[sizeof (long)];
4472   } u;
4473   u.l = 1;
4474   exit (u.c[sizeof (long) - 1] == 1);
4475 }
4476 EOF
4477 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4478 then
4479   ac_cv_c_bigendian=no
4480 else
4481   conftest_rc="$?"
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -fr conftest*
4485   ac_cv_c_bigendian=yes
4486 fi
4487 rm -fr conftest*
4488 fi
4489
4490 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4491 if test $ac_cv_c_bigendian = yes; then
4492   { test "$extra_verbose" = "yes" && cat << \EOF
4493     Defining WORDS_BIGENDIAN
4494 EOF
4495 cat >> confdefs.h <<\EOF
4496 #define WORDS_BIGENDIAN 1
4497 EOF
4498 }
4499
4500 fi
4501
4502
4503 echo $ac_n "checking size of short""... $ac_c" 1>&6
4504 echo "configure:4505: checking size of short" >&5
4505
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <stdio.h>
4510 main()
4511 {
4512   FILE *f=fopen("conftestval", "w");
4513   if (!f) exit(1);
4514   fprintf(f, "%d\n", sizeof(short));
4515   exit(0);
4516 }
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4519 then
4520   ac_cv_sizeof_short=`cat conftestval`
4521 else
4522   conftest_rc="$?"
4523   echo "configure: failed program was:" >&5
4524   cat conftest.$ac_ext >&5
4525   rm -fr conftest*
4526   ac_cv_sizeof_short=0
4527 fi
4528 rm -fr conftest*
4529 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4530 { test "$extra_verbose" = "yes" && cat << EOF
4531     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4532 EOF
4533 cat >> confdefs.h <<EOF
4534 #define SIZEOF_SHORT $ac_cv_sizeof_short
4535 EOF
4536 }
4537
4538
4539 if test "$ac_cv_sizeof_short" = 0; then
4540   echo ""
4541   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4542   echo "*** PANIC *** Please examine config.log for compilation errors."
4543   exit 1
4544 fi
4545 echo $ac_n "checking size of int""... $ac_c" 1>&6
4546 echo "configure:4547: checking size of int" >&5
4547
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <stdio.h>
4552 main()
4553 {
4554   FILE *f=fopen("conftestval", "w");
4555   if (!f) exit(1);
4556   fprintf(f, "%d\n", sizeof(int));
4557   exit(0);
4558 }
4559 EOF
4560 if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4561 then
4562   ac_cv_sizeof_int=`cat conftestval`
4563 else
4564   conftest_rc="$?"
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -fr conftest*
4568   ac_cv_sizeof_int=0
4569 fi
4570 rm -fr conftest*
4571 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4572 { test "$extra_verbose" = "yes" && cat << EOF
4573     Defining SIZEOF_INT = $ac_cv_sizeof_int
4574 EOF
4575 cat >> confdefs.h <<EOF
4576 #define SIZEOF_INT $ac_cv_sizeof_int
4577 EOF
4578 }
4579
4580
4581 echo $ac_n "checking size of long""... $ac_c" 1>&6
4582 echo "configure:4583: checking size of long" >&5
4583
4584 cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 #include <stdio.h>
4588 main()
4589 {
4590   FILE *f=fopen("conftestval", "w");
4591   if (!f) exit(1);
4592   fprintf(f, "%d\n", sizeof(long));
4593   exit(0);
4594 }
4595 EOF
4596 if { (eval echo configure:4597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4597 then
4598   ac_cv_sizeof_long=`cat conftestval`
4599 else
4600   conftest_rc="$?"
4601   echo "configure: failed program was:" >&5
4602   cat conftest.$ac_ext >&5
4603   rm -fr conftest*
4604   ac_cv_sizeof_long=0
4605 fi
4606 rm -fr conftest*
4607 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4608 { test "$extra_verbose" = "yes" && cat << EOF
4609     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4610 EOF
4611 cat >> confdefs.h <<EOF
4612 #define SIZEOF_LONG $ac_cv_sizeof_long
4613 EOF
4614 }
4615
4616
4617 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4618 echo "configure:4619: checking size of long long" >&5
4619
4620 cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 #include <stdio.h>
4624 main()
4625 {
4626   FILE *f=fopen("conftestval", "w");
4627   if (!f) exit(1);
4628   fprintf(f, "%d\n", sizeof(long long));
4629   exit(0);
4630 }
4631 EOF
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4633 then
4634   ac_cv_sizeof_long_long=`cat conftestval`
4635 else
4636   conftest_rc="$?"
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -fr conftest*
4640   ac_cv_sizeof_long_long=0
4641 fi
4642 rm -fr conftest*
4643 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4644 { test "$extra_verbose" = "yes" && cat << EOF
4645     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4646 EOF
4647 cat >> confdefs.h <<EOF
4648 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4649 EOF
4650 }
4651
4652
4653 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4654 echo "configure:4655: checking size of void *" >&5
4655
4656 cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <stdio.h>
4660 main()
4661 {
4662   FILE *f=fopen("conftestval", "w");
4663   if (!f) exit(1);
4664   fprintf(f, "%d\n", sizeof(void *));
4665   exit(0);
4666 }
4667 EOF
4668 if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4669 then
4670   ac_cv_sizeof_void_p=`cat conftestval`
4671 else
4672   conftest_rc="$?"
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -fr conftest*
4676   ac_cv_sizeof_void_p=0
4677 fi
4678 rm -fr conftest*
4679 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4680 { test "$extra_verbose" = "yes" && cat << EOF
4681     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4682 EOF
4683 cat >> confdefs.h <<EOF
4684 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4685 EOF
4686 }
4687
4688
4689
4690 case $opsys in
4691   cygwin* ) cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 #include <cygwin/types.h>
4695 EOF
4696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4697   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4698   rm -rf conftest*
4699   echo "$ac_t""yes" 1>&6
4700                              { test "$extra_verbose" = "yes" && cat << \EOF
4701     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4702 EOF
4703 cat >> confdefs.h <<\EOF
4704 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4705 EOF
4706 }
4707
4708 else
4709   rm -rf conftest*
4710   echo "$ac_t""no" 1>&6
4711 fi
4712 rm -f conftest*
4713  ;;
4714 esac
4715
4716 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4717 echo "configure:4718: checking for long file names" >&5
4718
4719 ac_cv_sys_long_file_names=yes
4720 # Test for long file names in all the places we know might matter:
4721 #      .                the current directory, where building will happen
4722 #      $prefix/lib      where we will be installing things
4723 #      $exec_prefix/lib likewise
4724 # eval it to expand exec_prefix.
4725 #      $TMPDIR          if set, where it might want to write temporary files
4726 # if $TMPDIR is not set:
4727 #      /tmp             where it might want to write temporary files
4728 #      /var/tmp         likewise
4729 #      /usr/tmp         likewise
4730 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4731   ac_tmpdirs="$TMPDIR"
4732 else
4733   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4734 fi
4735 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4736   test -d $ac_dir || continue
4737   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4738   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4739   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4740   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4741   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4742     ac_cv_sys_long_file_names=no
4743     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4744     break
4745   fi
4746   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4747 done
4748
4749 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4750 if test $ac_cv_sys_long_file_names = yes; then
4751   { test "$extra_verbose" = "yes" && cat << \EOF
4752     Defining HAVE_LONG_FILE_NAMES
4753 EOF
4754 cat >> confdefs.h <<\EOF
4755 #define HAVE_LONG_FILE_NAMES 1
4756 EOF
4757 }
4758
4759 fi
4760
4761
4762 echo $ac_n "checking for sin""... $ac_c" 1>&6
4763 echo "configure:4764: checking for sin" >&5
4764
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 /* System header to define __stub macros and hopefully few prototypes,
4769     which can conflict with char sin(); below.  */
4770 #include <assert.h>
4771 /* Override any gcc2 internal prototype to avoid an error.  */
4772 /* We use char because int might match the return type of a gcc2
4773     builtin and then its argument prototype would still apply.  */
4774 char sin();
4775
4776 int main() {
4777
4778 /* The GNU C library defines this for functions which it implements
4779     to always fail with ENOSYS.  Some functions are actually named
4780     something starting with __ and the normal name is an alias.  */
4781 #if defined (__stub_sin) || defined (__stub___sin)
4782 choke me
4783 #else
4784 sin();
4785 #endif
4786
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_func_sin=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_func_sin=no"
4797 fi
4798 rm -f conftest*
4799
4800 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802   :
4803 else
4804   echo "$ac_t""no" 1>&6
4805
4806 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4807 echo "configure:4808: checking for sin in -lm" >&5
4808 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4809
4810 xe_check_libs=" -lm "
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char sin();
4818
4819 int main() {
4820 sin()
4821 ; return 0; }
4822 EOF
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=yes"
4826 else
4827   echo "configure: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   rm -rf conftest*
4830   eval "ac_cv_lib_$ac_lib_var=no"
4831 fi
4832 rm -f conftest*
4833 xe_check_libs=""
4834
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   { test "$extra_verbose" = "yes" && cat << EOF
4840     Defining $ac_tr_lib
4841 EOF
4842 cat >> confdefs.h <<EOF
4843 #define $ac_tr_lib 1
4844 EOF
4845 }
4846
4847   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4848
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853
4854 fi
4855
4856
4857 { test "$extra_verbose" = "yes" && cat << \EOF
4858     Defining LISP_FLOAT_TYPE
4859 EOF
4860 cat >> confdefs.h <<\EOF
4861 #define LISP_FLOAT_TYPE 1
4862 EOF
4863 }
4864
4865
4866 cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 #include <math.h>
4870 int main() {
4871 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   { test "$extra_verbose" = "yes" && cat << \EOF
4877     Defining HAVE_INVERSE_HYPERBOLIC
4878 EOF
4879 cat >> confdefs.h <<\EOF
4880 #define HAVE_INVERSE_HYPERBOLIC 1
4881 EOF
4882 }
4883
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887 fi
4888 rm -f conftest*
4889
4890 echo "checking type of mail spool file locking" 1>&6
4891 echo "configure:4892: checking type of mail spool file locking" >&5
4892 for ac_func in lockf flock
4893 do
4894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4895 echo "configure:4896: checking for $ac_func" >&5
4896
4897 cat > conftest.$ac_ext <<EOF
4898 #line 4899 "configure"
4899 #include "confdefs.h"
4900 /* System header to define __stub macros and hopefully few prototypes,
4901     which can conflict with char $ac_func(); below.  */
4902 #include <assert.h>
4903 /* Override any gcc2 internal prototype to avoid an error.  */
4904 /* We use char because int might match the return type of a gcc2
4905     builtin and then its argument prototype would still apply.  */
4906 char $ac_func();
4907
4908 int main() {
4909
4910 /* The GNU C library defines this for functions which it implements
4911     to always fail with ENOSYS.  Some functions are actually named
4912     something starting with __ and the normal name is an alias.  */
4913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4914 choke me
4915 #else
4916 $ac_func();
4917 #endif
4918
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_func_$ac_func=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_func_$ac_func=no"
4929 fi
4930 rm -f conftest*
4931
4932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4933   echo "$ac_t""yes" 1>&6
4934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4935   { test "$extra_verbose" = "yes" && cat << EOF
4936     Defining $ac_tr_func
4937 EOF
4938 cat >> confdefs.h <<EOF
4939 #define $ac_tr_func 1
4940 EOF
4941 }
4942  
4943 else
4944   echo "$ac_t""no" 1>&6
4945 fi
4946 done
4947
4948 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4949 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4950 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4951 if   test -z "$mail_locking"; then
4952   case "$opsys" in cygwin* | mingw*)
4953     mail_locking=pop ;;
4954   esac
4955 fi
4956
4957 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4958     Defining MAIL_LOCK_LOCKF
4959 EOF
4960 cat >> confdefs.h <<\EOF
4961 #define MAIL_LOCK_LOCKF 1
4962 EOF
4963 }
4964
4965 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4966     Defining MAIL_LOCK_FLOCK
4967 EOF
4968 cat >> confdefs.h <<\EOF
4969 #define MAIL_LOCK_FLOCK 1
4970 EOF
4971 }
4972
4973 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4974     Defining MAIL_LOCK_LOCKING
4975 EOF
4976 cat >> confdefs.h <<\EOF
4977 #define MAIL_LOCK_LOCKING 1
4978 EOF
4979 }
4980
4981 elif test "$mail_locking" = "pop"; then
4982   with_pop=yes
4983   mail_locking=
4984 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4985     Defining MAIL_LOCK_DOT
4986 EOF
4987 cat >> confdefs.h <<\EOF
4988 #define MAIL_LOCK_DOT 1
4989 EOF
4990 }
4991
4992 fi
4993 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4994   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4995 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4996   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4997 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4998   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4999
5000 case "$opsys" in decosf*)
5001   
5002 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5003 echo "configure:5004: checking for cma_open in -lpthreads" >&5
5004 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5005
5006 xe_check_libs=" -lpthreads "
5007 cat > conftest.$ac_ext <<EOF
5008 #line 5009 "configure"
5009 #include "confdefs.h"
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char cma_open();
5014
5015 int main() {
5016 cma_open()
5017 ; return 0; }
5018 EOF
5019 if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5020   rm -rf conftest*
5021   eval "ac_cv_lib_$ac_lib_var=yes"
5022 else
5023   echo "configure: failed program was:" >&5
5024   cat conftest.$ac_ext >&5
5025   rm -rf conftest*
5026   eval "ac_cv_lib_$ac_lib_var=no"
5027 fi
5028 rm -f conftest*
5029 xe_check_libs=""
5030
5031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5032   echo "$ac_t""yes" 1>&6
5033     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5035   { test "$extra_verbose" = "yes" && cat << EOF
5036     Defining $ac_tr_lib
5037 EOF
5038 cat >> confdefs.h <<EOF
5039 #define $ac_tr_lib 1
5040 EOF
5041 }
5042
5043   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5044
5045 else
5046   echo "$ac_t""no" 1>&6
5047 fi
5048
5049
5050   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5051     c_switch_site="$c_switch_site -threads" ;;
5052 esac
5053
5054
5055 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5056 echo "configure:5057: checking whether the -xildoff compiler flag is required" >&5
5057 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5058   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5059     then echo "$ac_t""no" 1>&6;
5060     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
5061   fi
5062   else echo "$ac_t""no" 1>&6
5063 fi
5064
5065 if test "$opsys" = "sol2"; then
5066   if test "$os_release" -ge 56; then
5067     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5068 echo "configure:5069: checking for \"-z ignore\" linker flag" >&5
5069     case "`ld -h 2>&1`" in
5070       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5071         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5072       *) echo "$ac_t""no" 1>&6 ;;
5073     esac
5074   fi
5075 fi
5076
5077
5078 echo "checking "for specified window system"" 1>&6
5079 echo "configure:5080: checking "for specified window system"" >&5
5080
5081
5082 GNOME_CONFIG=no
5083 GTK_CONFIG=no
5084
5085 if test "$with_gnome" != "no"; then
5086    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5087 echo "configure:5088: checking for GNOME configuration script" >&5
5088    for possible in gnome-config
5089    do
5090       possible_version=`${possible} --version 2> /dev/null`
5091       if test "x${possible_version}" != "x"; then
5092               GNOME_CONFIG="${possible}"
5093               with_gnome=yes
5094               with_gtk=yes
5095               break
5096       fi
5097    done
5098    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5099 fi
5100
5101 if test "${GNOME_CONFIG}" != "no"; then
5102       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5103       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5104       { test "$extra_verbose" = "yes" && cat << \EOF
5105     Defining HAVE_GNOME
5106 EOF
5107 cat >> confdefs.h <<\EOF
5108 #define HAVE_GNOME 1
5109 EOF
5110 }
5111
5112       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5113       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5114 fi
5115
5116 if test "$with_gtk" != "no";then
5117    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5118 echo "configure:5119: checking for GTK configuration script" >&5
5119    for possible in gtk12-config gtk14-config gtk-config
5120    do
5121       possible_version=`${possible} --version 2> /dev/null`
5122       if test "x${possible_version}" != "x"; then
5123               GTK_CONFIG="${possible}"
5124       fi
5125       case "${possible_version}" in
5126         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5127         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5128         1.2.*)
5129                 with_gtk=yes
5130                 break
5131                 ;;
5132         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5133       esac
5134    done
5135    echo "$ac_t""${GTK_CONFIG}" 1>&6
5136 fi
5137
5138 if test "${GTK_CONFIG}" != "no"; then
5139       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5140 echo "configure:5141: checking gtk version" >&5
5141       GTK_VERSION=`${GTK_CONFIG} --version`
5142       echo "$ac_t""${GTK_VERSION}" 1>&6
5143
5144       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5145 echo "configure:5146: checking gtk libs" >&5
5146       GTK_LIBS=`${GTK_CONFIG} --libs`
5147       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5148       echo "$ac_t""${GTK_LIBS}" 1>&6
5149
5150       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5151 echo "configure:5152: checking gtk cflags" >&5
5152       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5153       if test "$GCC" = "yes"; then
5154         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5155       fi
5156       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5157       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5158
5159       
5160 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5161 echo "configure:5162: checking for main in -lgdk_imlib" >&5
5162 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5163
5164 xe_check_libs=" -lgdk_imlib "
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168
5169 int main() {
5170 main()
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_lib_$ac_lib_var=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_lib_$ac_lib_var=no"
5181 fi
5182 rm -f conftest*
5183 xe_check_libs=""
5184
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5186   echo "$ac_t""yes" 1>&6
5187   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5188 else
5189   echo "$ac_t""no" 1>&6
5190 fi
5191
5192
5193       
5194 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5195 echo "configure:5196: checking for Imlib_init in -lImlib" >&5
5196 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5197
5198 xe_check_libs=" -lImlib "
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char Imlib_init();
5206
5207 int main() {
5208 Imlib_init()
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   eval "ac_cv_lib_$ac_lib_var=yes"
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   eval "ac_cv_lib_$ac_lib_var=no"
5219 fi
5220 rm -f conftest*
5221 xe_check_libs=""
5222
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5224   echo "$ac_t""yes" 1>&6
5225   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5226 else
5227   echo "$ac_t""no" 1>&6
5228 fi
5229
5230
5231       for ac_func in gdk_imlib_init
5232 do
5233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5234 echo "configure:5235: checking for $ac_func" >&5
5235
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5238 "configure"
5238 #include "confdefs.h"
5239 /* System header to define __stub macros and hopefully few prototypes,
5240     which can conflict with char $ac_func(); below.  */
5241 #include <assert.h>
5242 /* Override any gcc2 internal prototype to avoid an error.  */
5243 /* We use char because int might match the return type of a gcc2
5244     builtin and then its argument prototype would still apply.  */
5245 char $ac_func();
5246
5247 int main() {
5248
5249 /* The GNU C library defines this for functions which it implements
5250     to always fail with ENOSYS.  Some functions are actually named
5251     something starting with __ and the normal name is an alias.  */
5252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5253 choke me
5254 #else
5255 $ac_func();
5256 #endif
5257
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261   rm -rf conftest*
5262   eval "ac_cv_func_$ac_func=yes"
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   eval "ac_cv_func_$ac_func=no"
5268 fi
5269 rm -f conftest*
5270
5271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5272   echo "$ac_t""yes" 1>&6
5273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5274   { test "$extra_verbose" = "yes" && cat << EOF
5275     Defining $ac_tr_func
5276 EOF
5277 cat >> confdefs.h <<EOF
5278 #define $ac_tr_func 1
5279 EOF
5280 }
5281  
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285 done
5286
5287
5288       { test "$extra_verbose" = "yes" && cat << \EOF
5289     Defining HAVE_XPM
5290 EOF
5291 cat >> confdefs.h <<\EOF
5292 #define HAVE_XPM 1
5293 EOF
5294 }
5295
5296       { test "$extra_verbose" = "yes" && cat << \EOF
5297     Defining HAVE_GTK
5298 EOF
5299 cat >> confdefs.h <<\EOF
5300 #define HAVE_GTK 1
5301 EOF
5302 }
5303
5304       
5305
5306       window_system=gtk
5307       with_gtk=yes
5308       with_x11=no
5309
5310       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5311       test "${with_toolbars}" != no && with_toolbars=gtk
5312       test "${with_menubars}" != "no" && with_menubars=gtk
5313       test "${with_dialogs}" != "no" && with_dialogs=gtk
5314       test "${with_widgets}" != "no" && with_widgets=gtk
5315
5316       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5317    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5318  fi
5319       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5320    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5321  fi
5322       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5323    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5324  fi
5325       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5326    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5327  fi
5328
5329             OLD_CFLAGS="${CFLAGS}"
5330       OLD_CPPFLAGS="${CPPFLAGS}"
5331       OLD_LDFLAGS="${LDFLAGS}"
5332       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5333       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5334       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5335       for ac_hdr in glade/glade.h glade.h
5336 do
5337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5339 echo "configure:5340: checking for $ac_hdr" >&5
5340
5341 cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344 #include <$ac_hdr>
5345 EOF
5346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5347 { (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5349 if test -z "$ac_err"; then
5350   rm -rf conftest*
5351   eval "ac_cv_header_$ac_safe=yes"
5352 else
5353   echo "$ac_err" >&5
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_header_$ac_safe=no"
5358 fi
5359 rm -f conftest*
5360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5361   echo "$ac_t""yes" 1>&6
5362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5363   { test "$extra_verbose" = "yes" && cat << EOF
5364     Defining $ac_tr_hdr
5365 EOF
5366 cat >> confdefs.h <<EOF
5367 #define $ac_tr_hdr 1
5368 EOF
5369 }
5370  
5371 else
5372   echo "$ac_t""no" 1>&6
5373 fi
5374 done
5375
5376       
5377 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5378 echo "configure:5379: checking for main in -lxml" >&5
5379 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5380
5381 xe_check_libs=" -lxml "
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385
5386 int main() {
5387 main()
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_lib_$ac_lib_var=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_lib_$ac_lib_var=no"
5398 fi
5399 rm -f conftest*
5400 xe_check_libs=""
5401
5402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5403   echo "$ac_t""yes" 1>&6
5404   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408
5409
5410       
5411 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5412 echo "configure:5413: checking for main in -lglade" >&5
5413 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5414
5415 xe_check_libs=" -lglade "
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419
5420 int main() {
5421 main()
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   eval "ac_cv_lib_$ac_lib_var=yes"
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=no"
5432 fi
5433 rm -f conftest*
5434 xe_check_libs=""
5435
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5437   echo "$ac_t""yes" 1>&6
5438   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5439 else
5440   echo "$ac_t""no" 1>&6
5441 fi
5442
5443
5444       
5445 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5446 echo "configure:5447: checking for main in -lglade-gnome" >&5
5447 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5448
5449 xe_check_libs=" -lglade-gnome "
5450 cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453
5454 int main() {
5455 main()
5456 ; return 0; }
5457 EOF
5458 if { (eval echo configure:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5459   rm -rf conftest*
5460   eval "ac_cv_lib_$ac_lib_var=yes"
5461 else
5462   echo "configure: failed program was:" >&5
5463   cat conftest.$ac_ext >&5
5464   rm -rf conftest*
5465   eval "ac_cv_lib_$ac_lib_var=no"
5466 fi
5467 rm -f conftest*
5468 xe_check_libs=""
5469
5470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5471   echo "$ac_t""yes" 1>&6
5472   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5473 else
5474   echo "$ac_t""no" 1>&6
5475 fi
5476
5477
5478       cat > conftest.$ac_ext <<EOF
5479 #line 5480 "configure"
5480 #include "confdefs.h"
5481 #include <glade/glade-xml.h>
5482 EOF
5483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5484   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5485   rm -rf conftest*
5486   echo "$ac_t""yes" 1>&6
5487                        { test "$extra_verbose" = "yes" && cat << \EOF
5488     Defining LIBGLADE_XML_TXTDOMAIN = 1
5489 EOF
5490 cat >> confdefs.h <<\EOF
5491 #define LIBGLADE_XML_TXTDOMAIN 1
5492 EOF
5493 }
5494
5495 else
5496   rm -rf conftest*
5497   echo "$ac_t""no" 1>&6
5498 fi
5499 rm -f conftest*
5500
5501       CFLAGS="${OLD_CFLAGS}"
5502       CPPFLAGS="${OLD_CPPFLAGS}"
5503       LDFLAGS="${OLD_LDFLAGS}"
5504 fi
5505
5506
5507 if test "$with_x11" != "no"; then
5508     test "$x_includes $x_libraries" != "NONE NONE" && \
5509    window_system=x11 with_x11=yes
5510
5511         
5512       if test "$x_includes $x_libraries" = "NONE NONE" \
5513     -a -n "$OPENWINHOME" \
5514     -a "$OPENWINHOME" != "/usr/openwin" \
5515     -a -d "$OPENWINHOME"; then
5516       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5517       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5518       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5519   fi
5520
5521   if test "$x_includes" = "NONE"; then
5522                     for dir in "/usr/X11" "/usr/X11R6"; do
5523       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5524     done
5525   fi
5526
5527   if test "$x_libraries" = "NONE"; then
5528     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5529       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5530     done
5531   fi
5532
5533   # If we find X, set shell vars x_includes and x_libraries to the
5534 # paths, otherwise set no_x=yes.
5535 # Uses ac_ vars as temps to allow command line to override cache and checks.
5536 # --without-x overrides everything else, but does not touch the cache.
5537 echo $ac_n "checking for X""... $ac_c" 1>&6
5538 echo "configure:5539: checking for X" >&5
5539
5540 # Check whether --with-x or --without-x was given.
5541 if test "${with_x+set}" = set; then
5542   withval="$with_x"
5543   :
5544 fi
5545
5546 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5547 if test "x$with_x" = xno; then
5548   # The user explicitly disabled X.
5549   have_x=disabled
5550 else
5551   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5552     # Both variables are already set.
5553     have_x=yes
5554   else
5555
5556 # One or both of the vars are not set, and there is no cached value.
5557 ac_x_includes=NO ac_x_libraries=NO
5558 rm -fr conftestdir
5559 if mkdir conftestdir; then
5560   cd conftestdir
5561   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5562   cat > Imakefile <<'EOF'
5563 acfindx:
5564         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5565 EOF
5566   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5567     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5568     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5569     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5570     for ac_extension in a so sl; do
5571       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5572         test -f $ac_im_libdir/libX11.$ac_extension; then
5573         ac_im_usrlibdir=$ac_im_libdir; break
5574       fi
5575     done
5576     # Screen out bogus values from the imake configuration.  They are
5577     # bogus both because they are the default anyway, and because
5578     # using them would break gcc on systems where it needs fixed includes.
5579     case "$ac_im_incroot" in
5580         /usr/include) ;;
5581         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5582     esac
5583     case "$ac_im_usrlibdir" in
5584         /usr/lib | /lib) ;;
5585         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5586     esac
5587   fi
5588   cd ..
5589   rm -fr conftestdir
5590 fi
5591
5592 if test "$ac_x_includes" = NO; then
5593   # Guess where to find include files, by looking for this one X11 .h file.
5594   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5595
5596   # First, try using that file with no special directory specified.
5597 cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 #include <$x_direct_test_include>
5601 EOF
5602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5603 { (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5605 if test -z "$ac_err"; then
5606   rm -rf conftest*
5607   # We can compile using X headers with no special include directory.
5608 ac_x_includes=
5609 else
5610   echo "$ac_err" >&5
5611   echo "configure: failed program was:" >&5
5612   cat conftest.$ac_ext >&5
5613   rm -rf conftest*
5614   # Look for the header file in a standard set of common directories.
5615 # Check X11 before X11Rn because it is often a symlink to the current release.
5616   for ac_dir in               \
5617     /usr/X11/include          \
5618     /usr/X11R6/include        \
5619     /usr/X11R5/include        \
5620     /usr/X11R4/include        \
5621                               \
5622     /usr/include/X11          \
5623     /usr/include/X11R6        \
5624     /usr/include/X11R5        \
5625     /usr/include/X11R4        \
5626                               \
5627     /usr/local/X11/include    \
5628     /usr/local/X11R6/include  \
5629     /usr/local/X11R5/include  \
5630     /usr/local/X11R4/include  \
5631                               \
5632     /usr/local/include/X11    \
5633     /usr/local/include/X11R6  \
5634     /usr/local/include/X11R5  \
5635     /usr/local/include/X11R4  \
5636                               \
5637     /usr/X386/include         \
5638     /usr/x386/include         \
5639     /usr/XFree86/include/X11  \
5640                               \
5641     /usr/include              \
5642     /usr/local/include        \
5643     /usr/unsupported/include  \
5644     /usr/athena/include       \
5645     /usr/local/x11r5/include  \
5646     /usr/lpp/Xamples/include  \
5647                               \
5648     /usr/openwin/include      \
5649     /usr/openwin/share/include \
5650     ; \
5651   do
5652     if test -r "$ac_dir/$x_direct_test_include"; then
5653       ac_x_includes=$ac_dir
5654       break
5655     fi
5656   done
5657 fi
5658 rm -f conftest*
5659 fi # $ac_x_includes = NO
5660
5661 if test "$ac_x_libraries" = NO; then
5662   # Check for the libraries.
5663
5664   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5665   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5666
5667   # See if we find them without any special options.
5668   # Don't add to $LIBS permanently.
5669   ac_save_LIBS="$LIBS"
5670   LIBS="-l$x_direct_test_library $LIBS"
5671 cat > conftest.$ac_ext <<EOF
5672 #line 5673 "configure"
5673 #include "confdefs.h"
5674
5675 int main() {
5676 ${x_direct_test_function}()
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   LIBS="$ac_save_LIBS"
5682 # We can link X programs with no special library path.
5683 ac_x_libraries=
5684 else
5685   echo "configure: failed program was:" >&5
5686   cat conftest.$ac_ext >&5
5687   rm -rf conftest*
5688   LIBS="$ac_save_LIBS"
5689 # First see if replacing the include by lib works.
5690 # Check X11 before X11Rn because it is often a symlink to the current release.
5691 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5692     /usr/X11/lib          \
5693     /usr/X11R6/lib        \
5694     /usr/X11R5/lib        \
5695     /usr/X11R4/lib        \
5696                           \
5697     /usr/lib/X11          \
5698     /usr/lib/X11R6        \
5699     /usr/lib/X11R5        \
5700     /usr/lib/X11R4        \
5701                           \
5702     /usr/local/X11/lib    \
5703     /usr/local/X11R6/lib  \
5704     /usr/local/X11R5/lib  \
5705     /usr/local/X11R4/lib  \
5706                           \
5707     /usr/local/lib/X11    \
5708     /usr/local/lib/X11R6  \
5709     /usr/local/lib/X11R5  \
5710     /usr/local/lib/X11R4  \
5711                           \
5712     /usr/X386/lib         \
5713     /usr/x386/lib         \
5714     /usr/XFree86/lib/X11  \
5715                           \
5716     /usr/lib              \
5717     /usr/local/lib        \
5718     /usr/unsupported/lib  \
5719     /usr/athena/lib       \
5720     /usr/local/x11r5/lib  \
5721     /usr/lpp/Xamples/lib  \
5722     /lib/usr/lib/X11      \
5723                           \
5724     /usr/openwin/lib      \
5725     /usr/openwin/share/lib \
5726     ; \
5727 do
5728   for ac_extension in a so sl; do
5729     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5730       ac_x_libraries=$ac_dir
5731       break 2
5732     fi
5733   done
5734 done
5735 fi
5736 rm -f conftest*
5737 fi # $ac_x_libraries = NO
5738
5739 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5740   # Didn't find X anywhere.  Cache the known absence of X.
5741   ac_cv_have_x="have_x=no"
5742 else
5743   # Record where we found X for the cache.
5744   ac_cv_have_x="have_x=yes \
5745                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5746 fi
5747   fi
5748   eval "$ac_cv_have_x"
5749 fi # $with_x != no
5750
5751 if test "$have_x" != yes; then
5752   echo "$ac_t""$have_x" 1>&6
5753   no_x=yes
5754 else
5755   # If each of the values was on the command line, it overrides each guess.
5756   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5757   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5758   # Update the cache value to reflect the command line values.
5759   ac_cv_have_x="have_x=yes \
5760                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5761   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5762 fi
5763
5764 if test "$no_x" = yes; then
5765   # Not all programs may use this symbol, but it does not hurt to define it.
5766   { test "$extra_verbose" = "yes" && cat << \EOF
5767     Defining X_DISPLAY_MISSING
5768 EOF
5769 cat >> confdefs.h <<\EOF
5770 #define X_DISPLAY_MISSING 1
5771 EOF
5772 }
5773
5774   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5775 else
5776   if test -n "$x_includes"; then
5777     X_CFLAGS="$X_CFLAGS -I$x_includes"
5778   fi
5779
5780   # It would also be nice to do this for all -L options, not just this one.
5781   if test -n "$x_libraries"; then
5782     X_LIBS="$X_LIBS -L$x_libraries"
5783     # For Solaris; some versions of Sun CC require a space after -R and
5784     # others require no space.  Words are not sufficient . . . .
5785     case "`(uname -sr) 2>/dev/null`" in
5786     "SunOS 5"*)
5787       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5788 echo "configure:5789: checking whether -R must be followed by a space" >&5
5789       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5790       cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793
5794 int main() {
5795
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   ac_R_nospace=yes
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   ac_R_nospace=no
5806 fi
5807 rm -f conftest*
5808       if test $ac_R_nospace = yes; then
5809         echo "$ac_t""no" 1>&6
5810         X_LIBS="$X_LIBS -R$x_libraries"
5811       else
5812         LIBS="$ac_xsave_LIBS -R $x_libraries"
5813         cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816
5817 int main() {
5818
5819 ; return 0; }
5820 EOF
5821 if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5822   rm -rf conftest*
5823   ac_R_space=yes
5824 else
5825   echo "configure: failed program was:" >&5
5826   cat conftest.$ac_ext >&5
5827   rm -rf conftest*
5828   ac_R_space=no
5829 fi
5830 rm -f conftest*
5831         if test $ac_R_space = yes; then
5832           echo "$ac_t""yes" 1>&6
5833           X_LIBS="$X_LIBS -R $x_libraries"
5834         else
5835           echo "$ac_t""neither works" 1>&6
5836         fi
5837       fi
5838       LIBS="$ac_xsave_LIBS"
5839     esac
5840   fi
5841
5842   # Check for system-dependent libraries X programs must link with.
5843   # Do this before checking for the system-independent R6 libraries
5844   # (-lICE), since we may need -lsocket or whatever for X linking.
5845
5846   if test "$ISC" = yes; then
5847     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5848   else
5849     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5850     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5851     # the Alpha needs dnet_stub (dnet does not exist).
5852     if test "$with_dnet" = "no" ; then
5853 ac_cv_lib_dnet_dnet_ntoa=no
5854 else
5855
5856 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5857 echo "configure:5858: checking for dnet_ntoa in -ldnet" >&5
5858 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5859
5860 xe_check_libs=" -ldnet "
5861 cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 /* Override any gcc2 internal prototype to avoid an error.  */
5865 /* We use char because int might match the return type of a gcc2
5866     builtin and then its argument prototype would still apply.  */
5867 char dnet_ntoa();
5868
5869 int main() {
5870 dnet_ntoa()
5871 ; return 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5874   rm -rf conftest*
5875   eval "ac_cv_lib_$ac_lib_var=yes"
5876 else
5877   echo "configure: failed program was:" >&5
5878   cat conftest.$ac_ext >&5
5879   rm -rf conftest*
5880   eval "ac_cv_lib_$ac_lib_var=no"
5881 fi
5882 rm -f conftest*
5883 xe_check_libs=""
5884
5885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5886   echo "$ac_t""yes" 1>&6
5887   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5888 else
5889   echo "$ac_t""no" 1>&6
5890 fi
5891
5892 fi
5893
5894     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5895       
5896 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5897 echo "configure:5898: checking for dnet_ntoa in -ldnet_stub" >&5
5898 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5899
5900 xe_check_libs=" -ldnet_stub "
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* Override any gcc2 internal prototype to avoid an error.  */
5905 /* We use char because int might match the return type of a gcc2
5906     builtin and then its argument prototype would still apply.  */
5907 char dnet_ntoa();
5908
5909 int main() {
5910 dnet_ntoa()
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_lib_$ac_lib_var=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=no"
5921 fi
5922 rm -f conftest*
5923 xe_check_libs=""
5924
5925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5926   echo "$ac_t""yes" 1>&6
5927   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5928 else
5929   echo "$ac_t""no" 1>&6
5930 fi
5931
5932
5933     fi
5934
5935     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5936     # to get the SysV transport functions.
5937     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5938     # needs -lnsl.
5939     # The nsl library prevents programs from opening the X display
5940     # on Irix 5.2, according to dickey@clark.net.
5941     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5942 echo "configure:5943: checking for gethostbyname" >&5
5943
5944 cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 /* System header to define __stub macros and hopefully few prototypes,
5948     which can conflict with char gethostbyname(); below.  */
5949 #include <assert.h>
5950 /* Override any gcc2 internal prototype to avoid an error.  */
5951 /* We use char because int might match the return type of a gcc2
5952     builtin and then its argument prototype would still apply.  */
5953 char gethostbyname();
5954
5955 int main() {
5956
5957 /* The GNU C library defines this for functions which it implements
5958     to always fail with ENOSYS.  Some functions are actually named
5959     something starting with __ and the normal name is an alias.  */
5960 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5961 choke me
5962 #else
5963 gethostbyname();
5964 #endif
5965
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969   rm -rf conftest*
5970   eval "ac_cv_func_gethostbyname=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_func_gethostbyname=no"
5976 fi
5977 rm -f conftest*
5978
5979 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5980   echo "$ac_t""yes" 1>&6
5981   :
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985
5986     if test $ac_cv_func_gethostbyname = no; then
5987       
5988 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5989 echo "configure:5990: checking for gethostbyname in -lnsl" >&5
5990 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5991
5992 xe_check_libs=" -lnsl "
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char gethostbyname();
6000
6001 int main() {
6002 gethostbyname()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 xe_check_libs=""
6016
6017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6018   echo "$ac_t""yes" 1>&6
6019   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6020 else
6021   echo "$ac_t""no" 1>&6
6022 fi
6023
6024
6025     fi
6026
6027     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6028     # socket/setsockopt and other routines are undefined under SCO ODT
6029     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6030     # on later versions), says simon@lia.di.epfl.ch: it contains
6031     # gethostby* variants that don't use the nameserver (or something).
6032     # -lsocket must be given before -lnsl if both are needed.
6033     # We assume that if connect needs -lnsl, so does gethostbyname.
6034     echo $ac_n "checking for connect""... $ac_c" 1>&6
6035 echo "configure:6036: checking for connect" >&5
6036
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 /* System header to define __stub macros and hopefully few prototypes,
6041     which can conflict with char connect(); below.  */
6042 #include <assert.h>
6043 /* Override any gcc2 internal prototype to avoid an error.  */
6044 /* We use char because int might match the return type of a gcc2
6045     builtin and then its argument prototype would still apply.  */
6046 char connect();
6047
6048 int main() {
6049
6050 /* The GNU C library defines this for functions which it implements
6051     to always fail with ENOSYS.  Some functions are actually named
6052     something starting with __ and the normal name is an alias.  */
6053 #if defined (__stub_connect) || defined (__stub___connect)
6054 choke me
6055 #else
6056 connect();
6057 #endif
6058
6059 ; return 0; }
6060 EOF
6061 if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062   rm -rf conftest*
6063   eval "ac_cv_func_connect=yes"
6064 else
6065   echo "configure: failed program was:" >&5
6066   cat conftest.$ac_ext >&5
6067   rm -rf conftest*
6068   eval "ac_cv_func_connect=no"
6069 fi
6070 rm -f conftest*
6071
6072 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6073   echo "$ac_t""yes" 1>&6
6074   :
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078
6079     if test $ac_cv_func_connect = no; then
6080       
6081 xe_msg_checking="for connect in -lsocket"
6082 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6083 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6084 echo "configure:6085: checking "$xe_msg_checking"" >&5
6085 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6086
6087 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.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 connect();
6095
6096 int main() {
6097 connect()
6098 ; return 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101   rm -rf conftest*
6102   eval "ac_cv_lib_$ac_lib_var=yes"
6103 else
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=no"
6108 fi
6109 rm -f conftest*
6110 xe_check_libs=""
6111
6112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6113   echo "$ac_t""yes" 1>&6
6114   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6115 else
6116   echo "$ac_t""no" 1>&6
6117 fi
6118
6119
6120     fi
6121
6122     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6123     echo $ac_n "checking for remove""... $ac_c" 1>&6
6124 echo "configure:6125: checking for remove" >&5
6125
6126 cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char remove(); below.  */
6131 #include <assert.h>
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char remove();
6136
6137 int main() {
6138
6139 /* The GNU C library defines this for functions which it implements
6140     to always fail with ENOSYS.  Some functions are actually named
6141     something starting with __ and the normal name is an alias.  */
6142 #if defined (__stub_remove) || defined (__stub___remove)
6143 choke me
6144 #else
6145 remove();
6146 #endif
6147
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_func_remove=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_func_remove=no"
6158 fi
6159 rm -f conftest*
6160
6161 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163   :
6164 else
6165   echo "$ac_t""no" 1>&6
6166 fi
6167
6168     if test $ac_cv_func_remove = no; then
6169       
6170 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6171 echo "configure:6172: checking for remove in -lposix" >&5
6172 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6173
6174 xe_check_libs=" -lposix "
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.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 remove();
6182
6183 int main() {
6184 remove()
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   eval "ac_cv_lib_$ac_lib_var=yes"
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   eval "ac_cv_lib_$ac_lib_var=no"
6195 fi
6196 rm -f conftest*
6197 xe_check_libs=""
6198
6199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6200   echo "$ac_t""yes" 1>&6
6201   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205
6206
6207     fi
6208
6209     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6210     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6211 echo "configure:6212: checking for shmat" >&5
6212
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 /* System header to define __stub macros and hopefully few prototypes,
6217     which can conflict with char shmat(); below.  */
6218 #include <assert.h>
6219 /* Override any gcc2 internal prototype to avoid an error.  */
6220 /* We use char because int might match the return type of a gcc2
6221     builtin and then its argument prototype would still apply.  */
6222 char shmat();
6223
6224 int main() {
6225
6226 /* The GNU C library defines this for functions which it implements
6227     to always fail with ENOSYS.  Some functions are actually named
6228     something starting with __ and the normal name is an alias.  */
6229 #if defined (__stub_shmat) || defined (__stub___shmat)
6230 choke me
6231 #else
6232 shmat();
6233 #endif
6234
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_func_shmat=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_func_shmat=no"
6245 fi
6246 rm -f conftest*
6247
6248 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6249   echo "$ac_t""yes" 1>&6
6250   :
6251 else
6252   echo "$ac_t""no" 1>&6
6253 fi
6254
6255     if test $ac_cv_func_shmat = no; then
6256       
6257 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6258 echo "configure:6259: checking for shmat in -lipc" >&5
6259 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6260
6261 xe_check_libs=" -lipc "
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* Override any gcc2 internal prototype to avoid an error.  */
6266 /* We use char because int might match the return type of a gcc2
6267     builtin and then its argument prototype would still apply.  */
6268 char shmat();
6269
6270 int main() {
6271 shmat()
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_lib_$ac_lib_var=no"
6282 fi
6283 rm -f conftest*
6284 xe_check_libs=""
6285
6286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6287   echo "$ac_t""yes" 1>&6
6288   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6289 else
6290   echo "$ac_t""no" 1>&6
6291 fi
6292
6293
6294     fi
6295   fi
6296
6297   # Check for libraries that X11R6 Xt/Xaw programs need.
6298   ac_save_LDFLAGS="$LDFLAGS"
6299   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6300   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6301   # check for ICE first), but we must link in the order -lSM -lICE or
6302   # we get undefined symbols.  So assume we have SM if we have ICE.
6303   # These have to be linked with before -lX11, unlike the other
6304   # libraries we check for below, so use a different variable.
6305   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6306   
6307 xe_msg_checking="for IceConnectionNumber in -lICE"
6308 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6309 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6310 echo "configure:6311: checking "$xe_msg_checking"" >&5
6311 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6312
6313 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317 /* Override any gcc2 internal prototype to avoid an error.  */
6318 /* We use char because int might match the return type of a gcc2
6319     builtin and then its argument prototype would still apply.  */
6320 char IceConnectionNumber();
6321
6322 int main() {
6323 IceConnectionNumber()
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   eval "ac_cv_lib_$ac_lib_var=yes"
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   eval "ac_cv_lib_$ac_lib_var=no"
6334 fi
6335 rm -f conftest*
6336 xe_check_libs=""
6337
6338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6339   echo "$ac_t""yes" 1>&6
6340   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6341 else
6342   echo "$ac_t""no" 1>&6
6343 fi
6344
6345
6346   LDFLAGS="$ac_save_LDFLAGS"
6347
6348 fi
6349  # Autoconf claims to find X library and include dirs for us.
6350   if test "$no_x" = "yes"
6351   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6352   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6353   fi
6354 fi
6355
6356
6357 if test "$with_x11" = "yes"; then
6358   { test "$extra_verbose" = "yes" && cat << \EOF
6359     Defining HAVE_X_WINDOWS
6360 EOF
6361 cat >> confdefs.h <<\EOF
6362 #define HAVE_X_WINDOWS 1
6363 EOF
6364 }
6365
6366   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6367   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6368
6369
6370     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6371 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6372 echo "configure:6373: checking for Xm/Xm.h" >&5
6373
6374 cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 #include <Xm/Xm.h>
6378 EOF
6379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6380 { (eval echo configure:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6382 if test -z "$ac_err"; then
6383   rm -rf conftest*
6384   eval "ac_cv_header_$ac_safe=yes"
6385 else
6386   echo "$ac_err" >&5
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389   rm -rf conftest*
6390   eval "ac_cv_header_$ac_safe=no"
6391 fi
6392 rm -f conftest*
6393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6394   echo "$ac_t""yes" 1>&6
6395   
6396 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6397 echo "configure:6398: checking for XmStringFree in -lXm" >&5
6398 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6399
6400 xe_check_libs=" -lXm "
6401 cat > conftest.$ac_ext <<EOF
6402 #line 6403 "configure"
6403 #include "confdefs.h"
6404 /* Override any gcc2 internal prototype to avoid an error.  */
6405 /* We use char because int might match the return type of a gcc2
6406     builtin and then its argument prototype would still apply.  */
6407 char XmStringFree();
6408
6409 int main() {
6410 XmStringFree()
6411 ; return 0; }
6412 EOF
6413 if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414   rm -rf conftest*
6415   eval "ac_cv_lib_$ac_lib_var=yes"
6416 else
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=no"
6421 fi
6422 rm -f conftest*
6423 xe_check_libs=""
6424
6425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6426   echo "$ac_t""yes" 1>&6
6427   got_motif=yes
6428 else
6429   echo "$ac_t""no" 1>&6
6430 fi
6431
6432
6433 else
6434   echo "$ac_t""no" 1>&6
6435 fi
6436
6437
6438   if test "$got_motif" != "yes"; then
6439             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6440                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6441       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6442       if test -d "$lib_dir" -a -d "$inc_dir"; then
6443         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6444           x_libraries="$lib_dir $x_libraries"
6445           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6446         esac
6447         case "$x_includes" in "$inc_dir"* ) ;; *)
6448           x_includes="$inc_dir $x_includes"
6449           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6450         esac
6451         break;  fi
6452     done
6453   fi
6454
6455     for rel in "X11R6" "X11R5" "X11R4"; do
6456     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6457     if test -d "$lib_dir" -a -d "$inc_dir"; then
6458       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6459         x_libraries="$x_libraries $lib_dir"
6460         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6461       esac
6462       case "$x_includes" in "$inc_dir"* ) ;; *)
6463         x_includes="$x_includes $inc_dir"
6464         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6465       esac
6466       break;     fi
6467   done
6468
6469     case "$opsys" in
6470   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 ;;
6471   esac
6472
6473   ld_switch_x_site="$X_LIBS"
6474
6475   
6476 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6477     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6478   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6479   
6480         runpath="" runpath_dirs=""
6481   if test -n "$LD_RUN_PATH"; then
6482     runpath="$LD_RUN_PATH"
6483   elif test "$GCC" = "yes"; then
6484         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6485     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6486     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6487     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6488       case "$arg" in P,* | -L* | -R* )
6489         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6490           {
6491 xe_runpath_dir="$dir"
6492   test "$xe_runpath_dir" != "/lib"     -a \
6493         "$xe_runpath_dir" != "/usr/lib" -a \
6494         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6495   eval "$xe_add_unique_runpath_dir"
6496 }
6497         done ;;
6498       esac
6499     done
6500     ld_switch_run="$ld_switch_run_save"
6501     rm -f conftest*
6502   else
6503         for arg in $ld_switch_site $ld_switch_x_site; do
6504       case "$arg" in -L*) {
6505 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6506   test "$xe_runpath_dir" != "/lib"     -a \
6507         "$xe_runpath_dir" != "/usr/lib" -a \
6508         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6509   eval "$xe_add_unique_runpath_dir"
6510 };; esac
6511     done
6512         if test "$opsys $need_motif" = "sol2 yes"; then
6513       xe_runpath_dir="/opt/SUNWdt/lib";
6514       eval "$xe_add_unique_runpath_dir";
6515     fi
6516   fi 
6517   if test -n "$runpath"; then
6518     ld_switch_run="${dash_r}${runpath}"
6519     
6520 if test "$GCC" = "yes"; then
6521   set x $ld_switch_run; shift; ld_switch_run=""
6522   while test -n "$1"; do
6523     case $1 in
6524       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6525       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6526       -Xlinker* ) ;;
6527       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6528     esac
6529     shift
6530   done
6531 fi
6532     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6533   fi
6534 fi
6535
6536
6537   if test "$extra_verbose" = "yes"; then
6538     echo; echo "X11 compilation variables:"
6539     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6540     echo
6541   fi
6542
6543             bitmapdirs=
6544   if test "$x_includes" != NONE; then
6545     for i in $x_includes; do
6546       if test -d "$i/bitmaps"; then
6547         bitmapdirs="$i/bitmaps:$bitmapdirs"
6548       fi
6549       if test -d "$i/X11/bitmaps"; then
6550         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6551       fi
6552     done
6553     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6554   fi
6555   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6556     Defining BITMAPDIR = "$bitmapdirs"
6557 EOF
6558 cat >> confdefs.h <<EOF
6559 #define BITMAPDIR "$bitmapdirs"
6560 EOF
6561 }
6562
6563
6564     echo "checking for X defines extracted by xmkmf" 1>&6
6565 echo "configure:6566: checking for X defines extracted by xmkmf" >&5
6566   rm -fr conftestdir
6567   if mkdir conftestdir; then
6568     cd conftestdir
6569     cat > Imakefile <<'EOF'
6570 xetest:
6571         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6572 EOF
6573     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6574       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6575       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6576     fi
6577     cd ..
6578     rm -fr conftestdir
6579     for word in $xmkmf_defines; do
6580       case "$word" in 
6581       -D__STDC__*) ;;
6582       -D* )
6583         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6584         case "$word" in
6585           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6586           *     ) val=1 ;;
6587         esac
6588         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6589           if test "$val" = "1"
6590             then { test "$extra_verbose" = "yes" && cat << EOF
6591     Defining $sym
6592 EOF
6593 cat >> confdefs.h <<EOF
6594 #define $sym 1
6595 EOF
6596 }
6597
6598             else { test "$extra_verbose" = "yes" && cat << EOF
6599     Defining $sym = $val
6600 EOF
6601 cat >> confdefs.h <<EOF
6602 #define $sym $val
6603 EOF
6604 }
6605
6606           fi
6607         fi  ;;
6608       esac
6609     done
6610   fi
6611
6612     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6613 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6614 echo "configure:6615: checking for X11/Intrinsic.h" >&5
6615
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6619 #include <X11/Intrinsic.h>
6620 EOF
6621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6622 { (eval echo configure:6623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6624 if test -z "$ac_err"; then
6625   rm -rf conftest*
6626   eval "ac_cv_header_$ac_safe=yes"
6627 else
6628   echo "$ac_err" >&5
6629   echo "configure: failed program was:" >&5
6630   cat conftest.$ac_ext >&5
6631   rm -rf conftest*
6632   eval "ac_cv_header_$ac_safe=no"
6633 fi
6634 rm -f conftest*
6635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6636   echo "$ac_t""yes" 1>&6
6637   :
6638 else
6639   echo "$ac_t""no" 1>&6
6640 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6641 fi
6642
6643
6644       
6645 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6646 echo "configure:6647: checking for XOpenDisplay in -lX11" >&5
6647 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6648
6649 xe_check_libs=" -lX11 "
6650 cat > conftest.$ac_ext <<EOF
6651 #line 6652 "configure"
6652 #include "confdefs.h"
6653 /* Override any gcc2 internal prototype to avoid an error.  */
6654 /* We use char because int might match the return type of a gcc2
6655     builtin and then its argument prototype would still apply.  */
6656 char XOpenDisplay();
6657
6658 int main() {
6659 XOpenDisplay()
6660 ; return 0; }
6661 EOF
6662 if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6663   rm -rf conftest*
6664   eval "ac_cv_lib_$ac_lib_var=yes"
6665 else
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   eval "ac_cv_lib_$ac_lib_var=no"
6670 fi
6671 rm -f conftest*
6672 xe_check_libs=""
6673
6674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6675   echo "$ac_t""yes" 1>&6
6676   have_lib_x11=yes
6677 else
6678   echo "$ac_t""no" 1>&6
6679 fi
6680
6681
6682   if test "$have_lib_x11" != "yes"; then
6683     
6684 xe_msg_checking="for XGetFontProperty in -lX11"
6685 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6686 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6687 echo "configure:6688: checking "$xe_msg_checking"" >&5
6688 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6689
6690 xe_check_libs=" -lX11 -b i486-linuxaout"
6691 cat > conftest.$ac_ext <<EOF
6692 #line 6693 "configure"
6693 #include "confdefs.h"
6694 /* Override any gcc2 internal prototype to avoid an error.  */
6695 /* We use char because int might match the return type of a gcc2
6696     builtin and then its argument prototype would still apply.  */
6697 char XGetFontProperty();
6698
6699 int main() {
6700 XGetFontProperty()
6701 ; return 0; }
6702 EOF
6703 if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=yes"
6706 else
6707   echo "configure: failed program was:" >&5
6708   cat conftest.$ac_ext >&5
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=no"
6711 fi
6712 rm -f conftest*
6713 xe_check_libs=""
6714
6715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6716   echo "$ac_t""yes" 1>&6
6717   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6718 else
6719   echo "$ac_t""no" 1>&6
6720 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6721 fi
6722
6723
6724   fi
6725   libs_x="-lX11"
6726   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6727
6728     
6729 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6730 echo "configure:6731: checking for XShapeSelectInput in -lXext" >&5
6731 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6732
6733 xe_check_libs=" -lXext "
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char XShapeSelectInput();
6741
6742 int main() {
6743 XShapeSelectInput()
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=no"
6754 fi
6755 rm -f conftest*
6756 xe_check_libs=""
6757
6758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6759   echo "$ac_t""yes" 1>&6
6760   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6761 else
6762   echo "$ac_t""no" 1>&6
6763 fi
6764
6765
6766
6767     
6768 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6769 echo "configure:6770: checking for XtOpenDisplay in -lXt" >&5
6770 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6771
6772 xe_check_libs=" -lXt "
6773 cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char XtOpenDisplay();
6780
6781 int main() {
6782 XtOpenDisplay()
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6786   rm -rf conftest*
6787   eval "ac_cv_lib_$ac_lib_var=yes"
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   eval "ac_cv_lib_$ac_lib_var=no"
6793 fi
6794 rm -f conftest*
6795 xe_check_libs=""
6796
6797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6798   echo "$ac_t""yes" 1>&6
6799   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6800 else
6801   echo "$ac_t""no" 1>&6
6802 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6803 fi
6804
6805
6806
6807   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6808 echo "configure:6809: checking the version of X11 being used" >&5
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 #include <X11/Intrinsic.h>
6813     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6814 EOF
6815 if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6816 then
6817   ./conftest foobar; x11_release=$?
6818 else
6819   conftest_rc="$?"
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -fr conftest*
6823   x11_release=4
6824 fi
6825 rm -fr conftest*
6826   echo "$ac_t""R${x11_release}" 1>&6
6827   { test "$extra_verbose" = "yes" && cat << EOF
6828     Defining THIS_IS_X11R${x11_release}
6829 EOF
6830 cat >> confdefs.h <<EOF
6831 #define THIS_IS_X11R${x11_release} 1
6832 EOF
6833 }
6834
6835
6836   if test "${x11_release}" = "4"; then
6837     case "$with_widgets" in
6838       "" | "no") with_widgets=no ;;
6839       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6840     esac
6841   fi
6842
6843   for ac_func in XConvertCase
6844 do
6845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6846 echo "configure:6847: checking for $ac_func" >&5
6847
6848 cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851 /* System header to define __stub macros and hopefully few prototypes,
6852     which can conflict with char $ac_func(); below.  */
6853 #include <assert.h>
6854 /* Override any gcc2 internal prototype to avoid an error.  */
6855 /* We use char because int might match the return type of a gcc2
6856     builtin and then its argument prototype would still apply.  */
6857 char $ac_func();
6858
6859 int main() {
6860
6861 /* The GNU C library defines this for functions which it implements
6862     to always fail with ENOSYS.  Some functions are actually named
6863     something starting with __ and the normal name is an alias.  */
6864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6865 choke me
6866 #else
6867 $ac_func();
6868 #endif
6869
6870 ; return 0; }
6871 EOF
6872 if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6873   rm -rf conftest*
6874   eval "ac_cv_func_$ac_func=yes"
6875 else
6876   echo "configure: failed program was:" >&5
6877   cat conftest.$ac_ext >&5
6878   rm -rf conftest*
6879   eval "ac_cv_func_$ac_func=no"
6880 fi
6881 rm -f conftest*
6882
6883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6884   echo "$ac_t""yes" 1>&6
6885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6886   { test "$extra_verbose" = "yes" && cat << EOF
6887     Defining $ac_tr_func
6888 EOF
6889 cat >> confdefs.h <<EOF
6890 #define $ac_tr_func 1
6891 EOF
6892 }
6893  
6894 else
6895   echo "$ac_t""no" 1>&6
6896 fi
6897 done
6898
6899
6900   for ac_hdr in X11/Xlocale.h
6901 do
6902 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6903 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6904 echo "configure:6905: checking for $ac_hdr" >&5
6905
6906 cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909 #include <$ac_hdr>
6910 EOF
6911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6912 { (eval echo configure:6913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6914 if test -z "$ac_err"; then
6915   rm -rf conftest*
6916   eval "ac_cv_header_$ac_safe=yes"
6917 else
6918   echo "$ac_err" >&5
6919   echo "configure: failed program was:" >&5
6920   cat conftest.$ac_ext >&5
6921   rm -rf conftest*
6922   eval "ac_cv_header_$ac_safe=no"
6923 fi
6924 rm -f conftest*
6925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6926   echo "$ac_t""yes" 1>&6
6927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6928   { test "$extra_verbose" = "yes" && cat << EOF
6929     Defining $ac_tr_hdr
6930 EOF
6931 cat >> confdefs.h <<EOF
6932 #define $ac_tr_hdr 1
6933 EOF
6934 }
6935  
6936 else
6937   echo "$ac_t""no" 1>&6
6938 fi
6939 done
6940
6941
6942     for ac_func in XRegisterIMInstantiateCallback
6943 do
6944 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6945 echo "configure:6946: checking for $ac_func" >&5
6946
6947 cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 /* System header to define __stub macros and hopefully few prototypes,
6951     which can conflict with char $ac_func(); below.  */
6952 #include <assert.h>
6953 /* Override any gcc2 internal prototype to avoid an error.  */
6954 /* We use char because int might match the return type of a gcc2
6955     builtin and then its argument prototype would still apply.  */
6956 char $ac_func();
6957
6958 int main() {
6959
6960 /* The GNU C library defines this for functions which it implements
6961     to always fail with ENOSYS.  Some functions are actually named
6962     something starting with __ and the normal name is an alias.  */
6963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6964 choke me
6965 #else
6966 $ac_func();
6967 #endif
6968
6969 ; return 0; }
6970 EOF
6971 if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6972   rm -rf conftest*
6973   eval "ac_cv_func_$ac_func=yes"
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977   rm -rf conftest*
6978   eval "ac_cv_func_$ac_func=no"
6979 fi
6980 rm -f conftest*
6981
6982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6983   echo "$ac_t""yes" 1>&6
6984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6985   { test "$extra_verbose" = "yes" && cat << EOF
6986     Defining $ac_tr_func
6987 EOF
6988 cat >> confdefs.h <<EOF
6989 #define $ac_tr_func 1
6990 EOF
6991 }
6992  
6993 else
6994   echo "$ac_t""no" 1>&6
6995 fi
6996 done
6997
6998   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6999 echo "configure:7000: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003
7004 #define NeedFunctionPrototypes 1
7005 #include <X11/Xlib.h>
7006 extern Bool XRegisterIMInstantiateCallback(
7007    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7008
7009 int main() {
7010
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7014   rm -rf conftest*
7015   echo "$ac_t""yes" 1>&6
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -rf conftest*
7020   echo "$ac_t""no" 1>&6
7021    { test "$extra_verbose" = "yes" && cat << \EOF
7022     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7023 EOF
7024 cat >> confdefs.h <<\EOF
7025 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7026 EOF
7027 }
7028
7029 fi
7030 rm -f conftest*
7031
7032     test -z "$with_xmu" && { 
7033 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7034 echo "configure:7035: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7035 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7036
7037 xe_check_libs=" -lXmu "
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char XmuReadBitmapDataFromFile();
7045
7046 int main() {
7047 XmuReadBitmapDataFromFile()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 xe_check_libs=""
7061
7062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7063   echo "$ac_t""yes" 1>&6
7064   with_xmu=yes
7065 else
7066   echo "$ac_t""no" 1>&6
7067 with_xmu=no
7068 fi
7069
7070  }
7071   if test "$with_xmu" = "no"; then
7072     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7073    echo "    xemacs will be linked with \"xmu.o\""
7074  fi
7075   else
7076     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7077     { test "$extra_verbose" = "yes" && cat << \EOF
7078     Defining HAVE_XMU
7079 EOF
7080 cat >> confdefs.h <<\EOF
7081 #define HAVE_XMU 1
7082 EOF
7083 }
7084
7085   fi
7086
7087       
7088 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7089 echo "configure:7090: checking for main in -lXbsd" >&5
7090 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7091
7092 xe_check_libs=" -lXbsd "
7093 cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096
7097 int main() {
7098 main()
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102   rm -rf conftest*
7103   eval "ac_cv_lib_$ac_lib_var=yes"
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=no"
7109 fi
7110 rm -f conftest*
7111 xe_check_libs=""
7112
7113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7114   echo "$ac_t""yes" 1>&6
7115   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7116 else
7117   echo "$ac_t""no" 1>&6
7118 fi
7119
7120
7121
7122     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7123         if test "$GCC" = "yes"; then
7124                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7125 echo "configure:7126: checking for name of AIX gcc threads option" >&5
7126       case `$CC -v --help 2>&1` in
7127         *-mthreads*) aix_threads=-mthreads ;;
7128                   *) aix_threads=-pthread  ;;
7129       esac
7130       echo "$ac_t""$aix_threads" 1>&6
7131       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7132       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7133     else
7134             case "$CC" in *_r) : ;;
7135         *)
7136          xe_save_CC="$CC"
7137          CC="${CC}_r"
7138          echo $ac_n "checking size of short""... $ac_c" 1>&6
7139 echo "configure:7140: checking size of short" >&5
7140
7141 cat > conftest.$ac_ext <<EOF
7142 #line 7143 "configure"
7143 #include "confdefs.h"
7144 #include <stdio.h>
7145 main()
7146 {
7147   FILE *f=fopen("conftestval", "w");
7148   if (!f) exit(1);
7149   fprintf(f, "%d\n", sizeof(short));
7150   exit(0);
7151 }
7152 EOF
7153 if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7154 then
7155   ac_cv_sizeof_short=`cat conftestval`
7156 else
7157   conftest_rc="$?"
7158   echo "configure: failed program was:" >&5
7159   cat conftest.$ac_ext >&5
7160   rm -fr conftest*
7161   ac_cv_sizeof_short=0
7162 fi
7163 rm -fr conftest*
7164 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7165 { test "$extra_verbose" = "yes" && cat << EOF
7166     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7167 EOF
7168 cat >> confdefs.h <<EOF
7169 #define SIZEOF_SHORT $ac_cv_sizeof_short
7170 EOF
7171 }
7172
7173
7174          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7175       esac
7176     fi
7177   fi
7178
7179 fi 
7180 if test "$with_msw" != "no"; then
7181   echo "checking for MS-Windows" 1>&6
7182 echo "configure:7183: checking for MS-Windows" >&5
7183   
7184 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7185 echo "configure:7186: checking for main in -lgdi32" >&5
7186 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7187
7188 xe_check_libs=" -lgdi32 "
7189 cat > conftest.$ac_ext <<EOF
7190 #line 7191 "configure"
7191 #include "confdefs.h"
7192
7193 int main() {
7194 main()
7195 ; return 0; }
7196 EOF
7197 if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7198   rm -rf conftest*
7199   eval "ac_cv_lib_$ac_lib_var=yes"
7200 else
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   eval "ac_cv_lib_$ac_lib_var=no"
7205 fi
7206 rm -f conftest*
7207 xe_check_libs=""
7208
7209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7210   echo "$ac_t""yes" 1>&6
7211   with_msw=yes
7212 else
7213   echo "$ac_t""no" 1>&6
7214 fi
7215
7216
7217   if test "$with_msw" = "yes"; then
7218     { test "$extra_verbose" = "yes" && cat << \EOF
7219     Defining HAVE_MS_WINDOWS
7220 EOF
7221 cat >> confdefs.h <<\EOF
7222 #define HAVE_MS_WINDOWS 1
7223 EOF
7224 }
7225
7226
7227         if test "$with_netinstall" = "yes"; then
7228       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7229       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7230       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7231     fi
7232
7233     install_pp="$blddir/lib-src/installexe.sh"
7234     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool\" to \$libs_system"; fi
7235     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7236     if test "$window_system" != x11; then
7237         window_system=msw
7238         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7239             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7240    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7241  fi
7242         test "$with_menubars"   != "no" && with_menubars=msw \
7243             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7244    echo "    xemacs will be linked with \"menubar-msw.o\""
7245  fi
7246         test "$with_toolbars"   != "no" && with_toolbars=msw \
7247             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7248    echo "    xemacs will be linked with \"toolbar-msw.o\""
7249  fi
7250         test "$with_dialogs"   != "no" && with_dialogs=msw \
7251             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7252    echo "    xemacs will be linked with \"dialog-msw.o\""
7253  fi
7254         test "$with_widgets"   != "no" && with_widgets=msw
7255     else
7256         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7257    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7258  fi
7259         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7260    echo "    xemacs will be linked with \"menubar-msw.o\""
7261  fi
7262         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7263    echo "    xemacs will be linked with \"toolbar-msw.o\""
7264  fi
7265         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7266    echo "    xemacs will be linked with \"dialog-msw.o\""
7267  fi
7268     fi
7269         cat > conftest.$ac_ext <<EOF
7270 #line 7271 "configure"
7271 #include "confdefs.h"
7272 #include <fcntl.h>
7273     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7274 EOF
7275 if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7276 then
7277   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7278     Defining HAVE_MSG_SELECT
7279 EOF
7280 cat >> confdefs.h <<\EOF
7281 #define HAVE_MSG_SELECT 1
7282 EOF
7283 }
7284
7285 else
7286   conftest_rc="$?"
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289 fi
7290 rm -fr conftest*
7291     with_file_coding=yes
7292     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
7293    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\""
7294  fi
7295   fi
7296 fi
7297
7298
7299
7300 test -z "$window_system" && window_system="none"
7301
7302 if test "$window_system" = "none"; then
7303   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7304   do
7305     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7306        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7307     fi
7308     eval "with_${feature}=no"
7309   done
7310 else
7311   test -z "$with_toolbars" && with_toolbars=yes
7312 fi
7313
7314 if test "$with_msw" != "yes"; then
7315   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7316   do
7317     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7318        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7319     fi
7320     eval "with_${feature}=no"
7321   done
7322 else
7323   :
7324 fi
7325
7326 if test "$with_x11" != "yes"; then
7327             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7328   do
7329     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7330        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7331     fi
7332     eval "with_${feature}=no"
7333   done
7334 fi
7335
7336 if test "$with_x11" = "yes"; then
7337   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7338 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7339 echo "configure:7340: checking for X11/extensions/shape.h" >&5
7340
7341 cat > conftest.$ac_ext <<EOF
7342 #line 7343 "configure"
7343 #include "confdefs.h"
7344 #include <X11/extensions/shape.h>
7345 EOF
7346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7347 { (eval echo configure:7348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7349 if test -z "$ac_err"; then
7350   rm -rf conftest*
7351   eval "ac_cv_header_$ac_safe=yes"
7352 else
7353   echo "$ac_err" >&5
7354   echo "configure: failed program was:" >&5
7355   cat conftest.$ac_ext >&5
7356   rm -rf conftest*
7357   eval "ac_cv_header_$ac_safe=no"
7358 fi
7359 rm -f conftest*
7360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7361   echo "$ac_t""yes" 1>&6
7362   
7363    { test "$extra_verbose" = "yes" && cat << \EOF
7364     Defining HAVE_BALLOON_HELP
7365 EOF
7366 cat >> confdefs.h <<\EOF
7367 #define HAVE_BALLOON_HELP 1
7368 EOF
7369 }
7370
7371    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7372    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7373  fi
7374 else
7375   echo "$ac_t""no" 1>&6
7376 fi
7377
7378 fi
7379
7380 bitmapdir=
7381
7382 case "$window_system" in
7383   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7384   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7385   gtk  )
7386        HAVE_X_WINDOWS=no
7387        test "$with_gnome" = "yes" && echo "  Using GNOME."
7388        test "$with_gnome" = "no" && echo "  Using GTK."
7389        ;;
7390   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7391 esac
7392
7393 case "$x_libraries" in *X11R4* )
7394   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7395   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7396 esac
7397
7398 echo "checking for WM_COMMAND option" 1>&6
7399 echo "configure:7400: checking for WM_COMMAND option" >&5;
7400 if test "$with_wmcommand" != "no"; then
7401   { test "$extra_verbose" = "yes" && cat << \EOF
7402     Defining HAVE_WMCOMMAND
7403 EOF
7404 cat >> confdefs.h <<\EOF
7405 #define HAVE_WMCOMMAND 1
7406 EOF
7407 }
7408
7409 fi
7410
7411 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7412 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7413 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7414 echo "configure:7415: checking for X11/Xauth.h" >&5
7415
7416 cat > conftest.$ac_ext <<EOF
7417 #line 7418 "configure"
7418 #include "confdefs.h"
7419 #include <X11/Xauth.h>
7420 EOF
7421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7422 { (eval echo configure:7423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7424 if test -z "$ac_err"; then
7425   rm -rf conftest*
7426   eval "ac_cv_header_$ac_safe=yes"
7427 else
7428   echo "$ac_err" >&5
7429   echo "configure: failed program was:" >&5
7430   cat conftest.$ac_ext >&5
7431   rm -rf conftest*
7432   eval "ac_cv_header_$ac_safe=no"
7433 fi
7434 rm -f conftest*
7435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7436   echo "$ac_t""yes" 1>&6
7437   :
7438 else
7439   echo "$ac_t""no" 1>&6
7440 with_xauth=no
7441 fi
7442  }
7443 test -z "$with_xauth" && { 
7444 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7445 echo "configure:7446: checking for XauGetAuthByAddr in -lXau" >&5
7446 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7447
7448 xe_check_libs=" -lXau "
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char XauGetAuthByAddr();
7456
7457 int main() {
7458 XauGetAuthByAddr()
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=yes"
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=no"
7469 fi
7470 rm -f conftest*
7471 xe_check_libs=""
7472
7473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7474   echo "$ac_t""yes" 1>&6
7475   :
7476 else
7477   echo "$ac_t""no" 1>&6
7478 with_xauth=no
7479 fi
7480
7481  }
7482 test -z "$with_xauth" && with_xauth=yes
7483 if test "$with_xauth" = "yes"; then
7484   { test "$extra_verbose" = "yes" && cat << \EOF
7485     Defining HAVE_XAUTH
7486 EOF
7487 cat >> confdefs.h <<\EOF
7488 #define HAVE_XAUTH 1
7489 EOF
7490 }
7491
7492   
7493 T=""
7494 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
7495 libs_xauth="$T"
7496
7497 fi
7498
7499
7500
7501
7502 if test "$with_tooltalk" != "no" ; then
7503       for dir in "" "Tt/" "desktop/" ; do
7504     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7505 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7506 echo "configure:7507: checking for ${dir}tt_c.h" >&5
7507
7508 cat > conftest.$ac_ext <<EOF
7509 #line 7510 "configure"
7510 #include "confdefs.h"
7511 #include <${dir}tt_c.h>
7512 EOF
7513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7514 { (eval echo configure:7515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7516 if test -z "$ac_err"; then
7517   rm -rf conftest*
7518   eval "ac_cv_header_$ac_safe=yes"
7519 else
7520   echo "$ac_err" >&5
7521   echo "configure: failed program was:" >&5
7522   cat conftest.$ac_ext >&5
7523   rm -rf conftest*
7524   eval "ac_cv_header_$ac_safe=no"
7525 fi
7526 rm -f conftest*
7527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7528   echo "$ac_t""yes" 1>&6
7529   tt_c_h_file="${dir}tt_c.h"; break
7530 else
7531   echo "$ac_t""no" 1>&6
7532 fi
7533
7534   done
7535   if test -z "$tt_c_h_file"; then
7536     if test "$with_tooltalk" = "yes"; then
7537       (echo "$progname: Usage error:"
7538 echo " " "Unable to find required tooltalk header files."
7539 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7540     fi
7541     with_tooltalk=no
7542   fi
7543 fi
7544 if test "$with_tooltalk" != "no" ; then
7545   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7546     
7547 xe_msg_checking="for tt_message_create in -ltt"
7548 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7549 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7550 echo "configure:7551: checking "$xe_msg_checking"" >&5
7551 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7552
7553 xe_check_libs=" -ltt $extra_libs"
7554 cat > conftest.$ac_ext <<EOF
7555 #line 7556 "configure"
7556 #include "confdefs.h"
7557 /* Override any gcc2 internal prototype to avoid an error.  */
7558 /* We use char because int might match the return type of a gcc2
7559     builtin and then its argument prototype would still apply.  */
7560 char tt_message_create();
7561
7562 int main() {
7563 tt_message_create()
7564 ; return 0; }
7565 EOF
7566 if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7567   rm -rf conftest*
7568   eval "ac_cv_lib_$ac_lib_var=yes"
7569 else
7570   echo "configure: failed program was:" >&5
7571   cat conftest.$ac_ext >&5
7572   rm -rf conftest*
7573   eval "ac_cv_lib_$ac_lib_var=no"
7574 fi
7575 rm -f conftest*
7576 xe_check_libs=""
7577
7578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7579   echo "$ac_t""yes" 1>&6
7580   tt_libs="-ltt $extra_libs"; break
7581 else
7582   echo "$ac_t""no" 1>&6
7583 :
7584 fi
7585
7586
7587   done
7588   if test -z "$tt_libs"; then
7589     if test "$with_tooltalk" = "yes"; then
7590       (echo "$progname: Usage error:"
7591 echo " " "Unable to find required tooltalk libraries."
7592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7593     fi
7594     with_tooltalk=no
7595   fi
7596 fi
7597 test -z "$with_tooltalk" && with_tooltalk=yes
7598 if test "$with_tooltalk" = "yes"; then
7599   { test "$extra_verbose" = "yes" && cat << \EOF
7600     Defining TOOLTALK
7601 EOF
7602 cat >> confdefs.h <<\EOF
7603 #define TOOLTALK 1
7604 EOF
7605 }
7606
7607   { test "$extra_verbose" = "yes" && cat << EOF
7608     Defining TT_C_H_FILE = "$tt_c_h_file"
7609 EOF
7610 cat >> confdefs.h <<EOF
7611 #define TT_C_H_FILE "$tt_c_h_file"
7612 EOF
7613 }
7614
7615   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7616   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7617    echo "    xemacs will be linked with \"tooltalk.o\""
7618  fi
7619 fi
7620
7621 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7622 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7623 echo "configure:7624: checking for Dt/Dt.h" >&5
7624
7625 cat > conftest.$ac_ext <<EOF
7626 #line 7627 "configure"
7627 #include "confdefs.h"
7628 #include <Dt/Dt.h>
7629 EOF
7630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7631 { (eval echo configure:7632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7633 if test -z "$ac_err"; then
7634   rm -rf conftest*
7635   eval "ac_cv_header_$ac_safe=yes"
7636 else
7637   echo "$ac_err" >&5
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   eval "ac_cv_header_$ac_safe=no"
7642 fi
7643 rm -f conftest*
7644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7645   echo "$ac_t""yes" 1>&6
7646   :
7647 else
7648   echo "$ac_t""no" 1>&6
7649 with_cde=no
7650 fi
7651  }
7652 test -z "$with_cde" && { 
7653 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7654 echo "configure:7655: checking for DtDndDragStart in -lDtSvc" >&5
7655 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7656
7657 xe_check_libs=" -lDtSvc "
7658 cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* Override any gcc2 internal prototype to avoid an error.  */
7662 /* We use char because int might match the return type of a gcc2
7663     builtin and then its argument prototype would still apply.  */
7664 char DtDndDragStart();
7665
7666 int main() {
7667 DtDndDragStart()
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7671   rm -rf conftest*
7672   eval "ac_cv_lib_$ac_lib_var=yes"
7673 else
7674   echo "configure: failed program was:" >&5
7675   cat conftest.$ac_ext >&5
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=no"
7678 fi
7679 rm -f conftest*
7680 xe_check_libs=""
7681
7682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7683   echo "$ac_t""yes" 1>&6
7684   :
7685 else
7686   echo "$ac_t""no" 1>&6
7687 with_cde=no
7688 fi
7689
7690  }
7691 test -z "$with_cde" && with_cde=yes
7692 if test "$with_dragndrop" = no; then
7693   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7694   with_cde=no
7695 fi
7696 if test "$with_cde" = "yes" ; then
7697   { test "$extra_verbose" = "yes" && cat << \EOF
7698     Defining HAVE_CDE
7699 EOF
7700 cat >> confdefs.h <<\EOF
7701 #define HAVE_CDE 1
7702 EOF
7703 }
7704
7705   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7706   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7707   with_tooltalk=yes # CDE requires Tooltalk
7708   need_motif=yes    # CDE requires Motif
7709 fi
7710
7711 test "$window_system" != "x11" && with_offix=no
7712 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7713   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7714   with_offix=no
7715 fi
7716 if test "$with_dragndrop" = no; then
7717   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7718   with_offix=no
7719 fi
7720 if test "$with_cde" = yes; then
7721   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7722   with_offix=no
7723 fi
7724 test -z "$with_offix" && with_offix=no
7725 if test "$with_offix" = "yes"; then
7726   { test "$extra_verbose" = "yes" && cat << \EOF
7727     Defining HAVE_OFFIX_DND
7728 EOF
7729 cat >> confdefs.h <<\EOF
7730 #define HAVE_OFFIX_DND 1
7731 EOF
7732 }
7733
7734   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7735   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7736 fi
7737 if test "$with_gtk" = "yes"; then
7738    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7739 fi
7740
7741 if test "$with_dragndrop" != "no" ; then
7742   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7743 echo "configure:7744: checking if drag and drop API is needed" >&5
7744   if test -n "$dragndrop_proto" ; then
7745     with_dragndrop=yes
7746     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7747     { test "$extra_verbose" = "yes" && cat << \EOF
7748     Defining HAVE_DRAGNDROP
7749 EOF
7750 cat >> confdefs.h <<\EOF
7751 #define HAVE_DRAGNDROP 1
7752 EOF
7753 }
7754
7755     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7756   else
7757     with_dragndrop=no
7758     echo "$ac_t""no" 1>&6
7759   fi
7760 fi
7761
7762 echo "checking for LDAP" 1>&6
7763 echo "configure:7764: checking for LDAP" >&5
7764 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7765 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7766 echo "configure:7767: checking for ldap.h" >&5
7767
7768 cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 #include <ldap.h>
7772 EOF
7773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7774 { (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7776 if test -z "$ac_err"; then
7777   rm -rf conftest*
7778   eval "ac_cv_header_$ac_safe=yes"
7779 else
7780   echo "$ac_err" >&5
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   eval "ac_cv_header_$ac_safe=no"
7785 fi
7786 rm -f conftest*
7787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7788   echo "$ac_t""yes" 1>&6
7789   :
7790 else
7791   echo "$ac_t""no" 1>&6
7792 with_ldap=no
7793 fi
7794  }
7795 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7796 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7797 echo "configure:7798: checking for lber.h" >&5
7798
7799 cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 #include <lber.h>
7803 EOF
7804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7805 { (eval echo configure:7806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7807 if test -z "$ac_err"; then
7808   rm -rf conftest*
7809   eval "ac_cv_header_$ac_safe=yes"
7810 else
7811   echo "$ac_err" >&5
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   eval "ac_cv_header_$ac_safe=no"
7816 fi
7817 rm -f conftest*
7818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820   :
7821 else
7822   echo "$ac_t""no" 1>&6
7823 with_ldap=no
7824 fi
7825  }
7826 if test "$with_ldap" != "no"; then
7827   
7828 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7829 echo "configure:7830: checking for ldap_search in -lldap" >&5
7830 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7831
7832 xe_check_libs=" -lldap "
7833 cat > conftest.$ac_ext <<EOF
7834 #line 7835 "configure"
7835 #include "confdefs.h"
7836 /* Override any gcc2 internal prototype to avoid an error.  */
7837 /* We use char because int might match the return type of a gcc2
7838     builtin and then its argument prototype would still apply.  */
7839 char ldap_search();
7840
7841 int main() {
7842 ldap_search()
7843 ; return 0; }
7844 EOF
7845 if { (eval echo configure:7846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7846   rm -rf conftest*
7847   eval "ac_cv_lib_$ac_lib_var=yes"
7848 else
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   eval "ac_cv_lib_$ac_lib_var=no"
7853 fi
7854 rm -f conftest*
7855 xe_check_libs=""
7856
7857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7858   echo "$ac_t""yes" 1>&6
7859   with_ldap_nolber=yes
7860 else
7861   echo "$ac_t""no" 1>&6
7862 with_ldap_nolber=no
7863 fi
7864
7865
7866   test "$with_ldap_nolber" = "no" && { 
7867 xe_msg_checking="for ldap_open in -lldap"
7868 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7869 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7870 echo "configure:7871: checking "$xe_msg_checking"" >&5
7871 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7872
7873 xe_check_libs=" -lldap -llber"
7874 cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877 /* Override any gcc2 internal prototype to avoid an error.  */
7878 /* We use char because int might match the return type of a gcc2
7879     builtin and then its argument prototype would still apply.  */
7880 char ldap_open();
7881
7882 int main() {
7883 ldap_open()
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7887   rm -rf conftest*
7888   eval "ac_cv_lib_$ac_lib_var=yes"
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   eval "ac_cv_lib_$ac_lib_var=no"
7894 fi
7895 rm -f conftest*
7896 xe_check_libs=""
7897
7898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7899   echo "$ac_t""yes" 1>&6
7900   with_ldap_lber=yes
7901 else
7902   echo "$ac_t""no" 1>&6
7903 with_ldap_lber=no
7904 fi
7905
7906  }
7907   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7908 xe_msg_checking="for ldap_open in -lldap"
7909 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7910 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7911 echo "configure:7912: checking "$xe_msg_checking"" >&5
7912 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7913
7914 xe_check_libs=" -lldap -llber -lkrb"
7915 cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7918 /* Override any gcc2 internal prototype to avoid an error.  */
7919 /* We use char because int might match the return type of a gcc2
7920     builtin and then its argument prototype would still apply.  */
7921 char ldap_open();
7922
7923 int main() {
7924 ldap_open()
7925 ; return 0; }
7926 EOF
7927 if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7928   rm -rf conftest*
7929   eval "ac_cv_lib_$ac_lib_var=yes"
7930 else
7931   echo "configure: failed program was:" >&5
7932   cat conftest.$ac_ext >&5
7933   rm -rf conftest*
7934   eval "ac_cv_lib_$ac_lib_var=no"
7935 fi
7936 rm -f conftest*
7937 xe_check_libs=""
7938
7939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7940   echo "$ac_t""yes" 1>&6
7941   with_ldap_krb=yes
7942 else
7943   echo "$ac_t""no" 1>&6
7944 with_ldap_krb=no
7945 fi
7946
7947  }
7948   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7949 xe_msg_checking="for ldap_open in -lldap"
7950 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7951 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7952 echo "configure:7953: checking "$xe_msg_checking"" >&5
7953 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7954
7955 xe_check_libs=" -lldap -llber -lkrb -ldes"
7956 cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959 /* Override any gcc2 internal prototype to avoid an error.  */
7960 /* We use char because int might match the return type of a gcc2
7961     builtin and then its argument prototype would still apply.  */
7962 char ldap_open();
7963
7964 int main() {
7965 ldap_open()
7966 ; return 0; }
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7969   rm -rf conftest*
7970   eval "ac_cv_lib_$ac_lib_var=yes"
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=no"
7976 fi
7977 rm -f conftest*
7978 xe_check_libs=""
7979
7980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7981   echo "$ac_t""yes" 1>&6
7982   with_ldap_krbdes=yes
7983 else
7984   echo "$ac_t""no" 1>&6
7985 with_ldap_krbdes=no
7986 fi
7987
7988  }
7989   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
7990 fi
7991 if test "$with_ldap" = "yes"; then
7992   { test "$extra_verbose" = "yes" && cat << \EOF
7993     Defining HAVE_LDAP
7994 EOF
7995 cat >> confdefs.h <<\EOF
7996 #define HAVE_LDAP 1
7997 EOF
7998 }
7999
8000   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8001    echo "    xemacs will be linked with \"eldap.o\""
8002  fi
8003   if test "$with_ldap_nolber" = "yes" ; then
8004     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8005   else
8006     if test "$with_ldap_krb" = "yes" ; then
8007       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8008     fi
8009     if test "$with_ldap_krbdes" = "yes" ; then
8010       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8011       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8012     fi
8013     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8014     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8015   fi
8016   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8017 do
8018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8019 echo "configure:8020: checking for $ac_func" >&5
8020
8021 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 /* System header to define __stub macros and hopefully few prototypes,
8025     which can conflict with char $ac_func(); below.  */
8026 #include <assert.h>
8027 /* Override any gcc2 internal prototype to avoid an error.  */
8028 /* We use char because int might match the return type of a gcc2
8029     builtin and then its argument prototype would still apply.  */
8030 char $ac_func();
8031
8032 int main() {
8033
8034 /* The GNU C library defines this for functions which it implements
8035     to always fail with ENOSYS.  Some functions are actually named
8036     something starting with __ and the normal name is an alias.  */
8037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8038 choke me
8039 #else
8040 $ac_func();
8041 #endif
8042
8043 ; return 0; }
8044 EOF
8045 if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8046   rm -rf conftest*
8047   eval "ac_cv_func_$ac_func=yes"
8048 else
8049   echo "configure: failed program was:" >&5
8050   cat conftest.$ac_ext >&5
8051   rm -rf conftest*
8052   eval "ac_cv_func_$ac_func=no"
8053 fi
8054 rm -f conftest*
8055
8056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8057   echo "$ac_t""yes" 1>&6
8058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8059   { test "$extra_verbose" = "yes" && cat << EOF
8060     Defining $ac_tr_func
8061 EOF
8062 cat >> confdefs.h <<EOF
8063 #define $ac_tr_func 1
8064 EOF
8065 }
8066  
8067 else
8068   echo "$ac_t""no" 1>&6
8069 fi
8070 done
8071
8072 fi
8073
8074 if test "$with_postgresql" != "no"; then
8075   echo "checking for PostgreSQL" 1>&6
8076 echo "configure:8077: checking for PostgreSQL" >&5
8077
8078   for header_dir in "" "pgsql/" "postgresql/"; do
8079     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8080 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8081 echo "configure:8082: checking for ${header_dir}libpq-fe.h" >&5
8082
8083 cat > conftest.$ac_ext <<EOF
8084 #line 8085 "configure"
8085 #include "confdefs.h"
8086 #include <${header_dir}libpq-fe.h>
8087 EOF
8088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8089 { (eval echo configure:8090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8091 if test -z "$ac_err"; then
8092   rm -rf conftest*
8093   eval "ac_cv_header_$ac_safe=yes"
8094 else
8095   echo "$ac_err" >&5
8096   echo "configure: failed program was:" >&5
8097   cat conftest.$ac_ext >&5
8098   rm -rf conftest*
8099   eval "ac_cv_header_$ac_safe=no"
8100 fi
8101 rm -f conftest*
8102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8103   echo "$ac_t""yes" 1>&6
8104   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108
8109   done
8110
8111   test -n "$libpq_fe_h_file" && { 
8112 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8113 echo "configure:8114: checking for PQconnectdb in -lpq" >&5
8114 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8115
8116 xe_check_libs=" -lpq "
8117 cat > conftest.$ac_ext <<EOF
8118 #line 8119 "configure"
8119 #include "confdefs.h"
8120 /* Override any gcc2 internal prototype to avoid an error.  */
8121 /* We use char because int might match the return type of a gcc2
8122     builtin and then its argument prototype would still apply.  */
8123 char PQconnectdb();
8124
8125 int main() {
8126 PQconnectdb()
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8130   rm -rf conftest*
8131   eval "ac_cv_lib_$ac_lib_var=yes"
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=no"
8137 fi
8138 rm -f conftest*
8139 xe_check_libs=""
8140
8141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8142   echo "$ac_t""yes" 1>&6
8143   have_libpq=yes
8144 else
8145   echo "$ac_t""no" 1>&6
8146 fi
8147
8148  }
8149
8150   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8151     with_postgresql=yes
8152     { test "$extra_verbose" = "yes" && cat << \EOF
8153     Defining HAVE_POSTGRESQL
8154 EOF
8155 cat >> confdefs.h <<\EOF
8156 #define HAVE_POSTGRESQL 1
8157 EOF
8158 }
8159
8160     
8161 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8162 echo "configure:8163: checking for PQconnectStart in -lpq" >&5
8163 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8164
8165 xe_check_libs=" -lpq "
8166 cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169 /* Override any gcc2 internal prototype to avoid an error.  */
8170 /* We use char because int might match the return type of a gcc2
8171     builtin and then its argument prototype would still apply.  */
8172 char PQconnectStart();
8173
8174 int main() {
8175 PQconnectStart()
8176 ; return 0; }
8177 EOF
8178 if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8179   rm -rf conftest*
8180   eval "ac_cv_lib_$ac_lib_var=yes"
8181 else
8182   echo "configure: failed program was:" >&5
8183   cat conftest.$ac_ext >&5
8184   rm -rf conftest*
8185   eval "ac_cv_lib_$ac_lib_var=no"
8186 fi
8187 rm -f conftest*
8188 xe_check_libs=""
8189
8190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8191   echo "$ac_t""yes" 1>&6
8192   with_postgresqlv7=yes;
8193                  { test "$extra_verbose" = "yes" && cat << \EOF
8194     Defining HAVE_POSTGRESQLV7
8195 EOF
8196 cat >> confdefs.h <<\EOF
8197 #define HAVE_POSTGRESQLV7 1
8198 EOF
8199 }
8200
8201 else
8202   echo "$ac_t""no" 1>&6
8203 fi
8204
8205
8206     { test "$extra_verbose" = "yes" && cat << EOF
8207     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8208 EOF
8209 cat >> confdefs.h <<EOF
8210 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8211 EOF
8212 }
8213
8214     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8215     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8216    echo "    xemacs will be linked with \"postgresql.o\""
8217  fi
8218   elif test "$with_postgresql" = "yes"; then
8219     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8220   fi
8221 fi
8222
8223
8224 if test "$window_system" != "none"; then
8225   echo "checking for graphics libraries" 1>&6
8226 echo "configure:8227: checking for graphics libraries" >&5
8227
8228       libpath_xpm=
8229   incpath_xpm=
8230   case "$opsys" in 
8231     cygwin*)
8232       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8233       cygwin_top=`eval "dirname ${cygwin_top}"`;
8234       cygwin_top="${cygwin_top}/..";
8235       case "$window_system" in
8236                 x11)  ;;
8237                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8238              incpath_xpm="-I${cygwin_top}/include/noX"
8239               ;;
8240                 gtk)  ;;
8241                 none) ;;
8242                 *)    ;;
8243       esac
8244       ;;
8245         *) ;;
8246   esac
8247     xpm_problem=""
8248   if test -z "$with_xpm"; then
8249     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8250     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8251     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8252 echo "configure:8253: checking for Xpm - no older than 3.4f" >&5
8253     xe_check_libs=-lXpm
8254     cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 #define XPM_NUMBERS
8258 #include <X11/xpm.h>
8259     int main(int c, char **v) {
8260     return c == 1 ? 0 :
8261       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8262       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8265 then
8266   ./conftest dummy_arg; xpm_status=$?;
8267       if test "$xpm_status" = "0"; then
8268         with_xpm=yes;
8269       else
8270         with_xpm=no;
8271         if test "$xpm_status" = "1"; then
8272           xpm_problem="Xpm library version and header file version don't match!"
8273         elif test "$xpm_status" = "2"; then
8274           xpm_problem="Xpm library version is too old!"
8275         else
8276           xpm_problem="Internal xpm detection logic error!"
8277         fi
8278         echo "
8279 *** WARNING *** $xpm_problem
8280   I'm not touching that with a 10-foot pole!
8281   If you really want to use the installed version of Xpm, rerun
8282   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8283     fi
8284 else
8285   conftest_rc="$?"
8286   echo "configure: failed program was:" >&5
8287   cat conftest.$ac_ext >&5
8288   rm -fr conftest*
8289   with_xpm=no
8290 fi
8291 rm -fr conftest*
8292     xe_check_libs=
8293     echo "$ac_t""$with_xpm" 1>&6
8294   fi
8295   if test "$with_xpm" = "yes"; then
8296                 { test "$extra_verbose" = "yes" && cat << \EOF
8297     Defining HAVE_XPM
8298 EOF
8299 cat >> confdefs.h <<\EOF
8300 #define HAVE_XPM 1
8301 EOF
8302 }
8303
8304     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8305     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8306     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8307     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8308 echo "configure:8309: checking for \"FOR_MSW\" xpm" >&5
8309     xe_check_libs=-lXpm
8310     cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313
8314 int main() {
8315 XpmCreatePixmapFromData()
8316 ; return 0; }
8317 EOF
8318 if { (eval echo configure:8319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8319   rm -rf conftest*
8320   xpm_for_msw=no
8321 else
8322   echo "configure: failed program was:" >&5
8323   cat conftest.$ac_ext >&5
8324   rm -rf conftest*
8325   xpm_for_msw=yes
8326 fi
8327 rm -f conftest*
8328     xe_check_libs=
8329     echo "$ac_t""$xpm_for_msw" 1>&6
8330     if test "$xpm_for_msw" = "yes"; then
8331       { test "$extra_verbose" = "yes" && cat << \EOF
8332     Defining FOR_MSW
8333 EOF
8334 cat >> confdefs.h <<\EOF
8335 #define FOR_MSW 1
8336 EOF
8337 }
8338
8339     fi
8340   fi
8341
8342     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8343 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8344 echo "configure:8345: checking for compface.h" >&5
8345
8346 cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349 #include <compface.h>
8350 EOF
8351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8352 { (eval echo configure:8353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8354 if test -z "$ac_err"; then
8355   rm -rf conftest*
8356   eval "ac_cv_header_$ac_safe=yes"
8357 else
8358   echo "$ac_err" >&5
8359   echo "configure: failed program was:" >&5
8360   cat conftest.$ac_ext >&5
8361   rm -rf conftest*
8362   eval "ac_cv_header_$ac_safe=no"
8363 fi
8364 rm -f conftest*
8365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8366   echo "$ac_t""yes" 1>&6
8367   :
8368 else
8369   echo "$ac_t""no" 1>&6
8370 with_xface=no
8371 fi
8372  }
8373   test -z "$with_xface" && { 
8374 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8375 echo "configure:8376: checking for UnGenFace in -lcompface" >&5
8376 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8377
8378 xe_check_libs=" -lcompface "
8379 cat > conftest.$ac_ext <<EOF
8380 #line 8381 "configure"
8381 #include "confdefs.h"
8382 /* Override any gcc2 internal prototype to avoid an error.  */
8383 /* We use char because int might match the return type of a gcc2
8384     builtin and then its argument prototype would still apply.  */
8385 char UnGenFace();
8386
8387 int main() {
8388 UnGenFace()
8389 ; return 0; }
8390 EOF
8391 if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8392   rm -rf conftest*
8393   eval "ac_cv_lib_$ac_lib_var=yes"
8394 else
8395   echo "configure: failed program was:" >&5
8396   cat conftest.$ac_ext >&5
8397   rm -rf conftest*
8398   eval "ac_cv_lib_$ac_lib_var=no"
8399 fi
8400 rm -f conftest*
8401 xe_check_libs=""
8402
8403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8404   echo "$ac_t""yes" 1>&6
8405   : 
8406 else
8407   echo "$ac_t""no" 1>&6
8408 with_xface=no
8409 fi
8410
8411  }
8412   test -z "$with_xface" && with_xface=yes
8413   if test "$with_xface" = "yes"; then
8414     { test "$extra_verbose" = "yes" && cat << \EOF
8415     Defining HAVE_XFACE
8416 EOF
8417 cat >> confdefs.h <<\EOF
8418 #define HAVE_XFACE 1
8419 EOF
8420 }
8421
8422     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8423   fi
8424
8425         if test "$with_gif" != "no"; then
8426     with_gif="yes"
8427     { test "$extra_verbose" = "yes" && cat << \EOF
8428     Defining HAVE_GIF
8429 EOF
8430 cat >> confdefs.h <<\EOF
8431 #define HAVE_GIF 1
8432 EOF
8433 }
8434
8435     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8436    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8437  fi
8438   fi
8439
8440       if test "$with_png $with_tiff" != "no no"; then
8441     
8442 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8443 echo "configure:8444: checking for inflate in -lc" >&5
8444 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8445
8446 xe_check_libs=" -lc "
8447 cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8450 /* Override any gcc2 internal prototype to avoid an error.  */
8451 /* We use char because int might match the return type of a gcc2
8452     builtin and then its argument prototype would still apply.  */
8453 char inflate();
8454
8455 int main() {
8456 inflate()
8457 ; return 0; }
8458 EOF
8459 if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8460   rm -rf conftest*
8461   eval "ac_cv_lib_$ac_lib_var=yes"
8462 else
8463   echo "configure: failed program was:" >&5
8464   cat conftest.$ac_ext >&5
8465   rm -rf conftest*
8466   eval "ac_cv_lib_$ac_lib_var=no"
8467 fi
8468 rm -f conftest*
8469 xe_check_libs=""
8470
8471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8472   echo "$ac_t""yes" 1>&6
8473   :
8474 else
8475   echo "$ac_t""no" 1>&6
8476
8477 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8478 echo "configure:8479: checking for inflate in -lz" >&5
8479 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8480
8481 xe_check_libs=" -lz "
8482 cat > conftest.$ac_ext <<EOF
8483 #line 8484 "configure"
8484 #include "confdefs.h"
8485 /* Override any gcc2 internal prototype to avoid an error.  */
8486 /* We use char because int might match the return type of a gcc2
8487     builtin and then its argument prototype would still apply.  */
8488 char inflate();
8489
8490 int main() {
8491 inflate()
8492 ; return 0; }
8493 EOF
8494 if { (eval echo configure:8495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8495   rm -rf conftest*
8496   eval "ac_cv_lib_$ac_lib_var=yes"
8497 else
8498   echo "configure: failed program was:" >&5
8499   cat conftest.$ac_ext >&5
8500   rm -rf conftest*
8501   eval "ac_cv_lib_$ac_lib_var=no"
8502 fi
8503 rm -f conftest*
8504 xe_check_libs=""
8505
8506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8507   echo "$ac_t""yes" 1>&6
8508   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8509 else
8510   echo "$ac_t""no" 1>&6
8511
8512 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8513 echo "configure:8514: checking for inflate in -lgz" >&5
8514 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8515
8516 xe_check_libs=" -lgz "
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 /* Override any gcc2 internal prototype to avoid an error.  */
8521 /* We use char because int might match the return type of a gcc2
8522     builtin and then its argument prototype would still apply.  */
8523 char inflate();
8524
8525 int main() {
8526 inflate()
8527 ; return 0; }
8528 EOF
8529 if { (eval echo configure:8530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8530   rm -rf conftest*
8531   eval "ac_cv_lib_$ac_lib_var=yes"
8532 else
8533   echo "configure: failed program was:" >&5
8534   cat conftest.$ac_ext >&5
8535   rm -rf conftest*
8536   eval "ac_cv_lib_$ac_lib_var=no"
8537 fi
8538 rm -f conftest*
8539 xe_check_libs=""
8540
8541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8542   echo "$ac_t""yes" 1>&6
8543   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8544 else
8545   echo "$ac_t""no" 1>&6
8546 fi
8547
8548
8549 fi
8550
8551
8552 fi
8553
8554
8555   fi
8556
8557     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8558 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8559 echo "configure:8560: checking for jpeglib.h" >&5
8560
8561 cat > conftest.$ac_ext <<EOF
8562 #line 8563 "configure"
8563 #include "confdefs.h"
8564 #include <jpeglib.h>
8565 EOF
8566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8567 { (eval echo configure:8568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8569 if test -z "$ac_err"; then
8570   rm -rf conftest*
8571   eval "ac_cv_header_$ac_safe=yes"
8572 else
8573   echo "$ac_err" >&5
8574   echo "configure: failed program was:" >&5
8575   cat conftest.$ac_ext >&5
8576   rm -rf conftest*
8577   eval "ac_cv_header_$ac_safe=no"
8578 fi
8579 rm -f conftest*
8580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8581   echo "$ac_t""yes" 1>&6
8582   :
8583 else
8584   echo "$ac_t""no" 1>&6
8585 with_jpeg=no
8586 fi
8587  }
8588   test -z "$with_jpeg" && { 
8589 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8590 echo "configure:8591: checking for jpeg_destroy_decompress in -ljpeg" >&5
8591 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8592
8593 xe_check_libs=" -ljpeg "
8594 cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 /* Override any gcc2 internal prototype to avoid an error.  */
8598 /* We use char because int might match the return type of a gcc2
8599     builtin and then its argument prototype would still apply.  */
8600 char jpeg_destroy_decompress();
8601
8602 int main() {
8603 jpeg_destroy_decompress()
8604 ; return 0; }
8605 EOF
8606 if { (eval echo configure:8607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8607   rm -rf conftest*
8608   eval "ac_cv_lib_$ac_lib_var=yes"
8609 else
8610   echo "configure: failed program was:" >&5
8611   cat conftest.$ac_ext >&5
8612   rm -rf conftest*
8613   eval "ac_cv_lib_$ac_lib_var=no"
8614 fi
8615 rm -f conftest*
8616 xe_check_libs=""
8617
8618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8619   echo "$ac_t""yes" 1>&6
8620   :
8621 else
8622   echo "$ac_t""no" 1>&6
8623 with_jpeg=no
8624 fi
8625
8626  }
8627   test -z "$with_jpeg" && with_jpeg=yes
8628   if test "$with_jpeg" = "yes"; then
8629     { test "$extra_verbose" = "yes" && cat << \EOF
8630     Defining HAVE_JPEG
8631 EOF
8632 cat >> confdefs.h <<\EOF
8633 #define HAVE_JPEG 1
8634 EOF
8635 }
8636
8637     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8638   fi
8639
8640     png_problem=""
8641   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8642 echo "configure:8643: checking for pow" >&5
8643
8644 cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 /* System header to define __stub macros and hopefully few prototypes,
8648     which can conflict with char pow(); below.  */
8649 #include <assert.h>
8650 /* Override any gcc2 internal prototype to avoid an error.  */
8651 /* We use char because int might match the return type of a gcc2
8652     builtin and then its argument prototype would still apply.  */
8653 char pow();
8654
8655 int main() {
8656
8657 /* The GNU C library defines this for functions which it implements
8658     to always fail with ENOSYS.  Some functions are actually named
8659     something starting with __ and the normal name is an alias.  */
8660 #if defined (__stub_pow) || defined (__stub___pow)
8661 choke me
8662 #else
8663 pow();
8664 #endif
8665
8666 ; return 0; }
8667 EOF
8668 if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8669   rm -rf conftest*
8670   eval "ac_cv_func_pow=yes"
8671 else
8672   echo "configure: failed program was:" >&5
8673   cat conftest.$ac_ext >&5
8674   rm -rf conftest*
8675   eval "ac_cv_func_pow=no"
8676 fi
8677 rm -f conftest*
8678
8679 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8680   echo "$ac_t""yes" 1>&6
8681   :
8682 else
8683   echo "$ac_t""no" 1>&6
8684 with_png=no
8685 fi
8686  }
8687   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8688 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8689 echo "configure:8690: checking for png.h" >&5
8690
8691 cat > conftest.$ac_ext <<EOF
8692 #line 8693 "configure"
8693 #include "confdefs.h"
8694 #include <png.h>
8695 EOF
8696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8697 { (eval echo configure:8698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8699 if test -z "$ac_err"; then
8700   rm -rf conftest*
8701   eval "ac_cv_header_$ac_safe=yes"
8702 else
8703   echo "$ac_err" >&5
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -rf conftest*
8707   eval "ac_cv_header_$ac_safe=no"
8708 fi
8709 rm -f conftest*
8710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8711   echo "$ac_t""yes" 1>&6
8712   :
8713 else
8714   echo "$ac_t""no" 1>&6
8715 with_png=no
8716 fi
8717  }
8718   test -z "$with_png" && { 
8719 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8720 echo "configure:8721: checking for png_read_image in -lpng" >&5
8721 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8722
8723 xe_check_libs=" -lpng "
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* Override any gcc2 internal prototype to avoid an error.  */
8728 /* We use char because int might match the return type of a gcc2
8729     builtin and then its argument prototype would still apply.  */
8730 char png_read_image();
8731
8732 int main() {
8733 png_read_image()
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_lib_$ac_lib_var=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_lib_$ac_lib_var=no"
8744 fi
8745 rm -f conftest*
8746 xe_check_libs=""
8747
8748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8749   echo "$ac_t""yes" 1>&6
8750   :
8751 else
8752   echo "$ac_t""no" 1>&6
8753 with_png=no
8754 fi
8755
8756  }
8757   if test -z "$with_png"; then
8758     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8759 echo "configure:8760: checking for workable png version information" >&5
8760     xe_check_libs="-lpng -lz"
8761     cat > conftest.$ac_ext <<EOF
8762 #line 8763 "configure"
8763 #include "confdefs.h"
8764 #include <png.h>
8765     int main(int c, char **v) {
8766     if (c == 1) return 0;
8767     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8768     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8769 EOF
8770 if { (eval echo configure:8771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8771 then
8772   ./conftest dummy_arg; png_status=$?;
8773       if test "$png_status" = "0"; then
8774         with_png=yes;
8775       else
8776         with_png=no;
8777         if test "$png_status" = "1"; then
8778           png_problem="PNG library version and header file don't match!"
8779         elif test "$png_status" = "2"; then
8780           png_problem="PNG library version too old (pre 1.0.2)!"
8781         fi
8782         echo "
8783 *** WARNING *** $png_problem
8784   I'm not touching that with a 10-foot pole!
8785   If you really want to use the installed version of libPNG, rerun
8786   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8787     fi
8788 else
8789   conftest_rc="$?"
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -fr conftest*
8793   with_png=no
8794 fi
8795 rm -fr conftest*
8796     xe_check_libs=
8797     echo "$ac_t""$with_png" 1>&6
8798   fi
8799   if test "$with_png" = "yes"; then
8800     { test "$extra_verbose" = "yes" && cat << \EOF
8801     Defining HAVE_PNG
8802 EOF
8803 cat >> confdefs.h <<\EOF
8804 #define HAVE_PNG 1
8805 EOF
8806 }
8807
8808     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8809   fi
8810
8811     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8812 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8813 echo "configure:8814: checking for tiffio.h" >&5
8814
8815 cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 #include <tiffio.h>
8819 EOF
8820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8821 { (eval echo configure:8822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8823 if test -z "$ac_err"; then
8824   rm -rf conftest*
8825   eval "ac_cv_header_$ac_safe=yes"
8826 else
8827   echo "$ac_err" >&5
8828   echo "configure: failed program was:" >&5
8829   cat conftest.$ac_ext >&5
8830   rm -rf conftest*
8831   eval "ac_cv_header_$ac_safe=no"
8832 fi
8833 rm -f conftest*
8834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836   :
8837 else
8838   echo "$ac_t""no" 1>&6
8839 with_tiff=no
8840 fi
8841  }
8842   test -z "$with_tiff" && { 
8843 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8844 echo "configure:8845: checking for TIFFClientOpen in -ltiff" >&5
8845 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8846
8847 xe_check_libs=" -ltiff "
8848 cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 /* Override any gcc2 internal prototype to avoid an error.  */
8852 /* We use char because int might match the return type of a gcc2
8853     builtin and then its argument prototype would still apply.  */
8854 char TIFFClientOpen();
8855
8856 int main() {
8857 TIFFClientOpen()
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8861   rm -rf conftest*
8862   eval "ac_cv_lib_$ac_lib_var=yes"
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   eval "ac_cv_lib_$ac_lib_var=no"
8868 fi
8869 rm -f conftest*
8870 xe_check_libs=""
8871
8872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8873   echo "$ac_t""yes" 1>&6
8874   :
8875 else
8876   echo "$ac_t""no" 1>&6
8877 with_tiff=no
8878 fi
8879
8880  }
8881   test -z "$with_tiff" && with_tiff=yes
8882   if test "$with_tiff" = "yes"; then
8883     { test "$extra_verbose" = "yes" && cat << \EOF
8884     Defining HAVE_TIFF
8885 EOF
8886 cat >> confdefs.h <<\EOF
8887 #define HAVE_TIFF 1
8888 EOF
8889 }
8890
8891     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8892   fi
8893 fi
8894
8895
8896 if test "$with_gtk" = "yes"; then
8897     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8898 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8899 echo "configure:8900: checking for compface.h" >&5
8900
8901 cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 #include <compface.h>
8905 EOF
8906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8907 { (eval echo configure:8908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8909 if test -z "$ac_err"; then
8910   rm -rf conftest*
8911   eval "ac_cv_header_$ac_safe=yes"
8912 else
8913   echo "$ac_err" >&5
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   eval "ac_cv_header_$ac_safe=no"
8918 fi
8919 rm -f conftest*
8920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8921   echo "$ac_t""yes" 1>&6
8922   :
8923 else
8924   echo "$ac_t""no" 1>&6
8925 with_xface=no
8926 fi
8927  }
8928   test -z "$with_xface" && { 
8929 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8930 echo "configure:8931: checking for UnGenFace in -lcompface" >&5
8931 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8932
8933 xe_check_libs=" -lcompface "
8934 cat > conftest.$ac_ext <<EOF
8935 #line 8936 "configure"
8936 #include "confdefs.h"
8937 /* Override any gcc2 internal prototype to avoid an error.  */
8938 /* We use char because int might match the return type of a gcc2
8939     builtin and then its argument prototype would still apply.  */
8940 char UnGenFace();
8941
8942 int main() {
8943 UnGenFace()
8944 ; return 0; }
8945 EOF
8946 if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8947   rm -rf conftest*
8948   eval "ac_cv_lib_$ac_lib_var=yes"
8949 else
8950   echo "configure: failed program was:" >&5
8951   cat conftest.$ac_ext >&5
8952   rm -rf conftest*
8953   eval "ac_cv_lib_$ac_lib_var=no"
8954 fi
8955 rm -f conftest*
8956 xe_check_libs=""
8957
8958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8959   echo "$ac_t""yes" 1>&6
8960   : 
8961 else
8962   echo "$ac_t""no" 1>&6
8963 with_xface=no
8964 fi
8965
8966  }
8967   test -z "$with_xface" && with_xface=yes
8968   if test "$with_xface" = "yes"; then
8969     { test "$extra_verbose" = "yes" && cat << \EOF
8970     Defining HAVE_XFACE
8971 EOF
8972 cat >> confdefs.h <<\EOF
8973 #define HAVE_XFACE 1
8974 EOF
8975 }
8976
8977     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8978   fi
8979 fi
8980
8981
8982
8983 if test "$with_x11" = "yes"; then
8984   echo "checking for X11 graphics libraries" 1>&6
8985 echo "configure:8986: checking for X11 graphics libraries" >&5
8986 fi
8987
8988 if test "$with_x11" = "yes"; then
8989   echo "checking for the Athena widgets" 1>&6
8990 echo "configure:8991: checking for the Athena widgets" >&5
8991
8992     case "$with_athena" in
8993         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8994     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8995     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8996     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8997     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8998     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8999   esac
9000
9001   athena_3d_function=Xaw3dComputeBottomShadowRGB
9002
9003     if test "$athena_3d" = "no"; then
9004     
9005 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9006 echo "configure:9007: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9007 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9008
9009 xe_check_libs=" -l$athena_variant "
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 /* We use char because int might match the return type of a gcc2
9015     builtin and then its argument prototype would still apply.  */
9016 char XawScrollbarSetThumb();
9017
9018 int main() {
9019 XawScrollbarSetThumb()
9020 ; return 0; }
9021 EOF
9022 if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9023   rm -rf conftest*
9024   eval "ac_cv_lib_$ac_lib_var=yes"
9025 else
9026   echo "configure: failed program was:" >&5
9027   cat conftest.$ac_ext >&5
9028   rm -rf conftest*
9029   eval "ac_cv_lib_$ac_lib_var=no"
9030 fi
9031 rm -f conftest*
9032 xe_check_libs=""
9033
9034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9035   echo "$ac_t""yes" 1>&6
9036           
9037 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9038 echo "configure:9039: checking for $athena_3d_function in -l$athena_variant" >&5
9039 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9040
9041 xe_check_libs=" -l$athena_variant "
9042 cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* Override any gcc2 internal prototype to avoid an error.  */
9046 /* We use char because int might match the return type of a gcc2
9047     builtin and then its argument prototype would still apply.  */
9048 char $athena_3d_function();
9049
9050 int main() {
9051 $athena_3d_function()
9052 ; return 0; }
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9055   rm -rf conftest*
9056   eval "ac_cv_lib_$ac_lib_var=yes"
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=no"
9062 fi
9063 rm -f conftest*
9064 xe_check_libs=""
9065
9066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9067   echo "$ac_t""yes" 1>&6
9068   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9069 else
9070   echo "$ac_t""no" 1>&6
9071 athena_lib=$athena_variant
9072 fi
9073
9074
9075       
9076 else
9077   echo "$ac_t""no" 1>&6
9078 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9079 fi
9080
9081
9082   else
9083         
9084 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9085 echo "configure:9086: checking for $athena_3d_function in -l$athena_variant" >&5
9086 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9087
9088 xe_check_libs=" -l$athena_variant "
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 /* Override any gcc2 internal prototype to avoid an error.  */
9093 /* We use char because int might match the return type of a gcc2
9094     builtin and then its argument prototype would still apply.  */
9095 char $athena_3d_function();
9096
9097 int main() {
9098 $athena_3d_function()
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9102   rm -rf conftest*
9103   eval "ac_cv_lib_$ac_lib_var=yes"
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   eval "ac_cv_lib_$ac_lib_var=no"
9109 fi
9110 rm -f conftest*
9111 xe_check_libs=""
9112
9113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9114   echo "$ac_t""yes" 1>&6
9115   athena_lib=$athena_variant
9116 else
9117   echo "$ac_t""no" 1>&6
9118 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9119 echo "configure:9120: checking for $athena_3d_function in -lXaw" >&5
9120 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9121
9122 xe_check_libs=" -lXaw "
9123 cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9126 /* Override any gcc2 internal prototype to avoid an error.  */
9127 /* We use char because int might match the return type of a gcc2
9128     builtin and then its argument prototype would still apply.  */
9129 char $athena_3d_function();
9130
9131 int main() {
9132 $athena_3d_function()
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9136   rm -rf conftest*
9137   eval "ac_cv_lib_$ac_lib_var=yes"
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   eval "ac_cv_lib_$ac_lib_var=no"
9143 fi
9144 rm -f conftest*
9145 xe_check_libs=""
9146
9147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9148   echo "$ac_t""yes" 1>&6
9149   athena_lib=Xaw;
9150           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9151         
9152 else
9153   echo "$ac_t""no" 1>&6
9154 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9155 fi
9156
9157
9158 fi
9159
9160
9161   fi
9162
9163     if test "$athena_3d" = "no"; then
9164     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9165 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9166 echo "configure:9167: checking for X11/Xaw/ThreeD.h" >&5
9167
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 #include <X11/Xaw/ThreeD.h>
9172 EOF
9173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9174 { (eval echo configure:9175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9176 if test -z "$ac_err"; then
9177   rm -rf conftest*
9178   eval "ac_cv_header_$ac_safe=yes"
9179 else
9180   echo "$ac_err" >&5
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   eval "ac_cv_header_$ac_safe=no"
9185 fi
9186 rm -f conftest*
9187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9188   echo "$ac_t""yes" 1>&6
9189   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9190 else
9191   echo "$ac_t""no" 1>&6
9192 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9193 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9194 echo "configure:9195: checking for X11/Xaw/XawInit.h" >&5
9195
9196 cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199 #include <X11/Xaw/XawInit.h>
9200 EOF
9201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9202 { (eval echo configure:9203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9204 if test -z "$ac_err"; then
9205   rm -rf conftest*
9206   eval "ac_cv_header_$ac_safe=yes"
9207 else
9208   echo "$ac_err" >&5
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   eval "ac_cv_header_$ac_safe=no"
9213 fi
9214 rm -f conftest*
9215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9216   echo "$ac_t""yes" 1>&6
9217   athena_h_path=X11/Xaw
9218 else
9219   echo "$ac_t""no" 1>&6
9220 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9221 fi
9222
9223 fi
9224
9225   else
9226             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9227 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9228 echo "configure:9229: checking for X11/$athena_variant/XawInit.h" >&5
9229
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <X11/$athena_variant/XawInit.h>
9234 EOF
9235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9236 { (eval echo configure:9237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9238 if test -z "$ac_err"; then
9239   rm -rf conftest*
9240   eval "ac_cv_header_$ac_safe=yes"
9241 else
9242   echo "$ac_err" >&5
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -rf conftest*
9246   eval "ac_cv_header_$ac_safe=no"
9247 fi
9248 rm -f conftest*
9249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9252 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9253 echo "configure:9254: checking for X11/$athena_variant/ThreeD.h" >&5
9254
9255 cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258 #include <X11/$athena_variant/ThreeD.h>
9259 EOF
9260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9261 { (eval echo configure:9262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9263 if test -z "$ac_err"; then
9264   rm -rf conftest*
9265   eval "ac_cv_header_$ac_safe=yes"
9266 else
9267   echo "$ac_err" >&5
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   eval "ac_cv_header_$ac_safe=no"
9272 fi
9273 rm -f conftest*
9274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9275   echo "$ac_t""yes" 1>&6
9276   athena_h_path=X11/$athena_variant
9277 else
9278   echo "$ac_t""no" 1>&6
9279 fi
9280
9281 else
9282   echo "$ac_t""no" 1>&6
9283 fi
9284
9285
9286         if test -z "$athena_h_path"; then
9287       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9288 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9289 echo "configure:9290: checking for $athena_variant/XawInit.h" >&5
9290
9291 cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294 #include <$athena_variant/XawInit.h>
9295 EOF
9296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9297 { (eval echo configure:9298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9299 if test -z "$ac_err"; then
9300   rm -rf conftest*
9301   eval "ac_cv_header_$ac_safe=yes"
9302 else
9303   echo "$ac_err" >&5
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -rf conftest*
9307   eval "ac_cv_header_$ac_safe=no"
9308 fi
9309 rm -f conftest*
9310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9313 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9314 echo "configure:9315: checking for $athena_variant/ThreeD.h" >&5
9315
9316 cat > conftest.$ac_ext <<EOF
9317 #line 9318 "configure"
9318 #include "confdefs.h"
9319 #include <$athena_variant/ThreeD.h>
9320 EOF
9321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9322 { (eval echo configure:9323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9324 if test -z "$ac_err"; then
9325   rm -rf conftest*
9326   eval "ac_cv_header_$ac_safe=yes"
9327 else
9328   echo "$ac_err" >&5
9329   echo "configure: failed program was:" >&5
9330   cat conftest.$ac_ext >&5
9331   rm -rf conftest*
9332   eval "ac_cv_header_$ac_safe=no"
9333 fi
9334 rm -f conftest*
9335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9336   echo "$ac_t""yes" 1>&6
9337   athena_h_path=$athena_variant
9338 else
9339   echo "$ac_t""no" 1>&6
9340 fi
9341
9342 else
9343   echo "$ac_t""no" 1>&6
9344 fi
9345
9346     fi
9347
9348         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9349       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9350 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9351 echo "configure:9352: checking for X11/Xaw3d/XawInit.h" >&5
9352
9353 cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356 #include <X11/Xaw3d/XawInit.h>
9357 EOF
9358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9359 { (eval echo configure:9360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9361 if test -z "$ac_err"; then
9362   rm -rf conftest*
9363   eval "ac_cv_header_$ac_safe=yes"
9364 else
9365   echo "$ac_err" >&5
9366   echo "configure: failed program was:" >&5
9367   cat conftest.$ac_ext >&5
9368   rm -rf conftest*
9369   eval "ac_cv_header_$ac_safe=no"
9370 fi
9371 rm -f conftest*
9372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9373   echo "$ac_t""yes" 1>&6
9374   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9375 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9376 echo "configure:9377: checking for X11/Xaw3d/ThreeD.h" >&5
9377
9378 cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #include <X11/Xaw3d/ThreeD.h>
9382 EOF
9383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9384 { (eval echo configure:9385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9386 if test -z "$ac_err"; then
9387   rm -rf conftest*
9388   eval "ac_cv_header_$ac_safe=yes"
9389 else
9390   echo "$ac_err" >&5
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -rf conftest*
9394   eval "ac_cv_header_$ac_safe=no"
9395 fi
9396 rm -f conftest*
9397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9398   echo "$ac_t""yes" 1>&6
9399   
9400             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9401             athena_h_path=X11/Xaw3d
9402           
9403 else
9404   echo "$ac_t""no" 1>&6
9405 fi
9406
9407 else
9408   echo "$ac_t""no" 1>&6
9409 fi
9410
9411     fi
9412
9413         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9414       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9415 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9416 echo "configure:9417: checking for Xaw3d/XawInit.h" >&5
9417
9418 cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 #include <Xaw3d/XawInit.h>
9422 EOF
9423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9424 { (eval echo configure:9425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9426 if test -z "$ac_err"; then
9427   rm -rf conftest*
9428   eval "ac_cv_header_$ac_safe=yes"
9429 else
9430   echo "$ac_err" >&5
9431   echo "configure: failed program was:" >&5
9432   cat conftest.$ac_ext >&5
9433   rm -rf conftest*
9434   eval "ac_cv_header_$ac_safe=no"
9435 fi
9436 rm -f conftest*
9437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9438   echo "$ac_t""yes" 1>&6
9439   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9440 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9441 echo "configure:9442: checking for Xaw3d/ThreeD.h" >&5
9442
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <Xaw3d/ThreeD.h>
9447 EOF
9448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9449 { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9451 if test -z "$ac_err"; then
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=yes"
9454 else
9455   echo "$ac_err" >&5
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -rf conftest*
9459   eval "ac_cv_header_$ac_safe=no"
9460 fi
9461 rm -f conftest*
9462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9463   echo "$ac_t""yes" 1>&6
9464   
9465             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9466             athena_h_path=Xaw3d
9467           
9468 else
9469   echo "$ac_t""no" 1>&6
9470 fi
9471
9472 else
9473   echo "$ac_t""no" 1>&6
9474 fi
9475
9476     fi
9477
9478             if test -z "$athena_h_path"; then
9479       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9480 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9481 echo "configure:9482: checking for X11/Xaw/ThreeD.h" >&5
9482
9483 cat > conftest.$ac_ext <<EOF
9484 #line 9485 "configure"
9485 #include "confdefs.h"
9486 #include <X11/Xaw/ThreeD.h>
9487 EOF
9488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9489 { (eval echo configure:9490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9491 if test -z "$ac_err"; then
9492   rm -rf conftest*
9493   eval "ac_cv_header_$ac_safe=yes"
9494 else
9495   echo "$ac_err" >&5
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   eval "ac_cv_header_$ac_safe=no"
9500 fi
9501 rm -f conftest*
9502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9503   echo "$ac_t""yes" 1>&6
9504   
9505           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9506           athena_h_path=X11/Xaw
9507         
9508 else
9509   echo "$ac_t""no" 1>&6
9510 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9511 fi
9512
9513     fi
9514   fi
9515
9516     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9517     have_xaw=yes
9518   else
9519     have_xaw=no
9520   fi
9521
9522 else
9523   have_xaw=no
9524 fi 
9525 if test "$with_x11" = "yes"; then
9526     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9527 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9528 echo "configure:9529: checking for Xm/Xm.h" >&5
9529
9530 cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 #include <Xm/Xm.h>
9534 EOF
9535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9536 { (eval echo configure:9537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9538 if test -z "$ac_err"; then
9539   rm -rf conftest*
9540   eval "ac_cv_header_$ac_safe=yes"
9541 else
9542   echo "$ac_err" >&5
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   eval "ac_cv_header_$ac_safe=no"
9547 fi
9548 rm -f conftest*
9549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9550   echo "$ac_t""yes" 1>&6
9551   
9552 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9553 echo "configure:9554: checking for XmStringFree in -lXm" >&5
9554 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9555
9556 xe_check_libs=" -lXm "
9557 cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* Override any gcc2 internal prototype to avoid an error.  */
9561 /* We use char because int might match the return type of a gcc2
9562     builtin and then its argument prototype would still apply.  */
9563 char XmStringFree();
9564
9565 int main() {
9566 XmStringFree()
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=yes"
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_lib_$ac_lib_var=no"
9577 fi
9578 rm -f conftest*
9579 xe_check_libs=""
9580
9581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9582   echo "$ac_t""yes" 1>&6
9583   have_motif=yes
9584 else
9585   echo "$ac_t""no" 1>&6
9586 have_motif=no
9587 fi
9588
9589
9590 else
9591   echo "$ac_t""no" 1>&6
9592 have_motif=no
9593 fi
9594
9595
9596   if test "$have_motif" = "yes"; then
9597         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9598 echo "configure:9599: checking for Lesstif" >&5
9599     cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602 #include <Xm/Xm.h>
9603 #ifdef LESSTIF_VERSION
9604 yes
9605 #endif
9606
9607 EOF
9608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9609   egrep "yes" >/dev/null 2>&1; then
9610   rm -rf conftest*
9611   have_lesstif=yes
9612 else
9613   rm -rf conftest*
9614   have_lesstif=no
9615 fi
9616 rm -f conftest*
9617
9618   echo "$ac_t""$have_lesstif" 1>&6
9619   fi
9620
9621 fi 
9622
9623 case "$with_menubars" in "" | "yes" | "athena" )
9624   with_menubars="lucid" ;;
9625 esac
9626 case "$with_dialogs" in "" | "yes" | "lucid" )
9627   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9628   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9629   else with_dialogs=no
9630   fi ;;
9631 esac
9632 case "$with_scrollbars" in "" | "yes" )
9633   with_scrollbars="lucid" ;;
9634 esac
9635 case "$with_widgets" in
9636   "yes" | "lucid")
9637     if   test "$have_motif" = "yes"; then with_widgets="motif"
9638     elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9639     else with_widgets=no
9640     fi ;;
9641   "" )
9642     with_widgets=no ;;
9643 esac
9644
9645 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9646
9647 case "$all_widgets" in
9648   *athena* )
9649     if test "$have_xaw" != "yes"; then
9650       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9651     fi
9652
9653         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9654
9655         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9656
9657                     { test "$extra_verbose" = "yes" && cat << EOF
9658     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9659 EOF
9660 cat >> confdefs.h <<EOF
9661 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9662 EOF
9663 }
9664
9665     { test "$extra_verbose" = "yes" && cat << EOF
9666     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9667 EOF
9668 cat >> confdefs.h <<EOF
9669 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9670 EOF
9671 }
9672
9673     { test "$extra_verbose" = "yes" && cat << EOF
9674     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9675 EOF
9676 cat >> confdefs.h <<EOF
9677 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9678 EOF
9679 }
9680
9681     { test "$extra_verbose" = "yes" && cat << EOF
9682     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9683 EOF
9684 cat >> confdefs.h <<EOF
9685 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9686 EOF
9687 }
9688
9689     { test "$extra_verbose" = "yes" && cat << EOF
9690     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9691 EOF
9692 cat >> confdefs.h <<EOF
9693 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9694 EOF
9695 }
9696
9697     { test "$extra_verbose" = "yes" && cat << EOF
9698     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9699 EOF
9700 cat >> confdefs.h <<EOF
9701 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9702 EOF
9703 }
9704
9705     { test "$extra_verbose" = "yes" && cat << EOF
9706     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9707 EOF
9708 cat >> confdefs.h <<EOF
9709 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9710 EOF
9711 }
9712
9713     { test "$extra_verbose" = "yes" && cat << EOF
9714     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9715 EOF
9716 cat >> confdefs.h <<EOF
9717 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9718 EOF
9719 }
9720
9721     { test "$extra_verbose" = "yes" && cat << EOF
9722     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9723 EOF
9724 cat >> confdefs.h <<EOF
9725 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9726 EOF
9727 }
9728
9729     { test "$extra_verbose" = "yes" && cat << EOF
9730     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9731 EOF
9732 cat >> confdefs.h <<EOF
9733 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9734 EOF
9735 }
9736
9737
9738     { test "$extra_verbose" = "yes" && cat << \EOF
9739     Defining LWLIB_USES_ATHENA
9740 EOF
9741 cat >> confdefs.h <<\EOF
9742 #define LWLIB_USES_ATHENA 1
9743 EOF
9744 }
9745
9746     { test "$extra_verbose" = "yes" && cat << \EOF
9747     Defining NEED_ATHENA
9748 EOF
9749 cat >> confdefs.h <<\EOF
9750 #define NEED_ATHENA 1
9751 EOF
9752 }
9753
9754     need_athena="yes"
9755
9756     if test "$athena_3d" = "yes"; then
9757       { test "$extra_verbose" = "yes" && cat << \EOF
9758     Defining HAVE_ATHENA_3D
9759 EOF
9760 cat >> confdefs.h <<\EOF
9761 #define HAVE_ATHENA_3D 1
9762 EOF
9763 }
9764
9765     fi
9766   ;;
9767 esac
9768
9769 case "$all_widgets" in *motif* )
9770   { test "$extra_verbose" = "yes" && cat << \EOF
9771     Defining LWLIB_USES_MOTIF
9772 EOF
9773 cat >> confdefs.h <<\EOF
9774 #define LWLIB_USES_MOTIF 1
9775 EOF
9776 }
9777
9778   { test "$extra_verbose" = "yes" && cat << \EOF
9779     Defining NEED_MOTIF
9780 EOF
9781 cat >> confdefs.h <<\EOF
9782 #define NEED_MOTIF 1
9783 EOF
9784 }
9785
9786   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9787   need_motif=yes ;;
9788 esac
9789
9790 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9791 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9792 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9793 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9794         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9795 case "$with_widgets" in athena* )
9796         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;;
9797 esac
9798 case "$all_widgets" in *lucid* )
9799   { test "$extra_verbose" = "yes" && cat << \EOF
9800     Defining NEED_LUCID
9801 EOF
9802 cat >> confdefs.h <<\EOF
9803 #define NEED_LUCID 1
9804 EOF
9805 }
9806
9807   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9808 esac
9809
9810
9811
9812 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9813     Defining LWLIB_SCROLLBARS_ATHENA
9814 EOF
9815 cat >> confdefs.h <<\EOF
9816 #define LWLIB_SCROLLBARS_ATHENA 1
9817 EOF
9818 }
9819
9820 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9821     Defining LWLIB_DIALOGS_ATHENA
9822 EOF
9823 cat >> confdefs.h <<\EOF
9824 #define LWLIB_DIALOGS_ATHENA 1
9825 EOF
9826 }
9827
9828
9829 if test "$athena_3d" = "yes"; then
9830   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9831     Defining LWLIB_SCROLLBARS_ATHENA3D
9832 EOF
9833 cat >> confdefs.h <<\EOF
9834 #define LWLIB_SCROLLBARS_ATHENA3D 1
9835 EOF
9836 }
9837
9838   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9839     Defining LWLIB_DIALOGS_ATHENA3D
9840 EOF
9841 cat >> confdefs.h <<\EOF
9842 #define LWLIB_DIALOGS_ATHENA3D 1
9843 EOF
9844 }
9845
9846 fi
9847
9848 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9849     Defining LWLIB_WIDGETS_ATHENA
9850 EOF
9851 cat >> confdefs.h <<\EOF
9852 #define LWLIB_WIDGETS_ATHENA 1
9853 EOF
9854 }
9855 ;; esac
9856 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9857         { test "$extra_verbose" = "yes" && cat << \EOF
9858     Defining LWLIB_TABS_LUCID
9859 EOF
9860 cat >> confdefs.h <<\EOF
9861 #define LWLIB_TABS_LUCID 1
9862 EOF
9863 }
9864
9865
9866 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9867     Defining HAVE_MENUBARS
9868 EOF
9869 cat >> confdefs.h <<\EOF
9870 #define HAVE_MENUBARS 1
9871 EOF
9872 }
9873
9874 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9875     Defining HAVE_SCROLLBARS
9876 EOF
9877 cat >> confdefs.h <<\EOF
9878 #define HAVE_SCROLLBARS 1
9879 EOF
9880 }
9881
9882 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9883     Defining HAVE_DIALOGS
9884 EOF
9885 cat >> confdefs.h <<\EOF
9886 #define HAVE_DIALOGS 1
9887 EOF
9888 }
9889
9890 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9891     Defining HAVE_TOOLBARS
9892 EOF
9893 cat >> confdefs.h <<\EOF
9894 #define HAVE_TOOLBARS 1
9895 EOF
9896 }
9897
9898 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9899     Defining HAVE_WIDGETS
9900 EOF
9901 cat >> confdefs.h <<\EOF
9902 #define HAVE_WIDGETS 1
9903 EOF
9904 }
9905
9906
9907 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9908     Defining LWLIB_MENUBARS_LUCID
9909 EOF
9910 cat >> confdefs.h <<\EOF
9911 #define LWLIB_MENUBARS_LUCID 1
9912 EOF
9913 }
9914
9915 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9916     Defining LWLIB_SCROLLBARS_LUCID
9917 EOF
9918 cat >> confdefs.h <<\EOF
9919 #define LWLIB_SCROLLBARS_LUCID 1
9920 EOF
9921 }
9922
9923
9924 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9925     Defining LWLIB_MENUBARS_MOTIF
9926 EOF
9927 cat >> confdefs.h <<\EOF
9928 #define LWLIB_MENUBARS_MOTIF 1
9929 EOF
9930 }
9931
9932 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9933     Defining LWLIB_SCROLLBARS_MOTIF
9934 EOF
9935 cat >> confdefs.h <<\EOF
9936 #define LWLIB_SCROLLBARS_MOTIF 1
9937 EOF
9938 }
9939
9940 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9941     Defining LWLIB_DIALOGS_MOTIF
9942 EOF
9943 cat >> confdefs.h <<\EOF
9944 #define LWLIB_DIALOGS_MOTIF 1
9945 EOF
9946 }
9947
9948 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9949     Defining LWLIB_WIDGETS_MOTIF
9950 EOF
9951 cat >> confdefs.h <<\EOF
9952 #define LWLIB_WIDGETS_MOTIF 1
9953 EOF
9954 }
9955
9956
9957 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9958    echo "    xemacs will be linked with \"menubar.o\""
9959  fi
9960 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9961    echo "    xemacs will be linked with \"scrollbar.o\""
9962  fi
9963 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9964    echo "    xemacs will be linked with \"dialog.o\""
9965  fi
9966 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9967    echo "    xemacs will be linked with \"toolbar.o\""
9968  fi
9969
9970 if test "$with_gtk" = "yes"; then
9971   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9972    echo "    xemacs will be linked with \"menubar-gtk.o\""
9973  fi
9974   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9975    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9976  fi
9977   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9978    echo "    xemacs will be linked with \"dialog-gtk.o\""
9979  fi
9980   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9981    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9982  fi
9983   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9984    echo "    xemacs will be linked with \"gui-gtk.o\""
9985  fi
9986 fi
9987
9988 if test "$with_x11" = "yes"; then
9989   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9990    echo "    xemacs will be linked with \"menubar-x.o\""
9991  fi
9992   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9993    echo "    xemacs will be linked with \"scrollbar-x.o\""
9994  fi
9995   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9996    echo "    xemacs will be linked with \"dialog-x.o\""
9997  fi
9998   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9999    echo "    xemacs will be linked with \"toolbar-x.o\""
10000  fi
10001   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10002    echo "    xemacs will be linked with \"gui-x.o\""
10003  fi
10004 fi
10005
10006
10007 test -z "$with_mule" && with_mule=no
10008 test -z "$with_file_coding" && with_file_coding=no
10009
10010
10011 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10012   { test "$extra_verbose" = "yes" && cat << \EOF
10013     Defining FILE_CODING
10014 EOF
10015 cat >> confdefs.h <<\EOF
10016 #define FILE_CODING 1
10017 EOF
10018 }
10019
10020   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10021    echo "    xemacs will be linked with \"file-coding.o\""
10022  fi
10023 fi
10024
10025 test -z "$with_chise" && with_chise=yes
10026 if test "$with_chise" = "yes"; then
10027     with_mule=yes
10028     with_utf_2000=yes
10029     with_text_coding=yes
10030 fi
10031
10032 if test "$with_mule" = "yes" ; then
10033   echo "checking for Mule-related features" 1>&6
10034 echo "configure:10035: checking for Mule-related features" >&5
10035   { test "$extra_verbose" = "yes" && cat << \EOF
10036     Defining MULE
10037 EOF
10038 cat >> confdefs.h <<\EOF
10039 #define MULE 1
10040 EOF
10041 }
10042
10043
10044     chise_includes_found=no
10045   if test "$with_chise" != "no"; then
10046     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10047 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10048 echo "configure:10049: checking for chise.h" >&5
10049
10050 cat > conftest.$ac_ext <<EOF
10051 #line 10052 "configure"
10052 #include "confdefs.h"
10053 #include <chise.h>
10054 EOF
10055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10056 { (eval echo configure:10057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10058 if test -z "$ac_err"; then
10059   rm -rf conftest*
10060   eval "ac_cv_header_$ac_safe=yes"
10061 else
10062   echo "$ac_err" >&5
10063   echo "configure: failed program was:" >&5
10064   cat conftest.$ac_ext >&5
10065   rm -rf conftest*
10066   eval "ac_cv_header_$ac_safe=no"
10067 fi
10068 rm -f conftest*
10069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10070   echo "$ac_t""yes" 1>&6
10071   :
10072 else
10073   echo "$ac_t""no" 1>&6
10074 with_chise=no
10075 fi
10076
10077   fi
10078   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10079       -d "/usr/local/chise/include"; then
10080     save_c_switch_site="$c_switch_site"
10081     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10082     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10083 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10084 echo "configure:10085: checking for chise.h" >&5
10085
10086 cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 #include <chise.h>
10090 EOF
10091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10092 { (eval echo configure:10093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10094 if test -z "$ac_err"; then
10095   rm -rf conftest*
10096   eval "ac_cv_header_$ac_safe=yes"
10097 else
10098   echo "$ac_err" >&5
10099   echo "configure: failed program was:" >&5
10100   cat conftest.$ac_ext >&5
10101   rm -rf conftest*
10102   eval "ac_cv_header_$ac_safe=no"
10103 fi
10104 rm -f conftest*
10105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10106   echo "$ac_t""yes" 1>&6
10107   chise_includes_found=yes
10108 else
10109   echo "$ac_t""no" 1>&6
10110 fi
10111
10112     if test "$chise_includes_found" != "yes"; then
10113       c_switch_site="$save_c_switch_site"
10114       with_chise="no"
10115     fi
10116   fi
10117
10118   test -z "$with_chise" && with_chise=yes
10119   if test "$with_chise" = "yes"; then
10120     { test "$extra_verbose" = "yes" && cat << \EOF
10121     Defining HAVE_CHISE
10122 EOF
10123 cat >> confdefs.h <<\EOF
10124 #define HAVE_CHISE 1
10125 EOF
10126 }
10127
10128     { test "$extra_verbose" = "yes" && cat << \EOF
10129     Defining HAVE_LIBCHISE
10130 EOF
10131 cat >> confdefs.h <<\EOF
10132 #define HAVE_LIBCHISE 1
10133 EOF
10134 }
10135
10136     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10137   fi
10138
10139   { test "$extra_verbose" = "yes" && cat << \EOF
10140     Defining FILE_CODING
10141 EOF
10142 cat >> confdefs.h <<\EOF
10143 #define FILE_CODING 1
10144 EOF
10145 }
10146
10147   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10148    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10149  fi
10150   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10151     { test "$extra_verbose" = "yes" && cat << \EOF
10152     Defining TEXT_CODING
10153 EOF
10154 cat >> confdefs.h <<\EOF
10155 #define TEXT_CODING 1
10156 EOF
10157 }
10158
10159     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10160    echo "    xemacs will be linked with \"text-coding.o\""
10161  fi
10162   else
10163     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10164    echo "    xemacs will be linked with \"file-coding.o\""
10165  fi
10166   fi
10167     for ac_hdr in libintl.h
10168 do
10169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10171 echo "configure:10172: checking for $ac_hdr" >&5
10172
10173 cat > conftest.$ac_ext <<EOF
10174 #line 10175 "configure"
10175 #include "confdefs.h"
10176 #include <$ac_hdr>
10177 EOF
10178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10179 { (eval echo configure:10180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10181 if test -z "$ac_err"; then
10182   rm -rf conftest*
10183   eval "ac_cv_header_$ac_safe=yes"
10184 else
10185   echo "$ac_err" >&5
10186   echo "configure: failed program was:" >&5
10187   cat conftest.$ac_ext >&5
10188   rm -rf conftest*
10189   eval "ac_cv_header_$ac_safe=no"
10190 fi
10191 rm -f conftest*
10192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10193   echo "$ac_t""yes" 1>&6
10194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10195   { test "$extra_verbose" = "yes" && cat << EOF
10196     Defining $ac_tr_hdr
10197 EOF
10198 cat >> confdefs.h <<EOF
10199 #define $ac_tr_hdr 1
10200 EOF
10201 }
10202  
10203 else
10204   echo "$ac_t""no" 1>&6
10205 fi
10206 done
10207
10208   
10209 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10210 echo "configure:10211: checking for strerror in -lintl" >&5
10211 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10212
10213 xe_check_libs=" -lintl "
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 /* Override any gcc2 internal prototype to avoid an error.  */
10218 /* We use char because int might match the return type of a gcc2
10219     builtin and then its argument prototype would still apply.  */
10220 char strerror();
10221
10222 int main() {
10223 strerror()
10224 ; return 0; }
10225 EOF
10226 if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10227   rm -rf conftest*
10228   eval "ac_cv_lib_$ac_lib_var=yes"
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232   rm -rf conftest*
10233   eval "ac_cv_lib_$ac_lib_var=no"
10234 fi
10235 rm -f conftest*
10236 xe_check_libs=""
10237
10238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10239   echo "$ac_t""yes" 1>&6
10240     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10241     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10242   { test "$extra_verbose" = "yes" && cat << EOF
10243     Defining $ac_tr_lib
10244 EOF
10245 cat >> confdefs.h <<EOF
10246 #define $ac_tr_lib 1
10247 EOF
10248 }
10249
10250   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10251
10252 else
10253   echo "$ac_t""no" 1>&6
10254 fi
10255
10256
10257
10258   if test "$with_utf_2000" = "yes" ; then
10259     { test "$extra_verbose" = "yes" && cat << \EOF
10260     Defining CHAR_IS_UCS4
10261 EOF
10262 cat >> confdefs.h <<\EOF
10263 #define CHAR_IS_UCS4 1
10264 EOF
10265 }
10266
10267     { test "$extra_verbose" = "yes" && cat << \EOF
10268     Defining UTF2000
10269 EOF
10270 cat >> confdefs.h <<\EOF
10271 #define UTF2000 1
10272 EOF
10273 }
10274
10275     with_wnn=no
10276     with_wnn6=no
10277   fi
10278
10279   echo "checking for Mule input methods" 1>&6
10280 echo "configure:10281: checking for Mule input methods" >&5
10281         case "$with_xim" in "" | "yes" )
10282     echo "checking for XIM" 1>&6
10283 echo "configure:10284: checking for XIM" >&5
10284     
10285 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10286 echo "configure:10287: checking for XOpenIM in -lX11" >&5
10287 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10288
10289 xe_check_libs=" -lX11 "
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 /* Override any gcc2 internal prototype to avoid an error.  */
10294 /* We use char because int might match the return type of a gcc2
10295     builtin and then its argument prototype would still apply.  */
10296 char XOpenIM();
10297
10298 int main() {
10299 XOpenIM()
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10303   rm -rf conftest*
10304   eval "ac_cv_lib_$ac_lib_var=yes"
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_lib_$ac_lib_var=no"
10310 fi
10311 rm -f conftest*
10312 xe_check_libs=""
10313
10314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10315   echo "$ac_t""yes" 1>&6
10316   with_xim=xlib
10317 else
10318   echo "$ac_t""no" 1>&6
10319 with_xim=no
10320 fi
10321
10322
10323         if test "$have_motif $have_lesstif" = "yes no"; then
10324       
10325 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10326 echo "configure:10327: checking for XmImMbLookupString in -lXm" >&5
10327 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10328
10329 xe_check_libs=" -lXm "
10330 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 /* Override any gcc2 internal prototype to avoid an error.  */
10334 /* We use char because int might match the return type of a gcc2
10335     builtin and then its argument prototype would still apply.  */
10336 char XmImMbLookupString();
10337
10338 int main() {
10339 XmImMbLookupString()
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10343   rm -rf conftest*
10344   eval "ac_cv_lib_$ac_lib_var=yes"
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=no"
10350 fi
10351 rm -f conftest*
10352 xe_check_libs=""
10353
10354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10355   echo "$ac_t""yes" 1>&6
10356   with_xim=motif
10357 else
10358   echo "$ac_t""no" 1>&6
10359 fi
10360
10361
10362     fi ;;
10363   esac
10364   if test "$with_xim" != "no"; then
10365     { test "$extra_verbose" = "yes" && cat << \EOF
10366     Defining HAVE_XIM
10367 EOF
10368 cat >> confdefs.h <<\EOF
10369 #define HAVE_XIM 1
10370 EOF
10371 }
10372
10373     if test "$with_xim" = "xlib"; then
10374       { test "$extra_verbose" = "yes" && cat << \EOF
10375     Defining XIM_XLIB
10376 EOF
10377 cat >> confdefs.h <<\EOF
10378 #define XIM_XLIB 1
10379 EOF
10380 }
10381
10382       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10383    echo "    xemacs will be linked with \"input-method-xlib.o\""
10384  fi
10385     fi
10386     if test "$with_xim" = "motif"; then
10387       { test "$extra_verbose" = "yes" && cat << \EOF
10388     Defining XIM_MOTIF
10389 EOF
10390 cat >> confdefs.h <<\EOF
10391 #define XIM_MOTIF 1
10392 EOF
10393 }
10394
10395       need_motif=yes
10396       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10397    echo "    xemacs will be linked with \"input-method-motif.o\""
10398  fi
10399     fi
10400     if test "$with_xim" = "motif"; then
10401       with_xfs=no
10402     fi
10403   fi
10404
10405     if test "$with_xfs" = "yes" ; then
10406     echo "checking for XFontSet" 1>&6
10407 echo "configure:10408: checking for XFontSet" >&5
10408     
10409 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10410 echo "configure:10411: checking for XmbDrawString in -lX11" >&5
10411 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10412
10413 xe_check_libs=" -lX11 "
10414 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417 /* Override any gcc2 internal prototype to avoid an error.  */
10418 /* We use char because int might match the return type of a gcc2
10419     builtin and then its argument prototype would still apply.  */
10420 char XmbDrawString();
10421
10422 int main() {
10423 XmbDrawString()
10424 ; return 0; }
10425 EOF
10426 if { (eval echo configure:10427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=yes"
10429 else
10430   echo "configure: failed program was:" >&5
10431   cat conftest.$ac_ext >&5
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=no"
10434 fi
10435 rm -f conftest*
10436 xe_check_libs=""
10437
10438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10439   echo "$ac_t""yes" 1>&6
10440   :
10441 else
10442   echo "$ac_t""no" 1>&6
10443 with_xfs=no
10444 fi
10445
10446
10447     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10448       { test "$extra_verbose" = "yes" && cat << \EOF
10449     Defining USE_XFONTSET
10450 EOF
10451 cat >> confdefs.h <<\EOF
10452 #define USE_XFONTSET 1
10453 EOF
10454 }
10455
10456       if test "$with_xim" = "no" ; then
10457         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10458    echo "    xemacs will be linked with \"input-method-xlib.o\""
10459  fi
10460       fi
10461     fi
10462   fi 
10463     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10464   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10465 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10466 echo "configure:10467: checking for wnn/jllib.h" >&5
10467
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <wnn/jllib.h>
10472 EOF
10473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10474 { (eval echo configure:10475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10476 if test -z "$ac_err"; then
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=yes"
10479 else
10480   echo "$ac_err" >&5
10481   echo "configure: failed program was:" >&5
10482   cat conftest.$ac_ext >&5
10483   rm -rf conftest*
10484   eval "ac_cv_header_$ac_safe=no"
10485 fi
10486 rm -f conftest*
10487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489   :
10490 else
10491   echo "$ac_t""no" 1>&6
10492 with_wnn=no
10493 fi
10494  }
10495     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10496 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10497 echo "configure:10498: checking for wnn/commonhd.h" >&5
10498
10499 cat > conftest.$ac_ext <<EOF
10500 #line 10501 "configure"
10501 #include "confdefs.h"
10502 #include <wnn/commonhd.h>
10503 EOF
10504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10505 { (eval echo configure:10506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10507 if test -z "$ac_err"; then
10508   rm -rf conftest*
10509   eval "ac_cv_header_$ac_safe=yes"
10510 else
10511   echo "$ac_err" >&5
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -rf conftest*
10515   eval "ac_cv_header_$ac_safe=no"
10516 fi
10517 rm -f conftest*
10518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10519   echo "$ac_t""yes" 1>&6
10520   :
10521 else
10522   echo "$ac_t""no" 1>&6
10523 with_wnn=no
10524 fi
10525  }
10526     if test "$with_wnn" != "no"; then
10527     for ac_func in crypt
10528 do
10529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10530 echo "configure:10531: checking for $ac_func" >&5
10531
10532 cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535 /* System header to define __stub macros and hopefully few prototypes,
10536     which can conflict with char $ac_func(); below.  */
10537 #include <assert.h>
10538 /* Override any gcc2 internal prototype to avoid an error.  */
10539 /* We use char because int might match the return type of a gcc2
10540     builtin and then its argument prototype would still apply.  */
10541 char $ac_func();
10542
10543 int main() {
10544
10545 /* The GNU C library defines this for functions which it implements
10546     to always fail with ENOSYS.  Some functions are actually named
10547     something starting with __ and the normal name is an alias.  */
10548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10549 choke me
10550 #else
10551 $ac_func();
10552 #endif
10553
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_func_$ac_func=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_func_$ac_func=no"
10564 fi
10565 rm -f conftest*
10566
10567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10570   { test "$extra_verbose" = "yes" && cat << EOF
10571     Defining $ac_tr_func
10572 EOF
10573 cat >> confdefs.h <<EOF
10574 #define $ac_tr_func 1
10575 EOF
10576 }
10577  
10578 else
10579   echo "$ac_t""no" 1>&6
10580 fi
10581 done
10582
10583     test "$ac_cv_func_crypt" != "yes" && { 
10584 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10585 echo "configure:10586: checking for crypt in -lcrypt" >&5
10586 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10587
10588 xe_check_libs=" -lcrypt "
10589 cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592 /* Override any gcc2 internal prototype to avoid an error.  */
10593 /* We use char because int might match the return type of a gcc2
10594     builtin and then its argument prototype would still apply.  */
10595 char crypt();
10596
10597 int main() {
10598 crypt()
10599 ; return 0; }
10600 EOF
10601 if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=yes"
10604 else
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -rf conftest*
10608   eval "ac_cv_lib_$ac_lib_var=no"
10609 fi
10610 rm -f conftest*
10611 xe_check_libs=""
10612
10613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10614   echo "$ac_t""yes" 1>&6
10615     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10616     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10617   { test "$extra_verbose" = "yes" && cat << EOF
10618     Defining $ac_tr_lib
10619 EOF
10620 cat >> confdefs.h <<EOF
10621 #define $ac_tr_lib 1
10622 EOF
10623 }
10624
10625   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10626
10627 else
10628   echo "$ac_t""no" 1>&6
10629 fi
10630
10631  }
10632   fi
10633     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10634     
10635 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10636 echo "configure:10637: checking for jl_dic_list_e in -lwnn" >&5
10637 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10638
10639 xe_check_libs=" -lwnn "
10640 cat > conftest.$ac_ext <<EOF
10641 #line 10642 "configure"
10642 #include "confdefs.h"
10643 /* Override any gcc2 internal prototype to avoid an error.  */
10644 /* We use char because int might match the return type of a gcc2
10645     builtin and then its argument prototype would still apply.  */
10646 char jl_dic_list_e();
10647
10648 int main() {
10649 jl_dic_list_e()
10650 ; return 0; }
10651 EOF
10652 if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10653   rm -rf conftest*
10654   eval "ac_cv_lib_$ac_lib_var=yes"
10655 else
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -rf conftest*
10659   eval "ac_cv_lib_$ac_lib_var=no"
10660 fi
10661 rm -f conftest*
10662 xe_check_libs=""
10663
10664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10665   echo "$ac_t""yes" 1>&6
10666   libwnn=wnn
10667 else
10668   echo "$ac_t""no" 1>&6
10669 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10670 echo "configure:10671: checking for jl_dic_list_e in -lwnn4" >&5
10671 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10672
10673 xe_check_libs=" -lwnn4 "
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677 /* Override any gcc2 internal prototype to avoid an error.  */
10678 /* We use char because int might match the return type of a gcc2
10679     builtin and then its argument prototype would still apply.  */
10680 char jl_dic_list_e();
10681
10682 int main() {
10683 jl_dic_list_e()
10684 ; return 0; }
10685 EOF
10686 if { (eval echo configure:10687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10687   rm -rf conftest*
10688   eval "ac_cv_lib_$ac_lib_var=yes"
10689 else
10690   echo "configure: failed program was:" >&5
10691   cat conftest.$ac_ext >&5
10692   rm -rf conftest*
10693   eval "ac_cv_lib_$ac_lib_var=no"
10694 fi
10695 rm -f conftest*
10696 xe_check_libs=""
10697
10698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10699   echo "$ac_t""yes" 1>&6
10700   libwnn=wnn4
10701 else
10702   echo "$ac_t""no" 1>&6
10703 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10704 echo "configure:10705: checking for jl_dic_list_e in -lwnn6" >&5
10705 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10706
10707 xe_check_libs=" -lwnn6 "
10708 cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 /* Override any gcc2 internal prototype to avoid an error.  */
10712 /* We use char because int might match the return type of a gcc2
10713     builtin and then its argument prototype would still apply.  */
10714 char jl_dic_list_e();
10715
10716 int main() {
10717 jl_dic_list_e()
10718 ; return 0; }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10721   rm -rf conftest*
10722   eval "ac_cv_lib_$ac_lib_var=yes"
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   eval "ac_cv_lib_$ac_lib_var=no"
10728 fi
10729 rm -f conftest*
10730 xe_check_libs=""
10731
10732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10733   echo "$ac_t""yes" 1>&6
10734   libwnn=wnn6
10735 else
10736   echo "$ac_t""no" 1>&6
10737 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10738 echo "configure:10739: checking for dic_list_e in -lwnn6_fromsrc" >&5
10739 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10740
10741 xe_check_libs=" -lwnn6_fromsrc "
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char dic_list_e();
10749
10750 int main() {
10751 dic_list_e()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 xe_check_libs=""
10765
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10767   echo "$ac_t""yes" 1>&6
10768   libwnn=wnn6_fromsrc
10769 else
10770   echo "$ac_t""no" 1>&6
10771 with_wnn=no
10772 fi
10773
10774
10775 fi
10776
10777
10778 fi
10779
10780
10781 fi
10782
10783
10784   fi
10785   test -z "$with_wnn" && with_wnn=yes
10786   if test "$with_wnn" = "yes"; then
10787     { test "$extra_verbose" = "yes" && cat << \EOF
10788     Defining HAVE_WNN
10789 EOF
10790 cat >> confdefs.h <<\EOF
10791 #define HAVE_WNN 1
10792 EOF
10793 }
10794
10795     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10796     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10797    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10798  fi
10799     if test "$with_wnn6" != "no"; then
10800       
10801 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10802 echo "configure:10803: checking for jl_fi_dic_list in -l$libwnn" >&5
10803 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10804
10805 xe_check_libs=" -l$libwnn "
10806 cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 /* Override any gcc2 internal prototype to avoid an error.  */
10810 /* We use char because int might match the return type of a gcc2
10811     builtin and then its argument prototype would still apply.  */
10812 char jl_fi_dic_list();
10813
10814 int main() {
10815 jl_fi_dic_list()
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=yes"
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=no"
10826 fi
10827 rm -f conftest*
10828 xe_check_libs=""
10829
10830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10831   echo "$ac_t""yes" 1>&6
10832   with_wnn6=yes
10833 else
10834   echo "$ac_t""no" 1>&6
10835 fi
10836
10837
10838       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10839     Defining WNN6
10840 EOF
10841 cat >> confdefs.h <<\EOF
10842 #define WNN6 1
10843 EOF
10844 }
10845
10846     fi
10847   fi
10848
10849     canna_includes_found=no
10850   if test "$with_canna" != "no"; then
10851     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10852 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10853 echo "configure:10854: checking for canna/jrkanji.h" >&5
10854
10855 cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 #include <canna/jrkanji.h>
10859 EOF
10860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10861 { (eval echo configure:10862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10863 if test -z "$ac_err"; then
10864   rm -rf conftest*
10865   eval "ac_cv_header_$ac_safe=yes"
10866 else
10867   echo "$ac_err" >&5
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_header_$ac_safe=no"
10872 fi
10873 rm -f conftest*
10874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10875   echo "$ac_t""yes" 1>&6
10876   canna_includes_found=yes
10877 else
10878   echo "$ac_t""no" 1>&6
10879 fi
10880
10881   fi
10882   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10883       -d "/usr/local/canna/include"; then
10884     save_c_switch_site="$c_switch_site"
10885     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10886     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10887 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10888 echo "configure:10889: checking for canna/jrkanji.h" >&5
10889
10890 cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include <canna/jrkanji.h>
10894 EOF
10895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10896 { (eval echo configure:10897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10898 if test -z "$ac_err"; then
10899   rm -rf conftest*
10900   eval "ac_cv_header_$ac_safe=yes"
10901 else
10902   echo "$ac_err" >&5
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   eval "ac_cv_header_$ac_safe=no"
10907 fi
10908 rm -f conftest*
10909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911   canna_includes_found=yes
10912 else
10913   echo "$ac_t""no" 1>&6
10914 fi
10915
10916     if test "$canna_includes_found" != "yes"; then
10917       c_switch_site="$save_c_switch_site"
10918       with_canna="no"
10919     fi
10920   fi
10921
10922   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10923 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10924 echo "configure:10925: checking for canna/RK.h" >&5
10925
10926 cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929 #include <canna/RK.h>
10930 EOF
10931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10932 { (eval echo configure:10933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10934 if test -z "$ac_err"; then
10935   rm -rf conftest*
10936   eval "ac_cv_header_$ac_safe=yes"
10937 else
10938   echo "$ac_err" >&5
10939   echo "configure: failed program was:" >&5
10940   cat conftest.$ac_ext >&5
10941   rm -rf conftest*
10942   eval "ac_cv_header_$ac_safe=no"
10943 fi
10944 rm -f conftest*
10945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10946   echo "$ac_t""yes" 1>&6
10947   :
10948 else
10949   echo "$ac_t""no" 1>&6
10950 with_canna=no
10951 fi
10952  }
10953   test -z "$with_canna" && { 
10954 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10955 echo "configure:10956: checking for RkBgnBun in -lRKC" >&5
10956 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10957
10958 xe_check_libs=" -lRKC "
10959 cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962 /* Override any gcc2 internal prototype to avoid an error.  */
10963 /* We use char because int might match the return type of a gcc2
10964     builtin and then its argument prototype would still apply.  */
10965 char RkBgnBun();
10966
10967 int main() {
10968 RkBgnBun()
10969 ; return 0; }
10970 EOF
10971 if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10972   rm -rf conftest*
10973   eval "ac_cv_lib_$ac_lib_var=yes"
10974 else
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   eval "ac_cv_lib_$ac_lib_var=no"
10979 fi
10980 rm -f conftest*
10981 xe_check_libs=""
10982
10983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10984   echo "$ac_t""yes" 1>&6
10985   :
10986 else
10987   echo "$ac_t""no" 1>&6
10988 with_canna=no
10989 fi
10990
10991  }
10992   test -z "$with_canna" && { 
10993 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10994 echo "configure:10995: checking for jrKanjiControl in -lcanna" >&5
10995 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10996
10997 xe_check_libs=" -lcanna "
10998 cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 /* Override any gcc2 internal prototype to avoid an error.  */
11002 /* We use char because int might match the return type of a gcc2
11003     builtin and then its argument prototype would still apply.  */
11004 char jrKanjiControl();
11005
11006 int main() {
11007 jrKanjiControl()
11008 ; return 0; }
11009 EOF
11010 if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11011   rm -rf conftest*
11012   eval "ac_cv_lib_$ac_lib_var=yes"
11013 else
11014   echo "configure: failed program was:" >&5
11015   cat conftest.$ac_ext >&5
11016   rm -rf conftest*
11017   eval "ac_cv_lib_$ac_lib_var=no"
11018 fi
11019 rm -f conftest*
11020 xe_check_libs=""
11021
11022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11023   echo "$ac_t""yes" 1>&6
11024   :
11025 else
11026   echo "$ac_t""no" 1>&6
11027 with_canna=no
11028 fi
11029
11030  }
11031   test -z "$with_canna" && with_canna=yes
11032   if test "$with_canna" = "yes"; then
11033     { test "$extra_verbose" = "yes" && cat << \EOF
11034     Defining HAVE_CANNA
11035 EOF
11036 cat >> confdefs.h <<\EOF
11037 #define HAVE_CANNA 1
11038 EOF
11039 }
11040
11041     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11042     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11043    echo "    xemacs will be linked with \"mule-canna.o\""
11044  fi
11045   fi
11046
11047 else   for feature in xim canna wnn; do
11048     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11049       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11050     fi
11051     eval "with_${feature}=no"
11052   done
11053 fi 
11054
11055 if test "$need_motif" = "yes" ; then
11056   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11057     
11058 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11059 echo "configure:11060: checking for layout_object_getvalue in -li18n" >&5
11060 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11061
11062 xe_check_libs=" -li18n "
11063 cat > conftest.$ac_ext <<EOF
11064 #line 11065 "configure"
11065 #include "confdefs.h"
11066 /* Override any gcc2 internal prototype to avoid an error.  */
11067 /* We use char because int might match the return type of a gcc2
11068     builtin and then its argument prototype would still apply.  */
11069 char layout_object_getvalue();
11070
11071 int main() {
11072 layout_object_getvalue()
11073 ; return 0; }
11074 EOF
11075 if { (eval echo configure:11076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11076   rm -rf conftest*
11077   eval "ac_cv_lib_$ac_lib_var=yes"
11078 else
11079   echo "configure: failed program was:" >&5
11080   cat conftest.$ac_ext >&5
11081   rm -rf conftest*
11082   eval "ac_cv_lib_$ac_lib_var=no"
11083 fi
11084 rm -f conftest*
11085 xe_check_libs=""
11086
11087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11088   echo "$ac_t""yes" 1>&6
11089   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11090 else
11091   echo "$ac_t""no" 1>&6
11092 fi
11093
11094
11095   
11096 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11097     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11098   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11099   
11100         runpath="" runpath_dirs=""
11101   if test -n "$LD_RUN_PATH"; then
11102     runpath="$LD_RUN_PATH"
11103   elif test "$GCC" = "yes"; then
11104         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11105     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11106     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11107     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11108       case "$arg" in P,* | -L* | -R* )
11109         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11110           {
11111 xe_runpath_dir="$dir"
11112   test "$xe_runpath_dir" != "/lib"     -a \
11113         "$xe_runpath_dir" != "/usr/lib" -a \
11114         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11115   eval "$xe_add_unique_runpath_dir"
11116 }
11117         done ;;
11118       esac
11119     done
11120     ld_switch_run="$ld_switch_run_save"
11121     rm -f conftest*
11122   else
11123         for arg in $ld_switch_site $ld_switch_x_site; do
11124       case "$arg" in -L*) {
11125 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11126   test "$xe_runpath_dir" != "/lib"     -a \
11127         "$xe_runpath_dir" != "/usr/lib" -a \
11128         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11129   eval "$xe_add_unique_runpath_dir"
11130 };; esac
11131     done
11132         if test "$opsys $need_motif" = "sol2 yes"; then
11133       xe_runpath_dir="/opt/SUNWdt/lib";
11134       eval "$xe_add_unique_runpath_dir";
11135     fi
11136   fi 
11137   if test -n "$runpath"; then
11138     ld_switch_run="${dash_r}${runpath}"
11139     
11140 if test "$GCC" = "yes"; then
11141   set x $ld_switch_run; shift; ld_switch_run=""
11142   while test -n "$1"; do
11143     case $1 in
11144       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11145       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11146       -Xlinker* ) ;;
11147       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11148     esac
11149     shift
11150   done
11151 fi
11152     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11153   fi
11154 fi
11155
11156 fi
11157
11158
11159 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
11160 do
11161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11162 echo "configure:11163: checking for $ac_func" >&5
11163
11164 cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 /* System header to define __stub macros and hopefully few prototypes,
11168     which can conflict with char $ac_func(); below.  */
11169 #include <assert.h>
11170 /* Override any gcc2 internal prototype to avoid an error.  */
11171 /* We use char because int might match the return type of a gcc2
11172     builtin and then its argument prototype would still apply.  */
11173 char $ac_func();
11174
11175 int main() {
11176
11177 /* The GNU C library defines this for functions which it implements
11178     to always fail with ENOSYS.  Some functions are actually named
11179     something starting with __ and the normal name is an alias.  */
11180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11181 choke me
11182 #else
11183 $ac_func();
11184 #endif
11185
11186 ; return 0; }
11187 EOF
11188 if { (eval echo configure:11189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11189   rm -rf conftest*
11190   eval "ac_cv_func_$ac_func=yes"
11191 else
11192   echo "configure: failed program was:" >&5
11193   cat conftest.$ac_ext >&5
11194   rm -rf conftest*
11195   eval "ac_cv_func_$ac_func=no"
11196 fi
11197 rm -f conftest*
11198
11199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11200   echo "$ac_t""yes" 1>&6
11201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11202   { test "$extra_verbose" = "yes" && cat << EOF
11203     Defining $ac_tr_func
11204 EOF
11205 cat >> confdefs.h <<EOF
11206 #define $ac_tr_func 1
11207 EOF
11208 }
11209  
11210 else
11211   echo "$ac_t""no" 1>&6
11212 fi
11213 done
11214
11215
11216 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11217   case "$opsys" in
11218     hpux11* )
11219       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11220       ac_cv_func_getaddrinfo=no
11221       ;;
11222   esac
11223 fi
11224
11225
11226 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11227 do
11228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_func" >&5
11230
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 /* System header to define __stub macros and hopefully few prototypes,
11235     which can conflict with char $ac_func(); below.  */
11236 #include <assert.h>
11237 /* Override any gcc2 internal prototype to avoid an error.  */
11238 /* We use char because int might match the return type of a gcc2
11239     builtin and then its argument prototype would still apply.  */
11240 char $ac_func();
11241
11242 int main() {
11243
11244 /* The GNU C library defines this for functions which it implements
11245     to always fail with ENOSYS.  Some functions are actually named
11246     something starting with __ and the normal name is an alias.  */
11247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11248 choke me
11249 #else
11250 $ac_func();
11251 #endif
11252
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_func_$ac_func=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_func_$ac_func=no"
11263 fi
11264 rm -f conftest*
11265
11266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11267   echo "$ac_t""yes" 1>&6
11268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11269   { test "$extra_verbose" = "yes" && cat << EOF
11270     Defining $ac_tr_func
11271 EOF
11272 cat >> confdefs.h <<EOF
11273 #define $ac_tr_func 1
11274 EOF
11275 }
11276  
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280 done
11281
11282
11283 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11284 echo "configure:11285: checking for openpty" >&5
11285
11286 cat > conftest.$ac_ext <<EOF
11287 #line 11288 "configure"
11288 #include "confdefs.h"
11289 /* System header to define __stub macros and hopefully few prototypes,
11290     which can conflict with char openpty(); below.  */
11291 #include <assert.h>
11292 /* Override any gcc2 internal prototype to avoid an error.  */
11293 /* We use char because int might match the return type of a gcc2
11294     builtin and then its argument prototype would still apply.  */
11295 char openpty();
11296
11297 int main() {
11298
11299 /* The GNU C library defines this for functions which it implements
11300     to always fail with ENOSYS.  Some functions are actually named
11301     something starting with __ and the normal name is an alias.  */
11302 #if defined (__stub_openpty) || defined (__stub___openpty)
11303 choke me
11304 #else
11305 openpty();
11306 #endif
11307
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   eval "ac_cv_func_openpty=yes"
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_func_openpty=no"
11318 fi
11319 rm -f conftest*
11320
11321 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11322   echo "$ac_t""yes" 1>&6
11323   have_openpty=yes
11324 else
11325   echo "$ac_t""no" 1>&6
11326
11327   
11328 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11329 echo "configure:11330: checking for openpty in -lutil" >&5
11330 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11331
11332 xe_check_libs=" -lutil "
11333 cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 /* Override any gcc2 internal prototype to avoid an error.  */
11337 /* We use char because int might match the return type of a gcc2
11338     builtin and then its argument prototype would still apply.  */
11339 char openpty();
11340
11341 int main() {
11342 openpty()
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346   rm -rf conftest*
11347   eval "ac_cv_lib_$ac_lib_var=yes"
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   eval "ac_cv_lib_$ac_lib_var=no"
11353 fi
11354 rm -f conftest*
11355 xe_check_libs=""
11356
11357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11358   echo "$ac_t""yes" 1>&6
11359   have_openpty=yes need_libutil=yes
11360 else
11361   echo "$ac_t""no" 1>&6
11362 fi
11363
11364
11365 fi
11366
11367 if test "$have_openpty" = "yes"; then
11368   { test "$extra_verbose" = "yes" && cat << \EOF
11369     Defining HAVE_OPENPTY
11370 EOF
11371 cat >> confdefs.h <<\EOF
11372 #define HAVE_OPENPTY 1
11373 EOF
11374 }
11375
11376   for ac_hdr in pty.h libutil.h util.h
11377 do
11378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11380 echo "configure:11381: checking for $ac_hdr" >&5
11381
11382 cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 #include <$ac_hdr>
11386 EOF
11387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11388 { (eval echo configure:11389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11390 if test -z "$ac_err"; then
11391   rm -rf conftest*
11392   eval "ac_cv_header_$ac_safe=yes"
11393 else
11394   echo "$ac_err" >&5
11395   echo "configure: failed program was:" >&5
11396   cat conftest.$ac_ext >&5
11397   rm -rf conftest*
11398   eval "ac_cv_header_$ac_safe=no"
11399 fi
11400 rm -f conftest*
11401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11402   echo "$ac_t""yes" 1>&6
11403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11404   { test "$extra_verbose" = "yes" && cat << EOF
11405     Defining $ac_tr_hdr
11406 EOF
11407 cat >> confdefs.h <<EOF
11408 #define $ac_tr_hdr 1
11409 EOF
11410 }
11411  break
11412 else
11413   echo "$ac_t""no" 1>&6
11414 fi
11415 done
11416
11417   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11418 fi
11419
11420 for ac_hdr in stropts.h
11421 do
11422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_hdr" >&5
11425
11426 cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429 #include <$ac_hdr>
11430 EOF
11431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11432 { (eval echo configure:11433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11434 if test -z "$ac_err"; then
11435   rm -rf conftest*
11436   eval "ac_cv_header_$ac_safe=yes"
11437 else
11438   echo "$ac_err" >&5
11439   echo "configure: failed program was:" >&5
11440   cat conftest.$ac_ext >&5
11441   rm -rf conftest*
11442   eval "ac_cv_header_$ac_safe=no"
11443 fi
11444 rm -f conftest*
11445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11446   echo "$ac_t""yes" 1>&6
11447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11448   { test "$extra_verbose" = "yes" && cat << EOF
11449     Defining $ac_tr_hdr
11450 EOF
11451 cat >> confdefs.h <<EOF
11452 #define $ac_tr_hdr 1
11453 EOF
11454 }
11455  
11456 else
11457   echo "$ac_t""no" 1>&6
11458 fi
11459 done
11460
11461 if test "$ac_cv_header_stropts_h" = "yes"; then
11462   for ac_func in isastream
11463 do
11464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11465 echo "configure:11466: checking for $ac_func" >&5
11466
11467 cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 /* System header to define __stub macros and hopefully few prototypes,
11471     which can conflict with char $ac_func(); below.  */
11472 #include <assert.h>
11473 /* Override any gcc2 internal prototype to avoid an error.  */
11474 /* We use char because int might match the return type of a gcc2
11475     builtin and then its argument prototype would still apply.  */
11476 char $ac_func();
11477
11478 int main() {
11479
11480 /* The GNU C library defines this for functions which it implements
11481     to always fail with ENOSYS.  Some functions are actually named
11482     something starting with __ and the normal name is an alias.  */
11483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11484 choke me
11485 #else
11486 $ac_func();
11487 #endif
11488
11489 ; return 0; }
11490 EOF
11491 if { (eval echo configure:11492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11492   rm -rf conftest*
11493   eval "ac_cv_func_$ac_func=yes"
11494 else
11495   echo "configure: failed program was:" >&5
11496   cat conftest.$ac_ext >&5
11497   rm -rf conftest*
11498   eval "ac_cv_func_$ac_func=no"
11499 fi
11500 rm -f conftest*
11501
11502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11503   echo "$ac_t""yes" 1>&6
11504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11505   { test "$extra_verbose" = "yes" && cat << EOF
11506     Defining $ac_tr_func
11507 EOF
11508 cat >> confdefs.h <<EOF
11509 #define $ac_tr_func 1
11510 EOF
11511 }
11512  
11513 else
11514   echo "$ac_t""no" 1>&6
11515 fi
11516 done
11517
11518   for ac_hdr in strtio.h
11519 do
11520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11522 echo "configure:11523: checking for $ac_hdr" >&5
11523
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <$ac_hdr>
11528 EOF
11529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11530 { (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11532 if test -z "$ac_err"; then
11533   rm -rf conftest*
11534   eval "ac_cv_header_$ac_safe=yes"
11535 else
11536   echo "$ac_err" >&5
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_header_$ac_safe=no"
11541 fi
11542 rm -f conftest*
11543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11546   { test "$extra_verbose" = "yes" && cat << EOF
11547     Defining $ac_tr_hdr
11548 EOF
11549 cat >> confdefs.h <<EOF
11550 #define $ac_tr_hdr 1
11551 EOF
11552 }
11553  
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557 done
11558  fi
11559
11560 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11561    echo "    xemacs will be linked with \"realpath.o\""
11562  fi
11563
11564 for ac_func in getloadavg
11565 do
11566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11567 echo "configure:11568: checking for $ac_func" >&5
11568
11569 cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 /* System header to define __stub macros and hopefully few prototypes,
11573     which can conflict with char $ac_func(); below.  */
11574 #include <assert.h>
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char $ac_func();
11579
11580 int main() {
11581
11582 /* The GNU C library defines this for functions which it implements
11583     to always fail with ENOSYS.  Some functions are actually named
11584     something starting with __ and the normal name is an alias.  */
11585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11586 choke me
11587 #else
11588 $ac_func();
11589 #endif
11590
11591 ; return 0; }
11592 EOF
11593 if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11594   rm -rf conftest*
11595   eval "ac_cv_func_$ac_func=yes"
11596 else
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_func_$ac_func=no"
11601 fi
11602 rm -f conftest*
11603
11604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11607   { test "$extra_verbose" = "yes" && cat << EOF
11608     Defining $ac_tr_func
11609 EOF
11610 cat >> confdefs.h <<EOF
11611 #define $ac_tr_func 1
11612 EOF
11613 }
11614  
11615 else
11616   echo "$ac_t""no" 1>&6
11617 fi
11618 done
11619
11620
11621 if test "$ac_cv_func_getloadavg" = "yes"; then
11622         for ac_hdr in sys/loadavg.h
11623 do
11624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11626 echo "configure:11627: checking for $ac_hdr" >&5
11627
11628 cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 #include <$ac_hdr>
11632 EOF
11633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11634 { (eval echo configure:11635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11636 if test -z "$ac_err"; then
11637   rm -rf conftest*
11638   eval "ac_cv_header_$ac_safe=yes"
11639 else
11640   echo "$ac_err" >&5
11641   echo "configure: failed program was:" >&5
11642   cat conftest.$ac_ext >&5
11643   rm -rf conftest*
11644   eval "ac_cv_header_$ac_safe=no"
11645 fi
11646 rm -f conftest*
11647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11648   echo "$ac_t""yes" 1>&6
11649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11650   { test "$extra_verbose" = "yes" && cat << EOF
11651     Defining $ac_tr_hdr
11652 EOF
11653 cat >> confdefs.h <<EOF
11654 #define $ac_tr_hdr 1
11655 EOF
11656 }
11657  
11658 else
11659   echo "$ac_t""no" 1>&6
11660 fi
11661 done
11662
11663 else
11664     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11665    echo "    xemacs will be linked with \"getloadavg.o\""
11666  fi
11667
11668     
11669 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11670 echo "configure:11671: checking for kstat_open in -lkstat" >&5
11671 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11672
11673 xe_check_libs=" -lkstat "
11674 cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 /* Override any gcc2 internal prototype to avoid an error.  */
11678 /* We use char because int might match the return type of a gcc2
11679     builtin and then its argument prototype would still apply.  */
11680 char kstat_open();
11681
11682 int main() {
11683 kstat_open()
11684 ; return 0; }
11685 EOF
11686 if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11687   rm -rf conftest*
11688   eval "ac_cv_lib_$ac_lib_var=yes"
11689 else
11690   echo "configure: failed program was:" >&5
11691   cat conftest.$ac_ext >&5
11692   rm -rf conftest*
11693   eval "ac_cv_lib_$ac_lib_var=no"
11694 fi
11695 rm -f conftest*
11696 xe_check_libs=""
11697
11698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11699   echo "$ac_t""yes" 1>&6
11700     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11701     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11702   { test "$extra_verbose" = "yes" && cat << EOF
11703     Defining $ac_tr_lib
11704 EOF
11705 cat >> confdefs.h <<EOF
11706 #define $ac_tr_lib 1
11707 EOF
11708 }
11709
11710   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11711
11712 else
11713   echo "$ac_t""no" 1>&6
11714 fi
11715
11716
11717   for ac_hdr in kstat.h
11718 do
11719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11721 echo "configure:11722: checking for $ac_hdr" >&5
11722
11723 cat > conftest.$ac_ext <<EOF
11724 #line 11725 "configure"
11725 #include "confdefs.h"
11726 #include <$ac_hdr>
11727 EOF
11728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11729 { (eval echo configure:11730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11731 if test -z "$ac_err"; then
11732   rm -rf conftest*
11733   eval "ac_cv_header_$ac_safe=yes"
11734 else
11735   echo "$ac_err" >&5
11736   echo "configure: failed program was:" >&5
11737   cat conftest.$ac_ext >&5
11738   rm -rf conftest*
11739   eval "ac_cv_header_$ac_safe=no"
11740 fi
11741 rm -f conftest*
11742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11743   echo "$ac_t""yes" 1>&6
11744     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11745   { test "$extra_verbose" = "yes" && cat << EOF
11746     Defining $ac_tr_hdr
11747 EOF
11748 cat >> confdefs.h <<EOF
11749 #define $ac_tr_hdr 1
11750 EOF
11751 }
11752  
11753 else
11754   echo "$ac_t""no" 1>&6
11755 fi
11756 done
11757
11758
11759     
11760 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11761 echo "configure:11762: checking for kvm_read in -lkvm" >&5
11762 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11763
11764 xe_check_libs=" -lkvm "
11765 cat > conftest.$ac_ext <<EOF
11766 #line 11767 "configure"
11767 #include "confdefs.h"
11768 /* Override any gcc2 internal prototype to avoid an error.  */
11769 /* We use char because int might match the return type of a gcc2
11770     builtin and then its argument prototype would still apply.  */
11771 char kvm_read();
11772
11773 int main() {
11774 kvm_read()
11775 ; return 0; }
11776 EOF
11777 if { (eval echo configure:11778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11778   rm -rf conftest*
11779   eval "ac_cv_lib_$ac_lib_var=yes"
11780 else
11781   echo "configure: failed program was:" >&5
11782   cat conftest.$ac_ext >&5
11783   rm -rf conftest*
11784   eval "ac_cv_lib_$ac_lib_var=no"
11785 fi
11786 rm -f conftest*
11787 xe_check_libs=""
11788
11789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11790   echo "$ac_t""yes" 1>&6
11791     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11792     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11793   { test "$extra_verbose" = "yes" && cat << EOF
11794     Defining $ac_tr_lib
11795 EOF
11796 cat >> confdefs.h <<EOF
11797 #define $ac_tr_lib 1
11798 EOF
11799 }
11800
11801   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11802
11803 else
11804   echo "$ac_t""no" 1>&6
11805 fi
11806
11807
11808 fi
11809
11810 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11811 echo "configure:11812: checking whether netdb declares h_errno" >&5
11812 cat > conftest.$ac_ext <<EOF
11813 #line 11814 "configure"
11814 #include "confdefs.h"
11815 #include <netdb.h>
11816 int main() {
11817 return h_errno;
11818 ; return 0; }
11819 EOF
11820 if { (eval echo configure:11821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11821   rm -rf conftest*
11822   echo "$ac_t""yes" 1>&6
11823    { test "$extra_verbose" = "yes" && cat << \EOF
11824     Defining HAVE_H_ERRNO
11825 EOF
11826 cat >> confdefs.h <<\EOF
11827 #define HAVE_H_ERRNO 1
11828 EOF
11829 }
11830
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -rf conftest*
11835   echo "$ac_t""no" 1>&6
11836 fi
11837 rm -f conftest*
11838
11839 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11840 echo "configure:11841: checking for sigsetjmp" >&5
11841 cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844 #include <setjmp.h>
11845 int main() {
11846 sigjmp_buf bar; sigsetjmp (bar, 0);
11847 ; return 0; }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11850   rm -rf conftest*
11851   echo "$ac_t""yes" 1>&6
11852    { test "$extra_verbose" = "yes" && cat << \EOF
11853     Defining HAVE_SIGSETJMP
11854 EOF
11855 cat >> confdefs.h <<\EOF
11856 #define HAVE_SIGSETJMP 1
11857 EOF
11858 }
11859
11860 else
11861   echo "configure: failed program was:" >&5
11862   cat conftest.$ac_ext >&5
11863   rm -rf conftest*
11864   echo "$ac_t""no" 1>&6
11865 fi
11866 rm -f conftest*
11867
11868 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11869 echo "configure:11870: checking whether localtime caches TZ" >&5
11870
11871 if test "$ac_cv_func_tzset" = "yes"; then
11872 cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 #include <time.h>
11876 #if STDC_HEADERS
11877 # include <stdlib.h>
11878 #endif
11879 extern char **environ;
11880 unset_TZ ()
11881 {
11882   char **from, **to;
11883   for (to = from = environ; (*to = *from); from++)
11884     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11885       to++;
11886 }
11887 char TZ_GMT0[] = "TZ=GMT0";
11888 char TZ_PST8[] = "TZ=PST8";
11889 main()
11890 {
11891   time_t now = time ((time_t *) 0);
11892   int hour_GMT0, hour_unset;
11893   if (putenv (TZ_GMT0) != 0)
11894     exit (1);
11895   hour_GMT0 = localtime (&now)->tm_hour;
11896   unset_TZ ();
11897   hour_unset = localtime (&now)->tm_hour;
11898   if (putenv (TZ_PST8) != 0)
11899     exit (1);
11900   if (localtime (&now)->tm_hour == hour_GMT0)
11901     exit (1);
11902   unset_TZ ();
11903   if (localtime (&now)->tm_hour != hour_unset)
11904     exit (1);
11905   exit (0);
11906 }
11907 EOF
11908 if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11909 then
11910   emacs_cv_localtime_cache=no
11911 else
11912   conftest_rc="$?"
11913   echo "configure: failed program was:" >&5
11914   cat conftest.$ac_ext >&5
11915   rm -fr conftest*
11916   emacs_cv_localtime_cache=yes
11917 fi
11918 rm -fr conftest*
11919 else
11920         # If we lack tzset, report that localtime does not cache TZ,
11921         # since we can't invalidate the cache if we don't have tzset.
11922         emacs_cv_localtime_cache=no
11923 fi
11924 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11925 if test $emacs_cv_localtime_cache = yes; then
11926   { test "$extra_verbose" = "yes" && cat << \EOF
11927     Defining LOCALTIME_CACHE
11928 EOF
11929 cat >> confdefs.h <<\EOF
11930 #define LOCALTIME_CACHE 1
11931 EOF
11932 }
11933
11934 fi
11935
11936 if test "$HAVE_TIMEVAL" = "yes"; then
11937 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11938 echo "configure:11939: checking whether gettimeofday accepts one or two arguments" >&5
11939 cat > conftest.$ac_ext <<EOF
11940 #line 11941 "configure"
11941 #include "confdefs.h"
11942
11943 #ifdef TIME_WITH_SYS_TIME
11944 #include <sys/time.h>
11945 #include <time.h>
11946 #else
11947 #ifdef HAVE_SYS_TIME_H
11948 #include <sys/time.h>
11949 #else
11950 #include <time.h>
11951 #endif
11952 #endif
11953   
11954 int main() {
11955
11956   struct timeval time;
11957   gettimeofday (&time, 0);
11958
11959 ; return 0; }
11960 EOF
11961 if { (eval echo configure:11962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11962   rm -rf conftest*
11963   echo "$ac_t""two" 1>&6
11964 else
11965   echo "configure: failed program was:" >&5
11966   cat conftest.$ac_ext >&5
11967   rm -rf conftest*
11968   echo "$ac_t""one" 1>&6
11969    { test "$extra_verbose" = "yes" && cat << \EOF
11970     Defining GETTIMEOFDAY_ONE_ARGUMENT
11971 EOF
11972 cat >> confdefs.h <<\EOF
11973 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11974 EOF
11975 }
11976
11977 fi
11978 rm -f conftest*
11979 fi
11980
11981
11982 echo $ac_n "checking for inline""... $ac_c" 1>&6
11983 echo "configure:11984: checking for inline" >&5
11984
11985 ac_cv_c_inline=no
11986 for ac_kw in inline __inline__ __inline; do
11987   cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990
11991 int main() {
11992 } $ac_kw foo() {
11993 ; return 0; }
11994 EOF
11995 if { (eval echo configure:11996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11996   rm -rf conftest*
11997   ac_cv_c_inline=$ac_kw; break
11998 else
11999   echo "configure: failed program was:" >&5
12000   cat conftest.$ac_ext >&5
12001 fi
12002 rm -f conftest*
12003 done
12004
12005
12006 echo "$ac_t""$ac_cv_c_inline" 1>&6
12007 case "$ac_cv_c_inline" in
12008   inline | yes) ;;
12009   no) { test "$extra_verbose" = "yes" && cat << \EOF
12010     Defining inline = 
12011 EOF
12012 cat >> confdefs.h <<\EOF
12013 #define inline 
12014 EOF
12015 }
12016  ;;
12017   *)  { test "$extra_verbose" = "yes" && cat << EOF
12018     Defining inline = $ac_cv_c_inline
12019 EOF
12020 cat >> confdefs.h <<EOF
12021 #define inline $ac_cv_c_inline
12022 EOF
12023 }
12024  ;;
12025 esac
12026
12027 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12028    echo "    xemacs will be linked with \"inline.o\""
12029  fi
12030
12031
12032 if test "$__DECC" != "yes"; then
12033   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12034 # for constant arguments.  Useless!
12035 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12036 echo "configure:12037: checking for working alloca.h" >&5
12037
12038 cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 #include <alloca.h>
12042 int main() {
12043 char *p = alloca(2 * sizeof(int));
12044 ; return 0; }
12045 EOF
12046 if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12047   rm -rf conftest*
12048   ac_cv_header_alloca_h=yes
12049 else
12050   echo "configure: failed program was:" >&5
12051   cat conftest.$ac_ext >&5
12052   rm -rf conftest*
12053   ac_cv_header_alloca_h=no
12054 fi
12055 rm -f conftest*
12056
12057 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12058 if test $ac_cv_header_alloca_h = yes; then
12059   { test "$extra_verbose" = "yes" && cat << \EOF
12060     Defining HAVE_ALLOCA_H
12061 EOF
12062 cat >> confdefs.h <<\EOF
12063 #define HAVE_ALLOCA_H 1
12064 EOF
12065 }
12066
12067 fi
12068
12069 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12070 echo "configure:12071: checking for alloca" >&5
12071
12072 cat > conftest.$ac_ext <<EOF
12073 #line 12074 "configure"
12074 #include "confdefs.h"
12075
12076 #ifdef __GNUC__
12077 # define alloca __builtin_alloca
12078 #else
12079 # ifdef _MSC_VER
12080 #  include <malloc.h>
12081 #  define alloca _alloca
12082 # else
12083 #  if HAVE_ALLOCA_H
12084 #   include <alloca.h>
12085 #  else
12086 #   ifdef _AIX
12087  #pragma alloca
12088 #   else
12089 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12090 char *alloca ();
12091 #    endif
12092 #   endif
12093 #  endif
12094 # endif
12095 #endif
12096
12097 int main() {
12098 char *p = (char *) alloca(1);
12099 ; return 0; }
12100 EOF
12101 if { (eval echo configure:12102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12102   rm -rf conftest*
12103   ac_cv_func_alloca_works=yes
12104 else
12105   echo "configure: failed program was:" >&5
12106   cat conftest.$ac_ext >&5
12107   rm -rf conftest*
12108   ac_cv_func_alloca_works=no
12109 fi
12110 rm -f conftest*
12111
12112 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12113 if test $ac_cv_func_alloca_works = yes; then
12114   { test "$extra_verbose" = "yes" && cat << \EOF
12115     Defining HAVE_ALLOCA
12116 EOF
12117 cat >> confdefs.h <<\EOF
12118 #define HAVE_ALLOCA 1
12119 EOF
12120 }
12121
12122 fi
12123
12124 if test $ac_cv_func_alloca_works = no; then
12125   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12126   # that cause trouble.  Some versions do not even contain alloca or
12127   # contain a buggy version.  If you still want to use their alloca,
12128   # use ar to extract alloca.o from them instead of compiling alloca.c.
12129   ALLOCA=alloca.${ac_objext}
12130   { test "$extra_verbose" = "yes" && cat << \EOF
12131     Defining C_ALLOCA
12132 EOF
12133 cat >> confdefs.h <<\EOF
12134 #define C_ALLOCA 1
12135 EOF
12136 }
12137
12138
12139 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12140 echo "configure:12141: checking whether alloca needs Cray hooks" >&5
12141
12142 cat > conftest.$ac_ext <<EOF
12143 #line 12144 "configure"
12144 #include "confdefs.h"
12145 #if defined(CRAY) && ! defined(CRAY2)
12146 webecray
12147 #else
12148 wenotbecray
12149 #endif
12150
12151 EOF
12152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12153   egrep "webecray" >/dev/null 2>&1; then
12154   rm -rf conftest*
12155   ac_cv_os_cray=yes
12156 else
12157   rm -rf conftest*
12158   ac_cv_os_cray=no
12159 fi
12160 rm -f conftest*
12161
12162
12163 echo "$ac_t""$ac_cv_os_cray" 1>&6
12164 if test $ac_cv_os_cray = yes; then
12165 for ac_func in _getb67 GETB67 getb67; do
12166   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12167 echo "configure:12168: checking for $ac_func" >&5
12168
12169 cat > conftest.$ac_ext <<EOF
12170 #line 12171 "configure"
12171 #include "confdefs.h"
12172 /* System header to define __stub macros and hopefully few prototypes,
12173     which can conflict with char $ac_func(); below.  */
12174 #include <assert.h>
12175 /* Override any gcc2 internal prototype to avoid an error.  */
12176 /* We use char because int might match the return type of a gcc2
12177     builtin and then its argument prototype would still apply.  */
12178 char $ac_func();
12179
12180 int main() {
12181
12182 /* The GNU C library defines this for functions which it implements
12183     to always fail with ENOSYS.  Some functions are actually named
12184     something starting with __ and the normal name is an alias.  */
12185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12186 choke me
12187 #else
12188 $ac_func();
12189 #endif
12190
12191 ; return 0; }
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12194   rm -rf conftest*
12195   eval "ac_cv_func_$ac_func=yes"
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -rf conftest*
12200   eval "ac_cv_func_$ac_func=no"
12201 fi
12202 rm -f conftest*
12203
12204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12205   echo "$ac_t""yes" 1>&6
12206   { test "$extra_verbose" = "yes" && cat << EOF
12207     Defining CRAY_STACKSEG_END = $ac_func
12208 EOF
12209 cat >> confdefs.h <<EOF
12210 #define CRAY_STACKSEG_END $ac_func
12211 EOF
12212 }
12213
12214   break
12215 else
12216   echo "$ac_t""no" 1>&6
12217 fi
12218
12219 done
12220 fi
12221
12222 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12223 echo "configure:12224: checking stack direction for C alloca" >&5
12224
12225 cat > conftest.$ac_ext <<EOF
12226 #line 12227 "configure"
12227 #include "confdefs.h"
12228 find_stack_direction ()
12229 {
12230   static char *addr = 0;
12231   auto char dummy;
12232   if (addr == 0)
12233     {
12234       addr = &dummy;
12235       return find_stack_direction ();
12236     }
12237   else
12238     return (&dummy > addr) ? 1 : -1;
12239 }
12240 main ()
12241 {
12242   exit (find_stack_direction() < 0);
12243 }
12244 EOF
12245 if { (eval echo configure:12246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12246 then
12247   ac_cv_c_stack_direction=1
12248 else
12249   conftest_rc="$?"
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -fr conftest*
12253   ac_cv_c_stack_direction=-1
12254 fi
12255 rm -fr conftest*
12256
12257 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12258 { test "$extra_verbose" = "yes" && cat << EOF
12259     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12260 EOF
12261 cat >> confdefs.h <<EOF
12262 #define STACK_DIRECTION $ac_cv_c_stack_direction
12263 EOF
12264 }
12265
12266 fi
12267
12268   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12269    echo "    xemacs will be linked with \"$ALLOCA\""
12270  fi
12271 fi
12272
12273 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12274 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12275 echo "configure:12276: checking for vfork.h" >&5
12276
12277 cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 #include <vfork.h>
12281 EOF
12282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12283 { (eval echo configure:12284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12285 if test -z "$ac_err"; then
12286   rm -rf conftest*
12287   eval "ac_cv_header_$ac_safe=yes"
12288 else
12289   echo "$ac_err" >&5
12290   echo "configure: failed program was:" >&5
12291   cat conftest.$ac_ext >&5
12292   rm -rf conftest*
12293   eval "ac_cv_header_$ac_safe=no"
12294 fi
12295 rm -f conftest*
12296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12297   echo "$ac_t""yes" 1>&6
12298   { test "$extra_verbose" = "yes" && cat << \EOF
12299     Defining HAVE_VFORK_H
12300 EOF
12301 cat >> confdefs.h <<\EOF
12302 #define HAVE_VFORK_H 1
12303 EOF
12304 }
12305
12306 else
12307   echo "$ac_t""no" 1>&6
12308 fi
12309
12310 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12311 echo "configure:12312: checking for working vfork" >&5
12312
12313 cat > conftest.$ac_ext <<EOF
12314 #line 12315 "configure"
12315 #include "confdefs.h"
12316 /* Thanks to Paul Eggert for this test.  */
12317 #include <stdio.h>
12318 #include <sys/types.h>
12319 #include <sys/stat.h>
12320 #ifdef HAVE_UNISTD_H
12321 #include <unistd.h>
12322 #endif
12323 #ifdef HAVE_VFORK_H
12324 #include <vfork.h>
12325 #endif
12326 /* On some sparc systems, changes by the child to local and incoming
12327    argument registers are propagated back to the parent.
12328    The compiler is told about this with #include <vfork.h>,
12329    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12330    Test for this by using a static variable whose address
12331    is put into a register that is clobbered by the vfork.  */
12332 static
12333 #ifdef __cplusplus
12334 sparc_address_test (int arg)
12335 #else
12336 sparc_address_test (arg) int arg;
12337 #endif
12338 {
12339   static pid_t child;
12340   if (!child) {
12341     child = vfork ();
12342     if (child < 0) {
12343       perror ("vfork");
12344       _exit(2);
12345     }
12346     if (!child) {
12347       arg = getpid();
12348       write(-1, "", 0);
12349       _exit (arg);
12350     }
12351   }
12352 }
12353 main() {
12354   pid_t parent = getpid ();
12355   pid_t child;
12356
12357   sparc_address_test ();
12358
12359   child = vfork ();
12360
12361   if (child == 0) {
12362     /* Here is another test for sparc vfork register problems.
12363        This test uses lots of local variables, at least
12364        as many local variables as main has allocated so far
12365        including compiler temporaries.  4 locals are enough for
12366        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12367        A buggy compiler should reuse the register of parent
12368        for one of the local variables, since it will think that
12369        parent can't possibly be used any more in this routine.
12370        Assigning to the local variable will thus munge parent
12371        in the parent process.  */
12372     pid_t
12373       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12374       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12375     /* Convince the compiler that p..p7 are live; otherwise, it might
12376        use the same hardware register for all 8 local variables.  */
12377     if (p != p1 || p != p2 || p != p3 || p != p4
12378         || p != p5 || p != p6 || p != p7)
12379       _exit(1);
12380
12381     /* On some systems (e.g. IRIX 3.3),
12382        vfork doesn't separate parent from child file descriptors.
12383        If the child closes a descriptor before it execs or exits,
12384        this munges the parent's descriptor as well.
12385        Test for this by closing stdout in the child.  */
12386     _exit(close(fileno(stdout)) != 0);
12387   } else {
12388     int status;
12389     struct stat st;
12390
12391     while (wait(&status) != child)
12392       ;
12393     exit(
12394          /* Was there some problem with vforking?  */
12395          child < 0
12396
12397          /* Did the child fail?  (This shouldn't happen.)  */
12398          || status
12399
12400          /* Did the vfork/compiler bug occur?  */
12401          || parent != getpid()
12402
12403          /* Did the file descriptor bug occur?  */
12404          || fstat(fileno(stdout), &st) != 0
12405          );
12406   }
12407 }
12408 EOF
12409 if { (eval echo configure:12410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12410 then
12411   ac_cv_func_vfork_works=yes
12412 else
12413   conftest_rc="$?"
12414   echo "configure: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   rm -fr conftest*
12417   ac_cv_func_vfork_works=no
12418 fi
12419 rm -fr conftest*
12420
12421 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12422 if test $ac_cv_func_vfork_works = no; then
12423   { test "$extra_verbose" = "yes" && cat << \EOF
12424     Defining vfork = fork
12425 EOF
12426 cat >> confdefs.h <<\EOF
12427 #define vfork fork
12428 EOF
12429 }
12430
12431 fi
12432
12433
12434 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12435 echo "configure:12436: checking for working strcoll" >&5
12436
12437 cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 #include <string.h>
12441 main ()
12442 {
12443   exit (strcoll ("abc", "def") >= 0 ||
12444         strcoll ("ABC", "DEF") >= 0 ||
12445         strcoll ("123", "456") >= 0);
12446 }
12447 EOF
12448 if { (eval echo configure:12449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12449 then
12450   ac_cv_func_strcoll_works=yes
12451 else
12452   conftest_rc="$?"
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -fr conftest*
12456   ac_cv_func_strcoll_works=no
12457 fi
12458 rm -fr conftest*
12459
12460 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12461 if test $ac_cv_func_strcoll_works = yes; then
12462   { test "$extra_verbose" = "yes" && cat << \EOF
12463     Defining HAVE_STRCOLL
12464 EOF
12465 cat >> confdefs.h <<\EOF
12466 #define HAVE_STRCOLL 1
12467 EOF
12468 }
12469
12470 fi
12471
12472
12473 for ac_func in getpgrp
12474 do
12475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12476 echo "configure:12477: checking for $ac_func" >&5
12477
12478 cat > conftest.$ac_ext <<EOF
12479 #line 12480 "configure"
12480 #include "confdefs.h"
12481 /* System header to define __stub macros and hopefully few prototypes,
12482     which can conflict with char $ac_func(); below.  */
12483 #include <assert.h>
12484 /* Override any gcc2 internal prototype to avoid an error.  */
12485 /* We use char because int might match the return type of a gcc2
12486     builtin and then its argument prototype would still apply.  */
12487 char $ac_func();
12488
12489 int main() {
12490
12491 /* The GNU C library defines this for functions which it implements
12492     to always fail with ENOSYS.  Some functions are actually named
12493     something starting with __ and the normal name is an alias.  */
12494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12495 choke me
12496 #else
12497 $ac_func();
12498 #endif
12499
12500 ; return 0; }
12501 EOF
12502 if { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12503   rm -rf conftest*
12504   eval "ac_cv_func_$ac_func=yes"
12505 else
12506   echo "configure: failed program was:" >&5
12507   cat conftest.$ac_ext >&5
12508   rm -rf conftest*
12509   eval "ac_cv_func_$ac_func=no"
12510 fi
12511 rm -f conftest*
12512
12513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12514   echo "$ac_t""yes" 1>&6
12515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12516   { test "$extra_verbose" = "yes" && cat << EOF
12517     Defining $ac_tr_func
12518 EOF
12519 cat >> confdefs.h <<EOF
12520 #define $ac_tr_func 1
12521 EOF
12522 }
12523  
12524 else
12525   echo "$ac_t""no" 1>&6
12526 fi
12527 done
12528
12529 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12530 echo "configure:12531: checking whether getpgrp takes no argument" >&5
12531
12532 cat > conftest.$ac_ext <<EOF
12533 #line 12534 "configure"
12534 #include "confdefs.h"
12535
12536 /*
12537  * If this system has a BSD-style getpgrp(),
12538  * which takes a pid argument, exit unsuccessfully.
12539  *
12540  * Snarfed from Chet Ramey's bash pgrp.c test program
12541  */
12542 #include <stdio.h>
12543 #include <sys/types.h>
12544
12545 int     pid;
12546 int     pg1, pg2, pg3, pg4;
12547 int     ng, np, s, child;
12548
12549 main()
12550 {
12551         pid = getpid();
12552         pg1 = getpgrp(0);
12553         pg2 = getpgrp();
12554         pg3 = getpgrp(pid);
12555         pg4 = getpgrp(1);
12556
12557         /*
12558          * If all of these values are the same, it's pretty sure that
12559          * we're on a system that ignores getpgrp's first argument.
12560          */
12561         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12562                 exit(0);
12563
12564         child = fork();
12565         if (child < 0)
12566                 exit(1);
12567         else if (child == 0) {
12568                 np = getpid();
12569                 /*
12570                  * If this is Sys V, this will not work; pgrp will be
12571                  * set to np because setpgrp just changes a pgrp to be
12572                  * the same as the pid.
12573                  */
12574                 setpgrp(np, pg1);
12575                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12576                 if (ng == pg1) {
12577                         exit(1);
12578                 } else {
12579                         exit(0);
12580                 }
12581         } else {
12582                 wait(&s);
12583                 exit(s>>8);
12584         }
12585 }
12586
12587 EOF
12588 if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12589 then
12590   ac_cv_func_getpgrp_void=yes
12591 else
12592   conftest_rc="$?"
12593   echo "configure: failed program was:" >&5
12594   cat conftest.$ac_ext >&5
12595   rm -fr conftest*
12596   ac_cv_func_getpgrp_void=no
12597 fi
12598 rm -fr conftest*
12599
12600
12601 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12602 if test $ac_cv_func_getpgrp_void = yes; then
12603   { test "$extra_verbose" = "yes" && cat << \EOF
12604     Defining GETPGRP_VOID
12605 EOF
12606 cat >> confdefs.h <<\EOF
12607 #define GETPGRP_VOID 1
12608 EOF
12609 }
12610
12611 fi
12612
12613
12614 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12615 echo "configure:12616: checking for working mmap" >&5
12616 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12617 cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 #include <stdio.h>
12621 #include <unistd.h>
12622 #include <fcntl.h>
12623 #include <sys/mman.h>
12624
12625 #ifndef MAP_VARIABLE
12626 #define MAP_VARIABLE 0
12627 #endif
12628
12629 #ifndef MAP_FAILED
12630 #define MAP_FAILED -1
12631 #endif
12632
12633 int main (int argc, char *argv[])
12634 {
12635   int fd = -1;
12636   caddr_t p;
12637 #ifndef MAP_ANONYMOUS
12638   fd = open ("/dev/zero", O_RDWR);
12639   if (fd < 0)
12640     return 1;
12641 #define MAP_ANONYMOUS 0
12642 #endif
12643   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12644            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12645            fd, 0) != (void *) MAP_FAILED)
12646     return 0;
12647   perror ("conftest: mmap failed");
12648   return 1;
12649 }
12650 EOF
12651 if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12652 then
12653   have_mmap=yes
12654 else
12655   conftest_rc="$?"
12656   echo "configure: failed program was:" >&5
12657   cat conftest.$ac_ext >&5
12658   rm -fr conftest*
12659   have_mmap=no
12660 fi
12661 rm -fr conftest* ;;
12662 esac
12663 echo "$ac_t""$have_mmap" 1>&6
12664 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12665     Defining HAVE_MMAP
12666 EOF
12667 cat >> confdefs.h <<\EOF
12668 #define HAVE_MMAP 1
12669 EOF
12670 }
12671
12672
12673 case "$opsys" in cygwin*) 
12674         test "$rel_alloc" = "default" && rel_alloc=no ;;
12675 esac
12676 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12677 if test "$rel_alloc $have_mmap" = "default yes"; then
12678   if test "$doug_lea_malloc" = "yes"; then
12679         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12680 echo "configure:12681: checking for M_MMAP_THRESHOLD" >&5
12681     cat > conftest.$ac_ext <<EOF
12682 #line 12683 "configure"
12683 #include "confdefs.h"
12684 #include <malloc.h>
12685 int main() {
12686
12687 #ifndef M_MMAP_THRESHOLD
12688 #error No M_MMAP_THRESHOLD :-(
12689 !@+$%^&*_)(_ - unlikely to compile...
12690 #endif
12691
12692 ; return 0; }
12693 EOF
12694 if { (eval echo configure:12695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12695   rm -rf conftest*
12696   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12697 else
12698   echo "configure: failed program was:" >&5
12699   cat conftest.$ac_ext >&5
12700   rm -rf conftest*
12701   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12702 fi
12703 rm -f conftest*
12704   else
12705     rel_alloc=yes
12706   fi
12707 fi
12708 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12709     Defining REL_ALLOC
12710 EOF
12711 cat >> confdefs.h <<\EOF
12712 #define REL_ALLOC 1
12713 EOF
12714 }
12715
12716
12717 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12718 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12719 echo "configure:12720: checking for termios.h" >&5
12720
12721 cat > conftest.$ac_ext <<EOF
12722 #line 12723 "configure"
12723 #include "confdefs.h"
12724 #include <termios.h>
12725 EOF
12726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12727 { (eval echo configure:12728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12729 if test -z "$ac_err"; then
12730   rm -rf conftest*
12731   eval "ac_cv_header_$ac_safe=yes"
12732 else
12733   echo "$ac_err" >&5
12734   echo "configure: failed program was:" >&5
12735   cat conftest.$ac_ext >&5
12736   rm -rf conftest*
12737   eval "ac_cv_header_$ac_safe=no"
12738 fi
12739 rm -f conftest*
12740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12741   echo "$ac_t""yes" 1>&6
12742   { test "$extra_verbose" = "yes" && cat << \EOF
12743     Defining HAVE_TERMIOS
12744 EOF
12745 cat >> confdefs.h <<\EOF
12746 #define HAVE_TERMIOS 1
12747 EOF
12748 }
12749
12750   { test "$extra_verbose" = "yes" && cat << \EOF
12751     Defining SIGNALS_VIA_CHARACTERS
12752 EOF
12753 cat >> confdefs.h <<\EOF
12754 #define SIGNALS_VIA_CHARACTERS 1
12755 EOF
12756 }
12757
12758   { test "$extra_verbose" = "yes" && cat << \EOF
12759     Defining NO_TERMIO
12760 EOF
12761 cat >> confdefs.h <<\EOF
12762 #define NO_TERMIO 1
12763 EOF
12764 }
12765
12766 else
12767   echo "$ac_t""no" 1>&6
12768 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12769 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12770 echo "configure:12771: checking for termio.h" >&5
12771
12772 cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 #include <termio.h>
12776 EOF
12777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12778 { (eval echo configure:12779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12780 if test -z "$ac_err"; then
12781   rm -rf conftest*
12782   eval "ac_cv_header_$ac_safe=yes"
12783 else
12784   echo "$ac_err" >&5
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -rf conftest*
12788   eval "ac_cv_header_$ac_safe=no"
12789 fi
12790 rm -f conftest*
12791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12792   echo "$ac_t""yes" 1>&6
12793   { test "$extra_verbose" = "yes" && cat << \EOF
12794     Defining HAVE_TERMIO
12795 EOF
12796 cat >> confdefs.h <<\EOF
12797 #define HAVE_TERMIO 1
12798 EOF
12799 }
12800
12801 else
12802   echo "$ac_t""no" 1>&6
12803 fi
12804
12805 fi
12806
12807
12808
12809 echo $ac_n "checking for socket""... $ac_c" 1>&6
12810 echo "configure:12811: checking for socket" >&5
12811
12812 cat > conftest.$ac_ext <<EOF
12813 #line 12814 "configure"
12814 #include "confdefs.h"
12815 /* System header to define __stub macros and hopefully few prototypes,
12816     which can conflict with char socket(); below.  */
12817 #include <assert.h>
12818 /* Override any gcc2 internal prototype to avoid an error.  */
12819 /* We use char because int might match the return type of a gcc2
12820     builtin and then its argument prototype would still apply.  */
12821 char socket();
12822
12823 int main() {
12824
12825 /* The GNU C library defines this for functions which it implements
12826     to always fail with ENOSYS.  Some functions are actually named
12827     something starting with __ and the normal name is an alias.  */
12828 #if defined (__stub_socket) || defined (__stub___socket)
12829 choke me
12830 #else
12831 socket();
12832 #endif
12833
12834 ; return 0; }
12835 EOF
12836 if { (eval echo configure:12837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12837   rm -rf conftest*
12838   eval "ac_cv_func_socket=yes"
12839 else
12840   echo "configure: failed program was:" >&5
12841   cat conftest.$ac_ext >&5
12842   rm -rf conftest*
12843   eval "ac_cv_func_socket=no"
12844 fi
12845 rm -f conftest*
12846
12847 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12848   echo "$ac_t""yes" 1>&6
12849   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12850 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12851 echo "configure:12852: checking for netinet/in.h" >&5
12852
12853 cat > conftest.$ac_ext <<EOF
12854 #line 12855 "configure"
12855 #include "confdefs.h"
12856 #include <netinet/in.h>
12857 EOF
12858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12859 { (eval echo configure:12860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12861 if test -z "$ac_err"; then
12862   rm -rf conftest*
12863   eval "ac_cv_header_$ac_safe=yes"
12864 else
12865   echo "$ac_err" >&5
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   eval "ac_cv_header_$ac_safe=no"
12870 fi
12871 rm -f conftest*
12872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12873   echo "$ac_t""yes" 1>&6
12874   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12875 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12876 echo "configure:12877: checking for arpa/inet.h" >&5
12877
12878 cat > conftest.$ac_ext <<EOF
12879 #line 12880 "configure"
12880 #include "confdefs.h"
12881 #include <arpa/inet.h>
12882 EOF
12883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12884 { (eval echo configure:12885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12886 if test -z "$ac_err"; then
12887   rm -rf conftest*
12888   eval "ac_cv_header_$ac_safe=yes"
12889 else
12890   echo "$ac_err" >&5
12891   echo "configure: failed program was:" >&5
12892   cat conftest.$ac_ext >&5
12893   rm -rf conftest*
12894   eval "ac_cv_header_$ac_safe=no"
12895 fi
12896 rm -f conftest*
12897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12898   echo "$ac_t""yes" 1>&6
12899   
12900   { test "$extra_verbose" = "yes" && cat << \EOF
12901     Defining HAVE_SOCKETS
12902 EOF
12903 cat >> confdefs.h <<\EOF
12904 #define HAVE_SOCKETS 1
12905 EOF
12906 }
12907
12908       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12909 echo "configure:12910: checking "for sun_len member in struct sockaddr_un"" >&5
12910       cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913
12914 #include <sys/types.h>
12915 #include <sys/socket.h>
12916 #include <sys/un.h>
12917       
12918 int main() {
12919 static struct sockaddr_un x; x.sun_len = 1;
12920 ; return 0; }
12921 EOF
12922 if { (eval echo configure:12923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12923   rm -rf conftest*
12924   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12925     Defining HAVE_SOCKADDR_SUN_LEN
12926 EOF
12927 cat >> confdefs.h <<\EOF
12928 #define HAVE_SOCKADDR_SUN_LEN 1
12929 EOF
12930 }
12931
12932 else
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   echo "$ac_t""no" 1>&6
12937 fi
12938 rm -f conftest*
12939       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12940 echo "configure:12941: checking "for ip_mreq struct in netinet/in.h"" >&5
12941       cat > conftest.$ac_ext <<EOF
12942 #line 12943 "configure"
12943 #include "confdefs.h"
12944
12945 #include <sys/types.h>
12946 #include <netinet/in.h>
12947       
12948 int main() {
12949 static struct ip_mreq x;
12950 ; return 0; }
12951 EOF
12952 if { (eval echo configure:12953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12953   rm -rf conftest*
12954   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12955     Defining HAVE_MULTICAST
12956 EOF
12957 cat >> confdefs.h <<\EOF
12958 #define HAVE_MULTICAST 1
12959 EOF
12960 }
12961
12962 else
12963   echo "configure: failed program was:" >&5
12964   cat conftest.$ac_ext >&5
12965   rm -rf conftest*
12966   echo "$ac_t""no" 1>&6
12967 fi
12968 rm -f conftest*
12969 else
12970   echo "$ac_t""no" 1>&6
12971 fi
12972
12973 else
12974   echo "$ac_t""no" 1>&6
12975 fi
12976
12977 else
12978   echo "$ac_t""no" 1>&6
12979 fi
12980
12981
12982 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12983 echo "configure:12984: checking for msgget" >&5
12984
12985 cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988 /* System header to define __stub macros and hopefully few prototypes,
12989     which can conflict with char msgget(); below.  */
12990 #include <assert.h>
12991 /* Override any gcc2 internal prototype to avoid an error.  */
12992 /* We use char because int might match the return type of a gcc2
12993     builtin and then its argument prototype would still apply.  */
12994 char msgget();
12995
12996 int main() {
12997
12998 /* The GNU C library defines this for functions which it implements
12999     to always fail with ENOSYS.  Some functions are actually named
13000     something starting with __ and the normal name is an alias.  */
13001 #if defined (__stub_msgget) || defined (__stub___msgget)
13002 choke me
13003 #else
13004 msgget();
13005 #endif
13006
13007 ; return 0; }
13008 EOF
13009 if { (eval echo configure:13010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13010   rm -rf conftest*
13011   eval "ac_cv_func_msgget=yes"
13012 else
13013   echo "configure: failed program was:" >&5
13014   cat conftest.$ac_ext >&5
13015   rm -rf conftest*
13016   eval "ac_cv_func_msgget=no"
13017 fi
13018 rm -f conftest*
13019
13020 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13021   echo "$ac_t""yes" 1>&6
13022   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13023 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13024 echo "configure:13025: checking for sys/ipc.h" >&5
13025
13026 cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029 #include <sys/ipc.h>
13030 EOF
13031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13032 { (eval echo configure:13033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13034 if test -z "$ac_err"; then
13035   rm -rf conftest*
13036   eval "ac_cv_header_$ac_safe=yes"
13037 else
13038   echo "$ac_err" >&5
13039   echo "configure: failed program was:" >&5
13040   cat conftest.$ac_ext >&5
13041   rm -rf conftest*
13042   eval "ac_cv_header_$ac_safe=no"
13043 fi
13044 rm -f conftest*
13045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13046   echo "$ac_t""yes" 1>&6
13047   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13048 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13049 echo "configure:13050: checking for sys/msg.h" >&5
13050
13051 cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054 #include <sys/msg.h>
13055 EOF
13056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13057 { (eval echo configure:13058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13059 if test -z "$ac_err"; then
13060   rm -rf conftest*
13061   eval "ac_cv_header_$ac_safe=yes"
13062 else
13063   echo "$ac_err" >&5
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -rf conftest*
13067   eval "ac_cv_header_$ac_safe=no"
13068 fi
13069 rm -f conftest*
13070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13071   echo "$ac_t""yes" 1>&6
13072   { test "$extra_verbose" = "yes" && cat << \EOF
13073     Defining HAVE_SYSVIPC
13074 EOF
13075 cat >> confdefs.h <<\EOF
13076 #define HAVE_SYSVIPC 1
13077 EOF
13078 }
13079
13080 else
13081   echo "$ac_t""no" 1>&6
13082 fi
13083
13084 else
13085   echo "$ac_t""no" 1>&6
13086 fi
13087
13088 else
13089   echo "$ac_t""no" 1>&6
13090 fi
13091
13092
13093 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13094 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13095 echo "configure:13096: checking for dirent.h" >&5
13096
13097 cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <dirent.h>
13101 EOF
13102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13103 { (eval echo configure:13104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13105 if test -z "$ac_err"; then
13106   rm -rf conftest*
13107   eval "ac_cv_header_$ac_safe=yes"
13108 else
13109   echo "$ac_err" >&5
13110   echo "configure: failed program was:" >&5
13111   cat conftest.$ac_ext >&5
13112   rm -rf conftest*
13113   eval "ac_cv_header_$ac_safe=no"
13114 fi
13115 rm -f conftest*
13116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13117   echo "$ac_t""yes" 1>&6
13118   { test "$extra_verbose" = "yes" && cat << \EOF
13119     Defining SYSV_SYSTEM_DIR
13120 EOF
13121 cat >> confdefs.h <<\EOF
13122 #define SYSV_SYSTEM_DIR 1
13123 EOF
13124 }
13125
13126 else
13127   echo "$ac_t""no" 1>&6
13128 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13129 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13130 echo "configure:13131: checking for sys/dir.h" >&5
13131
13132 cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135 #include <sys/dir.h>
13136 EOF
13137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13138 { (eval echo configure:13139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13140 if test -z "$ac_err"; then
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=yes"
13143 else
13144   echo "$ac_err" >&5
13145   echo "configure: failed program was:" >&5
13146   cat conftest.$ac_ext >&5
13147   rm -rf conftest*
13148   eval "ac_cv_header_$ac_safe=no"
13149 fi
13150 rm -f conftest*
13151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13152   echo "$ac_t""yes" 1>&6
13153   :
13154 else
13155   echo "$ac_t""no" 1>&6
13156 { test "$extra_verbose" = "yes" && cat << \EOF
13157     Defining NONSYSTEM_DIR_LIBRARY
13158 EOF
13159 cat >> confdefs.h <<\EOF
13160 #define NONSYSTEM_DIR_LIBRARY 1
13161 EOF
13162 }
13163
13164 fi
13165
13166 fi
13167
13168
13169 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13170 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13171 echo "configure:13172: checking for nlist.h" >&5
13172
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 #include <nlist.h>
13177 EOF
13178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13179 { (eval echo configure:13180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13181 if test -z "$ac_err"; then
13182   rm -rf conftest*
13183   eval "ac_cv_header_$ac_safe=yes"
13184 else
13185   echo "$ac_err" >&5
13186   echo "configure: failed program was:" >&5
13187   cat conftest.$ac_ext >&5
13188   rm -rf conftest*
13189   eval "ac_cv_header_$ac_safe=no"
13190 fi
13191 rm -f conftest*
13192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13193   echo "$ac_t""yes" 1>&6
13194   { test "$extra_verbose" = "yes" && cat << \EOF
13195     Defining NLIST_STRUCT
13196 EOF
13197 cat >> confdefs.h <<\EOF
13198 #define NLIST_STRUCT 1
13199 EOF
13200 }
13201
13202 else
13203   echo "$ac_t""no" 1>&6
13204 fi
13205
13206
13207
13208 echo "checking "for sound support"" 1>&6
13209 echo "configure:13210: checking "for sound support"" >&5
13210 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13211
13212 if test "$with_native_sound" != "no"; then
13213     if test -n "$native_sound_lib"; then
13214     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13215 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13216 echo "configure:13217: checking for multimedia/audio_device.h" >&5
13217
13218 cat > conftest.$ac_ext <<EOF
13219 #line 13220 "configure"
13220 #include "confdefs.h"
13221 #include <multimedia/audio_device.h>
13222 EOF
13223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13224 { (eval echo configure:13225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13226 if test -z "$ac_err"; then
13227   rm -rf conftest*
13228   eval "ac_cv_header_$ac_safe=yes"
13229 else
13230   echo "$ac_err" >&5
13231   echo "configure: failed program was:" >&5
13232   cat conftest.$ac_ext >&5
13233   rm -rf conftest*
13234   eval "ac_cv_header_$ac_safe=no"
13235 fi
13236 rm -f conftest*
13237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13238   echo "$ac_t""yes" 1>&6
13239   sound_found=yes sound_cflags=""
13240       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13241    echo "    xemacs will be linked with \"sunplay.o\""
13242  fi
13243 else
13244   echo "$ac_t""no" 1>&6
13245 fi
13246
13247   fi
13248
13249     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13250     sound_found=yes
13251     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13252    echo "    xemacs will be linked with \"sunplay.o\""
13253  fi
13254     if test -d "/usr/demo/SOUND/include"
13255       then sound_cflags="-I/usr/demo/SOUND/include"
13256       else sound_cflags="-I/usr/demo/SOUND"
13257     fi
13258     if test -z "$native_sound_lib" ; then
13259       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13260         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13261         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13262       fi
13263     fi
13264   fi
13265
13266     if test -z "$sound_found"; then
13267     case "$canonical" in
13268     *-sgi-* )
13269       if test -z "$native_sound_lib"; then
13270         
13271 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13272 echo "configure:13273: checking for ALopenport in -laudio" >&5
13273 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13274
13275 xe_check_libs=" -laudio "
13276 cat > conftest.$ac_ext <<EOF
13277 #line 13278 "configure"
13278 #include "confdefs.h"
13279 /* Override any gcc2 internal prototype to avoid an error.  */
13280 /* We use char because int might match the return type of a gcc2
13281     builtin and then its argument prototype would still apply.  */
13282 char ALopenport();
13283
13284 int main() {
13285 ALopenport()
13286 ; return 0; }
13287 EOF
13288 if { (eval echo configure:13289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13289   rm -rf conftest*
13290   eval "ac_cv_lib_$ac_lib_var=yes"
13291 else
13292   echo "configure: failed program was:" >&5
13293   cat conftest.$ac_ext >&5
13294   rm -rf conftest*
13295   eval "ac_cv_lib_$ac_lib_var=no"
13296 fi
13297 rm -f conftest*
13298 xe_check_libs=""
13299
13300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13301   echo "$ac_t""yes" 1>&6
13302   native_sound_lib="-laudio"
13303 else
13304   echo "$ac_t""no" 1>&6
13305 fi
13306
13307
13308       fi
13309       if test -n "$native_sound_lib"; then
13310         sound_found=yes sound_cflags=""
13311         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13312    echo "    xemacs will be linked with \"sgiplay.o\""
13313  fi
13314       fi ;;
13315     hppa*-hp-hpux* )
13316       if test -z "$native_sound_lib"; then
13317         
13318 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13319 echo "configure:13320: checking for AOpenAudio in -lAlib" >&5
13320 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13321
13322 xe_check_libs=" -lAlib "
13323 cat > conftest.$ac_ext <<EOF
13324 #line 13325 "configure"
13325 #include "confdefs.h"
13326 /* Override any gcc2 internal prototype to avoid an error.  */
13327 /* We use char because int might match the return type of a gcc2
13328     builtin and then its argument prototype would still apply.  */
13329 char AOpenAudio();
13330
13331 int main() {
13332 AOpenAudio()
13333 ; return 0; }
13334 EOF
13335 if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13336   rm -rf conftest*
13337   eval "ac_cv_lib_$ac_lib_var=yes"
13338 else
13339   echo "configure: failed program was:" >&5
13340   cat conftest.$ac_ext >&5
13341   rm -rf conftest*
13342   eval "ac_cv_lib_$ac_lib_var=no"
13343 fi
13344 rm -f conftest*
13345 xe_check_libs=""
13346
13347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13348   echo "$ac_t""yes" 1>&6
13349   native_sound_lib="-lAlib"
13350 else
13351   echo "$ac_t""no" 1>&6
13352 fi
13353
13354
13355       fi
13356       if test -n "$native_sound_lib"; then
13357         sound_found=yes
13358         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13359    echo "    xemacs will be linked with \"hpplay.o\""
13360  fi
13361         if test "$GCC" = "yes" # Kludge city
13362           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13363           else sound_cflags="+e -I/usr/audio/examples"
13364         fi
13365       fi ;;
13366     esac
13367   fi
13368
13369     if test -z "$sound_found"; then
13370     if test "$with_msw" = "yes"; then
13371     sound_found=yes
13372     native_sound_lib=
13373     fi
13374   fi
13375
13376     if test -z "$sound_found"; then
13377     for dir in "machine" "sys" "linux"; do
13378       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13379 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13380 echo "configure:13381: checking for ${dir}/soundcard.h" >&5
13381
13382 cat > conftest.$ac_ext <<EOF
13383 #line 13384 "configure"
13384 #include "confdefs.h"
13385 #include <${dir}/soundcard.h>
13386 EOF
13387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13388 { (eval echo configure:13389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13390 if test -z "$ac_err"; then
13391   rm -rf conftest*
13392   eval "ac_cv_header_$ac_safe=yes"
13393 else
13394   echo "$ac_err" >&5
13395   echo "configure: failed program was:" >&5
13396   cat conftest.$ac_ext >&5
13397   rm -rf conftest*
13398   eval "ac_cv_header_$ac_safe=no"
13399 fi
13400 rm -f conftest*
13401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13402   echo "$ac_t""yes" 1>&6
13403   sound_found=yes
13404        need_miscplay=yes
13405         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13406    echo "    xemacs will be linked with \"linuxplay.o\""
13407  fi
13408         { test "$extra_verbose" = "yes" && cat << EOF
13409     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13410 EOF
13411 cat >> confdefs.h <<EOF
13412 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13413 EOF
13414 }
13415
13416         break
13417 else
13418   echo "$ac_t""no" 1>&6
13419 fi
13420
13421     done
13422   fi
13423
13424   test "$sound_found" = "yes" && with_native_sound=yes
13425 fi
13426
13427 if test "$with_native_sound" = "yes"; then
13428   { test "$extra_verbose" = "yes" && cat << \EOF
13429     Defining HAVE_NATIVE_SOUND
13430 EOF
13431 cat >> confdefs.h <<\EOF
13432 #define HAVE_NATIVE_SOUND 1
13433 EOF
13434 }
13435
13436   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13437 fi
13438
13439 if test "$with_nas_sound" != "no"; then
13440   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13441 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13442 echo "configure:13443: checking for audio/audiolib.h" >&5
13443
13444 cat > conftest.$ac_ext <<EOF
13445 #line 13446 "configure"
13446 #include "confdefs.h"
13447 #include <audio/audiolib.h>
13448 EOF
13449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13450 { (eval echo configure:13451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13452 if test -z "$ac_err"; then
13453   rm -rf conftest*
13454   eval "ac_cv_header_$ac_safe=yes"
13455 else
13456   echo "$ac_err" >&5
13457   echo "configure: failed program was:" >&5
13458   cat conftest.$ac_ext >&5
13459   rm -rf conftest*
13460   eval "ac_cv_header_$ac_safe=no"
13461 fi
13462 rm -f conftest*
13463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13464   echo "$ac_t""yes" 1>&6
13465   
13466     
13467 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13468 echo "configure:13469: checking for AuOpenServer in -laudio" >&5
13469 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13470
13471 xe_check_libs=" -laudio "
13472 cat > conftest.$ac_ext <<EOF
13473 #line 13474 "configure"
13474 #include "confdefs.h"
13475 /* Override any gcc2 internal prototype to avoid an error.  */
13476 /* We use char because int might match the return type of a gcc2
13477     builtin and then its argument prototype would still apply.  */
13478 char AuOpenServer();
13479
13480 int main() {
13481 AuOpenServer()
13482 ; return 0; }
13483 EOF
13484 if { (eval echo configure:13485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13485   rm -rf conftest*
13486   eval "ac_cv_lib_$ac_lib_var=yes"
13487 else
13488   echo "configure: failed program was:" >&5
13489   cat conftest.$ac_ext >&5
13490   rm -rf conftest*
13491   eval "ac_cv_lib_$ac_lib_var=no"
13492 fi
13493 rm -f conftest*
13494 xe_check_libs=""
13495
13496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13497   echo "$ac_t""yes" 1>&6
13498   have_nas_sound=yes
13499 else
13500   echo "$ac_t""no" 1>&6
13501 fi
13502
13503
13504 else
13505   echo "$ac_t""no" 1>&6
13506 fi
13507
13508   if test "$have_nas_sound" = "yes"; then
13509     with_nas_sound=yes
13510     { test "$extra_verbose" = "yes" && cat << \EOF
13511     Defining HAVE_NAS_SOUND
13512 EOF
13513 cat >> confdefs.h <<\EOF
13514 #define HAVE_NAS_SOUND 1
13515 EOF
13516 }
13517
13518     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13519    echo "    xemacs will be linked with \"nas.o\""
13520  fi
13521     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13522             cat > conftest.$ac_ext <<EOF
13523 #line 13524 "configure"
13524 #include "confdefs.h"
13525 #include <audio/Xtutil.h>
13526 EOF
13527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13528   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13529   :
13530 else
13531   rm -rf conftest*
13532   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13533     Defining NAS_NO_ERROR_JUMP
13534 EOF
13535 cat >> confdefs.h <<\EOF
13536 #define NAS_NO_ERROR_JUMP 1
13537 EOF
13538 }
13539
13540 fi
13541 rm -f conftest*
13542
13543   else
13544     test "$with_nas_sound" = "yes" && \
13545       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13546     with_nas_sound=no
13547   fi
13548 fi
13549
13550 if test "$with_esd_sound" != "no"; then
13551   # Extract the first word of "esd-config", so it can be a program name with args.
13552 set dummy esd-config; ac_word=$2
13553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13554 echo "configure:13555: checking for $ac_word" >&5
13555
13556 if test -n "$have_esd_config"; then
13557   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13558 else
13559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13560   ac_dummy="$PATH"
13561   for ac_dir in $ac_dummy; do
13562     test -z "$ac_dir" && ac_dir=.
13563     if test -f $ac_dir/$ac_word; then
13564       ac_cv_prog_have_esd_config="yes"
13565       break
13566     fi
13567   done
13568   IFS="$ac_save_ifs"
13569   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13570 fi
13571 have_esd_config="$ac_cv_prog_have_esd_config"
13572 if test -n "$have_esd_config"; then
13573   echo "$ac_t""$have_esd_config" 1>&6
13574 else
13575   echo "$ac_t""no" 1>&6
13576 fi
13577
13578   if test "$have_esd_config" = "yes"; then
13579     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13580     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
13581     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13582     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13583 echo "configure:13584: checking for esd_play_stream" >&5
13584
13585 cat > conftest.$ac_ext <<EOF
13586 #line 13587 "configure"
13587 #include "confdefs.h"
13588 /* System header to define __stub macros and hopefully few prototypes,
13589     which can conflict with char esd_play_stream(); below.  */
13590 #include <assert.h>
13591 /* Override any gcc2 internal prototype to avoid an error.  */
13592 /* We use char because int might match the return type of a gcc2
13593     builtin and then its argument prototype would still apply.  */
13594 char esd_play_stream();
13595
13596 int main() {
13597
13598 /* The GNU C library defines this for functions which it implements
13599     to always fail with ENOSYS.  Some functions are actually named
13600     something starting with __ and the normal name is an alias.  */
13601 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13602 choke me
13603 #else
13604 esd_play_stream();
13605 #endif
13606
13607 ; return 0; }
13608 EOF
13609 if { (eval echo configure:13610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13610   rm -rf conftest*
13611   eval "ac_cv_func_esd_play_stream=yes"
13612 else
13613   echo "configure: failed program was:" >&5
13614   cat conftest.$ac_ext >&5
13615   rm -rf conftest*
13616   eval "ac_cv_func_esd_play_stream=no"
13617 fi
13618 rm -f conftest*
13619
13620 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13621   echo "$ac_t""yes" 1>&6
13622   have_esd_sound=yes
13623 else
13624   echo "$ac_t""no" 1>&6
13625 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13626 fi
13627
13628   fi
13629
13630   if test "$have_esd_sound" = "yes"; then
13631     with_esd_sound=yes
13632     need_miscplay=yes
13633     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13634    echo "    xemacs will be linked with \"esd.o\""
13635  fi
13636     { test "$extra_verbose" = "yes" && cat << \EOF
13637     Defining HAVE_ESD_SOUND
13638 EOF
13639 cat >> confdefs.h <<\EOF
13640 #define HAVE_ESD_SOUND 1
13641 EOF
13642 }
13643
13644   else
13645     test "$with_esd_sound" = "yes" && \
13646       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13647     with_esd_sound=no
13648   fi
13649 fi
13650
13651 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13652    echo "    xemacs will be linked with \"miscplay.o\""
13653  fi
13654
13655
13656 test -z "$with_tty" && with_tty=yes
13657
13658 if test "$with_tty" = "yes"  ; then
13659   echo "checking for TTY-related features" 1>&6
13660 echo "configure:13661: checking for TTY-related features" >&5
13661   { test "$extra_verbose" = "yes" && cat << \EOF
13662     Defining HAVE_TTY
13663 EOF
13664 cat >> confdefs.h <<\EOF
13665 #define HAVE_TTY 1
13666 EOF
13667 }
13668
13669   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
13670    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\""
13671  fi
13672
13673     if test -z "$with_ncurses"; then
13674     
13675 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13676 echo "configure:13677: checking for tgetent in -lncurses" >&5
13677 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13678
13679 xe_check_libs=" -lncurses "
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   with_ncurses=yes
13707 else
13708   echo "$ac_t""no" 1>&6
13709 with_ncurses=no
13710 fi
13711
13712
13713   fi
13714   if test "$with_ncurses" = "yes"; then
13715     { test "$extra_verbose" = "yes" && cat << \EOF
13716     Defining HAVE_NCURSES
13717 EOF
13718 cat >> confdefs.h <<\EOF
13719 #define HAVE_NCURSES 1
13720 EOF
13721 }
13722
13723     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13724 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13725 echo "configure:13726: checking for ncurses/curses.h" >&5
13726
13727 cat > conftest.$ac_ext <<EOF
13728 #line 13729 "configure"
13729 #include "confdefs.h"
13730 #include <ncurses/curses.h>
13731 EOF
13732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13733 { (eval echo configure:13734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13735 if test -z "$ac_err"; then
13736   rm -rf conftest*
13737   eval "ac_cv_header_$ac_safe=yes"
13738 else
13739   echo "$ac_err" >&5
13740   echo "configure: failed program was:" >&5
13741   cat conftest.$ac_ext >&5
13742   rm -rf conftest*
13743   eval "ac_cv_header_$ac_safe=no"
13744 fi
13745 rm -f conftest*
13746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13747   echo "$ac_t""yes" 1>&6
13748   curses_h_file=ncurses/curses.h
13749 else
13750   echo "$ac_t""no" 1>&6
13751 fi
13752
13753     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13754 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13755 echo "configure:13756: checking for ncurses/term.h" >&5
13756
13757 cat > conftest.$ac_ext <<EOF
13758 #line 13759 "configure"
13759 #include "confdefs.h"
13760 #include <ncurses/term.h>
13761 EOF
13762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13763 { (eval echo configure:13764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13765 if test -z "$ac_err"; then
13766   rm -rf conftest*
13767   eval "ac_cv_header_$ac_safe=yes"
13768 else
13769   echo "$ac_err" >&5
13770   echo "configure: failed program was:" >&5
13771   cat conftest.$ac_ext >&5
13772   rm -rf conftest*
13773   eval "ac_cv_header_$ac_safe=no"
13774 fi
13775 rm -f conftest*
13776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13777   echo "$ac_t""yes" 1>&6
13778   term_h_file=ncurses/term.h
13779 else
13780   echo "$ac_t""no" 1>&6
13781 fi
13782
13783     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13784    echo "    xemacs will be linked with \"terminfo.o\""
13785  fi
13786     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13787
13788     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13789                         save_c_switch_site="$c_switch_site"
13790       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13791       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13792 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13793 echo "configure:13794: checking for ncurses/curses.h" >&5
13794
13795 cat > conftest.$ac_ext <<EOF
13796 #line 13797 "configure"
13797 #include "confdefs.h"
13798 #include <ncurses/curses.h>
13799 EOF
13800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13801 { (eval echo configure:13802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13803 if test -z "$ac_err"; then
13804   rm -rf conftest*
13805   eval "ac_cv_header_$ac_safe=yes"
13806 else
13807   echo "$ac_err" >&5
13808   echo "configure: failed program was:" >&5
13809   cat conftest.$ac_ext >&5
13810   rm -rf conftest*
13811   eval "ac_cv_header_$ac_safe=no"
13812 fi
13813 rm -f conftest*
13814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13815   echo "$ac_t""yes" 1>&6
13816   curses_h_file=ncurses/curses.h
13817 else
13818   echo "$ac_t""no" 1>&6
13819 fi
13820
13821       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13822         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13823         else c_switch_site="$save_c_switch_site"
13824       fi
13825     fi
13826   else         if test "$have_terminfo" = "yes"; then
13827       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13828    echo "    xemacs will be linked with \"terminfo.o\""
13829  fi
13830       if test -n "$libs_termcap"; then
13831         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13832       else
13833         for lib in curses termlib termcap; do
13834           
13835 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13836 echo "configure:13837: checking for tgetent in -l$lib" >&5
13837 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13838
13839 xe_check_libs=" -l$lib "
13840 cat > conftest.$ac_ext <<EOF
13841 #line 13842 "configure"
13842 #include "confdefs.h"
13843 /* Override any gcc2 internal prototype to avoid an error.  */
13844 /* We use char because int might match the return type of a gcc2
13845     builtin and then its argument prototype would still apply.  */
13846 char tgetent();
13847
13848 int main() {
13849 tgetent()
13850 ; return 0; }
13851 EOF
13852 if { (eval echo configure:13853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13853   rm -rf conftest*
13854   eval "ac_cv_lib_$ac_lib_var=yes"
13855 else
13856   echo "configure: failed program was:" >&5
13857   cat conftest.$ac_ext >&5
13858   rm -rf conftest*
13859   eval "ac_cv_lib_$ac_lib_var=no"
13860 fi
13861 rm -f conftest*
13862 xe_check_libs=""
13863
13864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13865   echo "$ac_t""yes" 1>&6
13866   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13867 else
13868   echo "$ac_t""no" 1>&6
13869 fi
13870
13871
13872         done
13873       fi
13874     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13875                                 
13876 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13877 echo "configure:13878: checking for tgoto in -ltermcap" >&5
13878 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13879
13880 xe_check_libs=" -ltermcap "
13881 cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884 /* Override any gcc2 internal prototype to avoid an error.  */
13885 /* We use char because int might match the return type of a gcc2
13886     builtin and then its argument prototype would still apply.  */
13887 char tgoto();
13888
13889 int main() {
13890 tgoto()
13891 ; return 0; }
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13894   rm -rf conftest*
13895   eval "ac_cv_lib_$ac_lib_var=yes"
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -rf conftest*
13900   eval "ac_cv_lib_$ac_lib_var=no"
13901 fi
13902 rm -f conftest*
13903 xe_check_libs=""
13904
13905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13906   echo "$ac_t""yes" 1>&6
13907     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13909   { test "$extra_verbose" = "yes" && cat << EOF
13910     Defining $ac_tr_lib
13911 EOF
13912 cat >> confdefs.h <<EOF
13913 #define $ac_tr_lib 1
13914 EOF
13915 }
13916
13917   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13918
13919 else
13920   echo "$ac_t""no" 1>&6
13921 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13922    echo "    xemacs will be linked with \"tparam.o\""
13923  fi
13924 fi
13925
13926
13927       else
13928         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13929    echo "    xemacs will be linked with \"tparam.o\""
13930  fi
13931       fi
13932                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13933       if test -n "$libs_termcap"; then
13934         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13935       else
13936         
13937 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13938 echo "configure:13939: checking for tgetent in -lcurses" >&5
13939 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13940
13941 xe_check_libs=" -lcurses "
13942 cat > conftest.$ac_ext <<EOF
13943 #line 13944 "configure"
13944 #include "confdefs.h"
13945 /* Override any gcc2 internal prototype to avoid an error.  */
13946 /* We use char because int might match the return type of a gcc2
13947     builtin and then its argument prototype would still apply.  */
13948 char tgetent();
13949
13950 int main() {
13951 tgetent()
13952 ; return 0; }
13953 EOF
13954 if { (eval echo configure:13955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13955   rm -rf conftest*
13956   eval "ac_cv_lib_$ac_lib_var=yes"
13957 else
13958   echo "configure: failed program was:" >&5
13959   cat conftest.$ac_ext >&5
13960   rm -rf conftest*
13961   eval "ac_cv_lib_$ac_lib_var=no"
13962 fi
13963 rm -f conftest*
13964 xe_check_libs=""
13965
13966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13967   echo "$ac_t""yes" 1>&6
13968   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13969 else
13970   echo "$ac_t""no" 1>&6
13971 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13972 echo "configure:13973: checking for tgetent in -ltermcap" >&5
13973 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13974
13975 xe_check_libs=" -ltermcap "
13976 cat > conftest.$ac_ext <<EOF
13977 #line 13978 "configure"
13978 #include "confdefs.h"
13979 /* Override any gcc2 internal prototype to avoid an error.  */
13980 /* We use char because int might match the return type of a gcc2
13981     builtin and then its argument prototype would still apply.  */
13982 char tgetent();
13983
13984 int main() {
13985 tgetent()
13986 ; return 0; }
13987 EOF
13988 if { (eval echo configure:13989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13989   rm -rf conftest*
13990   eval "ac_cv_lib_$ac_lib_var=yes"
13991 else
13992   echo "configure: failed program was:" >&5
13993   cat conftest.$ac_ext >&5
13994   rm -rf conftest*
13995   eval "ac_cv_lib_$ac_lib_var=no"
13996 fi
13997 rm -f conftest*
13998 xe_check_libs=""
13999
14000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14001   echo "$ac_t""yes" 1>&6
14002   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14003 else
14004   echo "$ac_t""no" 1>&6
14005 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14006    echo "    xemacs will be linked with \"termcap.o\""
14007  fi
14008 fi
14009
14010
14011 fi
14012
14013
14014       fi
14015     fi
14016   fi
14017   { test "$extra_verbose" = "yes" && cat << EOF
14018     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14019 EOF
14020 cat >> confdefs.h <<EOF
14021 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14022 EOF
14023 }
14024
14025   { test "$extra_verbose" = "yes" && cat << EOF
14026     Defining TERM_H_FILE = "${term_h_file-term.h}"
14027 EOF
14028 cat >> confdefs.h <<EOF
14029 #define TERM_H_FILE "${term_h_file-term.h}"
14030 EOF
14031 }
14032
14033
14034     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14035 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14036 echo "configure:14037: checking for gpm.h" >&5
14037
14038 cat > conftest.$ac_ext <<EOF
14039 #line 14040 "configure"
14040 #include "confdefs.h"
14041 #include <gpm.h>
14042 EOF
14043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14044 { (eval echo configure:14045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14046 if test -z "$ac_err"; then
14047   rm -rf conftest*
14048   eval "ac_cv_header_$ac_safe=yes"
14049 else
14050   echo "$ac_err" >&5
14051   echo "configure: failed program was:" >&5
14052   cat conftest.$ac_ext >&5
14053   rm -rf conftest*
14054   eval "ac_cv_header_$ac_safe=no"
14055 fi
14056 rm -f conftest*
14057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14058   echo "$ac_t""yes" 1>&6
14059   :
14060 else
14061   echo "$ac_t""no" 1>&6
14062 with_gpm=no
14063 fi
14064  }
14065   test -z "$with_gpm" && { 
14066 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14067 echo "configure:14068: checking for Gpm_Open in -lgpm" >&5
14068 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14069
14070 xe_check_libs=" -lgpm "
14071 cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 /* Override any gcc2 internal prototype to avoid an error.  */
14075 /* We use char because int might match the return type of a gcc2
14076     builtin and then its argument prototype would still apply.  */
14077 char Gpm_Open();
14078
14079 int main() {
14080 Gpm_Open()
14081 ; return 0; }
14082 EOF
14083 if { (eval echo configure:14084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14084   rm -rf conftest*
14085   eval "ac_cv_lib_$ac_lib_var=yes"
14086 else
14087   echo "configure: failed program was:" >&5
14088   cat conftest.$ac_ext >&5
14089   rm -rf conftest*
14090   eval "ac_cv_lib_$ac_lib_var=no"
14091 fi
14092 rm -f conftest*
14093 xe_check_libs=""
14094
14095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14096   echo "$ac_t""yes" 1>&6
14097   with_gpm=yes
14098 else
14099   echo "$ac_t""no" 1>&6
14100 with_gpm=no
14101 fi
14102
14103  }
14104   if test "$with_gpm" = "yes"; then
14105     { test "$extra_verbose" = "yes" && cat << \EOF
14106     Defining HAVE_GPM
14107 EOF
14108 cat >> confdefs.h <<\EOF
14109 #define HAVE_GPM 1
14110 EOF
14111 }
14112
14113     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14114    echo "    xemacs will be linked with \"gpmevent.o\""
14115  fi
14116     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14117   fi
14118
14119 else   for feature in ncurses gpm; do
14120     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14121       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14122     fi
14123     eval "with_${feature}=no"
14124   done
14125 fi 
14126 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
14127    echo "    xemacs will be linked with \"event-unixoid.o\""
14128  fi
14129
14130
14131 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14132   != "no no no" && echo "checking for database support" 1>&6
14133 echo "configure:14134: checking for database support" >&5
14134
14135 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14136   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14137 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14138 echo "configure:14139: checking for ndbm.h" >&5
14139
14140 cat > conftest.$ac_ext <<EOF
14141 #line 14142 "configure"
14142 #include "confdefs.h"
14143 #include <ndbm.h>
14144 EOF
14145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14146 { (eval echo configure:14147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14148 if test -z "$ac_err"; then
14149   rm -rf conftest*
14150   eval "ac_cv_header_$ac_safe=yes"
14151 else
14152   echo "$ac_err" >&5
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   eval "ac_cv_header_$ac_safe=no"
14157 fi
14158 rm -f conftest*
14159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14160   echo "$ac_t""yes" 1>&6
14161   :
14162 else
14163   echo "$ac_t""no" 1>&6
14164
14165     test "$with_database_gdbm" = "yes" -o \
14166          "$with_database_dbm"  = "yes" && \
14167       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14168     with_database_gdbm=no with_database_dbm=no
14169 fi
14170
14171 fi
14172
14173 if test "$with_database_gdbm" != "no"; then
14174   
14175 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14176 echo "configure:14177: checking for dbm_open in -lgdbm" >&5
14177 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14178
14179 xe_check_libs=" -lgdbm "
14180 cat > conftest.$ac_ext <<EOF
14181 #line 14182 "configure"
14182 #include "confdefs.h"
14183 /* Override any gcc2 internal prototype to avoid an error.  */
14184 /* We use char because int might match the return type of a gcc2
14185     builtin and then its argument prototype would still apply.  */
14186 char dbm_open();
14187
14188 int main() {
14189 dbm_open()
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14193   rm -rf conftest*
14194   eval "ac_cv_lib_$ac_lib_var=yes"
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   eval "ac_cv_lib_$ac_lib_var=no"
14200 fi
14201 rm -f conftest*
14202 xe_check_libs=""
14203
14204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14205   echo "$ac_t""yes" 1>&6
14206   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14207 else
14208   echo "$ac_t""no" 1>&6
14209 if test "$with_database_gdbm" = "yes"; then
14210      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14211    fi
14212    with_database_gdbm=no
14213 fi
14214
14215
14216 fi
14217
14218 if test "$with_database_dbm" != "no"; then
14219   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14220 echo "configure:14221: checking for dbm_open" >&5
14221
14222 cat > conftest.$ac_ext <<EOF
14223 #line 14224 "configure"
14224 #include "confdefs.h"
14225 /* System header to define __stub macros and hopefully few prototypes,
14226     which can conflict with char dbm_open(); below.  */
14227 #include <assert.h>
14228 /* Override any gcc2 internal prototype to avoid an error.  */
14229 /* We use char because int might match the return type of a gcc2
14230     builtin and then its argument prototype would still apply.  */
14231 char dbm_open();
14232
14233 int main() {
14234
14235 /* The GNU C library defines this for functions which it implements
14236     to always fail with ENOSYS.  Some functions are actually named
14237     something starting with __ and the normal name is an alias.  */
14238 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14239 choke me
14240 #else
14241 dbm_open();
14242 #endif
14243
14244 ; return 0; }
14245 EOF
14246 if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14247   rm -rf conftest*
14248   eval "ac_cv_func_dbm_open=yes"
14249 else
14250   echo "configure: failed program was:" >&5
14251   cat conftest.$ac_ext >&5
14252   rm -rf conftest*
14253   eval "ac_cv_func_dbm_open=no"
14254 fi
14255 rm -f conftest*
14256
14257 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14258   echo "$ac_t""yes" 1>&6
14259   with_database_dbm=yes libdbm=
14260 else
14261   echo "$ac_t""no" 1>&6
14262
14263     
14264 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14265 echo "configure:14266: checking for dbm_open in -ldbm" >&5
14266 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14267
14268 xe_check_libs=" -ldbm "
14269 cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272 /* Override any gcc2 internal prototype to avoid an error.  */
14273 /* We use char because int might match the return type of a gcc2
14274     builtin and then its argument prototype would still apply.  */
14275 char dbm_open();
14276
14277 int main() {
14278 dbm_open()
14279 ; return 0; }
14280 EOF
14281 if { (eval echo configure:14282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14282   rm -rf conftest*
14283   eval "ac_cv_lib_$ac_lib_var=yes"
14284 else
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -rf conftest*
14288   eval "ac_cv_lib_$ac_lib_var=no"
14289 fi
14290 rm -f conftest*
14291 xe_check_libs=""
14292
14293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14294   echo "$ac_t""yes" 1>&6
14295   with_database_dbm=yes libdbm=-ldbm
14296 else
14297   echo "$ac_t""no" 1>&6
14298 test "$with_database_dbm" = "yes" && \
14299         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14300       with_database_dbm=no
14301 fi
14302
14303
14304 fi
14305
14306 fi
14307
14308 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14309 test "$with_database_gdbm" = "yes" -o \
14310      "$with_database_dbm"  = "yes" && \
14311   { test "$extra_verbose" = "yes" && cat << \EOF
14312     Defining HAVE_DBM
14313 EOF
14314 cat >> confdefs.h <<\EOF
14315 #define HAVE_DBM 1
14316 EOF
14317 }
14318
14319
14320 if test "$with_database_berkdb" != "no"; then
14321   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14322 echo "configure:14323: checking for Berkeley db.h" >&5
14323   for header in "db/db.h" "db.h"; do
14324     case "$opsys" in
14325         *freebsd*)
14326     cat > conftest.$ac_ext <<EOF
14327 #line 14328 "configure"
14328 #include "confdefs.h"
14329
14330 #include <stdlib.h>
14331 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14332 #ifdef HAVE_INTTYPES_H
14333 #define __BIT_TYPES_DEFINED__
14334 #include <inttypes.h>
14335 #endif
14336 #endif
14337 #include <$header>
14338
14339 int main() {
14340
14341 ; return 0; }
14342 EOF
14343 if { (eval echo configure:14344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14344   rm -rf conftest*
14345   db_h_file="$header"; break
14346 else
14347   echo "configure: failed program was:" >&5
14348   cat conftest.$ac_ext >&5
14349 fi
14350 rm -f conftest*
14351         ;;
14352         *)
14353     cat > conftest.$ac_ext <<EOF
14354 #line 14355 "configure"
14355 #include "confdefs.h"
14356
14357 #include <stdlib.h>
14358 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14359 #ifdef HAVE_INTTYPES_H
14360 #define __BIT_TYPES_DEFINED__
14361 #include <inttypes.h>
14362 typedef uint8_t  u_int8_t;
14363 typedef uint16_t u_int16_t;
14364 typedef uint32_t u_int32_t;
14365 #ifdef WE_DONT_NEED_QUADS
14366 typedef uint64_t u_int64_t;
14367 #endif
14368 #endif
14369 #endif
14370 #include <$header>
14371
14372 int main() {
14373
14374 ; return 0; }
14375 EOF
14376 if { (eval echo configure:14377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14377   rm -rf conftest*
14378   db_h_file="$header"; break
14379 else
14380   echo "configure: failed program was:" >&5
14381   cat conftest.$ac_ext >&5
14382 fi
14383 rm -f conftest*
14384         ;;
14385         esac
14386   done
14387   if test -z "$db_h_file"
14388   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14389   else echo "$ac_t""$db_h_file" 1>&6
14390   fi
14391
14392   if test "$with_database_berkdb" != "no"; then
14393     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14394 echo "configure:14395: checking for Berkeley DB version" >&5
14395     cat > conftest.$ac_ext <<EOF
14396 #line 14397 "configure"
14397 #include "confdefs.h"
14398 #include <$db_h_file>
14399 #if DB_VERSION_MAJOR > 1
14400 yes
14401 #endif
14402
14403 EOF
14404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14405   egrep "yes" >/dev/null 2>&1; then
14406   rm -rf conftest*
14407   cat > conftest.$ac_ext <<EOF
14408 #line 14409 "configure"
14409 #include "confdefs.h"
14410 #include <$db_h_file>
14411 #if DB_VERSION_MAJOR > 2
14412 yes
14413 #endif
14414
14415 EOF
14416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14417   egrep "yes" >/dev/null 2>&1; then
14418   rm -rf conftest*
14419   echo "$ac_t""3" 1>&6; dbfunc=db_create
14420 else
14421   rm -rf conftest*
14422   
14423     echo "$ac_t""2" 1>&6; dbfunc=db_open
14424 fi
14425 rm -f conftest*
14426
14427 else
14428   rm -rf conftest*
14429   
14430     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14431 fi
14432 rm -f conftest*
14433
14434     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14435 echo "configure:14436: checking for $dbfunc" >&5
14436
14437 cat > conftest.$ac_ext <<EOF
14438 #line 14439 "configure"
14439 #include "confdefs.h"
14440 /* System header to define __stub macros and hopefully few prototypes,
14441     which can conflict with char $dbfunc(); below.  */
14442 #include <assert.h>
14443 /* Override any gcc2 internal prototype to avoid an error.  */
14444 /* We use char because int might match the return type of a gcc2
14445     builtin and then its argument prototype would still apply.  */
14446 char $dbfunc();
14447
14448 int main() {
14449
14450 /* The GNU C library defines this for functions which it implements
14451     to always fail with ENOSYS.  Some functions are actually named
14452     something starting with __ and the normal name is an alias.  */
14453 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14454 choke me
14455 #else
14456 $dbfunc();
14457 #endif
14458
14459 ; return 0; }
14460 EOF
14461 if { (eval echo configure:14462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14462   rm -rf conftest*
14463   eval "ac_cv_func_$dbfunc=yes"
14464 else
14465   echo "configure: failed program was:" >&5
14466   cat conftest.$ac_ext >&5
14467   rm -rf conftest*
14468   eval "ac_cv_func_$dbfunc=no"
14469 fi
14470 rm -f conftest*
14471
14472 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14473   echo "$ac_t""yes" 1>&6
14474   with_database_berkdb=yes need_libdb=no
14475 else
14476   echo "$ac_t""no" 1>&6
14477
14478     
14479 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14480 echo "configure:14481: checking for $dbfunc in -ldb" >&5
14481 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14482
14483 xe_check_libs=" -ldb "
14484 cat > conftest.$ac_ext <<EOF
14485 #line 14486 "configure"
14486 #include "confdefs.h"
14487 /* Override any gcc2 internal prototype to avoid an error.  */
14488 /* We use char because int might match the return type of a gcc2
14489     builtin and then its argument prototype would still apply.  */
14490 char $dbfunc();
14491
14492 int main() {
14493 $dbfunc()
14494 ; return 0; }
14495 EOF
14496 if { (eval echo configure:14497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14497   rm -rf conftest*
14498   eval "ac_cv_lib_$ac_lib_var=yes"
14499 else
14500   echo "configure: failed program was:" >&5
14501   cat conftest.$ac_ext >&5
14502   rm -rf conftest*
14503   eval "ac_cv_lib_$ac_lib_var=no"
14504 fi
14505 rm -f conftest*
14506 xe_check_libs=""
14507
14508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14509   echo "$ac_t""yes" 1>&6
14510   with_database_berkdb=yes need_libdb=yes
14511 else
14512   echo "$ac_t""no" 1>&6
14513 fi
14514
14515
14516 fi
14517
14518   fi
14519
14520   if test "$with_database_berkdb" = "yes"; then
14521     { test "$extra_verbose" = "yes" && cat << EOF
14522     Defining DB_H_FILE = "$db_h_file"
14523 EOF
14524 cat >> confdefs.h <<EOF
14525 #define DB_H_FILE "$db_h_file"
14526 EOF
14527 }
14528
14529     { test "$extra_verbose" = "yes" && cat << \EOF
14530     Defining HAVE_BERKELEY_DB
14531 EOF
14532 cat >> confdefs.h <<\EOF
14533 #define HAVE_BERKELEY_DB 1
14534 EOF
14535 }
14536
14537     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14538   else with_database_berkdb=no
14539   fi
14540 fi
14541
14542 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14543      != "no no no"; then
14544   { test "$extra_verbose" = "yes" && cat << \EOF
14545     Defining HAVE_DATABASE
14546 EOF
14547 cat >> confdefs.h <<\EOF
14548 #define HAVE_DATABASE 1
14549 EOF
14550 }
14551
14552   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14553    echo "    xemacs will be linked with \"database.o\""
14554  fi
14555   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14556     { test "$extra_verbose" = "yes" && cat << \EOF
14557     Defining HAVE_CHISE
14558 EOF
14559 cat >> confdefs.h <<\EOF
14560 #define HAVE_CHISE 1
14561 EOF
14562 }
14563
14564   fi
14565 fi
14566
14567 if test "$with_socks" = "yes"; then
14568   
14569 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14570 echo "configure:14571: checking for SOCKSinit in -lsocks" >&5
14571 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14572
14573 xe_check_libs=" -lsocks "
14574 cat > conftest.$ac_ext <<EOF
14575 #line 14576 "configure"
14576 #include "confdefs.h"
14577 /* Override any gcc2 internal prototype to avoid an error.  */
14578 /* We use char because int might match the return type of a gcc2
14579     builtin and then its argument prototype would still apply.  */
14580 char SOCKSinit();
14581
14582 int main() {
14583 SOCKSinit()
14584 ; return 0; }
14585 EOF
14586 if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14587   rm -rf conftest*
14588   eval "ac_cv_lib_$ac_lib_var=yes"
14589 else
14590   echo "configure: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   rm -rf conftest*
14593   eval "ac_cv_lib_$ac_lib_var=no"
14594 fi
14595 rm -f conftest*
14596 xe_check_libs=""
14597
14598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14599   echo "$ac_t""yes" 1>&6
14600     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14601     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14602   { test "$extra_verbose" = "yes" && cat << EOF
14603     Defining $ac_tr_lib
14604 EOF
14605 cat >> confdefs.h <<EOF
14606 #define $ac_tr_lib 1
14607 EOF
14608 }
14609
14610   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14611
14612 else
14613   echo "$ac_t""no" 1>&6
14614 fi
14615
14616
14617   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14618     Defining HAVE_SOCKS
14619 EOF
14620 cat >> confdefs.h <<\EOF
14621 #define HAVE_SOCKS 1
14622 EOF
14623 }
14624
14625 fi
14626
14627 if test "$usage_tracking" = "yes"; then
14628   { test "$extra_verbose" = "yes" && cat << \EOF
14629     Defining USAGE_TRACKING
14630 EOF
14631 cat >> confdefs.h <<\EOF
14632 #define USAGE_TRACKING 1
14633 EOF
14634 }
14635
14636   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14637 fi
14638
14639 if test "$with_modules" != "no"; then
14640   echo "checking for module support" 1>&6
14641 echo "configure:14642: checking for module support" >&5
14642
14643     if test "$with_msw" = "yes"; then
14644     have_dl=yes;
14645   else
14646         case "$opsys" in
14647       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14648     Defining HAVE_DYLD
14649 EOF
14650 cat >> confdefs.h <<\EOF
14651 #define HAVE_DYLD 1
14652 EOF
14653 }
14654  ;;
14655       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14656 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14657 echo "configure:14658: checking for dlfcn.h" >&5
14658
14659 cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14662 #include <dlfcn.h>
14663 EOF
14664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14665 { (eval echo configure:14666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14667 if test -z "$ac_err"; then
14668   rm -rf conftest*
14669   eval "ac_cv_header_$ac_safe=yes"
14670 else
14671   echo "$ac_err" >&5
14672   echo "configure: failed program was:" >&5
14673   cat conftest.$ac_ext >&5
14674   rm -rf conftest*
14675   eval "ac_cv_header_$ac_safe=no"
14676 fi
14677 rm -f conftest*
14678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14679   echo "$ac_t""yes" 1>&6
14680   
14681            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14682 echo "configure:14683: checking for dlopen in -lc" >&5
14683            cat > conftest.$ac_ext <<EOF
14684 #line 14685 "configure"
14685 #include "confdefs.h"
14686 #include <dlfcn.h>
14687 int main() {
14688               dlopen ("", 0);
14689 ; return 0; }
14690 EOF
14691 if { (eval echo configure:14692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14692   rm -rf conftest*
14693    have_dl=yes 
14694 else
14695   echo "configure: failed program was:" >&5
14696   cat conftest.$ac_ext >&5
14697   rm -rf conftest*
14698   
14699                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14700 echo "configure:14701: checking for dlopen in -ldl" >&5
14701                ac_save_LIBS="$LIBS"
14702                LIBS="-ldl $LIBS"
14703                cat > conftest.$ac_ext <<EOF
14704 #line 14705 "configure"
14705 #include "confdefs.h"
14706 #include <dlfcn.h>
14707 int main() {
14708                  dlopen ("", 0);
14709 ; return 0; }
14710 EOF
14711 if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14712   rm -rf conftest*
14713    have_dl=yes 
14714 else
14715   echo "configure: failed program was:" >&5
14716   cat conftest.$ac_ext >&5
14717   rm -rf conftest*
14718   LIBS="$ac_save_LIBS"
14719 fi
14720 rm -f conftest*
14721                ac_save_LIBS=
14722 fi
14723 rm -f conftest*
14724 else
14725   echo "$ac_t""no" 1>&6
14726 fi
14727
14728         if test -n "$have_dl"; then
14729            { test "$extra_verbose" = "yes" && cat << \EOF
14730     Defining HAVE_DLOPEN
14731 EOF
14732 cat >> confdefs.h <<\EOF
14733 #define HAVE_DLOPEN 1
14734 EOF
14735 }
14736
14737         else
14738            
14739 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14740 echo "configure:14741: checking for shl_load in -ldld" >&5
14741 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14742
14743 xe_check_libs=" -ldld "
14744 cat > conftest.$ac_ext <<EOF
14745 #line 14746 "configure"
14746 #include "confdefs.h"
14747 /* Override any gcc2 internal prototype to avoid an error.  */
14748 /* We use char because int might match the return type of a gcc2
14749     builtin and then its argument prototype would still apply.  */
14750 char shl_load();
14751
14752 int main() {
14753 shl_load()
14754 ; return 0; }
14755 EOF
14756 if { (eval echo configure:14757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14757   rm -rf conftest*
14758   eval "ac_cv_lib_$ac_lib_var=yes"
14759 else
14760   echo "configure: failed program was:" >&5
14761   cat conftest.$ac_ext >&5
14762   rm -rf conftest*
14763   eval "ac_cv_lib_$ac_lib_var=no"
14764 fi
14765 rm -f conftest*
14766 xe_check_libs=""
14767
14768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14769   echo "$ac_t""yes" 1>&6
14770   libdl=dld have_dl=yes;
14771            { test "$extra_verbose" = "yes" && cat << \EOF
14772     Defining HAVE_SHL_LOAD
14773 EOF
14774 cat >> confdefs.h <<\EOF
14775 #define HAVE_SHL_LOAD 1
14776 EOF
14777 }
14778
14779 else
14780   echo "$ac_t""no" 1>&6
14781
14782 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14783 echo "configure:14784: checking for dld_init in -ldld" >&5
14784 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14785
14786 xe_check_libs=" -ldld "
14787 cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 /* Override any gcc2 internal prototype to avoid an error.  */
14791 /* We use char because int might match the return type of a gcc2
14792     builtin and then its argument prototype would still apply.  */
14793 char dld_init();
14794
14795 int main() {
14796 dld_init()
14797 ; return 0; }
14798 EOF
14799 if { (eval echo configure:14800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14800   rm -rf conftest*
14801   eval "ac_cv_lib_$ac_lib_var=yes"
14802 else
14803   echo "configure: failed program was:" >&5
14804   cat conftest.$ac_ext >&5
14805   rm -rf conftest*
14806   eval "ac_cv_lib_$ac_lib_var=no"
14807 fi
14808 rm -f conftest*
14809 xe_check_libs=""
14810
14811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14812   echo "$ac_t""yes" 1>&6
14813   libdl=dld have_dl=yes;
14814            { test "$extra_verbose" = "yes" && cat << \EOF
14815     Defining HAVE_DLD_INIT
14816 EOF
14817 cat >> confdefs.h <<\EOF
14818 #define HAVE_DLD_INIT 1
14819 EOF
14820 }
14821
14822 else
14823   echo "$ac_t""no" 1>&6
14824 fi
14825
14826
14827 fi
14828
14829
14830         fi
14831     ;;
14832     esac
14833   fi 
14834   if test -n "$have_dl"; then
14835         
14836 dll_ld=
14837 dll_ldflags=
14838 dll_cflags=
14839 dll_post=
14840 dll_ldo="-o"
14841 ld_dynamic_link_flags=
14842 xehost=$canonical
14843 xealias=$internal_configuration
14844
14845 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14846 echo "configure:14847: checking how to build dynamic libraries for ${xehost}" >&5
14847 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14848 case "$xehost" in
14849 *-*-linux-gnu*) ;;
14850 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14851 esac
14852
14853 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14854 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14855 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14856
14857 case "$xehost_os" in
14858 aix3*)
14859   # AIX sometimes has problems with the GCC collect2 program.  For some
14860   # reason, if we set the COLLECT_NAMES environment variable, the problems
14861   # vanish in a puff of smoke.
14862   if test "${COLLECT_NAMES+set}" != set; then
14863     COLLECT_NAMES=
14864     export COLLECT_NAMES
14865   fi
14866   ;;
14867 esac
14868
14869 # Now see if the compiler is really GCC.
14870 if test "$GCC" = "yes"; then
14871   XEGCC=yes
14872 else
14873   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14874 echo "configure:14875: checking checking whether we are using GNU C" >&5
14875   cat > conftest.$ac_ext <<EOF
14876 #line 14877 "configure"
14877 #include "confdefs.h"
14878
14879 #ifdef __GNUC__
14880   yes;
14881 #endif
14882
14883 EOF
14884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14885   egrep "yes" >/dev/null 2>&1; then
14886   rm -rf conftest*
14887   XEGCC=yes
14888 else
14889   rm -rf conftest*
14890   XEGCC=no
14891 fi
14892 rm -f conftest*
14893
14894   echo "$ac_t""${XEGCC}" 1>&6
14895 fi
14896
14897 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14898 echo "configure:14899: checking how to produce PIC code" >&5
14899 wl=
14900
14901 can_build_shared=yes
14902 if test "$XEGCC" = yes; then
14903   wl='-Wl,'
14904
14905   case "$xehost_os" in
14906   aix[3-9]* | irix[5-9]* | osf[3-9])
14907     # PIC is the default for these OSes.
14908     ;;
14909
14910   os2*)
14911     # We can build DLLs from non-PIC.
14912     ;;
14913   amigaos*)
14914     # FIXME: we need at least 68020 code to build shared libraries, but
14915     # adding the `-m68020' flag to GCC prevents building anything better,
14916     # like `-m68040'.
14917     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14918     ;;
14919   *cygwin* | *mingw* )
14920     # PIC is the default
14921     ;;
14922   *)
14923     dll_cflags='-fPIC'
14924     ;;
14925   esac
14926 else
14927   # PORTME Check for PIC flags for the system compiler.
14928   case "$xehost_os" in
14929   hpux9* | hpux1[0-9]*)
14930     # Is there a better link_static_flag that works with the bundled CC?
14931     wl='-Wl,'
14932     dll_cflags='+Z'
14933     ;;
14934
14935   irix[5-9]*)
14936     wl='-Wl,'
14937     # PIC (with -KPIC) is the default.
14938     ;;
14939
14940   os2*)
14941     # We can build DLLs from non-PIC.
14942     ;;
14943
14944   osf[3-9]*)
14945     # All OSF/1 code is PIC.
14946     wl='-Wl,'
14947     ;;
14948
14949   aix[3-9]*)
14950     # All AIX code is PIC.
14951     wl='-Wl,'
14952     ;;
14953
14954   sco3.2v5*)
14955     dll_cflags='-belf -Kpic'
14956     wl='-Wl,'
14957     ;;
14958
14959   unixware*)
14960     dll_cflags="-KPIC"
14961     wl="-Wl,"
14962     ;;
14963
14964   sysv4*)
14965     dll_cflags="-KPIC"
14966     wl="-Wl,"
14967     ;;
14968
14969   sysv5*)
14970     dll_cflags="-KPIC"
14971     wl="-Wl,"
14972     ;;
14973
14974   solaris2*)
14975     dll_cflags='-KPIC'
14976     wl='-Wl,'
14977     ;;
14978
14979   sunos4*)
14980     dll_cflags='-PIC'
14981     wl='-Qoption ld '
14982     ;;
14983
14984   uts4*)
14985     dll_cflags='-pic'
14986     ;;
14987
14988   *)
14989     can_build_shared=no
14990     ;;
14991   esac
14992 fi
14993
14994 if test -n "$dll_cflags"; then
14995   echo "$ac_t""${dll_cflags}" 1>&6
14996
14997   # Check to make sure the dll_cflags actually works.
14998   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14999 echo "configure:15000: checking if PIC flag ${dll_cflags} really works" >&5
15000   save_CFLAGS="$CFLAGS"
15001   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15002   cat > conftest.$ac_ext <<EOF
15003 #line 15004 "configure"
15004 #include "confdefs.h"
15005
15006 int main() {
15007 int x=0;
15008 ; return 0; }
15009 EOF
15010 if { (eval echo configure:15011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15011   rm -rf conftest*
15012   
15013     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15014     # reports no error.  So, we need to grep stderr for (Bundled).
15015     if grep '(Bundled)' config.log >/dev/null; then
15016       echo "$ac_t""no" 1>&6
15017       can_build_shared=no
15018       dll_cflags=
15019     else
15020       echo "$ac_t""yes" 1>&6
15021     fi
15022 else
15023   echo "configure: failed program was:" >&5
15024   cat conftest.$ac_ext >&5
15025   rm -rf conftest*
15026   echo "$ac_t""no" 1>&6
15027     can_build_shared=no
15028     dll_cflags=
15029 fi
15030 rm -f conftest*
15031   CFLAGS="$save_CFLAGS"
15032 else
15033   echo "$ac_t""none" 1>&6
15034 fi
15035
15036 if test "$can_build_shared" = "yes"; then
15037 cc_produces_so=no
15038 xldf=
15039 xcldf=
15040 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15041 echo "configure:15042: checking if C compiler can produce shared libraries" >&5
15042 if test "$XEGCC" = yes; then
15043   xcldf="-shared"
15044   xldf="-shared"
15045 else # Not using GCC
15046   case "$xehost_os" in
15047     aix[3-9]*)
15048       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15049       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15050       ;;
15051
15052     freebsd2* | netbsd* | openbsd*)
15053       xldf="-Bshareable"
15054       xcldf="${wl}-Bshareable"
15055       ;;
15056
15057     freebsd3*)
15058       xcldf="-shared"
15059       ;;
15060
15061     hpux*)
15062       xldf="-b +s"
15063       xcldf="${wl}-b ${wl}+s"
15064       ;;
15065
15066     irix[5-9]* | osf[3-9]*)
15067       xcldf="${wl}-shared"
15068       xldf="-shared"
15069       ;;
15070
15071     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15072       xcldf="-G"
15073       xldf="-G"
15074       ;;
15075
15076     sunos4*)
15077       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15078       xldf="-assert pure-text -Bstatic"
15079       ;;
15080   esac
15081 fi # End if if we are using gcc
15082
15083 if test -n "$xcldf"; then
15084   save_LDFLAGS=$LDFLAGS
15085   save_LIBS=$LIBS
15086   save_xe_libs=$xe_libs
15087   LDFLAGS="$xcldf $LDFLAGS"
15088   LIBS=
15089   xe_libs=
15090   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15091   cat > conftest.$ac_ext <<EOF
15092 #line 15093 "configure"
15093 #include "confdefs.h"
15094
15095 int main() {
15096 int x=0;
15097 ; return 0; }
15098 EOF
15099 if { (eval echo configure:15100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15100   rm -rf conftest*
15101   cc_produces_so=yes
15102 else
15103   echo "configure: failed program was:" >&5
15104   cat conftest.$ac_ext >&5
15105   rm -rf conftest*
15106   cc_produces_so=no
15107 fi
15108 rm -f conftest*
15109   LDFLAGS=$save_LDFLAGS
15110   LIBS=$save_LIBS
15111   xe_libs=$save_xe_libs
15112   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15113 else
15114   cc_produces_so=no
15115 fi
15116 echo "$ac_t""${cc_produces_so}" 1>&6
15117
15118 LTLD=$LD
15119 if test -z "$LTLD"; then
15120   ac_prog=ld
15121   if test "$XEGCC" = yes; then
15122     # Check if gcc -print-prog-name=ld gives a path.
15123     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15124 echo "configure:15125: checking for ld used by GCC" >&5
15125     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15126     case "$ac_prog" in
15127     # Accept absolute paths.
15128     /*)
15129       if test -z "$LTLD"; then
15130 #        case "$ac_prog" in
15131 #          *gcc-lib*) LTLD="$CC"
15132 #                     ;;
15133 #          *)
15134          LTLD="$ac_prog"
15135 #                     ;;
15136 #        esac
15137       fi
15138       ;;
15139     "")
15140       # If it fails, then pretend we aren't using GCC.
15141       ac_prog=ld
15142       ;;
15143     *)
15144       # If it is relative, then search for the first ld in PATH.
15145       with_gnu_ld=unknown
15146       ;;
15147     esac
15148   else
15149     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15150 echo "configure:15151: checking for GNU ld" >&5
15151   fi
15152
15153   if test -z "$LTLD"; then
15154     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15155     for ac_dir in $PATH; do
15156       test -z "$ac_dir" && ac_dir=.
15157       if test -f "$ac_dir/$ac_prog"; then
15158         LTLD="$ac_dir/$ac_prog"
15159         # Check to see if the program is GNU ld.  I'd rather use --version,
15160         # but apparently some GNU ld's only accept -v.
15161         # Break only if it was the GNU/non-GNU ld that we prefer.
15162         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15163           xe_gnu_ld=yes
15164         else
15165           xe_gnu_ld=no
15166         fi
15167       fi
15168     done
15169     IFS="$ac_save_ifs"
15170   fi
15171
15172   if test -n "$LTLD"; then
15173     echo "$ac_t""${LTLD}" 1>&6
15174   else
15175     echo "$ac_t""no" 1>&6
15176   fi
15177
15178   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15179     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15180     exit 1
15181   fi
15182 fi
15183
15184 ld_dynamic_link_flags=
15185
15186 # Check to see if it really is or isn't GNU ld.
15187 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15188 echo "configure:15189: checking if the linker is GNU ld" >&5
15189 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15190 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15191   xe_gnu_ld=yes
15192 else
15193   xe_gnu_ld=no
15194 fi
15195 echo "$ac_t""${xe_gnu_ld}" 1>&6
15196
15197 case "$xehost_os" in
15198   amigaos* | sunos4*)
15199     # On these operating systems, we should treat GNU ld like the system ld.
15200     gnu_ld_acts_native=yes
15201     ;;
15202   *)
15203     gnu_ld_acts_native=no
15204     ;;
15205 esac
15206
15207 if test "$cc_produces_so" = "yes"; then
15208   dll_ld=$CC
15209   dll_ldflags=$xcldf
15210   can_build_shared=yes
15211   ld_shlibs=yes
15212 else
15213   # OK - only NOW do we futz about with ld.
15214   # See if the linker supports building shared libraries.
15215   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15216 echo "configure:15217: checking whether the linker supports shared libraries" >&5
15217   dll_ld=$CC
15218   dll_ldflags=$LDFLAGS
15219   ld_shlibs=yes
15220   can_build_shared=yes
15221   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15222     # See if GNU ld supports shared libraries.
15223     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15224       dll_ld=$CC
15225       dll_ldflags="-shared"
15226       ld_shlibs=yes
15227     else
15228       ld_shlibs=no
15229     fi
15230   else
15231     # PORTME fill in a description of your system's linker (not GNU ld)
15232     case "$xehost_os" in
15233     aix3*)
15234       dll_ld=$LTLD
15235       dll_ldflags=$xldf
15236       ;;
15237
15238     aix[4-9]*)
15239       dll_ldflags=$xcldf
15240       ;;
15241
15242     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15243     # support.  Future versions do this automatically, but an explicit c++rt0.o
15244     # doesn't break anything, and helps significantly (at the cost of a little
15245     # extra space).
15246     freebsd2.2*)
15247       dll_ld=$LTLD
15248       dll_ldflags=$xldf
15249       dll_post="/usr/lib/c++rt0.o"
15250       ;;
15251
15252     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15253     freebsd2*)
15254       dll_ld=$LTLD
15255       dll_ldflags="-Bshareable"
15256       ;;
15257
15258     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15259     freebsd3*)
15260       dll_ldflags="-shared"
15261       ;;
15262
15263     hpux*)
15264       dll_ld=$LTLD
15265       dll_ldflags=$xldf
15266       ;;
15267
15268     irix[5-9]*)
15269       dll_ld=$LTLD
15270       dll_ldflags=$xldf
15271       ;;
15272
15273     netbsd*)
15274       # Tested with NetBSD 1.2 ld
15275       dll_ld=$LTLD
15276       dll_ldflags=$xldf
15277       ;;
15278
15279     openbsd*)
15280       dll_ld=$LTLD
15281       dll_ldflags=$xldf
15282       ;;
15283
15284     osf3* | osf4*)
15285       dll_ld=$LTLD
15286       dll_ldflags=$xldf
15287       ;;
15288
15289     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15290     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15291       dll_ld=$LTLD
15292       case "$dll_ld" in
15293         *gcc*) dll_ldflags="-shared"
15294                dll_ld=$CC
15295                ;;
15296         *)     dll_ldflags="-G"
15297                ;;
15298       esac
15299       ;;
15300
15301     sunos4*)
15302       if test "$XEGCC" = yes; then
15303         dll_ld=$CC
15304       else
15305         dll_ld=$LTLD
15306       fi
15307       dll_ldflags=$xldf
15308       ;;
15309
15310     uts4*)
15311       dll_ld=$LTLD
15312       dll_ldflags="-G"
15313       ;;
15314
15315     bsdi*)
15316       dll_ldflags="-r"
15317       dll_ld="shlicc2"
15318       ;;
15319
15320     *)
15321       ld_shlibs=no
15322       can_build_shared=no
15323       ;;
15324     esac
15325   fi
15326   echo "$ac_t""${ld_shlibs}" 1>&6
15327   if test "$ld_shlibs" = "no"; then
15328     can_build_shared=no
15329   fi
15330 fi # End of if cc_produces_so = no
15331
15332
15333 if test "$xe_gnu_ld" = yes; then
15334   if test "$ld_shlibs" = yes; then
15335     ld_dynamic_link_flags="${wl}-export-dynamic"
15336   fi
15337 fi
15338
15339 if test -z "$ld_dynamic_link_flags"; then
15340   case "$xehost_os" in
15341   aix[3-9]*)
15342     ld_dynamic_link_flags=
15343     ;;
15344
15345   freebsd2.2*)
15346     ld_dynamic_link_flags=
15347     ;;
15348
15349   freebsd2*)
15350     ld_dynamic_link_flags=
15351     ;;
15352
15353   freebsd3*)
15354     ld_dynamic_link_flags=
15355     ;;
15356
15357   hpux*)
15358     ld_dynamic_link_flags="${wl}-E"
15359     ;;
15360
15361   irix[5-9]*)
15362     ld_dynamic_link_flags=
15363     ;;
15364
15365   netbsd*)
15366     ld_dynamic_link_flags=
15367     ;;
15368
15369   openbsd*)
15370     ld_dynamic_link_flags=
15371     ;;
15372
15373   osf3* | osf4*)
15374     ld_dynamic_link_flags=
15375     ;;
15376
15377   solaris2* | solaris7*)
15378     ld_dynamic_link_flags=
15379     ;;
15380
15381   sco3.2v5* | unixware* | sysv5* | sysv4*)
15382     ld_dynamic_link_flags="${wl}-Bexport"
15383     ;;
15384
15385   sunos4*)
15386     ld_dynamic_link_flags=
15387     ;;
15388
15389   uts4*)
15390     ld_dynamic_link_flags=
15391     ;;
15392
15393   bsdi*)
15394     ld_dynamic_link_flags=
15395     ;;
15396
15397   esac
15398 fi # End of if -z ld_dynamic_link_flags
15399 fi # End of if test "$can_build_shared" = "yes"
15400
15401
15402
15403
15404
15405
15406
15407
15408   fi
15409
15410   if test "$can_build_shared" = "yes"; then
15411     { test "$extra_verbose" = "yes" && cat << \EOF
15412     Defining HAVE_SHLIB
15413 EOF
15414 cat >> confdefs.h <<\EOF
15415 #define HAVE_SHLIB 1
15416 EOF
15417 }
15418
15419     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15420    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15421  fi
15422     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15423     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15424     for ac_func in dlerror _dlerror
15425 do
15426 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15427 echo "configure:15428: checking for $ac_func" >&5
15428
15429 cat > conftest.$ac_ext <<EOF
15430 #line 15431 "configure"
15431 #include "confdefs.h"
15432 /* System header to define __stub macros and hopefully few prototypes,
15433     which can conflict with char $ac_func(); below.  */
15434 #include <assert.h>
15435 /* Override any gcc2 internal prototype to avoid an error.  */
15436 /* We use char because int might match the return type of a gcc2
15437     builtin and then its argument prototype would still apply.  */
15438 char $ac_func();
15439
15440 int main() {
15441
15442 /* The GNU C library defines this for functions which it implements
15443     to always fail with ENOSYS.  Some functions are actually named
15444     something starting with __ and the normal name is an alias.  */
15445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15446 choke me
15447 #else
15448 $ac_func();
15449 #endif
15450
15451 ; return 0; }
15452 EOF
15453 if { (eval echo configure:15454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15454   rm -rf conftest*
15455   eval "ac_cv_func_$ac_func=yes"
15456 else
15457   echo "configure: failed program was:" >&5
15458   cat conftest.$ac_ext >&5
15459   rm -rf conftest*
15460   eval "ac_cv_func_$ac_func=no"
15461 fi
15462 rm -f conftest*
15463
15464 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15465   echo "$ac_t""yes" 1>&6
15466     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15467   { test "$extra_verbose" = "yes" && cat << EOF
15468     Defining $ac_tr_func
15469 EOF
15470 cat >> confdefs.h <<EOF
15471 #define $ac_tr_func 1
15472 EOF
15473 }
15474  
15475 else
15476   echo "$ac_t""no" 1>&6
15477 fi
15478 done
15479
15480     with_modules=yes
15481   else
15482     if test "$with_modules" = "yes"; then
15483       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15484     else
15485       echo "configure: warning: "Module support cannot be provided."" 1>&2
15486     fi
15487     with_modules=no
15488   fi
15489 fi
15490
15491 cat > conftest.$ac_ext <<EOF
15492 #line 15493 "configure"
15493 #include "confdefs.h"
15494 int main(int c,char *v[]){return 0;}
15495 EOF
15496 if { (eval echo configure:15497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15497 then
15498   :
15499 else
15500   conftest_rc="$?"
15501   echo "configure: failed program was:" >&5
15502   cat conftest.$ac_ext >&5
15503   rm -fr conftest*
15504   
15505   echo ""
15506   echo "*** PANIC *** configure forgot how to build working executables!"
15507   echo ""
15508   echo "*** This is most commonly due to an unforeseen environment, causing"
15509   echo "*** configure to incorrectly compute the sequence of libraries to link."
15510   echo "*** Please examine the tail of config.log for runtime errors."
15511   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15512   echo "*** Often adding or removing explicit options in the configure"
15513   echo "*** invocation can work around this kind of problem.  If so, please"
15514   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15515   echo "***"
15516   echo "*** Other possible causes are inability to write to the file system"
15517   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15518   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15519   echo "*** necessary.  On other systems, try telling configure where to find"
15520   echo "*** the shared libraries using the --site-runtime-libraries option."
15521   echo "***"
15522   echo "*** Another way to shoot yourself in the foot is to specify"
15523   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15524   echo "*** system.  Don't do that."
15525   exit 1
15526 fi
15527 rm -fr conftest*
15528
15529 if test "$win32_processes" = "yes"; then
15530   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15531    echo "    xemacs will be linked with \"process-nt.o\""
15532  fi
15533 else
15534   { test "$extra_verbose" = "yes" && cat << \EOF
15535     Defining HAVE_UNIX_PROCESSES
15536 EOF
15537 cat >> confdefs.h <<\EOF
15538 #define HAVE_UNIX_PROCESSES 1
15539 EOF
15540 }
15541
15542   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15543    echo "    xemacs will be linked with \"process-unix.o\""
15544  fi
15545 fi
15546
15547
15548
15549 T=""
15550 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15551 CFLAGS="$T"
15552
15553
15554 T=""
15555 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15556 extra_objs="$T"
15557
15558
15559 T=""
15560 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
15561 c_switch_general="$T"
15562
15563
15564 T=""
15565 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
15566 c_switch_window_system="$T"
15567
15568
15569 T=""
15570 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15571 c_switch_all="$T"
15572
15573
15574 T=""
15575 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
15576 ld_switch_general="$T"
15577
15578
15579 T=""
15580 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15581 ld_switch_window_system="$T"
15582
15583
15584 T=""
15585 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15586 ld_switch_all="$T"
15587
15588
15589 T=""
15590 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15591 ld_libs_general="$T"
15592
15593
15594 T=""
15595 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
15596 ld_libs_window_system="$T"
15597
15598
15599 T=""
15600 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15601 ld_libs_all="$T"
15602
15603
15604
15605 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15606 internal_makefile_list="Makefile.in"
15607 SUBDIR_MAKEFILES=''
15608 test -d lock || mkdir lock
15609 for dir in $MAKE_SUBDIR; do
15610   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15611         test -d "$d" || mkdir "$d"; cd "$d"
15612       done ) ;;
15613    * ) test -d "$dir" || mkdir "$dir" ;;
15614   esac
15615   
15616 T=""
15617 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15618 SUBDIR_MAKEFILES="$T"
15619
15620   
15621 T=""
15622 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15623 internal_makefile_list="$T"
15624
15625 done
15626
15627
15628
15629
15630 for dir in src/s src/m; do
15631   if test ! -d "$dir" ; then
15632     echo Making symbolic link to "$srcdir/$dir"
15633     ${LN_S} "$srcdir/$dir" "$dir"
15634   fi
15635 done
15636
15637 if test "$extra_verbose" = "yes"; then
15638   echo ""
15639   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
15640   echo ""
15641 fi
15642
15643
15644 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15645   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15646   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15647 fi
15648
15649 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15650   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15651   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15652 fi
15653
15654 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15655   test "$extra_verbose" = "yes" && echo "creating TAGS"
15656   echo "\f
15657 $srcdir/TAGS,include" > "TAGS"
15658 fi
15659
15660 if test "$__SUNPRO_C" = "yes"; then
15661   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15662   ( echo "# For use with Sun WorkShop's Source browser."
15663     echo "# See sbquery(1) and sbinit(4) for more information"
15664     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15665   ) > .sbinit
15666 fi
15667
15668 rm -f core
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689 PREFIX=$prefix
15690 while true; do
15691   case "$PREFIX" in
15692     *\$* ) eval "PREFIX=$PREFIX" ;;
15693     *) break ;;
15694   esac
15695 done
15696
15697
15698
15699
15700 EXEC_PREFIX=$exec_prefix
15701 while true; do
15702   case "$EXEC_PREFIX" in
15703     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15704     *) break ;;
15705   esac
15706 done
15707
15708
15709
15710
15711 INFODIR=$infodir
15712 while true; do
15713   case "$INFODIR" in
15714     *\$* ) eval "INFODIR=$INFODIR" ;;
15715     *) break ;;
15716   esac
15717 done
15718
15719
15720
15721
15722 INFOPATH=$infopath
15723 while true; do
15724   case "$INFOPATH" in
15725     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15726     *) break ;;
15727   esac
15728 done
15729
15730
15731
15732
15733 PACKAGE_PATH=$package_path
15734 while true; do
15735   case "$PACKAGE_PATH" in
15736     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15737     *) break ;;
15738   esac
15739 done
15740
15741
15742
15743
15744 LISPDIR=$lispdir
15745 while true; do
15746   case "$LISPDIR" in
15747     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15748     *) break ;;
15749   esac
15750 done
15751
15752
15753
15754
15755 MODULEDIR=$moduledir
15756 while true; do
15757   case "$MODULEDIR" in
15758     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15759     *) break ;;
15760   esac
15761 done
15762
15763
15764
15765
15766 SITELISPDIR=$sitelispdir
15767 while true; do
15768   case "$SITELISPDIR" in
15769     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15770     *) break ;;
15771   esac
15772 done
15773
15774
15775
15776
15777 SITEMODULEDIR=$sitemoduledir
15778 while true; do
15779   case "$SITEMODULEDIR" in
15780     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15781     *) break ;;
15782   esac
15783 done
15784
15785
15786
15787
15788 ETCDIR=$etcdir
15789 while true; do
15790   case "$ETCDIR" in
15791     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15792     *) break ;;
15793   esac
15794 done
15795
15796
15797
15798
15799 DOCDIR=$docdir
15800 while true; do
15801   case "$DOCDIR" in
15802     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15803     *) break ;;
15804   esac
15805 done
15806
15807
15808
15809
15810 ARCHLIBDIR=$archlibdir
15811 while true; do
15812   case "$ARCHLIBDIR" in
15813     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15814     *) break ;;
15815   esac
15816 done
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15838
15839
15840
15841
15842
15843
15844
15845 : ${XEMACS_CC:=$CC}
15846
15847
15848 if test "$with_prefix" = "yes"; then
15849   { test "$extra_verbose" = "yes" && cat << \EOF
15850     Defining PREFIX_USER_DEFINED
15851 EOF
15852 cat >> confdefs.h <<\EOF
15853 #define PREFIX_USER_DEFINED 1
15854 EOF
15855 }
15856
15857 fi
15858
15859 if test "$with_site_lisp" = "no"; then
15860   { test "$extra_verbose" = "yes" && cat << \EOF
15861     Defining INHIBIT_SITE_LISP
15862 EOF
15863 cat >> confdefs.h <<\EOF
15864 #define INHIBIT_SITE_LISP 1
15865 EOF
15866 }
15867
15868 fi
15869 if test "$with_site_modules" = "no"; then
15870   { test "$extra_verbose" = "yes" && cat << \EOF
15871     Defining INHIBIT_SITE_MODULES
15872 EOF
15873 cat >> confdefs.h <<\EOF
15874 #define INHIBIT_SITE_MODULES 1
15875 EOF
15876 }
15877
15878 fi
15879
15880
15881 T=""
15882 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15883 ac_configure_args="$T"
15884
15885 { test "$extra_verbose" = "yes" && cat << EOF
15886     Defining EMACS_CONFIGURATION = "$configuration"
15887 EOF
15888 cat >> confdefs.h <<EOF
15889 #define EMACS_CONFIGURATION "$configuration"
15890 EOF
15891 }
15892
15893 { test "$extra_verbose" = "yes" && cat << EOF
15894     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15895 EOF
15896 cat >> confdefs.h <<EOF
15897 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15898 EOF
15899 }
15900
15901
15902
15903 null_string=""
15904 { test "$extra_verbose" = "yes" && cat << EOF
15905     Defining LD_SWITCH_X_SITE = $null_string
15906 EOF
15907 cat >> confdefs.h <<EOF
15908 #define LD_SWITCH_X_SITE $null_string
15909 EOF
15910 }
15911
15912 { test "$extra_verbose" = "yes" && cat << EOF
15913     Defining LD_SWITCH_X_SITE_AUX = $null_string
15914 EOF
15915 cat >> confdefs.h <<EOF
15916 #define LD_SWITCH_X_SITE_AUX $null_string
15917 EOF
15918 }
15919
15920 { test "$extra_verbose" = "yes" && cat << EOF
15921     Defining C_SWITCH_X_SITE = $null_string
15922 EOF
15923 cat >> confdefs.h <<EOF
15924 #define C_SWITCH_X_SITE $null_string
15925 EOF
15926 }
15927
15928 { test "$extra_verbose" = "yes" && cat << EOF
15929     Defining LD_SWITCH_SITE = $null_string
15930 EOF
15931 cat >> confdefs.h <<EOF
15932 #define LD_SWITCH_SITE $null_string
15933 EOF
15934 }
15935
15936 { test "$extra_verbose" = "yes" && cat << EOF
15937     Defining C_SWITCH_SITE = $null_string
15938 EOF
15939 cat >> confdefs.h <<EOF
15940 #define C_SWITCH_SITE $null_string
15941 EOF
15942 }
15943
15944
15945
15946 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15947     Defining GNU_MALLOC
15948 EOF
15949 cat >> confdefs.h <<\EOF
15950 #define GNU_MALLOC 1
15951 EOF
15952 }
15953
15954 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15955     Defining USE_SYSTEM_MALLOC
15956 EOF
15957 cat >> confdefs.h <<\EOF
15958 #define USE_SYSTEM_MALLOC 1
15959 EOF
15960 }
15961
15962 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15963     Defining USE_DEBUG_MALLOC
15964 EOF
15965 cat >> confdefs.h <<\EOF
15966 #define USE_DEBUG_MALLOC 1
15967 EOF
15968 }
15969
15970                                               { test "$extra_verbose" = "yes" && cat << \EOF
15971     Defining USE_SYSTEM_MALLOC
15972 EOF
15973 cat >> confdefs.h <<\EOF
15974 #define USE_SYSTEM_MALLOC 1
15975 EOF
15976 }
15977
15978 fi
15979 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15980     Defining I18N3
15981 EOF
15982 cat >> confdefs.h <<\EOF
15983 #define I18N3 1
15984 EOF
15985 }
15986
15987 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15988     Defining USE_GCC
15989 EOF
15990 cat >> confdefs.h <<\EOF
15991 #define USE_GCC 1
15992 EOF
15993 }
15994
15995 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15996     Defining EXTERNAL_WIDGET
15997 EOF
15998 cat >> confdefs.h <<\EOF
15999 #define EXTERNAL_WIDGET 1
16000 EOF
16001 }
16002
16003 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16004     Defining QUICK_BUILD
16005 EOF
16006 cat >> confdefs.h <<\EOF
16007 #define QUICK_BUILD 1
16008 EOF
16009 }
16010
16011 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16012     Defining PURIFY
16013 EOF
16014 cat >> confdefs.h <<\EOF
16015 #define PURIFY 1
16016 EOF
16017 }
16018
16019 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16020     Defining QUANTIFY
16021 EOF
16022 cat >> confdefs.h <<\EOF
16023 #define QUANTIFY 1
16024 EOF
16025 }
16026
16027 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16028     Defining MAIL_USE_POP
16029 EOF
16030 cat >> confdefs.h <<\EOF
16031 #define MAIL_USE_POP 1
16032 EOF
16033 }
16034
16035 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16036     Defining KERBEROS
16037 EOF
16038 cat >> confdefs.h <<\EOF
16039 #define KERBEROS 1
16040 EOF
16041 }
16042
16043 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16044     Defining HESIOD
16045 EOF
16046 cat >> confdefs.h <<\EOF
16047 #define HESIOD 1
16048 EOF
16049 }
16050
16051 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16052     Defining USE_UNION_TYPE
16053 EOF
16054 cat >> confdefs.h <<\EOF
16055 #define USE_UNION_TYPE 1
16056 EOF
16057 }
16058
16059 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16060     Defining REGEX_MALLOC
16061 EOF
16062 cat >> confdefs.h <<\EOF
16063 #define REGEX_MALLOC 1
16064 EOF
16065 }
16066
16067 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16068     Defining PDUMP
16069 EOF
16070 cat >> confdefs.h <<\EOF
16071 #define PDUMP 1
16072 EOF
16073 }
16074
16075 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16076     Defining IPV6_CANONICALIZE
16077 EOF
16078 cat >> confdefs.h <<\EOF
16079 #define IPV6_CANONICALIZE 1
16080 EOF
16081 }
16082
16083
16084
16085 (
16086 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16087 else
16088   echo "uname -a: `uname -a`"
16089 fi
16090 echo ""
16091 echo "$0 $quoted_arguments"
16092 ) > Installation
16093
16094 if test ! -z ${emacs_beta_version} ; then
16095   if test -z "${emacs_is_beta}" ; then
16096         xemacs_betaname=".${emacs_beta_version}"
16097   else
16098         xemacs_betaname="-b${emacs_beta_version}"
16099   fi
16100 else
16101   xemacs_betaname=""
16102 fi
16103
16104 (
16105 echo "
16106
16107 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16108 "
16109 echo "
16110 Compilation / Installation:"
16111 echo "  Source code location:              $srcdir"
16112 echo "  Installation prefix:               $prefix"
16113 if test -n "$site_includes"; then
16114   echo "  Additional header files:           $site_includes"
16115 fi
16116 if test -n "$site_libraries"; then
16117   echo "  Additional libraries:              $site_libraries"
16118 fi
16119 if test -n "$site_prefixes"; then
16120   echo "  Additional prefixes:               $site_prefixes"
16121 fi
16122 if test -n "$runpath"; then
16123   echo "  Runtime library search path:       $runpath"
16124 fi
16125
16126 if test -n "$opsysfile"
16127 then echo "  Operating system description file: \`$opsysfile'"
16128 else echo "  Not using any operating system description file"
16129 fi
16130 if test -n "$machfile"
16131 then echo "  Machine description file:          \`$machfile'"
16132 else echo "  Not using any machine description file"
16133 fi
16134
16135 echo "  Compiler:                          $CC $CFLAGS"
16136 echo "  Relocating allocator for buffers:  $rel_alloc"
16137 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16138 case "$ld_switch_site" in
16139   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16140     - Consider configuring with --pdump." ;;
16141 esac
16142
16143 echo "
16144 Window System:"
16145 if test "$with_msw" = "yes"; then
16146   echo "  Compiling in support for the Microsoft window system."
16147 fi
16148 if test "$with_x11" = "yes"; then
16149   echo "  Compiling in support for the X window system:"
16150   echo "    - X Windows headers location:                 $x_includes"
16151   echo "    - X Windows libraries location:               $x_libraries"
16152   if test "$with_xauth" != yes; then
16153     echo "    - Xau (X authority) not available."
16154   fi
16155   if test "$with_xmu" != yes; then
16156     echo "    - Xmu library not available; substituting equivalent routines."
16157   fi
16158   if test "$with_wmcommand" != no; then
16159     echo "    - Handling WM_COMMAND properly."
16160   fi
16161 fi
16162 if test "$need_motif" = "yes" ; then
16163   echo "  Compiling in support for Motif."
16164   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16165   echo "             You are likely to experience slow redisplay."
16166   echo "             You may need to install vendor patches to Motif."
16167   echo "             See PROBLEMS for more information."
16168 fi
16169 if test "$need_athena" = "yes"; then
16170   echo "  Compiling in support for the Athena widget set:"
16171   echo "    - Athena headers location:                    $athena_h_path"
16172   echo "    - Athena library to link:                     $athena_lib"
16173 fi
16174 case "$with_menubars" in
16175   gtk   ) echo "  Using GTK menubars."   ;;
16176   lucid ) echo "  Using Lucid menubars." ;;
16177   motif ) echo "  Using Motif menubars."
16178           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16179           echo "             We recommend using the Lucid menubar instead."
16180           echo "             Re-run configure with --with-menubars='lucid'." ;;
16181     msw ) echo "  Using MS-Windows menubars." ;;
16182 esac
16183 case "$with_scrollbars" in
16184   gtk    ) echo "  Using GTK scrollbars."        ;;
16185   lucid  ) echo "  Using Lucid scrollbars."      ;;
16186   motif  ) echo "  Using Motif scrollbars."      ;;
16187   athena ) echo "  Using Athena scrollbars."     ;;
16188      msw ) echo "  Using MS-Windows scrollbars." ;;
16189 esac
16190 case "$with_dialogs" in
16191   gtk    ) echo "  Using GTK dialog boxes." ;;
16192   motif  ) echo "  Using Motif dialog boxes."
16193            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16194              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16195              echo "             We recommend using the Athena dialog boxes instead."
16196              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16197              echo "             Read the PROBLEMS file for more information."
16198            fi; fi ;;
16199   athena ) echo "  Using Athena dialog boxes."     ;;
16200      msw ) echo "  Using MS-Windows dialog boxes." ;;
16201 esac
16202 case "$with_widgets" in
16203   gtk    ) echo "  Using GTK native widgets."        ;;
16204   motif  ) echo "  Using Motif native widgets."      ;;
16205   athena ) echo "  Using Athena native widgets."     ;;
16206      msw ) echo "  Using MS-Windows native widgets." ;;
16207 esac
16208 if test "$with_dragndrop" = yes; then
16209   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16210   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16211 fi
16212
16213 echo "
16214 TTY:"
16215 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16216 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16217
16218 echo "
16219 Images:"
16220 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16221 if test "$with_xpm" = yes; then
16222   echo "  Compiling in support for XPM  images."
16223 elif test "$with_x11" = yes; then
16224   echo "  WARNING: -----------------------------------------------------------"
16225   echo "  WARNING: Compiling without XPM image support."
16226   if test "$xpm_problem" != ""; then
16227     echo "  Reason: $xpm_problem"
16228   fi
16229   echo "  WARNING: You should strongly consider installing XPM."
16230   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16231   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16232   echo "  WARNING: -----------------------------------------------------------"
16233 fi
16234 if test "$with_png" = yes; then
16235   echo "  Compiling in support for PNG  images."
16236 elif test "$window_system" != "none"; then
16237   echo "  WARNING: -----------------------------------------------------------"
16238   echo "  WARNING: Compiling without PNG image support."
16239   if test "$png_problem" != ""; then
16240     echo "  Reason: $png_problem"
16241   fi
16242   echo "  WARNING: You should strongly consider installing the PNG libraries."
16243   echo "  WARNING: Otherwise certain images and glyphs may not display."
16244   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16245   echo "  WARNING: -----------------------------------------------------------"
16246 fi
16247 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16248 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16249 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16250
16251 echo "
16252 Sound:"
16253 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16254 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16255 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16256 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16257
16258 echo "
16259 Databases:"
16260 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16261 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16262 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16263 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16264 if test "$with_postgresql" = yes; then
16265   echo "  Compiling in support for PostgreSQL."
16266   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16267   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16268 fi
16269
16270 echo "
16271 Multiscriptization / Multilingualization / Internationalization:"
16272 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16273 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16274 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16275 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16276 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16277 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16278 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16279 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16280 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16281 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16282 if test "$with_wnn" = yes; then
16283   echo "  Compiling in support for the WNN input method on Mule."
16284   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16285 fi
16286 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16287
16288 echo "
16289 Mail:"
16290 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16291 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16292 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16293 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16294
16295 echo "
16296 Other Features:"
16297 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16298 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16299 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16300 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16301 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16302 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16303 if test "$use_union_type" = yes; then
16304   echo "  WARNING: ---------------------------------------------------------"
16305   echo "  Using the union type for Lisp_Objects."
16306   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16307   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16308   echo "  WARNING: ---------------------------------------------------------"
16309 fi
16310 if test "$use_regex_malloc" = no; then
16311   echo "  WARNING: -----------------------------------------------------------"
16312   echo "  Using alloca to allocate the failure stack."
16313   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16314   echo "  Do NOT use this build of XEmacs for ordinary work."
16315   echo "  WARNING: -----------------------------------------------------------"
16316 fi
16317 test "$pdump" = yes && echo "  Using the new portable dumper."
16318 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16319 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16320 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16321   != "no no no no no no"; then
16322   echo "  WARNING: ---------------------------------------------------------"
16323   echo "  WARNING: Compiling in support for runtime error checking."
16324   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16325   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16326   echo "  WARNING: ---------------------------------------------------------"
16327 fi
16328 echo ""
16329 ) | tee -a Installation
16330 echo ""
16331
16332
16333 # Remove any trailing slashes in these variables.
16334 test -n "$prefix" &&
16335   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16336 test -n "$exec_prefix" &&
16337   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16338
16339
16340 for file in $internal_makefile_list; do
16341   test "$file" = src/Makefile.in && \
16342     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16343   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16344 done
16345 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16346 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
16347
16348 trap '' 1 2 15
16349
16350 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16351
16352 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16353 # Let make expand exec_prefix.
16354 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16355
16356 # Any assignment to VPATH causes Sun make to only execute
16357 # the first set of double-colon rules, so remove it if not needed.
16358 # If there is a colon in the path, we need to keep it.
16359 if test "x$srcdir" = x.; then
16360   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16361 fi
16362
16363 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16364
16365 DEFS=-DHAVE_CONFIG_H
16366
16367 # Without the "./", some shells look in PATH for config.status.
16368 : ${CONFIG_STATUS=./config.status}
16369
16370 echo creating $CONFIG_STATUS
16371 rm -f $CONFIG_STATUS
16372 cat > $CONFIG_STATUS <<EOF
16373 #! /bin/sh
16374 # Generated automatically by configure.
16375 # Run this file to recreate the current configuration.
16376 # This directory was configured as follows,
16377 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16378 #
16379 # $0 $ac_configure_args
16380 #
16381 # Compiler output produced by configure, useful for debugging
16382 # configure, is in ./config.log if it exists.
16383
16384 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16385 for ac_option
16386 do
16387   case "\$ac_option" in
16388   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16389     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16390     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16391   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16392     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16393     exit 0 ;;
16394   -help | --help | --hel | --he | --h)
16395     echo "\$ac_cs_usage"; exit 0 ;;
16396   *) echo "\$ac_cs_usage"; exit 1 ;;
16397   esac
16398 done
16399
16400 ac_given_srcdir=$srcdir
16401 ac_given_INSTALL="$INSTALL"
16402
16403 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16404 EOF
16405 cat >> $CONFIG_STATUS <<EOF
16406
16407 # Protect against being on the right side of a sed subst in config.status.
16408 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16409  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16410 $ac_vpsub
16411 $extrasub
16412 s%@SHELL@%$SHELL%g
16413 s%@CFLAGS@%$CFLAGS%g
16414 s%@CPPFLAGS@%$CPPFLAGS%g
16415 s%@CXXFLAGS@%$CXXFLAGS%g
16416 s%@FFLAGS@%$FFLAGS%g
16417 s%@DEFS@%$DEFS%g
16418 s%@LDFLAGS@%$LDFLAGS%g
16419 s%@LIBS@%$LIBS%g
16420 s%@exec_prefix@%$exec_prefix%g
16421 s%@prefix@%$prefix%g
16422 s%@program_transform_name@%$program_transform_name%g
16423 s%@bindir@%$bindir%g
16424 s%@sbindir@%$sbindir%g
16425 s%@libexecdir@%$libexecdir%g
16426 s%@datadir@%$datadir%g
16427 s%@sysconfdir@%$sysconfdir%g
16428 s%@sharedstatedir@%$sharedstatedir%g
16429 s%@localstatedir@%$localstatedir%g
16430 s%@libdir@%$libdir%g
16431 s%@includedir@%$includedir%g
16432 s%@oldincludedir@%$oldincludedir%g
16433 s%@infodir@%$infodir%g
16434 s%@mandir@%$mandir%g
16435 s%@LN_S@%$LN_S%g
16436 s%@blddir@%$blddir%g
16437 s%@CC@%$CC%g
16438 s%@CPP@%$CPP%g
16439 s%@start_flags@%$start_flags%g
16440 s%@ld_switch_shared@%$ld_switch_shared%g
16441 s%@start_files@%$start_files%g
16442 s%@ld@%$ld%g
16443 s%@lib_gcc@%$lib_gcc%g
16444 s%@RANLIB@%$RANLIB%g
16445 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16446 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16447 s%@INSTALL_DATA@%$INSTALL_DATA%g
16448 s%@YACC@%$YACC%g
16449 s%@SET_MAKE@%$SET_MAKE%g
16450 s%@GTK_CONFIG@%$GTK_CONFIG%g
16451 s%@X_CFLAGS@%$X_CFLAGS%g
16452 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16453 s%@X_LIBS@%$X_LIBS%g
16454 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16455 s%@install_pp@%$install_pp%g
16456 s%@libs_xauth@%$libs_xauth%g
16457 s%@dnd_objs@%$dnd_objs%g
16458 s%@lwlib_objs@%$lwlib_objs%g
16459 s%@ALLOCA@%$ALLOCA%g
16460 s%@have_esd_config@%$have_esd_config%g
16461 s%@dll_ld@%$dll_ld%g
16462 s%@dll_cflags@%$dll_cflags%g
16463 s%@dll_ldflags@%$dll_ldflags%g
16464 s%@dll_post@%$dll_post%g
16465 s%@dll_ldo@%$dll_ldo%g
16466 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16467 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16468 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16469 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16470 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16471 s%@PROGNAME@%$PROGNAME%g
16472 s%@version@%$version%g
16473 s%@configuration@%$configuration%g
16474 s%@canonical@%$canonical%g
16475 s%@inststaticdir@%$inststaticdir%g
16476 s%@instvardir@%$instvardir%g
16477 s%@srcdir@%$srcdir%g
16478 s%@pkgdir@%$pkgdir%g
16479 s%@statedir@%$statedir%g
16480 s%@extra_includes@%$extra_includes%g
16481 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16482 s%@PREFIX@%$PREFIX%g
16483 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16484 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16485 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16486 s%@INFODIR@%$INFODIR%g
16487 s%@infopath@%$infopath%g
16488 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16489 s%@INFOPATH@%$INFOPATH%g
16490 s%@package_path@%$package_path%g
16491 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16492 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16493 s%@lispdir@%$lispdir%g
16494 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16495 s%@LISPDIR@%$LISPDIR%g
16496 s%@moduledir@%$moduledir%g
16497 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16498 s%@MODULEDIR@%$MODULEDIR%g
16499 s%@sitelispdir@%$sitelispdir%g
16500 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16501 s%@SITELISPDIR@%$SITELISPDIR%g
16502 s%@sitemoduledir@%$sitemoduledir%g
16503 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16504 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16505 s%@etcdir@%$etcdir%g
16506 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16507 s%@ETCDIR@%$ETCDIR%g
16508 s%@docdir@%$docdir%g
16509 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16510 s%@DOCDIR@%$DOCDIR%g
16511 s%@archlibdir@%$archlibdir%g
16512 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16513 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16514 s%@bitmapdir@%$bitmapdir%g
16515 s%@extra_objs@%$extra_objs%g
16516 s%@machfile@%$machfile%g
16517 s%@opsysfile@%$opsysfile%g
16518 s%@c_switch_general@%$c_switch_general%g
16519 s%@c_switch_window_system@%$c_switch_window_system%g
16520 s%@c_switch_all@%$c_switch_all%g
16521 s%@ld_switch_general@%$ld_switch_general%g
16522 s%@ld_switch_window_system@%$ld_switch_window_system%g
16523 s%@ld_switch_all@%$ld_switch_all%g
16524 s%@ld_libs_general@%$ld_libs_general%g
16525 s%@ld_libs_window_system@%$ld_libs_window_system%g
16526 s%@ld_libs_all@%$ld_libs_all%g
16527 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16528 s%@native_sound_lib@%$native_sound_lib%g
16529 s%@sound_cflags@%$sound_cflags%g
16530 s%@dynodump_arch@%$dynodump_arch%g
16531 s%@XEMACS_CC@%$XEMACS_CC%g
16532 s%@internal_makefile_list@%$internal_makefile_list%g
16533
16534 CEOF
16535 EOF
16536
16537 cat >> $CONFIG_STATUS <<\EOF
16538
16539 # Split the substitutions into bite-sized pieces for seds with
16540 # small command number limits, like on Digital OSF/1 and HP-UX.
16541 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16542 ac_file=1 # Number of current file.
16543 ac_beg=1 # First line for current file.
16544 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16545 ac_more_lines=:
16546 ac_sed_cmds=""
16547 while $ac_more_lines; do
16548   if test $ac_beg -gt 1; then
16549     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16550   else
16551     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16552   fi
16553   if test ! -s conftest.s$ac_file; then
16554     ac_more_lines=false
16555     rm -f conftest.s$ac_file
16556   else
16557     if test -z "$ac_sed_cmds"; then
16558       ac_sed_cmds="sed -f conftest.s$ac_file"
16559     else
16560       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16561     fi
16562     ac_file=`expr $ac_file + 1`
16563     ac_beg=$ac_end
16564     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16565   fi
16566 done
16567 if test -z "$ac_sed_cmds"; then
16568   ac_sed_cmds=cat
16569 fi
16570 EOF
16571
16572 cat >> $CONFIG_STATUS <<EOF
16573
16574 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16575 EOF
16576 cat >> $CONFIG_STATUS <<\EOF
16577 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16578   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16579   case "$ac_file" in
16580   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16581        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16582   *) ac_file_in="${ac_file}.in" ;;
16583   esac
16584
16585   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16586
16587   # Remove last slash and all that follows it.  Not all systems have dirname.
16588   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16589   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16590     # The file is in a subdirectory.
16591     test ! -d "$ac_dir" && mkdir "$ac_dir"
16592     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16593     # A "../" for each directory in $ac_dir_suffix.
16594     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16595   else
16596     ac_dir_suffix= ac_dots=
16597   fi
16598
16599   case "$ac_given_srcdir" in
16600   .)  srcdir=.
16601       if test -z "$ac_dots"; then top_srcdir=.
16602       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16603   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16604   *) # Relative path.
16605     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16606     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16607   esac
16608
16609   case "$ac_given_INSTALL" in
16610   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16611   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16612   esac
16613
16614   echo creating "$ac_file"
16615   rm -f "$ac_file"
16616   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16617   case "$ac_file" in
16618   *Makefile*) ac_comsub="1i\\
16619 # $configure_input" ;;
16620   *) ac_comsub= ;;
16621   esac
16622
16623   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16624   sed -e "$ac_comsub
16625 s%@configure_input@%$configure_input%g
16626 s%@srcdir@%$srcdir%g
16627 s%@top_srcdir@%$top_srcdir%g
16628 s%@INSTALL@%$INSTALL%g
16629 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16630 fi; done
16631 rm -f conftest.s*
16632
16633 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16634 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16635 #
16636 # ac_d sets the value in "#define NAME VALUE" lines.
16637 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16638 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16639 ac_dC='\3'
16640 ac_dD='%g'
16641 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16642 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16643 ac_uB='\([      ]\)%\1#\2define\3'
16644 ac_uC=' '
16645 ac_uD='\4%g'
16646 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16647 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16648 ac_eB='$%\1#\2define\3'
16649 ac_eC=' '
16650 ac_eD='%g'
16651
16652 if test "${CONFIG_HEADERS+set}" != set; then
16653 EOF
16654 cat >> $CONFIG_STATUS <<EOF
16655   CONFIG_HEADERS="src/config.h lwlib/config.h"
16656 EOF
16657 cat >> $CONFIG_STATUS <<\EOF
16658 fi
16659 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16661   case "$ac_file" in
16662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16664   *) ac_file_in="${ac_file}.in" ;;
16665   esac
16666
16667   echo creating $ac_file
16668
16669   rm -f conftest.frag conftest.in conftest.out
16670   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16671   cat $ac_file_inputs > conftest.in
16672
16673 EOF
16674
16675 # Transform confdefs.h into a sed script conftest.vals that substitutes
16676 # the proper values into config.h.in to produce config.h.  And first:
16677 # Protect against being on the right side of a sed subst in config.status.
16678 # Protect against being in an unquoted here document in config.status.
16679 rm -f conftest.vals
16680 cat > conftest.hdr <<\EOF
16681 s/[\\&%]/\\&/g
16682 s%[\\$`]%\\&%g
16683 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16684 s%ac_d%ac_u%gp
16685 s%ac_u%ac_e%gp
16686 EOF
16687 sed -n -f conftest.hdr confdefs.h > conftest.vals
16688 rm -f conftest.hdr
16689
16690 # This sed command replaces #undef with comments.  This is necessary, for
16691 # example, in the case of _POSIX_SOURCE, which is predefined and required
16692 # on some systems where configure will not decide to define it.
16693 cat >> conftest.vals <<\EOF
16694 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16695 EOF
16696
16697 # Break up conftest.vals because some shells have a limit on
16698 # the size of here documents, and old seds have small limits too.
16699
16700 rm -f conftest.tail
16701 while :
16702 do
16703   ac_lines=`grep -c . conftest.vals`
16704   # grep -c gives empty output for an empty file on some AIX systems.
16705   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16706   # Write a limited-size here document to conftest.frag.
16707   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16708   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16709   echo 'CEOF
16710   sed -f conftest.frag conftest.in > conftest.out
16711   rm -f conftest.in
16712   mv conftest.out conftest.in
16713 ' >> $CONFIG_STATUS
16714   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16715   rm -f conftest.vals
16716   mv conftest.tail conftest.vals
16717 done
16718 rm -f conftest.vals
16719
16720 cat >> $CONFIG_STATUS <<\EOF
16721   rm -f conftest.frag conftest.h
16722   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16723   cat conftest.in >> conftest.h
16724   rm -f conftest.in
16725   if cmp -s $ac_file conftest.h 2>/dev/null; then
16726     echo "$ac_file is unchanged"
16727     rm -f conftest.h
16728   else
16729     # Remove last slash and all that follows it.  Not all systems have dirname.
16730       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16731       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16732       # The file is in a subdirectory.
16733       test ! -d "$ac_dir" && mkdir "$ac_dir"
16734     fi
16735     rm -f $ac_file
16736     mv conftest.h $ac_file
16737   fi
16738 fi; done
16739
16740 EOF
16741 cat >> $CONFIG_STATUS <<EOF
16742 CPP="$CPP"
16743  top_srcdir="$srcdir"
16744  MAKE_SUBDIR="$MAKE_SUBDIR"
16745
16746 EOF
16747 cat >> $CONFIG_STATUS <<\EOF
16748 for dir in . $MAKE_SUBDIR; do
16749   (
16750     cd $dir
16751     rm -f junk.c
16752     < Makefile.in \
16753       sed -e '/^# Generated/d' \
16754           -e 's%/\*\*/#.*%%' \
16755           -e 's/^ *# */#/' \
16756           -e '/^##/d' \
16757           -e '/^#/ {
16758 p
16759 d
16760 }'        \
16761           -e '/./ {
16762 s/\([\"]\)/\\\1/g
16763 s/^/"/
16764 s/$/"/
16765 }'  > junk.c;
16766
16767
16768
16769     echo creating $dir/Makefile
16770 $CPP -I. -I${top_srcdir}/src  junk.c \
16771   | sed -e 's/^\#.*//'          \
16772         -e 's/^[        ][      ]*$//'\
16773         -e 's/^ /       /'              \
16774         -e '/^[ \f]*$/d' \
16775         -e '/^\"/ {
16776         s/\\\([\"]\)/\1/g
16777         s/^[    ]*\"//
16778         s/\"[   ]*$//
16779 }' > Makefile.new
16780     chmod 444 Makefile.new
16781     mv -f Makefile.new Makefile
16782
16783     echo creating $dir/GNUmakefile
16784 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16785   | sed -e 's/^\#.*//'          \
16786         -e 's/^[        ][      ]*$//'\
16787         -e 's/^ /       /'              \
16788         -e '/^[ \f]*$/d' \
16789         -e '/^\"/ {
16790         s/\\\([\"]\)/\1/g
16791         s/^[    ]*\"//
16792         s/\"[   ]*$//
16793 }' > Makefile.new
16794     chmod 444 Makefile.new
16795     mv -f Makefile.new GNUmakefile
16796
16797     rm -f junk.c
16798   )
16799 done
16800
16801 sed < config.status >> lib-src/config.values \
16802   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16803   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16804   -e 's/^\([^ ]*\) $/\1 ""/' \
16805   -e 's/ 1$/ t/'
16806
16807
16808 exit 0
16809 EOF
16810 chmod +x $CONFIG_STATUS
16811 rm -fr confdefs* $ac_clean_files
16812 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1