8ea7848caf9dc8780d68f508a2c55d7c441dca44
[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, 2005 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_concord    | \
354         with_ldap       | \
355         with_postgresql | \
356         with_pop        | \
357         with_kerberos   | \
358         with_hesiod     | \
359         with_dnet       | \
360         with_infodock   | \
361         with_netinstall | \
362         with_ipv6_cname | \
363         external_widget | \
364         verbose         | \
365         extra_verbose   | \
366         usage_tracking  | \
367         use_union_type  | \
368         pdump           | \
369         debug           | \
370         use_assertions  | \
371         use_regex_malloc | \
372         memory_usage_stats | \
373         with_clash_detection | \
374         with_modules    | \
375         quick_build )
376                   case "$val" in
377             y | ye | yes )      val=yes ;;
378             n | no )            val=no  ;;
379             * ) (echo "$progname: Usage error:"
380 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
381 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
382           esac
383           eval "$opt=\"$val\"" ;;
384
385
386                         srcdir          | \
387         compiler        | \
388         cflags          | \
389         cpp             | \
390         cppflags        | \
391         libs            | \
392         ldflags         | \
393         cache_file      | \
394         native_sound_lib| \
395         site_lisp       | \
396         x_includes      | \
397         x_libraries     | \
398         site_includes   | \
399         site_libraries  | \
400         site_prefixes   | \
401         site_runtime_libraries )
402                   if test "$valomitted" = "yes" ; then
403                     if test "$#" = 0 ; then
404               (echo "$progname: Usage error:"
405 echo " " "The \`--$optname' option requires a value."
406 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
407             fi
408             val="$1"; shift
409           fi
410           eval "$opt=\"$val\""
411         ;;
412
413                 rel_alloc | \
414         with_dlmalloc | \
415         with_debug_malloc  | use_debug_malloc | \
416         with_system_malloc | use_system_malloc )
417           case "$val" in
418             y | ye | yes )      val=yes ;;
419             n | no )            val=no  ;;
420             d | de | def | defa | defau | defaul | default ) val=default ;;
421             * ) (echo "$progname: Usage error:"
422 echo " " "The \`--$optname' option requires one of these values:
423   \`yes', \`no', or \`default'."
424 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
425           esac
426           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
427           eval "$opt=\"$val\""
428         ;;
429
430                 "with_database" )
431           with_database_berkdb=no
432           with_database_dbm=no
433           with_database_gdbm=no
434           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
435             case "$x" in
436               no ) ;;
437               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
438               d | db | dbm )                               with_database_dbm=yes    ;;
439               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
440               * ) (echo "$progname: Usage error:"
441 echo " " "The \`--$optname' option value
442   must be either \`no' or a comma-separated list
443   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
444 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
445             esac
446           done
447           if test "$with_database_dbm"  = "yes" -a \
448                   "$with_database_gdbm" = "yes"; then
449           (echo "$progname: Usage error:"
450 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
451   with the \`--$optname' option."
452 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
453           fi
454         ;;
455
456                 "with_sound" )
457                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
458             case "$x" in
459                       n | no | non | none ) new_sdefault=no ;;
460               a | al | all | both ) new_sdefault=yes ;;
461
462               native )       with_native_sound=yes ;;
463               nonative )     with_native_sound=no ;;
464
465               nas )          with_nas_sound=yes ;;
466               nonas )        with_nas_sound=no ;;
467
468               esd )          with_esd_sound=yes ;;
469               noesd )        with_esd_sound=no ;;
470
471               * ) bogus_sound=yes ;;
472             esac
473             if test "$bogus_sound" -o \
474                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
475                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
476                 (echo "$progname: Usage error:"
477 echo " " "Valid types for the \`--$optname' option are:
478   $types.
479 Option \`all' or \`none' must be first in the list.
480 The default is to autodetect native and NAS sound support."
481 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
482             elif test -n "$new_sdefault" ; then
483                 with_native_sound=$new_sdefault
484                 with_nas_sound=$new_sdefault
485                 with_esd_sound=$new_sdefault
486                 new_sdefault=   # reset this
487             fi
488             sound_notfirst=true
489           done
490         ;;
491
492                         "with_athena" )
493           case "$val" in
494             xa | xaw )                    val=xaw    ;;
495             3 | 3d | xaw3d )              val=3d     ;;
496                         ne | nex | next | naxtaw)     val=next   ;;
497                         9 | 95 | xaw95 )              val=95     ;;
498             xp | xpm | xawxpm )           val=xpm    ;;
499             * ) (echo "$progname: Usage error:"
500 echo " " "The \`--$optname' option must have one of these values:
501   \`xaw', \`3d', \`next', \`95', or \`xpm'."
502 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
503           esac
504           eval "$opt=\"$val\""
505         ;;
506
507                 "with_xim" )
508           case "$val" in
509             y | ye | yes )                val=yes   ;;
510             n | no | non | none )         val=no    ;;
511             x | xl | xli | xlib )         val=xlib  ;;
512             m | mo | mot | moti | motif ) val=motif ;;
513             * ) (echo "$progname: Usage error:"
514 echo " " "The \`--$optname' option must have one of these values:
515   \`motif', \`xlib', \`yes', or \`no'."
516 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
517           esac
518           eval "$opt=\"$val\""
519         ;;
520
521                 "mail_locking" )
522           case "$val" in
523             lockf )     val=lockf ;;
524             flock )     val=flock ;;
525             file | dot ) val=file  ;;
526             locking )   val=locking  ;;
527             * ) (echo "$progname: Usage error:"
528 echo " " "The \`--$optname' option must have one of these values:
529   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
530 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
531           esac
532           eval "$opt=\"$val\""
533         ;;
534
535                 "error_checking" )
536                           
537           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
538             case "$x" in
539                       n | no | non | none ) new_default=no ;;
540               a | al | all )        new_default=yes ;;
541
542               extents )       error_check_extents=yes ;;
543               noextents )     error_check_extents=no ;;
544
545               typecheck )     error_check_typecheck=yes ;;
546               notypecheck )   error_check_typecheck=no ;;
547
548               bufpos )        error_check_bufpos=yes ;;
549               nobufpos )      error_check_bufpos=no ;;
550
551               gc )            error_check_gc=yes ;;
552               nogc )          error_check_gc=no ;;
553
554               malloc )        error_check_malloc=yes ;;
555               nomalloc )      error_check_malloc=no ;;
556
557               byte_code )     error_check_byte_code=yes ;;
558               nobyte_code )   error_check_byte_code=no ;;
559
560               glyphs )     error_check_glyphs=yes ;;
561               noglyphs )   error_check_glyphs=no ;;
562
563               * ) bogus_error_check=yes ;;
564             esac
565             if test "$bogus_error_check" -o \
566                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
567                 if test "$error_check_default" = yes ; then
568                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
569                 else
570                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
571                 fi
572                 (echo "$progname: Usage error:"
573 echo " " "Valid types for the \`--$optname' option are:
574   $types."
575 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
576             elif test -n "$new_default" ; then
577                 error_check_extents=$new_default
578                 error_check_typecheck=$new_default
579                 error_check_bufpos=$new_default
580                 error_check_gc=$new_default
581                 error_check_malloc=$new_default
582                 error_check_byte_code=$new_default
583                 error_check_glyphs=$new_default
584                 new_default=    # reset this
585             fi
586             echeck_notfirst=true
587           done
588         ;;
589
590                                 
591                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
592         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
593         archlibdir | docdir | package_path | moduledir )
594                    if test "$valomitted" = "yes"; then
595              if test "$#" = 0; then
596                  (echo "$progname: Usage error:"
597 echo " " "The \`--$optname' option requires a value."
598 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
599              fi
600              val="$1"; shift
601            fi
602            eval "$opt=\"$val\""
603
604                            case "$opt" in
605                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
606     Defining EXEC_PREFIX_USER_DEFINED
607 EOF
608 cat >> confdefs.h <<\EOF
609 #define EXEC_PREFIX_USER_DEFINED 1
610 EOF
611 }
612  ;;
613              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
614     Defining LISPDIR_USER_DEFINED
615 EOF
616 cat >> confdefs.h <<\EOF
617 #define LISPDIR_USER_DEFINED 1
618 EOF
619 }
620  ;;
621              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
622     Defining SITELISPDIR_USER_DEFINED
623 EOF
624 cat >> confdefs.h <<\EOF
625 #define SITELISPDIR_USER_DEFINED 1
626 EOF
627 }
628  ;;
629              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
630     Defining MODULEDIR_USER_DEFINED
631 EOF
632 cat >> confdefs.h <<\EOF
633 #define MODULEDIR_USER_DEFINED 1
634 EOF
635 }
636  ;;
637              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
638     Defining ETCDIR_USER_DEFINED
639 EOF
640 cat >> confdefs.h <<\EOF
641 #define ETCDIR_USER_DEFINED 1
642 EOF
643 }
644  ;;
645              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
646     Defining INFODIR_USER_DEFINED
647 EOF
648 cat >> confdefs.h <<\EOF
649 #define INFODIR_USER_DEFINED 1
650 EOF
651 }
652  ;;
653              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
654     Defining INFOPATH_USER_DEFINED
655 EOF
656 cat >> confdefs.h <<\EOF
657 #define INFOPATH_USER_DEFINED 1
658 EOF
659 }
660  ;;
661              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining PACKAGE_PATH_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define PACKAGE_PATH_USER_DEFINED 1
666 EOF
667 }
668  ;;
669              datadir )
670                 { test "$extra_verbose" = "yes" && cat << \EOF
671     Defining INFODIR_USER_DEFINED
672 EOF
673 cat >> confdefs.h <<\EOF
674 #define INFODIR_USER_DEFINED 1
675 EOF
676 }
677
678                 { test "$extra_verbose" = "yes" && cat << \EOF
679     Defining LISPDIR_USER_DEFINED
680 EOF
681 cat >> confdefs.h <<\EOF
682 #define LISPDIR_USER_DEFINED 1
683 EOF
684 }
685
686                 { test "$extra_verbose" = "yes" && cat << \EOF
687     Defining MODULEDIR_USER_DEFINED
688 EOF
689 cat >> confdefs.h <<\EOF
690 #define MODULEDIR_USER_DEFINED 1
691 EOF
692 }
693
694                 { test "$extra_verbose" = "yes" && cat << \EOF
695     Defining ETCDIR_USER_DEFINED
696 EOF
697 cat >> confdefs.h <<\EOF
698 #define ETCDIR_USER_DEFINED 1
699 EOF
700 }
701
702                 { test "$extra_verbose" = "yes" && cat << \EOF
703     Defining DOCDIR_USER_DEFINED
704 EOF
705 cat >> confdefs.h <<\EOF
706 #define DOCDIR_USER_DEFINED 1
707 EOF
708 }
709
710                 { test "$extra_verbose" = "yes" && cat << \EOF
711     Defining ARCHLIBDIR_USER_DEFINED
712 EOF
713 cat >> confdefs.h <<\EOF
714 #define ARCHLIBDIR_USER_DEFINED 1
715 EOF
716 }
717  ;;
718              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
719     Defining DOCDIR_USER_DEFINED
720 EOF
721 cat >> confdefs.h <<\EOF
722 #define DOCDIR_USER_DEFINED 1
723 EOF
724 }
725  ;;
726              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
727     Defining ARCHLIBDIR_USER_DEFINED
728 EOF
729 cat >> confdefs.h <<\EOF
730 #define ARCHLIBDIR_USER_DEFINED 1
731 EOF
732 }
733  ;;
734            esac
735         ;;
736
737                 "no_create" ) ;;
738
739                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
740
741                 "with_menubars"   | \
742         "with_scrollbars" | \
743         "with_dialogs"    | \
744         "with_widgets" )
745           case "$val" in
746             l | lu | luc | luci | lucid )               val=lucid  ;;
747             mo | mot | moti | motif )                   val=motif  ;;
748             a | at | ath | athe | athen | athena )      val=athena ;;
749             n | no | non | none )                       val=no     ;;
750             y | ye | yes )                              val=yes    ;;
751                         "")                                             val=yes    ;;
752             g | gt | gtk )                              val=gtk    ;;
753             ms | msw )                                  val=msw    ;;
754             * ) (echo "$progname: Usage error:"
755 echo " " "The \`--$optname' option must have one of these values:
756   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
757 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
758           esac
759           eval "$opt=\"$val\""
760         ;;
761
762                 "use_minimal_tagbits" | \
763         "use_indexed_lrecord_implementation" | \
764         "run_in_place"  | \
765         "const_is_losing" | \
766         "with_gnu_make" )
767           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
768         ;;
769
770                 * ) (echo "$progname: Usage error:"
771 echo " " "Unrecognized option: $arg"
772 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
773
774       esac
775     ;;
776
777         *-*-*) configuration="$arg" ;;
778
779         *) (echo "$progname: Usage error:"
780 echo " " "Unrecognized argument: $arg"
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
782
783   esac
784 done
785
786
787 test -n "$cpp"      && CPP="$cpp"
788 test -n "$cppflags" && CPPFLAGS="$cppflags"
789 test -n "$libs"     && LIBS="$libs"
790 test -n "$ldflags"  && LDFLAGS="$ldflags"
791
792 eval set x "$quoted_arguments"; shift
793
794 test "$extra_verbose" = "yes" && verbose=yes
795
796 test -n "$with_x" && with_x11="$with_x"
797
798 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
799   test "$with_system_malloc" = "default" && with_system_malloc=yes
800 fi
801
802
803
804 if test "$with_cde $with_tooltalk" = "yes no"; then
805   (echo "$progname: Usage error:"
806 echo " " "--with-cde requires --with-tooltalk"
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808 elif test "$with_tooltalk" = "no" ; then with_cde=no
809 elif test "$with_cde" = "yes"; then with_tooltalk=yes
810 fi
811
812
813 case "$srcdir" in
814
815     "" )
816     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
817       if test -f "$dir/src/lisp.h" -a \
818               -f "$dir/lisp/version.el" ; then
819         srcdir="$dir"
820         break
821       fi
822     done
823     if test -z "$srcdir" ; then
824       (echo "$progname: Usage error:"
825 echo " " "Neither the current directory nor its parent seem to
826   contain the XEmacs sources.  If you do not want to build XEmacs in its
827   source tree, you should run \`$progname' in the directory in which
828   you wish to build XEmacs, using the \`--srcdir' option to say where the
829   sources may be found."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831     fi
832   ;;
833
834     * )
835     if test ! -f "$srcdir/src/lisp.h" -o \
836             ! -f "$srcdir/lisp/version.el" ; then
837       (echo "$progname: Usage error:"
838 echo " " "The directory specified with the \`--srcdir' option,
839   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
840   either run the \`$progname' script at the top of the XEmacs source
841   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
842 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
843     fi
844   ;;
845 esac
846
847 if test -z "$configuration"; then
848     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
849   if test -z "$configuration"; then
850     (echo "$progname: Usage error:"
851 echo " " "XEmacs has not been ported to this host type.
852 Try explicitly specifying the CONFIGURATION when rerunning configure."
853 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
854   fi
855 fi
856
857 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
858 echo "configure:859: checking whether ln -s works" >&5
859
860 rm -f conftestdata
861 if ln -s X conftestdata 2>/dev/null
862 then
863   rm -f conftestdata
864   ac_cv_prog_LN_S="ln -s"
865 else
866   ac_cv_prog_LN_S=ln
867 fi
868 LN_S="$ac_cv_prog_LN_S"
869 if test "$ac_cv_prog_LN_S" = "ln -s"; then
870   echo "$ac_t""yes" 1>&6
871 else
872   echo "$ac_t""no" 1>&6
873 fi
874
875
876 for dir in lisp etc man info tests; do
877   if test ! -d "$dir" ; then
878     echo Making symbolic link to "$srcdir/$dir"
879     ${LN_S} "$srcdir/$dir" "$dir"
880   fi
881 done
882
883
884 absolute_pwd="`pwd`";
885 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
886 then blddir="$PWD"
887 else blddir="$absolute_pwd"; if test -d "/net"; then
888   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
889   blddir=`echo "$blddir" | \
890    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
891 fi
892 fi
893
894
895 case "$srcdir" in
896   /* ) ;;
897   .  ) srcdir="$blddir" ;;
898   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
899   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
900   srcdir=`echo "$srcdir" | \
901    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
902 fi ;;
903 esac
904
905 if test `pwd` != `sh -c cd $srcdir && pwd`  \
906    && test -f "$srcdir/src/config.h"; then
907   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
908    echo "   as a build directory right now; it has been configured in its own"
909    echo "   right.  To configure in another directory as well, you MUST"
910    echo "   use GNU make.  If you do not have GNU make, then you must"
911    echo "   now do \`make distclean' in $srcdir,"
912    echo "   and then run $progname again.") >&2
913   extrasub='/^VPATH[     ]*=/c\
914 vpath %.c $(srcdir)\
915 vpath %.h $(srcdir)\
916 vpath %.y $(srcdir)\
917 vpath %.l $(srcdir)\
918 vpath %.s $(srcdir)\
919 vpath %.in $(srcdir)'
920 fi
921
922 . "$srcdir/version.sh" || exit 1;
923 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
924 : "${extra_verbose=$beta}"
925 version="${emacs_major_version}.${emacs_minor_version}"
926 { test "$extra_verbose" = "yes" && cat << EOF
927     Defining EMACS_MAJOR_VERSION = $emacs_major_version
928 EOF
929 cat >> confdefs.h <<EOF
930 #define EMACS_MAJOR_VERSION $emacs_major_version
931 EOF
932 }
933
934 { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_MINOR_VERSION = $emacs_minor_version
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_MINOR_VERSION $emacs_minor_version
939 EOF
940 }
941
942 if test -n "$emacs_beta_version" ; then
943   if test "$beta" = "yes"; then
944         version="${version}-b${emacs_beta_version}"
945         { test "$extra_verbose" = "yes" && cat << EOF
946     Defining EMACS_BETA_VERSION = $emacs_beta_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define EMACS_BETA_VERSION $emacs_beta_version
950 EOF
951 }
952
953   else
954         version="${version}.${emacs_beta_version}"
955         { test "$extra_verbose" = "yes" && cat << EOF
956     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
957 EOF
958 cat >> confdefs.h <<EOF
959 #define EMACS_PATCH_LEVEL $emacs_beta_version
960 EOF
961 }
962
963   fi
964 fi
965 { test "$extra_verbose" = "yes" && cat << EOF
966     Defining XEMACS_CODENAME = "$xemacs_codename"
967 EOF
968 cat >> confdefs.h <<EOF
969 #define XEMACS_CODENAME "$xemacs_codename"
970 EOF
971 }
972
973 { test "$extra_verbose" = "yes" && cat << EOF
974     Defining EMACS_VERSION = "$version"
975 EOF
976 cat >> confdefs.h <<EOF
977 #define EMACS_VERSION "$version"
978 EOF
979 }
980
981
982 if test "$with_infodock" = "yes"; then
983   if test ! -f ../../ID-INSTALL; then
984     echo "Cannot build InfoDock without InfoDock sources"
985     with_infodock=no
986   fi
987 fi
988
989 if test "$with_infodock" = "yes"; then
990       { test "$extra_verbose" = "yes" && cat << EOF
991     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
992 EOF
993 cat >> confdefs.h <<EOF
994 #define INFODOCK_MAJOR_VERSION $infodock_major_version
995 EOF
996 }
997
998   { test "$extra_verbose" = "yes" && cat << EOF
999     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
1000 EOF
1001 cat >> confdefs.h <<EOF
1002 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1003 EOF
1004 }
1005
1006   { test "$extra_verbose" = "yes" && cat << EOF
1007     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1008 EOF
1009 cat >> confdefs.h <<EOF
1010 #define INFODOCK_BUILD_VERSION $infodock_build_version
1011 EOF
1012 }
1013
1014   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1015   PROGNAME=infodock
1016   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1017 else
1018   PROGNAME=xemacs
1019 fi
1020
1021 { test "$extra_verbose" = "yes" && cat << EOF
1022     Defining EMACS_PROGNAME = "$PROGNAME"
1023 EOF
1024 cat >> confdefs.h <<EOF
1025 #define EMACS_PROGNAME "$PROGNAME"
1026 EOF
1027 }
1028
1029
1030 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1031 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_EXTENTS
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_EXTENTS 1
1036 EOF
1037 }
1038
1039 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_TYPECHECK
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_TYPECHECK 1
1044 EOF
1045 }
1046
1047 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1048     Defining ERROR_CHECK_BUFPOS
1049 EOF
1050 cat >> confdefs.h <<\EOF
1051 #define ERROR_CHECK_BUFPOS 1
1052 EOF
1053 }
1054
1055 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining ERROR_CHECK_GC
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define ERROR_CHECK_GC 1
1060 EOF
1061 }
1062
1063 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1064     Defining ERROR_CHECK_MALLOC
1065 EOF
1066 cat >> confdefs.h <<\EOF
1067 #define ERROR_CHECK_MALLOC 1
1068 EOF
1069 }
1070
1071 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1072     Defining ERROR_CHECK_BYTE_CODE
1073 EOF
1074 cat >> confdefs.h <<\EOF
1075 #define ERROR_CHECK_BYTE_CODE 1
1076 EOF
1077 }
1078
1079 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1080     Defining ERROR_CHECK_GLYPHS
1081 EOF
1082 cat >> confdefs.h <<\EOF
1083 #define ERROR_CHECK_GLYPHS 1
1084 EOF
1085 }
1086
1087 if test "${debug:=$beta}" = "yes"; then
1088   use_assertions=yes memory_usage_stats=yes
1089   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1090    echo "    xemacs will be linked with \"debug.o\""
1091  fi
1092   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1093    echo "    xemacs will be linked with \"tests.o\""
1094  fi
1095   { test "$extra_verbose" = "yes" && cat << \EOF
1096     Defining DEBUG_XEMACS
1097 EOF
1098 cat >> confdefs.h <<\EOF
1099 #define DEBUG_XEMACS 1
1100 EOF
1101 }
1102
1103 fi
1104 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1105     Defining USE_ASSERTIONS
1106 EOF
1107 cat >> confdefs.h <<\EOF
1108 #define USE_ASSERTIONS 1
1109 EOF
1110 }
1111
1112 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1113     Defining MEMORY_USAGE_STATS
1114 EOF
1115 cat >> confdefs.h <<\EOF
1116 #define MEMORY_USAGE_STATS 1
1117 EOF
1118 }
1119
1120
1121
1122 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1123 echo "configure:1124: checking "host system type"" >&5
1124 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1125 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1126 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1127 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1128 echo "$ac_t""$configuration" 1>&6
1129
1130
1131
1132
1133
1134 machine='' opsys=''
1135
1136 case "$canonical" in
1137   sparc-*-*        ) machine=sparc ;;
1138   alpha*-*-*       ) machine=alpha ;;
1139   vax-*-*          ) machine=vax ;;
1140   mips-dec-*       ) machine=pmax ;;
1141   mips-sgi-irix6*  ) machine=iris6d ;;
1142   mips-sgi-*       ) machine=iris4d ;;
1143   mips*-linux      ) machine=mips ;;
1144   romp-ibm-*       ) machine=ibmrt ;;
1145   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1146   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1147   powerpc*-*       ) machine=powerpc ;;
1148   hppa-*-*         ) machine=hp800 ;;
1149   m88k-dg-*        ) machine=aviion ;;
1150   m68*-sony-*      ) machine=news ;;
1151   mips-sony-*      ) machine=news-risc ;;
1152   clipper-*        ) machine=clipper ;;
1153   arm*             ) machine=arm ;;
1154   ns32k-*          ) machine=ns32000 ;;
1155 esac
1156
1157 case "$canonical" in
1158   *-*-linux*    ) opsys=linux ;;
1159   *-*-netbsd*   ) opsys=netbsd ;;
1160   *-*-openbsd*  ) opsys=openbsd ;;
1161   *-*-nextstep* ) opsys=nextstep ;;
1162   *-*-vms       ) opsys=vms ;;
1163
1164     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1165   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1166   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1167   *-dec-osf3*                ) opsys=decosf3-1 ;;
1168   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1169
1170     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1171   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1172   *-*-ultrix* )         opsys=ultrix4-3 ;;
1173
1174     *-*-aix3.1*     ) opsys=aix3-1   ;;
1175   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1176   *-*-aix3*       ) opsys=aix3-2   ;;
1177   *-*-aix4.0*     ) opsys=aix4     ;;
1178   *-*-aix4.1*     ) opsys=aix4-1   ;;
1179   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1180
1181     *-gnu* )                    opsys=gnu    ;;
1182   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1183   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1184   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1185   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1186   *-*-aos*   )                  opsys=bsd4-3 ;;
1187   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1188   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1189   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1190   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1191   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1192   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1193         if test -z "$NON_GNU_CPP" ; then
1194           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1195             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1196           done
1197         fi
1198         opsys=usg5-4-2 ;;
1199     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1200     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1201 esac
1202
1203 case "$canonical" in
1204
1205     *-*-netbsd* )
1206     case "$canonical" in
1207       i[3-9]86-*-netbsd*) machine=intel386 ;;
1208       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1209                                             machine=hp9000s300 ;;
1210       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1211       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1212     esac
1213   ;;
1214
1215     *-*-openbsd* )
1216     case "${canonical}" in
1217       i386-*-openbsd*)          machine=intel386 ;;
1218       m68k-*-openbsd*)          machine=hp9000s300 ;;
1219       mipsel-*-openbsd*)        machine=pmax ;;
1220      esac
1221    ;;
1222
1223     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1224   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1225
1226     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1227   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1228
1229     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1230
1231     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1232
1233     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1234
1235     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1236
1237     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1238
1239     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1240   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1241   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1242
1243   
1244     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1245
1246     *-convex-bsd* | *-convex-convexos* )
1247     machine=convex opsys=bsd4-3
1248     NON_GNU_CPP="cc -E -P"
1249   ;;
1250
1251     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1252
1253     *-*-darwin*)
1254     opsys=darwin
1255     RANLIB="ranlib -c"     ;;
1256
1257     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1258   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1259   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1260   m88k-dg-dgux*                           ) opsys=dgux     ;;
1261
1262     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1263   m88k-motorola-sysv4* )
1264                     machine=delta88k opsys=usg5-4-2
1265   ;;
1266   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1267
1268     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1269   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1270
1271     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1272
1273     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1274   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1275   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1276
1277       m88k-harris-cxux* )
1278         case "`uname -r`" in
1279        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1280        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1281     esac
1282     NON_GNU_CPP="/lib/cpp"
1283   ;;
1284     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1285     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1286
1287     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1288
1289     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1290
1291     *-hp-hpux* )
1292         case "$canonical" in
1293       m68*  ) machine=hp9000s300 ;;
1294       hppa* ) machine=hp800      ;;
1295     esac
1296
1297     case "$canonical" in
1298       *-hp-hpux7*  )  opsys=hpux   ;;
1299       *-hp-hpux8*  )  opsys=hpux8  ;;
1300       *-hp-hpux9*  )  opsys=hpux9  ;;
1301       *-hp-hpux10* )  opsys=hpux10 ;;
1302       *-hp-hpux11* )  opsys=hpux11 ;;
1303       *            )  opsys=hpux   ;;
1304     esac
1305
1306         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1307    echo "    xemacs will be linked with \"strcat.o\""
1308  fi ;; esac
1309
1310     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1311         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1312     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1313
1314     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1315   ;;
1316
1317     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1318   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1319
1320     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1321   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1322   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1323   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1324   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1325   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1326
1327     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1328   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1329
1330     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1331
1332     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1333
1334     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1335
1336     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1337
1338       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1339
1340     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1341
1342     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1343
1344     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1345
1346     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1347
1348         mips-mips-usg* ) machine=mips4 ;;
1349   mips-mips-riscos4 )
1350     machine=mips4
1351     NON_GNU_CC="cc -systype bsd43"
1352     NON_GNU_CPP="cc -systype bsd43 -E"
1353     case "$canonical" in
1354       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1355       mips-mips-riscos5* ) opsys=riscos5 ;;
1356     esac
1357   ;;
1358   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1359   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1360
1361     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1362
1363     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1364
1365     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1366   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1367
1368     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1369
1370     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1371
1372     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1373
1374     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1375
1376     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1377   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1378
1379     mips-siemens-sysv* | mips-sni-sysv*)
1380     machine=mips-siemens opsys=usg5-4
1381     NON_GNU_CC=/usr/ccs/bin/cc
1382     NON_GNU_CPP=/usr/ccs/lib/cpp
1383   ;;
1384
1385     mips-nec-sysv*)
1386     machine=mips-nec
1387     NON_GNU_CC=/usr/ccs/bin/cc
1388     NON_GNU_CPP=/usr/ccs/lib/cpp
1389   ;;
1390
1391       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1392   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1393     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1394   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1395   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1396   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1397   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1398   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1399   mips-sgi-irix*      ) opsys=irix5-0 ;;
1400
1401     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1402   *-sony-news* ) opsys=newsos5 ;;
1403
1404     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1405
1406     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1407         case "$canonical" in
1408       m68*-sunos1* )             machine=sun1     ;;
1409       m68*-sunos2* )             machine=sun2     ;;
1410       m68* )                     machine=sun3     ;;
1411       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1412       i*86-*-* )                 machine=intel386 ;;
1413       rs6000* )                  machine=rs6000   ;;
1414     esac
1415
1416         case "$canonical" in *-sunos5*)
1417       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1418     esac
1419
1420                     case "$canonical" in
1421       *-sunos4* )
1422         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1423         : ;;
1424       *-solaris2* )
1425         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1426         RANLIB=':' ;;
1427     esac
1428
1429     case "$canonical" in
1430       *-solaris* )
1431         opsys=sol2
1432         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1433         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1434         case "$os_release_minor" in [0-9])
1435           os_release_minor="0${os_release_minor}";;
1436         esac
1437         os_release="${os_release_major}${os_release_minor}"
1438         { test "$extra_verbose" = "yes" && cat << EOF
1439     Defining OS_RELEASE = $os_release
1440 EOF
1441 cat >> confdefs.h <<EOF
1442 #define OS_RELEASE $os_release
1443 EOF
1444 }
1445  ;;
1446
1447             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1448       *-sunos4.0*         ) opsys=sunos4-0      ;;
1449       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1450       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1451       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1452       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1453       *-mach*             ) opsys=mach-bsd4-3   ;;
1454       *                   ) opsys=bsd4-2        ;;
1455     esac
1456
1457     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1458
1459         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1460   ;;
1461
1462     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1463
1464     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1465   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1466
1467     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1468
1469     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1470
1471     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1472       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1473
1474     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1475
1476     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1477
1478     vax-dec-* )
1479     case "$canonical" in
1480       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1481       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1482       *-mach* )                         opsys=mach-bsd4-3 ;;
1483     esac
1484   ;;
1485
1486     ns16k-whitechapel-* ) machine=mg1 ;;
1487
1488     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1489
1490     i[3-9]86-*-* )
1491     machine=intel386
1492     case "$canonical" in
1493       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1494       *-isc2.2* )               opsys=isc2-2 ;;
1495       *-isc4.0* )               opsys=isc4-0 ;;
1496       *-isc4.* )                opsys=isc4-1
1497                                 GCC_TEST_OPTIONS=-posix
1498                                 NON_GCC_TEST_OPTIONS=-Xp
1499                                 ;;
1500       *-isc* )                  opsys=isc3-0 ;;
1501       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1502       *-esix* )                 opsys=esix ;;
1503       *-mach* )                 opsys=mach-bsd4-3 ;;
1504       *-xenix* )                opsys=xenix ;;
1505       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1506       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1507       *-bsdi4* )                opsys=bsdos4 ;;
1508       *-bsdi3* )                opsys=bsdos3 ;;
1509       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1510       *-bsdi2* )                opsys=bsdos2 ;;
1511       *-sco3.2v5* )             opsys=sco5 ;;
1512       *-sysv5* )                opsys=sco7 ;;
1513       *-386bsd* )               opsys=386bsd ;;
1514       *-freebsd* )              opsys=freebsd ;;
1515       *-nextstep* )             opsys=nextstep ;;
1516       *-pc-cygwin* )            opsys=cygwin32 ;;
1517       *-pc-mingw* )             opsys=mingw32 ;
1518                                 test -z "$with_tty" && with_tty="no";;
1519           esac
1520   ;;
1521
1522     m68k-*-linux* ) machine=m68k opsys=linux ;;
1523
1524 esac
1525
1526 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1527
1528 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1529
1530 if test -r "${srcdir}/src/m/${machine}.h"; then
1531   machfile="m/${machine}.h"
1532   { test "$extra_verbose" = "yes" && cat << EOF
1533     Defining config_machfile = "$machfile"
1534 EOF
1535 cat >> confdefs.h <<EOF
1536 #define config_machfile "$machfile"
1537 EOF
1538 }
1539
1540 else
1541   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1542   echo "Using configure-time autodetection only."
1543 fi
1544
1545 if test -r "${srcdir}/src/s/${opsys}.h"; then
1546   opsysfile="s/${opsys}.h"
1547   { test "$extra_verbose" = "yes" && cat << EOF
1548     Defining config_opsysfile = "$opsysfile"
1549 EOF
1550 cat >> confdefs.h <<EOF
1551 #define config_opsysfile "$opsysfile"
1552 EOF
1553 }
1554
1555 else
1556   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1557   echo "Using configure-time autodetection only."
1558 fi
1559
1560
1561 if test -z "$pdump"; then
1562   case "$opsys" in
1563     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        cygwin* ) pdump=yes ;;        *)        pdump=no ;;
1564   esac
1565 fi
1566
1567 if test -z "$dynamic"; then
1568   case "$opsys" in
1569     hpux* | sunos4* ) dynamic=no ;;
1570     *) dynamic=yes ;;
1571   esac
1572 fi
1573 if test "$dynamic" = "yes"; then
1574   case "$opsys" in
1575     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1576     decosf* ) ld_call_shared="-call_shared" ;;
1577     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1578     Defining DLSYM_NEEDS_UNDERSCORE
1579 EOF
1580 cat >> confdefs.h <<\EOF
1581 #define DLSYM_NEEDS_UNDERSCORE 1
1582 EOF
1583 }
1584  ;;
1585   esac
1586 else   case "$opsys" in
1587     sol2 )
1588       echo "Static linking is not supported on Solaris 2."
1589       echo "Rerun configure without specifying --dynamic=no."
1590       exit 1 ;;
1591     linux   ) ld_call_shared="-Bstatic" ;;
1592     decosf* ) ld_call_shared="-non_shared" ;;
1593   esac
1594 fi
1595
1596 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1597
1598 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1599 { test "$extra_verbose" = "yes" && cat << EOF
1600     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1601 EOF
1602 cat >> confdefs.h <<EOF
1603 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1604 EOF
1605 }
1606
1607
1608
1609 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1610 if test "$with_workshop $with_tooltalk" = "yes no"; then
1611   (echo "$progname: Usage error:"
1612 echo " " "--with-workshop requires --with-tooltalk"
1613 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1614 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1615 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1616 fi
1617
1618 if test "$with_workshop" = "yes"; then
1619   { test "$extra_verbose" = "yes" && cat << \EOF
1620     Defining SUNPRO
1621 EOF
1622 cat >> confdefs.h <<\EOF
1623 #define SUNPRO 1
1624 EOF
1625 }
1626
1627   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1628    echo "    xemacs will be linked with \"sunpro.o\""
1629  fi
1630 fi
1631
1632 if test "$with_clash_detection" != "no"; then
1633   { test "$extra_verbose" = "yes" && cat << \EOF
1634     Defining CLASH_DETECTION
1635 EOF
1636 cat >> confdefs.h <<\EOF
1637 #define CLASH_DETECTION 1
1638 EOF
1639 }
1640
1641   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1642    echo "    xemacs will be linked with \"filelock.o\""
1643  fi
1644 fi
1645
1646 test -n "$compiler" && CC="$compiler"
1647 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1648 fi
1649
1650 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1651 if test "${CFLAGS-unset}" != unset
1652   then cflags_specified=yes;
1653   else cflags_specified=no;
1654 fi
1655
1656 xe_save_CFLAGS="$CFLAGS"
1657
1658 # Extract the first word of "gcc", so it can be a program name with args.
1659 set dummy gcc; ac_word=$2
1660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1661 echo "configure:1662: checking for $ac_word" >&5
1662
1663 if test -n "$CC"; then
1664   ac_cv_prog_CC="$CC" # Let the user override the test.
1665 else
1666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1667   ac_dummy="$PATH"
1668   for ac_dir in $ac_dummy; do
1669     test -z "$ac_dir" && ac_dir=.
1670     if test -f $ac_dir/$ac_word; then
1671       ac_cv_prog_CC="gcc"
1672       break
1673     fi
1674   done
1675   IFS="$ac_save_ifs"
1676 fi
1677 CC="$ac_cv_prog_CC"
1678 if test -n "$CC"; then
1679   echo "$ac_t""$CC" 1>&6
1680 else
1681   echo "$ac_t""no" 1>&6
1682 fi
1683
1684 if test -z "$CC"; then
1685   # Extract the first word of "cc", so it can be a program name with args.
1686 set dummy cc; ac_word=$2
1687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_word" >&5
1689
1690 if test -n "$CC"; then
1691   ac_cv_prog_CC="$CC" # Let the user override the test.
1692 else
1693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1694   ac_prog_rejected=no
1695   ac_dummy="$PATH"
1696   for ac_dir in $ac_dummy; do
1697     test -z "$ac_dir" && ac_dir=.
1698     if test -f $ac_dir/$ac_word; then
1699       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1700         ac_prog_rejected=yes
1701         continue
1702       fi
1703       ac_cv_prog_CC="cc"
1704       break
1705     fi
1706   done
1707   IFS="$ac_save_ifs"
1708 if test $ac_prog_rejected = yes; then
1709   # We found a bogon in the path, so make sure we never use it.
1710   set dummy $ac_cv_prog_CC
1711   shift
1712   if test $# -gt 0; then
1713     # We chose a different compiler from the bogus one.
1714     # However, it has the same basename, so the bogon will be chosen
1715     # first if we set CC to just the basename; use the full file name.
1716     shift
1717     set dummy "$ac_dir/$ac_word" "$@"
1718     shift
1719     ac_cv_prog_CC="$@"
1720   fi
1721 fi
1722 fi
1723 CC="$ac_cv_prog_CC"
1724 if test -n "$CC"; then
1725   echo "$ac_t""$CC" 1>&6
1726 else
1727   echo "$ac_t""no" 1>&6
1728 fi
1729
1730   if test -z "$CC"; then
1731     case "`uname -s`" in
1732     *win32* | *WIN32*)
1733       # Extract the first word of "cl", so it can be a program name with args.
1734 set dummy cl; ac_word=$2
1735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1736 echo "configure:1737: checking for $ac_word" >&5
1737
1738 if test -n "$CC"; then
1739   ac_cv_prog_CC="$CC" # Let the user override the test.
1740 else
1741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1742   ac_dummy="$PATH"
1743   for ac_dir in $ac_dummy; do
1744     test -z "$ac_dir" && ac_dir=.
1745     if test -f $ac_dir/$ac_word; then
1746       ac_cv_prog_CC="cl"
1747       break
1748     fi
1749   done
1750   IFS="$ac_save_ifs"
1751 fi
1752 CC="$ac_cv_prog_CC"
1753 if test -n "$CC"; then
1754   echo "$ac_t""$CC" 1>&6
1755 else
1756   echo "$ac_t""no" 1>&6
1757 fi
1758  ;;
1759     esac
1760   fi
1761   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1762 fi
1763
1764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1765 echo "configure:1766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1766
1767 ac_ext=c
1768 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1769 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1770 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'
1771 ac_cpp='$CPP '"$xe_cppflags"
1772 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1773 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1774 cross_compiling=no
1775
1776 cat > conftest.$ac_ext << EOF
1777
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780
1781 main(){return(0);}
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784   ac_cv_prog_cc_works=yes
1785   # If we can't run a trivial program, we are probably using a cross compiler.
1786   if (./conftest; exit) 2>/dev/null; then
1787     ac_cv_prog_cc_cross=no
1788   else
1789     ac_cv_prog_cc_cross=yes
1790   fi
1791 else
1792   echo "configure: failed program was:" >&5
1793   cat conftest.$ac_ext >&5
1794   ac_cv_prog_cc_works=no
1795 fi
1796 rm -fr conftest*
1797 ac_ext=c
1798 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1799 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1800 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'
1801 ac_cpp='$CPP '"$xe_cppflags"
1802 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1803 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1804 cross_compiling=no
1805
1806 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1807 if test $ac_cv_prog_cc_works = no; then
1808   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1809 fi
1810 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1811 echo "configure:1812: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1812 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1813 cross_compiling=$ac_cv_prog_cc_cross
1814
1815 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1816 echo "configure:1817: checking whether we are using GNU C" >&5
1817
1818 cat > conftest.c <<EOF
1819 #ifdef __GNUC__
1820   yes;
1821 #endif
1822 EOF
1823 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1824   ac_cv_prog_gcc=yes
1825 else
1826   ac_cv_prog_gcc=no
1827 fi
1828
1829 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1830
1831 if test $ac_cv_prog_gcc = yes; then
1832   GCC=yes
1833 else
1834   GCC=
1835 fi
1836
1837 ac_test_CFLAGS="${CFLAGS+set}"
1838 ac_save_CFLAGS="$CFLAGS"
1839 CFLAGS=
1840 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1841 echo "configure:1842: checking whether ${CC-cc} accepts -g" >&5
1842
1843 echo 'void f(){}' > conftest.c
1844 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1845   ac_cv_prog_cc_g=yes
1846 else
1847   ac_cv_prog_cc_g=no
1848 fi
1849 rm -f conftest*
1850
1851
1852 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1853 if test "$ac_test_CFLAGS" = set; then
1854   CFLAGS="$ac_save_CFLAGS"
1855 elif test $ac_cv_prog_cc_g = yes; then
1856   if test "$GCC" = yes; then
1857     CFLAGS="-g -O2"
1858   else
1859     CFLAGS="-g"
1860   fi
1861 else
1862   if test "$GCC" = yes; then
1863     CFLAGS="-O2"
1864   else
1865     CFLAGS=
1866   fi
1867 fi
1868  
1869 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1870   CC=${NON_GNU_CC-cc}
1871   # Extract the first word of "gcc", so it can be a program name with args.
1872 set dummy gcc; ac_word=$2
1873 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1874 echo "configure:1875: checking for $ac_word" >&5
1875
1876 if test -n "$CC"; then
1877   ac_cv_prog_CC="$CC" # Let the user override the test.
1878 else
1879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1880   ac_dummy="$PATH"
1881   for ac_dir in $ac_dummy; do
1882     test -z "$ac_dir" && ac_dir=.
1883     if test -f $ac_dir/$ac_word; then
1884       ac_cv_prog_CC="gcc"
1885       break
1886     fi
1887   done
1888   IFS="$ac_save_ifs"
1889 fi
1890 CC="$ac_cv_prog_CC"
1891 if test -n "$CC"; then
1892   echo "$ac_t""$CC" 1>&6
1893 else
1894   echo "$ac_t""no" 1>&6
1895 fi
1896
1897 if test -z "$CC"; then
1898   # Extract the first word of "cc", so it can be a program name with args.
1899 set dummy cc; ac_word=$2
1900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1901 echo "configure:1902: checking for $ac_word" >&5
1902
1903 if test -n "$CC"; then
1904   ac_cv_prog_CC="$CC" # Let the user override the test.
1905 else
1906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1907   ac_prog_rejected=no
1908   ac_dummy="$PATH"
1909   for ac_dir in $ac_dummy; do
1910     test -z "$ac_dir" && ac_dir=.
1911     if test -f $ac_dir/$ac_word; then
1912       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1913         ac_prog_rejected=yes
1914         continue
1915       fi
1916       ac_cv_prog_CC="cc"
1917       break
1918     fi
1919   done
1920   IFS="$ac_save_ifs"
1921 if test $ac_prog_rejected = yes; then
1922   # We found a bogon in the path, so make sure we never use it.
1923   set dummy $ac_cv_prog_CC
1924   shift
1925   if test $# -gt 0; then
1926     # We chose a different compiler from the bogus one.
1927     # However, it has the same basename, so the bogon will be chosen
1928     # first if we set CC to just the basename; use the full file name.
1929     shift
1930     set dummy "$ac_dir/$ac_word" "$@"
1931     shift
1932     ac_cv_prog_CC="$@"
1933   fi
1934 fi
1935 fi
1936 CC="$ac_cv_prog_CC"
1937 if test -n "$CC"; then
1938   echo "$ac_t""$CC" 1>&6
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942
1943   if test -z "$CC"; then
1944     case "`uname -s`" in
1945     *win32* | *WIN32*)
1946       # Extract the first word of "cl", so it can be a program name with args.
1947 set dummy cl; ac_word=$2
1948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1949 echo "configure:1950: checking for $ac_word" >&5
1950
1951 if test -n "$CC"; then
1952   ac_cv_prog_CC="$CC" # Let the user override the test.
1953 else
1954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1955   ac_dummy="$PATH"
1956   for ac_dir in $ac_dummy; do
1957     test -z "$ac_dir" && ac_dir=.
1958     if test -f $ac_dir/$ac_word; then
1959       ac_cv_prog_CC="cl"
1960       break
1961     fi
1962   done
1963   IFS="$ac_save_ifs"
1964 fi
1965 CC="$ac_cv_prog_CC"
1966 if test -n "$CC"; then
1967   echo "$ac_t""$CC" 1>&6
1968 else
1969   echo "$ac_t""no" 1>&6
1970 fi
1971  ;;
1972     esac
1973   fi
1974   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1975 fi
1976
1977 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1978 echo "configure:1979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1979
1980 ac_ext=c
1981 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1982 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1983 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'
1984 ac_cpp='$CPP '"$xe_cppflags"
1985 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1986 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1987 cross_compiling=no
1988
1989 cat > conftest.$ac_ext << EOF
1990
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993
1994 main(){return(0);}
1995 EOF
1996 if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1997   ac_cv_prog_cc_works=yes
1998   # If we can't run a trivial program, we are probably using a cross compiler.
1999   if (./conftest; exit) 2>/dev/null; then
2000     ac_cv_prog_cc_cross=no
2001   else
2002     ac_cv_prog_cc_cross=yes
2003   fi
2004 else
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   ac_cv_prog_cc_works=no
2008 fi
2009 rm -fr conftest*
2010 ac_ext=c
2011 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2012 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2013 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'
2014 ac_cpp='$CPP '"$xe_cppflags"
2015 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2016 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2017 cross_compiling=no
2018
2019 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2020 if test $ac_cv_prog_cc_works = no; then
2021   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2022 fi
2023 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2024 echo "configure:2025: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2025 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2026 cross_compiling=$ac_cv_prog_cc_cross
2027
2028 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2029 echo "configure:2030: checking whether we are using GNU C" >&5
2030
2031 cat > conftest.c <<EOF
2032 #ifdef __GNUC__
2033   yes;
2034 #endif
2035 EOF
2036 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2037   ac_cv_prog_gcc=yes
2038 else
2039   ac_cv_prog_gcc=no
2040 fi
2041
2042 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2043
2044 if test $ac_cv_prog_gcc = yes; then
2045   GCC=yes
2046 else
2047   GCC=
2048 fi
2049
2050 ac_test_CFLAGS="${CFLAGS+set}"
2051 ac_save_CFLAGS="$CFLAGS"
2052 CFLAGS=
2053 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2054 echo "configure:2055: checking whether ${CC-cc} accepts -g" >&5
2055
2056 echo 'void f(){}' > conftest.c
2057 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2058   ac_cv_prog_cc_g=yes
2059 else
2060   ac_cv_prog_cc_g=no
2061 fi
2062 rm -f conftest*
2063
2064
2065 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2066 if test "$ac_test_CFLAGS" = set; then
2067   CFLAGS="$ac_save_CFLAGS"
2068 elif test $ac_cv_prog_cc_g = yes; then
2069   if test "$GCC" = yes; then
2070     CFLAGS="-g -O2"
2071   else
2072     CFLAGS="-g"
2073   fi
2074 else
2075   if test "$GCC" = yes; then
2076     CFLAGS="-O2"
2077   else
2078     CFLAGS=
2079   fi
2080 fi
2081
2082 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2083   CC=gcc
2084   # Extract the first word of "gcc", so it can be a program name with args.
2085 set dummy gcc; ac_word=$2
2086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2087 echo "configure:2088: checking for $ac_word" >&5
2088
2089 if test -n "$CC"; then
2090   ac_cv_prog_CC="$CC" # Let the user override the test.
2091 else
2092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2093   ac_dummy="$PATH"
2094   for ac_dir in $ac_dummy; do
2095     test -z "$ac_dir" && ac_dir=.
2096     if test -f $ac_dir/$ac_word; then
2097       ac_cv_prog_CC="gcc"
2098       break
2099     fi
2100   done
2101   IFS="$ac_save_ifs"
2102 fi
2103 CC="$ac_cv_prog_CC"
2104 if test -n "$CC"; then
2105   echo "$ac_t""$CC" 1>&6
2106 else
2107   echo "$ac_t""no" 1>&6
2108 fi
2109
2110 if test -z "$CC"; then
2111   # Extract the first word of "cc", so it can be a program name with args.
2112 set dummy cc; ac_word=$2
2113 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2114 echo "configure:2115: checking for $ac_word" >&5
2115
2116 if test -n "$CC"; then
2117   ac_cv_prog_CC="$CC" # Let the user override the test.
2118 else
2119   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2120   ac_prog_rejected=no
2121   ac_dummy="$PATH"
2122   for ac_dir in $ac_dummy; do
2123     test -z "$ac_dir" && ac_dir=.
2124     if test -f $ac_dir/$ac_word; then
2125       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2126         ac_prog_rejected=yes
2127         continue
2128       fi
2129       ac_cv_prog_CC="cc"
2130       break
2131     fi
2132   done
2133   IFS="$ac_save_ifs"
2134 if test $ac_prog_rejected = yes; then
2135   # We found a bogon in the path, so make sure we never use it.
2136   set dummy $ac_cv_prog_CC
2137   shift
2138   if test $# -gt 0; then
2139     # We chose a different compiler from the bogus one.
2140     # However, it has the same basename, so the bogon will be chosen
2141     # first if we set CC to just the basename; use the full file name.
2142     shift
2143     set dummy "$ac_dir/$ac_word" "$@"
2144     shift
2145     ac_cv_prog_CC="$@"
2146   fi
2147 fi
2148 fi
2149 CC="$ac_cv_prog_CC"
2150 if test -n "$CC"; then
2151   echo "$ac_t""$CC" 1>&6
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155
2156   if test -z "$CC"; then
2157     case "`uname -s`" in
2158     *win32* | *WIN32*)
2159       # Extract the first word of "cl", so it can be a program name with args.
2160 set dummy cl; ac_word=$2
2161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_word" >&5
2163
2164 if test -n "$CC"; then
2165   ac_cv_prog_CC="$CC" # Let the user override the test.
2166 else
2167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2168   ac_dummy="$PATH"
2169   for ac_dir in $ac_dummy; do
2170     test -z "$ac_dir" && ac_dir=.
2171     if test -f $ac_dir/$ac_word; then
2172       ac_cv_prog_CC="cl"
2173       break
2174     fi
2175   done
2176   IFS="$ac_save_ifs"
2177 fi
2178 CC="$ac_cv_prog_CC"
2179 if test -n "$CC"; then
2180   echo "$ac_t""$CC" 1>&6
2181 else
2182   echo "$ac_t""no" 1>&6
2183 fi
2184  ;;
2185     esac
2186   fi
2187   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2188 fi
2189
2190 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2191 echo "configure:2192: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2192
2193 ac_ext=c
2194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2196 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'
2197 ac_cpp='$CPP '"$xe_cppflags"
2198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2200 cross_compiling=no
2201
2202 cat > conftest.$ac_ext << EOF
2203
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206
2207 main(){return(0);}
2208 EOF
2209 if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2210   ac_cv_prog_cc_works=yes
2211   # If we can't run a trivial program, we are probably using a cross compiler.
2212   if (./conftest; exit) 2>/dev/null; then
2213     ac_cv_prog_cc_cross=no
2214   else
2215     ac_cv_prog_cc_cross=yes
2216   fi
2217 else
2218   echo "configure: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   ac_cv_prog_cc_works=no
2221 fi
2222 rm -fr conftest*
2223 ac_ext=c
2224 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2225 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2226 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'
2227 ac_cpp='$CPP '"$xe_cppflags"
2228 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2229 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2230 cross_compiling=no
2231
2232 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2233 if test $ac_cv_prog_cc_works = no; then
2234   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2235 fi
2236 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2237 echo "configure:2238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2238 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2239 cross_compiling=$ac_cv_prog_cc_cross
2240
2241 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2242 echo "configure:2243: checking whether we are using GNU C" >&5
2243
2244 cat > conftest.c <<EOF
2245 #ifdef __GNUC__
2246   yes;
2247 #endif
2248 EOF
2249 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2250   ac_cv_prog_gcc=yes
2251 else
2252   ac_cv_prog_gcc=no
2253 fi
2254
2255 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2256
2257 if test $ac_cv_prog_gcc = yes; then
2258   GCC=yes
2259 else
2260   GCC=
2261 fi
2262
2263 ac_test_CFLAGS="${CFLAGS+set}"
2264 ac_save_CFLAGS="$CFLAGS"
2265 CFLAGS=
2266 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2267 echo "configure:2268: checking whether ${CC-cc} accepts -g" >&5
2268
2269 echo 'void f(){}' > conftest.c
2270 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2271   ac_cv_prog_cc_g=yes
2272 else
2273   ac_cv_prog_cc_g=no
2274 fi
2275 rm -f conftest*
2276
2277
2278 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2279 if test "$ac_test_CFLAGS" = set; then
2280   CFLAGS="$ac_save_CFLAGS"
2281 elif test $ac_cv_prog_cc_g = yes; then
2282   if test "$GCC" = yes; then
2283     CFLAGS="-g -O2"
2284   else
2285     CFLAGS="-g"
2286   fi
2287 else
2288   if test "$GCC" = yes; then
2289     CFLAGS="-O2"
2290   else
2291     CFLAGS=
2292   fi
2293 fi
2294
2295 fi
2296 CFLAGS="$xe_save_CFLAGS"
2297
2298
2299 test -n "$CPP" -a -d "$CPP" && CPP=
2300
2301 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2302
2303 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2304 echo "configure:2305: checking how to run the C preprocessor" >&5
2305 # On Suns, sometimes $CPP names a directory.
2306 if test -n "$CPP" && test -d "$CPP"; then
2307   CPP=
2308 fi
2309 if test -z "$CPP"; then
2310
2311   # This must be in double quotes, not single quotes, because CPP may get
2312   # substituted into the Makefile and "${CC-cc}" will confuse make.
2313   CPP="${CC-cc} -E"
2314   # On the NeXT, cc -E runs the code through the compiler's parser,
2315   # not just through cpp.
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <assert.h>
2320 Syntax Error
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   :
2327 else
2328   echo "$ac_err" >&5
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   CPP="${CC-cc} -E -traditional-cpp"
2333   cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <assert.h>
2337 Syntax Error
2338 EOF
2339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2340 { (eval echo configure:2341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2342 if test -z "$ac_err"; then
2343   :
2344 else
2345   echo "$ac_err" >&5
2346   echo "configure: failed program was:" >&5
2347   cat conftest.$ac_ext >&5
2348   rm -rf conftest*
2349   CPP="${CC-cc} -nologo -E"
2350   cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #include <assert.h>
2354 Syntax Error
2355 EOF
2356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2357 { (eval echo configure:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2359 if test -z "$ac_err"; then
2360   :
2361 else
2362   echo "$ac_err" >&5
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   CPP=/lib/cpp
2367 fi
2368 rm -f conftest*
2369 fi
2370 rm -f conftest*
2371 fi
2372 rm -f conftest*
2373   ac_cv_prog_CPP="$CPP"
2374   CPP="$ac_cv_prog_CPP"
2375 else
2376   ac_cv_prog_CPP="$CPP"
2377 fi
2378 echo "$ac_t""$CPP" 1>&6
2379
2380
2381
2382 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2383 echo "configure:2384: checking for AIX" >&5
2384 cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387 #ifdef _AIX
2388   yes
2389 #endif
2390
2391 EOF
2392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2393   egrep "yes" >/dev/null 2>&1; then
2394   rm -rf conftest*
2395   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2396     Defining _ALL_SOURCE
2397 EOF
2398 cat >> confdefs.h <<\EOF
2399 #define _ALL_SOURCE 1
2400 EOF
2401 }
2402
2403 else
2404   rm -rf conftest*
2405   echo "$ac_t""no" 1>&6
2406 fi
2407 rm -f conftest*
2408
2409  
2410
2411 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2412 echo "configure:2413: checking for GNU libc" >&5
2413 cat > conftest.$ac_ext <<EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2416 #include <features.h>
2417 int main() {
2418
2419 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2420 #error Not a GNU libc system :-(
2421 ******* ======= ******** &&&&&&&&
2422 #endif
2423
2424 ; return 0; }
2425 EOF
2426 if { (eval echo configure:2427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2427   rm -rf conftest*
2428   have_glibc=yes
2429 else
2430   echo "configure: failed program was:" >&5
2431   cat conftest.$ac_ext >&5
2432   rm -rf conftest*
2433   have_glibc=no
2434 fi
2435 rm -f conftest*
2436 echo "$ac_t""$have_glibc" 1>&6
2437 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2438     Defining _GNU_SOURCE
2439 EOF
2440 cat >> confdefs.h <<\EOF
2441 #define _GNU_SOURCE 1
2442 EOF
2443 }
2444
2445
2446 case "$opsys" in
2447   sol2)
2448    { test "$extra_verbose" = "yes" && cat << \EOF
2449     Defining __EXTENSIONS__
2450 EOF
2451 cat >> confdefs.h <<\EOF
2452 #define __EXTENSIONS__ 1
2453 EOF
2454 }
2455
2456       if test "$os_release" -ge 505; then
2457      { test "$extra_verbose" = "yes" && cat << \EOF
2458     Defining _XOPEN_SOURCE = 500
2459 EOF
2460 cat >> confdefs.h <<\EOF
2461 #define _XOPEN_SOURCE 500
2462 EOF
2463 }
2464
2465      { test "$extra_verbose" = "yes" && cat << \EOF
2466     Defining _XOPEN_SOURCE_EXTENDED
2467 EOF
2468 cat >> confdefs.h <<\EOF
2469 #define _XOPEN_SOURCE_EXTENDED 1
2470 EOF
2471 }
2472
2473    fi ;;
2474   linux)
2475     { test "$extra_verbose" = "yes" && cat << \EOF
2476     Defining _POSIX_C_SOURCE = 199506L
2477 EOF
2478 cat >> confdefs.h <<\EOF
2479 #define _POSIX_C_SOURCE 199506L
2480 EOF
2481 }
2482
2483     { test "$extra_verbose" = "yes" && cat << \EOF
2484     Defining _XOPEN_SOURCE = 500
2485 EOF
2486 cat >> confdefs.h <<\EOF
2487 #define _XOPEN_SOURCE 500
2488 EOF
2489 }
2490
2491     { test "$extra_verbose" = "yes" && cat << \EOF
2492     Defining _XOPEN_SOURCE_EXTENDED
2493 EOF
2494 cat >> confdefs.h <<\EOF
2495 #define _XOPEN_SOURCE_EXTENDED 1
2496 EOF
2497 }
2498
2499     ;;
2500 esac
2501
2502 cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 int main () {
2506 #if defined __SUNPRO_C
2507 return 11;
2508 #elif defined __DECC
2509 return 12;
2510 #elif defined __USLC__ && defined __SCO_VERSION__
2511 return 13;
2512 #elif defined __INTEL_COMPILER
2513 return 14;
2514 #else
2515 return 0;
2516 #endif
2517 }
2518 EOF
2519 if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2520 then
2521   :
2522 else
2523   conftest_rc="$?"
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -fr conftest*
2527   case "$conftest_rc" in
2528   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2529   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2530   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2531   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2532             GCC=no ;;
2533 esac
2534 fi
2535 rm -fr conftest*
2536
2537
2538
2539
2540 echo "Extracting information from the machine- and system-dependent headers..."
2541
2542 tempcname="conftest.c"
2543
2544
2545
2546 cat > $tempcname < confdefs.h
2547 cat >> $tempcname <<EOF
2548 #define NOT_C_CODE
2549 #define C_SWITCH_SITE
2550 #define C_SWITCH_X_SITE
2551 #define LD_SWITCH_SITE
2552 #define LD_SWITCH_X_SITE
2553 #define LD_SWITCH_X_SITE_AUX
2554 #define OS_RELEASE $os_release
2555
2556 #ifdef config_opsysfile
2557 #include "$srcdir/src/$opsysfile"
2558 #endif
2559
2560 #ifdef config_machfile
2561 #include "$srcdir/src/$machfile"
2562 #endif
2563
2564 #ifndef LIBS_MACHINE
2565 #define LIBS_MACHINE
2566 #endif
2567 configure___ libs_machine=LIBS_MACHINE
2568
2569 #ifndef LIBS_SYSTEM
2570 #define LIBS_SYSTEM
2571 #endif
2572 configure___ libs_system=LIBS_SYSTEM
2573
2574 #ifndef LIBS_TERMCAP
2575 #define LIBS_TERMCAP
2576 #endif
2577 configure___ libs_termcap=LIBS_TERMCAP
2578
2579 #ifndef LIB_STANDARD
2580 #define LIB_STANDARD
2581 #endif
2582 configure___ libs_standard=LIB_STANDARD
2583
2584
2585 #ifndef OBJECTS_MACHINE
2586 #define OBJECTS_MACHINE
2587 #endif
2588 configure___ objects_machine=OBJECTS_MACHINE
2589
2590 #ifndef OBJECTS_SYSTEM
2591 #define OBJECTS_SYSTEM
2592 #endif
2593 configure___ objects_system=OBJECTS_SYSTEM
2594
2595
2596 #ifndef C_SWITCH_MACHINE
2597 #define C_SWITCH_MACHINE
2598 #endif
2599 configure___ c_switch_machine=C_SWITCH_MACHINE
2600
2601 #ifndef C_SWITCH_SYSTEM
2602 #define C_SWITCH_SYSTEM
2603 #endif
2604 configure___ c_switch_system=C_SWITCH_SYSTEM
2605
2606
2607 #ifndef LD_SWITCH_MACHINE
2608 #define LD_SWITCH_MACHINE
2609 #endif
2610 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2611
2612 #ifndef LD_SWITCH_SYSTEM
2613 #define LD_SWITCH_SYSTEM
2614 #endif
2615 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2616
2617
2618 #ifndef UNEXEC
2619 #define UNEXEC "unexec.o"
2620 #endif
2621 configure___ unexec=UNEXEC
2622
2623
2624 #ifndef LD_SWITCH_SHARED
2625 #define LD_SWITCH_SHARED "-c"
2626 #endif
2627 configure___ ld_switch_shared=LD_SWITCH_SHARED
2628
2629
2630 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2631 configure___ ordinary_ld=ORDINARY_LD
2632
2633 #ifdef ORDINARY_LINK
2634 #define LD ORDINARY_LD
2635 #else /* no ORDINARY LINK */
2636 #ifdef COFF_ENCAPSULATE
2637 #define LD "\$(CC) -nostdlib"
2638 #else /* not COFF_ENCAPSULATE */
2639 #ifdef LINKER
2640 #define LD LINKER
2641 #else /* ! defined (LINKER) */
2642 #define LD "ld"
2643 #endif /* ! defined (LINKER) */
2644 #endif /* ! defined (COFF_ENCAPSULATE) */
2645 #endif /* not ORDINARY_LINK */
2646 configure___ ld=LD
2647
2648 #ifndef LIB_GCC
2649 #define LIB_GCC
2650 #endif
2651 configure___ lib_gcc=LIB_GCC
2652
2653 #ifndef LD_TEXT_START_ADDR
2654 #define LD_TEXT_START_ADDR
2655 #endif
2656 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2657
2658
2659 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2660 #ifdef NO_REMAP
2661 #ifdef COFF_ENCAPSULATE
2662 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2663 #else /* ! defined (COFF_ENCAPSULATE) */
2664 #define START_FILES "pre-crt0.o /lib/crt0.o"
2665 #endif /* ! defined (COFF_ENCAPSULATE) */
2666 #else /* ! defined (NO_REMAP) */
2667 #define START_FILES "ecrt0.o"
2668 #endif /* ! defined (NO_REMAP) */
2669 #endif /* no ORDINARY_LINK */
2670 #ifndef START_FILES
2671 #define START_FILES
2672 #endif
2673 configure___ start_files=START_FILES
2674
2675 #ifdef ORDINARY_LINK
2676 configure___ ordinary_link=yes
2677 #else
2678 configure___ ordinary_link=no
2679 #endif
2680
2681 #ifdef SYSTEM_MALLOC
2682 configure___ system_malloc=yes
2683 #else
2684 configure___ system_malloc=no
2685 #endif
2686
2687 #ifdef TERMINFO
2688 configure___ have_terminfo=yes
2689 #else
2690 configure___ have_terminfo=no
2691 #endif
2692
2693 #ifdef MAIL_USE_FLOCK
2694 configure___ mail_use_flock=yes
2695 #else
2696 configure___ mail_use_flock=no
2697 #endif
2698
2699 #ifdef MAIL_USE_LOCKF
2700 configure___ mail_use_lockf=yes
2701 #else
2702 configure___ mail_use_lockf=no
2703 #endif
2704
2705 #ifdef MAIL_USE_LOCKING
2706 configure___ mail_use_locking=yes
2707 #else
2708 configure___ mail_use_locking=no
2709 #endif
2710
2711 #ifdef HAVE_WIN32_PROCESSES
2712 configure___ win32_processes=yes
2713 #else
2714 configure___ win32_processes=no
2715 #endif
2716
2717 EOF
2718
2719 CPP=`eval "echo $CPP $CPPFLAGS"`
2720 eval `$CPP -Isrc $tempcname \
2721         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2722
2723 rm $tempcname
2724
2725 if test "$pdump" = "yes"; then
2726   ordinary_link="yes"
2727   ld="${ordinary_ld}"
2728   start_files=
2729   libs_standard=
2730   unexec=
2731   lib_gcc=
2732 fi
2733
2734 test "$extra_verbose" = "yes" && \
2735   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 ""
2736
2737 case "$opsys" in mingw* | cygwin*)
2738   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2739   cygwin_include=`eval "dirname $cygwin_include"` ;
2740   cygwin_include="-I$cygwin_include/../include" ;
2741   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2742   case "$opsys" in mingw*)
2743     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2744   esac
2745   ;;
2746 esac
2747
2748 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2749
2750
2751 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2752
2753 if test "$__USLC__" = yes; then
2754   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2755 echo "configure:2756: checking for whether the -Kalloca compiler flag is needed" >&5
2756   need_kalloca=no
2757   cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760
2761 int main() {
2762 void *x = alloca(4);
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2766   rm -rf conftest*
2767   :
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   
2773     xe_save_c_switch_system="$c_switch_system"
2774     c_switch_system="$c_switch_system -Kalloca"
2775     cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778
2779 int main() {
2780 void *x = alloca(4);
2781 ; return 0; }
2782 EOF
2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784   rm -rf conftest*
2785    need_kalloca=yes 
2786 else
2787   echo "configure: failed program was:" >&5
2788   cat conftest.$ac_ext >&5
2789 fi
2790 rm -f conftest*
2791     c_switch_system="$xe_save_c_switch_system"
2792 fi
2793 rm -f conftest*
2794   echo "$ac_t""$need_kalloca" 1>&6
2795   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
2796 fi
2797
2798 if test "$cflags_specified" = "no"; then
2799       if   test "$GCC" = "yes"; then
2800     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2801         CFLAGS="$CFLAGS -Wsign-compare"
2802         case "`gcc -v --help 2>&1`" in
2803       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2804     esac
2805                 if test "$xemacs_compiler" != "g++"; then
2806       CFLAGS="$CFLAGS -Wshadow"
2807     fi
2808             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2809               elif test "$__SUNPRO_C" = "yes"; then
2810     case "$opsys" in
2811       sol2    ) CFLAGS="-v -xO4" ;;
2812       sunos4* ) CFLAGS="-xO2";;
2813     esac
2814   elif test "$__DECC" = "yes"; then
2815     CFLAGS="-O3"
2816   elif test "$CC" = "xlc"; then
2817     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2818   elif test "$__ICC" = "yes"; then
2819     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2820     else
2821     CFLAGS="-O" ;  fi
2822 fi
2823
2824 if test "$GCC" = "yes"; then
2825 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2826 echo "configure:2827: checking for buggy gcc versions" >&5
2827 GCC_VERSION=`$CC --version`
2828 case `uname -s`:`uname -m`:$GCC_VERSION in
2829                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2830                         case "$CFLAGS" in
2831             *-O2*|*-O3*)
2832                 case "$CFLAGS" in
2833                     *-fno-schedule-insns*) ;;
2834                     *)
2835                         echo "$ac_t""yes" 1>&6
2836                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2837                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2838                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2839                         ;;
2840                 esac
2841                 ;;
2842         esac
2843         ;;
2844                     Linux:alpha:egcs-2.91.*)
2845         echo "$ac_t""yes" 1>&6
2846         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2847         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2848         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2849         ;;
2850     *:i*86*:2.7.2*)
2851         case "$CFLAGS" in
2852             *-O2*|*-O3*)
2853                 case "$GCC_VERSION" in
2854                     2.7.2)
2855                         case "$CFLAGS" in
2856                             *-fno-strength-reduce*) ;;
2857                             *)
2858                                 echo "$ac_t""yes" 1>&6
2859                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2860                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2861                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2862                                 ;;
2863                         esac
2864                         ;;
2865                 esac
2866                 case "$CFLAGS" in
2867                  *-fno-caller-saves*) ;;
2868                  *)
2869                     echo "$ac_t""yes" 1>&6
2870                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2871                     echo "configure: warning: -fno-caller-saves." 1>&2
2872                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2873                     ;;
2874                 esac
2875                 ;;
2876         esac
2877         ;;
2878 esac
2879 echo "$ac_t""no" 1>&6
2880 fi
2881
2882 if test "$pdump" != "yes"; then
2883   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2884 echo "configure:2885: checking for \"-z nocombreloc\" linker flag" >&5
2885   case "`ld --help 2>&1`" in
2886     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2887       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2888     *) echo "$ac_t""no" 1>&6 ;;
2889   esac
2890 fi
2891
2892
2893
2894 if test "$GCC" = "yes"; then
2895   set x $ld_switch_system; shift; ld_switch_system=""
2896   while test -n "$1"; do
2897     case $1 in
2898       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2899       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2900       -Xlinker* ) ;;
2901       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2902     esac
2903     shift
2904   done
2905 fi
2906
2907 if test "$GCC" = "yes"; then
2908   set x $ld_switch_machine; shift; ld_switch_machine=""
2909   while test -n "$1"; do
2910     case $1 in
2911       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2912       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2913       -Xlinker* ) ;;
2914       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2915     esac
2916     shift
2917   done
2918 fi
2919
2920 if test "$GCC" = "yes"; then
2921   set x $ld_switch_site; shift; ld_switch_site=""
2922   while test -n "$1"; do
2923     case $1 in
2924       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2925       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2926       -Xlinker* ) ;;
2927       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2928     esac
2929     shift
2930   done
2931 fi
2932
2933 if test "$GCC" = "yes"; then
2934   set x $LDFLAGS; shift; LDFLAGS=""
2935   while test -n "$1"; do
2936     case $1 in
2937       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2938       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2939       -Xlinker* ) ;;
2940       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2941     esac
2942     shift
2943   done
2944 fi
2945
2946 if test "$GCC" = "yes"; then
2947   set x $ld_call_shared; shift; ld_call_shared=""
2948   while test -n "$1"; do
2949     case $1 in
2950       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2951       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2952       -Xlinker* ) ;;
2953       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2954     esac
2955     shift
2956   done
2957 fi
2958
2959 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2960    echo "    xemacs will be linked with \"$objects_machine\""
2961  fi
2962 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2963    echo "    xemacs will be linked with \"$objects_system\""
2964  fi
2965 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2966    echo "    xemacs will be linked with \"$unexec\""
2967  fi
2968 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2969    echo "    xemacs will be linked with \"dumper.o\""
2970  fi
2971
2972 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2973 echo "configure:2974: checking for dynodump" >&5
2974 if test "$unexec" != "unexsol2.o"; then
2975   echo "$ac_t""no" 1>&6
2976 else
2977   echo "$ac_t""yes" 1>&6
2978   { test "$extra_verbose" = "yes" && cat << \EOF
2979     Defining DYNODUMP
2980 EOF
2981 cat >> confdefs.h <<\EOF
2982 #define DYNODUMP 1
2983 EOF
2984 }
2985
2986   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2987   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2988   case "$machine" in
2989     sparc   ) dynodump_arch=sparc ;;
2990     *86*    ) dynodump_arch=i386  ;;
2991     powerpc ) dynodump_arch=ppc   ;;
2992   esac
2993     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
2994 fi
2995
2996
2997
2998 if test "$unexec" = "unexaix.o"; then
2999   if   test "$dynamic" = "no"; then
3000   start_flags="-Wl,-bnso,-bnodelcsect"
3001   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
3002   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
3003     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3004   done
3005   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3006     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3007   done
3008   
3009 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3010 echo "configure:3011: checking for terminateAndUnload in -lC" >&5
3011 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3012
3013 xe_check_libs=" -lC "
3014 cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017 /* Override any gcc2 internal prototype to avoid an error.  */
3018 /* We use char because int might match the return type of a gcc2
3019     builtin and then its argument prototype would still apply.  */
3020 char terminateAndUnload();
3021
3022 int main() {
3023 terminateAndUnload()
3024 ; return 0; }
3025 EOF
3026 if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3027   rm -rf conftest*
3028   eval "ac_cv_lib_$ac_lib_var=yes"
3029 else
3030   echo "configure: failed program was:" >&5
3031   cat conftest.$ac_ext >&5
3032   rm -rf conftest*
3033   eval "ac_cv_lib_$ac_lib_var=no"
3034 fi
3035 rm -f conftest*
3036 xe_check_libs=""
3037
3038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3039   echo "$ac_t""yes" 1>&6
3040   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045
3046   fi
3047 elif test -n "$ld_text_start_addr"; then
3048   start_flags="-T $ld_text_start_addr -e __start"
3049 fi
3050
3051
3052
3053
3054 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3055  test -z "$linker" &&  linker='$(CC) -nostdlib'
3056  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3057 fi
3058 test "$GCC" != "yes" && lib_gcc=
3059
3060
3061
3062
3063
3064 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3065 if test -n "$site_libraries"; then
3066   for arg in $site_libraries; do
3067     case "$arg" in
3068      -* ) ;;
3069      * ) test -d "$arg" || \
3070            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3071        arg="-L${arg}" ;;
3072     esac
3073     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3074   done
3075 fi
3076
3077 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3078 if test -n "$site_includes"; then
3079   for arg in $site_includes; do
3080     case "$arg" in
3081       -* ) ;;
3082       * ) test -d "$arg" || \
3083            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3084       arg="-I${arg}" ;;
3085     esac
3086     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3087   done
3088 fi
3089
3090 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3091 if test -n "$site_prefixes"; then
3092   for dir in $site_prefixes; do
3093     lib_dir="${dir}/lib"
3094     inc_dir="${dir}/include"
3095     if test ! -d "$dir"; then
3096       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3097     elif test ! -d "$lib_dir"; then
3098       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3099     else
3100       if test -d "$inc_dir"; then
3101         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
3102       fi
3103       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
3104     fi
3105   done
3106 fi
3107
3108
3109 for dir in "/usr/ccs/lib"; do
3110   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
3111 done
3112
3113 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3114 if test -n "$site_runtime_libraries"; then
3115   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3116   export LD_RUN_PATH
3117 fi
3118
3119
3120
3121
3122
3123 if test -n "$add_runtime_path"; then :;
3124 elif test "$dynamic" = "no"; then add_runtime_path=no
3125 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3126 else case "$opsys" in
3127        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3128        * ) add_runtime_path=no ;;
3129      esac
3130 fi
3131
3132 if test "$add_runtime_path" = "yes"; then
3133       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3134 echo "configure:3135: checking "for runtime libraries flag"" >&5
3135   case "$opsys" in
3136     sol2 ) dash_r="-R" ;;
3137     decosf* | linux* | irix*) dash_r="-rpath " ;;
3138     *)
3139       dash_r=""
3140       for try_dash_r in "-R" "-R " "-rpath "; do
3141         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3142         
3143 if test "$GCC" = "yes"; then
3144   set x $xe_check_libs; shift; xe_check_libs=""
3145   while test -n "$1"; do
3146     case $1 in
3147       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3148       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3149       -Xlinker* ) ;;
3150       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3151     esac
3152     shift
3153   done
3154 fi
3155         cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158
3159 int main() {
3160
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164   rm -rf conftest*
3165   dash_r="$try_dash_r"
3166 else
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169 fi
3170 rm -f conftest*
3171         xe_check_libs=""
3172         test -n "$dash_r" && break
3173       done ;;
3174   esac
3175   if test -n "$dash_r";
3176     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3177     else echo "$ac_t""NONE" 1>&6
3178   fi
3179 fi
3180
3181 xe_add_unique_runpath_dir='
3182   xe_add_p=yes
3183   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3184   done
3185   if test "$xe_add_p" = "yes"; then
3186     test -n "$runpath" && runpath="${runpath}:"
3187     runpath="${runpath}${xe_runpath_dir}"
3188     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3189   fi'
3190
3191
3192
3193
3194 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3195     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3196   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3197   
3198         runpath="" runpath_dirs=""
3199   if test -n "$LD_RUN_PATH"; then
3200     runpath="$LD_RUN_PATH"
3201   elif test "$GCC" = "yes"; then
3202         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3203     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3204     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3205     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3206       case "$arg" in P,* | -L* | -R* )
3207         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3208           {
3209 xe_runpath_dir="$dir"
3210   test "$xe_runpath_dir" != "/lib"     -a \
3211         "$xe_runpath_dir" != "/usr/lib" -a \
3212         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3213   eval "$xe_add_unique_runpath_dir"
3214 }
3215         done ;;
3216       esac
3217     done
3218     ld_switch_run="$ld_switch_run_save"
3219     rm -f conftest*
3220   else
3221         for arg in $ld_switch_site $ld_switch_x_site; do
3222       case "$arg" in -L*) {
3223 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3224   test "$xe_runpath_dir" != "/lib"     -a \
3225         "$xe_runpath_dir" != "/usr/lib" -a \
3226         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3227   eval "$xe_add_unique_runpath_dir"
3228 };; esac
3229     done
3230             if test "$opsys $need_motif" = "sol2 yes"; then
3231       xe_runpath_dir="/opt/SUNWdt/lib";
3232       eval "$xe_add_unique_runpath_dir";
3233     fi
3234   fi 
3235   if test -n "$runpath"; then
3236     ld_switch_run="${dash_r}${runpath}"
3237     
3238 if test "$GCC" = "yes"; then
3239   set x $ld_switch_run; shift; ld_switch_run=""
3240   while test -n "$1"; do
3241     case $1 in
3242       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3243       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3244       -Xlinker* ) ;;
3245       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3246     esac
3247     shift
3248   done
3249 fi
3250     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3251   fi
3252 fi
3253
3254
3255
3256 GNU_MALLOC=yes
3257 if test "$with_dlmalloc" != "no"; then
3258         doug_lea_malloc=yes
3259 else
3260         doug_lea_malloc=no
3261 fi
3262 after_morecore_hook_exists=yes
3263 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3264 echo "configure:3265: checking for malloc_set_state" >&5
3265
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 /* System header to define __stub macros and hopefully few prototypes,
3270     which can conflict with char malloc_set_state(); below.  */
3271 #include <assert.h>
3272 /* Override any gcc2 internal prototype to avoid an error.  */
3273 /* We use char because int might match the return type of a gcc2
3274     builtin and then its argument prototype would still apply.  */
3275 char malloc_set_state();
3276
3277 int main() {
3278
3279 /* The GNU C library defines this for functions which it implements
3280     to always fail with ENOSYS.  Some functions are actually named
3281     something starting with __ and the normal name is an alias.  */
3282 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3283 choke me
3284 #else
3285 malloc_set_state();
3286 #endif
3287
3288 ; return 0; }
3289 EOF
3290 if { (eval echo configure:3291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3291   rm -rf conftest*
3292   eval "ac_cv_func_malloc_set_state=yes"
3293 else
3294   echo "configure: failed program was:" >&5
3295   cat conftest.$ac_ext >&5
3296   rm -rf conftest*
3297   eval "ac_cv_func_malloc_set_state=no"
3298 fi
3299 rm -f conftest*
3300
3301 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3302   echo "$ac_t""yes" 1>&6
3303   :
3304 else
3305   echo "$ac_t""no" 1>&6
3306 doug_lea_malloc=no
3307 fi
3308
3309 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3310 echo "configure:3311: checking whether __after_morecore_hook exists" >&5
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 extern void (* __after_morecore_hook)();
3315 int main() {
3316 __after_morecore_hook = 0
3317 ; return 0; }
3318 EOF
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320   rm -rf conftest*
3321   echo "$ac_t""yes" 1>&6
3322 else
3323   echo "configure: failed program was:" >&5
3324   cat conftest.$ac_ext >&5
3325   rm -rf conftest*
3326   echo "$ac_t""no" 1>&6
3327    after_morecore_hook_exists=no
3328 fi
3329 rm -f conftest*
3330 if test "$system_malloc" = "yes" ; then
3331   GNU_MALLOC=no
3332   GNU_MALLOC_reason="
3333     - The GNU allocators don't work with this system configuration."
3334 elif test "$with_system_malloc" = "yes" ; then
3335   GNU_MALLOC=no
3336   GNU_MALLOC_reason="
3337     - User chose not to use GNU allocators."
3338 elif test "$with_debug_malloc" = "yes" ; then
3339   GNU_MALLOC=no
3340   GNU_MALLOC_reason="
3341     - User chose to use Debugging Malloc."
3342 fi
3343
3344 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3345   GNU_MALLOC_reason="
3346     - Using Doug Lea's new malloc from the GNU C Library."
3347   { test "$extra_verbose" = "yes" && cat << \EOF
3348     Defining DOUG_LEA_MALLOC
3349 EOF
3350 cat >> confdefs.h <<\EOF
3351 #define DOUG_LEA_MALLOC 1
3352 EOF
3353 }
3354
3355   if test "$after_morecore_hook_exists" = "no" ; then
3356     GNU_MALLOC_reason="
3357     - Using Doug Lea's new malloc from the Linux C Library."
3358     { test "$extra_verbose" = "yes" && cat << \EOF
3359     Defining _NO_MALLOC_WARNING_
3360 EOF
3361 cat >> confdefs.h <<\EOF
3362 #define _NO_MALLOC_WARNING_ 1
3363 EOF
3364 }
3365
3366   fi
3367 fi
3368
3369
3370
3371
3372 # Extract the first word of "ranlib", so it can be a program name with args.
3373 set dummy ranlib; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376
3377 if test -n "$RANLIB"; then
3378   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3379 else
3380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3381   ac_dummy="$PATH"
3382   for ac_dir in $ac_dummy; do
3383     test -z "$ac_dir" && ac_dir=.
3384     if test -f $ac_dir/$ac_word; then
3385       ac_cv_prog_RANLIB="ranlib"
3386       break
3387     fi
3388   done
3389   IFS="$ac_save_ifs"
3390   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3391 fi
3392 RANLIB="$ac_cv_prog_RANLIB"
3393 if test -n "$RANLIB"; then
3394   echo "$ac_t""$RANLIB" 1>&6
3395 else
3396   echo "$ac_t""no" 1>&6
3397 fi
3398
3399 ac_aux_dir=
3400 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3401   if test -f $ac_dir/install-sh; then
3402     ac_aux_dir=$ac_dir
3403     ac_install_sh="$ac_aux_dir/install-sh -c"
3404     break
3405   elif test -f $ac_dir/install.sh; then
3406     ac_aux_dir=$ac_dir
3407     ac_install_sh="$ac_aux_dir/install.sh -c"
3408     break
3409   fi
3410 done
3411 if test -z "$ac_aux_dir"; then
3412   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3413 fi
3414 ac_config_guess=$ac_aux_dir/config.guess
3415 ac_config_sub=$ac_aux_dir/config.sub
3416 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3417
3418 # Find a good install program.  We prefer a C program (faster),
3419 # so one script is as good as another.  But avoid the broken or
3420 # incompatible versions:
3421 # SysV /etc/install, /usr/sbin/install
3422 # SunOS /usr/etc/install
3423 # IRIX /sbin/install
3424 # AIX /bin/install
3425 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3426 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3427 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3428 # ./install, which can be erroneously created by make from ./install.sh.
3429 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3430 echo "configure:3431: checking for a BSD compatible install" >&5
3431 if test -z "$INSTALL"; then
3432
3433   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3434   for ac_dir in $PATH; do
3435     # Account for people who put trailing slashes in PATH elements.
3436     case "$ac_dir/" in
3437     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3438     *)
3439       # OSF1 and SCO ODT 3.0 have their own names for install.
3440       # Don't use installbsd from OSF since it installs stuff as root
3441       # by default.
3442       for ac_prog in ginstall scoinst install; do
3443         if test -f $ac_dir/$ac_prog; then
3444           if test $ac_prog = install &&
3445             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3446             # AIX install.  It has an incompatible calling convention.
3447             :
3448           else
3449             ac_cv_path_install="$ac_dir/$ac_prog -c"
3450             break 2
3451           fi
3452         fi
3453       done
3454       ;;
3455     esac
3456   done
3457   IFS="$ac_save_IFS"
3458
3459   if test "${ac_cv_path_install+set}" = set; then
3460     INSTALL="$ac_cv_path_install"
3461   else
3462     # As a last resort, use the slow shell script.  We don't cache a
3463     # path for INSTALL within a source directory, because that will
3464     # break other packages using the cache if that directory is
3465     # removed, or if the path is relative.
3466     INSTALL="$ac_install_sh"
3467   fi
3468 fi
3469 echo "$ac_t""$INSTALL" 1>&6
3470
3471 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3472 # It thinks the first close brace ends the variable substitution.
3473 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3474
3475 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3476
3477 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3478
3479 for ac_prog in 'bison -y' byacc
3480 do
3481 # Extract the first word of "$ac_prog", so it can be a program name with args.
3482 set dummy $ac_prog; ac_word=$2
3483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_word" >&5
3485
3486 if test -n "$YACC"; then
3487   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3488 else
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH"
3491   for ac_dir in $ac_dummy; do
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_prog_YACC="$ac_prog"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499 fi
3500 YACC="$ac_cv_prog_YACC"
3501 if test -n "$YACC"; then
3502   echo "$ac_t""$YACC" 1>&6
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506
3507 test -n "$YACC" && break
3508 done
3509 test -n "$YACC" || YACC="yacc"
3510
3511
3512 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 
3513 do
3514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3516 echo "configure:3517: checking for $ac_hdr" >&5
3517
3518 cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 #include <$ac_hdr>
3522 EOF
3523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3524 { (eval echo configure:3525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3526 if test -z "$ac_err"; then
3527   rm -rf conftest*
3528   eval "ac_cv_header_$ac_safe=yes"
3529 else
3530   echo "$ac_err" >&5
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -rf conftest*
3534   eval "ac_cv_header_$ac_safe=no"
3535 fi
3536 rm -f conftest*
3537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3538   echo "$ac_t""yes" 1>&6
3539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3540   { test "$extra_verbose" = "yes" && cat << EOF
3541     Defining $ac_tr_hdr
3542 EOF
3543 cat >> confdefs.h <<EOF
3544 #define $ac_tr_hdr 1
3545 EOF
3546 }
3547  
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551 done
3552
3553 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3554 echo "configure:3555: checking for sys/wait.h that is POSIX.1 compatible" >&5
3555
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <sys/types.h>
3560 #include <sys/wait.h>
3561 #ifndef WEXITSTATUS
3562 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3563 #endif
3564 #ifndef WIFEXITED
3565 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3566 #endif
3567 int main() {
3568 int s;
3569 wait (&s);
3570 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3571 ; return 0; }
3572 EOF
3573 if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3574   rm -rf conftest*
3575   ac_cv_header_sys_wait_h=yes
3576 else
3577   echo "configure: failed program was:" >&5
3578   cat conftest.$ac_ext >&5
3579   rm -rf conftest*
3580   ac_cv_header_sys_wait_h=no
3581 fi
3582 rm -f conftest*
3583
3584 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3585 if test $ac_cv_header_sys_wait_h = yes; then
3586   { test "$extra_verbose" = "yes" && cat << \EOF
3587     Defining HAVE_SYS_WAIT_H
3588 EOF
3589 cat >> confdefs.h <<\EOF
3590 #define HAVE_SYS_WAIT_H 1
3591 EOF
3592 }
3593
3594 fi
3595
3596 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3597 echo "configure:3598: checking for ANSI C header files" >&5
3598
3599 cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <stdlib.h>
3603 #include <stdarg.h>
3604 #include <string.h>
3605 #include <float.h>
3606 EOF
3607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3608 { (eval echo configure:3609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3610 if test -z "$ac_err"; then
3611   rm -rf conftest*
3612   ac_cv_header_stdc=yes
3613 else
3614   echo "$ac_err" >&5
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -f conftest*
3621
3622 if test $ac_cv_header_stdc = yes; then
3623   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3624 cat > conftest.$ac_ext <<EOF
3625 #line 3626 "configure"
3626 #include "confdefs.h"
3627 #include <string.h>
3628 EOF
3629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3630   egrep "memchr" >/dev/null 2>&1; then
3631   :
3632 else
3633   rm -rf conftest*
3634   ac_cv_header_stdc=no
3635 fi
3636 rm -f conftest*
3637
3638 fi
3639
3640 if test $ac_cv_header_stdc = yes; then
3641   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3642 cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3645 #include <stdlib.h>
3646 EOF
3647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3648   egrep "free" >/dev/null 2>&1; then
3649   :
3650 else
3651   rm -rf conftest*
3652   ac_cv_header_stdc=no
3653 fi
3654 rm -f conftest*
3655
3656 fi
3657
3658 if test $ac_cv_header_stdc = yes; then
3659   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 #include <ctype.h>
3664 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3665 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3666 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3667 int main () { int i; for (i = 0; i < 256; i++)
3668 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3669 exit (0); }
3670
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3673 then
3674   :
3675 else
3676   conftest_rc="$?"
3677   echo "configure: failed program was:" >&5
3678   cat conftest.$ac_ext >&5
3679   rm -fr conftest*
3680   ac_cv_header_stdc=no
3681 fi
3682 rm -fr conftest*
3683 fi
3684
3685 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3686 if test $ac_cv_header_stdc = yes; then
3687   { test "$extra_verbose" = "yes" && cat << \EOF
3688     Defining STDC_HEADERS
3689 EOF
3690 cat >> confdefs.h <<\EOF
3691 #define STDC_HEADERS 1
3692 EOF
3693 }
3694
3695 fi
3696
3697 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3698 echo "configure:3699: checking whether time.h and sys/time.h may both be included" >&5
3699
3700 cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703 #include <sys/types.h>
3704 #include <sys/time.h>
3705 #include <time.h>
3706 int main() {
3707 struct tm *tp;
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3711   rm -rf conftest*
3712   ac_cv_header_time=yes
3713 else
3714   echo "configure: failed program was:" >&5
3715   cat conftest.$ac_ext >&5
3716   rm -rf conftest*
3717   ac_cv_header_time=no
3718 fi
3719 rm -f conftest*
3720
3721 echo "$ac_t""$ac_cv_header_time" 1>&6
3722 if test $ac_cv_header_time = yes; then
3723   { test "$extra_verbose" = "yes" && cat << \EOF
3724     Defining TIME_WITH_SYS_TIME
3725 EOF
3726 cat >> confdefs.h <<\EOF
3727 #define TIME_WITH_SYS_TIME 1
3728 EOF
3729 }
3730
3731 fi
3732
3733 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3734 echo "configure:3735: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3735
3736 cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <sys/types.h>
3740 #include <signal.h>
3741 /* NetBSD declares sys_siglist in unistd.h.  */
3742 #ifdef HAVE_UNISTD_H
3743 #include <unistd.h>
3744 #endif
3745 int main() {
3746 char *msg = *(sys_siglist + 1);
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3750   rm -rf conftest*
3751   ac_cv_decl_sys_siglist=yes
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   ac_cv_decl_sys_siglist=no
3757 fi
3758 rm -f conftest*
3759
3760 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3761 if test $ac_cv_decl_sys_siglist = yes; then
3762   { test "$extra_verbose" = "yes" && cat << \EOF
3763     Defining SYS_SIGLIST_DECLARED
3764 EOF
3765 cat >> confdefs.h <<\EOF
3766 #define SYS_SIGLIST_DECLARED 1
3767 EOF
3768 }
3769
3770 fi
3771
3772
3773
3774 echo $ac_n "checking for utime""... $ac_c" 1>&6
3775 echo "configure:3776: checking for utime" >&5
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <sys/types.h>
3780 #include <utime.h>
3781 int main() {
3782 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786   rm -rf conftest*
3787   echo "$ac_t""yes" 1>&6
3788    { test "$extra_verbose" = "yes" && cat << \EOF
3789     Defining HAVE_UTIME
3790 EOF
3791 cat >> confdefs.h <<\EOF
3792 #define HAVE_UTIME 1
3793 EOF
3794 }
3795
3796 else
3797   echo "configure: failed program was:" >&5
3798   cat conftest.$ac_ext >&5
3799   rm -rf conftest*
3800   echo "$ac_t""no" 1>&6
3801       for ac_func in utimes
3802 do
3803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_func" >&5
3805
3806 cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 /* System header to define __stub macros and hopefully few prototypes,
3810     which can conflict with char $ac_func(); below.  */
3811 #include <assert.h>
3812 /* Override any gcc2 internal prototype to avoid an error.  */
3813 /* We use char because int might match the return type of a gcc2
3814     builtin and then its argument prototype would still apply.  */
3815 char $ac_func();
3816
3817 int main() {
3818
3819 /* The GNU C library defines this for functions which it implements
3820     to always fail with ENOSYS.  Some functions are actually named
3821     something starting with __ and the normal name is an alias.  */
3822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3823 choke me
3824 #else
3825 $ac_func();
3826 #endif
3827
3828 ; return 0; }
3829 EOF
3830 if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3831   rm -rf conftest*
3832   eval "ac_cv_func_$ac_func=yes"
3833 else
3834   echo "configure: failed program was:" >&5
3835   cat conftest.$ac_ext >&5
3836   rm -rf conftest*
3837   eval "ac_cv_func_$ac_func=no"
3838 fi
3839 rm -f conftest*
3840
3841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3844   { test "$extra_verbose" = "yes" && cat << EOF
3845     Defining $ac_tr_func
3846 EOF
3847 cat >> confdefs.h <<EOF
3848 #define $ac_tr_func 1
3849 EOF
3850 }
3851  
3852 else
3853   echo "$ac_t""no" 1>&6
3854 fi
3855 done
3856
3857 fi
3858 rm -f conftest*
3859
3860
3861 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3862 echo "configure:3863: checking return type of signal handlers" >&5
3863
3864 cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 #include <sys/types.h>
3868 #include <signal.h>
3869 #ifdef signal
3870 #undef signal
3871 #endif
3872 #ifdef __cplusplus
3873 extern "C" void (*signal (int, void (*)(int)))(int);
3874 #else
3875 void (*signal ()) ();
3876 #endif
3877
3878 int main() {
3879 int i;
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_type_signal=void
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_type_signal=int
3890 fi
3891 rm -f conftest*
3892
3893 echo "$ac_t""$ac_cv_type_signal" 1>&6
3894 { test "$extra_verbose" = "yes" && cat << EOF
3895     Defining RETSIGTYPE = $ac_cv_type_signal
3896 EOF
3897 cat >> confdefs.h <<EOF
3898 #define RETSIGTYPE $ac_cv_type_signal
3899 EOF
3900 }
3901
3902
3903 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3904 echo "configure:3905: checking for size_t" >&5
3905
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <sys/types.h>
3910 #if STDC_HEADERS
3911 #include <stdlib.h>
3912 #include <stddef.h>
3913 #endif
3914 EOF
3915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3916   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3917   rm -rf conftest*
3918   ac_cv_type_size_t=yes
3919 else
3920   rm -rf conftest*
3921   ac_cv_type_size_t=no
3922 fi
3923 rm -f conftest*
3924
3925 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3926 if test $ac_cv_type_size_t = no; then
3927   { test "$extra_verbose" = "yes" && cat << \EOF
3928     Defining size_t = unsigned
3929 EOF
3930 cat >> confdefs.h <<\EOF
3931 #define size_t unsigned
3932 EOF
3933 }
3934
3935 fi
3936
3937 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3938 echo "configure:3939: checking for pid_t" >&5
3939
3940 cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943 #include <sys/types.h>
3944 #if STDC_HEADERS
3945 #include <stdlib.h>
3946 #include <stddef.h>
3947 #endif
3948 EOF
3949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3950   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3951   rm -rf conftest*
3952   ac_cv_type_pid_t=yes
3953 else
3954   rm -rf conftest*
3955   ac_cv_type_pid_t=no
3956 fi
3957 rm -f conftest*
3958
3959 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3960 if test $ac_cv_type_pid_t = no; then
3961   { test "$extra_verbose" = "yes" && cat << \EOF
3962     Defining pid_t = int
3963 EOF
3964 cat >> confdefs.h <<\EOF
3965 #define pid_t int
3966 EOF
3967 }
3968
3969 fi
3970
3971 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3972 echo "configure:3973: checking for uid_t in sys/types.h" >&5
3973
3974 cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 #include <sys/types.h>
3978 EOF
3979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3980   egrep "uid_t" >/dev/null 2>&1; then
3981   rm -rf conftest*
3982   ac_cv_type_uid_t=yes
3983 else
3984   rm -rf conftest*
3985   ac_cv_type_uid_t=no
3986 fi
3987 rm -f conftest*
3988
3989
3990 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3991 if test $ac_cv_type_uid_t = no; then
3992   { test "$extra_verbose" = "yes" && cat << \EOF
3993     Defining uid_t = int
3994 EOF
3995 cat >> confdefs.h <<\EOF
3996 #define uid_t int
3997 EOF
3998 }
3999
4000   { test "$extra_verbose" = "yes" && cat << \EOF
4001     Defining gid_t = int
4002 EOF
4003 cat >> confdefs.h <<\EOF
4004 #define gid_t int
4005 EOF
4006 }
4007
4008 fi
4009
4010 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4011 echo "configure:4012: checking for mode_t" >&5
4012
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <sys/types.h>
4017 #if STDC_HEADERS
4018 #include <stdlib.h>
4019 #include <stddef.h>
4020 #endif
4021 EOF
4022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4023   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4024   rm -rf conftest*
4025   ac_cv_type_mode_t=yes
4026 else
4027   rm -rf conftest*
4028   ac_cv_type_mode_t=no
4029 fi
4030 rm -f conftest*
4031
4032 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4033 if test $ac_cv_type_mode_t = no; then
4034   { test "$extra_verbose" = "yes" && cat << \EOF
4035     Defining mode_t = int
4036 EOF
4037 cat >> confdefs.h <<\EOF
4038 #define mode_t int
4039 EOF
4040 }
4041
4042 fi
4043
4044 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4045 echo "configure:4046: checking for off_t" >&5
4046
4047 cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 #include <sys/types.h>
4051 #if STDC_HEADERS
4052 #include <stdlib.h>
4053 #include <stddef.h>
4054 #endif
4055 EOF
4056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4057   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4058   rm -rf conftest*
4059   ac_cv_type_off_t=yes
4060 else
4061   rm -rf conftest*
4062   ac_cv_type_off_t=no
4063 fi
4064 rm -f conftest*
4065
4066 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4067 if test $ac_cv_type_off_t = no; then
4068   { test "$extra_verbose" = "yes" && cat << \EOF
4069     Defining off_t = long
4070 EOF
4071 cat >> confdefs.h <<\EOF
4072 #define off_t long
4073 EOF
4074 }
4075
4076 fi
4077
4078 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4079 echo "configure:4080: checking for ssize_t" >&5
4080
4081 cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 #include <sys/types.h>
4085 #if STDC_HEADERS
4086 #include <stdlib.h>
4087 #include <stddef.h>
4088 #endif
4089 EOF
4090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4091   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4092   rm -rf conftest*
4093   ac_cv_type_ssize_t=yes
4094 else
4095   rm -rf conftest*
4096   ac_cv_type_ssize_t=no
4097 fi
4098 rm -f conftest*
4099
4100 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4101 if test $ac_cv_type_ssize_t = no; then
4102   { test "$extra_verbose" = "yes" && cat << \EOF
4103     Defining ssize_t = int
4104 EOF
4105 cat >> confdefs.h <<\EOF
4106 #define ssize_t int
4107 EOF
4108 }
4109
4110 fi
4111
4112
4113 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4114 echo "configure:4115: checking for socklen_t" >&5
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 #include <sys/types.h>
4119 #include <sys/socket.h>
4120 socklen_t x;
4121
4122 int main() {
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127   rm -rf conftest*
4128   echo "$ac_t""yes" 1>&6
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <sys/types.h>
4138 #include <sys/socket.h>
4139 int accept (int, struct sockaddr *, size_t *);
4140
4141 int main() {
4142
4143 ; return 0; }
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146   rm -rf conftest*
4147   
4148 echo "$ac_t""size_t" 1>&6
4149 { test "$extra_verbose" = "yes" && cat << \EOF
4150     Defining socklen_t = size_t
4151 EOF
4152 cat >> confdefs.h <<\EOF
4153 #define socklen_t size_t
4154 EOF
4155 }
4156
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   
4162 echo "$ac_t""int" 1>&6
4163 { test "$extra_verbose" = "yes" && cat << \EOF
4164     Defining socklen_t = int
4165 EOF
4166 cat >> confdefs.h <<\EOF
4167 #define socklen_t int
4168 EOF
4169 }
4170
4171 fi
4172 rm -f conftest*
4173 fi
4174 rm -f conftest*
4175
4176 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4177 echo "configure:4178: checking for struct timeval" >&5
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 #ifdef TIME_WITH_SYS_TIME
4182 #include <sys/time.h>
4183 #include <time.h>
4184 #else
4185 #ifdef HAVE_SYS_TIME_H
4186 #include <sys/time.h>
4187 #else
4188 #include <time.h>
4189 #endif
4190 #endif
4191 int main() {
4192 static struct timeval x; x.tv_sec = x.tv_usec;
4193 ; return 0; }
4194 EOF
4195 if { (eval echo configure:4196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196   rm -rf conftest*
4197   echo "$ac_t""yes" 1>&6
4198   HAVE_TIMEVAL=yes
4199   { test "$extra_verbose" = "yes" && cat << \EOF
4200     Defining HAVE_TIMEVAL
4201 EOF
4202 cat >> confdefs.h <<\EOF
4203 #define HAVE_TIMEVAL 1
4204 EOF
4205 }
4206
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   echo "$ac_t""no" 1>&6
4212    HAVE_TIMEVAL=no
4213 fi
4214 rm -f conftest*
4215
4216 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4217 echo "configure:4218: checking whether struct tm is in sys/time.h or time.h" >&5
4218
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 #include <sys/types.h>
4223 #include <time.h>
4224 int main() {
4225 struct tm *tp; tp->tm_sec;
4226 ; return 0; }
4227 EOF
4228 if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4229   rm -rf conftest*
4230   ac_cv_struct_tm=time.h
4231 else
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   ac_cv_struct_tm=sys/time.h
4236 fi
4237 rm -f conftest*
4238
4239 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4240 if test $ac_cv_struct_tm = sys/time.h; then
4241   { test "$extra_verbose" = "yes" && cat << \EOF
4242     Defining TM_IN_SYS_TIME
4243 EOF
4244 cat >> confdefs.h <<\EOF
4245 #define TM_IN_SYS_TIME 1
4246 EOF
4247 }
4248
4249 fi
4250
4251 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4252 echo "configure:4253: checking for tm_zone in struct tm" >&5
4253
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <sys/types.h>
4258 #include <$ac_cv_struct_tm>
4259 int main() {
4260 struct tm tm; tm.tm_zone;
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4264   rm -rf conftest*
4265   ac_cv_struct_tm_zone=yes
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   ac_cv_struct_tm_zone=no
4271 fi
4272 rm -f conftest*
4273
4274 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4275 if test "$ac_cv_struct_tm_zone" = yes; then
4276   { test "$extra_verbose" = "yes" && cat << \EOF
4277     Defining HAVE_TM_ZONE
4278 EOF
4279 cat >> confdefs.h <<\EOF
4280 #define HAVE_TM_ZONE 1
4281 EOF
4282 }
4283
4284 else
4285   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4286 echo "configure:4287: checking for tzname" >&5
4287
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <time.h>
4292 #ifndef tzname /* For SGI.  */
4293 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4294 #endif
4295 int main() {
4296 atoi(*tzname);
4297 ; return 0; }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4300   rm -rf conftest*
4301   ac_cv_var_tzname=yes
4302 else
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -rf conftest*
4306   ac_cv_var_tzname=no
4307 fi
4308 rm -f conftest*
4309
4310 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4311   if test $ac_cv_var_tzname = yes; then
4312     { test "$extra_verbose" = "yes" && cat << \EOF
4313     Defining HAVE_TZNAME
4314 EOF
4315 cat >> confdefs.h <<\EOF
4316 #define HAVE_TZNAME 1
4317 EOF
4318 }
4319
4320   fi
4321 fi
4322
4323
4324 echo $ac_n "checking for working const""... $ac_c" 1>&6
4325 echo "configure:4326: checking for working const" >&5
4326
4327 cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330
4331 int main() {
4332
4333 /* Ultrix mips cc rejects this.  */
4334 typedef int charset[2]; const charset x;
4335 /* SunOS 4.1.1 cc rejects this.  */
4336 char const *const *ccp;
4337 char **p;
4338 /* NEC SVR4.0.2 mips cc rejects this.  */
4339 struct point {int x, y;};
4340 static struct point const zero = {0,0};
4341 /* AIX XL C 1.02.0.0 rejects this.
4342    It does not let you subtract one const X* pointer from another in an arm
4343    of an if-expression whose if-part is not a constant expression */
4344 const char *g = "string";
4345 ccp = &g + (g ? g-g : 0);
4346 /* HPUX 7.0 cc rejects these. */
4347 ++ccp;
4348 p = (char**) ccp;
4349 ccp = (char const *const *) p;
4350 { /* SCO 3.2v4 cc rejects this.  */
4351   char *t;
4352   char const *s = 0 ? (char *) 0 : (char const *) 0;
4353
4354   *t++ = 0;
4355 }
4356 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4357   int x[] = {25, 17};
4358   const int *foo = &x[0];
4359   ++foo;
4360 }
4361 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4362   typedef const int *iptr;
4363   iptr p = 0;
4364   ++p;
4365 }
4366 { /* AIX XL C 1.02.0.0 rejects this saying
4367      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4368   struct s { int j; const int *ap[3]; };
4369   struct s *b; b->j = 5;
4370 }
4371 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4372   const int foo = 10;
4373 }
4374
4375 ; return 0; }
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4378   rm -rf conftest*
4379   ac_cv_c_const=yes
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   ac_cv_c_const=no
4385 fi
4386 rm -f conftest*
4387
4388 echo "$ac_t""$ac_cv_c_const" 1>&6
4389 if test $ac_cv_c_const = no; then
4390   { test "$extra_verbose" = "yes" && cat << \EOF
4391     Defining const = 
4392 EOF
4393 cat >> confdefs.h <<\EOF
4394 #define const 
4395 EOF
4396 }
4397
4398 fi
4399
4400
4401 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4402 echo "configure:4403: checking whether ${MAKE-make} sets \${MAKE}" >&5
4403 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4404
4405 cat > conftestmake <<\EOF
4406 all:
4407         @echo 'ac_maketemp="${MAKE}"'
4408 EOF
4409 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4410 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4411 if test -n "$ac_maketemp"; then
4412   eval ac_cv_prog_make_${ac_make}_set=yes
4413 else
4414   eval ac_cv_prog_make_${ac_make}_set=no
4415 fi
4416 rm -f conftestmake
4417 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4418   echo "$ac_t""yes" 1>&6
4419   SET_MAKE=
4420 else
4421   echo "$ac_t""no" 1>&6
4422   SET_MAKE="MAKE=${MAKE-make}"
4423 fi
4424
4425
4426 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4427 echo "configure:4428: checking whether byte ordering is bigendian" >&5
4428
4429 ac_cv_c_bigendian=unknown
4430 # See if sys/param.h defines the BYTE_ORDER macro.
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 #include <sys/types.h>
4435 #include <sys/param.h>
4436 int main() {
4437
4438 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4439  bogus endian macros
4440 #endif
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4444   rm -rf conftest*
4445   # It does; now see whether it defined to BIG_ENDIAN or not.
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449 #include <sys/types.h>
4450 #include <sys/param.h>
4451 int main() {
4452
4453 #if BYTE_ORDER != BIG_ENDIAN
4454  not big endian
4455 #endif
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4459   rm -rf conftest*
4460   ac_cv_c_bigendian=yes
4461 else
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   ac_cv_c_bigendian=no
4466 fi
4467 rm -f conftest*
4468 else
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471 fi
4472 rm -f conftest*
4473 if test $ac_cv_c_bigendian = unknown; then
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 main () {
4478   /* Are we little or big endian?  From Harbison&Steele.  */
4479   union
4480   {
4481     long l;
4482     char c[sizeof (long)];
4483   } u;
4484   u.l = 1;
4485   exit (u.c[sizeof (long) - 1] == 1);
4486 }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4489 then
4490   ac_cv_c_bigendian=no
4491 else
4492   conftest_rc="$?"
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -fr conftest*
4496   ac_cv_c_bigendian=yes
4497 fi
4498 rm -fr conftest*
4499 fi
4500
4501 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4502 if test $ac_cv_c_bigendian = yes; then
4503   { test "$extra_verbose" = "yes" && cat << \EOF
4504     Defining WORDS_BIGENDIAN
4505 EOF
4506 cat >> confdefs.h <<\EOF
4507 #define WORDS_BIGENDIAN 1
4508 EOF
4509 }
4510
4511 fi
4512
4513
4514 echo $ac_n "checking size of short""... $ac_c" 1>&6
4515 echo "configure:4516: checking size of short" >&5
4516
4517 cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <stdio.h>
4521 main()
4522 {
4523   FILE *f=fopen("conftestval", "w");
4524   if (!f) exit(1);
4525   fprintf(f, "%d\n", sizeof(short));
4526   exit(0);
4527 }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4530 then
4531   ac_cv_sizeof_short=`cat conftestval`
4532 else
4533   conftest_rc="$?"
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -fr conftest*
4537   ac_cv_sizeof_short=0
4538 fi
4539 rm -fr conftest*
4540 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4541 { test "$extra_verbose" = "yes" && cat << EOF
4542     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4543 EOF
4544 cat >> confdefs.h <<EOF
4545 #define SIZEOF_SHORT $ac_cv_sizeof_short
4546 EOF
4547 }
4548
4549
4550 if test "$ac_cv_sizeof_short" = 0; then
4551   echo ""
4552   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4553   echo "*** PANIC *** Please examine config.log for compilation errors."
4554   exit 1
4555 fi
4556 echo $ac_n "checking size of int""... $ac_c" 1>&6
4557 echo "configure:4558: checking size of int" >&5
4558
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <stdio.h>
4563 main()
4564 {
4565   FILE *f=fopen("conftestval", "w");
4566   if (!f) exit(1);
4567   fprintf(f, "%d\n", sizeof(int));
4568   exit(0);
4569 }
4570 EOF
4571 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4572 then
4573   ac_cv_sizeof_int=`cat conftestval`
4574 else
4575   conftest_rc="$?"
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -fr conftest*
4579   ac_cv_sizeof_int=0
4580 fi
4581 rm -fr conftest*
4582 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4583 { test "$extra_verbose" = "yes" && cat << EOF
4584     Defining SIZEOF_INT = $ac_cv_sizeof_int
4585 EOF
4586 cat >> confdefs.h <<EOF
4587 #define SIZEOF_INT $ac_cv_sizeof_int
4588 EOF
4589 }
4590
4591
4592 echo $ac_n "checking size of long""... $ac_c" 1>&6
4593 echo "configure:4594: checking size of long" >&5
4594
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <stdio.h>
4599 main()
4600 {
4601   FILE *f=fopen("conftestval", "w");
4602   if (!f) exit(1);
4603   fprintf(f, "%d\n", sizeof(long));
4604   exit(0);
4605 }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4608 then
4609   ac_cv_sizeof_long=`cat conftestval`
4610 else
4611   conftest_rc="$?"
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -fr conftest*
4615   ac_cv_sizeof_long=0
4616 fi
4617 rm -fr conftest*
4618 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4619 { test "$extra_verbose" = "yes" && cat << EOF
4620     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4621 EOF
4622 cat >> confdefs.h <<EOF
4623 #define SIZEOF_LONG $ac_cv_sizeof_long
4624 EOF
4625 }
4626
4627
4628 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4629 echo "configure:4630: checking size of long long" >&5
4630
4631 cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634 #include <stdio.h>
4635 main()
4636 {
4637   FILE *f=fopen("conftestval", "w");
4638   if (!f) exit(1);
4639   fprintf(f, "%d\n", sizeof(long long));
4640   exit(0);
4641 }
4642 EOF
4643 if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4644 then
4645   ac_cv_sizeof_long_long=`cat conftestval`
4646 else
4647   conftest_rc="$?"
4648   echo "configure: failed program was:" >&5
4649   cat conftest.$ac_ext >&5
4650   rm -fr conftest*
4651   ac_cv_sizeof_long_long=0
4652 fi
4653 rm -fr conftest*
4654 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4655 { test "$extra_verbose" = "yes" && cat << EOF
4656     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4657 EOF
4658 cat >> confdefs.h <<EOF
4659 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4660 EOF
4661 }
4662
4663
4664 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4665 echo "configure:4666: checking size of void *" >&5
4666
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 #include <stdio.h>
4671 main()
4672 {
4673   FILE *f=fopen("conftestval", "w");
4674   if (!f) exit(1);
4675   fprintf(f, "%d\n", sizeof(void *));
4676   exit(0);
4677 }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4680 then
4681   ac_cv_sizeof_void_p=`cat conftestval`
4682 else
4683   conftest_rc="$?"
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -fr conftest*
4687   ac_cv_sizeof_void_p=0
4688 fi
4689 rm -fr conftest*
4690 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4691 { test "$extra_verbose" = "yes" && cat << EOF
4692     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4693 EOF
4694 cat >> confdefs.h <<EOF
4695 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4696 EOF
4697 }
4698
4699
4700
4701 case $opsys in
4702   cygwin* ) cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <cygwin/types.h>
4706 EOF
4707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4709   rm -rf conftest*
4710   echo "$ac_t""yes" 1>&6
4711                              { test "$extra_verbose" = "yes" && cat << \EOF
4712     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4713 EOF
4714 cat >> confdefs.h <<\EOF
4715 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4716 EOF
4717 }
4718
4719 else
4720   rm -rf conftest*
4721   echo "$ac_t""no" 1>&6
4722 fi
4723 rm -f conftest*
4724  ;;
4725 esac
4726
4727 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4728 echo "configure:4729: checking for long file names" >&5
4729
4730 ac_cv_sys_long_file_names=yes
4731 # Test for long file names in all the places we know might matter:
4732 #      .                the current directory, where building will happen
4733 #      $prefix/lib      where we will be installing things
4734 #      $exec_prefix/lib likewise
4735 # eval it to expand exec_prefix.
4736 #      $TMPDIR          if set, where it might want to write temporary files
4737 # if $TMPDIR is not set:
4738 #      /tmp             where it might want to write temporary files
4739 #      /var/tmp         likewise
4740 #      /usr/tmp         likewise
4741 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4742   ac_tmpdirs="$TMPDIR"
4743 else
4744   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4745 fi
4746 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4747   test -d $ac_dir || continue
4748   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4749   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4750   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4751   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4752   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4753     ac_cv_sys_long_file_names=no
4754     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4755     break
4756   fi
4757   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4758 done
4759
4760 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4761 if test $ac_cv_sys_long_file_names = yes; then
4762   { test "$extra_verbose" = "yes" && cat << \EOF
4763     Defining HAVE_LONG_FILE_NAMES
4764 EOF
4765 cat >> confdefs.h <<\EOF
4766 #define HAVE_LONG_FILE_NAMES 1
4767 EOF
4768 }
4769
4770 fi
4771
4772
4773 echo $ac_n "checking for sin""... $ac_c" 1>&6
4774 echo "configure:4775: checking for sin" >&5
4775
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* System header to define __stub macros and hopefully few prototypes,
4780     which can conflict with char sin(); below.  */
4781 #include <assert.h>
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char sin();
4786
4787 int main() {
4788
4789 /* The GNU C library defines this for functions which it implements
4790     to always fail with ENOSYS.  Some functions are actually named
4791     something starting with __ and the normal name is an alias.  */
4792 #if defined (__stub_sin) || defined (__stub___sin)
4793 choke me
4794 #else
4795 sin();
4796 #endif
4797
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   eval "ac_cv_func_sin=yes"
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   eval "ac_cv_func_sin=no"
4808 fi
4809 rm -f conftest*
4810
4811 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4812   echo "$ac_t""yes" 1>&6
4813   :
4814 else
4815   echo "$ac_t""no" 1>&6
4816
4817 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4818 echo "configure:4819: checking for sin in -lm" >&5
4819 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4820
4821 xe_check_libs=" -lm "
4822 cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 /* Override any gcc2 internal prototype to avoid an error.  */
4826 /* We use char because int might match the return type of a gcc2
4827     builtin and then its argument prototype would still apply.  */
4828 char sin();
4829
4830 int main() {
4831 sin()
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4835   rm -rf conftest*
4836   eval "ac_cv_lib_$ac_lib_var=yes"
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_lib_$ac_lib_var=no"
4842 fi
4843 rm -f conftest*
4844 xe_check_libs=""
4845
4846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4847   echo "$ac_t""yes" 1>&6
4848     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4849     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4850   { test "$extra_verbose" = "yes" && cat << EOF
4851     Defining $ac_tr_lib
4852 EOF
4853 cat >> confdefs.h <<EOF
4854 #define $ac_tr_lib 1
4855 EOF
4856 }
4857
4858   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4859
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863
4864
4865 fi
4866
4867
4868 { test "$extra_verbose" = "yes" && cat << \EOF
4869     Defining LISP_FLOAT_TYPE
4870 EOF
4871 cat >> confdefs.h <<\EOF
4872 #define LISP_FLOAT_TYPE 1
4873 EOF
4874 }
4875
4876
4877 cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 #include <math.h>
4881 int main() {
4882 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   { test "$extra_verbose" = "yes" && cat << \EOF
4888     Defining HAVE_INVERSE_HYPERBOLIC
4889 EOF
4890 cat >> confdefs.h <<\EOF
4891 #define HAVE_INVERSE_HYPERBOLIC 1
4892 EOF
4893 }
4894
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898 fi
4899 rm -f conftest*
4900
4901 echo "checking type of mail spool file locking" 1>&6
4902 echo "configure:4903: checking type of mail spool file locking" >&5
4903 for ac_func in lockf flock
4904 do
4905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4906 echo "configure:4907: checking for $ac_func" >&5
4907
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 /* System header to define __stub macros and hopefully few prototypes,
4912     which can conflict with char $ac_func(); below.  */
4913 #include <assert.h>
4914 /* Override any gcc2 internal prototype to avoid an error.  */
4915 /* We use char because int might match the return type of a gcc2
4916     builtin and then its argument prototype would still apply.  */
4917 char $ac_func();
4918
4919 int main() {
4920
4921 /* The GNU C library defines this for functions which it implements
4922     to always fail with ENOSYS.  Some functions are actually named
4923     something starting with __ and the normal name is an alias.  */
4924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4925 choke me
4926 #else
4927 $ac_func();
4928 #endif
4929
4930 ; return 0; }
4931 EOF
4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4933   rm -rf conftest*
4934   eval "ac_cv_func_$ac_func=yes"
4935 else
4936   echo "configure: failed program was:" >&5
4937   cat conftest.$ac_ext >&5
4938   rm -rf conftest*
4939   eval "ac_cv_func_$ac_func=no"
4940 fi
4941 rm -f conftest*
4942
4943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4946   { test "$extra_verbose" = "yes" && cat << EOF
4947     Defining $ac_tr_func
4948 EOF
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_func 1
4951 EOF
4952 }
4953  
4954 else
4955   echo "$ac_t""no" 1>&6
4956 fi
4957 done
4958
4959 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4960 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4961 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4962 if   test -z "$mail_locking"; then
4963   case "$opsys" in cygwin* | mingw*)
4964     mail_locking=pop ;;
4965   esac
4966 fi
4967
4968 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4969     Defining MAIL_LOCK_LOCKF
4970 EOF
4971 cat >> confdefs.h <<\EOF
4972 #define MAIL_LOCK_LOCKF 1
4973 EOF
4974 }
4975
4976 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4977     Defining MAIL_LOCK_FLOCK
4978 EOF
4979 cat >> confdefs.h <<\EOF
4980 #define MAIL_LOCK_FLOCK 1
4981 EOF
4982 }
4983
4984 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4985     Defining MAIL_LOCK_LOCKING
4986 EOF
4987 cat >> confdefs.h <<\EOF
4988 #define MAIL_LOCK_LOCKING 1
4989 EOF
4990 }
4991
4992 elif test "$mail_locking" = "pop"; then
4993   with_pop=yes
4994   mail_locking=
4995 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4996     Defining MAIL_LOCK_DOT
4997 EOF
4998 cat >> confdefs.h <<\EOF
4999 #define MAIL_LOCK_DOT 1
5000 EOF
5001 }
5002
5003 fi
5004 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5005   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5006 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5007   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5008 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5009   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5010
5011 case "$opsys" in decosf*)
5012   
5013 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5014 echo "configure:5015: checking for cma_open in -lpthreads" >&5
5015 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5016
5017 xe_check_libs=" -lpthreads "
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 /* We use char because int might match the return type of a gcc2
5023     builtin and then its argument prototype would still apply.  */
5024 char cma_open();
5025
5026 int main() {
5027 cma_open()
5028 ; return 0; }
5029 EOF
5030 if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5031   rm -rf conftest*
5032   eval "ac_cv_lib_$ac_lib_var=yes"
5033 else
5034   echo "configure: failed program was:" >&5
5035   cat conftest.$ac_ext >&5
5036   rm -rf conftest*
5037   eval "ac_cv_lib_$ac_lib_var=no"
5038 fi
5039 rm -f conftest*
5040 xe_check_libs=""
5041
5042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5043   echo "$ac_t""yes" 1>&6
5044     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5046   { test "$extra_verbose" = "yes" && cat << EOF
5047     Defining $ac_tr_lib
5048 EOF
5049 cat >> confdefs.h <<EOF
5050 #define $ac_tr_lib 1
5051 EOF
5052 }
5053
5054   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5055
5056 else
5057   echo "$ac_t""no" 1>&6
5058 fi
5059
5060
5061   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5062     c_switch_site="$c_switch_site -threads" ;;
5063 esac
5064
5065
5066 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5067 echo "configure:5068: checking whether the -xildoff compiler flag is required" >&5
5068 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5069   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5070     then echo "$ac_t""no" 1>&6;
5071     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
5072   fi
5073   else echo "$ac_t""no" 1>&6
5074 fi
5075
5076 if test "$opsys" = "sol2"; then
5077   if test "$os_release" -ge 506; then
5078     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5079 echo "configure:5080: checking for \"-z ignore\" linker flag" >&5
5080     case "`ld -h 2>&1`" in
5081       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5082         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5083       *) echo "$ac_t""no" 1>&6 ;;
5084     esac
5085   fi
5086 fi
5087
5088
5089 echo "checking "for specified window system"" 1>&6
5090 echo "configure:5091: checking "for specified window system"" >&5
5091
5092
5093 GNOME_CONFIG=no
5094 GTK_CONFIG=no
5095
5096 if test "$with_gnome" != "no"; then
5097    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5098 echo "configure:5099: checking for GNOME configuration script" >&5
5099    for possible in gnome-config
5100    do
5101       possible_version=`${possible} --version 2> /dev/null`
5102       if test "x${possible_version}" != "x"; then
5103               GNOME_CONFIG="${possible}"
5104               with_gnome=yes
5105               with_gtk=yes
5106               break
5107       fi
5108    done
5109    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5110 fi
5111
5112 if test "${GNOME_CONFIG}" != "no"; then
5113       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5114       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5115       { test "$extra_verbose" = "yes" && cat << \EOF
5116     Defining HAVE_GNOME
5117 EOF
5118 cat >> confdefs.h <<\EOF
5119 #define HAVE_GNOME 1
5120 EOF
5121 }
5122
5123       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5124       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5125 fi
5126
5127 if test "$with_gtk" != "no";then
5128    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5129 echo "configure:5130: checking for GTK configuration script" >&5
5130    for possible in gtk12-config gtk14-config gtk-config
5131    do
5132       possible_version=`${possible} --version 2> /dev/null`
5133       if test "x${possible_version}" != "x"; then
5134               GTK_CONFIG="${possible}"
5135               case "${possible_version}" in
5136                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5137                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5138                 1.2.*)
5139                         with_gtk=yes
5140                         break
5141                         ;;
5142                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5143               esac
5144       fi
5145    done
5146    echo "$ac_t""${GTK_CONFIG}" 1>&6
5147 fi
5148
5149 if test "${GTK_CONFIG}" != "no"; then
5150       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5151 echo "configure:5152: checking gtk version" >&5
5152       GTK_VERSION=`${GTK_CONFIG} --version`
5153       echo "$ac_t""${GTK_VERSION}" 1>&6
5154
5155       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5156 echo "configure:5157: checking gtk libs" >&5
5157       GTK_LIBS=`${GTK_CONFIG} --libs`
5158       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5159       echo "$ac_t""${GTK_LIBS}" 1>&6
5160
5161       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5162 echo "configure:5163: checking gtk cflags" >&5
5163       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5164       if test "$GCC" = "yes"; then
5165         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5166       fi
5167       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5168       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5169
5170       
5171 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5172 echo "configure:5173: checking for main in -lgdk_imlib" >&5
5173 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5174
5175 xe_check_libs=" -lgdk_imlib "
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179
5180 int main() {
5181 main()
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=yes"
5187 else
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=no"
5192 fi
5193 rm -f conftest*
5194 xe_check_libs=""
5195
5196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5197   echo "$ac_t""yes" 1>&6
5198   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5199 else
5200   echo "$ac_t""no" 1>&6
5201 fi
5202
5203
5204       
5205 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5206 echo "configure:5207: checking for Imlib_init in -lImlib" >&5
5207 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5208
5209 xe_check_libs=" -lImlib "
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char Imlib_init();
5217
5218 int main() {
5219 Imlib_init()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 xe_check_libs=""
5233
5234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5235   echo "$ac_t""yes" 1>&6
5236   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5237 else
5238   echo "$ac_t""no" 1>&6
5239 fi
5240
5241
5242       for ac_func in gdk_imlib_init
5243 do
5244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5245 echo "configure:5246: checking for $ac_func" >&5
5246
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* System header to define __stub macros and hopefully few prototypes,
5251     which can conflict with char $ac_func(); below.  */
5252 #include <assert.h>
5253 /* Override any gcc2 internal prototype to avoid an error.  */
5254 /* We use char because int might match the return type of a gcc2
5255     builtin and then its argument prototype would still apply.  */
5256 char $ac_func();
5257
5258 int main() {
5259
5260 /* The GNU C library defines this for functions which it implements
5261     to always fail with ENOSYS.  Some functions are actually named
5262     something starting with __ and the normal name is an alias.  */
5263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5264 choke me
5265 #else
5266 $ac_func();
5267 #endif
5268
5269 ; return 0; }
5270 EOF
5271 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5272   rm -rf conftest*
5273   eval "ac_cv_func_$ac_func=yes"
5274 else
5275   echo "configure: failed program was:" >&5
5276   cat conftest.$ac_ext >&5
5277   rm -rf conftest*
5278   eval "ac_cv_func_$ac_func=no"
5279 fi
5280 rm -f conftest*
5281
5282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5285   { test "$extra_verbose" = "yes" && cat << EOF
5286     Defining $ac_tr_func
5287 EOF
5288 cat >> confdefs.h <<EOF
5289 #define $ac_tr_func 1
5290 EOF
5291 }
5292  
5293 else
5294   echo "$ac_t""no" 1>&6
5295 fi
5296 done
5297
5298
5299       { test "$extra_verbose" = "yes" && cat << \EOF
5300     Defining HAVE_XPM
5301 EOF
5302 cat >> confdefs.h <<\EOF
5303 #define HAVE_XPM 1
5304 EOF
5305 }
5306
5307       { test "$extra_verbose" = "yes" && cat << \EOF
5308     Defining HAVE_GTK
5309 EOF
5310 cat >> confdefs.h <<\EOF
5311 #define HAVE_GTK 1
5312 EOF
5313 }
5314
5315       
5316
5317       window_system=gtk
5318       with_gtk=yes
5319       with_x11=no
5320
5321       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5322       test "${with_toolbars}" != no && with_toolbars=gtk
5323       test "${with_menubars}" != "no" && with_menubars=gtk
5324       test "${with_dialogs}" != "no" && with_dialogs=gtk
5325       test "${with_widgets}" != "no" && with_widgets=gtk
5326
5327       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5328    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5329  fi
5330       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5331    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5332  fi
5333       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5334    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5335  fi
5336       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5337    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5338  fi
5339
5340             OLD_CFLAGS="${CFLAGS}"
5341       OLD_CPPFLAGS="${CPPFLAGS}"
5342       OLD_LDFLAGS="${LDFLAGS}"
5343       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5344       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5345       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5346       for ac_hdr in glade/glade.h glade.h
5347 do
5348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5350 echo "configure:5351: checking for $ac_hdr" >&5
5351
5352 cat > conftest.$ac_ext <<EOF
5353 #line 5354 "configure"
5354 #include "confdefs.h"
5355 #include <$ac_hdr>
5356 EOF
5357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5358 { (eval echo configure:5359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5360 if test -z "$ac_err"; then
5361   rm -rf conftest*
5362   eval "ac_cv_header_$ac_safe=yes"
5363 else
5364   echo "$ac_err" >&5
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_header_$ac_safe=no"
5369 fi
5370 rm -f conftest*
5371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5372   echo "$ac_t""yes" 1>&6
5373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5374   { test "$extra_verbose" = "yes" && cat << EOF
5375     Defining $ac_tr_hdr
5376 EOF
5377 cat >> confdefs.h <<EOF
5378 #define $ac_tr_hdr 1
5379 EOF
5380 }
5381  
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385 done
5386
5387       
5388 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5389 echo "configure:5390: checking for main in -lxml" >&5
5390 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5391
5392 xe_check_libs=" -lxml "
5393 cat > conftest.$ac_ext <<EOF
5394 #line 5395 "configure"
5395 #include "confdefs.h"
5396
5397 int main() {
5398 main()
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=yes"
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=no"
5409 fi
5410 rm -f conftest*
5411 xe_check_libs=""
5412
5413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5414   echo "$ac_t""yes" 1>&6
5415   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5416 else
5417   echo "$ac_t""no" 1>&6
5418 fi
5419
5420
5421       
5422 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5423 echo "configure:5424: checking for main in -lglade" >&5
5424 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5425
5426 xe_check_libs=" -lglade "
5427 cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430
5431 int main() {
5432 main()
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   eval "ac_cv_lib_$ac_lib_var=yes"
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_lib_$ac_lib_var=no"
5443 fi
5444 rm -f conftest*
5445 xe_check_libs=""
5446
5447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5448   echo "$ac_t""yes" 1>&6
5449   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5450 else
5451   echo "$ac_t""no" 1>&6
5452 fi
5453
5454
5455       
5456 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5457 echo "configure:5458: checking for main in -lglade-gnome" >&5
5458 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5459
5460 xe_check_libs=" -lglade-gnome "
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464
5465 int main() {
5466 main()
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_lib_$ac_lib_var=no"
5477 fi
5478 rm -f conftest*
5479 xe_check_libs=""
5480
5481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5482   echo "$ac_t""yes" 1>&6
5483   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5484 else
5485   echo "$ac_t""no" 1>&6
5486 fi
5487
5488
5489       cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 #include <glade/glade-xml.h>
5493 EOF
5494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5495   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5496   rm -rf conftest*
5497   echo "$ac_t""yes" 1>&6
5498                        { test "$extra_verbose" = "yes" && cat << \EOF
5499     Defining LIBGLADE_XML_TXTDOMAIN = 1
5500 EOF
5501 cat >> confdefs.h <<\EOF
5502 #define LIBGLADE_XML_TXTDOMAIN 1
5503 EOF
5504 }
5505
5506 else
5507   rm -rf conftest*
5508   echo "$ac_t""no" 1>&6
5509 fi
5510 rm -f conftest*
5511
5512       CFLAGS="${OLD_CFLAGS}"
5513       CPPFLAGS="${OLD_CPPFLAGS}"
5514       LDFLAGS="${OLD_LDFLAGS}"
5515 fi
5516
5517
5518 if test "$with_x11" != "no"; then
5519     test "$x_includes $x_libraries" != "NONE NONE" && \
5520    window_system=x11 with_x11=yes
5521
5522         
5523       if test "$x_includes $x_libraries" = "NONE NONE" \
5524     -a -n "$OPENWINHOME" \
5525     -a "$OPENWINHOME" != "/usr/openwin" \
5526     -a -d "$OPENWINHOME"; then
5527       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5528       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5529       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5530   fi
5531
5532   if test "$x_includes" = "NONE"; then
5533                     for dir in "/usr/X11" "/usr/X11R6"; do
5534       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5535     done
5536   fi
5537
5538   if test "$x_libraries" = "NONE"; then
5539     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5540       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5541     done
5542   fi
5543
5544   # If we find X, set shell vars x_includes and x_libraries to the
5545 # paths, otherwise set no_x=yes.
5546 # Uses ac_ vars as temps to allow command line to override cache and checks.
5547 # --without-x overrides everything else, but does not touch the cache.
5548 echo $ac_n "checking for X""... $ac_c" 1>&6
5549 echo "configure:5550: checking for X" >&5
5550
5551 # Check whether --with-x or --without-x was given.
5552 if test "${with_x+set}" = set; then
5553   withval="$with_x"
5554   :
5555 fi
5556
5557 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5558 if test "x$with_x" = xno; then
5559   # The user explicitly disabled X.
5560   have_x=disabled
5561 else
5562   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5563     # Both variables are already set.
5564     have_x=yes
5565   else
5566
5567 # One or both of the vars are not set, and there is no cached value.
5568 ac_x_includes=NO ac_x_libraries=NO
5569 rm -fr conftestdir
5570 if mkdir conftestdir; then
5571   cd conftestdir
5572   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5573   cat > Imakefile <<'EOF'
5574 acfindx:
5575         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5576 EOF
5577   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5578     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5579     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5580     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5581     for ac_extension in a so sl; do
5582       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5583         test -f $ac_im_libdir/libX11.$ac_extension; then
5584         ac_im_usrlibdir=$ac_im_libdir; break
5585       fi
5586     done
5587     # Screen out bogus values from the imake configuration.  They are
5588     # bogus both because they are the default anyway, and because
5589     # using them would break gcc on systems where it needs fixed includes.
5590     case "$ac_im_incroot" in
5591         /usr/include) ;;
5592         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5593     esac
5594     case "$ac_im_usrlibdir" in
5595         /usr/lib | /lib) ;;
5596         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5597     esac
5598   fi
5599   cd ..
5600   rm -fr conftestdir
5601 fi
5602
5603 if test "$ac_x_includes" = NO; then
5604   # Guess where to find include files, by looking for this one X11 .h file.
5605   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5606
5607   # First, try using that file with no special directory specified.
5608 cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611 #include <$x_direct_test_include>
5612 EOF
5613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5614 { (eval echo configure:5615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5616 if test -z "$ac_err"; then
5617   rm -rf conftest*
5618   # We can compile using X headers with no special include directory.
5619 ac_x_includes=
5620 else
5621   echo "$ac_err" >&5
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   # Look for the header file in a standard set of common directories.
5626 # Check X11 before X11Rn because it is often a symlink to the current release.
5627   for ac_dir in               \
5628     /usr/X11/include          \
5629     /usr/X11R6/include        \
5630     /usr/X11R5/include        \
5631     /usr/X11R4/include        \
5632                               \
5633     /usr/include/X11          \
5634     /usr/include/X11R6        \
5635     /usr/include/X11R5        \
5636     /usr/include/X11R4        \
5637                               \
5638     /usr/local/X11/include    \
5639     /usr/local/X11R6/include  \
5640     /usr/local/X11R5/include  \
5641     /usr/local/X11R4/include  \
5642                               \
5643     /usr/local/include/X11    \
5644     /usr/local/include/X11R6  \
5645     /usr/local/include/X11R5  \
5646     /usr/local/include/X11R4  \
5647                               \
5648     /usr/X386/include         \
5649     /usr/x386/include         \
5650     /usr/XFree86/include/X11  \
5651                               \
5652     /usr/include              \
5653     /usr/local/include        \
5654     /usr/unsupported/include  \
5655     /usr/athena/include       \
5656     /usr/local/x11r5/include  \
5657     /usr/lpp/Xamples/include  \
5658                               \
5659     /usr/openwin/include      \
5660     /usr/openwin/share/include \
5661     ; \
5662   do
5663     if test -r "$ac_dir/$x_direct_test_include"; then
5664       ac_x_includes=$ac_dir
5665       break
5666     fi
5667   done
5668 fi
5669 rm -f conftest*
5670 fi # $ac_x_includes = NO
5671
5672 if test "$ac_x_libraries" = NO; then
5673   # Check for the libraries.
5674
5675   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5676   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5677
5678   # See if we find them without any special options.
5679   # Don't add to $LIBS permanently.
5680   ac_save_LIBS="$LIBS"
5681   LIBS="-l$x_direct_test_library $LIBS"
5682 cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5685
5686 int main() {
5687 ${x_direct_test_function}()
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   LIBS="$ac_save_LIBS"
5693 # We can link X programs with no special library path.
5694 ac_x_libraries=
5695 else
5696   echo "configure: failed program was:" >&5
5697   cat conftest.$ac_ext >&5
5698   rm -rf conftest*
5699   LIBS="$ac_save_LIBS"
5700 # First see if replacing the include by lib works.
5701 # Check X11 before X11Rn because it is often a symlink to the current release.
5702 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5703     /usr/X11/lib          \
5704     /usr/X11R6/lib        \
5705     /usr/X11R5/lib        \
5706     /usr/X11R4/lib        \
5707                           \
5708     /usr/lib/X11          \
5709     /usr/lib/X11R6        \
5710     /usr/lib/X11R5        \
5711     /usr/lib/X11R4        \
5712                           \
5713     /usr/local/X11/lib    \
5714     /usr/local/X11R6/lib  \
5715     /usr/local/X11R5/lib  \
5716     /usr/local/X11R4/lib  \
5717                           \
5718     /usr/local/lib/X11    \
5719     /usr/local/lib/X11R6  \
5720     /usr/local/lib/X11R5  \
5721     /usr/local/lib/X11R4  \
5722                           \
5723     /usr/X386/lib         \
5724     /usr/x386/lib         \
5725     /usr/XFree86/lib/X11  \
5726                           \
5727     /usr/lib              \
5728     /usr/local/lib        \
5729     /usr/unsupported/lib  \
5730     /usr/athena/lib       \
5731     /usr/local/x11r5/lib  \
5732     /usr/lpp/Xamples/lib  \
5733     /lib/usr/lib/X11      \
5734                           \
5735     /usr/openwin/lib      \
5736     /usr/openwin/share/lib \
5737     ; \
5738 do
5739   for ac_extension in a so sl; do
5740     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5741       ac_x_libraries=$ac_dir
5742       break 2
5743     fi
5744   done
5745 done
5746 fi
5747 rm -f conftest*
5748 fi # $ac_x_libraries = NO
5749
5750 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5751   # Didn't find X anywhere.  Cache the known absence of X.
5752   ac_cv_have_x="have_x=no"
5753 else
5754   # Record where we found X for the cache.
5755   ac_cv_have_x="have_x=yes \
5756                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5757 fi
5758   fi
5759   eval "$ac_cv_have_x"
5760 fi # $with_x != no
5761
5762 if test "$have_x" != yes; then
5763   echo "$ac_t""$have_x" 1>&6
5764   no_x=yes
5765 else
5766   # If each of the values was on the command line, it overrides each guess.
5767   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5768   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5769   # Update the cache value to reflect the command line values.
5770   ac_cv_have_x="have_x=yes \
5771                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5772   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5773 fi
5774
5775 if test "$no_x" = yes; then
5776   # Not all programs may use this symbol, but it does not hurt to define it.
5777   { test "$extra_verbose" = "yes" && cat << \EOF
5778     Defining X_DISPLAY_MISSING
5779 EOF
5780 cat >> confdefs.h <<\EOF
5781 #define X_DISPLAY_MISSING 1
5782 EOF
5783 }
5784
5785   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5786 else
5787   if test -n "$x_includes"; then
5788     X_CFLAGS="$X_CFLAGS -I$x_includes"
5789   fi
5790
5791   # It would also be nice to do this for all -L options, not just this one.
5792   if test -n "$x_libraries"; then
5793     X_LIBS="$X_LIBS -L$x_libraries"
5794     # For Solaris; some versions of Sun CC require a space after -R and
5795     # others require no space.  Words are not sufficient . . . .
5796     case "`(uname -sr) 2>/dev/null`" in
5797     "SunOS 5"*)
5798       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5799 echo "configure:5800: checking whether -R must be followed by a space" >&5
5800       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5801       cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804
5805 int main() {
5806
5807 ; return 0; }
5808 EOF
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5810   rm -rf conftest*
5811   ac_R_nospace=yes
5812 else
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   ac_R_nospace=no
5817 fi
5818 rm -f conftest*
5819       if test $ac_R_nospace = yes; then
5820         echo "$ac_t""no" 1>&6
5821         X_LIBS="$X_LIBS -R$x_libraries"
5822       else
5823         LIBS="$ac_xsave_LIBS -R $x_libraries"
5824         cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827
5828 int main() {
5829
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   ac_R_space=yes
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   ac_R_space=no
5840 fi
5841 rm -f conftest*
5842         if test $ac_R_space = yes; then
5843           echo "$ac_t""yes" 1>&6
5844           X_LIBS="$X_LIBS -R $x_libraries"
5845         else
5846           echo "$ac_t""neither works" 1>&6
5847         fi
5848       fi
5849       LIBS="$ac_xsave_LIBS"
5850     esac
5851   fi
5852
5853   # Check for system-dependent libraries X programs must link with.
5854   # Do this before checking for the system-independent R6 libraries
5855   # (-lICE), since we may need -lsocket or whatever for X linking.
5856
5857   if test "$ISC" = yes; then
5858     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5859   else
5860     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5861     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5862     # the Alpha needs dnet_stub (dnet does not exist).
5863     if test "$with_dnet" = "no" ; then
5864 ac_cv_lib_dnet_dnet_ntoa=no
5865 else
5866
5867 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5868 echo "configure:5869: checking for dnet_ntoa in -ldnet" >&5
5869 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5870
5871 xe_check_libs=" -ldnet "
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 /* Override any gcc2 internal prototype to avoid an error.  */
5876 /* We use char because int might match the return type of a gcc2
5877     builtin and then its argument prototype would still apply.  */
5878 char dnet_ntoa();
5879
5880 int main() {
5881 dnet_ntoa()
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=yes"
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   eval "ac_cv_lib_$ac_lib_var=no"
5892 fi
5893 rm -f conftest*
5894 xe_check_libs=""
5895
5896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5897   echo "$ac_t""yes" 1>&6
5898   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902
5903 fi
5904
5905     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5906       
5907 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5908 echo "configure:5909: checking for dnet_ntoa in -ldnet_stub" >&5
5909 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5910
5911 xe_check_libs=" -ldnet_stub "
5912 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915 /* Override any gcc2 internal prototype to avoid an error.  */
5916 /* We use char because int might match the return type of a gcc2
5917     builtin and then its argument prototype would still apply.  */
5918 char dnet_ntoa();
5919
5920 int main() {
5921 dnet_ntoa()
5922 ; return 0; }
5923 EOF
5924 if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5925   rm -rf conftest*
5926   eval "ac_cv_lib_$ac_lib_var=yes"
5927 else
5928   echo "configure: failed program was:" >&5
5929   cat conftest.$ac_ext >&5
5930   rm -rf conftest*
5931   eval "ac_cv_lib_$ac_lib_var=no"
5932 fi
5933 rm -f conftest*
5934 xe_check_libs=""
5935
5936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5937   echo "$ac_t""yes" 1>&6
5938   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5939 else
5940   echo "$ac_t""no" 1>&6
5941 fi
5942
5943
5944     fi
5945
5946     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5947     # to get the SysV transport functions.
5948     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5949     # needs -lnsl.
5950     # The nsl library prevents programs from opening the X display
5951     # on Irix 5.2, according to dickey@clark.net.
5952     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5953 echo "configure:5954: checking for gethostbyname" >&5
5954
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 /* System header to define __stub macros and hopefully few prototypes,
5959     which can conflict with char gethostbyname(); below.  */
5960 #include <assert.h>
5961 /* Override any gcc2 internal prototype to avoid an error.  */
5962 /* We use char because int might match the return type of a gcc2
5963     builtin and then its argument prototype would still apply.  */
5964 char gethostbyname();
5965
5966 int main() {
5967
5968 /* The GNU C library defines this for functions which it implements
5969     to always fail with ENOSYS.  Some functions are actually named
5970     something starting with __ and the normal name is an alias.  */
5971 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5972 choke me
5973 #else
5974 gethostbyname();
5975 #endif
5976
5977 ; return 0; }
5978 EOF
5979 if { (eval echo configure:5980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5980   rm -rf conftest*
5981   eval "ac_cv_func_gethostbyname=yes"
5982 else
5983   echo "configure: failed program was:" >&5
5984   cat conftest.$ac_ext >&5
5985   rm -rf conftest*
5986   eval "ac_cv_func_gethostbyname=no"
5987 fi
5988 rm -f conftest*
5989
5990 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5991   echo "$ac_t""yes" 1>&6
5992   :
5993 else
5994   echo "$ac_t""no" 1>&6
5995 fi
5996
5997     if test $ac_cv_func_gethostbyname = no; then
5998       
5999 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6000 echo "configure:6001: checking for gethostbyname in -lnsl" >&5
6001 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6002
6003 xe_check_libs=" -lnsl "
6004 cat > conftest.$ac_ext <<EOF
6005 #line 6006 "configure"
6006 #include "confdefs.h"
6007 /* Override any gcc2 internal prototype to avoid an error.  */
6008 /* We use char because int might match the return type of a gcc2
6009     builtin and then its argument prototype would still apply.  */
6010 char gethostbyname();
6011
6012 int main() {
6013 gethostbyname()
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   eval "ac_cv_lib_$ac_lib_var=yes"
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_lib_$ac_lib_var=no"
6024 fi
6025 rm -f conftest*
6026 xe_check_libs=""
6027
6028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6029   echo "$ac_t""yes" 1>&6
6030   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6031 else
6032   echo "$ac_t""no" 1>&6
6033 fi
6034
6035
6036     fi
6037
6038     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6039     # socket/setsockopt and other routines are undefined under SCO ODT
6040     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6041     # on later versions), says simon@lia.di.epfl.ch: it contains
6042     # gethostby* variants that don't use the nameserver (or something).
6043     # -lsocket must be given before -lnsl if both are needed.
6044     # We assume that if connect needs -lnsl, so does gethostbyname.
6045     echo $ac_n "checking for connect""... $ac_c" 1>&6
6046 echo "configure:6047: checking for connect" >&5
6047
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 /* System header to define __stub macros and hopefully few prototypes,
6052     which can conflict with char connect(); below.  */
6053 #include <assert.h>
6054 /* Override any gcc2 internal prototype to avoid an error.  */
6055 /* We use char because int might match the return type of a gcc2
6056     builtin and then its argument prototype would still apply.  */
6057 char connect();
6058
6059 int main() {
6060
6061 /* The GNU C library defines this for functions which it implements
6062     to always fail with ENOSYS.  Some functions are actually named
6063     something starting with __ and the normal name is an alias.  */
6064 #if defined (__stub_connect) || defined (__stub___connect)
6065 choke me
6066 #else
6067 connect();
6068 #endif
6069
6070 ; return 0; }
6071 EOF
6072 if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6073   rm -rf conftest*
6074   eval "ac_cv_func_connect=yes"
6075 else
6076   echo "configure: failed program was:" >&5
6077   cat conftest.$ac_ext >&5
6078   rm -rf conftest*
6079   eval "ac_cv_func_connect=no"
6080 fi
6081 rm -f conftest*
6082
6083 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085   :
6086 else
6087   echo "$ac_t""no" 1>&6
6088 fi
6089
6090     if test $ac_cv_func_connect = no; then
6091       
6092 xe_msg_checking="for connect in -lsocket"
6093 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6094 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6095 echo "configure:6096: checking "$xe_msg_checking"" >&5
6096 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6097
6098 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char connect();
6106
6107 int main() {
6108 connect()
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_lib_$ac_lib_var=no"
6119 fi
6120 rm -f conftest*
6121 xe_check_libs=""
6122
6123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6124   echo "$ac_t""yes" 1>&6
6125   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6126 else
6127   echo "$ac_t""no" 1>&6
6128 fi
6129
6130
6131     fi
6132
6133     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6134     echo $ac_n "checking for remove""... $ac_c" 1>&6
6135 echo "configure:6136: checking for remove" >&5
6136
6137 cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char remove(); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char remove();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_remove) || defined (__stub___remove)
6154 choke me
6155 #else
6156 remove();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_func_remove=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_func_remove=no"
6169 fi
6170 rm -f conftest*
6171
6172 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6173   echo "$ac_t""yes" 1>&6
6174   :
6175 else
6176   echo "$ac_t""no" 1>&6
6177 fi
6178
6179     if test $ac_cv_func_remove = no; then
6180       
6181 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6182 echo "configure:6183: checking for remove in -lposix" >&5
6183 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6184
6185 xe_check_libs=" -lposix "
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 /* We use char because int might match the return type of a gcc2
6191     builtin and then its argument prototype would still apply.  */
6192 char remove();
6193
6194 int main() {
6195 remove()
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=no"
6206 fi
6207 rm -f conftest*
6208 xe_check_libs=""
6209
6210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6211   echo "$ac_t""yes" 1>&6
6212   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216
6217
6218     fi
6219
6220     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6221     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6222 echo "configure:6223: checking for shmat" >&5
6223
6224 cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 /* System header to define __stub macros and hopefully few prototypes,
6228     which can conflict with char shmat(); below.  */
6229 #include <assert.h>
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char shmat();
6234
6235 int main() {
6236
6237 /* The GNU C library defines this for functions which it implements
6238     to always fail with ENOSYS.  Some functions are actually named
6239     something starting with __ and the normal name is an alias.  */
6240 #if defined (__stub_shmat) || defined (__stub___shmat)
6241 choke me
6242 #else
6243 shmat();
6244 #endif
6245
6246 ; return 0; }
6247 EOF
6248 if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6249   rm -rf conftest*
6250   eval "ac_cv_func_shmat=yes"
6251 else
6252   echo "configure: failed program was:" >&5
6253   cat conftest.$ac_ext >&5
6254   rm -rf conftest*
6255   eval "ac_cv_func_shmat=no"
6256 fi
6257 rm -f conftest*
6258
6259 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   :
6262 else
6263   echo "$ac_t""no" 1>&6
6264 fi
6265
6266     if test $ac_cv_func_shmat = no; then
6267       
6268 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6269 echo "configure:6270: checking for shmat in -lipc" >&5
6270 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lipc "
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char shmat();
6280
6281 int main() {
6282 shmat()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 xe_check_libs=""
6296
6297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6298   echo "$ac_t""yes" 1>&6
6299   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6300 else
6301   echo "$ac_t""no" 1>&6
6302 fi
6303
6304
6305     fi
6306   fi
6307
6308   # Check for libraries that X11R6 Xt/Xaw programs need.
6309   ac_save_LDFLAGS="$LDFLAGS"
6310   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6311   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6312   # check for ICE first), but we must link in the order -lSM -lICE or
6313   # we get undefined symbols.  So assume we have SM if we have ICE.
6314   # These have to be linked with before -lX11, unlike the other
6315   # libraries we check for below, so use a different variable.
6316   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6317   
6318 xe_msg_checking="for IceConnectionNumber in -lICE"
6319 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6320 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6321 echo "configure:6322: checking "$xe_msg_checking"" >&5
6322 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6323
6324 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6325 cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 /* We use char because int might match the return type of a gcc2
6330     builtin and then its argument prototype would still apply.  */
6331 char IceConnectionNumber();
6332
6333 int main() {
6334 IceConnectionNumber()
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=yes"
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_lib_$ac_lib_var=no"
6345 fi
6346 rm -f conftest*
6347 xe_check_libs=""
6348
6349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6350   echo "$ac_t""yes" 1>&6
6351   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6352 else
6353   echo "$ac_t""no" 1>&6
6354 fi
6355
6356
6357   LDFLAGS="$ac_save_LDFLAGS"
6358
6359 fi
6360  # Autoconf claims to find X library and include dirs for us.
6361   if test "$no_x" = "yes"
6362   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6363   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6364   fi
6365 fi
6366
6367
6368 if test "$with_x11" = "yes"; then
6369   { test "$extra_verbose" = "yes" && cat << \EOF
6370     Defining HAVE_X_WINDOWS
6371 EOF
6372 cat >> confdefs.h <<\EOF
6373 #define HAVE_X_WINDOWS 1
6374 EOF
6375 }
6376
6377   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6378   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6379
6380
6381     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6382 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6383 echo "configure:6384: checking for Xm/Xm.h" >&5
6384
6385 cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 #include <Xm/Xm.h>
6389 EOF
6390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6391 { (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6393 if test -z "$ac_err"; then
6394   rm -rf conftest*
6395   eval "ac_cv_header_$ac_safe=yes"
6396 else
6397   echo "$ac_err" >&5
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   eval "ac_cv_header_$ac_safe=no"
6402 fi
6403 rm -f conftest*
6404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406   
6407 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6408 echo "configure:6409: checking for XmStringFree in -lXm" >&5
6409 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6410
6411 xe_check_libs=" -lXm "
6412 cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 /* Override any gcc2 internal prototype to avoid an error.  */
6416 /* We use char because int might match the return type of a gcc2
6417     builtin and then its argument prototype would still apply.  */
6418 char XmStringFree();
6419
6420 int main() {
6421 XmStringFree()
6422 ; return 0; }
6423 EOF
6424 if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6425   rm -rf conftest*
6426   eval "ac_cv_lib_$ac_lib_var=yes"
6427 else
6428   echo "configure: failed program was:" >&5
6429   cat conftest.$ac_ext >&5
6430   rm -rf conftest*
6431   eval "ac_cv_lib_$ac_lib_var=no"
6432 fi
6433 rm -f conftest*
6434 xe_check_libs=""
6435
6436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6437   echo "$ac_t""yes" 1>&6
6438   got_motif=yes
6439 else
6440   echo "$ac_t""no" 1>&6
6441 fi
6442
6443
6444 else
6445   echo "$ac_t""no" 1>&6
6446 fi
6447
6448
6449   if test "$got_motif" != "yes"; then
6450             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6451                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6452       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6453       if test -d "$lib_dir" -a -d "$inc_dir"; then
6454         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6455           x_libraries="$lib_dir $x_libraries"
6456           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6457         esac
6458         case "$x_includes" in "$inc_dir"* ) ;; *)
6459           x_includes="$inc_dir $x_includes"
6460           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6461         esac
6462         break;  fi
6463     done
6464   fi
6465
6466     for rel in "X11R6" "X11R5" "X11R4"; do
6467     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6468     if test -d "$lib_dir" -a -d "$inc_dir"; then
6469       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6470         x_libraries="$x_libraries $lib_dir"
6471         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6472       esac
6473       case "$x_includes" in "$inc_dir"* ) ;; *)
6474         x_includes="$x_includes $inc_dir"
6475         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6476       esac
6477       break;     fi
6478   done
6479
6480     case "$opsys" in
6481   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 ;;
6482   esac
6483
6484   ld_switch_x_site="$X_LIBS"
6485
6486   
6487 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6488     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6489   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6490   
6491         runpath="" runpath_dirs=""
6492   if test -n "$LD_RUN_PATH"; then
6493     runpath="$LD_RUN_PATH"
6494   elif test "$GCC" = "yes"; then
6495         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6496     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6497     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6498     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6499       case "$arg" in P,* | -L* | -R* )
6500         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6501           {
6502 xe_runpath_dir="$dir"
6503   test "$xe_runpath_dir" != "/lib"     -a \
6504         "$xe_runpath_dir" != "/usr/lib" -a \
6505         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6506   eval "$xe_add_unique_runpath_dir"
6507 }
6508         done ;;
6509       esac
6510     done
6511     ld_switch_run="$ld_switch_run_save"
6512     rm -f conftest*
6513   else
6514         for arg in $ld_switch_site $ld_switch_x_site; do
6515       case "$arg" in -L*) {
6516 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6517   test "$xe_runpath_dir" != "/lib"     -a \
6518         "$xe_runpath_dir" != "/usr/lib" -a \
6519         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6520   eval "$xe_add_unique_runpath_dir"
6521 };; esac
6522     done
6523             if test "$opsys $need_motif" = "sol2 yes"; then
6524       xe_runpath_dir="/opt/SUNWdt/lib";
6525       eval "$xe_add_unique_runpath_dir";
6526     fi
6527   fi 
6528   if test -n "$runpath"; then
6529     ld_switch_run="${dash_r}${runpath}"
6530     
6531 if test "$GCC" = "yes"; then
6532   set x $ld_switch_run; shift; ld_switch_run=""
6533   while test -n "$1"; do
6534     case $1 in
6535       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6536       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6537       -Xlinker* ) ;;
6538       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6539     esac
6540     shift
6541   done
6542 fi
6543     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6544   fi
6545 fi
6546
6547
6548   if test "$extra_verbose" = "yes"; then
6549     echo; echo "X11 compilation variables:"
6550     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6551     echo
6552   fi
6553
6554             bitmapdirs=
6555   if test "$x_includes" != NONE; then
6556     for i in $x_includes; do
6557       if test -d "$i/bitmaps"; then
6558         bitmapdirs="$i/bitmaps:$bitmapdirs"
6559       fi
6560       if test -d "$i/X11/bitmaps"; then
6561         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6562       fi
6563     done
6564     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6565   fi
6566   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6567     Defining BITMAPDIR = "$bitmapdirs"
6568 EOF
6569 cat >> confdefs.h <<EOF
6570 #define BITMAPDIR "$bitmapdirs"
6571 EOF
6572 }
6573
6574
6575     echo "checking for X defines extracted by xmkmf" 1>&6
6576 echo "configure:6577: checking for X defines extracted by xmkmf" >&5
6577   rm -fr conftestdir
6578   if mkdir conftestdir; then
6579     cd conftestdir
6580     cat > Imakefile <<'EOF'
6581 xetest:
6582         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6583 EOF
6584     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6585       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6586       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6587     fi
6588     cd ..
6589     rm -fr conftestdir
6590     for word in $xmkmf_defines; do
6591       case "$word" in 
6592       -D__STDC__*) ;;
6593       -D* )
6594         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6595         case "$word" in
6596           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6597           *     ) val=1 ;;
6598         esac
6599         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6600           if test "$val" = "1"
6601             then { test "$extra_verbose" = "yes" && cat << EOF
6602     Defining $sym
6603 EOF
6604 cat >> confdefs.h <<EOF
6605 #define $sym 1
6606 EOF
6607 }
6608
6609             else { test "$extra_verbose" = "yes" && cat << EOF
6610     Defining $sym = $val
6611 EOF
6612 cat >> confdefs.h <<EOF
6613 #define $sym $val
6614 EOF
6615 }
6616
6617           fi
6618         fi  ;;
6619       esac
6620     done
6621   fi
6622
6623     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6624 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6625 echo "configure:6626: checking for X11/Intrinsic.h" >&5
6626
6627 cat > conftest.$ac_ext <<EOF
6628 #line 6629 "configure"
6629 #include "confdefs.h"
6630 #include <X11/Intrinsic.h>
6631 EOF
6632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6633 { (eval echo configure:6634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6635 if test -z "$ac_err"; then
6636   rm -rf conftest*
6637   eval "ac_cv_header_$ac_safe=yes"
6638 else
6639   echo "$ac_err" >&5
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_header_$ac_safe=no"
6644 fi
6645 rm -f conftest*
6646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6647   echo "$ac_t""yes" 1>&6
6648   :
6649 else
6650   echo "$ac_t""no" 1>&6
6651 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6652 fi
6653
6654
6655       
6656 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6657 echo "configure:6658: checking for XOpenDisplay in -lX11" >&5
6658 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6659
6660 xe_check_libs=" -lX11 "
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char XOpenDisplay();
6668
6669 int main() {
6670 XOpenDisplay()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 xe_check_libs=""
6684
6685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6686   echo "$ac_t""yes" 1>&6
6687   have_lib_x11=yes
6688 else
6689   echo "$ac_t""no" 1>&6
6690 fi
6691
6692
6693   if test "$have_lib_x11" != "yes"; then
6694     
6695 xe_msg_checking="for XGetFontProperty in -lX11"
6696 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6697 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6698 echo "configure:6699: checking "$xe_msg_checking"" >&5
6699 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6700
6701 xe_check_libs=" -lX11 -b i486-linuxaout"
6702 cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705 /* Override any gcc2 internal prototype to avoid an error.  */
6706 /* We use char because int might match the return type of a gcc2
6707     builtin and then its argument prototype would still apply.  */
6708 char XGetFontProperty();
6709
6710 int main() {
6711 XGetFontProperty()
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_lib_$ac_lib_var=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_lib_$ac_lib_var=no"
6722 fi
6723 rm -f conftest*
6724 xe_check_libs=""
6725
6726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6727   echo "$ac_t""yes" 1>&6
6728   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6729 else
6730   echo "$ac_t""no" 1>&6
6731 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6732 fi
6733
6734
6735   fi
6736   libs_x="-lX11"
6737   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6738
6739     
6740 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6741 echo "configure:6742: checking for XShapeSelectInput in -lXext" >&5
6742 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6743
6744 xe_check_libs=" -lXext "
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* Override any gcc2 internal prototype to avoid an error.  */
6749 /* We use char because int might match the return type of a gcc2
6750     builtin and then its argument prototype would still apply.  */
6751 char XShapeSelectInput();
6752
6753 int main() {
6754 XShapeSelectInput()
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_lib_$ac_lib_var=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=no"
6765 fi
6766 rm -f conftest*
6767 xe_check_libs=""
6768
6769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6770   echo "$ac_t""yes" 1>&6
6771   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775
6776
6777
6778     
6779 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6780 echo "configure:6781: checking for XtOpenDisplay in -lXt" >&5
6781 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6782
6783 xe_check_libs=" -lXt "
6784 cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787 /* Override any gcc2 internal prototype to avoid an error.  */
6788 /* We use char because int might match the return type of a gcc2
6789     builtin and then its argument prototype would still apply.  */
6790 char XtOpenDisplay();
6791
6792 int main() {
6793 XtOpenDisplay()
6794 ; return 0; }
6795 EOF
6796 if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=yes"
6799 else
6800   echo "configure: failed program was:" >&5
6801   cat conftest.$ac_ext >&5
6802   rm -rf conftest*
6803   eval "ac_cv_lib_$ac_lib_var=no"
6804 fi
6805 rm -f conftest*
6806 xe_check_libs=""
6807
6808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6809   echo "$ac_t""yes" 1>&6
6810   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6811 else
6812   echo "$ac_t""no" 1>&6
6813 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6814 fi
6815
6816
6817
6818   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6819 echo "configure:6820: checking the version of X11 being used" >&5
6820   cat > conftest.$ac_ext <<EOF
6821 #line 6822 "configure"
6822 #include "confdefs.h"
6823 #include <X11/Intrinsic.h>
6824     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6825 EOF
6826 if { (eval echo configure:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6827 then
6828   ./conftest foobar; x11_release=$?
6829 else
6830   conftest_rc="$?"
6831   echo "configure: failed program was:" >&5
6832   cat conftest.$ac_ext >&5
6833   rm -fr conftest*
6834   x11_release=4
6835 fi
6836 rm -fr conftest*
6837   echo "$ac_t""R${x11_release}" 1>&6
6838   { test "$extra_verbose" = "yes" && cat << EOF
6839     Defining THIS_IS_X11R${x11_release}
6840 EOF
6841 cat >> confdefs.h <<EOF
6842 #define THIS_IS_X11R${x11_release} 1
6843 EOF
6844 }
6845
6846
6847   if test "${x11_release}" = "4"; then
6848     case "$with_widgets" in
6849       "" | "no") with_widgets=no ;;
6850       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6851     esac
6852   fi
6853
6854   for ac_func in XConvertCase
6855 do
6856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6857 echo "configure:6858: checking for $ac_func" >&5
6858
6859 cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 /* System header to define __stub macros and hopefully few prototypes,
6863     which can conflict with char $ac_func(); below.  */
6864 #include <assert.h>
6865 /* Override any gcc2 internal prototype to avoid an error.  */
6866 /* We use char because int might match the return type of a gcc2
6867     builtin and then its argument prototype would still apply.  */
6868 char $ac_func();
6869
6870 int main() {
6871
6872 /* The GNU C library defines this for functions which it implements
6873     to always fail with ENOSYS.  Some functions are actually named
6874     something starting with __ and the normal name is an alias.  */
6875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6876 choke me
6877 #else
6878 $ac_func();
6879 #endif
6880
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_func_$ac_func=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_func_$ac_func=no"
6891 fi
6892 rm -f conftest*
6893
6894 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6897   { test "$extra_verbose" = "yes" && cat << EOF
6898     Defining $ac_tr_func
6899 EOF
6900 cat >> confdefs.h <<EOF
6901 #define $ac_tr_func 1
6902 EOF
6903 }
6904  
6905 else
6906   echo "$ac_t""no" 1>&6
6907 fi
6908 done
6909
6910
6911   for ac_hdr in X11/Xlocale.h
6912 do
6913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6915 echo "configure:6916: checking for $ac_hdr" >&5
6916
6917 cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 #include <$ac_hdr>
6921 EOF
6922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6923 { (eval echo configure:6924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6925 if test -z "$ac_err"; then
6926   rm -rf conftest*
6927   eval "ac_cv_header_$ac_safe=yes"
6928 else
6929   echo "$ac_err" >&5
6930   echo "configure: failed program was:" >&5
6931   cat conftest.$ac_ext >&5
6932   rm -rf conftest*
6933   eval "ac_cv_header_$ac_safe=no"
6934 fi
6935 rm -f conftest*
6936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6939   { test "$extra_verbose" = "yes" && cat << EOF
6940     Defining $ac_tr_hdr
6941 EOF
6942 cat >> confdefs.h <<EOF
6943 #define $ac_tr_hdr 1
6944 EOF
6945 }
6946  
6947 else
6948   echo "$ac_t""no" 1>&6
6949 fi
6950 done
6951
6952
6953     for ac_func in XRegisterIMInstantiateCallback
6954 do
6955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6956 echo "configure:6957: checking for $ac_func" >&5
6957
6958 cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961 /* System header to define __stub macros and hopefully few prototypes,
6962     which can conflict with char $ac_func(); below.  */
6963 #include <assert.h>
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char $ac_func();
6968
6969 int main() {
6970
6971 /* The GNU C library defines this for functions which it implements
6972     to always fail with ENOSYS.  Some functions are actually named
6973     something starting with __ and the normal name is an alias.  */
6974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6975 choke me
6976 #else
6977 $ac_func();
6978 #endif
6979
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   eval "ac_cv_func_$ac_func=yes"
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_func_$ac_func=no"
6990 fi
6991 rm -f conftest*
6992
6993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6994   echo "$ac_t""yes" 1>&6
6995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6996   { test "$extra_verbose" = "yes" && cat << EOF
6997     Defining $ac_tr_func
6998 EOF
6999 cat >> confdefs.h <<EOF
7000 #define $ac_tr_func 1
7001 EOF
7002 }
7003  
7004 else
7005   echo "$ac_t""no" 1>&6
7006 fi
7007 done
7008
7009   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7010 echo "configure:7011: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014
7015 #define NeedFunctionPrototypes 1
7016 #include <X11/Xlib.h>
7017 extern Bool XRegisterIMInstantiateCallback(
7018    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7019
7020 int main() {
7021
7022 ; return 0; }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7025   rm -rf conftest*
7026   echo "$ac_t""yes" 1>&6
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -rf conftest*
7031   echo "$ac_t""no" 1>&6
7032    { test "$extra_verbose" = "yes" && cat << \EOF
7033     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7034 EOF
7035 cat >> confdefs.h <<\EOF
7036 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7037 EOF
7038 }
7039
7040 fi
7041 rm -f conftest*
7042
7043     test -z "$with_xmu" && { 
7044 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7045 echo "configure:7046: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7046 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7047
7048 xe_check_libs=" -lXmu "
7049 cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052 /* Override any gcc2 internal prototype to avoid an error.  */
7053 /* We use char because int might match the return type of a gcc2
7054     builtin and then its argument prototype would still apply.  */
7055 char XmuReadBitmapDataFromFile();
7056
7057 int main() {
7058 XmuReadBitmapDataFromFile()
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062   rm -rf conftest*
7063   eval "ac_cv_lib_$ac_lib_var=yes"
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   eval "ac_cv_lib_$ac_lib_var=no"
7069 fi
7070 rm -f conftest*
7071 xe_check_libs=""
7072
7073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7074   echo "$ac_t""yes" 1>&6
7075   with_xmu=yes
7076 else
7077   echo "$ac_t""no" 1>&6
7078 with_xmu=no
7079 fi
7080
7081  }
7082   if test "$with_xmu" = "no"; then
7083     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7084    echo "    xemacs will be linked with \"xmu.o\""
7085  fi
7086   else
7087     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7088     { test "$extra_verbose" = "yes" && cat << \EOF
7089     Defining HAVE_XMU
7090 EOF
7091 cat >> confdefs.h <<\EOF
7092 #define HAVE_XMU 1
7093 EOF
7094 }
7095
7096   fi
7097
7098       
7099 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7100 echo "configure:7101: checking for main in -lXbsd" >&5
7101 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7102
7103 xe_check_libs=" -lXbsd "
7104 cat > conftest.$ac_ext <<EOF
7105 #line 7106 "configure"
7106 #include "confdefs.h"
7107
7108 int main() {
7109 main()
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=yes"
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_lib_$ac_lib_var=no"
7120 fi
7121 rm -f conftest*
7122 xe_check_libs=""
7123
7124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7125   echo "$ac_t""yes" 1>&6
7126   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7127 else
7128   echo "$ac_t""no" 1>&6
7129 fi
7130
7131
7132
7133     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7134         if test "$GCC" = "yes"; then
7135                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7136 echo "configure:7137: checking for name of AIX gcc threads option" >&5
7137       case `$CC -v --help 2>&1` in
7138         *-mthreads*) aix_threads=-mthreads ;;
7139                   *) aix_threads=-pthread  ;;
7140       esac
7141       echo "$ac_t""$aix_threads" 1>&6
7142       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7143       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7144     else
7145             case "$CC" in *_r) : ;;
7146         *)
7147          xe_save_CC="$CC"
7148          CC="${CC}_r"
7149          echo $ac_n "checking size of short""... $ac_c" 1>&6
7150 echo "configure:7151: checking size of short" >&5
7151
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 #include <stdio.h>
7156 main()
7157 {
7158   FILE *f=fopen("conftestval", "w");
7159   if (!f) exit(1);
7160   fprintf(f, "%d\n", sizeof(short));
7161   exit(0);
7162 }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7165 then
7166   ac_cv_sizeof_short=`cat conftestval`
7167 else
7168   conftest_rc="$?"
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -fr conftest*
7172   ac_cv_sizeof_short=0
7173 fi
7174 rm -fr conftest*
7175 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7176 { test "$extra_verbose" = "yes" && cat << EOF
7177     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7178 EOF
7179 cat >> confdefs.h <<EOF
7180 #define SIZEOF_SHORT $ac_cv_sizeof_short
7181 EOF
7182 }
7183
7184
7185          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7186       esac
7187     fi
7188   fi
7189
7190 fi 
7191 if test "$with_msw" != "no"; then
7192   echo "checking for MS-Windows" 1>&6
7193 echo "configure:7194: checking for MS-Windows" >&5
7194   
7195 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7196 echo "configure:7197: checking for main in -lgdi32" >&5
7197 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7198
7199 xe_check_libs=" -lgdi32 "
7200 cat > conftest.$ac_ext <<EOF
7201 #line 7202 "configure"
7202 #include "confdefs.h"
7203
7204 int main() {
7205 main()
7206 ; return 0; }
7207 EOF
7208 if { (eval echo configure:7209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7209   rm -rf conftest*
7210   eval "ac_cv_lib_$ac_lib_var=yes"
7211 else
7212   echo "configure: failed program was:" >&5
7213   cat conftest.$ac_ext >&5
7214   rm -rf conftest*
7215   eval "ac_cv_lib_$ac_lib_var=no"
7216 fi
7217 rm -f conftest*
7218 xe_check_libs=""
7219
7220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7221   echo "$ac_t""yes" 1>&6
7222   with_msw=yes
7223 else
7224   echo "$ac_t""no" 1>&6
7225 fi
7226
7227
7228   if test "$with_msw" = "yes"; then
7229     { test "$extra_verbose" = "yes" && cat << \EOF
7230     Defining HAVE_MS_WINDOWS
7231 EOF
7232 cat >> confdefs.h <<\EOF
7233 #define HAVE_MS_WINDOWS 1
7234 EOF
7235 }
7236
7237
7238         if test "$with_netinstall" = "yes"; then
7239       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7240       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7241       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7242     fi
7243
7244     install_pp="$srcdir/lib-src/installexe.sh"
7245     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
7246     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7247     if test "$window_system" != x11; then
7248         window_system=msw
7249         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7250             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7251    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7252  fi
7253         test "$with_menubars"   != "no" && with_menubars=msw \
7254             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7255    echo "    xemacs will be linked with \"menubar-msw.o\""
7256  fi
7257         test "$with_toolbars"   != "no" && with_toolbars=msw \
7258             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7259    echo "    xemacs will be linked with \"toolbar-msw.o\""
7260  fi
7261         test "$with_dialogs"   != "no" && with_dialogs=msw \
7262             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7263    echo "    xemacs will be linked with \"dialog-msw.o\""
7264  fi
7265         test "$with_widgets"   != "no" && with_widgets=msw
7266     else
7267         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7268    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7269  fi
7270         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7271    echo "    xemacs will be linked with \"menubar-msw.o\""
7272  fi
7273         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7274    echo "    xemacs will be linked with \"toolbar-msw.o\""
7275  fi
7276         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7277    echo "    xemacs will be linked with \"dialog-msw.o\""
7278  fi
7279     fi
7280         cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 #include <fcntl.h>
7284     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7285 EOF
7286 if { (eval echo configure:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7287 then
7288   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7289     Defining HAVE_MSG_SELECT
7290 EOF
7291 cat >> confdefs.h <<\EOF
7292 #define HAVE_MSG_SELECT 1
7293 EOF
7294 }
7295
7296 else
7297   conftest_rc="$?"
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300 fi
7301 rm -fr conftest*
7302     with_file_coding=yes
7303     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
7304    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\""
7305  fi
7306   fi
7307 fi
7308
7309
7310
7311 test -z "$window_system" && window_system="none"
7312
7313 if test "$window_system" = "none"; then
7314   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7315   do
7316     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7317        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7318     fi
7319     eval "with_${feature}=no"
7320   done
7321 else
7322   test -z "$with_toolbars" && with_toolbars=yes
7323 fi
7324
7325 if test "$with_msw" != "yes"; then
7326   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7327   do
7328     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7329        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7330     fi
7331     eval "with_${feature}=no"
7332   done
7333 else
7334   :
7335 fi
7336
7337 if test "$with_x11" != "yes"; then
7338             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7339   do
7340     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7341        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7342     fi
7343     eval "with_${feature}=no"
7344   done
7345 fi
7346
7347 if test "$with_x11" = "yes"; then
7348   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7349 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7350 echo "configure:7351: checking for X11/extensions/shape.h" >&5
7351
7352 cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 #include <X11/extensions/shape.h>
7356 EOF
7357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7358 { (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7360 if test -z "$ac_err"; then
7361   rm -rf conftest*
7362   eval "ac_cv_header_$ac_safe=yes"
7363 else
7364   echo "$ac_err" >&5
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_header_$ac_safe=no"
7369 fi
7370 rm -f conftest*
7371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373   
7374    { test "$extra_verbose" = "yes" && cat << \EOF
7375     Defining HAVE_BALLOON_HELP
7376 EOF
7377 cat >> confdefs.h <<\EOF
7378 #define HAVE_BALLOON_HELP 1
7379 EOF
7380 }
7381
7382    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7383    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7384  fi
7385 else
7386   echo "$ac_t""no" 1>&6
7387 fi
7388
7389 fi
7390
7391 bitmapdir=
7392
7393 case "$window_system" in
7394   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7395   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7396   gtk  )
7397        HAVE_X_WINDOWS=no
7398        test "$with_gnome" = "yes" && echo "  Using GNOME."
7399        test "$with_gnome" = "no" && echo "  Using GTK."
7400        ;;
7401   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7402 esac
7403
7404 case "$x_libraries" in *X11R4* )
7405   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7406   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7407 esac
7408
7409 echo "checking for WM_COMMAND option" 1>&6
7410 echo "configure:7411: checking for WM_COMMAND option" >&5;
7411 if test "$with_wmcommand" != "no"; then
7412   { test "$extra_verbose" = "yes" && cat << \EOF
7413     Defining HAVE_WMCOMMAND
7414 EOF
7415 cat >> confdefs.h <<\EOF
7416 #define HAVE_WMCOMMAND 1
7417 EOF
7418 }
7419
7420 fi
7421
7422 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7423 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7424 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7425 echo "configure:7426: checking for X11/Xauth.h" >&5
7426
7427 cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430 #include <X11/Xauth.h>
7431 EOF
7432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7433 { (eval echo configure:7434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7435 if test -z "$ac_err"; then
7436   rm -rf conftest*
7437   eval "ac_cv_header_$ac_safe=yes"
7438 else
7439   echo "$ac_err" >&5
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -rf conftest*
7443   eval "ac_cv_header_$ac_safe=no"
7444 fi
7445 rm -f conftest*
7446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7447   echo "$ac_t""yes" 1>&6
7448   :
7449 else
7450   echo "$ac_t""no" 1>&6
7451 with_xauth=no
7452 fi
7453  }
7454 test -z "$with_xauth" && { 
7455 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7456 echo "configure:7457: checking for XauGetAuthByAddr in -lXau" >&5
7457 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7458
7459 xe_check_libs=" -lXau "
7460 cat > conftest.$ac_ext <<EOF
7461 #line 7462 "configure"
7462 #include "confdefs.h"
7463 /* Override any gcc2 internal prototype to avoid an error.  */
7464 /* We use char because int might match the return type of a gcc2
7465     builtin and then its argument prototype would still apply.  */
7466 char XauGetAuthByAddr();
7467
7468 int main() {
7469 XauGetAuthByAddr()
7470 ; return 0; }
7471 EOF
7472 if { (eval echo configure:7473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7473   rm -rf conftest*
7474   eval "ac_cv_lib_$ac_lib_var=yes"
7475 else
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   eval "ac_cv_lib_$ac_lib_var=no"
7480 fi
7481 rm -f conftest*
7482 xe_check_libs=""
7483
7484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7485   echo "$ac_t""yes" 1>&6
7486   :
7487 else
7488   echo "$ac_t""no" 1>&6
7489 with_xauth=no
7490 fi
7491
7492  }
7493 test -z "$with_xauth" && with_xauth=yes
7494 if test "$with_xauth" = "yes"; then
7495   { test "$extra_verbose" = "yes" && cat << \EOF
7496     Defining HAVE_XAUTH
7497 EOF
7498 cat >> confdefs.h <<\EOF
7499 #define HAVE_XAUTH 1
7500 EOF
7501 }
7502
7503   
7504 T=""
7505 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
7506 libs_xauth="$T"
7507
7508 fi
7509
7510
7511
7512
7513 if test "$with_tooltalk" != "no" ; then
7514       for dir in "" "Tt/" "desktop/" ; do
7515     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7516 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7517 echo "configure:7518: checking for ${dir}tt_c.h" >&5
7518
7519 cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 #include <${dir}tt_c.h>
7523 EOF
7524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7525 { (eval echo configure:7526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7527 if test -z "$ac_err"; then
7528   rm -rf conftest*
7529   eval "ac_cv_header_$ac_safe=yes"
7530 else
7531   echo "$ac_err" >&5
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -rf conftest*
7535   eval "ac_cv_header_$ac_safe=no"
7536 fi
7537 rm -f conftest*
7538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540   tt_c_h_file="${dir}tt_c.h"; break
7541 else
7542   echo "$ac_t""no" 1>&6
7543 fi
7544
7545   done
7546   if test -z "$tt_c_h_file"; then
7547     if test "$with_tooltalk" = "yes"; then
7548       (echo "$progname: Usage error:"
7549 echo " " "Unable to find required tooltalk header files."
7550 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7551     fi
7552     with_tooltalk=no
7553   fi
7554 fi
7555 if test "$with_tooltalk" != "no" ; then
7556   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7557     
7558 xe_msg_checking="for tt_message_create in -ltt"
7559 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7560 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7561 echo "configure:7562: checking "$xe_msg_checking"" >&5
7562 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7563
7564 xe_check_libs=" -ltt $extra_libs"
7565 cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 /* Override any gcc2 internal prototype to avoid an error.  */
7569 /* We use char because int might match the return type of a gcc2
7570     builtin and then its argument prototype would still apply.  */
7571 char tt_message_create();
7572
7573 int main() {
7574 tt_message_create()
7575 ; return 0; }
7576 EOF
7577 if { (eval echo configure:7578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7578   rm -rf conftest*
7579   eval "ac_cv_lib_$ac_lib_var=yes"
7580 else
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_lib_$ac_lib_var=no"
7585 fi
7586 rm -f conftest*
7587 xe_check_libs=""
7588
7589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7590   echo "$ac_t""yes" 1>&6
7591   tt_libs="-ltt $extra_libs"; break
7592 else
7593   echo "$ac_t""no" 1>&6
7594 :
7595 fi
7596
7597
7598   done
7599   if test -z "$tt_libs"; then
7600     if test "$with_tooltalk" = "yes"; then
7601       (echo "$progname: Usage error:"
7602 echo " " "Unable to find required tooltalk libraries."
7603 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7604     fi
7605     with_tooltalk=no
7606   fi
7607 fi
7608 test -z "$with_tooltalk" && with_tooltalk=yes
7609 if test "$with_tooltalk" = "yes"; then
7610   { test "$extra_verbose" = "yes" && cat << \EOF
7611     Defining TOOLTALK
7612 EOF
7613 cat >> confdefs.h <<\EOF
7614 #define TOOLTALK 1
7615 EOF
7616 }
7617
7618   { test "$extra_verbose" = "yes" && cat << EOF
7619     Defining TT_C_H_FILE = "$tt_c_h_file"
7620 EOF
7621 cat >> confdefs.h <<EOF
7622 #define TT_C_H_FILE "$tt_c_h_file"
7623 EOF
7624 }
7625
7626   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7627   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7628    echo "    xemacs will be linked with \"tooltalk.o\""
7629  fi
7630 fi
7631
7632 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7633 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7634 echo "configure:7635: checking for Dt/Dt.h" >&5
7635
7636 cat > conftest.$ac_ext <<EOF
7637 #line 7638 "configure"
7638 #include "confdefs.h"
7639 #include <Dt/Dt.h>
7640 EOF
7641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7642 { (eval echo configure:7643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7644 if test -z "$ac_err"; then
7645   rm -rf conftest*
7646   eval "ac_cv_header_$ac_safe=yes"
7647 else
7648   echo "$ac_err" >&5
7649   echo "configure: failed program was:" >&5
7650   cat conftest.$ac_ext >&5
7651   rm -rf conftest*
7652   eval "ac_cv_header_$ac_safe=no"
7653 fi
7654 rm -f conftest*
7655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7656   echo "$ac_t""yes" 1>&6
7657   :
7658 else
7659   echo "$ac_t""no" 1>&6
7660 with_cde=no
7661 fi
7662  }
7663 test -z "$with_cde" && { 
7664 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7665 echo "configure:7666: checking for DtDndDragStart in -lDtSvc" >&5
7666 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7667
7668 xe_check_libs=" -lDtSvc "
7669 cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* Override any gcc2 internal prototype to avoid an error.  */
7673 /* We use char because int might match the return type of a gcc2
7674     builtin and then its argument prototype would still apply.  */
7675 char DtDndDragStart();
7676
7677 int main() {
7678 DtDndDragStart()
7679 ; return 0; }
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7682   rm -rf conftest*
7683   eval "ac_cv_lib_$ac_lib_var=yes"
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=no"
7689 fi
7690 rm -f conftest*
7691 xe_check_libs=""
7692
7693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7694   echo "$ac_t""yes" 1>&6
7695   :
7696 else
7697   echo "$ac_t""no" 1>&6
7698 with_cde=no
7699 fi
7700
7701  }
7702 test -z "$with_cde" && with_cde=yes
7703 if test "$with_dragndrop" = no; then
7704   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7705   with_cde=no
7706 fi
7707 if test "$with_cde" = "yes" ; then
7708   { test "$extra_verbose" = "yes" && cat << \EOF
7709     Defining HAVE_CDE
7710 EOF
7711 cat >> confdefs.h <<\EOF
7712 #define HAVE_CDE 1
7713 EOF
7714 }
7715
7716   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7717   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7718   with_tooltalk=yes # CDE requires Tooltalk
7719   need_motif=yes    # CDE requires Motif
7720 fi
7721
7722 test "$window_system" != "x11" && with_offix=no
7723 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7724   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7725   with_offix=no
7726 fi
7727 if test "$with_dragndrop" = no; then
7728   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7729   with_offix=no
7730 fi
7731 if test "$with_cde" = yes; then
7732   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7733   with_offix=no
7734 fi
7735 test -z "$with_offix" && with_offix=no
7736 if test "$with_offix" = "yes"; then
7737   { test "$extra_verbose" = "yes" && cat << \EOF
7738     Defining HAVE_OFFIX_DND
7739 EOF
7740 cat >> confdefs.h <<\EOF
7741 #define HAVE_OFFIX_DND 1
7742 EOF
7743 }
7744
7745   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7746   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7747 fi
7748 if test "$with_gtk" = "yes"; then
7749    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7750 fi
7751
7752 if test "$with_dragndrop" != "no" ; then
7753   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7754 echo "configure:7755: checking if drag and drop API is needed" >&5
7755   if test -n "$dragndrop_proto" ; then
7756     with_dragndrop=yes
7757     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7758     { test "$extra_verbose" = "yes" && cat << \EOF
7759     Defining HAVE_DRAGNDROP
7760 EOF
7761 cat >> confdefs.h <<\EOF
7762 #define HAVE_DRAGNDROP 1
7763 EOF
7764 }
7765
7766     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7767   else
7768     with_dragndrop=no
7769     echo "$ac_t""no" 1>&6
7770   fi
7771 fi
7772
7773 echo "checking for LDAP" 1>&6
7774 echo "configure:7775: checking for LDAP" >&5
7775 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7776 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7777 echo "configure:7778: checking for ldap.h" >&5
7778
7779 cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 #include <ldap.h>
7783 EOF
7784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7785 { (eval echo configure:7786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7787 if test -z "$ac_err"; then
7788   rm -rf conftest*
7789   eval "ac_cv_header_$ac_safe=yes"
7790 else
7791   echo "$ac_err" >&5
7792   echo "configure: failed program was:" >&5
7793   cat conftest.$ac_ext >&5
7794   rm -rf conftest*
7795   eval "ac_cv_header_$ac_safe=no"
7796 fi
7797 rm -f conftest*
7798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7799   echo "$ac_t""yes" 1>&6
7800   :
7801 else
7802   echo "$ac_t""no" 1>&6
7803 with_ldap=no
7804 fi
7805  }
7806 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7807 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7808 echo "configure:7809: checking for lber.h" >&5
7809
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 #include <lber.h>
7814 EOF
7815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7816 { (eval echo configure:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7818 if test -z "$ac_err"; then
7819   rm -rf conftest*
7820   eval "ac_cv_header_$ac_safe=yes"
7821 else
7822   echo "$ac_err" >&5
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   eval "ac_cv_header_$ac_safe=no"
7827 fi
7828 rm -f conftest*
7829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7830   echo "$ac_t""yes" 1>&6
7831   :
7832 else
7833   echo "$ac_t""no" 1>&6
7834 with_ldap=no
7835 fi
7836  }
7837 if test "$with_ldap" != "no"; then
7838   
7839 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7840 echo "configure:7841: checking for ldap_search in -lldap" >&5
7841 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7842
7843 xe_check_libs=" -lldap "
7844 cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* Override any gcc2 internal prototype to avoid an error.  */
7848 /* We use char because int might match the return type of a gcc2
7849     builtin and then its argument prototype would still apply.  */
7850 char ldap_search();
7851
7852 int main() {
7853 ldap_search()
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7857   rm -rf conftest*
7858   eval "ac_cv_lib_$ac_lib_var=yes"
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   eval "ac_cv_lib_$ac_lib_var=no"
7864 fi
7865 rm -f conftest*
7866 xe_check_libs=""
7867
7868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7869   echo "$ac_t""yes" 1>&6
7870   with_ldap=yes
7871 else
7872   echo "$ac_t""no" 1>&6
7873 fi
7874
7875
7876     test "$with_ldap" != "yes" && { 
7877 xe_msg_checking="for ldap_open in -lldap"
7878 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7879 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7880 echo "configure:7881: checking "$xe_msg_checking"" >&5
7881 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7882
7883 xe_check_libs=" -lldap -llber"
7884 cat > conftest.$ac_ext <<EOF
7885 #line 7886 "configure"
7886 #include "confdefs.h"
7887 /* Override any gcc2 internal prototype to avoid an error.  */
7888 /* We use char because int might match the return type of a gcc2
7889     builtin and then its argument prototype would still apply.  */
7890 char ldap_open();
7891
7892 int main() {
7893 ldap_open()
7894 ; return 0; }
7895 EOF
7896 if { (eval echo configure:7897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7897   rm -rf conftest*
7898   eval "ac_cv_lib_$ac_lib_var=yes"
7899 else
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -rf conftest*
7903   eval "ac_cv_lib_$ac_lib_var=no"
7904 fi
7905 rm -f conftest*
7906 xe_check_libs=""
7907
7908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7909   echo "$ac_t""yes" 1>&6
7910   with_ldap=yes with_ldap_lber=yes
7911 else
7912   echo "$ac_t""no" 1>&6
7913 fi
7914
7915  }
7916   test "$with_ldap" != "yes" && { 
7917 xe_msg_checking="for ldap_open in -lldap"
7918 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7919 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7920 echo "configure:7921: checking "$xe_msg_checking"" >&5
7921 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7922
7923 xe_check_libs=" -lldap -llber -lkrb"
7924 cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 /* Override any gcc2 internal prototype to avoid an error.  */
7928 /* We use char because int might match the return type of a gcc2
7929     builtin and then its argument prototype would still apply.  */
7930 char ldap_open();
7931
7932 int main() {
7933 ldap_open()
7934 ; return 0; }
7935 EOF
7936 if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7937   rm -rf conftest*
7938   eval "ac_cv_lib_$ac_lib_var=yes"
7939 else
7940   echo "configure: failed program was:" >&5
7941   cat conftest.$ac_ext >&5
7942   rm -rf conftest*
7943   eval "ac_cv_lib_$ac_lib_var=no"
7944 fi
7945 rm -f conftest*
7946 xe_check_libs=""
7947
7948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7949   echo "$ac_t""yes" 1>&6
7950   with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes
7951 else
7952   echo "$ac_t""no" 1>&6
7953 fi
7954
7955  }
7956   test "$with_ldap" != "yes" && { 
7957 xe_msg_checking="for ldap_open in -lldap"
7958 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7959 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7960 echo "configure:7961: checking "$xe_msg_checking"" >&5
7961 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7962
7963 xe_check_libs=" -lldap -llber -lkrb -ldes"
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 /* Override any gcc2 internal prototype to avoid an error.  */
7968 /* We use char because int might match the return type of a gcc2
7969     builtin and then its argument prototype would still apply.  */
7970 char ldap_open();
7971
7972 int main() {
7973 ldap_open()
7974 ; return 0; }
7975 EOF
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=yes"
7979 else
7980   echo "configure: failed program was:" >&5
7981   cat conftest.$ac_ext >&5
7982   rm -rf conftest*
7983   eval "ac_cv_lib_$ac_lib_var=no"
7984 fi
7985 rm -f conftest*
7986 xe_check_libs=""
7987
7988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7989   echo "$ac_t""yes" 1>&6
7990   with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes
7991 else
7992   echo "$ac_t""no" 1>&6
7993 fi
7994
7995  }
7996               test "$with_ldap_lber" != "yes" && { 
7997 echo $ac_n "checking for ber_pvt_opt_on in -llber""... $ac_c" 1>&6
7998 echo "configure:7999: checking for ber_pvt_opt_on in -llber" >&5
7999 ac_lib_var=`echo lber'_'ber_pvt_opt_on | sed 'y%./+-%__p_%'`
8000
8001 xe_check_libs=" -llber "
8002 cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* Override any gcc2 internal prototype to avoid an error.  */
8006 /* We use char because int might match the return type of a gcc2
8007     builtin and then its argument prototype would still apply.  */
8008 char ber_pvt_opt_on();
8009
8010 int main() {
8011 ber_pvt_opt_on()
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8015   rm -rf conftest*
8016   eval "ac_cv_lib_$ac_lib_var=yes"
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020   rm -rf conftest*
8021   eval "ac_cv_lib_$ac_lib_var=no"
8022 fi
8023 rm -f conftest*
8024 xe_check_libs=""
8025
8026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8027   echo "$ac_t""yes" 1>&6
8028   with_ldap_lber=yes
8029 else
8030   echo "$ac_t""no" 1>&6
8031 fi
8032
8033  }
8034 fi
8035 if test "$with_ldap" = "yes"; then
8036   { test "$extra_verbose" = "yes" && cat << \EOF
8037     Defining HAVE_LDAP
8038 EOF
8039 cat >> confdefs.h <<\EOF
8040 #define HAVE_LDAP 1
8041 EOF
8042 }
8043
8044   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8045    echo "    xemacs will be linked with \"eldap.o\""
8046  fi
8047   if test "$with_ldap_des" = "yes" ; then
8048     LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8049   fi
8050   if test "$with_ldap_krb" = "yes" ; then
8051     LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8052   fi
8053   if test "$with_ldap_lber" = "yes" ; then
8054     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8055   fi
8056   LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8057   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8058 do
8059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8060 echo "configure:8061: checking for $ac_func" >&5
8061
8062 cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 /* System header to define __stub macros and hopefully few prototypes,
8066     which can conflict with char $ac_func(); below.  */
8067 #include <assert.h>
8068 /* Override any gcc2 internal prototype to avoid an error.  */
8069 /* We use char because int might match the return type of a gcc2
8070     builtin and then its argument prototype would still apply.  */
8071 char $ac_func();
8072
8073 int main() {
8074
8075 /* The GNU C library defines this for functions which it implements
8076     to always fail with ENOSYS.  Some functions are actually named
8077     something starting with __ and the normal name is an alias.  */
8078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8079 choke me
8080 #else
8081 $ac_func();
8082 #endif
8083
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8087   rm -rf conftest*
8088   eval "ac_cv_func_$ac_func=yes"
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   eval "ac_cv_func_$ac_func=no"
8094 fi
8095 rm -f conftest*
8096
8097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8098   echo "$ac_t""yes" 1>&6
8099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8100   { test "$extra_verbose" = "yes" && cat << EOF
8101     Defining $ac_tr_func
8102 EOF
8103 cat >> confdefs.h <<EOF
8104 #define $ac_tr_func 1
8105 EOF
8106 }
8107  
8108 else
8109   echo "$ac_t""no" 1>&6
8110 fi
8111 done
8112
8113 fi
8114
8115 if test "$with_postgresql" != "no"; then
8116   echo "checking for PostgreSQL" 1>&6
8117 echo "configure:8118: checking for PostgreSQL" >&5
8118
8119   for header_dir in "" "pgsql/" "postgresql/"; do
8120     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8121 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8122 echo "configure:8123: checking for ${header_dir}libpq-fe.h" >&5
8123
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127 #include <${header_dir}libpq-fe.h>
8128 EOF
8129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8130 { (eval echo configure:8131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8132 if test -z "$ac_err"; then
8133   rm -rf conftest*
8134   eval "ac_cv_header_$ac_safe=yes"
8135 else
8136   echo "$ac_err" >&5
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139   rm -rf conftest*
8140   eval "ac_cv_header_$ac_safe=no"
8141 fi
8142 rm -f conftest*
8143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8144   echo "$ac_t""yes" 1>&6
8145   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8146 else
8147   echo "$ac_t""no" 1>&6
8148 fi
8149
8150   done
8151
8152   test -n "$libpq_fe_h_file" && { 
8153 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8154 echo "configure:8155: checking for PQconnectdb in -lpq" >&5
8155 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8156
8157 xe_check_libs=" -lpq "
8158 cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 /* Override any gcc2 internal prototype to avoid an error.  */
8162 /* We use char because int might match the return type of a gcc2
8163     builtin and then its argument prototype would still apply.  */
8164 char PQconnectdb();
8165
8166 int main() {
8167 PQconnectdb()
8168 ; return 0; }
8169 EOF
8170 if { (eval echo configure:8171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8171   rm -rf conftest*
8172   eval "ac_cv_lib_$ac_lib_var=yes"
8173 else
8174   echo "configure: failed program was:" >&5
8175   cat conftest.$ac_ext >&5
8176   rm -rf conftest*
8177   eval "ac_cv_lib_$ac_lib_var=no"
8178 fi
8179 rm -f conftest*
8180 xe_check_libs=""
8181
8182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8183   echo "$ac_t""yes" 1>&6
8184   have_libpq=yes
8185 else
8186   echo "$ac_t""no" 1>&6
8187 fi
8188
8189  }
8190
8191   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8192     with_postgresql=yes
8193     { test "$extra_verbose" = "yes" && cat << \EOF
8194     Defining HAVE_POSTGRESQL
8195 EOF
8196 cat >> confdefs.h <<\EOF
8197 #define HAVE_POSTGRESQL 1
8198 EOF
8199 }
8200
8201     
8202 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8203 echo "configure:8204: checking for PQconnectStart in -lpq" >&5
8204 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8205
8206 xe_check_libs=" -lpq "
8207 cat > conftest.$ac_ext <<EOF
8208 #line 8209 "configure"
8209 #include "confdefs.h"
8210 /* Override any gcc2 internal prototype to avoid an error.  */
8211 /* We use char because int might match the return type of a gcc2
8212     builtin and then its argument prototype would still apply.  */
8213 char PQconnectStart();
8214
8215 int main() {
8216 PQconnectStart()
8217 ; return 0; }
8218 EOF
8219 if { (eval echo configure:8220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=yes"
8222 else
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225   rm -rf conftest*
8226   eval "ac_cv_lib_$ac_lib_var=no"
8227 fi
8228 rm -f conftest*
8229 xe_check_libs=""
8230
8231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8232   echo "$ac_t""yes" 1>&6
8233   with_postgresqlv7=yes;
8234                  { test "$extra_verbose" = "yes" && cat << \EOF
8235     Defining HAVE_POSTGRESQLV7
8236 EOF
8237 cat >> confdefs.h <<\EOF
8238 #define HAVE_POSTGRESQLV7 1
8239 EOF
8240 }
8241
8242 else
8243   echo "$ac_t""no" 1>&6
8244 fi
8245
8246
8247     { test "$extra_verbose" = "yes" && cat << EOF
8248     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8249 EOF
8250 cat >> confdefs.h <<EOF
8251 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8252 EOF
8253 }
8254
8255     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8256     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8257    echo "    xemacs will be linked with \"postgresql.o\""
8258  fi
8259   elif test "$with_postgresql" = "yes"; then
8260     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8261   fi
8262 fi
8263
8264
8265 if test "$window_system" != "none"; then
8266   echo "checking for graphics libraries" 1>&6
8267 echo "configure:8268: checking for graphics libraries" >&5
8268
8269       libpath_xpm=
8270   incpath_xpm=
8271   case "$opsys" in 
8272     cygwin*)
8273       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8274       cygwin_top=`eval "dirname ${cygwin_top}"`;
8275       cygwin_top="${cygwin_top}/..";
8276       case "$window_system" in
8277                 x11)  ;;
8278                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8279              incpath_xpm="-I${cygwin_top}/include/noX"
8280               ;;
8281                 gtk)  ;;
8282                 none) ;;
8283                 *)    ;;
8284       esac
8285       ;;
8286         *) ;;
8287   esac
8288     xpm_problem=""
8289   if test -z "$with_xpm"; then
8290     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8291     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8292     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8293 echo "configure:8294: checking for Xpm - no older than 3.4f" >&5
8294     xe_check_libs=-lXpm
8295     cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 #define XPM_NUMBERS
8299 #include <X11/xpm.h>
8300     int main(int c, char **v) {
8301     return c == 1 ? 0 :
8302       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8303       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8304 EOF
8305 if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8306 then
8307   ./conftest dummy_arg; xpm_status=$?;
8308       if test "$xpm_status" = "0"; then
8309         with_xpm=yes;
8310       else
8311         with_xpm=no;
8312         if test "$xpm_status" = "1"; then
8313           xpm_problem="Xpm library version and header file version don't match!"
8314         elif test "$xpm_status" = "2"; then
8315           xpm_problem="Xpm library version is too old!"
8316         else
8317           xpm_problem="Internal xpm detection logic error!"
8318         fi
8319         echo "
8320 *** WARNING *** $xpm_problem
8321   I'm not touching that with a 10-foot pole!
8322   If you really want to use the installed version of Xpm, rerun
8323   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8324     fi
8325 else
8326   conftest_rc="$?"
8327   echo "configure: failed program was:" >&5
8328   cat conftest.$ac_ext >&5
8329   rm -fr conftest*
8330   with_xpm=no
8331 fi
8332 rm -fr conftest*
8333     xe_check_libs=
8334     echo "$ac_t""$with_xpm" 1>&6
8335   fi
8336   if test "$with_xpm" = "yes"; then
8337                 { test "$extra_verbose" = "yes" && cat << \EOF
8338     Defining HAVE_XPM
8339 EOF
8340 cat >> confdefs.h <<\EOF
8341 #define HAVE_XPM 1
8342 EOF
8343 }
8344
8345     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8346     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8347     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8348     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8349 echo "configure:8350: checking for \"FOR_MSW\" xpm" >&5
8350     xe_check_libs=-lXpm
8351     cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354
8355 int main() {
8356 XpmCreatePixmapFromData()
8357 ; return 0; }
8358 EOF
8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8360   rm -rf conftest*
8361   xpm_for_msw=no
8362 else
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   xpm_for_msw=yes
8367 fi
8368 rm -f conftest*
8369     xe_check_libs=
8370     echo "$ac_t""$xpm_for_msw" 1>&6
8371     if test "$xpm_for_msw" = "yes"; then
8372       { test "$extra_verbose" = "yes" && cat << \EOF
8373     Defining FOR_MSW
8374 EOF
8375 cat >> confdefs.h <<\EOF
8376 #define FOR_MSW 1
8377 EOF
8378 }
8379
8380     fi
8381   fi
8382
8383     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8384 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8385 echo "configure:8386: checking for compface.h" >&5
8386
8387 cat > conftest.$ac_ext <<EOF
8388 #line 8389 "configure"
8389 #include "confdefs.h"
8390 #include <compface.h>
8391 EOF
8392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8393 { (eval echo configure:8394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8395 if test -z "$ac_err"; then
8396   rm -rf conftest*
8397   eval "ac_cv_header_$ac_safe=yes"
8398 else
8399   echo "$ac_err" >&5
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   eval "ac_cv_header_$ac_safe=no"
8404 fi
8405 rm -f conftest*
8406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8407   echo "$ac_t""yes" 1>&6
8408   :
8409 else
8410   echo "$ac_t""no" 1>&6
8411 with_xface=no
8412 fi
8413  }
8414   test -z "$with_xface" && { 
8415 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8416 echo "configure:8417: checking for UnGenFace in -lcompface" >&5
8417 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8418
8419 xe_check_libs=" -lcompface "
8420 cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 /* Override any gcc2 internal prototype to avoid an error.  */
8424 /* We use char because int might match the return type of a gcc2
8425     builtin and then its argument prototype would still apply.  */
8426 char UnGenFace();
8427
8428 int main() {
8429 UnGenFace()
8430 ; return 0; }
8431 EOF
8432 if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8433   rm -rf conftest*
8434   eval "ac_cv_lib_$ac_lib_var=yes"
8435 else
8436   echo "configure: failed program was:" >&5
8437   cat conftest.$ac_ext >&5
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=no"
8440 fi
8441 rm -f conftest*
8442 xe_check_libs=""
8443
8444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8445   echo "$ac_t""yes" 1>&6
8446   : 
8447 else
8448   echo "$ac_t""no" 1>&6
8449 with_xface=no
8450 fi
8451
8452  }
8453   test -z "$with_xface" && with_xface=yes
8454   if test "$with_xface" = "yes"; then
8455     { test "$extra_verbose" = "yes" && cat << \EOF
8456     Defining HAVE_XFACE
8457 EOF
8458 cat >> confdefs.h <<\EOF
8459 #define HAVE_XFACE 1
8460 EOF
8461 }
8462
8463     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8464   fi
8465
8466         if test "$with_gif" != "no"; then
8467     with_gif="yes"
8468     { test "$extra_verbose" = "yes" && cat << \EOF
8469     Defining HAVE_GIF
8470 EOF
8471 cat >> confdefs.h <<\EOF
8472 #define HAVE_GIF 1
8473 EOF
8474 }
8475
8476     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8477    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8478  fi
8479   fi
8480
8481       if test "$with_png $with_tiff" != "no no"; then
8482     
8483 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8484 echo "configure:8485: checking for inflate in -lc" >&5
8485 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8486
8487 xe_check_libs=" -lc "
8488 cat > conftest.$ac_ext <<EOF
8489 #line 8490 "configure"
8490 #include "confdefs.h"
8491 /* Override any gcc2 internal prototype to avoid an error.  */
8492 /* We use char because int might match the return type of a gcc2
8493     builtin and then its argument prototype would still apply.  */
8494 char inflate();
8495
8496 int main() {
8497 inflate()
8498 ; return 0; }
8499 EOF
8500 if { (eval echo configure:8501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8501   rm -rf conftest*
8502   eval "ac_cv_lib_$ac_lib_var=yes"
8503 else
8504   echo "configure: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   rm -rf conftest*
8507   eval "ac_cv_lib_$ac_lib_var=no"
8508 fi
8509 rm -f conftest*
8510 xe_check_libs=""
8511
8512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8513   echo "$ac_t""yes" 1>&6
8514   :
8515 else
8516   echo "$ac_t""no" 1>&6
8517
8518 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8519 echo "configure:8520: checking for inflate in -lz" >&5
8520 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8521
8522 xe_check_libs=" -lz "
8523 cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526 /* Override any gcc2 internal prototype to avoid an error.  */
8527 /* We use char because int might match the return type of a gcc2
8528     builtin and then its argument prototype would still apply.  */
8529 char inflate();
8530
8531 int main() {
8532 inflate()
8533 ; return 0; }
8534 EOF
8535 if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8536   rm -rf conftest*
8537   eval "ac_cv_lib_$ac_lib_var=yes"
8538 else
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -rf conftest*
8542   eval "ac_cv_lib_$ac_lib_var=no"
8543 fi
8544 rm -f conftest*
8545 xe_check_libs=""
8546
8547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8548   echo "$ac_t""yes" 1>&6
8549   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8550 else
8551   echo "$ac_t""no" 1>&6
8552
8553 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8554 echo "configure:8555: checking for inflate in -lgz" >&5
8555 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8556
8557 xe_check_libs=" -lgz "
8558 cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 /* Override any gcc2 internal prototype to avoid an error.  */
8562 /* We use char because int might match the return type of a gcc2
8563     builtin and then its argument prototype would still apply.  */
8564 char inflate();
8565
8566 int main() {
8567 inflate()
8568 ; return 0; }
8569 EOF
8570 if { (eval echo configure:8571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8571   rm -rf conftest*
8572   eval "ac_cv_lib_$ac_lib_var=yes"
8573 else
8574   echo "configure: failed program was:" >&5
8575   cat conftest.$ac_ext >&5
8576   rm -rf conftest*
8577   eval "ac_cv_lib_$ac_lib_var=no"
8578 fi
8579 rm -f conftest*
8580 xe_check_libs=""
8581
8582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8583   echo "$ac_t""yes" 1>&6
8584   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8585 else
8586   echo "$ac_t""no" 1>&6
8587 fi
8588
8589
8590 fi
8591
8592
8593 fi
8594
8595
8596   fi
8597
8598     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8599 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8600 echo "configure:8601: checking for jpeglib.h" >&5
8601
8602 cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 #include <jpeglib.h>
8606 EOF
8607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8608 { (eval echo configure:8609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8610 if test -z "$ac_err"; then
8611   rm -rf conftest*
8612   eval "ac_cv_header_$ac_safe=yes"
8613 else
8614   echo "$ac_err" >&5
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -rf conftest*
8618   eval "ac_cv_header_$ac_safe=no"
8619 fi
8620 rm -f conftest*
8621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8622   echo "$ac_t""yes" 1>&6
8623   :
8624 else
8625   echo "$ac_t""no" 1>&6
8626 with_jpeg=no
8627 fi
8628  }
8629   test -z "$with_jpeg" && { 
8630 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8631 echo "configure:8632: checking for jpeg_destroy_decompress in -ljpeg" >&5
8632 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8633
8634 xe_check_libs=" -ljpeg "
8635 cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 /* Override any gcc2 internal prototype to avoid an error.  */
8639 /* We use char because int might match the return type of a gcc2
8640     builtin and then its argument prototype would still apply.  */
8641 char jpeg_destroy_decompress();
8642
8643 int main() {
8644 jpeg_destroy_decompress()
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=yes"
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   eval "ac_cv_lib_$ac_lib_var=no"
8655 fi
8656 rm -f conftest*
8657 xe_check_libs=""
8658
8659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8660   echo "$ac_t""yes" 1>&6
8661   :
8662 else
8663   echo "$ac_t""no" 1>&6
8664 with_jpeg=no
8665 fi
8666
8667  }
8668   test -z "$with_jpeg" && with_jpeg=yes
8669   if test "$with_jpeg" = "yes"; then
8670     { test "$extra_verbose" = "yes" && cat << \EOF
8671     Defining HAVE_JPEG
8672 EOF
8673 cat >> confdefs.h <<\EOF
8674 #define HAVE_JPEG 1
8675 EOF
8676 }
8677
8678     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8679   fi
8680
8681     png_problem=""
8682   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8683 echo "configure:8684: checking for pow" >&5
8684
8685 cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 /* System header to define __stub macros and hopefully few prototypes,
8689     which can conflict with char pow(); below.  */
8690 #include <assert.h>
8691 /* Override any gcc2 internal prototype to avoid an error.  */
8692 /* We use char because int might match the return type of a gcc2
8693     builtin and then its argument prototype would still apply.  */
8694 char pow();
8695
8696 int main() {
8697
8698 /* The GNU C library defines this for functions which it implements
8699     to always fail with ENOSYS.  Some functions are actually named
8700     something starting with __ and the normal name is an alias.  */
8701 #if defined (__stub_pow) || defined (__stub___pow)
8702 choke me
8703 #else
8704 pow();
8705 #endif
8706
8707 ; return 0; }
8708 EOF
8709 if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8710   rm -rf conftest*
8711   eval "ac_cv_func_pow=yes"
8712 else
8713   echo "configure: failed program was:" >&5
8714   cat conftest.$ac_ext >&5
8715   rm -rf conftest*
8716   eval "ac_cv_func_pow=no"
8717 fi
8718 rm -f conftest*
8719
8720 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8721   echo "$ac_t""yes" 1>&6
8722   :
8723 else
8724   echo "$ac_t""no" 1>&6
8725 with_png=no
8726 fi
8727  }
8728   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8729 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8730 echo "configure:8731: checking for png.h" >&5
8731
8732 cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 #include <png.h>
8736 EOF
8737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8738 { (eval echo configure:8739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8740 if test -z "$ac_err"; then
8741   rm -rf conftest*
8742   eval "ac_cv_header_$ac_safe=yes"
8743 else
8744   echo "$ac_err" >&5
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   eval "ac_cv_header_$ac_safe=no"
8749 fi
8750 rm -f conftest*
8751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8752   echo "$ac_t""yes" 1>&6
8753   :
8754 else
8755   echo "$ac_t""no" 1>&6
8756 with_png=no
8757 fi
8758  }
8759   test -z "$with_png" && { 
8760 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8761 echo "configure:8762: checking for png_read_image in -lpng" >&5
8762 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8763
8764 xe_check_libs=" -lpng "
8765 cat > conftest.$ac_ext <<EOF
8766 #line 8767 "configure"
8767 #include "confdefs.h"
8768 /* Override any gcc2 internal prototype to avoid an error.  */
8769 /* We use char because int might match the return type of a gcc2
8770     builtin and then its argument prototype would still apply.  */
8771 char png_read_image();
8772
8773 int main() {
8774 png_read_image()
8775 ; return 0; }
8776 EOF
8777 if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8778   rm -rf conftest*
8779   eval "ac_cv_lib_$ac_lib_var=yes"
8780 else
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   eval "ac_cv_lib_$ac_lib_var=no"
8785 fi
8786 rm -f conftest*
8787 xe_check_libs=""
8788
8789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8790   echo "$ac_t""yes" 1>&6
8791   :
8792 else
8793   echo "$ac_t""no" 1>&6
8794 with_png=no
8795 fi
8796
8797  }
8798   if test -z "$with_png"; then
8799     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8800 echo "configure:8801: checking for workable png version information" >&5
8801     xe_check_libs="-lpng -lz"
8802     cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 #include <png.h>
8806     int main(int c, char **v) {
8807     if (c == 1) return 0;
8808     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8809     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8810 EOF
8811 if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8812 then
8813   ./conftest dummy_arg; png_status=$?;
8814       if test "$png_status" = "0"; then
8815         with_png=yes;
8816       else
8817         with_png=no;
8818         if test "$png_status" = "1"; then
8819           png_problem="PNG library version and header file don't match!"
8820         elif test "$png_status" = "2"; then
8821           png_problem="PNG library version too old (pre 1.0.2)!"
8822         fi
8823         echo "
8824 *** WARNING *** $png_problem
8825   I'm not touching that with a 10-foot pole!
8826   If you really want to use the installed version of libPNG, rerun
8827   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8828     fi
8829 else
8830   conftest_rc="$?"
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -fr conftest*
8834   with_png=no
8835 fi
8836 rm -fr conftest*
8837     xe_check_libs=
8838     echo "$ac_t""$with_png" 1>&6
8839   fi
8840   if test "$with_png" = "yes"; then
8841     { test "$extra_verbose" = "yes" && cat << \EOF
8842     Defining HAVE_PNG
8843 EOF
8844 cat >> confdefs.h <<\EOF
8845 #define HAVE_PNG 1
8846 EOF
8847 }
8848
8849     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8850   fi
8851
8852     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8853 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8854 echo "configure:8855: checking for tiffio.h" >&5
8855
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 #include <tiffio.h>
8860 EOF
8861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8862 { (eval echo configure:8863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8864 if test -z "$ac_err"; then
8865   rm -rf conftest*
8866   eval "ac_cv_header_$ac_safe=yes"
8867 else
8868   echo "$ac_err" >&5
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_header_$ac_safe=no"
8873 fi
8874 rm -f conftest*
8875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8876   echo "$ac_t""yes" 1>&6
8877   :
8878 else
8879   echo "$ac_t""no" 1>&6
8880 with_tiff=no
8881 fi
8882  }
8883   test -z "$with_tiff" && { 
8884 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8885 echo "configure:8886: checking for TIFFClientOpen in -ltiff" >&5
8886 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8887
8888 xe_check_libs=" -ltiff "
8889 cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* Override any gcc2 internal prototype to avoid an error.  */
8893 /* We use char because int might match the return type of a gcc2
8894     builtin and then its argument prototype would still apply.  */
8895 char TIFFClientOpen();
8896
8897 int main() {
8898 TIFFClientOpen()
8899 ; return 0; }
8900 EOF
8901 if { (eval echo configure:8902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=yes"
8904 else
8905   echo "configure: failed program was:" >&5
8906   cat conftest.$ac_ext >&5
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=no"
8909 fi
8910 rm -f conftest*
8911 xe_check_libs=""
8912
8913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8914   echo "$ac_t""yes" 1>&6
8915   :
8916 else
8917   echo "$ac_t""no" 1>&6
8918 with_tiff=no
8919 fi
8920
8921  }
8922   test -z "$with_tiff" && with_tiff=yes
8923   if test "$with_tiff" = "yes"; then
8924     { test "$extra_verbose" = "yes" && cat << \EOF
8925     Defining HAVE_TIFF
8926 EOF
8927 cat >> confdefs.h <<\EOF
8928 #define HAVE_TIFF 1
8929 EOF
8930 }
8931
8932     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8933   fi
8934 fi
8935
8936
8937 if test "$with_gtk" = "yes"; then
8938     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8939 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8940 echo "configure:8941: checking for compface.h" >&5
8941
8942 cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945 #include <compface.h>
8946 EOF
8947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8948 { (eval echo configure:8949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8950 if test -z "$ac_err"; then
8951   rm -rf conftest*
8952   eval "ac_cv_header_$ac_safe=yes"
8953 else
8954   echo "$ac_err" >&5
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   eval "ac_cv_header_$ac_safe=no"
8959 fi
8960 rm -f conftest*
8961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8962   echo "$ac_t""yes" 1>&6
8963   :
8964 else
8965   echo "$ac_t""no" 1>&6
8966 with_xface=no
8967 fi
8968  }
8969   test -z "$with_xface" && { 
8970 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8971 echo "configure:8972: checking for UnGenFace in -lcompface" >&5
8972 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8973
8974 xe_check_libs=" -lcompface "
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 /* Override any gcc2 internal prototype to avoid an error.  */
8979 /* We use char because int might match the return type of a gcc2
8980     builtin and then its argument prototype would still apply.  */
8981 char UnGenFace();
8982
8983 int main() {
8984 UnGenFace()
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   eval "ac_cv_lib_$ac_lib_var=yes"
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   eval "ac_cv_lib_$ac_lib_var=no"
8995 fi
8996 rm -f conftest*
8997 xe_check_libs=""
8998
8999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9000   echo "$ac_t""yes" 1>&6
9001   : 
9002 else
9003   echo "$ac_t""no" 1>&6
9004 with_xface=no
9005 fi
9006
9007  }
9008   test -z "$with_xface" && with_xface=yes
9009   if test "$with_xface" = "yes"; then
9010     { test "$extra_verbose" = "yes" && cat << \EOF
9011     Defining HAVE_XFACE
9012 EOF
9013 cat >> confdefs.h <<\EOF
9014 #define HAVE_XFACE 1
9015 EOF
9016 }
9017
9018     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9019   fi
9020 fi
9021
9022
9023
9024 if test "$with_x11" = "yes"; then
9025   echo "checking for X11 graphics libraries" 1>&6
9026 echo "configure:9027: checking for X11 graphics libraries" >&5
9027 fi
9028
9029 if test "$with_x11" = "yes"; then
9030   echo "checking for the Athena widgets" 1>&6
9031 echo "configure:9032: checking for the Athena widgets" >&5
9032
9033     case "$with_athena" in
9034         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9035     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9036     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9037     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9038     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9039     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9040   esac
9041
9042   athena_3d_function=Xaw3dComputeBottomShadowRGB
9043
9044     if test "$athena_3d" = "no"; then
9045     
9046 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9047 echo "configure:9048: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9048 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9049
9050 xe_check_libs=" -l$athena_variant "
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 /* Override any gcc2 internal prototype to avoid an error.  */
9055 /* We use char because int might match the return type of a gcc2
9056     builtin and then its argument prototype would still apply.  */
9057 char XawScrollbarSetThumb();
9058
9059 int main() {
9060 XawScrollbarSetThumb()
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=yes"
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   eval "ac_cv_lib_$ac_lib_var=no"
9071 fi
9072 rm -f conftest*
9073 xe_check_libs=""
9074
9075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9076   echo "$ac_t""yes" 1>&6
9077           
9078 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9079 echo "configure:9080: checking for $athena_3d_function in -l$athena_variant" >&5
9080 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9081
9082 xe_check_libs=" -l$athena_variant "
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 /* Override any gcc2 internal prototype to avoid an error.  */
9087 /* We use char because int might match the return type of a gcc2
9088     builtin and then its argument prototype would still apply.  */
9089 char $athena_3d_function();
9090
9091 int main() {
9092 $athena_3d_function()
9093 ; return 0; }
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9096   rm -rf conftest*
9097   eval "ac_cv_lib_$ac_lib_var=yes"
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   eval "ac_cv_lib_$ac_lib_var=no"
9103 fi
9104 rm -f conftest*
9105 xe_check_libs=""
9106
9107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9108   echo "$ac_t""yes" 1>&6
9109   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9110 else
9111   echo "$ac_t""no" 1>&6
9112 athena_lib=$athena_variant
9113 fi
9114
9115
9116       
9117 else
9118   echo "$ac_t""no" 1>&6
9119 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9120 fi
9121
9122
9123   else
9124         
9125 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9126 echo "configure:9127: checking for $athena_3d_function in -l$athena_variant" >&5
9127 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9128
9129 xe_check_libs=" -l$athena_variant "
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 /* Override any gcc2 internal prototype to avoid an error.  */
9134 /* We use char because int might match the return type of a gcc2
9135     builtin and then its argument prototype would still apply.  */
9136 char $athena_3d_function();
9137
9138 int main() {
9139 $athena_3d_function()
9140 ; return 0; }
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9143   rm -rf conftest*
9144   eval "ac_cv_lib_$ac_lib_var=yes"
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   eval "ac_cv_lib_$ac_lib_var=no"
9150 fi
9151 rm -f conftest*
9152 xe_check_libs=""
9153
9154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9155   echo "$ac_t""yes" 1>&6
9156   athena_lib=$athena_variant
9157 else
9158   echo "$ac_t""no" 1>&6
9159 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9160 echo "configure:9161: checking for $athena_3d_function in -lXaw" >&5
9161 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9162
9163 xe_check_libs=" -lXaw "
9164 cat > conftest.$ac_ext <<EOF
9165 #line 9166 "configure"
9166 #include "confdefs.h"
9167 /* Override any gcc2 internal prototype to avoid an error.  */
9168 /* We use char because int might match the return type of a gcc2
9169     builtin and then its argument prototype would still apply.  */
9170 char $athena_3d_function();
9171
9172 int main() {
9173 $athena_3d_function()
9174 ; return 0; }
9175 EOF
9176 if { (eval echo configure:9177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9177   rm -rf conftest*
9178   eval "ac_cv_lib_$ac_lib_var=yes"
9179 else
9180   echo "configure: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   rm -rf conftest*
9183   eval "ac_cv_lib_$ac_lib_var=no"
9184 fi
9185 rm -f conftest*
9186 xe_check_libs=""
9187
9188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9189   echo "$ac_t""yes" 1>&6
9190   athena_lib=Xaw;
9191           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9192         
9193 else
9194   echo "$ac_t""no" 1>&6
9195 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9196 fi
9197
9198
9199 fi
9200
9201
9202   fi
9203
9204     if test "$athena_3d" = "no"; then
9205     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9206 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9207 echo "configure:9208: checking for X11/Xaw/ThreeD.h" >&5
9208
9209 cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212 #include <X11/Xaw/ThreeD.h>
9213 EOF
9214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9215 { (eval echo configure:9216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9217 if test -z "$ac_err"; then
9218   rm -rf conftest*
9219   eval "ac_cv_header_$ac_safe=yes"
9220 else
9221   echo "$ac_err" >&5
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224   rm -rf conftest*
9225   eval "ac_cv_header_$ac_safe=no"
9226 fi
9227 rm -f conftest*
9228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9229   echo "$ac_t""yes" 1>&6
9230   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9231 else
9232   echo "$ac_t""no" 1>&6
9233 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9234 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9235 echo "configure:9236: checking for X11/Xaw/XawInit.h" >&5
9236
9237 cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 #include <X11/Xaw/XawInit.h>
9241 EOF
9242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9243 { (eval echo configure:9244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9245 if test -z "$ac_err"; then
9246   rm -rf conftest*
9247   eval "ac_cv_header_$ac_safe=yes"
9248 else
9249   echo "$ac_err" >&5
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_header_$ac_safe=no"
9254 fi
9255 rm -f conftest*
9256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258   athena_h_path=X11/Xaw
9259 else
9260   echo "$ac_t""no" 1>&6
9261 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9262 fi
9263
9264 fi
9265
9266   else
9267             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9268 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9269 echo "configure:9270: checking for X11/$athena_variant/XawInit.h" >&5
9270
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274 #include <X11/$athena_variant/XawInit.h>
9275 EOF
9276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9277 { (eval echo configure:9278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9279 if test -z "$ac_err"; then
9280   rm -rf conftest*
9281   eval "ac_cv_header_$ac_safe=yes"
9282 else
9283   echo "$ac_err" >&5
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -rf conftest*
9287   eval "ac_cv_header_$ac_safe=no"
9288 fi
9289 rm -f conftest*
9290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9293 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9294 echo "configure:9295: checking for X11/$athena_variant/ThreeD.h" >&5
9295
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <X11/$athena_variant/ThreeD.h>
9300 EOF
9301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9302 { (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9304 if test -z "$ac_err"; then
9305   rm -rf conftest*
9306   eval "ac_cv_header_$ac_safe=yes"
9307 else
9308   echo "$ac_err" >&5
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=no"
9313 fi
9314 rm -f conftest*
9315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317   athena_h_path=X11/$athena_variant
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322 else
9323   echo "$ac_t""no" 1>&6
9324 fi
9325
9326
9327         if test -z "$athena_h_path"; then
9328       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9329 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9330 echo "configure:9331: checking for $athena_variant/XawInit.h" >&5
9331
9332 cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 #include <$athena_variant/XawInit.h>
9336 EOF
9337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9338 { (eval echo configure:9339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9340 if test -z "$ac_err"; then
9341   rm -rf conftest*
9342   eval "ac_cv_header_$ac_safe=yes"
9343 else
9344   echo "$ac_err" >&5
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_header_$ac_safe=no"
9349 fi
9350 rm -f conftest*
9351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9352   echo "$ac_t""yes" 1>&6
9353   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9354 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9355 echo "configure:9356: checking for $athena_variant/ThreeD.h" >&5
9356
9357 cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 #include <$athena_variant/ThreeD.h>
9361 EOF
9362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9363 { (eval echo configure:9364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9365 if test -z "$ac_err"; then
9366   rm -rf conftest*
9367   eval "ac_cv_header_$ac_safe=yes"
9368 else
9369   echo "$ac_err" >&5
9370   echo "configure: failed program was:" >&5
9371   cat conftest.$ac_ext >&5
9372   rm -rf conftest*
9373   eval "ac_cv_header_$ac_safe=no"
9374 fi
9375 rm -f conftest*
9376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9377   echo "$ac_t""yes" 1>&6
9378   athena_h_path=$athena_variant
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383 else
9384   echo "$ac_t""no" 1>&6
9385 fi
9386
9387     fi
9388
9389         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9390       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9391 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9392 echo "configure:9393: checking for X11/Xaw3d/XawInit.h" >&5
9393
9394 cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397 #include <X11/Xaw3d/XawInit.h>
9398 EOF
9399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9400 { (eval echo configure:9401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9402 if test -z "$ac_err"; then
9403   rm -rf conftest*
9404   eval "ac_cv_header_$ac_safe=yes"
9405 else
9406   echo "$ac_err" >&5
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -rf conftest*
9410   eval "ac_cv_header_$ac_safe=no"
9411 fi
9412 rm -f conftest*
9413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9414   echo "$ac_t""yes" 1>&6
9415   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9416 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9417 echo "configure:9418: checking for X11/Xaw3d/ThreeD.h" >&5
9418
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #include <X11/Xaw3d/ThreeD.h>
9423 EOF
9424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9425 { (eval echo configure:9426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9427 if test -z "$ac_err"; then
9428   rm -rf conftest*
9429   eval "ac_cv_header_$ac_safe=yes"
9430 else
9431   echo "$ac_err" >&5
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   eval "ac_cv_header_$ac_safe=no"
9436 fi
9437 rm -f conftest*
9438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9439   echo "$ac_t""yes" 1>&6
9440   
9441             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9442             athena_h_path=X11/Xaw3d
9443           
9444 else
9445   echo "$ac_t""no" 1>&6
9446 fi
9447
9448 else
9449   echo "$ac_t""no" 1>&6
9450 fi
9451
9452     fi
9453
9454         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9455       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9456 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9457 echo "configure:9458: checking for Xaw3d/XawInit.h" >&5
9458
9459 cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 #include <Xaw3d/XawInit.h>
9463 EOF
9464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9465 { (eval echo configure:9466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9467 if test -z "$ac_err"; then
9468   rm -rf conftest*
9469   eval "ac_cv_header_$ac_safe=yes"
9470 else
9471   echo "$ac_err" >&5
9472   echo "configure: failed program was:" >&5
9473   cat conftest.$ac_ext >&5
9474   rm -rf conftest*
9475   eval "ac_cv_header_$ac_safe=no"
9476 fi
9477 rm -f conftest*
9478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9479   echo "$ac_t""yes" 1>&6
9480   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9481 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9482 echo "configure:9483: checking for Xaw3d/ThreeD.h" >&5
9483
9484 cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 #include <Xaw3d/ThreeD.h>
9488 EOF
9489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9490 { (eval echo configure:9491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9492 if test -z "$ac_err"; then
9493   rm -rf conftest*
9494   eval "ac_cv_header_$ac_safe=yes"
9495 else
9496   echo "$ac_err" >&5
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   eval "ac_cv_header_$ac_safe=no"
9501 fi
9502 rm -f conftest*
9503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9504   echo "$ac_t""yes" 1>&6
9505   
9506             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9507             athena_h_path=Xaw3d
9508           
9509 else
9510   echo "$ac_t""no" 1>&6
9511 fi
9512
9513 else
9514   echo "$ac_t""no" 1>&6
9515 fi
9516
9517     fi
9518
9519             if test -z "$athena_h_path"; then
9520       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9521 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9522 echo "configure:9523: checking for X11/Xaw/ThreeD.h" >&5
9523
9524 cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 #include <X11/Xaw/ThreeD.h>
9528 EOF
9529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9530 { (eval echo configure:9531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9532 if test -z "$ac_err"; then
9533   rm -rf conftest*
9534   eval "ac_cv_header_$ac_safe=yes"
9535 else
9536   echo "$ac_err" >&5
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   eval "ac_cv_header_$ac_safe=no"
9541 fi
9542 rm -f conftest*
9543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9544   echo "$ac_t""yes" 1>&6
9545   
9546           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9547           athena_h_path=X11/Xaw
9548         
9549 else
9550   echo "$ac_t""no" 1>&6
9551 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9552 fi
9553
9554     fi
9555   fi
9556
9557     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9558     have_xaw=yes
9559   else
9560     have_xaw=no
9561   fi
9562
9563 else
9564   have_xaw=no
9565 fi 
9566 if test "$with_x11" = "yes"; then
9567     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9568 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9569 echo "configure:9570: checking for Xm/Xm.h" >&5
9570
9571 cat > conftest.$ac_ext <<EOF
9572 #line 9573 "configure"
9573 #include "confdefs.h"
9574 #include <Xm/Xm.h>
9575 EOF
9576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9577 { (eval echo configure:9578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9579 if test -z "$ac_err"; then
9580   rm -rf conftest*
9581   eval "ac_cv_header_$ac_safe=yes"
9582 else
9583   echo "$ac_err" >&5
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586   rm -rf conftest*
9587   eval "ac_cv_header_$ac_safe=no"
9588 fi
9589 rm -f conftest*
9590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9591   echo "$ac_t""yes" 1>&6
9592   
9593 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9594 echo "configure:9595: checking for XmStringFree in -lXm" >&5
9595 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9596
9597 xe_check_libs=" -lXm "
9598 cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 /* Override any gcc2 internal prototype to avoid an error.  */
9602 /* We use char because int might match the return type of a gcc2
9603     builtin and then its argument prototype would still apply.  */
9604 char XmStringFree();
9605
9606 int main() {
9607 XmStringFree()
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9611   rm -rf conftest*
9612   eval "ac_cv_lib_$ac_lib_var=yes"
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   eval "ac_cv_lib_$ac_lib_var=no"
9618 fi
9619 rm -f conftest*
9620 xe_check_libs=""
9621
9622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9623   echo "$ac_t""yes" 1>&6
9624   have_motif=yes
9625 else
9626   echo "$ac_t""no" 1>&6
9627 have_motif=no
9628 fi
9629
9630
9631 else
9632   echo "$ac_t""no" 1>&6
9633 have_motif=no
9634 fi
9635
9636
9637   if test "$have_motif" = "yes"; then
9638         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9639 echo "configure:9640: checking for Lesstif" >&5
9640     cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 #include <Xm/Xm.h>
9644 #ifdef LESSTIF_VERSION
9645 yes
9646 #endif
9647
9648 EOF
9649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9650   egrep "yes" >/dev/null 2>&1; then
9651   rm -rf conftest*
9652   have_lesstif=yes
9653 else
9654   rm -rf conftest*
9655   have_lesstif=no
9656 fi
9657 rm -f conftest*
9658
9659   echo "$ac_t""$have_lesstif" 1>&6
9660   fi
9661
9662 fi 
9663
9664 case "$opsys" in
9665   *linux* )  lucid_prefers_motif="no"  ;;
9666   * )        lucid_prefers_motif="yes" ;;
9667 esac
9668
9669 case "$with_menubars" in "" | "yes" | "athena" )
9670   with_menubars="lucid" ;;
9671 esac
9672 case "$with_dialogs" in "" | "yes" | "lucid" )
9673   if test "$lucid_prefers_motif" = "yes"; then
9674     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9675     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9676     else with_dialogs=no
9677     fi
9678   else
9679     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9680     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9681     else with_dialogs=no
9682     fi
9683   fi ;;
9684 esac
9685 case "$with_scrollbars" in "" | "yes" )
9686   with_scrollbars="lucid" ;;
9687 esac
9688 case "$with_widgets" in
9689   "yes" | "lucid")
9690     if test "$lucid_prefers_motif" = "yes"; then
9691       if   test "$have_motif" = "yes"; then with_widgets="motif"
9692       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9693       else with_widgets=no
9694       fi
9695     else
9696       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9697       elif test "$have_motif" = "yes"; then with_widgets="motif"
9698       else with_widgets=no
9699       fi
9700     fi ;;
9701   "" )
9702     with_widgets=no ;;
9703 esac
9704
9705 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9706
9707 case "$all_widgets" in
9708   *athena* )
9709     if test "$have_xaw" != "yes"; then
9710       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9711     fi
9712
9713         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9714
9715         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9716
9717                     { test "$extra_verbose" = "yes" && cat << EOF
9718     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9719 EOF
9720 cat >> confdefs.h <<EOF
9721 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9722 EOF
9723 }
9724
9725     { test "$extra_verbose" = "yes" && cat << EOF
9726     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9727 EOF
9728 cat >> confdefs.h <<EOF
9729 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9730 EOF
9731 }
9732
9733     { test "$extra_verbose" = "yes" && cat << EOF
9734     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9735 EOF
9736 cat >> confdefs.h <<EOF
9737 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9738 EOF
9739 }
9740
9741     { test "$extra_verbose" = "yes" && cat << EOF
9742     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9743 EOF
9744 cat >> confdefs.h <<EOF
9745 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9746 EOF
9747 }
9748
9749     { test "$extra_verbose" = "yes" && cat << EOF
9750     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9751 EOF
9752 cat >> confdefs.h <<EOF
9753 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9754 EOF
9755 }
9756
9757     { test "$extra_verbose" = "yes" && cat << EOF
9758     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9759 EOF
9760 cat >> confdefs.h <<EOF
9761 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9762 EOF
9763 }
9764
9765     { test "$extra_verbose" = "yes" && cat << EOF
9766     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9767 EOF
9768 cat >> confdefs.h <<EOF
9769 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9770 EOF
9771 }
9772
9773     { test "$extra_verbose" = "yes" && cat << EOF
9774     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9775 EOF
9776 cat >> confdefs.h <<EOF
9777 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9778 EOF
9779 }
9780
9781     { test "$extra_verbose" = "yes" && cat << EOF
9782     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9783 EOF
9784 cat >> confdefs.h <<EOF
9785 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9786 EOF
9787 }
9788
9789     { test "$extra_verbose" = "yes" && cat << EOF
9790     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9791 EOF
9792 cat >> confdefs.h <<EOF
9793 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9794 EOF
9795 }
9796
9797
9798     { test "$extra_verbose" = "yes" && cat << \EOF
9799     Defining LWLIB_USES_ATHENA
9800 EOF
9801 cat >> confdefs.h <<\EOF
9802 #define LWLIB_USES_ATHENA 1
9803 EOF
9804 }
9805
9806     { test "$extra_verbose" = "yes" && cat << \EOF
9807     Defining NEED_ATHENA
9808 EOF
9809 cat >> confdefs.h <<\EOF
9810 #define NEED_ATHENA 1
9811 EOF
9812 }
9813
9814     need_athena="yes"
9815
9816     if test "$athena_3d" = "yes"; then
9817       { test "$extra_verbose" = "yes" && cat << \EOF
9818     Defining HAVE_ATHENA_3D
9819 EOF
9820 cat >> confdefs.h <<\EOF
9821 #define HAVE_ATHENA_3D 1
9822 EOF
9823 }
9824
9825     fi
9826   ;;
9827 esac
9828
9829 case "$all_widgets" in *motif* )
9830   { test "$extra_verbose" = "yes" && cat << \EOF
9831     Defining LWLIB_USES_MOTIF
9832 EOF
9833 cat >> confdefs.h <<\EOF
9834 #define LWLIB_USES_MOTIF 1
9835 EOF
9836 }
9837
9838   { test "$extra_verbose" = "yes" && cat << \EOF
9839     Defining NEED_MOTIF
9840 EOF
9841 cat >> confdefs.h <<\EOF
9842 #define NEED_MOTIF 1
9843 EOF
9844 }
9845
9846   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9847   need_motif=yes ;;
9848 esac
9849
9850 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9851 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9852 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9853 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9854         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9855 case "$with_widgets" in athena* )
9856         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;;
9857 esac
9858 case "$all_widgets" in *lucid* )
9859   { test "$extra_verbose" = "yes" && cat << \EOF
9860     Defining NEED_LUCID
9861 EOF
9862 cat >> confdefs.h <<\EOF
9863 #define NEED_LUCID 1
9864 EOF
9865 }
9866
9867   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9868 esac
9869
9870
9871
9872 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9873     Defining LWLIB_SCROLLBARS_ATHENA
9874 EOF
9875 cat >> confdefs.h <<\EOF
9876 #define LWLIB_SCROLLBARS_ATHENA 1
9877 EOF
9878 }
9879
9880 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9881     Defining LWLIB_DIALOGS_ATHENA
9882 EOF
9883 cat >> confdefs.h <<\EOF
9884 #define LWLIB_DIALOGS_ATHENA 1
9885 EOF
9886 }
9887
9888
9889 if test "$athena_3d" = "yes"; then
9890   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9891     Defining LWLIB_SCROLLBARS_ATHENA3D
9892 EOF
9893 cat >> confdefs.h <<\EOF
9894 #define LWLIB_SCROLLBARS_ATHENA3D 1
9895 EOF
9896 }
9897
9898   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9899     Defining LWLIB_DIALOGS_ATHENA3D
9900 EOF
9901 cat >> confdefs.h <<\EOF
9902 #define LWLIB_DIALOGS_ATHENA3D 1
9903 EOF
9904 }
9905
9906 fi
9907
9908 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9909     Defining LWLIB_WIDGETS_ATHENA
9910 EOF
9911 cat >> confdefs.h <<\EOF
9912 #define LWLIB_WIDGETS_ATHENA 1
9913 EOF
9914 }
9915 ;; esac
9916 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9917         { test "$extra_verbose" = "yes" && cat << \EOF
9918     Defining LWLIB_TABS_LUCID
9919 EOF
9920 cat >> confdefs.h <<\EOF
9921 #define LWLIB_TABS_LUCID 1
9922 EOF
9923 }
9924
9925
9926 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9927     Defining HAVE_MENUBARS
9928 EOF
9929 cat >> confdefs.h <<\EOF
9930 #define HAVE_MENUBARS 1
9931 EOF
9932 }
9933
9934 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9935     Defining HAVE_SCROLLBARS
9936 EOF
9937 cat >> confdefs.h <<\EOF
9938 #define HAVE_SCROLLBARS 1
9939 EOF
9940 }
9941
9942 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9943     Defining HAVE_DIALOGS
9944 EOF
9945 cat >> confdefs.h <<\EOF
9946 #define HAVE_DIALOGS 1
9947 EOF
9948 }
9949
9950 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9951     Defining HAVE_TOOLBARS
9952 EOF
9953 cat >> confdefs.h <<\EOF
9954 #define HAVE_TOOLBARS 1
9955 EOF
9956 }
9957
9958 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9959     Defining HAVE_WIDGETS
9960 EOF
9961 cat >> confdefs.h <<\EOF
9962 #define HAVE_WIDGETS 1
9963 EOF
9964 }
9965
9966
9967 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9968     Defining LWLIB_MENUBARS_LUCID
9969 EOF
9970 cat >> confdefs.h <<\EOF
9971 #define LWLIB_MENUBARS_LUCID 1
9972 EOF
9973 }
9974
9975 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9976     Defining LWLIB_SCROLLBARS_LUCID
9977 EOF
9978 cat >> confdefs.h <<\EOF
9979 #define LWLIB_SCROLLBARS_LUCID 1
9980 EOF
9981 }
9982
9983
9984 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9985     Defining LWLIB_MENUBARS_MOTIF
9986 EOF
9987 cat >> confdefs.h <<\EOF
9988 #define LWLIB_MENUBARS_MOTIF 1
9989 EOF
9990 }
9991
9992 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9993     Defining LWLIB_SCROLLBARS_MOTIF
9994 EOF
9995 cat >> confdefs.h <<\EOF
9996 #define LWLIB_SCROLLBARS_MOTIF 1
9997 EOF
9998 }
9999
10000 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10001     Defining LWLIB_DIALOGS_MOTIF
10002 EOF
10003 cat >> confdefs.h <<\EOF
10004 #define LWLIB_DIALOGS_MOTIF 1
10005 EOF
10006 }
10007
10008 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10009     Defining LWLIB_WIDGETS_MOTIF
10010 EOF
10011 cat >> confdefs.h <<\EOF
10012 #define LWLIB_WIDGETS_MOTIF 1
10013 EOF
10014 }
10015
10016
10017 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10018    echo "    xemacs will be linked with \"menubar.o\""
10019  fi
10020 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10021    echo "    xemacs will be linked with \"scrollbar.o\""
10022  fi
10023 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10024    echo "    xemacs will be linked with \"dialog.o\""
10025  fi
10026 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10027    echo "    xemacs will be linked with \"toolbar.o\""
10028  fi
10029
10030 if test "$with_gtk" = "yes"; then
10031   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10032    echo "    xemacs will be linked with \"menubar-gtk.o\""
10033  fi
10034   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10035    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10036  fi
10037   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10038    echo "    xemacs will be linked with \"dialog-gtk.o\""
10039  fi
10040   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10041    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10042  fi
10043   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10044    echo "    xemacs will be linked with \"gui-gtk.o\""
10045  fi
10046 fi
10047
10048 if test "$with_x11" = "yes"; then
10049   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10050    echo "    xemacs will be linked with \"menubar-x.o\""
10051  fi
10052   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10053    echo "    xemacs will be linked with \"scrollbar-x.o\""
10054  fi
10055   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10056    echo "    xemacs will be linked with \"dialog-x.o\""
10057  fi
10058   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10059    echo "    xemacs will be linked with \"toolbar-x.o\""
10060  fi
10061   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10062    echo "    xemacs will be linked with \"gui-x.o\""
10063  fi
10064 fi
10065
10066
10067 test -z "$with_mule" && with_mule=no
10068 test -z "$with_file_coding" && with_file_coding=no
10069
10070
10071 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10072   { test "$extra_verbose" = "yes" && cat << \EOF
10073     Defining FILE_CODING
10074 EOF
10075 cat >> confdefs.h <<\EOF
10076 #define FILE_CODING 1
10077 EOF
10078 }
10079
10080   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10081    echo "    xemacs will be linked with \"file-coding.o\""
10082  fi
10083 fi
10084
10085 concord_includes_found=no
10086 if test "$with_concord" != "no"; then
10087    ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10088 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10089 echo "configure:10090: checking for concord.h" >&5
10090
10091 cat > conftest.$ac_ext <<EOF
10092 #line 10093 "configure"
10093 #include "confdefs.h"
10094 #include <concord.h>
10095 EOF
10096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10097 { (eval echo configure:10098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10099 if test -z "$ac_err"; then
10100   rm -rf conftest*
10101   eval "ac_cv_header_$ac_safe=yes"
10102 else
10103   echo "$ac_err" >&5
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   eval "ac_cv_header_$ac_safe=no"
10108 fi
10109 rm -f conftest*
10110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10111   echo "$ac_t""yes" 1>&6
10112   :
10113 else
10114   echo "$ac_t""no" 1>&6
10115 with_concord=no
10116 fi
10117
10118 fi
10119 if test "$concord_includes_found" = "no" -a "$with_concord" != "no" -a \
10120    -d "/usr/local/concord/include"; then
10121   save_c_switch_site="$c_switch_site"
10122   c_switch_site="$c_switch_site -I/usr/local/concord/include"
10123   ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10124 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10125 echo "configure:10126: checking for concord.h" >&5
10126
10127 cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130 #include <concord.h>
10131 EOF
10132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10133 { (eval echo configure:10134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10135 if test -z "$ac_err"; then
10136   rm -rf conftest*
10137   eval "ac_cv_header_$ac_safe=yes"
10138 else
10139   echo "$ac_err" >&5
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   eval "ac_cv_header_$ac_safe=no"
10144 fi
10145 rm -f conftest*
10146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10147   echo "$ac_t""yes" 1>&6
10148   concord_includes_found=yes
10149 else
10150   echo "$ac_t""no" 1>&6
10151 fi
10152
10153   if test "$concord_includes_found" != "yes"; then
10154     c_switch_site="$save_c_switch_site"
10155     with_concord="no"
10156   fi
10157 fi
10158
10159 test -z "$with_concord" && with_concord=yes
10160 if test "$with_concord" = "yes"; then
10161   { test "$extra_verbose" = "yes" && cat << \EOF
10162     Defining HAVE_CONCORD
10163 EOF
10164 cat >> confdefs.h <<\EOF
10165 #define HAVE_CONCORD 1
10166 EOF
10167 }
10168
10169   libs_x="-lconcord $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lconcord\" to \$libs_x"; fi
10170   extra_objs="$extra_objs concord.o" &&  if test "$extra_verbose" = "yes"; then
10171    echo "    xemacs will be linked with \"concord.o\""
10172  fi
10173 fi
10174
10175 test -z "$with_chise" && with_chise=yes
10176 if test "$with_chise" = "yes"; then
10177     with_mule=yes
10178     with_utf_2000=yes
10179     with_text_coding=yes
10180 fi
10181
10182 if test "$with_mule" = "yes" ; then
10183   echo "checking for Mule-related features" 1>&6
10184 echo "configure:10185: checking for Mule-related features" >&5
10185   { test "$extra_verbose" = "yes" && cat << \EOF
10186     Defining MULE
10187 EOF
10188 cat >> confdefs.h <<\EOF
10189 #define MULE 1
10190 EOF
10191 }
10192
10193
10194     chise_includes_found=no
10195   if test "$with_chise" != "no"; then
10196     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10197 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10198 echo "configure:10199: checking for chise.h" >&5
10199
10200 cat > conftest.$ac_ext <<EOF
10201 #line 10202 "configure"
10202 #include "confdefs.h"
10203 #include <chise.h>
10204 EOF
10205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10206 { (eval echo configure:10207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10208 if test -z "$ac_err"; then
10209   rm -rf conftest*
10210   eval "ac_cv_header_$ac_safe=yes"
10211 else
10212   echo "$ac_err" >&5
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=no"
10217 fi
10218 rm -f conftest*
10219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10220   echo "$ac_t""yes" 1>&6
10221   :
10222 else
10223   echo "$ac_t""no" 1>&6
10224 with_chise=no
10225 fi
10226
10227   fi
10228   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10229       -d "/usr/local/chise/include"; then
10230     save_c_switch_site="$c_switch_site"
10231     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10232     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10233 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10234 echo "configure:10235: checking for chise.h" >&5
10235
10236 cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239 #include <chise.h>
10240 EOF
10241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10242 { (eval echo configure:10243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10244 if test -z "$ac_err"; then
10245   rm -rf conftest*
10246   eval "ac_cv_header_$ac_safe=yes"
10247 else
10248   echo "$ac_err" >&5
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   eval "ac_cv_header_$ac_safe=no"
10253 fi
10254 rm -f conftest*
10255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10256   echo "$ac_t""yes" 1>&6
10257   chise_includes_found=yes
10258 else
10259   echo "$ac_t""no" 1>&6
10260 fi
10261
10262     if test "$chise_includes_found" != "yes"; then
10263       c_switch_site="$save_c_switch_site"
10264       with_chise="no"
10265     fi
10266   fi
10267
10268   test -z "$with_chise" && with_chise=yes
10269   if test "$with_chise" = "yes"; then
10270     { test "$extra_verbose" = "yes" && cat << \EOF
10271     Defining HAVE_CHISE
10272 EOF
10273 cat >> confdefs.h <<\EOF
10274 #define HAVE_CHISE 1
10275 EOF
10276 }
10277
10278     { test "$extra_verbose" = "yes" && cat << \EOF
10279     Defining HAVE_LIBCHISE
10280 EOF
10281 cat >> confdefs.h <<\EOF
10282 #define HAVE_LIBCHISE 1
10283 EOF
10284 }
10285
10286     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10287   fi
10288
10289   { test "$extra_verbose" = "yes" && cat << \EOF
10290     Defining FILE_CODING
10291 EOF
10292 cat >> confdefs.h <<\EOF
10293 #define FILE_CODING 1
10294 EOF
10295 }
10296
10297   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10298    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10299  fi
10300   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10301     { test "$extra_verbose" = "yes" && cat << \EOF
10302     Defining TEXT_CODING
10303 EOF
10304 cat >> confdefs.h <<\EOF
10305 #define TEXT_CODING 1
10306 EOF
10307 }
10308
10309     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10310    echo "    xemacs will be linked with \"text-coding.o\""
10311  fi
10312   else
10313     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10314    echo "    xemacs will be linked with \"file-coding.o\""
10315  fi
10316   fi
10317     for ac_hdr in libintl.h
10318 do
10319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10321 echo "configure:10322: checking for $ac_hdr" >&5
10322
10323 cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 #include <$ac_hdr>
10327 EOF
10328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10329 { (eval echo configure:10330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10331 if test -z "$ac_err"; then
10332   rm -rf conftest*
10333   eval "ac_cv_header_$ac_safe=yes"
10334 else
10335   echo "$ac_err" >&5
10336   echo "configure: failed program was:" >&5
10337   cat conftest.$ac_ext >&5
10338   rm -rf conftest*
10339   eval "ac_cv_header_$ac_safe=no"
10340 fi
10341 rm -f conftest*
10342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10343   echo "$ac_t""yes" 1>&6
10344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10345   { test "$extra_verbose" = "yes" && cat << EOF
10346     Defining $ac_tr_hdr
10347 EOF
10348 cat >> confdefs.h <<EOF
10349 #define $ac_tr_hdr 1
10350 EOF
10351 }
10352  
10353 else
10354   echo "$ac_t""no" 1>&6
10355 fi
10356 done
10357
10358   
10359 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10360 echo "configure:10361: checking for strerror in -lintl" >&5
10361 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10362
10363 xe_check_libs=" -lintl "
10364 cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 /* Override any gcc2 internal prototype to avoid an error.  */
10368 /* We use char because int might match the return type of a gcc2
10369     builtin and then its argument prototype would still apply.  */
10370 char strerror();
10371
10372 int main() {
10373 strerror()
10374 ; return 0; }
10375 EOF
10376 if { (eval echo configure:10377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10377   rm -rf conftest*
10378   eval "ac_cv_lib_$ac_lib_var=yes"
10379 else
10380   echo "configure: failed program was:" >&5
10381   cat conftest.$ac_ext >&5
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=no"
10384 fi
10385 rm -f conftest*
10386 xe_check_libs=""
10387
10388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10389   echo "$ac_t""yes" 1>&6
10390     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10392   { test "$extra_verbose" = "yes" && cat << EOF
10393     Defining $ac_tr_lib
10394 EOF
10395 cat >> confdefs.h <<EOF
10396 #define $ac_tr_lib 1
10397 EOF
10398 }
10399
10400   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10401
10402 else
10403   echo "$ac_t""no" 1>&6
10404 fi
10405
10406
10407
10408   if test "$with_utf_2000" = "yes" ; then
10409     { test "$extra_verbose" = "yes" && cat << \EOF
10410     Defining CHAR_IS_UCS4
10411 EOF
10412 cat >> confdefs.h <<\EOF
10413 #define CHAR_IS_UCS4 1
10414 EOF
10415 }
10416
10417     { test "$extra_verbose" = "yes" && cat << \EOF
10418     Defining UTF2000
10419 EOF
10420 cat >> confdefs.h <<\EOF
10421 #define UTF2000 1
10422 EOF
10423 }
10424
10425     with_wnn=no
10426     with_wnn6=no
10427   fi
10428
10429   echo "checking for Mule input methods" 1>&6
10430 echo "configure:10431: checking for Mule input methods" >&5
10431         case "$with_xim" in "" | "yes" )
10432     echo "checking for XIM" 1>&6
10433 echo "configure:10434: checking for XIM" >&5
10434     
10435 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10436 echo "configure:10437: checking for XOpenIM in -lX11" >&5
10437 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10438
10439 xe_check_libs=" -lX11 "
10440 cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 /* Override any gcc2 internal prototype to avoid an error.  */
10444 /* We use char because int might match the return type of a gcc2
10445     builtin and then its argument prototype would still apply.  */
10446 char XOpenIM();
10447
10448 int main() {
10449 XOpenIM()
10450 ; return 0; }
10451 EOF
10452 if { (eval echo configure:10453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10453   rm -rf conftest*
10454   eval "ac_cv_lib_$ac_lib_var=yes"
10455 else
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -rf conftest*
10459   eval "ac_cv_lib_$ac_lib_var=no"
10460 fi
10461 rm -f conftest*
10462 xe_check_libs=""
10463
10464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10465   echo "$ac_t""yes" 1>&6
10466   with_xim=xlib
10467 else
10468   echo "$ac_t""no" 1>&6
10469 with_xim=no
10470 fi
10471
10472
10473             if test "$need_motif $have_lesstif" = "yes no"; then
10474       
10475 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10476 echo "configure:10477: checking for XmImMbLookupString in -lXm" >&5
10477 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10478
10479 xe_check_libs=" -lXm "
10480 cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 /* Override any gcc2 internal prototype to avoid an error.  */
10484 /* We use char because int might match the return type of a gcc2
10485     builtin and then its argument prototype would still apply.  */
10486 char XmImMbLookupString();
10487
10488 int main() {
10489 XmImMbLookupString()
10490 ; return 0; }
10491 EOF
10492 if { (eval echo configure:10493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10493   rm -rf conftest*
10494   eval "ac_cv_lib_$ac_lib_var=yes"
10495 else
10496   echo "configure: failed program was:" >&5
10497   cat conftest.$ac_ext >&5
10498   rm -rf conftest*
10499   eval "ac_cv_lib_$ac_lib_var=no"
10500 fi
10501 rm -f conftest*
10502 xe_check_libs=""
10503
10504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10505   echo "$ac_t""yes" 1>&6
10506   with_xim=motif
10507 else
10508   echo "$ac_t""no" 1>&6
10509 fi
10510
10511
10512     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10513       
10514 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10515 echo "configure:10516: checking for XmImMbLookupString in -lXm" >&5
10516 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10517
10518 xe_check_libs=" -lXm "
10519 cat > conftest.$ac_ext <<EOF
10520 #line 10521 "configure"
10521 #include "confdefs.h"
10522 /* Override any gcc2 internal prototype to avoid an error.  */
10523 /* We use char because int might match the return type of a gcc2
10524     builtin and then its argument prototype would still apply.  */
10525 char XmImMbLookupString();
10526
10527 int main() {
10528 XmImMbLookupString()
10529 ; return 0; }
10530 EOF
10531 if { (eval echo configure:10532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10532   rm -rf conftest*
10533   eval "ac_cv_lib_$ac_lib_var=yes"
10534 else
10535   echo "configure: failed program was:" >&5
10536   cat conftest.$ac_ext >&5
10537   rm -rf conftest*
10538   eval "ac_cv_lib_$ac_lib_var=no"
10539 fi
10540 rm -f conftest*
10541 xe_check_libs=""
10542
10543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10544   echo "$ac_t""yes" 1>&6
10545   with_xim=motif
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549
10550
10551     fi ;;
10552   esac
10553   if test "$with_xim" != "no"; then
10554     { test "$extra_verbose" = "yes" && cat << \EOF
10555     Defining HAVE_XIM
10556 EOF
10557 cat >> confdefs.h <<\EOF
10558 #define HAVE_XIM 1
10559 EOF
10560 }
10561
10562     if test "$with_xim" = "xlib"; then
10563       { test "$extra_verbose" = "yes" && cat << \EOF
10564     Defining XIM_XLIB
10565 EOF
10566 cat >> confdefs.h <<\EOF
10567 #define XIM_XLIB 1
10568 EOF
10569 }
10570
10571       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10572    echo "    xemacs will be linked with \"input-method-xlib.o\""
10573  fi
10574     fi
10575     if test "$with_xim" = "motif"; then
10576       { test "$extra_verbose" = "yes" && cat << \EOF
10577     Defining XIM_MOTIF
10578 EOF
10579 cat >> confdefs.h <<\EOF
10580 #define XIM_MOTIF 1
10581 EOF
10582 }
10583
10584       need_motif=yes
10585       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10586    echo "    xemacs will be linked with \"input-method-motif.o\""
10587  fi
10588     fi
10589     if test "$with_xim" = "motif"; then
10590       with_xfs=no
10591     fi
10592   fi
10593
10594     if test "$with_xfs" = "yes" ; then
10595     echo "checking for XFontSet" 1>&6
10596 echo "configure:10597: checking for XFontSet" >&5
10597     
10598 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10599 echo "configure:10600: checking for XmbDrawString in -lX11" >&5
10600 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10601
10602 xe_check_libs=" -lX11 "
10603 cat > conftest.$ac_ext <<EOF
10604 #line 10605 "configure"
10605 #include "confdefs.h"
10606 /* Override any gcc2 internal prototype to avoid an error.  */
10607 /* We use char because int might match the return type of a gcc2
10608     builtin and then its argument prototype would still apply.  */
10609 char XmbDrawString();
10610
10611 int main() {
10612 XmbDrawString()
10613 ; return 0; }
10614 EOF
10615 if { (eval echo configure:10616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=yes"
10618 else
10619   echo "configure: failed program was:" >&5
10620   cat conftest.$ac_ext >&5
10621   rm -rf conftest*
10622   eval "ac_cv_lib_$ac_lib_var=no"
10623 fi
10624 rm -f conftest*
10625 xe_check_libs=""
10626
10627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10628   echo "$ac_t""yes" 1>&6
10629   :
10630 else
10631   echo "$ac_t""no" 1>&6
10632 with_xfs=no
10633 fi
10634
10635
10636     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10637       { test "$extra_verbose" = "yes" && cat << \EOF
10638     Defining USE_XFONTSET
10639 EOF
10640 cat >> confdefs.h <<\EOF
10641 #define USE_XFONTSET 1
10642 EOF
10643 }
10644
10645       if test "$with_xim" = "no" ; then
10646         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10647    echo "    xemacs will be linked with \"input-method-xlib.o\""
10648  fi
10649       fi
10650     fi
10651   fi 
10652     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10653   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10654 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10655 echo "configure:10656: checking for wnn/jllib.h" >&5
10656
10657 cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 #include <wnn/jllib.h>
10661 EOF
10662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10663 { (eval echo configure:10664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10665 if test -z "$ac_err"; then
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=yes"
10668 else
10669   echo "$ac_err" >&5
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_header_$ac_safe=no"
10674 fi
10675 rm -f conftest*
10676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10677   echo "$ac_t""yes" 1>&6
10678   :
10679 else
10680   echo "$ac_t""no" 1>&6
10681 with_wnn=no
10682 fi
10683  }
10684     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10685 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10686 echo "configure:10687: checking for wnn/commonhd.h" >&5
10687
10688 cat > conftest.$ac_ext <<EOF
10689 #line 10690 "configure"
10690 #include "confdefs.h"
10691 #include <wnn/commonhd.h>
10692 EOF
10693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10694 { (eval echo configure:10695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10696 if test -z "$ac_err"; then
10697   rm -rf conftest*
10698   eval "ac_cv_header_$ac_safe=yes"
10699 else
10700   echo "$ac_err" >&5
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -rf conftest*
10704   eval "ac_cv_header_$ac_safe=no"
10705 fi
10706 rm -f conftest*
10707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10708   echo "$ac_t""yes" 1>&6
10709   :
10710 else
10711   echo "$ac_t""no" 1>&6
10712 with_wnn=no
10713 fi
10714  }
10715     if test "$with_wnn" != "no"; then
10716     for ac_func in crypt
10717 do
10718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10719 echo "configure:10720: checking for $ac_func" >&5
10720
10721 cat > conftest.$ac_ext <<EOF
10722 #line 10723 "configure"
10723 #include "confdefs.h"
10724 /* System header to define __stub macros and hopefully few prototypes,
10725     which can conflict with char $ac_func(); below.  */
10726 #include <assert.h>
10727 /* Override any gcc2 internal prototype to avoid an error.  */
10728 /* We use char because int might match the return type of a gcc2
10729     builtin and then its argument prototype would still apply.  */
10730 char $ac_func();
10731
10732 int main() {
10733
10734 /* The GNU C library defines this for functions which it implements
10735     to always fail with ENOSYS.  Some functions are actually named
10736     something starting with __ and the normal name is an alias.  */
10737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10738 choke me
10739 #else
10740 $ac_func();
10741 #endif
10742
10743 ; return 0; }
10744 EOF
10745 if { (eval echo configure:10746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10746   rm -rf conftest*
10747   eval "ac_cv_func_$ac_func=yes"
10748 else
10749   echo "configure: failed program was:" >&5
10750   cat conftest.$ac_ext >&5
10751   rm -rf conftest*
10752   eval "ac_cv_func_$ac_func=no"
10753 fi
10754 rm -f conftest*
10755
10756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10757   echo "$ac_t""yes" 1>&6
10758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10759   { test "$extra_verbose" = "yes" && cat << EOF
10760     Defining $ac_tr_func
10761 EOF
10762 cat >> confdefs.h <<EOF
10763 #define $ac_tr_func 1
10764 EOF
10765 }
10766  
10767 else
10768   echo "$ac_t""no" 1>&6
10769 fi
10770 done
10771
10772     test "$ac_cv_func_crypt" != "yes" && { 
10773 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10774 echo "configure:10775: checking for crypt in -lcrypt" >&5
10775 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10776
10777 xe_check_libs=" -lcrypt "
10778 cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 /* Override any gcc2 internal prototype to avoid an error.  */
10782 /* We use char because int might match the return type of a gcc2
10783     builtin and then its argument prototype would still apply.  */
10784 char crypt();
10785
10786 int main() {
10787 crypt()
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_lib_$ac_lib_var=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=no"
10798 fi
10799 rm -f conftest*
10800 xe_check_libs=""
10801
10802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10803   echo "$ac_t""yes" 1>&6
10804     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10805     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10806   { test "$extra_verbose" = "yes" && cat << EOF
10807     Defining $ac_tr_lib
10808 EOF
10809 cat >> confdefs.h <<EOF
10810 #define $ac_tr_lib 1
10811 EOF
10812 }
10813
10814   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10815
10816 else
10817   echo "$ac_t""no" 1>&6
10818 fi
10819
10820  }
10821   fi
10822     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10823     
10824 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10825 echo "configure:10826: checking for jl_dic_list_e in -lwnn" >&5
10826 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10827
10828 xe_check_libs=" -lwnn "
10829 cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832 /* Override any gcc2 internal prototype to avoid an error.  */
10833 /* We use char because int might match the return type of a gcc2
10834     builtin and then its argument prototype would still apply.  */
10835 char jl_dic_list_e();
10836
10837 int main() {
10838 jl_dic_list_e()
10839 ; return 0; }
10840 EOF
10841 if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10842   rm -rf conftest*
10843   eval "ac_cv_lib_$ac_lib_var=yes"
10844 else
10845   echo "configure: failed program was:" >&5
10846   cat conftest.$ac_ext >&5
10847   rm -rf conftest*
10848   eval "ac_cv_lib_$ac_lib_var=no"
10849 fi
10850 rm -f conftest*
10851 xe_check_libs=""
10852
10853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10854   echo "$ac_t""yes" 1>&6
10855   libwnn=wnn
10856 else
10857   echo "$ac_t""no" 1>&6
10858 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10859 echo "configure:10860: checking for jl_dic_list_e in -lwnn4" >&5
10860 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10861
10862 xe_check_libs=" -lwnn4 "
10863 cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866 /* Override any gcc2 internal prototype to avoid an error.  */
10867 /* We use char because int might match the return type of a gcc2
10868     builtin and then its argument prototype would still apply.  */
10869 char jl_dic_list_e();
10870
10871 int main() {
10872 jl_dic_list_e()
10873 ; return 0; }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10876   rm -rf conftest*
10877   eval "ac_cv_lib_$ac_lib_var=yes"
10878 else
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_lib_$ac_lib_var=no"
10883 fi
10884 rm -f conftest*
10885 xe_check_libs=""
10886
10887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10888   echo "$ac_t""yes" 1>&6
10889   libwnn=wnn4
10890 else
10891   echo "$ac_t""no" 1>&6
10892 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10893 echo "configure:10894: checking for jl_dic_list_e in -lwnn6" >&5
10894 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10895
10896 xe_check_libs=" -lwnn6 "
10897 cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900 /* Override any gcc2 internal prototype to avoid an error.  */
10901 /* We use char because int might match the return type of a gcc2
10902     builtin and then its argument prototype would still apply.  */
10903 char jl_dic_list_e();
10904
10905 int main() {
10906 jl_dic_list_e()
10907 ; return 0; }
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=yes"
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=no"
10917 fi
10918 rm -f conftest*
10919 xe_check_libs=""
10920
10921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10922   echo "$ac_t""yes" 1>&6
10923   libwnn=wnn6
10924 else
10925   echo "$ac_t""no" 1>&6
10926 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10927 echo "configure:10928: checking for dic_list_e in -lwnn6_fromsrc" >&5
10928 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10929
10930 xe_check_libs=" -lwnn6_fromsrc "
10931 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 /* Override any gcc2 internal prototype to avoid an error.  */
10935 /* We use char because int might match the return type of a gcc2
10936     builtin and then its argument prototype would still apply.  */
10937 char dic_list_e();
10938
10939 int main() {
10940 dic_list_e()
10941 ; return 0; }
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10944   rm -rf conftest*
10945   eval "ac_cv_lib_$ac_lib_var=yes"
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=no"
10951 fi
10952 rm -f conftest*
10953 xe_check_libs=""
10954
10955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10956   echo "$ac_t""yes" 1>&6
10957   libwnn=wnn6_fromsrc
10958 else
10959   echo "$ac_t""no" 1>&6
10960 with_wnn=no
10961 fi
10962
10963
10964 fi
10965
10966
10967 fi
10968
10969
10970 fi
10971
10972
10973   fi
10974   test -z "$with_wnn" && with_wnn=yes
10975   if test "$with_wnn" = "yes"; then
10976     { test "$extra_verbose" = "yes" && cat << \EOF
10977     Defining HAVE_WNN
10978 EOF
10979 cat >> confdefs.h <<\EOF
10980 #define HAVE_WNN 1
10981 EOF
10982 }
10983
10984     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10985     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10986    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10987  fi
10988     if test "$with_wnn6" != "no"; then
10989       
10990 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10991 echo "configure:10992: checking for jl_fi_dic_list in -l$libwnn" >&5
10992 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10993
10994 xe_check_libs=" -l$libwnn "
10995 cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 /* Override any gcc2 internal prototype to avoid an error.  */
10999 /* We use char because int might match the return type of a gcc2
11000     builtin and then its argument prototype would still apply.  */
11001 char jl_fi_dic_list();
11002
11003 int main() {
11004 jl_fi_dic_list()
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=yes"
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=no"
11015 fi
11016 rm -f conftest*
11017 xe_check_libs=""
11018
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11020   echo "$ac_t""yes" 1>&6
11021   with_wnn6=yes
11022 else
11023   echo "$ac_t""no" 1>&6
11024 fi
11025
11026
11027       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11028     Defining WNN6
11029 EOF
11030 cat >> confdefs.h <<\EOF
11031 #define WNN6 1
11032 EOF
11033 }
11034
11035     fi
11036   fi
11037
11038     canna_includes_found=no
11039   if test "$with_canna" != "no"; then
11040     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11041 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11042 echo "configure:11043: checking for canna/jrkanji.h" >&5
11043
11044 cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047 #include <canna/jrkanji.h>
11048 EOF
11049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11050 { (eval echo configure:11051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11052 if test -z "$ac_err"; then
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=yes"
11055 else
11056   echo "$ac_err" >&5
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=no"
11061 fi
11062 rm -f conftest*
11063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11064   echo "$ac_t""yes" 1>&6
11065   canna_includes_found=yes
11066 else
11067   echo "$ac_t""no" 1>&6
11068 fi
11069
11070   fi
11071   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
11072       -d "/usr/local/canna/include"; then
11073     save_c_switch_site="$c_switch_site"
11074     c_switch_site="$c_switch_site -I/usr/local/canna/include"
11075     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11076 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11077 echo "configure:11078: checking for canna/jrkanji.h" >&5
11078
11079 cat > conftest.$ac_ext <<EOF
11080 #line 11081 "configure"
11081 #include "confdefs.h"
11082 #include <canna/jrkanji.h>
11083 EOF
11084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11085 { (eval echo configure:11086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11087 if test -z "$ac_err"; then
11088   rm -rf conftest*
11089   eval "ac_cv_header_$ac_safe=yes"
11090 else
11091   echo "$ac_err" >&5
11092   echo "configure: failed program was:" >&5
11093   cat conftest.$ac_ext >&5
11094   rm -rf conftest*
11095   eval "ac_cv_header_$ac_safe=no"
11096 fi
11097 rm -f conftest*
11098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11099   echo "$ac_t""yes" 1>&6
11100   canna_includes_found=yes
11101 else
11102   echo "$ac_t""no" 1>&6
11103 fi
11104
11105     if test "$canna_includes_found" != "yes"; then
11106       c_switch_site="$save_c_switch_site"
11107       with_canna="no"
11108     fi
11109   fi
11110
11111   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
11112 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
11113 echo "configure:11114: checking for canna/RK.h" >&5
11114
11115 cat > conftest.$ac_ext <<EOF
11116 #line 11117 "configure"
11117 #include "confdefs.h"
11118 #include <canna/RK.h>
11119 EOF
11120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11121 { (eval echo configure:11122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11123 if test -z "$ac_err"; then
11124   rm -rf conftest*
11125   eval "ac_cv_header_$ac_safe=yes"
11126 else
11127   echo "$ac_err" >&5
11128   echo "configure: failed program was:" >&5
11129   cat conftest.$ac_ext >&5
11130   rm -rf conftest*
11131   eval "ac_cv_header_$ac_safe=no"
11132 fi
11133 rm -f conftest*
11134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136   :
11137 else
11138   echo "$ac_t""no" 1>&6
11139 with_canna=no
11140 fi
11141  }
11142   test -z "$with_canna" && { 
11143 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11144 echo "configure:11145: checking for RkBgnBun in -lRKC" >&5
11145 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11146
11147 xe_check_libs=" -lRKC "
11148 cat > conftest.$ac_ext <<EOF
11149 #line 11150 "configure"
11150 #include "confdefs.h"
11151 /* Override any gcc2 internal prototype to avoid an error.  */
11152 /* We use char because int might match the return type of a gcc2
11153     builtin and then its argument prototype would still apply.  */
11154 char RkBgnBun();
11155
11156 int main() {
11157 RkBgnBun()
11158 ; return 0; }
11159 EOF
11160 if { (eval echo configure:11161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11161   rm -rf conftest*
11162   eval "ac_cv_lib_$ac_lib_var=yes"
11163 else
11164   echo "configure: failed program was:" >&5
11165   cat conftest.$ac_ext >&5
11166   rm -rf conftest*
11167   eval "ac_cv_lib_$ac_lib_var=no"
11168 fi
11169 rm -f conftest*
11170 xe_check_libs=""
11171
11172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11173   echo "$ac_t""yes" 1>&6
11174   :
11175 else
11176   echo "$ac_t""no" 1>&6
11177 with_canna=no
11178 fi
11179
11180  }
11181   test -z "$with_canna" && { 
11182 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11183 echo "configure:11184: checking for jrKanjiControl in -lcanna" >&5
11184 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11185
11186 xe_check_libs=" -lcanna "
11187 cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190 /* Override any gcc2 internal prototype to avoid an error.  */
11191 /* We use char because int might match the return type of a gcc2
11192     builtin and then its argument prototype would still apply.  */
11193 char jrKanjiControl();
11194
11195 int main() {
11196 jrKanjiControl()
11197 ; return 0; }
11198 EOF
11199 if { (eval echo configure:11200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11200   rm -rf conftest*
11201   eval "ac_cv_lib_$ac_lib_var=yes"
11202 else
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   eval "ac_cv_lib_$ac_lib_var=no"
11207 fi
11208 rm -f conftest*
11209 xe_check_libs=""
11210
11211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11212   echo "$ac_t""yes" 1>&6
11213   :
11214 else
11215   echo "$ac_t""no" 1>&6
11216 with_canna=no
11217 fi
11218
11219  }
11220   test -z "$with_canna" && with_canna=yes
11221   if test "$with_canna" = "yes"; then
11222     { test "$extra_verbose" = "yes" && cat << \EOF
11223     Defining HAVE_CANNA
11224 EOF
11225 cat >> confdefs.h <<\EOF
11226 #define HAVE_CANNA 1
11227 EOF
11228 }
11229
11230     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11231     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11232    echo "    xemacs will be linked with \"mule-canna.o\""
11233  fi
11234   fi
11235
11236 else   for feature in xim canna wnn; do
11237     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11238       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11239     fi
11240     eval "with_${feature}=no"
11241   done
11242 fi 
11243
11244 if test "$need_motif" = "yes" ; then
11245   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11246     
11247 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11248 echo "configure:11249: checking for layout_object_getvalue in -li18n" >&5
11249 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11250
11251 xe_check_libs=" -li18n "
11252 cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 /* Override any gcc2 internal prototype to avoid an error.  */
11256 /* We use char because int might match the return type of a gcc2
11257     builtin and then its argument prototype would still apply.  */
11258 char layout_object_getvalue();
11259
11260 int main() {
11261 layout_object_getvalue()
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11265   rm -rf conftest*
11266   eval "ac_cv_lib_$ac_lib_var=yes"
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=no"
11272 fi
11273 rm -f conftest*
11274 xe_check_libs=""
11275
11276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11277   echo "$ac_t""yes" 1>&6
11278   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11279 else
11280   echo "$ac_t""no" 1>&6
11281 fi
11282
11283
11284   
11285 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11286     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11287   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11288   
11289         runpath="" runpath_dirs=""
11290   if test -n "$LD_RUN_PATH"; then
11291     runpath="$LD_RUN_PATH"
11292   elif test "$GCC" = "yes"; then
11293         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11294     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11295     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11296     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11297       case "$arg" in P,* | -L* | -R* )
11298         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11299           {
11300 xe_runpath_dir="$dir"
11301   test "$xe_runpath_dir" != "/lib"     -a \
11302         "$xe_runpath_dir" != "/usr/lib" -a \
11303         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11304   eval "$xe_add_unique_runpath_dir"
11305 }
11306         done ;;
11307       esac
11308     done
11309     ld_switch_run="$ld_switch_run_save"
11310     rm -f conftest*
11311   else
11312         for arg in $ld_switch_site $ld_switch_x_site; do
11313       case "$arg" in -L*) {
11314 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11315   test "$xe_runpath_dir" != "/lib"     -a \
11316         "$xe_runpath_dir" != "/usr/lib" -a \
11317         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11318   eval "$xe_add_unique_runpath_dir"
11319 };; esac
11320     done
11321             if test "$opsys $need_motif" = "sol2 yes"; then
11322       xe_runpath_dir="/opt/SUNWdt/lib";
11323       eval "$xe_add_unique_runpath_dir";
11324     fi
11325   fi 
11326   if test -n "$runpath"; then
11327     ld_switch_run="${dash_r}${runpath}"
11328     
11329 if test "$GCC" = "yes"; then
11330   set x $ld_switch_run; shift; ld_switch_run=""
11331   while test -n "$1"; do
11332     case $1 in
11333       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11334       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11335       -Xlinker* ) ;;
11336       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11337     esac
11338     shift
11339   done
11340 fi
11341     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11342   fi
11343 fi
11344
11345 fi
11346
11347
11348 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
11349 do
11350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11351 echo "configure:11352: checking for $ac_func" >&5
11352
11353 cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 /* System header to define __stub macros and hopefully few prototypes,
11357     which can conflict with char $ac_func(); below.  */
11358 #include <assert.h>
11359 /* Override any gcc2 internal prototype to avoid an error.  */
11360 /* We use char because int might match the return type of a gcc2
11361     builtin and then its argument prototype would still apply.  */
11362 char $ac_func();
11363
11364 int main() {
11365
11366 /* The GNU C library defines this for functions which it implements
11367     to always fail with ENOSYS.  Some functions are actually named
11368     something starting with __ and the normal name is an alias.  */
11369 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11370 choke me
11371 #else
11372 $ac_func();
11373 #endif
11374
11375 ; return 0; }
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11378   rm -rf conftest*
11379   eval "ac_cv_func_$ac_func=yes"
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   eval "ac_cv_func_$ac_func=no"
11385 fi
11386 rm -f conftest*
11387
11388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11389   echo "$ac_t""yes" 1>&6
11390     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11391   { test "$extra_verbose" = "yes" && cat << EOF
11392     Defining $ac_tr_func
11393 EOF
11394 cat >> confdefs.h <<EOF
11395 #define $ac_tr_func 1
11396 EOF
11397 }
11398  
11399 else
11400   echo "$ac_t""no" 1>&6
11401 fi
11402 done
11403
11404
11405 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11406   case "$opsys" in
11407     hpux11* )
11408       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11409       ac_cv_func_getaddrinfo=no
11410       ;;
11411   esac
11412 fi
11413
11414
11415 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11416 do
11417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11418 echo "configure:11419: checking for $ac_func" >&5
11419
11420 cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423 /* System header to define __stub macros and hopefully few prototypes,
11424     which can conflict with char $ac_func(); below.  */
11425 #include <assert.h>
11426 /* Override any gcc2 internal prototype to avoid an error.  */
11427 /* We use char because int might match the return type of a gcc2
11428     builtin and then its argument prototype would still apply.  */
11429 char $ac_func();
11430
11431 int main() {
11432
11433 /* The GNU C library defines this for functions which it implements
11434     to always fail with ENOSYS.  Some functions are actually named
11435     something starting with __ and the normal name is an alias.  */
11436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11437 choke me
11438 #else
11439 $ac_func();
11440 #endif
11441
11442 ; return 0; }
11443 EOF
11444 if { (eval echo configure:11445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11445   rm -rf conftest*
11446   eval "ac_cv_func_$ac_func=yes"
11447 else
11448   echo "configure: failed program was:" >&5
11449   cat conftest.$ac_ext >&5
11450   rm -rf conftest*
11451   eval "ac_cv_func_$ac_func=no"
11452 fi
11453 rm -f conftest*
11454
11455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11456   echo "$ac_t""yes" 1>&6
11457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11458   { test "$extra_verbose" = "yes" && cat << EOF
11459     Defining $ac_tr_func
11460 EOF
11461 cat >> confdefs.h <<EOF
11462 #define $ac_tr_func 1
11463 EOF
11464 }
11465  
11466 else
11467   echo "$ac_t""no" 1>&6
11468 fi
11469 done
11470
11471
11472 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11473 echo "configure:11474: checking for openpty" >&5
11474
11475 cat > conftest.$ac_ext <<EOF
11476 #line 11477 "configure"
11477 #include "confdefs.h"
11478 /* System header to define __stub macros and hopefully few prototypes,
11479     which can conflict with char openpty(); below.  */
11480 #include <assert.h>
11481 /* Override any gcc2 internal prototype to avoid an error.  */
11482 /* We use char because int might match the return type of a gcc2
11483     builtin and then its argument prototype would still apply.  */
11484 char openpty();
11485
11486 int main() {
11487
11488 /* The GNU C library defines this for functions which it implements
11489     to always fail with ENOSYS.  Some functions are actually named
11490     something starting with __ and the normal name is an alias.  */
11491 #if defined (__stub_openpty) || defined (__stub___openpty)
11492 choke me
11493 #else
11494 openpty();
11495 #endif
11496
11497 ; return 0; }
11498 EOF
11499 if { (eval echo configure:11500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11500   rm -rf conftest*
11501   eval "ac_cv_func_openpty=yes"
11502 else
11503   echo "configure: failed program was:" >&5
11504   cat conftest.$ac_ext >&5
11505   rm -rf conftest*
11506   eval "ac_cv_func_openpty=no"
11507 fi
11508 rm -f conftest*
11509
11510 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11511   echo "$ac_t""yes" 1>&6
11512   have_openpty=yes
11513 else
11514   echo "$ac_t""no" 1>&6
11515
11516   
11517 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11518 echo "configure:11519: checking for openpty in -lutil" >&5
11519 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11520
11521 xe_check_libs=" -lutil "
11522 cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 /* Override any gcc2 internal prototype to avoid an error.  */
11526 /* We use char because int might match the return type of a gcc2
11527     builtin and then its argument prototype would still apply.  */
11528 char openpty();
11529
11530 int main() {
11531 openpty()
11532 ; return 0; }
11533 EOF
11534 if { (eval echo configure:11535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11535   rm -rf conftest*
11536   eval "ac_cv_lib_$ac_lib_var=yes"
11537 else
11538   echo "configure: failed program was:" >&5
11539   cat conftest.$ac_ext >&5
11540   rm -rf conftest*
11541   eval "ac_cv_lib_$ac_lib_var=no"
11542 fi
11543 rm -f conftest*
11544 xe_check_libs=""
11545
11546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11547   echo "$ac_t""yes" 1>&6
11548   have_openpty=yes need_libutil=yes
11549 else
11550   echo "$ac_t""no" 1>&6
11551 fi
11552
11553
11554 fi
11555
11556 if test "$have_openpty" = "yes"; then
11557   { test "$extra_verbose" = "yes" && cat << \EOF
11558     Defining HAVE_OPENPTY
11559 EOF
11560 cat >> confdefs.h <<\EOF
11561 #define HAVE_OPENPTY 1
11562 EOF
11563 }
11564
11565   for ac_hdr in pty.h libutil.h util.h
11566 do
11567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11569 echo "configure:11570: checking for $ac_hdr" >&5
11570
11571 cat > conftest.$ac_ext <<EOF
11572 #line 11573 "configure"
11573 #include "confdefs.h"
11574 #include <$ac_hdr>
11575 EOF
11576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11577 { (eval echo configure:11578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11579 if test -z "$ac_err"; then
11580   rm -rf conftest*
11581   eval "ac_cv_header_$ac_safe=yes"
11582 else
11583   echo "$ac_err" >&5
11584   echo "configure: failed program was:" >&5
11585   cat conftest.$ac_ext >&5
11586   rm -rf conftest*
11587   eval "ac_cv_header_$ac_safe=no"
11588 fi
11589 rm -f conftest*
11590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11591   echo "$ac_t""yes" 1>&6
11592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11593   { test "$extra_verbose" = "yes" && cat << EOF
11594     Defining $ac_tr_hdr
11595 EOF
11596 cat >> confdefs.h <<EOF
11597 #define $ac_tr_hdr 1
11598 EOF
11599 }
11600  break
11601 else
11602   echo "$ac_t""no" 1>&6
11603 fi
11604 done
11605
11606   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11607 fi
11608
11609 for ac_hdr in stropts.h
11610 do
11611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11613 echo "configure:11614: checking for $ac_hdr" >&5
11614
11615 cat > conftest.$ac_ext <<EOF
11616 #line 11617 "configure"
11617 #include "confdefs.h"
11618 #include <$ac_hdr>
11619 EOF
11620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11621 { (eval echo configure:11622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11623 if test -z "$ac_err"; then
11624   rm -rf conftest*
11625   eval "ac_cv_header_$ac_safe=yes"
11626 else
11627   echo "$ac_err" >&5
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -rf conftest*
11631   eval "ac_cv_header_$ac_safe=no"
11632 fi
11633 rm -f conftest*
11634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11635   echo "$ac_t""yes" 1>&6
11636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11637   { test "$extra_verbose" = "yes" && cat << EOF
11638     Defining $ac_tr_hdr
11639 EOF
11640 cat >> confdefs.h <<EOF
11641 #define $ac_tr_hdr 1
11642 EOF
11643 }
11644  
11645 else
11646   echo "$ac_t""no" 1>&6
11647 fi
11648 done
11649
11650 if test "$ac_cv_header_stropts_h" = "yes"; then
11651   for ac_func in isastream
11652 do
11653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11654 echo "configure:11655: checking for $ac_func" >&5
11655
11656 cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 /* System header to define __stub macros and hopefully few prototypes,
11660     which can conflict with char $ac_func(); below.  */
11661 #include <assert.h>
11662 /* Override any gcc2 internal prototype to avoid an error.  */
11663 /* We use char because int might match the return type of a gcc2
11664     builtin and then its argument prototype would still apply.  */
11665 char $ac_func();
11666
11667 int main() {
11668
11669 /* The GNU C library defines this for functions which it implements
11670     to always fail with ENOSYS.  Some functions are actually named
11671     something starting with __ and the normal name is an alias.  */
11672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11673 choke me
11674 #else
11675 $ac_func();
11676 #endif
11677
11678 ; return 0; }
11679 EOF
11680 if { (eval echo configure:11681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11681   rm -rf conftest*
11682   eval "ac_cv_func_$ac_func=yes"
11683 else
11684   echo "configure: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   rm -rf conftest*
11687   eval "ac_cv_func_$ac_func=no"
11688 fi
11689 rm -f conftest*
11690
11691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11692   echo "$ac_t""yes" 1>&6
11693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11694   { test "$extra_verbose" = "yes" && cat << EOF
11695     Defining $ac_tr_func
11696 EOF
11697 cat >> confdefs.h <<EOF
11698 #define $ac_tr_func 1
11699 EOF
11700 }
11701  
11702 else
11703   echo "$ac_t""no" 1>&6
11704 fi
11705 done
11706
11707   for ac_hdr in strtio.h
11708 do
11709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11711 echo "configure:11712: checking for $ac_hdr" >&5
11712
11713 cat > conftest.$ac_ext <<EOF
11714 #line 11715 "configure"
11715 #include "confdefs.h"
11716 #include <$ac_hdr>
11717 EOF
11718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11719 { (eval echo configure:11720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11721 if test -z "$ac_err"; then
11722   rm -rf conftest*
11723   eval "ac_cv_header_$ac_safe=yes"
11724 else
11725   echo "$ac_err" >&5
11726   echo "configure: failed program was:" >&5
11727   cat conftest.$ac_ext >&5
11728   rm -rf conftest*
11729   eval "ac_cv_header_$ac_safe=no"
11730 fi
11731 rm -f conftest*
11732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11733   echo "$ac_t""yes" 1>&6
11734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11735   { test "$extra_verbose" = "yes" && cat << EOF
11736     Defining $ac_tr_hdr
11737 EOF
11738 cat >> confdefs.h <<EOF
11739 #define $ac_tr_hdr 1
11740 EOF
11741 }
11742  
11743 else
11744   echo "$ac_t""no" 1>&6
11745 fi
11746 done
11747  fi
11748
11749 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11750    echo "    xemacs will be linked with \"realpath.o\""
11751  fi
11752
11753 for ac_func in getloadavg
11754 do
11755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11756 echo "configure:11757: checking for $ac_func" >&5
11757
11758 cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761 /* System header to define __stub macros and hopefully few prototypes,
11762     which can conflict with char $ac_func(); below.  */
11763 #include <assert.h>
11764 /* Override any gcc2 internal prototype to avoid an error.  */
11765 /* We use char because int might match the return type of a gcc2
11766     builtin and then its argument prototype would still apply.  */
11767 char $ac_func();
11768
11769 int main() {
11770
11771 /* The GNU C library defines this for functions which it implements
11772     to always fail with ENOSYS.  Some functions are actually named
11773     something starting with __ and the normal name is an alias.  */
11774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11775 choke me
11776 #else
11777 $ac_func();
11778 #endif
11779
11780 ; return 0; }
11781 EOF
11782 if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11783   rm -rf conftest*
11784   eval "ac_cv_func_$ac_func=yes"
11785 else
11786   echo "configure: failed program was:" >&5
11787   cat conftest.$ac_ext >&5
11788   rm -rf conftest*
11789   eval "ac_cv_func_$ac_func=no"
11790 fi
11791 rm -f conftest*
11792
11793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11794   echo "$ac_t""yes" 1>&6
11795     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11796   { test "$extra_verbose" = "yes" && cat << EOF
11797     Defining $ac_tr_func
11798 EOF
11799 cat >> confdefs.h <<EOF
11800 #define $ac_tr_func 1
11801 EOF
11802 }
11803  
11804 else
11805   echo "$ac_t""no" 1>&6
11806 fi
11807 done
11808
11809
11810 if test "$ac_cv_func_getloadavg" = "yes"; then
11811         for ac_hdr in sys/loadavg.h
11812 do
11813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11815 echo "configure:11816: checking for $ac_hdr" >&5
11816
11817 cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 #include <$ac_hdr>
11821 EOF
11822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11823 { (eval echo configure:11824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11825 if test -z "$ac_err"; then
11826   rm -rf conftest*
11827   eval "ac_cv_header_$ac_safe=yes"
11828 else
11829   echo "$ac_err" >&5
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -rf conftest*
11833   eval "ac_cv_header_$ac_safe=no"
11834 fi
11835 rm -f conftest*
11836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11837   echo "$ac_t""yes" 1>&6
11838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11839   { test "$extra_verbose" = "yes" && cat << EOF
11840     Defining $ac_tr_hdr
11841 EOF
11842 cat >> confdefs.h <<EOF
11843 #define $ac_tr_hdr 1
11844 EOF
11845 }
11846  
11847 else
11848   echo "$ac_t""no" 1>&6
11849 fi
11850 done
11851
11852 else
11853     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11854    echo "    xemacs will be linked with \"getloadavg.o\""
11855  fi
11856
11857     
11858 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11859 echo "configure:11860: checking for kstat_open in -lkstat" >&5
11860 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11861
11862 xe_check_libs=" -lkstat "
11863 cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 /* Override any gcc2 internal prototype to avoid an error.  */
11867 /* We use char because int might match the return type of a gcc2
11868     builtin and then its argument prototype would still apply.  */
11869 char kstat_open();
11870
11871 int main() {
11872 kstat_open()
11873 ; return 0; }
11874 EOF
11875 if { (eval echo configure:11876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11876   rm -rf conftest*
11877   eval "ac_cv_lib_$ac_lib_var=yes"
11878 else
11879   echo "configure: failed program was:" >&5
11880   cat conftest.$ac_ext >&5
11881   rm -rf conftest*
11882   eval "ac_cv_lib_$ac_lib_var=no"
11883 fi
11884 rm -f conftest*
11885 xe_check_libs=""
11886
11887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11888   echo "$ac_t""yes" 1>&6
11889     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11891   { test "$extra_verbose" = "yes" && cat << EOF
11892     Defining $ac_tr_lib
11893 EOF
11894 cat >> confdefs.h <<EOF
11895 #define $ac_tr_lib 1
11896 EOF
11897 }
11898
11899   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11900
11901 else
11902   echo "$ac_t""no" 1>&6
11903 fi
11904
11905
11906   for ac_hdr in kstat.h
11907 do
11908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11910 echo "configure:11911: checking for $ac_hdr" >&5
11911
11912 cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 #include <$ac_hdr>
11916 EOF
11917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11918 { (eval echo configure:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11920 if test -z "$ac_err"; then
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=yes"
11923 else
11924   echo "$ac_err" >&5
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   eval "ac_cv_header_$ac_safe=no"
11929 fi
11930 rm -f conftest*
11931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11932   echo "$ac_t""yes" 1>&6
11933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11934   { test "$extra_verbose" = "yes" && cat << EOF
11935     Defining $ac_tr_hdr
11936 EOF
11937 cat >> confdefs.h <<EOF
11938 #define $ac_tr_hdr 1
11939 EOF
11940 }
11941  
11942 else
11943   echo "$ac_t""no" 1>&6
11944 fi
11945 done
11946
11947
11948     
11949 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11950 echo "configure:11951: checking for kvm_read in -lkvm" >&5
11951 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11952
11953 xe_check_libs=" -lkvm "
11954 cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 /* Override any gcc2 internal prototype to avoid an error.  */
11958 /* We use char because int might match the return type of a gcc2
11959     builtin and then its argument prototype would still apply.  */
11960 char kvm_read();
11961
11962 int main() {
11963 kvm_read()
11964 ; return 0; }
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11967   rm -rf conftest*
11968   eval "ac_cv_lib_$ac_lib_var=yes"
11969 else
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   eval "ac_cv_lib_$ac_lib_var=no"
11974 fi
11975 rm -f conftest*
11976 xe_check_libs=""
11977
11978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11979   echo "$ac_t""yes" 1>&6
11980     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11981     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11982   { test "$extra_verbose" = "yes" && cat << EOF
11983     Defining $ac_tr_lib
11984 EOF
11985 cat >> confdefs.h <<EOF
11986 #define $ac_tr_lib 1
11987 EOF
11988 }
11989
11990   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11991
11992 else
11993   echo "$ac_t""no" 1>&6
11994 fi
11995
11996
11997 fi
11998
11999 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
12000 echo "configure:12001: checking whether netdb declares h_errno" >&5
12001 cat > conftest.$ac_ext <<EOF
12002 #line 12003 "configure"
12003 #include "confdefs.h"
12004 #include <netdb.h>
12005 int main() {
12006 return h_errno;
12007 ; return 0; }
12008 EOF
12009 if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12010   rm -rf conftest*
12011   echo "$ac_t""yes" 1>&6
12012    { test "$extra_verbose" = "yes" && cat << \EOF
12013     Defining HAVE_H_ERRNO
12014 EOF
12015 cat >> confdefs.h <<\EOF
12016 #define HAVE_H_ERRNO 1
12017 EOF
12018 }
12019
12020 else
12021   echo "configure: failed program was:" >&5
12022   cat conftest.$ac_ext >&5
12023   rm -rf conftest*
12024   echo "$ac_t""no" 1>&6
12025 fi
12026 rm -f conftest*
12027
12028 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
12029 echo "configure:12030: checking for sigsetjmp" >&5
12030 cat > conftest.$ac_ext <<EOF
12031 #line 12032 "configure"
12032 #include "confdefs.h"
12033 #include <setjmp.h>
12034 int main() {
12035 sigjmp_buf bar; sigsetjmp (bar, 0);
12036 ; return 0; }
12037 EOF
12038 if { (eval echo configure:12039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12039   rm -rf conftest*
12040   echo "$ac_t""yes" 1>&6
12041    { test "$extra_verbose" = "yes" && cat << \EOF
12042     Defining HAVE_SIGSETJMP
12043 EOF
12044 cat >> confdefs.h <<\EOF
12045 #define HAVE_SIGSETJMP 1
12046 EOF
12047 }
12048
12049 else
12050   echo "configure: failed program was:" >&5
12051   cat conftest.$ac_ext >&5
12052   rm -rf conftest*
12053   echo "$ac_t""no" 1>&6
12054 fi
12055 rm -f conftest*
12056
12057 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
12058 echo "configure:12059: checking whether localtime caches TZ" >&5
12059
12060 if test "$ac_cv_func_tzset" = "yes"; then
12061 cat > conftest.$ac_ext <<EOF
12062 #line 12063 "configure"
12063 #include "confdefs.h"
12064 #include <time.h>
12065 #if STDC_HEADERS
12066 # include <stdlib.h>
12067 #endif
12068 extern char **environ;
12069 unset_TZ ()
12070 {
12071   char **from, **to;
12072   for (to = from = environ; (*to = *from); from++)
12073     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12074       to++;
12075 }
12076 char TZ_GMT0[] = "TZ=GMT0";
12077 char TZ_PST8[] = "TZ=PST8";
12078 main()
12079 {
12080   time_t now = time ((time_t *) 0);
12081   int hour_GMT0, hour_unset;
12082   if (putenv (TZ_GMT0) != 0)
12083     exit (1);
12084   hour_GMT0 = localtime (&now)->tm_hour;
12085   unset_TZ ();
12086   hour_unset = localtime (&now)->tm_hour;
12087   if (putenv (TZ_PST8) != 0)
12088     exit (1);
12089   if (localtime (&now)->tm_hour == hour_GMT0)
12090     exit (1);
12091   unset_TZ ();
12092   if (localtime (&now)->tm_hour != hour_unset)
12093     exit (1);
12094   exit (0);
12095 }
12096 EOF
12097 if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12098 then
12099   emacs_cv_localtime_cache=no
12100 else
12101   conftest_rc="$?"
12102   echo "configure: failed program was:" >&5
12103   cat conftest.$ac_ext >&5
12104   rm -fr conftest*
12105   emacs_cv_localtime_cache=yes
12106 fi
12107 rm -fr conftest*
12108 else
12109         # If we lack tzset, report that localtime does not cache TZ,
12110         # since we can't invalidate the cache if we don't have tzset.
12111         emacs_cv_localtime_cache=no
12112 fi
12113 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
12114 if test $emacs_cv_localtime_cache = yes; then
12115   { test "$extra_verbose" = "yes" && cat << \EOF
12116     Defining LOCALTIME_CACHE
12117 EOF
12118 cat >> confdefs.h <<\EOF
12119 #define LOCALTIME_CACHE 1
12120 EOF
12121 }
12122
12123 fi
12124
12125 if test "$HAVE_TIMEVAL" = "yes"; then
12126 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12127 echo "configure:12128: checking whether gettimeofday accepts one or two arguments" >&5
12128 cat > conftest.$ac_ext <<EOF
12129 #line 12130 "configure"
12130 #include "confdefs.h"
12131
12132 #ifdef TIME_WITH_SYS_TIME
12133 #include <sys/time.h>
12134 #include <time.h>
12135 #else
12136 #ifdef HAVE_SYS_TIME_H
12137 #include <sys/time.h>
12138 #else
12139 #include <time.h>
12140 #endif
12141 #endif
12142   
12143 int main() {
12144
12145   struct timeval time;
12146   gettimeofday (&time, 0);
12147
12148 ; return 0; }
12149 EOF
12150 if { (eval echo configure:12151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12151   rm -rf conftest*
12152   echo "$ac_t""two" 1>&6
12153 else
12154   echo "configure: failed program was:" >&5
12155   cat conftest.$ac_ext >&5
12156   rm -rf conftest*
12157   echo "$ac_t""one" 1>&6
12158    { test "$extra_verbose" = "yes" && cat << \EOF
12159     Defining GETTIMEOFDAY_ONE_ARGUMENT
12160 EOF
12161 cat >> confdefs.h <<\EOF
12162 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12163 EOF
12164 }
12165
12166 fi
12167 rm -f conftest*
12168 fi
12169
12170
12171 echo $ac_n "checking for inline""... $ac_c" 1>&6
12172 echo "configure:12173: checking for inline" >&5
12173
12174 ac_cv_c_inline=no
12175 for ac_kw in inline __inline__ __inline; do
12176   cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179
12180 int main() {
12181 } $ac_kw foo() {
12182 ; return 0; }
12183 EOF
12184 if { (eval echo configure:12185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12185   rm -rf conftest*
12186   ac_cv_c_inline=$ac_kw; break
12187 else
12188   echo "configure: failed program was:" >&5
12189   cat conftest.$ac_ext >&5
12190 fi
12191 rm -f conftest*
12192 done
12193
12194
12195 echo "$ac_t""$ac_cv_c_inline" 1>&6
12196 case "$ac_cv_c_inline" in
12197   inline | yes) ;;
12198   no) { test "$extra_verbose" = "yes" && cat << \EOF
12199     Defining inline = 
12200 EOF
12201 cat >> confdefs.h <<\EOF
12202 #define inline 
12203 EOF
12204 }
12205  ;;
12206   *)  { test "$extra_verbose" = "yes" && cat << EOF
12207     Defining inline = $ac_cv_c_inline
12208 EOF
12209 cat >> confdefs.h <<EOF
12210 #define inline $ac_cv_c_inline
12211 EOF
12212 }
12213  ;;
12214 esac
12215
12216 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12217    echo "    xemacs will be linked with \"inline.o\""
12218  fi
12219
12220
12221 if test "$__DECC" != "yes"; then
12222   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12223 # for constant arguments.  Useless!
12224 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12225 echo "configure:12226: checking for working alloca.h" >&5
12226
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 #include <alloca.h>
12231 int main() {
12232 char *p = alloca(2 * sizeof(int));
12233 ; return 0; }
12234 EOF
12235 if { (eval echo configure:12236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12236   rm -rf conftest*
12237   ac_cv_header_alloca_h=yes
12238 else
12239   echo "configure: failed program was:" >&5
12240   cat conftest.$ac_ext >&5
12241   rm -rf conftest*
12242   ac_cv_header_alloca_h=no
12243 fi
12244 rm -f conftest*
12245
12246 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12247 if test $ac_cv_header_alloca_h = yes; then
12248   { test "$extra_verbose" = "yes" && cat << \EOF
12249     Defining HAVE_ALLOCA_H
12250 EOF
12251 cat >> confdefs.h <<\EOF
12252 #define HAVE_ALLOCA_H 1
12253 EOF
12254 }
12255
12256 fi
12257
12258 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12259 echo "configure:12260: checking for alloca" >&5
12260
12261 cat > conftest.$ac_ext <<EOF
12262 #line 12263 "configure"
12263 #include "confdefs.h"
12264
12265 #ifdef __GNUC__
12266 # define alloca __builtin_alloca
12267 #else
12268 # ifdef _MSC_VER
12269 #  include <malloc.h>
12270 #  define alloca _alloca
12271 # else
12272 #  if HAVE_ALLOCA_H
12273 #   include <alloca.h>
12274 #  else
12275 #   ifdef _AIX
12276  #pragma alloca
12277 #   else
12278 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12279 char *alloca ();
12280 #    endif
12281 #   endif
12282 #  endif
12283 # endif
12284 #endif
12285
12286 int main() {
12287 char *p = (char *) alloca(1);
12288 ; return 0; }
12289 EOF
12290 if { (eval echo configure:12291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12291   rm -rf conftest*
12292   ac_cv_func_alloca_works=yes
12293 else
12294   echo "configure: failed program was:" >&5
12295   cat conftest.$ac_ext >&5
12296   rm -rf conftest*
12297   ac_cv_func_alloca_works=no
12298 fi
12299 rm -f conftest*
12300
12301 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12302 if test $ac_cv_func_alloca_works = yes; then
12303   { test "$extra_verbose" = "yes" && cat << \EOF
12304     Defining HAVE_ALLOCA
12305 EOF
12306 cat >> confdefs.h <<\EOF
12307 #define HAVE_ALLOCA 1
12308 EOF
12309 }
12310
12311 fi
12312
12313 if test $ac_cv_func_alloca_works = no; then
12314   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12315   # that cause trouble.  Some versions do not even contain alloca or
12316   # contain a buggy version.  If you still want to use their alloca,
12317   # use ar to extract alloca.o from them instead of compiling alloca.c.
12318   ALLOCA=alloca.${ac_objext}
12319   { test "$extra_verbose" = "yes" && cat << \EOF
12320     Defining C_ALLOCA
12321 EOF
12322 cat >> confdefs.h <<\EOF
12323 #define C_ALLOCA 1
12324 EOF
12325 }
12326
12327
12328 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12329 echo "configure:12330: checking whether alloca needs Cray hooks" >&5
12330
12331 cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 #if defined(CRAY) && ! defined(CRAY2)
12335 webecray
12336 #else
12337 wenotbecray
12338 #endif
12339
12340 EOF
12341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12342   egrep "webecray" >/dev/null 2>&1; then
12343   rm -rf conftest*
12344   ac_cv_os_cray=yes
12345 else
12346   rm -rf conftest*
12347   ac_cv_os_cray=no
12348 fi
12349 rm -f conftest*
12350
12351
12352 echo "$ac_t""$ac_cv_os_cray" 1>&6
12353 if test $ac_cv_os_cray = yes; then
12354 for ac_func in _getb67 GETB67 getb67; do
12355   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12356 echo "configure:12357: checking for $ac_func" >&5
12357
12358 cat > conftest.$ac_ext <<EOF
12359 #line 12360 "configure"
12360 #include "confdefs.h"
12361 /* System header to define __stub macros and hopefully few prototypes,
12362     which can conflict with char $ac_func(); below.  */
12363 #include <assert.h>
12364 /* Override any gcc2 internal prototype to avoid an error.  */
12365 /* We use char because int might match the return type of a gcc2
12366     builtin and then its argument prototype would still apply.  */
12367 char $ac_func();
12368
12369 int main() {
12370
12371 /* The GNU C library defines this for functions which it implements
12372     to always fail with ENOSYS.  Some functions are actually named
12373     something starting with __ and the normal name is an alias.  */
12374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12375 choke me
12376 #else
12377 $ac_func();
12378 #endif
12379
12380 ; return 0; }
12381 EOF
12382 if { (eval echo configure:12383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12383   rm -rf conftest*
12384   eval "ac_cv_func_$ac_func=yes"
12385 else
12386   echo "configure: failed program was:" >&5
12387   cat conftest.$ac_ext >&5
12388   rm -rf conftest*
12389   eval "ac_cv_func_$ac_func=no"
12390 fi
12391 rm -f conftest*
12392
12393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12394   echo "$ac_t""yes" 1>&6
12395   { test "$extra_verbose" = "yes" && cat << EOF
12396     Defining CRAY_STACKSEG_END = $ac_func
12397 EOF
12398 cat >> confdefs.h <<EOF
12399 #define CRAY_STACKSEG_END $ac_func
12400 EOF
12401 }
12402
12403   break
12404 else
12405   echo "$ac_t""no" 1>&6
12406 fi
12407
12408 done
12409 fi
12410
12411 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12412 echo "configure:12413: checking stack direction for C alloca" >&5
12413
12414 cat > conftest.$ac_ext <<EOF
12415 #line 12416 "configure"
12416 #include "confdefs.h"
12417 find_stack_direction ()
12418 {
12419   static char *addr = 0;
12420   auto char dummy;
12421   if (addr == 0)
12422     {
12423       addr = &dummy;
12424       return find_stack_direction ();
12425     }
12426   else
12427     return (&dummy > addr) ? 1 : -1;
12428 }
12429 main ()
12430 {
12431   exit (find_stack_direction() < 0);
12432 }
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12435 then
12436   ac_cv_c_stack_direction=1
12437 else
12438   conftest_rc="$?"
12439   echo "configure: failed program was:" >&5
12440   cat conftest.$ac_ext >&5
12441   rm -fr conftest*
12442   ac_cv_c_stack_direction=-1
12443 fi
12444 rm -fr conftest*
12445
12446 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12447 { test "$extra_verbose" = "yes" && cat << EOF
12448     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12449 EOF
12450 cat >> confdefs.h <<EOF
12451 #define STACK_DIRECTION $ac_cv_c_stack_direction
12452 EOF
12453 }
12454
12455 fi
12456
12457   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12458    echo "    xemacs will be linked with \"$ALLOCA\""
12459  fi
12460 fi
12461
12462 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12463 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12464 echo "configure:12465: checking for vfork.h" >&5
12465
12466 cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 #include <vfork.h>
12470 EOF
12471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12472 { (eval echo configure:12473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12474 if test -z "$ac_err"; then
12475   rm -rf conftest*
12476   eval "ac_cv_header_$ac_safe=yes"
12477 else
12478   echo "$ac_err" >&5
12479   echo "configure: failed program was:" >&5
12480   cat conftest.$ac_ext >&5
12481   rm -rf conftest*
12482   eval "ac_cv_header_$ac_safe=no"
12483 fi
12484 rm -f conftest*
12485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12486   echo "$ac_t""yes" 1>&6
12487   { test "$extra_verbose" = "yes" && cat << \EOF
12488     Defining HAVE_VFORK_H
12489 EOF
12490 cat >> confdefs.h <<\EOF
12491 #define HAVE_VFORK_H 1
12492 EOF
12493 }
12494
12495 else
12496   echo "$ac_t""no" 1>&6
12497 fi
12498
12499 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12500 echo "configure:12501: checking for working vfork" >&5
12501
12502 cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505 /* Thanks to Paul Eggert for this test.  */
12506 #include <stdio.h>
12507 #include <sys/types.h>
12508 #include <sys/stat.h>
12509 #ifdef HAVE_UNISTD_H
12510 #include <unistd.h>
12511 #endif
12512 #ifdef HAVE_VFORK_H
12513 #include <vfork.h>
12514 #endif
12515 /* On some sparc systems, changes by the child to local and incoming
12516    argument registers are propagated back to the parent.
12517    The compiler is told about this with #include <vfork.h>,
12518    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12519    Test for this by using a static variable whose address
12520    is put into a register that is clobbered by the vfork.  */
12521 static
12522 #ifdef __cplusplus
12523 sparc_address_test (int arg)
12524 #else
12525 sparc_address_test (arg) int arg;
12526 #endif
12527 {
12528   static pid_t child;
12529   if (!child) {
12530     child = vfork ();
12531     if (child < 0) {
12532       perror ("vfork");
12533       _exit(2);
12534     }
12535     if (!child) {
12536       arg = getpid();
12537       write(-1, "", 0);
12538       _exit (arg);
12539     }
12540   }
12541 }
12542 main() {
12543   pid_t parent = getpid ();
12544   pid_t child;
12545
12546   sparc_address_test ();
12547
12548   child = vfork ();
12549
12550   if (child == 0) {
12551     /* Here is another test for sparc vfork register problems.
12552        This test uses lots of local variables, at least
12553        as many local variables as main has allocated so far
12554        including compiler temporaries.  4 locals are enough for
12555        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12556        A buggy compiler should reuse the register of parent
12557        for one of the local variables, since it will think that
12558        parent can't possibly be used any more in this routine.
12559        Assigning to the local variable will thus munge parent
12560        in the parent process.  */
12561     pid_t
12562       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12563       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12564     /* Convince the compiler that p..p7 are live; otherwise, it might
12565        use the same hardware register for all 8 local variables.  */
12566     if (p != p1 || p != p2 || p != p3 || p != p4
12567         || p != p5 || p != p6 || p != p7)
12568       _exit(1);
12569
12570     /* On some systems (e.g. IRIX 3.3),
12571        vfork doesn't separate parent from child file descriptors.
12572        If the child closes a descriptor before it execs or exits,
12573        this munges the parent's descriptor as well.
12574        Test for this by closing stdout in the child.  */
12575     _exit(close(fileno(stdout)) != 0);
12576   } else {
12577     int status;
12578     struct stat st;
12579
12580     while (wait(&status) != child)
12581       ;
12582     exit(
12583          /* Was there some problem with vforking?  */
12584          child < 0
12585
12586          /* Did the child fail?  (This shouldn't happen.)  */
12587          || status
12588
12589          /* Did the vfork/compiler bug occur?  */
12590          || parent != getpid()
12591
12592          /* Did the file descriptor bug occur?  */
12593          || fstat(fileno(stdout), &st) != 0
12594          );
12595   }
12596 }
12597 EOF
12598 if { (eval echo configure:12599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12599 then
12600   ac_cv_func_vfork_works=yes
12601 else
12602   conftest_rc="$?"
12603   echo "configure: failed program was:" >&5
12604   cat conftest.$ac_ext >&5
12605   rm -fr conftest*
12606   ac_cv_func_vfork_works=no
12607 fi
12608 rm -fr conftest*
12609
12610 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12611 if test $ac_cv_func_vfork_works = no; then
12612   { test "$extra_verbose" = "yes" && cat << \EOF
12613     Defining vfork = fork
12614 EOF
12615 cat >> confdefs.h <<\EOF
12616 #define vfork fork
12617 EOF
12618 }
12619
12620 fi
12621
12622
12623 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12624 echo "configure:12625: checking for working strcoll" >&5
12625
12626 cat > conftest.$ac_ext <<EOF
12627 #line 12628 "configure"
12628 #include "confdefs.h"
12629 #include <string.h>
12630 main ()
12631 {
12632   exit (strcoll ("abc", "def") >= 0 ||
12633         strcoll ("ABC", "DEF") >= 0 ||
12634         strcoll ("123", "456") >= 0);
12635 }
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12638 then
12639   ac_cv_func_strcoll_works=yes
12640 else
12641   conftest_rc="$?"
12642   echo "configure: failed program was:" >&5
12643   cat conftest.$ac_ext >&5
12644   rm -fr conftest*
12645   ac_cv_func_strcoll_works=no
12646 fi
12647 rm -fr conftest*
12648
12649 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12650 if test $ac_cv_func_strcoll_works = yes; then
12651   { test "$extra_verbose" = "yes" && cat << \EOF
12652     Defining HAVE_STRCOLL
12653 EOF
12654 cat >> confdefs.h <<\EOF
12655 #define HAVE_STRCOLL 1
12656 EOF
12657 }
12658
12659 fi
12660
12661
12662 for ac_func in getpgrp
12663 do
12664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12665 echo "configure:12666: checking for $ac_func" >&5
12666
12667 cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* System header to define __stub macros and hopefully few prototypes,
12671     which can conflict with char $ac_func(); below.  */
12672 #include <assert.h>
12673 /* Override any gcc2 internal prototype to avoid an error.  */
12674 /* We use char because int might match the return type of a gcc2
12675     builtin and then its argument prototype would still apply.  */
12676 char $ac_func();
12677
12678 int main() {
12679
12680 /* The GNU C library defines this for functions which it implements
12681     to always fail with ENOSYS.  Some functions are actually named
12682     something starting with __ and the normal name is an alias.  */
12683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12684 choke me
12685 #else
12686 $ac_func();
12687 #endif
12688
12689 ; return 0; }
12690 EOF
12691 if { (eval echo configure:12692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12692   rm -rf conftest*
12693   eval "ac_cv_func_$ac_func=yes"
12694 else
12695   echo "configure: failed program was:" >&5
12696   cat conftest.$ac_ext >&5
12697   rm -rf conftest*
12698   eval "ac_cv_func_$ac_func=no"
12699 fi
12700 rm -f conftest*
12701
12702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12703   echo "$ac_t""yes" 1>&6
12704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12705   { test "$extra_verbose" = "yes" && cat << EOF
12706     Defining $ac_tr_func
12707 EOF
12708 cat >> confdefs.h <<EOF
12709 #define $ac_tr_func 1
12710 EOF
12711 }
12712  
12713 else
12714   echo "$ac_t""no" 1>&6
12715 fi
12716 done
12717
12718 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12719 echo "configure:12720: checking whether getpgrp takes no argument" >&5
12720
12721 cat > conftest.$ac_ext <<EOF
12722 #line 12723 "configure"
12723 #include "confdefs.h"
12724
12725 /*
12726  * If this system has a BSD-style getpgrp(),
12727  * which takes a pid argument, exit unsuccessfully.
12728  *
12729  * Snarfed from Chet Ramey's bash pgrp.c test program
12730  */
12731 #include <stdio.h>
12732 #include <sys/types.h>
12733
12734 int     pid;
12735 int     pg1, pg2, pg3, pg4;
12736 int     ng, np, s, child;
12737
12738 main()
12739 {
12740         pid = getpid();
12741         pg1 = getpgrp(0);
12742         pg2 = getpgrp();
12743         pg3 = getpgrp(pid);
12744         pg4 = getpgrp(1);
12745
12746         /*
12747          * If all of these values are the same, it's pretty sure that
12748          * we're on a system that ignores getpgrp's first argument.
12749          */
12750         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12751                 exit(0);
12752
12753         child = fork();
12754         if (child < 0)
12755                 exit(1);
12756         else if (child == 0) {
12757                 np = getpid();
12758                 /*
12759                  * If this is Sys V, this will not work; pgrp will be
12760                  * set to np because setpgrp just changes a pgrp to be
12761                  * the same as the pid.
12762                  */
12763                 setpgrp(np, pg1);
12764                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12765                 if (ng == pg1) {
12766                         exit(1);
12767                 } else {
12768                         exit(0);
12769                 }
12770         } else {
12771                 wait(&s);
12772                 exit(s>>8);
12773         }
12774 }
12775
12776 EOF
12777 if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12778 then
12779   ac_cv_func_getpgrp_void=yes
12780 else
12781   conftest_rc="$?"
12782   echo "configure: failed program was:" >&5
12783   cat conftest.$ac_ext >&5
12784   rm -fr conftest*
12785   ac_cv_func_getpgrp_void=no
12786 fi
12787 rm -fr conftest*
12788
12789
12790 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12791 if test $ac_cv_func_getpgrp_void = yes; then
12792   { test "$extra_verbose" = "yes" && cat << \EOF
12793     Defining GETPGRP_VOID
12794 EOF
12795 cat >> confdefs.h <<\EOF
12796 #define GETPGRP_VOID 1
12797 EOF
12798 }
12799
12800 fi
12801
12802
12803 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12804 echo "configure:12805: checking for working mmap" >&5
12805 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12806 cat > conftest.$ac_ext <<EOF
12807 #line 12808 "configure"
12808 #include "confdefs.h"
12809 #include <stdio.h>
12810 #include <unistd.h>
12811 #include <fcntl.h>
12812 #include <sys/mman.h>
12813
12814 #ifndef MAP_VARIABLE
12815 #define MAP_VARIABLE 0
12816 #endif
12817
12818 #ifndef MAP_FAILED
12819 #define MAP_FAILED -1
12820 #endif
12821
12822 int main (int argc, char *argv[])
12823 {
12824   int fd = -1;
12825   caddr_t p;
12826 #ifndef MAP_ANONYMOUS
12827   fd = open ("/dev/zero", O_RDWR);
12828   if (fd < 0)
12829     return 1;
12830 #define MAP_ANONYMOUS 0
12831 #endif
12832   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12833            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12834            fd, 0) != (void *) MAP_FAILED)
12835     return 0;
12836   perror ("conftest: mmap failed");
12837   return 1;
12838 }
12839 EOF
12840 if { (eval echo configure:12841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12841 then
12842   have_mmap=yes
12843 else
12844   conftest_rc="$?"
12845   echo "configure: failed program was:" >&5
12846   cat conftest.$ac_ext >&5
12847   rm -fr conftest*
12848   have_mmap=no
12849 fi
12850 rm -fr conftest* ;;
12851 esac
12852 echo "$ac_t""$have_mmap" 1>&6
12853 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12854     Defining HAVE_MMAP
12855 EOF
12856 cat >> confdefs.h <<\EOF
12857 #define HAVE_MMAP 1
12858 EOF
12859 }
12860
12861
12862 case "$opsys" in cygwin*) 
12863         test "$rel_alloc" = "default" && rel_alloc=no ;;
12864 esac
12865 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12866 if test "$rel_alloc $have_mmap" = "default yes"; then
12867   if test "$doug_lea_malloc" = "yes"; then
12868         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12869 echo "configure:12870: checking for M_MMAP_THRESHOLD" >&5
12870     cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 #include <malloc.h>
12874 int main() {
12875
12876 #ifndef M_MMAP_THRESHOLD
12877 #error No M_MMAP_THRESHOLD :-(
12878 !@+$%^&*_)(_ - unlikely to compile...
12879 #endif
12880
12881 ; return 0; }
12882 EOF
12883 if { (eval echo configure:12884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12884   rm -rf conftest*
12885   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12886 else
12887   echo "configure: failed program was:" >&5
12888   cat conftest.$ac_ext >&5
12889   rm -rf conftest*
12890   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12891 fi
12892 rm -f conftest*
12893   else
12894     rel_alloc=yes
12895   fi
12896 fi
12897 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12898     Defining REL_ALLOC
12899 EOF
12900 cat >> confdefs.h <<\EOF
12901 #define REL_ALLOC 1
12902 EOF
12903 }
12904
12905
12906 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12907 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12908 echo "configure:12909: checking for termios.h" >&5
12909
12910 cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913 #include <termios.h>
12914 EOF
12915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12916 { (eval echo configure:12917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12918 if test -z "$ac_err"; then
12919   rm -rf conftest*
12920   eval "ac_cv_header_$ac_safe=yes"
12921 else
12922   echo "$ac_err" >&5
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -rf conftest*
12926   eval "ac_cv_header_$ac_safe=no"
12927 fi
12928 rm -f conftest*
12929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12930   echo "$ac_t""yes" 1>&6
12931   { test "$extra_verbose" = "yes" && cat << \EOF
12932     Defining HAVE_TERMIOS
12933 EOF
12934 cat >> confdefs.h <<\EOF
12935 #define HAVE_TERMIOS 1
12936 EOF
12937 }
12938
12939   { test "$extra_verbose" = "yes" && cat << \EOF
12940     Defining SIGNALS_VIA_CHARACTERS
12941 EOF
12942 cat >> confdefs.h <<\EOF
12943 #define SIGNALS_VIA_CHARACTERS 1
12944 EOF
12945 }
12946
12947   { test "$extra_verbose" = "yes" && cat << \EOF
12948     Defining NO_TERMIO
12949 EOF
12950 cat >> confdefs.h <<\EOF
12951 #define NO_TERMIO 1
12952 EOF
12953 }
12954
12955 else
12956   echo "$ac_t""no" 1>&6
12957 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12958 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12959 echo "configure:12960: checking for termio.h" >&5
12960
12961 cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964 #include <termio.h>
12965 EOF
12966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12967 { (eval echo configure:12968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12969 if test -z "$ac_err"; then
12970   rm -rf conftest*
12971   eval "ac_cv_header_$ac_safe=yes"
12972 else
12973   echo "$ac_err" >&5
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -rf conftest*
12977   eval "ac_cv_header_$ac_safe=no"
12978 fi
12979 rm -f conftest*
12980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12981   echo "$ac_t""yes" 1>&6
12982   { test "$extra_verbose" = "yes" && cat << \EOF
12983     Defining HAVE_TERMIO
12984 EOF
12985 cat >> confdefs.h <<\EOF
12986 #define HAVE_TERMIO 1
12987 EOF
12988 }
12989
12990 else
12991   echo "$ac_t""no" 1>&6
12992 fi
12993
12994 fi
12995
12996
12997
12998 echo $ac_n "checking for socket""... $ac_c" 1>&6
12999 echo "configure:13000: checking for socket" >&5
13000
13001 cat > conftest.$ac_ext <<EOF
13002 #line 13003 "configure"
13003 #include "confdefs.h"
13004 /* System header to define __stub macros and hopefully few prototypes,
13005     which can conflict with char socket(); below.  */
13006 #include <assert.h>
13007 /* Override any gcc2 internal prototype to avoid an error.  */
13008 /* We use char because int might match the return type of a gcc2
13009     builtin and then its argument prototype would still apply.  */
13010 char socket();
13011
13012 int main() {
13013
13014 /* The GNU C library defines this for functions which it implements
13015     to always fail with ENOSYS.  Some functions are actually named
13016     something starting with __ and the normal name is an alias.  */
13017 #if defined (__stub_socket) || defined (__stub___socket)
13018 choke me
13019 #else
13020 socket();
13021 #endif
13022
13023 ; return 0; }
13024 EOF
13025 if { (eval echo configure:13026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13026   rm -rf conftest*
13027   eval "ac_cv_func_socket=yes"
13028 else
13029   echo "configure: failed program was:" >&5
13030   cat conftest.$ac_ext >&5
13031   rm -rf conftest*
13032   eval "ac_cv_func_socket=no"
13033 fi
13034 rm -f conftest*
13035
13036 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
13037   echo "$ac_t""yes" 1>&6
13038   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
13039 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
13040 echo "configure:13041: checking for netinet/in.h" >&5
13041
13042 cat > conftest.$ac_ext <<EOF
13043 #line 13044 "configure"
13044 #include "confdefs.h"
13045 #include <netinet/in.h>
13046 EOF
13047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13048 { (eval echo configure:13049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13050 if test -z "$ac_err"; then
13051   rm -rf conftest*
13052   eval "ac_cv_header_$ac_safe=yes"
13053 else
13054   echo "$ac_err" >&5
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -rf conftest*
13058   eval "ac_cv_header_$ac_safe=no"
13059 fi
13060 rm -f conftest*
13061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13062   echo "$ac_t""yes" 1>&6
13063   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
13064 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
13065 echo "configure:13066: checking for arpa/inet.h" >&5
13066
13067 cat > conftest.$ac_ext <<EOF
13068 #line 13069 "configure"
13069 #include "confdefs.h"
13070 #include <arpa/inet.h>
13071 EOF
13072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13073 { (eval echo configure:13074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13075 if test -z "$ac_err"; then
13076   rm -rf conftest*
13077   eval "ac_cv_header_$ac_safe=yes"
13078 else
13079   echo "$ac_err" >&5
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   eval "ac_cv_header_$ac_safe=no"
13084 fi
13085 rm -f conftest*
13086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13087   echo "$ac_t""yes" 1>&6
13088   
13089   { test "$extra_verbose" = "yes" && cat << \EOF
13090     Defining HAVE_SOCKETS
13091 EOF
13092 cat >> confdefs.h <<\EOF
13093 #define HAVE_SOCKETS 1
13094 EOF
13095 }
13096
13097       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
13098 echo "configure:13099: checking "for sun_len member in struct sockaddr_un"" >&5
13099       cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102
13103 #include <sys/types.h>
13104 #include <sys/socket.h>
13105 #include <sys/un.h>
13106       
13107 int main() {
13108 static struct sockaddr_un x; x.sun_len = 1;
13109 ; return 0; }
13110 EOF
13111 if { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13112   rm -rf conftest*
13113   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13114     Defining HAVE_SOCKADDR_SUN_LEN
13115 EOF
13116 cat >> confdefs.h <<\EOF
13117 #define HAVE_SOCKADDR_SUN_LEN 1
13118 EOF
13119 }
13120
13121 else
13122   echo "configure: failed program was:" >&5
13123   cat conftest.$ac_ext >&5
13124   rm -rf conftest*
13125   echo "$ac_t""no" 1>&6
13126 fi
13127 rm -f conftest*
13128       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13129 echo "configure:13130: checking "for ip_mreq struct in netinet/in.h"" >&5
13130       cat > conftest.$ac_ext <<EOF
13131 #line 13132 "configure"
13132 #include "confdefs.h"
13133
13134 #include <sys/types.h>
13135 #include <netinet/in.h>
13136       
13137 int main() {
13138 static struct ip_mreq x;
13139 ; return 0; }
13140 EOF
13141 if { (eval echo configure:13142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13142   rm -rf conftest*
13143   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13144     Defining HAVE_MULTICAST
13145 EOF
13146 cat >> confdefs.h <<\EOF
13147 #define HAVE_MULTICAST 1
13148 EOF
13149 }
13150
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -rf conftest*
13155   echo "$ac_t""no" 1>&6
13156 fi
13157 rm -f conftest*
13158 else
13159   echo "$ac_t""no" 1>&6
13160 fi
13161
13162 else
13163   echo "$ac_t""no" 1>&6
13164 fi
13165
13166 else
13167   echo "$ac_t""no" 1>&6
13168 fi
13169
13170
13171 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13172 echo "configure:13173: checking for msgget" >&5
13173
13174 cat > conftest.$ac_ext <<EOF
13175 #line 13176 "configure"
13176 #include "confdefs.h"
13177 /* System header to define __stub macros and hopefully few prototypes,
13178     which can conflict with char msgget(); below.  */
13179 #include <assert.h>
13180 /* Override any gcc2 internal prototype to avoid an error.  */
13181 /* We use char because int might match the return type of a gcc2
13182     builtin and then its argument prototype would still apply.  */
13183 char msgget();
13184
13185 int main() {
13186
13187 /* The GNU C library defines this for functions which it implements
13188     to always fail with ENOSYS.  Some functions are actually named
13189     something starting with __ and the normal name is an alias.  */
13190 #if defined (__stub_msgget) || defined (__stub___msgget)
13191 choke me
13192 #else
13193 msgget();
13194 #endif
13195
13196 ; return 0; }
13197 EOF
13198 if { (eval echo configure:13199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13199   rm -rf conftest*
13200   eval "ac_cv_func_msgget=yes"
13201 else
13202   echo "configure: failed program was:" >&5
13203   cat conftest.$ac_ext >&5
13204   rm -rf conftest*
13205   eval "ac_cv_func_msgget=no"
13206 fi
13207 rm -f conftest*
13208
13209 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13210   echo "$ac_t""yes" 1>&6
13211   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13212 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13213 echo "configure:13214: checking for sys/ipc.h" >&5
13214
13215 cat > conftest.$ac_ext <<EOF
13216 #line 13217 "configure"
13217 #include "confdefs.h"
13218 #include <sys/ipc.h>
13219 EOF
13220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13221 { (eval echo configure:13222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13223 if test -z "$ac_err"; then
13224   rm -rf conftest*
13225   eval "ac_cv_header_$ac_safe=yes"
13226 else
13227   echo "$ac_err" >&5
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -rf conftest*
13231   eval "ac_cv_header_$ac_safe=no"
13232 fi
13233 rm -f conftest*
13234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13235   echo "$ac_t""yes" 1>&6
13236   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13237 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13238 echo "configure:13239: checking for sys/msg.h" >&5
13239
13240 cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243 #include <sys/msg.h>
13244 EOF
13245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13246 { (eval echo configure:13247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13248 if test -z "$ac_err"; then
13249   rm -rf conftest*
13250   eval "ac_cv_header_$ac_safe=yes"
13251 else
13252   echo "$ac_err" >&5
13253   echo "configure: failed program was:" >&5
13254   cat conftest.$ac_ext >&5
13255   rm -rf conftest*
13256   eval "ac_cv_header_$ac_safe=no"
13257 fi
13258 rm -f conftest*
13259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13260   echo "$ac_t""yes" 1>&6
13261   { test "$extra_verbose" = "yes" && cat << \EOF
13262     Defining HAVE_SYSVIPC
13263 EOF
13264 cat >> confdefs.h <<\EOF
13265 #define HAVE_SYSVIPC 1
13266 EOF
13267 }
13268
13269 else
13270   echo "$ac_t""no" 1>&6
13271 fi
13272
13273 else
13274   echo "$ac_t""no" 1>&6
13275 fi
13276
13277 else
13278   echo "$ac_t""no" 1>&6
13279 fi
13280
13281
13282 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13283 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13284 echo "configure:13285: checking for dirent.h" >&5
13285
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 #include <dirent.h>
13290 EOF
13291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13292 { (eval echo configure:13293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13294 if test -z "$ac_err"; then
13295   rm -rf conftest*
13296   eval "ac_cv_header_$ac_safe=yes"
13297 else
13298   echo "$ac_err" >&5
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -rf conftest*
13302   eval "ac_cv_header_$ac_safe=no"
13303 fi
13304 rm -f conftest*
13305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13306   echo "$ac_t""yes" 1>&6
13307   { test "$extra_verbose" = "yes" && cat << \EOF
13308     Defining SYSV_SYSTEM_DIR
13309 EOF
13310 cat >> confdefs.h <<\EOF
13311 #define SYSV_SYSTEM_DIR 1
13312 EOF
13313 }
13314
13315 else
13316   echo "$ac_t""no" 1>&6
13317 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13318 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13319 echo "configure:13320: checking for sys/dir.h" >&5
13320
13321 cat > conftest.$ac_ext <<EOF
13322 #line 13323 "configure"
13323 #include "confdefs.h"
13324 #include <sys/dir.h>
13325 EOF
13326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13327 { (eval echo configure:13328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13329 if test -z "$ac_err"; then
13330   rm -rf conftest*
13331   eval "ac_cv_header_$ac_safe=yes"
13332 else
13333   echo "$ac_err" >&5
13334   echo "configure: failed program was:" >&5
13335   cat conftest.$ac_ext >&5
13336   rm -rf conftest*
13337   eval "ac_cv_header_$ac_safe=no"
13338 fi
13339 rm -f conftest*
13340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13341   echo "$ac_t""yes" 1>&6
13342   :
13343 else
13344   echo "$ac_t""no" 1>&6
13345 { test "$extra_verbose" = "yes" && cat << \EOF
13346     Defining NONSYSTEM_DIR_LIBRARY
13347 EOF
13348 cat >> confdefs.h <<\EOF
13349 #define NONSYSTEM_DIR_LIBRARY 1
13350 EOF
13351 }
13352
13353 fi
13354
13355 fi
13356
13357
13358 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13359 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13360 echo "configure:13361: checking for nlist.h" >&5
13361
13362 cat > conftest.$ac_ext <<EOF
13363 #line 13364 "configure"
13364 #include "confdefs.h"
13365 #include <nlist.h>
13366 EOF
13367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13368 { (eval echo configure:13369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13370 if test -z "$ac_err"; then
13371   rm -rf conftest*
13372   eval "ac_cv_header_$ac_safe=yes"
13373 else
13374   echo "$ac_err" >&5
13375   echo "configure: failed program was:" >&5
13376   cat conftest.$ac_ext >&5
13377   rm -rf conftest*
13378   eval "ac_cv_header_$ac_safe=no"
13379 fi
13380 rm -f conftest*
13381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13382   echo "$ac_t""yes" 1>&6
13383   { test "$extra_verbose" = "yes" && cat << \EOF
13384     Defining NLIST_STRUCT
13385 EOF
13386 cat >> confdefs.h <<\EOF
13387 #define NLIST_STRUCT 1
13388 EOF
13389 }
13390
13391 else
13392   echo "$ac_t""no" 1>&6
13393 fi
13394
13395
13396
13397 echo "checking "for sound support"" 1>&6
13398 echo "configure:13399: checking "for sound support"" >&5
13399 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13400
13401 if test "$with_native_sound" != "no"; then
13402     if test -n "$native_sound_lib"; then
13403     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13404 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13405 echo "configure:13406: checking for multimedia/audio_device.h" >&5
13406
13407 cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 #include <multimedia/audio_device.h>
13411 EOF
13412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13413 { (eval echo configure:13414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13415 if test -z "$ac_err"; then
13416   rm -rf conftest*
13417   eval "ac_cv_header_$ac_safe=yes"
13418 else
13419   echo "$ac_err" >&5
13420   echo "configure: failed program was:" >&5
13421   cat conftest.$ac_ext >&5
13422   rm -rf conftest*
13423   eval "ac_cv_header_$ac_safe=no"
13424 fi
13425 rm -f conftest*
13426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13427   echo "$ac_t""yes" 1>&6
13428   sound_found=yes sound_cflags=""
13429       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13430    echo "    xemacs will be linked with \"sunplay.o\""
13431  fi
13432 else
13433   echo "$ac_t""no" 1>&6
13434 fi
13435
13436   fi
13437
13438     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13439     if test -d "/usr/demo/SOUND/include/multimedia"; then
13440       sun_sound_cflags="-I/usr/demo/SOUND/include"
13441     elif test -d "/usr/demo/SOUND/multimedia"; then
13442       sun_sound_cflags="-I/usr/demo/SOUND"
13443     fi
13444
13445     if test -n "$native_sound_lib"; then
13446       sun_sound_lib="$native_sound_lib"
13447     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13448       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13449     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13450       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13451     fi
13452
13453     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13454       native_sound_lib="$sun_sound_lib"
13455       sound_cflags="$sun_sound_cflags"
13456       sound_found=yes
13457       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13458    echo "    xemacs will be linked with \"sunplay.o\""
13459  fi
13460     fi
13461   fi
13462
13463     if test -z "$sound_found"; then
13464     case "$canonical" in
13465     *-sgi-* )
13466       if test -z "$native_sound_lib"; then
13467         
13468 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13469 echo "configure:13470: checking for ALopenport in -laudio" >&5
13470 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13471
13472 xe_check_libs=" -laudio "
13473 cat > conftest.$ac_ext <<EOF
13474 #line 13475 "configure"
13475 #include "confdefs.h"
13476 /* Override any gcc2 internal prototype to avoid an error.  */
13477 /* We use char because int might match the return type of a gcc2
13478     builtin and then its argument prototype would still apply.  */
13479 char ALopenport();
13480
13481 int main() {
13482 ALopenport()
13483 ; return 0; }
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13486   rm -rf conftest*
13487   eval "ac_cv_lib_$ac_lib_var=yes"
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -rf conftest*
13492   eval "ac_cv_lib_$ac_lib_var=no"
13493 fi
13494 rm -f conftest*
13495 xe_check_libs=""
13496
13497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13498   echo "$ac_t""yes" 1>&6
13499   native_sound_lib="-laudio"
13500 else
13501   echo "$ac_t""no" 1>&6
13502 fi
13503
13504
13505       fi
13506       if test -n "$native_sound_lib"; then
13507         sound_found=yes sound_cflags=""
13508         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13509    echo "    xemacs will be linked with \"sgiplay.o\""
13510  fi
13511       fi ;;
13512     hppa*-hp-hpux* )
13513       if test -z "$native_sound_lib"; then
13514         
13515 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13516 echo "configure:13517: checking for AOpenAudio in -lAlib" >&5
13517 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13518
13519 xe_check_libs=" -lAlib "
13520 cat > conftest.$ac_ext <<EOF
13521 #line 13522 "configure"
13522 #include "confdefs.h"
13523 /* Override any gcc2 internal prototype to avoid an error.  */
13524 /* We use char because int might match the return type of a gcc2
13525     builtin and then its argument prototype would still apply.  */
13526 char AOpenAudio();
13527
13528 int main() {
13529 AOpenAudio()
13530 ; return 0; }
13531 EOF
13532 if { (eval echo configure:13533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13533   rm -rf conftest*
13534   eval "ac_cv_lib_$ac_lib_var=yes"
13535 else
13536   echo "configure: failed program was:" >&5
13537   cat conftest.$ac_ext >&5
13538   rm -rf conftest*
13539   eval "ac_cv_lib_$ac_lib_var=no"
13540 fi
13541 rm -f conftest*
13542 xe_check_libs=""
13543
13544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13545   echo "$ac_t""yes" 1>&6
13546   native_sound_lib="-lAlib"
13547 else
13548   echo "$ac_t""no" 1>&6
13549 fi
13550
13551
13552       fi
13553       if test -n "$native_sound_lib"; then
13554         sound_found=yes
13555         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13556    echo "    xemacs will be linked with \"hpplay.o\""
13557  fi
13558         if test "$GCC" = "yes" # Kludge city
13559           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13560           else sound_cflags="+e -I/usr/audio/examples"
13561         fi
13562       fi ;;
13563     esac
13564   fi
13565
13566     if test -z "$sound_found"; then
13567     if test "$with_msw" = "yes"; then
13568     sound_found=yes
13569     native_sound_lib=
13570     fi
13571   fi
13572
13573     if test -z "$sound_found"; then
13574     for dir in "machine" "sys" "linux"; do
13575       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13576 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13577 echo "configure:13578: checking for ${dir}/soundcard.h" >&5
13578
13579 cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 #include <${dir}/soundcard.h>
13583 EOF
13584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13585 { (eval echo configure:13586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13587 if test -z "$ac_err"; then
13588   rm -rf conftest*
13589   eval "ac_cv_header_$ac_safe=yes"
13590 else
13591   echo "$ac_err" >&5
13592   echo "configure: failed program was:" >&5
13593   cat conftest.$ac_ext >&5
13594   rm -rf conftest*
13595   eval "ac_cv_header_$ac_safe=no"
13596 fi
13597 rm -f conftest*
13598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13599   echo "$ac_t""yes" 1>&6
13600   sound_found=yes
13601        need_miscplay=yes
13602         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13603    echo "    xemacs will be linked with \"linuxplay.o\""
13604  fi
13605         { test "$extra_verbose" = "yes" && cat << EOF
13606     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13607 EOF
13608 cat >> confdefs.h <<EOF
13609 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13610 EOF
13611 }
13612
13613         break
13614 else
13615   echo "$ac_t""no" 1>&6
13616 fi
13617
13618     done
13619   fi
13620
13621   test "$sound_found" = "yes" && with_native_sound=yes
13622 fi
13623
13624 if test "$with_native_sound" = "yes"; then
13625   { test "$extra_verbose" = "yes" && cat << \EOF
13626     Defining HAVE_NATIVE_SOUND
13627 EOF
13628 cat >> confdefs.h <<\EOF
13629 #define HAVE_NATIVE_SOUND 1
13630 EOF
13631 }
13632
13633   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13634 fi
13635
13636 if test "$with_nas_sound" != "no"; then
13637   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13638 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13639 echo "configure:13640: checking for audio/audiolib.h" >&5
13640
13641 cat > conftest.$ac_ext <<EOF
13642 #line 13643 "configure"
13643 #include "confdefs.h"
13644 #include <audio/audiolib.h>
13645 EOF
13646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13647 { (eval echo configure:13648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13649 if test -z "$ac_err"; then
13650   rm -rf conftest*
13651   eval "ac_cv_header_$ac_safe=yes"
13652 else
13653   echo "$ac_err" >&5
13654   echo "configure: failed program was:" >&5
13655   cat conftest.$ac_ext >&5
13656   rm -rf conftest*
13657   eval "ac_cv_header_$ac_safe=no"
13658 fi
13659 rm -f conftest*
13660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13661   echo "$ac_t""yes" 1>&6
13662   
13663     
13664 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13665 echo "configure:13666: checking for AuOpenServer in -laudio" >&5
13666 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13667
13668 xe_check_libs=" -laudio "
13669 cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 /* We use char because int might match the return type of a gcc2
13674     builtin and then its argument prototype would still apply.  */
13675 char AuOpenServer();
13676
13677 int main() {
13678 AuOpenServer()
13679 ; return 0; }
13680 EOF
13681 if { (eval echo configure:13682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13682   rm -rf conftest*
13683   eval "ac_cv_lib_$ac_lib_var=yes"
13684 else
13685   echo "configure: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   rm -rf conftest*
13688   eval "ac_cv_lib_$ac_lib_var=no"
13689 fi
13690 rm -f conftest*
13691 xe_check_libs=""
13692
13693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13694   echo "$ac_t""yes" 1>&6
13695   have_nas_sound=yes
13696 else
13697   echo "$ac_t""no" 1>&6
13698 fi
13699
13700
13701 else
13702   echo "$ac_t""no" 1>&6
13703 fi
13704
13705   if test "$have_nas_sound" = "yes"; then
13706     with_nas_sound=yes
13707     { test "$extra_verbose" = "yes" && cat << \EOF
13708     Defining HAVE_NAS_SOUND
13709 EOF
13710 cat >> confdefs.h <<\EOF
13711 #define HAVE_NAS_SOUND 1
13712 EOF
13713 }
13714
13715     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13716    echo "    xemacs will be linked with \"nas.o\""
13717  fi
13718     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13719             cat > conftest.$ac_ext <<EOF
13720 #line 13721 "configure"
13721 #include "confdefs.h"
13722 #include <audio/Xtutil.h>
13723 EOF
13724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13725   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13726   :
13727 else
13728   rm -rf conftest*
13729   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13730     Defining NAS_NO_ERROR_JUMP
13731 EOF
13732 cat >> confdefs.h <<\EOF
13733 #define NAS_NO_ERROR_JUMP 1
13734 EOF
13735 }
13736
13737 fi
13738 rm -f conftest*
13739
13740   else
13741     test "$with_nas_sound" = "yes" && \
13742       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13743     with_nas_sound=no
13744   fi
13745 fi
13746
13747 if test "$with_esd_sound" != "no"; then
13748   # Extract the first word of "esd-config", so it can be a program name with args.
13749 set dummy esd-config; ac_word=$2
13750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13751 echo "configure:13752: checking for $ac_word" >&5
13752
13753 if test -n "$have_esd_config"; then
13754   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13755 else
13756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13757   ac_dummy="$PATH"
13758   for ac_dir in $ac_dummy; do
13759     test -z "$ac_dir" && ac_dir=.
13760     if test -f $ac_dir/$ac_word; then
13761       ac_cv_prog_have_esd_config="yes"
13762       break
13763     fi
13764   done
13765   IFS="$ac_save_ifs"
13766   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13767 fi
13768 have_esd_config="$ac_cv_prog_have_esd_config"
13769 if test -n "$have_esd_config"; then
13770   echo "$ac_t""$have_esd_config" 1>&6
13771 else
13772   echo "$ac_t""no" 1>&6
13773 fi
13774
13775   if test "$have_esd_config" = "yes"; then
13776     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13777     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
13778     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13779     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13780 echo "configure:13781: checking for esd_play_stream" >&5
13781
13782 cat > conftest.$ac_ext <<EOF
13783 #line 13784 "configure"
13784 #include "confdefs.h"
13785 /* System header to define __stub macros and hopefully few prototypes,
13786     which can conflict with char esd_play_stream(); below.  */
13787 #include <assert.h>
13788 /* Override any gcc2 internal prototype to avoid an error.  */
13789 /* We use char because int might match the return type of a gcc2
13790     builtin and then its argument prototype would still apply.  */
13791 char esd_play_stream();
13792
13793 int main() {
13794
13795 /* The GNU C library defines this for functions which it implements
13796     to always fail with ENOSYS.  Some functions are actually named
13797     something starting with __ and the normal name is an alias.  */
13798 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13799 choke me
13800 #else
13801 esd_play_stream();
13802 #endif
13803
13804 ; return 0; }
13805 EOF
13806 if { (eval echo configure:13807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13807   rm -rf conftest*
13808   eval "ac_cv_func_esd_play_stream=yes"
13809 else
13810   echo "configure: failed program was:" >&5
13811   cat conftest.$ac_ext >&5
13812   rm -rf conftest*
13813   eval "ac_cv_func_esd_play_stream=no"
13814 fi
13815 rm -f conftest*
13816
13817 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13818   echo "$ac_t""yes" 1>&6
13819   have_esd_sound=yes
13820 else
13821   echo "$ac_t""no" 1>&6
13822 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13823 fi
13824
13825   fi
13826
13827   if test "$have_esd_sound" = "yes"; then
13828     with_esd_sound=yes
13829     need_miscplay=yes
13830     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13831    echo "    xemacs will be linked with \"esd.o\""
13832  fi
13833     { test "$extra_verbose" = "yes" && cat << \EOF
13834     Defining HAVE_ESD_SOUND
13835 EOF
13836 cat >> confdefs.h <<\EOF
13837 #define HAVE_ESD_SOUND 1
13838 EOF
13839 }
13840
13841   else
13842     test "$with_esd_sound" = "yes" && \
13843       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13844     with_esd_sound=no
13845   fi
13846 fi
13847
13848 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13849    echo "    xemacs will be linked with \"miscplay.o\""
13850  fi
13851
13852
13853 test -z "$with_tty" && with_tty=yes
13854
13855 if test "$with_tty" = "yes"  ; then
13856   echo "checking for TTY-related features" 1>&6
13857 echo "configure:13858: checking for TTY-related features" >&5
13858   { test "$extra_verbose" = "yes" && cat << \EOF
13859     Defining HAVE_TTY
13860 EOF
13861 cat >> confdefs.h <<\EOF
13862 #define HAVE_TTY 1
13863 EOF
13864 }
13865
13866   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
13867    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\""
13868  fi
13869
13870     if test -z "$with_ncurses"; then
13871     
13872 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13873 echo "configure:13874: checking for tgetent in -lncurses" >&5
13874 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13875
13876 xe_check_libs=" -lncurses "
13877 cat > conftest.$ac_ext <<EOF
13878 #line 13879 "configure"
13879 #include "confdefs.h"
13880 /* Override any gcc2 internal prototype to avoid an error.  */
13881 /* We use char because int might match the return type of a gcc2
13882     builtin and then its argument prototype would still apply.  */
13883 char tgetent();
13884
13885 int main() {
13886 tgetent()
13887 ; return 0; }
13888 EOF
13889 if { (eval echo configure:13890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13890   rm -rf conftest*
13891   eval "ac_cv_lib_$ac_lib_var=yes"
13892 else
13893   echo "configure: failed program was:" >&5
13894   cat conftest.$ac_ext >&5
13895   rm -rf conftest*
13896   eval "ac_cv_lib_$ac_lib_var=no"
13897 fi
13898 rm -f conftest*
13899 xe_check_libs=""
13900
13901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13902   echo "$ac_t""yes" 1>&6
13903   with_ncurses=yes
13904 else
13905   echo "$ac_t""no" 1>&6
13906 with_ncurses=no
13907 fi
13908
13909
13910   fi
13911   if test "$with_ncurses" = "yes"; then
13912     { test "$extra_verbose" = "yes" && cat << \EOF
13913     Defining HAVE_NCURSES
13914 EOF
13915 cat >> confdefs.h <<\EOF
13916 #define HAVE_NCURSES 1
13917 EOF
13918 }
13919
13920     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13921 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13922 echo "configure:13923: checking for ncurses/curses.h" >&5
13923
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 #include <ncurses/curses.h>
13928 EOF
13929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13930 { (eval echo configure:13931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13932 if test -z "$ac_err"; then
13933   rm -rf conftest*
13934   eval "ac_cv_header_$ac_safe=yes"
13935 else
13936   echo "$ac_err" >&5
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   rm -rf conftest*
13940   eval "ac_cv_header_$ac_safe=no"
13941 fi
13942 rm -f conftest*
13943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13944   echo "$ac_t""yes" 1>&6
13945   curses_h_file=ncurses/curses.h
13946 else
13947   echo "$ac_t""no" 1>&6
13948 fi
13949
13950     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13951 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13952 echo "configure:13953: checking for ncurses/term.h" >&5
13953
13954 cat > conftest.$ac_ext <<EOF
13955 #line 13956 "configure"
13956 #include "confdefs.h"
13957 #include <ncurses/term.h>
13958 EOF
13959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13960 { (eval echo configure:13961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13962 if test -z "$ac_err"; then
13963   rm -rf conftest*
13964   eval "ac_cv_header_$ac_safe=yes"
13965 else
13966   echo "$ac_err" >&5
13967   echo "configure: failed program was:" >&5
13968   cat conftest.$ac_ext >&5
13969   rm -rf conftest*
13970   eval "ac_cv_header_$ac_safe=no"
13971 fi
13972 rm -f conftest*
13973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13974   echo "$ac_t""yes" 1>&6
13975   term_h_file=ncurses/term.h
13976 else
13977   echo "$ac_t""no" 1>&6
13978 fi
13979
13980     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13981    echo "    xemacs will be linked with \"terminfo.o\""
13982  fi
13983     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13984
13985     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13986                         save_c_switch_site="$c_switch_site"
13987       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13988       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13989 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13990 echo "configure:13991: checking for ncurses/curses.h" >&5
13991
13992 cat > conftest.$ac_ext <<EOF
13993 #line 13994 "configure"
13994 #include "confdefs.h"
13995 #include <ncurses/curses.h>
13996 EOF
13997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13998 { (eval echo configure:13999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14000 if test -z "$ac_err"; then
14001   rm -rf conftest*
14002   eval "ac_cv_header_$ac_safe=yes"
14003 else
14004   echo "$ac_err" >&5
14005   echo "configure: failed program was:" >&5
14006   cat conftest.$ac_ext >&5
14007   rm -rf conftest*
14008   eval "ac_cv_header_$ac_safe=no"
14009 fi
14010 rm -f conftest*
14011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14012   echo "$ac_t""yes" 1>&6
14013   curses_h_file=ncurses/curses.h
14014 else
14015   echo "$ac_t""no" 1>&6
14016 fi
14017
14018       if test "$ac_cv_header_ncurses_curses_h" = "yes"
14019         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
14020         else c_switch_site="$save_c_switch_site"
14021       fi
14022     fi
14023   else         if test "$have_terminfo" = "yes"; then
14024       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
14025    echo "    xemacs will be linked with \"terminfo.o\""
14026  fi
14027       if test -n "$libs_termcap"; then
14028         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14029       else
14030         for lib in curses termlib termcap; do
14031           
14032 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
14033 echo "configure:14034: checking for tgetent in -l$lib" >&5
14034 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
14035
14036 xe_check_libs=" -l$lib "
14037 cat > conftest.$ac_ext <<EOF
14038 #line 14039 "configure"
14039 #include "confdefs.h"
14040 /* Override any gcc2 internal prototype to avoid an error.  */
14041 /* We use char because int might match the return type of a gcc2
14042     builtin and then its argument prototype would still apply.  */
14043 char tgetent();
14044
14045 int main() {
14046 tgetent()
14047 ; return 0; }
14048 EOF
14049 if { (eval echo configure:14050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14050   rm -rf conftest*
14051   eval "ac_cv_lib_$ac_lib_var=yes"
14052 else
14053   echo "configure: failed program was:" >&5
14054   cat conftest.$ac_ext >&5
14055   rm -rf conftest*
14056   eval "ac_cv_lib_$ac_lib_var=no"
14057 fi
14058 rm -f conftest*
14059 xe_check_libs=""
14060
14061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14062   echo "$ac_t""yes" 1>&6
14063   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
14064 else
14065   echo "$ac_t""no" 1>&6
14066 fi
14067
14068
14069         done
14070       fi
14071     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
14072                                 
14073 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
14074 echo "configure:14075: checking for tgoto in -ltermcap" >&5
14075 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
14076
14077 xe_check_libs=" -ltermcap "
14078 cat > conftest.$ac_ext <<EOF
14079 #line 14080 "configure"
14080 #include "confdefs.h"
14081 /* Override any gcc2 internal prototype to avoid an error.  */
14082 /* We use char because int might match the return type of a gcc2
14083     builtin and then its argument prototype would still apply.  */
14084 char tgoto();
14085
14086 int main() {
14087 tgoto()
14088 ; return 0; }
14089 EOF
14090 if { (eval echo configure:14091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14091   rm -rf conftest*
14092   eval "ac_cv_lib_$ac_lib_var=yes"
14093 else
14094   echo "configure: failed program was:" >&5
14095   cat conftest.$ac_ext >&5
14096   rm -rf conftest*
14097   eval "ac_cv_lib_$ac_lib_var=no"
14098 fi
14099 rm -f conftest*
14100 xe_check_libs=""
14101
14102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14103   echo "$ac_t""yes" 1>&6
14104     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14106   { test "$extra_verbose" = "yes" && cat << EOF
14107     Defining $ac_tr_lib
14108 EOF
14109 cat >> confdefs.h <<EOF
14110 #define $ac_tr_lib 1
14111 EOF
14112 }
14113
14114   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14115
14116 else
14117   echo "$ac_t""no" 1>&6
14118 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14119    echo "    xemacs will be linked with \"tparam.o\""
14120  fi
14121 fi
14122
14123
14124       else
14125         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14126    echo "    xemacs will be linked with \"tparam.o\""
14127  fi
14128       fi
14129                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14130       if test -n "$libs_termcap"; then
14131         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14132       else
14133         
14134 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14135 echo "configure:14136: checking for tgetent in -lcurses" >&5
14136 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14137
14138 xe_check_libs=" -lcurses "
14139 cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142 /* Override any gcc2 internal prototype to avoid an error.  */
14143 /* We use char because int might match the return type of a gcc2
14144     builtin and then its argument prototype would still apply.  */
14145 char tgetent();
14146
14147 int main() {
14148 tgetent()
14149 ; return 0; }
14150 EOF
14151 if { (eval echo configure:14152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14152   rm -rf conftest*
14153   eval "ac_cv_lib_$ac_lib_var=yes"
14154 else
14155   echo "configure: failed program was:" >&5
14156   cat conftest.$ac_ext >&5
14157   rm -rf conftest*
14158   eval "ac_cv_lib_$ac_lib_var=no"
14159 fi
14160 rm -f conftest*
14161 xe_check_libs=""
14162
14163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14164   echo "$ac_t""yes" 1>&6
14165   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14166 else
14167   echo "$ac_t""no" 1>&6
14168 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14169 echo "configure:14170: checking for tgetent in -ltermcap" >&5
14170 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14171
14172 xe_check_libs=" -ltermcap "
14173 cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 /* Override any gcc2 internal prototype to avoid an error.  */
14177 /* We use char because int might match the return type of a gcc2
14178     builtin and then its argument prototype would still apply.  */
14179 char tgetent();
14180
14181 int main() {
14182 tgetent()
14183 ; return 0; }
14184 EOF
14185 if { (eval echo configure:14186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14186   rm -rf conftest*
14187   eval "ac_cv_lib_$ac_lib_var=yes"
14188 else
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   eval "ac_cv_lib_$ac_lib_var=no"
14193 fi
14194 rm -f conftest*
14195 xe_check_libs=""
14196
14197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14198   echo "$ac_t""yes" 1>&6
14199   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14200 else
14201   echo "$ac_t""no" 1>&6
14202 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14203    echo "    xemacs will be linked with \"termcap.o\""
14204  fi
14205 fi
14206
14207
14208 fi
14209
14210
14211       fi
14212     fi
14213   fi
14214   { test "$extra_verbose" = "yes" && cat << EOF
14215     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14216 EOF
14217 cat >> confdefs.h <<EOF
14218 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14219 EOF
14220 }
14221
14222   { test "$extra_verbose" = "yes" && cat << EOF
14223     Defining TERM_H_FILE = "${term_h_file-term.h}"
14224 EOF
14225 cat >> confdefs.h <<EOF
14226 #define TERM_H_FILE "${term_h_file-term.h}"
14227 EOF
14228 }
14229
14230
14231     if test "$with_gpm" != "no"; then
14232     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14233 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14234 echo "configure:14235: checking for gpm.h" >&5
14235
14236 cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239 #include <gpm.h>
14240 EOF
14241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14242 { (eval echo configure:14243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14244 if test -z "$ac_err"; then
14245   rm -rf conftest*
14246   eval "ac_cv_header_$ac_safe=yes"
14247 else
14248   echo "$ac_err" >&5
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -rf conftest*
14252   eval "ac_cv_header_$ac_safe=no"
14253 fi
14254 rm -f conftest*
14255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14256   echo "$ac_t""yes" 1>&6
14257   
14258       
14259 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14260 echo "configure:14261: checking for Gpm_Open in -lgpm" >&5
14261 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14262
14263 xe_check_libs=" -lgpm "
14264 cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 /* Override any gcc2 internal prototype to avoid an error.  */
14268 /* We use char because int might match the return type of a gcc2
14269     builtin and then its argument prototype would still apply.  */
14270 char Gpm_Open();
14271
14272 int main() {
14273 Gpm_Open()
14274 ; return 0; }
14275 EOF
14276 if { (eval echo configure:14277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14277   rm -rf conftest*
14278   eval "ac_cv_lib_$ac_lib_var=yes"
14279 else
14280   echo "configure: failed program was:" >&5
14281   cat conftest.$ac_ext >&5
14282   rm -rf conftest*
14283   eval "ac_cv_lib_$ac_lib_var=no"
14284 fi
14285 rm -f conftest*
14286 xe_check_libs=""
14287
14288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14289   echo "$ac_t""yes" 1>&6
14290   have_gpm=yes
14291 else
14292   echo "$ac_t""no" 1>&6
14293 fi
14294
14295
14296 else
14297   echo "$ac_t""no" 1>&6
14298 fi
14299
14300     if test "$have_gpm" = "yes"; then
14301       with_gpm=yes
14302       { test "$extra_verbose" = "yes" && cat << \EOF
14303     Defining HAVE_GPM
14304 EOF
14305 cat >> confdefs.h <<\EOF
14306 #define HAVE_GPM 1
14307 EOF
14308 }
14309
14310       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14311    echo "    xemacs will be linked with \"gpmevent.o\""
14312  fi
14313       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14314     elif test "$with_gpm" = "yes"; then
14315       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14316     else
14317       with_gpm=no
14318     fi
14319   fi
14320
14321 else   for feature in ncurses gpm; do
14322     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14323       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14324     fi
14325     eval "with_${feature}=no"
14326   done
14327 fi 
14328 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
14329    echo "    xemacs will be linked with \"event-unixoid.o\""
14330  fi
14331
14332
14333 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14334   != "no no no" && echo "checking for database support" 1>&6
14335 echo "configure:14336: checking for database support" >&5
14336
14337 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14338   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14339 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14340 echo "configure:14341: checking for ndbm.h" >&5
14341
14342 cat > conftest.$ac_ext <<EOF
14343 #line 14344 "configure"
14344 #include "confdefs.h"
14345 #include <ndbm.h>
14346 EOF
14347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14348 { (eval echo configure:14349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14350 if test -z "$ac_err"; then
14351   rm -rf conftest*
14352   eval "ac_cv_header_$ac_safe=yes"
14353 else
14354   echo "$ac_err" >&5
14355   echo "configure: failed program was:" >&5
14356   cat conftest.$ac_ext >&5
14357   rm -rf conftest*
14358   eval "ac_cv_header_$ac_safe=no"
14359 fi
14360 rm -f conftest*
14361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14362   echo "$ac_t""yes" 1>&6
14363   :
14364 else
14365   echo "$ac_t""no" 1>&6
14366
14367     test "$with_database_gdbm" = "yes" -o \
14368          "$with_database_dbm"  = "yes" && \
14369       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14370     with_database_gdbm=no with_database_dbm=no
14371 fi
14372
14373 fi
14374
14375 if test "$with_database_gdbm" != "no"; then
14376   
14377 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14378 echo "configure:14379: checking for dbm_open in -lgdbm" >&5
14379 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14380
14381 xe_check_libs=" -lgdbm "
14382 cat > conftest.$ac_ext <<EOF
14383 #line 14384 "configure"
14384 #include "confdefs.h"
14385 /* Override any gcc2 internal prototype to avoid an error.  */
14386 /* We use char because int might match the return type of a gcc2
14387     builtin and then its argument prototype would still apply.  */
14388 char dbm_open();
14389
14390 int main() {
14391 dbm_open()
14392 ; return 0; }
14393 EOF
14394 if { (eval echo configure:14395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14395   rm -rf conftest*
14396   eval "ac_cv_lib_$ac_lib_var=yes"
14397 else
14398   echo "configure: failed program was:" >&5
14399   cat conftest.$ac_ext >&5
14400   rm -rf conftest*
14401   eval "ac_cv_lib_$ac_lib_var=no"
14402 fi
14403 rm -f conftest*
14404 xe_check_libs=""
14405
14406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14407   echo "$ac_t""yes" 1>&6
14408   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14409 else
14410   echo "$ac_t""no" 1>&6
14411 if test "$with_database_gdbm" = "yes"; then
14412      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14413    fi
14414    with_database_gdbm=no
14415 fi
14416
14417
14418 fi
14419
14420 if test "$with_database_dbm" != "no"; then
14421   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14422 echo "configure:14423: checking for dbm_open" >&5
14423
14424 cat > conftest.$ac_ext <<EOF
14425 #line 14426 "configure"
14426 #include "confdefs.h"
14427 /* System header to define __stub macros and hopefully few prototypes,
14428     which can conflict with char dbm_open(); below.  */
14429 #include <assert.h>
14430 /* Override any gcc2 internal prototype to avoid an error.  */
14431 /* We use char because int might match the return type of a gcc2
14432     builtin and then its argument prototype would still apply.  */
14433 char dbm_open();
14434
14435 int main() {
14436
14437 /* The GNU C library defines this for functions which it implements
14438     to always fail with ENOSYS.  Some functions are actually named
14439     something starting with __ and the normal name is an alias.  */
14440 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14441 choke me
14442 #else
14443 dbm_open();
14444 #endif
14445
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14449   rm -rf conftest*
14450   eval "ac_cv_func_dbm_open=yes"
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   eval "ac_cv_func_dbm_open=no"
14456 fi
14457 rm -f conftest*
14458
14459 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14460   echo "$ac_t""yes" 1>&6
14461   with_database_dbm=yes libdbm=
14462 else
14463   echo "$ac_t""no" 1>&6
14464
14465     
14466 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14467 echo "configure:14468: checking for dbm_open in -ldbm" >&5
14468 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14469
14470 xe_check_libs=" -ldbm "
14471 cat > conftest.$ac_ext <<EOF
14472 #line 14473 "configure"
14473 #include "confdefs.h"
14474 /* Override any gcc2 internal prototype to avoid an error.  */
14475 /* We use char because int might match the return type of a gcc2
14476     builtin and then its argument prototype would still apply.  */
14477 char dbm_open();
14478
14479 int main() {
14480 dbm_open()
14481 ; return 0; }
14482 EOF
14483 if { (eval echo configure:14484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14484   rm -rf conftest*
14485   eval "ac_cv_lib_$ac_lib_var=yes"
14486 else
14487   echo "configure: failed program was:" >&5
14488   cat conftest.$ac_ext >&5
14489   rm -rf conftest*
14490   eval "ac_cv_lib_$ac_lib_var=no"
14491 fi
14492 rm -f conftest*
14493 xe_check_libs=""
14494
14495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14496   echo "$ac_t""yes" 1>&6
14497   with_database_dbm=yes libdbm=-ldbm
14498 else
14499   echo "$ac_t""no" 1>&6
14500 test "$with_database_dbm" = "yes" && \
14501         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14502       with_database_dbm=no
14503 fi
14504
14505
14506 fi
14507
14508 fi
14509
14510 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14511 test "$with_database_gdbm" = "yes" -o \
14512      "$with_database_dbm"  = "yes" && \
14513   { test "$extra_verbose" = "yes" && cat << \EOF
14514     Defining HAVE_DBM
14515 EOF
14516 cat >> confdefs.h <<\EOF
14517 #define HAVE_DBM 1
14518 EOF
14519 }
14520
14521
14522 if test "$with_database_berkdb" != "no"; then
14523   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14524 echo "configure:14525: checking for Berkeley db.h" >&5
14525   for header in "db/db.h" "db.h"; do
14526     case "$opsys" in
14527         *freebsd*)
14528     cat > conftest.$ac_ext <<EOF
14529 #line 14530 "configure"
14530 #include "confdefs.h"
14531
14532 #include <stdlib.h>
14533 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14534 #ifdef HAVE_INTTYPES_H
14535 #define __BIT_TYPES_DEFINED__
14536 #include <inttypes.h>
14537 #endif
14538 #endif
14539 #include <$header>
14540
14541 int main() {
14542
14543 ; return 0; }
14544 EOF
14545 if { (eval echo configure:14546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14546   rm -rf conftest*
14547   db_h_file="$header"; break
14548 else
14549   echo "configure: failed program was:" >&5
14550   cat conftest.$ac_ext >&5
14551 fi
14552 rm -f conftest*
14553         ;;
14554         *)
14555     cat > conftest.$ac_ext <<EOF
14556 #line 14557 "configure"
14557 #include "confdefs.h"
14558
14559 #include <stdlib.h>
14560 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14561 #ifdef HAVE_INTTYPES_H
14562 #define __BIT_TYPES_DEFINED__
14563 #include <inttypes.h>
14564 typedef uint8_t  u_int8_t;
14565 typedef uint16_t u_int16_t;
14566 typedef uint32_t u_int32_t;
14567 #ifdef WE_DONT_NEED_QUADS
14568 typedef uint64_t u_int64_t;
14569 #endif
14570 #endif
14571 #endif
14572 #include <$header>
14573
14574 int main() {
14575
14576 ; return 0; }
14577 EOF
14578 if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14579   rm -rf conftest*
14580   db_h_file="$header"; break
14581 else
14582   echo "configure: failed program was:" >&5
14583   cat conftest.$ac_ext >&5
14584 fi
14585 rm -f conftest*
14586         ;;
14587         esac
14588   done
14589   if test -z "$db_h_file"
14590   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14591   else echo "$ac_t""$db_h_file" 1>&6
14592   fi
14593
14594   if test "$with_database_berkdb" != "no"; then
14595     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14596 echo "configure:14597: checking for Berkeley DB version" >&5
14597     cat > conftest.$ac_ext <<EOF
14598 #line 14599 "configure"
14599 #include "confdefs.h"
14600 #include <$db_h_file>
14601 #if DB_VERSION_MAJOR > 1
14602 yes
14603 #endif
14604
14605 EOF
14606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14607   egrep "yes" >/dev/null 2>&1; then
14608   rm -rf conftest*
14609   cat > conftest.$ac_ext <<EOF
14610 #line 14611 "configure"
14611 #include "confdefs.h"
14612 #include <$db_h_file>
14613 #if DB_VERSION_MAJOR > 2
14614 yes
14615 #endif
14616
14617 EOF
14618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14619   egrep "yes" >/dev/null 2>&1; then
14620   rm -rf conftest*
14621   echo "$ac_t""3" 1>&6; dbfunc=db_create
14622 else
14623   rm -rf conftest*
14624   
14625     echo "$ac_t""2" 1>&6; dbfunc=db_open
14626 fi
14627 rm -f conftest*
14628
14629 else
14630   rm -rf conftest*
14631   
14632     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14633 fi
14634 rm -f conftest*
14635
14636     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14637 echo "configure:14638: checking for $dbfunc" >&5
14638
14639 cat > conftest.$ac_ext <<EOF
14640 #line 14641 "configure"
14641 #include "confdefs.h"
14642 /* System header to define __stub macros and hopefully few prototypes,
14643     which can conflict with char $dbfunc(); below.  */
14644 #include <assert.h>
14645 /* Override any gcc2 internal prototype to avoid an error.  */
14646 /* We use char because int might match the return type of a gcc2
14647     builtin and then its argument prototype would still apply.  */
14648 char $dbfunc();
14649
14650 int main() {
14651
14652 /* The GNU C library defines this for functions which it implements
14653     to always fail with ENOSYS.  Some functions are actually named
14654     something starting with __ and the normal name is an alias.  */
14655 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14656 choke me
14657 #else
14658 $dbfunc();
14659 #endif
14660
14661 ; return 0; }
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14664   rm -rf conftest*
14665   eval "ac_cv_func_$dbfunc=yes"
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -rf conftest*
14670   eval "ac_cv_func_$dbfunc=no"
14671 fi
14672 rm -f conftest*
14673
14674 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14675   echo "$ac_t""yes" 1>&6
14676   with_database_berkdb=yes need_libdb=no
14677 else
14678   echo "$ac_t""no" 1>&6
14679
14680     
14681 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14682 echo "configure:14683: checking for $dbfunc in -ldb" >&5
14683 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14684
14685 xe_check_libs=" -ldb "
14686 cat > conftest.$ac_ext <<EOF
14687 #line 14688 "configure"
14688 #include "confdefs.h"
14689 /* Override any gcc2 internal prototype to avoid an error.  */
14690 /* We use char because int might match the return type of a gcc2
14691     builtin and then its argument prototype would still apply.  */
14692 char $dbfunc();
14693
14694 int main() {
14695 $dbfunc()
14696 ; return 0; }
14697 EOF
14698 if { (eval echo configure:14699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14699   rm -rf conftest*
14700   eval "ac_cv_lib_$ac_lib_var=yes"
14701 else
14702   echo "configure: failed program was:" >&5
14703   cat conftest.$ac_ext >&5
14704   rm -rf conftest*
14705   eval "ac_cv_lib_$ac_lib_var=no"
14706 fi
14707 rm -f conftest*
14708 xe_check_libs=""
14709
14710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14711   echo "$ac_t""yes" 1>&6
14712   with_database_berkdb=yes need_libdb=yes
14713 else
14714   echo "$ac_t""no" 1>&6
14715 fi
14716
14717
14718 fi
14719
14720   fi
14721
14722   if test "$with_database_berkdb" = "yes"; then
14723     { test "$extra_verbose" = "yes" && cat << EOF
14724     Defining DB_H_FILE = "$db_h_file"
14725 EOF
14726 cat >> confdefs.h <<EOF
14727 #define DB_H_FILE "$db_h_file"
14728 EOF
14729 }
14730
14731     { test "$extra_verbose" = "yes" && cat << \EOF
14732     Defining HAVE_BERKELEY_DB
14733 EOF
14734 cat >> confdefs.h <<\EOF
14735 #define HAVE_BERKELEY_DB 1
14736 EOF
14737 }
14738
14739     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14740   else with_database_berkdb=no
14741   fi
14742 fi
14743
14744 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14745      != "no no no"; then
14746   { test "$extra_verbose" = "yes" && cat << \EOF
14747     Defining HAVE_DATABASE
14748 EOF
14749 cat >> confdefs.h <<\EOF
14750 #define HAVE_DATABASE 1
14751 EOF
14752 }
14753
14754   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14755    echo "    xemacs will be linked with \"database.o\""
14756  fi
14757   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14758     { test "$extra_verbose" = "yes" && cat << \EOF
14759     Defining HAVE_CHISE
14760 EOF
14761 cat >> confdefs.h <<\EOF
14762 #define HAVE_CHISE 1
14763 EOF
14764 }
14765
14766   fi
14767 fi
14768
14769 if test "$with_socks" = "yes"; then
14770   
14771 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14772 echo "configure:14773: checking for SOCKSinit in -lsocks" >&5
14773 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14774
14775 xe_check_libs=" -lsocks "
14776 cat > conftest.$ac_ext <<EOF
14777 #line 14778 "configure"
14778 #include "confdefs.h"
14779 /* Override any gcc2 internal prototype to avoid an error.  */
14780 /* We use char because int might match the return type of a gcc2
14781     builtin and then its argument prototype would still apply.  */
14782 char SOCKSinit();
14783
14784 int main() {
14785 SOCKSinit()
14786 ; return 0; }
14787 EOF
14788 if { (eval echo configure:14789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14789   rm -rf conftest*
14790   eval "ac_cv_lib_$ac_lib_var=yes"
14791 else
14792   echo "configure: failed program was:" >&5
14793   cat conftest.$ac_ext >&5
14794   rm -rf conftest*
14795   eval "ac_cv_lib_$ac_lib_var=no"
14796 fi
14797 rm -f conftest*
14798 xe_check_libs=""
14799
14800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14801   echo "$ac_t""yes" 1>&6
14802     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14804   { test "$extra_verbose" = "yes" && cat << EOF
14805     Defining $ac_tr_lib
14806 EOF
14807 cat >> confdefs.h <<EOF
14808 #define $ac_tr_lib 1
14809 EOF
14810 }
14811
14812   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14813
14814 else
14815   echo "$ac_t""no" 1>&6
14816 fi
14817
14818
14819   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14820     Defining HAVE_SOCKS
14821 EOF
14822 cat >> confdefs.h <<\EOF
14823 #define HAVE_SOCKS 1
14824 EOF
14825 }
14826
14827 fi
14828
14829 if test "$usage_tracking" = "yes"; then
14830   { test "$extra_verbose" = "yes" && cat << \EOF
14831     Defining USAGE_TRACKING
14832 EOF
14833 cat >> confdefs.h <<\EOF
14834 #define USAGE_TRACKING 1
14835 EOF
14836 }
14837
14838   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14839 fi
14840
14841 if test "$with_modules" != "no"; then
14842   echo "checking for module support" 1>&6
14843 echo "configure:14844: checking for module support" >&5
14844
14845     if test "$with_msw" = "yes"; then
14846     have_dl=yes;
14847   else
14848         case "$opsys" in
14849       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14850     Defining HAVE_DYLD
14851 EOF
14852 cat >> confdefs.h <<\EOF
14853 #define HAVE_DYLD 1
14854 EOF
14855 }
14856  ;;
14857       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14858 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14859 echo "configure:14860: checking for dlfcn.h" >&5
14860
14861 cat > conftest.$ac_ext <<EOF
14862 #line 14863 "configure"
14863 #include "confdefs.h"
14864 #include <dlfcn.h>
14865 EOF
14866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14867 { (eval echo configure:14868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14869 if test -z "$ac_err"; then
14870   rm -rf conftest*
14871   eval "ac_cv_header_$ac_safe=yes"
14872 else
14873   echo "$ac_err" >&5
14874   echo "configure: failed program was:" >&5
14875   cat conftest.$ac_ext >&5
14876   rm -rf conftest*
14877   eval "ac_cv_header_$ac_safe=no"
14878 fi
14879 rm -f conftest*
14880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14881   echo "$ac_t""yes" 1>&6
14882   
14883            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14884 echo "configure:14885: checking for dlopen in -lc" >&5
14885            cat > conftest.$ac_ext <<EOF
14886 #line 14887 "configure"
14887 #include "confdefs.h"
14888 #include <dlfcn.h>
14889 int main() {
14890               dlopen ("", 0);
14891 ; return 0; }
14892 EOF
14893 if { (eval echo configure:14894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14894   rm -rf conftest*
14895    have_dl=yes 
14896 else
14897   echo "configure: failed program was:" >&5
14898   cat conftest.$ac_ext >&5
14899   rm -rf conftest*
14900   
14901                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14902 echo "configure:14903: checking for dlopen in -ldl" >&5
14903                ac_save_LIBS="$LIBS"
14904                LIBS="-ldl $LIBS"
14905                cat > conftest.$ac_ext <<EOF
14906 #line 14907 "configure"
14907 #include "confdefs.h"
14908 #include <dlfcn.h>
14909 int main() {
14910                  dlopen ("", 0);
14911 ; return 0; }
14912 EOF
14913 if { (eval echo configure:14914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14914   rm -rf conftest*
14915    have_dl=yes 
14916 else
14917   echo "configure: failed program was:" >&5
14918   cat conftest.$ac_ext >&5
14919   rm -rf conftest*
14920   LIBS="$ac_save_LIBS"
14921 fi
14922 rm -f conftest*
14923                ac_save_LIBS=
14924 fi
14925 rm -f conftest*
14926 else
14927   echo "$ac_t""no" 1>&6
14928 fi
14929
14930         if test -n "$have_dl"; then
14931            { test "$extra_verbose" = "yes" && cat << \EOF
14932     Defining HAVE_DLOPEN
14933 EOF
14934 cat >> confdefs.h <<\EOF
14935 #define HAVE_DLOPEN 1
14936 EOF
14937 }
14938
14939         else
14940            
14941 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14942 echo "configure:14943: checking for shl_load in -ldld" >&5
14943 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14944
14945 xe_check_libs=" -ldld "
14946 cat > conftest.$ac_ext <<EOF
14947 #line 14948 "configure"
14948 #include "confdefs.h"
14949 /* Override any gcc2 internal prototype to avoid an error.  */
14950 /* We use char because int might match the return type of a gcc2
14951     builtin and then its argument prototype would still apply.  */
14952 char shl_load();
14953
14954 int main() {
14955 shl_load()
14956 ; return 0; }
14957 EOF
14958 if { (eval echo configure:14959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14959   rm -rf conftest*
14960   eval "ac_cv_lib_$ac_lib_var=yes"
14961 else
14962   echo "configure: failed program was:" >&5
14963   cat conftest.$ac_ext >&5
14964   rm -rf conftest*
14965   eval "ac_cv_lib_$ac_lib_var=no"
14966 fi
14967 rm -f conftest*
14968 xe_check_libs=""
14969
14970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14971   echo "$ac_t""yes" 1>&6
14972   libdl=dld have_dl=yes;
14973            { test "$extra_verbose" = "yes" && cat << \EOF
14974     Defining HAVE_SHL_LOAD
14975 EOF
14976 cat >> confdefs.h <<\EOF
14977 #define HAVE_SHL_LOAD 1
14978 EOF
14979 }
14980
14981 else
14982   echo "$ac_t""no" 1>&6
14983
14984 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14985 echo "configure:14986: checking for dld_init in -ldld" >&5
14986 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14987
14988 xe_check_libs=" -ldld "
14989 cat > conftest.$ac_ext <<EOF
14990 #line 14991 "configure"
14991 #include "confdefs.h"
14992 /* Override any gcc2 internal prototype to avoid an error.  */
14993 /* We use char because int might match the return type of a gcc2
14994     builtin and then its argument prototype would still apply.  */
14995 char dld_init();
14996
14997 int main() {
14998 dld_init()
14999 ; return 0; }
15000 EOF
15001 if { (eval echo configure:15002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15002   rm -rf conftest*
15003   eval "ac_cv_lib_$ac_lib_var=yes"
15004 else
15005   echo "configure: failed program was:" >&5
15006   cat conftest.$ac_ext >&5
15007   rm -rf conftest*
15008   eval "ac_cv_lib_$ac_lib_var=no"
15009 fi
15010 rm -f conftest*
15011 xe_check_libs=""
15012
15013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15014   echo "$ac_t""yes" 1>&6
15015   libdl=dld have_dl=yes;
15016            { test "$extra_verbose" = "yes" && cat << \EOF
15017     Defining HAVE_DLD_INIT
15018 EOF
15019 cat >> confdefs.h <<\EOF
15020 #define HAVE_DLD_INIT 1
15021 EOF
15022 }
15023
15024 else
15025   echo "$ac_t""no" 1>&6
15026 fi
15027
15028
15029 fi
15030
15031
15032         fi
15033     ;;
15034     esac
15035   fi 
15036   if test -n "$have_dl"; then
15037         
15038 dll_ld=
15039 dll_ldflags=
15040 dll_cflags=
15041 dll_post=
15042 dll_ldo="-o"
15043 ld_dynamic_link_flags=
15044 xehost=$canonical
15045 xealias=$internal_configuration
15046
15047 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
15048 echo "configure:15049: checking how to build dynamic libraries for ${xehost}" >&5
15049 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
15050 case "$xehost" in
15051 *-*-linux-gnu*) ;;
15052 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
15053 esac
15054
15055 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
15056 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
15057 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
15058
15059 case "$xehost_os" in
15060 aix3*)
15061   # AIX sometimes has problems with the GCC collect2 program.  For some
15062   # reason, if we set the COLLECT_NAMES environment variable, the problems
15063   # vanish in a puff of smoke.
15064   if test "${COLLECT_NAMES+set}" != set; then
15065     COLLECT_NAMES=
15066     export COLLECT_NAMES
15067   fi
15068   ;;
15069 esac
15070
15071 # Now see if the compiler is really GCC.
15072 if test "$GCC" = "yes"; then
15073   XEGCC=yes
15074 else
15075   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
15076 echo "configure:15077: checking checking whether we are using GNU C" >&5
15077   cat > conftest.$ac_ext <<EOF
15078 #line 15079 "configure"
15079 #include "confdefs.h"
15080
15081 #ifdef __GNUC__
15082   yes;
15083 #endif
15084
15085 EOF
15086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15087   egrep "yes" >/dev/null 2>&1; then
15088   rm -rf conftest*
15089   XEGCC=yes
15090 else
15091   rm -rf conftest*
15092   XEGCC=no
15093 fi
15094 rm -f conftest*
15095
15096   echo "$ac_t""${XEGCC}" 1>&6
15097 fi
15098
15099 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
15100 echo "configure:15101: checking how to produce PIC code" >&5
15101 wl=
15102
15103 can_build_shared=yes
15104 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15105   wl='-Wl,'
15106
15107   case "$xehost_os" in
15108   aix[3-9]* | irix[5-9]* | osf[3-9])
15109     # PIC is the default for these OSes.
15110     ;;
15111
15112   os2*)
15113     # We can build DLLs from non-PIC.
15114     ;;
15115   amigaos*)
15116     # FIXME: we need at least 68020 code to build shared libraries, but
15117     # adding the `-m68020' flag to GCC prevents building anything better,
15118     # like `-m68040'.
15119     dll_cflags='-m68020 -resident32 -malways-restore-a4'
15120     ;;
15121   *cygwin* | *mingw* )
15122     # PIC is the default
15123     ;;
15124   *)
15125     dll_cflags='-fPIC'
15126     ;;
15127   esac
15128 else
15129   # PORTME Check for PIC flags for the system compiler.
15130   case "$xehost_os" in
15131   hpux9* | hpux1[0-9]*)
15132     # Is there a better link_static_flag that works with the bundled CC?
15133     wl='-Wl,'
15134     dll_cflags='+Z'
15135     ;;
15136
15137   irix[5-9]*)
15138     wl='-Wl,'
15139     # PIC (with -KPIC) is the default.
15140     ;;
15141
15142   os2*)
15143     # We can build DLLs from non-PIC.
15144     ;;
15145
15146   osf[3-9]*)
15147     # All OSF/1 code is PIC.
15148     wl='-Wl,'
15149     ;;
15150
15151   aix[3-9]*)
15152     # All AIX code is PIC.
15153     wl='-Wl,'
15154     ;;
15155
15156   sco3.2v5*)
15157     dll_cflags='-belf -Kpic'
15158     wl='-Wl,'
15159     ;;
15160
15161   unixware*)
15162     dll_cflags="-KPIC"
15163     wl="-Wl,"
15164     ;;
15165
15166   sysv4*)
15167     dll_cflags="-KPIC"
15168     wl="-Wl,"
15169     ;;
15170
15171   sysv5*)
15172     dll_cflags="-KPIC"
15173     wl="-Wl,"
15174     ;;
15175
15176   solaris2*)
15177     dll_cflags='-KPIC'
15178     wl='-Wl,'
15179     ;;
15180
15181   sunos4*)
15182     dll_cflags='-PIC'
15183     wl='-Qoption ld '
15184     ;;
15185
15186   uts4*)
15187     dll_cflags='-pic'
15188     ;;
15189
15190   *)
15191     can_build_shared=no
15192     ;;
15193   esac
15194 fi
15195
15196 if test -n "$dll_cflags"; then
15197   echo "$ac_t""${dll_cflags}" 1>&6
15198
15199   # Check to make sure the dll_cflags actually works.
15200   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15201 echo "configure:15202: checking if PIC flag ${dll_cflags} really works" >&5
15202   save_CFLAGS="$CFLAGS"
15203   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15204   cat > conftest.$ac_ext <<EOF
15205 #line 15206 "configure"
15206 #include "confdefs.h"
15207
15208 int main() {
15209 int x=0;
15210 ; return 0; }
15211 EOF
15212 if { (eval echo configure:15213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15213   rm -rf conftest*
15214   
15215     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15216     # reports no error.  So, we need to grep stderr for (Bundled).
15217     if grep '(Bundled)' config.log >/dev/null; then
15218       echo "$ac_t""no" 1>&6
15219       can_build_shared=no
15220       dll_cflags=
15221     else
15222       echo "$ac_t""yes" 1>&6
15223     fi
15224 else
15225   echo "configure: failed program was:" >&5
15226   cat conftest.$ac_ext >&5
15227   rm -rf conftest*
15228   echo "$ac_t""no" 1>&6
15229     can_build_shared=no
15230     dll_cflags=
15231 fi
15232 rm -f conftest*
15233   CFLAGS="$save_CFLAGS"
15234 else
15235   echo "$ac_t""none" 1>&6
15236 fi
15237
15238 if test "$can_build_shared" = "yes"; then
15239 cc_produces_so=no
15240 xldf=
15241 xcldf=
15242 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15243 echo "configure:15244: checking if C compiler can produce shared libraries" >&5
15244 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15245   xcldf="-shared"
15246   xldf="-shared"
15247 else # Not using GCC
15248   case "$xehost_os" in
15249     aix[3-9]*)
15250       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15251       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15252       ;;
15253
15254     freebsd2* | netbsd* | openbsd*)
15255       xldf="-Bshareable"
15256       xcldf="${wl}-Bshareable"
15257       ;;
15258
15259     freebsd3*)
15260       xcldf="-shared"
15261       ;;
15262
15263     hpux*)
15264       xldf="-b +s"
15265       xcldf="${wl}-b ${wl}+s"
15266       ;;
15267
15268     irix[5-9]* | osf[3-9]*)
15269       xcldf="${wl}-shared"
15270       xldf="-shared"
15271       ;;
15272
15273     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15274       xcldf="-G"
15275       xldf="-G"
15276       ;;
15277
15278     sunos4*)
15279       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15280       xldf="-assert pure-text -Bstatic"
15281       ;;
15282   esac
15283 fi # End if if we are using gcc
15284
15285 if test -n "$xcldf"; then
15286   save_LDFLAGS=$LDFLAGS
15287   save_LIBS=$LIBS
15288   save_xe_libs=$xe_libs
15289   LDFLAGS="$xcldf $LDFLAGS"
15290   LIBS=
15291   xe_libs=
15292   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15293   cat > conftest.$ac_ext <<EOF
15294 #line 15295 "configure"
15295 #include "confdefs.h"
15296
15297 int main() {
15298 int x=0;
15299 ; return 0; }
15300 EOF
15301 if { (eval echo configure:15302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15302   rm -rf conftest*
15303   cc_produces_so=yes
15304 else
15305   echo "configure: failed program was:" >&5
15306   cat conftest.$ac_ext >&5
15307   rm -rf conftest*
15308   cc_produces_so=no
15309 fi
15310 rm -f conftest*
15311   LDFLAGS=$save_LDFLAGS
15312   LIBS=$save_LIBS
15313   xe_libs=$save_xe_libs
15314   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15315 else
15316   cc_produces_so=no
15317 fi
15318 echo "$ac_t""${cc_produces_so}" 1>&6
15319
15320 LTLD=$LD
15321 if test -z "$LTLD"; then
15322   ac_prog=ld
15323   if test "$XEGCC" = yes; then
15324     # Check if gcc -print-prog-name=ld gives a path.
15325     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15326 echo "configure:15327: checking for ld used by GCC" >&5
15327     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15328     case "$ac_prog" in
15329     # Accept absolute paths.
15330     /*)
15331       if test -z "$LTLD"; then
15332 #        case "$ac_prog" in
15333 #          *gcc-lib*) LTLD="$CC"
15334 #                     ;;
15335 #          *)
15336          LTLD="$ac_prog"
15337 #                     ;;
15338 #        esac
15339       fi
15340       ;;
15341     "")
15342       # If it fails, then pretend we aren't using GCC.
15343       ac_prog=ld
15344       ;;
15345     *)
15346       # If it is relative, then search for the first ld in PATH.
15347       with_gnu_ld=unknown
15348       ;;
15349     esac
15350   else
15351     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15352 echo "configure:15353: checking for GNU ld" >&5
15353   fi
15354
15355   if test -z "$LTLD"; then
15356     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15357     for ac_dir in $PATH; do
15358       test -z "$ac_dir" && ac_dir=.
15359       if test -f "$ac_dir/$ac_prog"; then
15360         LTLD="$ac_dir/$ac_prog"
15361         # Check to see if the program is GNU ld.  I'd rather use --version,
15362         # but apparently some GNU ld's only accept -v.
15363         # Break only if it was the GNU/non-GNU ld that we prefer.
15364         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15365           xe_gnu_ld=yes
15366         else
15367           xe_gnu_ld=no
15368         fi
15369       fi
15370     done
15371     IFS="$ac_save_ifs"
15372   fi
15373
15374   if test -n "$LTLD"; then
15375     echo "$ac_t""${LTLD}" 1>&6
15376   else
15377     echo "$ac_t""no" 1>&6
15378   fi
15379
15380   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15381     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15382     exit 1
15383   fi
15384 fi
15385
15386 ld_dynamic_link_flags=
15387
15388 # Check to see if it really is or isn't GNU ld.
15389 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15390 echo "configure:15391: checking if the linker is GNU ld" >&5
15391 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15392 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15393   xe_gnu_ld=yes
15394 else
15395   xe_gnu_ld=no
15396 fi
15397 echo "$ac_t""${xe_gnu_ld}" 1>&6
15398
15399 case "$xehost_os" in
15400   amigaos* | sunos4*)
15401     # On these operating systems, we should treat GNU ld like the system ld.
15402     gnu_ld_acts_native=yes
15403     ;;
15404   *)
15405     gnu_ld_acts_native=no
15406     ;;
15407 esac
15408
15409 if test "$cc_produces_so" = "yes"; then
15410   dll_ld=$CC
15411   dll_ldflags=$xcldf
15412   can_build_shared=yes
15413   ld_shlibs=yes
15414 else
15415   # OK - only NOW do we futz about with ld.
15416   # See if the linker supports building shared libraries.
15417   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15418 echo "configure:15419: checking whether the linker supports shared libraries" >&5
15419   dll_ld=$CC
15420   dll_ldflags=$LDFLAGS
15421   ld_shlibs=yes
15422   can_build_shared=yes
15423   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15424     # See if GNU ld supports shared libraries.
15425     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15426       dll_ld=$CC
15427       dll_ldflags="-shared"
15428       ld_shlibs=yes
15429     else
15430       ld_shlibs=no
15431     fi
15432   else
15433     # PORTME fill in a description of your system's linker (not GNU ld)
15434     case "$xehost_os" in
15435     aix3*)
15436       dll_ld=$LTLD
15437       dll_ldflags=$xldf
15438       ;;
15439
15440     aix[4-9]*)
15441       dll_ldflags=$xcldf
15442       ;;
15443
15444     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15445     # support.  Future versions do this automatically, but an explicit c++rt0.o
15446     # doesn't break anything, and helps significantly (at the cost of a little
15447     # extra space).
15448     freebsd2.2*)
15449       dll_ld=$LTLD
15450       dll_ldflags=$xldf
15451       dll_post="/usr/lib/c++rt0.o"
15452       ;;
15453
15454     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15455     freebsd2*)
15456       dll_ld=$LTLD
15457       dll_ldflags="-Bshareable"
15458       ;;
15459
15460     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15461     freebsd3*)
15462       dll_ldflags="-shared"
15463       ;;
15464
15465     hpux*)
15466       dll_ld=$LTLD
15467       dll_ldflags=$xldf
15468       ;;
15469
15470     irix[5-9]*)
15471       dll_ld=$LTLD
15472       dll_ldflags=$xldf
15473       ;;
15474
15475     netbsd*)
15476       # Tested with NetBSD 1.2 ld
15477       dll_ld=$LTLD
15478       dll_ldflags=$xldf
15479       ;;
15480
15481     openbsd*)
15482       dll_ld=$LTLD
15483       dll_ldflags=$xldf
15484       ;;
15485
15486     osf3* | osf4*)
15487       dll_ld=$LTLD
15488       dll_ldflags=$xldf
15489       ;;
15490
15491     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15492     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15493       dll_ld=$LTLD
15494       case "$dll_ld" in
15495         *gcc*) dll_ldflags="-shared"
15496                dll_ld=$CC
15497                ;;
15498         *)     dll_ldflags="-G"
15499                ;;
15500       esac
15501       ;;
15502
15503     sunos4*)
15504       if test "$XEGCC" = yes; then
15505         dll_ld=$CC
15506       else
15507         dll_ld=$LTLD
15508       fi
15509       dll_ldflags=$xldf
15510       ;;
15511
15512     uts4*)
15513       dll_ld=$LTLD
15514       dll_ldflags="-G"
15515       ;;
15516
15517     bsdi*)
15518       dll_ldflags="-r"
15519       dll_ld="shlicc2"
15520       ;;
15521
15522     *)
15523       ld_shlibs=no
15524       can_build_shared=no
15525       ;;
15526     esac
15527   fi
15528   echo "$ac_t""${ld_shlibs}" 1>&6
15529   if test "$ld_shlibs" = "no"; then
15530     can_build_shared=no
15531   fi
15532 fi # End of if cc_produces_so = no
15533
15534
15535 if test "$xe_gnu_ld" = yes; then
15536   if test "$ld_shlibs" = yes; then
15537     ld_dynamic_link_flags="${wl}-export-dynamic"
15538   fi
15539 fi
15540
15541 if test -z "$ld_dynamic_link_flags"; then
15542   case "$xehost_os" in
15543   aix[3-9]*)
15544     ld_dynamic_link_flags=
15545     ;;
15546
15547   freebsd2.2*)
15548     ld_dynamic_link_flags=
15549     ;;
15550
15551   freebsd2*)
15552     ld_dynamic_link_flags=
15553     ;;
15554
15555   freebsd3*)
15556     ld_dynamic_link_flags=
15557     ;;
15558
15559   hpux*)
15560     ld_dynamic_link_flags="${wl}-E"
15561     ;;
15562
15563   irix[5-9]*)
15564     ld_dynamic_link_flags=
15565     ;;
15566
15567   netbsd*)
15568     ld_dynamic_link_flags=
15569     ;;
15570
15571   openbsd*)
15572     ld_dynamic_link_flags=
15573     ;;
15574
15575   osf3* | osf4*)
15576     ld_dynamic_link_flags=
15577     ;;
15578
15579   solaris2* | solaris7*)
15580     ld_dynamic_link_flags=
15581     ;;
15582
15583   sco3.2v5* | unixware* | sysv5* | sysv4*)
15584     ld_dynamic_link_flags="${wl}-Bexport"
15585     ;;
15586
15587   sunos4*)
15588     ld_dynamic_link_flags=
15589     ;;
15590
15591   uts4*)
15592     ld_dynamic_link_flags=
15593     ;;
15594
15595   bsdi*)
15596     ld_dynamic_link_flags=
15597     ;;
15598
15599   esac
15600 fi # End of if -z ld_dynamic_link_flags
15601 fi # End of if test "$can_build_shared" = "yes"
15602
15603
15604
15605
15606
15607
15608
15609
15610   fi
15611
15612   if test "$can_build_shared" = "yes"; then
15613     { test "$extra_verbose" = "yes" && cat << \EOF
15614     Defining HAVE_SHLIB
15615 EOF
15616 cat >> confdefs.h <<\EOF
15617 #define HAVE_SHLIB 1
15618 EOF
15619 }
15620
15621     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15622    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15623  fi
15624     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15625     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15626     for ac_func in dlerror _dlerror
15627 do
15628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15629 echo "configure:15630: checking for $ac_func" >&5
15630
15631 cat > conftest.$ac_ext <<EOF
15632 #line 15633 "configure"
15633 #include "confdefs.h"
15634 /* System header to define __stub macros and hopefully few prototypes,
15635     which can conflict with char $ac_func(); below.  */
15636 #include <assert.h>
15637 /* Override any gcc2 internal prototype to avoid an error.  */
15638 /* We use char because int might match the return type of a gcc2
15639     builtin and then its argument prototype would still apply.  */
15640 char $ac_func();
15641
15642 int main() {
15643
15644 /* The GNU C library defines this for functions which it implements
15645     to always fail with ENOSYS.  Some functions are actually named
15646     something starting with __ and the normal name is an alias.  */
15647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15648 choke me
15649 #else
15650 $ac_func();
15651 #endif
15652
15653 ; return 0; }
15654 EOF
15655 if { (eval echo configure:15656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15656   rm -rf conftest*
15657   eval "ac_cv_func_$ac_func=yes"
15658 else
15659   echo "configure: failed program was:" >&5
15660   cat conftest.$ac_ext >&5
15661   rm -rf conftest*
15662   eval "ac_cv_func_$ac_func=no"
15663 fi
15664 rm -f conftest*
15665
15666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15667   echo "$ac_t""yes" 1>&6
15668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15669   { test "$extra_verbose" = "yes" && cat << EOF
15670     Defining $ac_tr_func
15671 EOF
15672 cat >> confdefs.h <<EOF
15673 #define $ac_tr_func 1
15674 EOF
15675 }
15676  
15677 else
15678   echo "$ac_t""no" 1>&6
15679 fi
15680 done
15681
15682     with_modules=yes
15683   else
15684     if test "$with_modules" = "yes"; then
15685       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15686     else
15687       echo "configure: warning: "Module support cannot be provided."" 1>&2
15688     fi
15689     with_modules=no
15690   fi
15691 fi
15692
15693 cat > conftest.$ac_ext <<EOF
15694 #line 15695 "configure"
15695 #include "confdefs.h"
15696 int main(int c,char *v[]){return 0;}
15697 EOF
15698 if { (eval echo configure:15699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15699 then
15700   :
15701 else
15702   conftest_rc="$?"
15703   echo "configure: failed program was:" >&5
15704   cat conftest.$ac_ext >&5
15705   rm -fr conftest*
15706   
15707   echo ""
15708   echo "*** PANIC *** configure forgot how to build working executables!"
15709   echo ""
15710   echo "*** This is most commonly due to an unforeseen environment, causing"
15711   echo "*** configure to incorrectly compute the sequence of libraries to link."
15712   echo "*** Please examine the tail of config.log for runtime errors."
15713   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15714   echo "*** Often adding or removing explicit options in the configure"
15715   echo "*** invocation can work around this kind of problem.  If so, please"
15716   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15717   echo "***"
15718   echo "*** Other possible causes are inability to write to the file system"
15719   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15720   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15721   echo "*** necessary.  On other systems, try telling configure where to find"
15722   echo "*** the shared libraries using the --site-runtime-libraries option."
15723   echo "***"
15724   echo "*** Another way to shoot yourself in the foot is to specify"
15725   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15726   echo "*** system.  Don't do that."
15727   exit 1
15728 fi
15729 rm -fr conftest*
15730
15731 if test "$win32_processes" = "yes"; then
15732   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15733    echo "    xemacs will be linked with \"process-nt.o\""
15734  fi
15735 else
15736   { test "$extra_verbose" = "yes" && cat << \EOF
15737     Defining HAVE_UNIX_PROCESSES
15738 EOF
15739 cat >> confdefs.h <<\EOF
15740 #define HAVE_UNIX_PROCESSES 1
15741 EOF
15742 }
15743
15744   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15745    echo "    xemacs will be linked with \"process-unix.o\""
15746  fi
15747 fi
15748
15749
15750
15751 T=""
15752 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15753 CFLAGS="$T"
15754
15755
15756 T=""
15757 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15758 extra_objs="$T"
15759
15760
15761 T=""
15762 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
15763 c_switch_general="$T"
15764
15765
15766 T=""
15767 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
15768 c_switch_window_system="$T"
15769
15770
15771 T=""
15772 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15773 c_switch_all="$T"
15774
15775
15776 T=""
15777 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
15778 ld_switch_general="$T"
15779
15780
15781 T=""
15782 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15783 ld_switch_window_system="$T"
15784
15785
15786 T=""
15787 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15788 ld_switch_all="$T"
15789
15790
15791 T=""
15792 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15793 ld_libs_general="$T"
15794
15795
15796 T=""
15797 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
15798 ld_libs_window_system="$T"
15799
15800
15801 T=""
15802 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15803 ld_libs_all="$T"
15804
15805
15806
15807 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15808 internal_makefile_list="Makefile.in"
15809 SUBDIR_MAKEFILES=''
15810 test -d lock || mkdir lock
15811 for dir in $MAKE_SUBDIR; do
15812   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15813         test -d "$d" || mkdir "$d"; cd "$d"
15814       done ) ;;
15815    * ) test -d "$dir" || mkdir "$dir" ;;
15816   esac
15817   
15818 T=""
15819 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15820 SUBDIR_MAKEFILES="$T"
15821
15822   
15823 T=""
15824 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15825 internal_makefile_list="$T"
15826
15827 done
15828
15829
15830
15831
15832 for dir in src/s src/m; do
15833   if test ! -d "$dir" ; then
15834     echo Making symbolic link to "$srcdir/$dir"
15835     ${LN_S} "$srcdir/$dir" "$dir"
15836   fi
15837 done
15838
15839 if test "$extra_verbose" = "yes"; then
15840   echo ""
15841   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
15842   echo ""
15843 fi
15844
15845
15846 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15847   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15848   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15849 fi
15850
15851 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15852   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15853   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15854 fi
15855
15856 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15857   test "$extra_verbose" = "yes" && echo "creating TAGS"
15858   echo "\f
15859 $srcdir/TAGS,include" > "TAGS"
15860 fi
15861
15862 if test "$__SUNPRO_C" = "yes"; then
15863   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15864   ( echo "# For use with Sun WorkShop's Source browser."
15865     echo "# See sbquery(1) and sbinit(4) for more information"
15866     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15867   ) > .sbinit
15868 fi
15869
15870 rm -f core
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891 PREFIX=$prefix
15892 while true; do
15893   case "$PREFIX" in
15894     *\$* ) eval "PREFIX=$PREFIX" ;;
15895     *) break ;;
15896   esac
15897 done
15898
15899
15900
15901
15902 EXEC_PREFIX=$exec_prefix
15903 while true; do
15904   case "$EXEC_PREFIX" in
15905     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15906     *) break ;;
15907   esac
15908 done
15909
15910
15911
15912
15913 INFODIR=$infodir
15914 while true; do
15915   case "$INFODIR" in
15916     *\$* ) eval "INFODIR=$INFODIR" ;;
15917     *) break ;;
15918   esac
15919 done
15920
15921
15922
15923
15924 INFOPATH=$infopath
15925 while true; do
15926   case "$INFOPATH" in
15927     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15928     *) break ;;
15929   esac
15930 done
15931
15932
15933
15934
15935 PACKAGE_PATH=$package_path
15936 while true; do
15937   case "$PACKAGE_PATH" in
15938     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15939     *) break ;;
15940   esac
15941 done
15942
15943
15944
15945
15946 LISPDIR=$lispdir
15947 while true; do
15948   case "$LISPDIR" in
15949     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15950     *) break ;;
15951   esac
15952 done
15953
15954
15955
15956
15957 MODULEDIR=$moduledir
15958 while true; do
15959   case "$MODULEDIR" in
15960     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15961     *) break ;;
15962   esac
15963 done
15964
15965
15966
15967
15968 SITELISPDIR=$sitelispdir
15969 while true; do
15970   case "$SITELISPDIR" in
15971     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15972     *) break ;;
15973   esac
15974 done
15975
15976
15977
15978
15979 SITEMODULEDIR=$sitemoduledir
15980 while true; do
15981   case "$SITEMODULEDIR" in
15982     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15983     *) break ;;
15984   esac
15985 done
15986
15987
15988
15989
15990 ETCDIR=$etcdir
15991 while true; do
15992   case "$ETCDIR" in
15993     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15994     *) break ;;
15995   esac
15996 done
15997
15998
15999
16000
16001 DOCDIR=$docdir
16002 while true; do
16003   case "$DOCDIR" in
16004     *\$* ) eval "DOCDIR=$DOCDIR" ;;
16005     *) break ;;
16006   esac
16007 done
16008
16009
16010
16011
16012 ARCHLIBDIR=$archlibdir
16013 while true; do
16014   case "$ARCHLIBDIR" in
16015     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
16016     *) break ;;
16017   esac
16018 done
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
16040
16041
16042
16043
16044
16045
16046
16047 : ${XEMACS_CC:=$CC}
16048
16049
16050 if test "$with_prefix" = "yes"; then
16051   { test "$extra_verbose" = "yes" && cat << \EOF
16052     Defining PREFIX_USER_DEFINED
16053 EOF
16054 cat >> confdefs.h <<\EOF
16055 #define PREFIX_USER_DEFINED 1
16056 EOF
16057 }
16058
16059 fi
16060
16061 if test "$with_site_lisp" = "no"; then
16062   { test "$extra_verbose" = "yes" && cat << \EOF
16063     Defining INHIBIT_SITE_LISP
16064 EOF
16065 cat >> confdefs.h <<\EOF
16066 #define INHIBIT_SITE_LISP 1
16067 EOF
16068 }
16069
16070 fi
16071 if test "$with_site_modules" = "no"; then
16072   { test "$extra_verbose" = "yes" && cat << \EOF
16073     Defining INHIBIT_SITE_MODULES
16074 EOF
16075 cat >> confdefs.h <<\EOF
16076 #define INHIBIT_SITE_MODULES 1
16077 EOF
16078 }
16079
16080 fi
16081
16082
16083 T=""
16084 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16085 ac_configure_args="$T"
16086
16087 { test "$extra_verbose" = "yes" && cat << EOF
16088     Defining EMACS_CONFIGURATION = "$configuration"
16089 EOF
16090 cat >> confdefs.h <<EOF
16091 #define EMACS_CONFIGURATION "$configuration"
16092 EOF
16093 }
16094
16095 { test "$extra_verbose" = "yes" && cat << EOF
16096     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
16097 EOF
16098 cat >> confdefs.h <<EOF
16099 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
16100 EOF
16101 }
16102
16103
16104
16105 null_string=""
16106 { test "$extra_verbose" = "yes" && cat << EOF
16107     Defining LD_SWITCH_X_SITE = $null_string
16108 EOF
16109 cat >> confdefs.h <<EOF
16110 #define LD_SWITCH_X_SITE $null_string
16111 EOF
16112 }
16113
16114 { test "$extra_verbose" = "yes" && cat << EOF
16115     Defining LD_SWITCH_X_SITE_AUX = $null_string
16116 EOF
16117 cat >> confdefs.h <<EOF
16118 #define LD_SWITCH_X_SITE_AUX $null_string
16119 EOF
16120 }
16121
16122 { test "$extra_verbose" = "yes" && cat << EOF
16123     Defining C_SWITCH_X_SITE = $null_string
16124 EOF
16125 cat >> confdefs.h <<EOF
16126 #define C_SWITCH_X_SITE $null_string
16127 EOF
16128 }
16129
16130 { test "$extra_verbose" = "yes" && cat << EOF
16131     Defining LD_SWITCH_SITE = $null_string
16132 EOF
16133 cat >> confdefs.h <<EOF
16134 #define LD_SWITCH_SITE $null_string
16135 EOF
16136 }
16137
16138 { test "$extra_verbose" = "yes" && cat << EOF
16139     Defining C_SWITCH_SITE = $null_string
16140 EOF
16141 cat >> confdefs.h <<EOF
16142 #define C_SWITCH_SITE $null_string
16143 EOF
16144 }
16145
16146
16147
16148 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16149     Defining GNU_MALLOC
16150 EOF
16151 cat >> confdefs.h <<\EOF
16152 #define GNU_MALLOC 1
16153 EOF
16154 }
16155
16156 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16157     Defining USE_SYSTEM_MALLOC
16158 EOF
16159 cat >> confdefs.h <<\EOF
16160 #define USE_SYSTEM_MALLOC 1
16161 EOF
16162 }
16163
16164 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16165     Defining USE_DEBUG_MALLOC
16166 EOF
16167 cat >> confdefs.h <<\EOF
16168 #define USE_DEBUG_MALLOC 1
16169 EOF
16170 }
16171
16172                                               { test "$extra_verbose" = "yes" && cat << \EOF
16173     Defining USE_SYSTEM_MALLOC
16174 EOF
16175 cat >> confdefs.h <<\EOF
16176 #define USE_SYSTEM_MALLOC 1
16177 EOF
16178 }
16179
16180 fi
16181 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16182     Defining I18N3
16183 EOF
16184 cat >> confdefs.h <<\EOF
16185 #define I18N3 1
16186 EOF
16187 }
16188
16189 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16190     Defining USE_GCC
16191 EOF
16192 cat >> confdefs.h <<\EOF
16193 #define USE_GCC 1
16194 EOF
16195 }
16196
16197 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16198     Defining EXTERNAL_WIDGET
16199 EOF
16200 cat >> confdefs.h <<\EOF
16201 #define EXTERNAL_WIDGET 1
16202 EOF
16203 }
16204
16205 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16206     Defining QUICK_BUILD
16207 EOF
16208 cat >> confdefs.h <<\EOF
16209 #define QUICK_BUILD 1
16210 EOF
16211 }
16212
16213 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16214     Defining PURIFY
16215 EOF
16216 cat >> confdefs.h <<\EOF
16217 #define PURIFY 1
16218 EOF
16219 }
16220
16221 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16222     Defining QUANTIFY
16223 EOF
16224 cat >> confdefs.h <<\EOF
16225 #define QUANTIFY 1
16226 EOF
16227 }
16228
16229 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16230     Defining MAIL_USE_POP
16231 EOF
16232 cat >> confdefs.h <<\EOF
16233 #define MAIL_USE_POP 1
16234 EOF
16235 }
16236
16237 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16238     Defining KERBEROS
16239 EOF
16240 cat >> confdefs.h <<\EOF
16241 #define KERBEROS 1
16242 EOF
16243 }
16244
16245 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16246     Defining HESIOD
16247 EOF
16248 cat >> confdefs.h <<\EOF
16249 #define HESIOD 1
16250 EOF
16251 }
16252
16253 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16254     Defining USE_UNION_TYPE
16255 EOF
16256 cat >> confdefs.h <<\EOF
16257 #define USE_UNION_TYPE 1
16258 EOF
16259 }
16260
16261 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16262     Defining REGEX_MALLOC
16263 EOF
16264 cat >> confdefs.h <<\EOF
16265 #define REGEX_MALLOC 1
16266 EOF
16267 }
16268
16269 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16270     Defining PDUMP
16271 EOF
16272 cat >> confdefs.h <<\EOF
16273 #define PDUMP 1
16274 EOF
16275 }
16276
16277 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16278     Defining IPV6_CANONICALIZE
16279 EOF
16280 cat >> confdefs.h <<\EOF
16281 #define IPV6_CANONICALIZE 1
16282 EOF
16283 }
16284
16285
16286
16287 (
16288 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16289 else
16290   echo "uname -a: `uname -a`"
16291 fi
16292 echo ""
16293 echo "$0 $quoted_arguments"
16294 ) > Installation
16295
16296 if test ! -z ${emacs_beta_version} ; then
16297   if test -z "${emacs_is_beta}" ; then
16298         xemacs_betaname=".${emacs_beta_version}"
16299   else
16300         xemacs_betaname="-b${emacs_beta_version}"
16301   fi
16302 else
16303   xemacs_betaname=""
16304 fi
16305
16306 (
16307 echo "
16308
16309 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16310 "
16311 echo "
16312 Compilation / Installation:"
16313 echo "  Source code location:              $srcdir"
16314 echo "  Installation prefix:               $prefix"
16315 if test -n "$site_includes"; then
16316   echo "  Additional header files:           $site_includes"
16317 fi
16318 if test -n "$site_libraries"; then
16319   echo "  Additional libraries:              $site_libraries"
16320 fi
16321 if test -n "$site_prefixes"; then
16322   echo "  Additional prefixes:               $site_prefixes"
16323 fi
16324 if test -n "$runpath"; then
16325   echo "  Runtime library search path:       $runpath"
16326 fi
16327
16328 if test -n "$opsysfile"
16329 then echo "  Operating system description file: \`$opsysfile'"
16330 else echo "  Not using any operating system description file"
16331 fi
16332 if test -n "$machfile"
16333 then echo "  Machine description file:          \`$machfile'"
16334 else echo "  Not using any machine description file"
16335 fi
16336
16337 echo "  Compiler:                          $CC $CFLAGS"
16338 case "$CC" in
16339   gcc*) echo "  Compiler version:                  `$CC --version | head -1`"
16340         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`"
16341         ;;
16342   *) case "$canonical" in
16343         *-*-aix*   ) 
16344                   realcc=`which $CC`
16345                   if test -L $realcc ; then
16346             ccdir=`dirname $realcc`
16347             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16348                     case $ccprog in
16349                 */*) realcc=$ccprog;;
16350                 *) realcc=$ccdir/$ccprog;;
16351             esac
16352           fi
16353           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16354           if test ! -z "$lpp" ; then
16355             lppstr=`lslpp -Lqc $lpp`
16356             lpplev=`echo "$lppstr" | cut -f3 -d:`
16357             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16358           fi
16359           if test ! -z "$lpplev" ; then
16360             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16361           else
16362             echo "  Compiler version:                  (unknown version)"
16363           fi
16364         ;;
16365         
16366         *-*-solaris*)
16367           ccvers=`$CC -V 2>&1 | head -1`
16368           if test ! -z "$ccvers" ; then
16369             echo "  Compiler version:                  $ccvers"
16370           fi
16371         ;;
16372
16373         alpha*-dec-osf*)
16374           ccvers=`$CC -V | tr '\n' ' '`
16375           if test ! -z "$ccvers" ; then
16376             echo "  Compiler version:                  $ccvers"
16377           fi
16378         ;;
16379
16380         mips-sgi-irix*)
16381           ccvers=`$CC -version`
16382           if test ! -z "$ccvers" ; then
16383             echo "  Compiler version:                  $ccvers"
16384           fi
16385         ;;
16386
16387                 i[3-9]86-pc-linux)
16388           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16389           if test ! -z "$ccvers" ; then
16390             echo "  Compiler version:                  $ccvers"
16391           fi
16392         ;;
16393           
16394         *) echo "  Compiler version:                  $CC on $canonical";;
16395   esac
16396 esac
16397
16398 echo "  Relocating allocator for buffers:  $rel_alloc"
16399 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16400 case "$ld_switch_site" in
16401   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16402     - Consider configuring with --pdump." ;;
16403 esac
16404
16405 case "$canonical" in
16406         *-*-linux*) 
16407           if test -f /etc/redhat-release ; then
16408             echo "  libc:                              `rpm -q glibc`";
16409           else
16410             echo "Need to guess glibc1/2/etc here";
16411           fi
16412         ;;
16413
16414         *-*-aix*) 
16415           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16416         ;;
16417
16418         *-*-solaris*)
16419           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16420           echo "  libc:                              SUNWcsl $libc"
16421
16422         ;;
16423
16424         mips-sgi-irix*)
16425           echo "  IRIX version:                      `uname -sRm`'"
16426         ;;
16427           
16428
16429         alpha*-dec-osf*)
16430                   (cd /usr/.smdb.;
16431                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16432                 echo "  libc:                              $libc"
16433                 
16434           )
16435         ;;
16436
16437         *) echo "  libc:                              system-provided libc on $canonical" ;;
16438 esac
16439
16440
16441 echo "
16442 Window System:"
16443 if test "$with_msw" = "yes"; then
16444   echo "  Compiling in support for the Microsoft window system."
16445 fi
16446 if test "$with_x11" = "yes"; then
16447   echo "  Compiling in support for the X window system:"
16448   echo "    - X Windows headers location:                 $x_includes"
16449   echo "    - X Windows libraries location:               $x_libraries"
16450   if test "$with_xauth" != yes; then
16451     echo "    - Xau (X authority) not available."
16452   fi
16453   if test "$with_xmu" != yes; then
16454     echo "    - Xmu library not available; substituting equivalent routines."
16455   fi
16456   if test "$with_wmcommand" != no; then
16457     echo "    - Handling WM_COMMAND properly."
16458   fi
16459 fi
16460 if test "$need_motif" = "yes" ; then
16461   echo "  Compiling in support for Motif."
16462   if test "$have_lesstif" = "yes"; then
16463     echo "    - Using LessTif implementation."
16464   fi
16465   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16466   echo "             You are likely to experience slow redisplay."
16467   echo "             You may need to install vendor patches to Motif."
16468   echo "             See PROBLEMS for more information."
16469 fi
16470 if test "$need_athena" = "yes"; then
16471   echo "  Compiling in support for the Athena widget set:"
16472   echo "    - Athena headers location:                    $athena_h_path"
16473   echo "    - Athena library to link:                     $athena_lib"
16474 fi
16475 case "$with_menubars" in
16476   gtk   ) echo "  Using GTK menubars."   ;;
16477   lucid ) echo "  Using Lucid menubars." ;;
16478   motif ) echo "  Using Motif menubars."
16479           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16480           echo "             We recommend using the Lucid menubar instead."
16481           echo "             Re-run configure with --with-menubars='lucid'." ;;
16482     msw ) echo "  Using MS-Windows menubars." ;;
16483 esac
16484 case "$with_scrollbars" in
16485   gtk    ) echo "  Using GTK scrollbars."        ;;
16486   lucid  ) echo "  Using Lucid scrollbars."      ;;
16487   motif  ) echo "  Using Motif scrollbars."      ;;
16488   athena ) echo "  Using Athena scrollbars."     ;;
16489      msw ) echo "  Using MS-Windows scrollbars." ;;
16490 esac
16491 case "$with_dialogs" in
16492   gtk    ) echo "  Using GTK dialog boxes." ;;
16493   motif  ) echo "  Using Motif dialog boxes."
16494            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16495              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16496              echo "             We recommend using the Athena dialog boxes instead."
16497              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16498              echo "             Read the PROBLEMS file for more information."
16499            fi; fi ;;
16500   athena ) echo "  Using Athena dialog boxes."     ;;
16501      msw ) echo "  Using MS-Windows dialog boxes." ;;
16502 esac
16503 case "$with_widgets" in
16504   gtk    ) echo "  Using GTK native widgets."        ;;
16505   motif  ) echo "  Using Motif native widgets."      ;;
16506   athena ) echo "  Using Athena native widgets."     ;;
16507      msw ) echo "  Using MS-Windows native widgets." ;;
16508 esac
16509 if test "$with_dragndrop" = yes; then
16510   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16511   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16512 fi
16513
16514 echo "
16515 TTY:"
16516 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16517 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16518
16519 echo "
16520 Images:"
16521 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16522 if test "$with_xpm" = yes; then
16523   echo "  Compiling in support for XPM  images."
16524 elif test "$with_x11" = yes; then
16525   echo "  WARNING: -----------------------------------------------------------"
16526   echo "  WARNING: Compiling without XPM image support."
16527   if test "$xpm_problem" != ""; then
16528     echo "  Reason: $xpm_problem"
16529   fi
16530   echo "  WARNING: You should strongly consider installing XPM."
16531   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16532   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16533   echo "  WARNING: -----------------------------------------------------------"
16534 fi
16535 if test "$with_png" = yes; then
16536   echo "  Compiling in support for PNG  images."
16537 elif test "$window_system" != "none"; then
16538   echo "  WARNING: -----------------------------------------------------------"
16539   echo "  WARNING: Compiling without PNG image support."
16540   if test "$png_problem" != ""; then
16541     echo "  Reason: $png_problem"
16542   fi
16543   echo "  WARNING: You should strongly consider installing the PNG libraries."
16544   echo "  WARNING: Otherwise certain images and glyphs may not display."
16545   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16546   echo "  WARNING: -----------------------------------------------------------"
16547 fi
16548 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16549 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16550 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16551
16552 echo "
16553 Sound:"
16554 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16555 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16556 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16557 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16558
16559 echo "
16560 Databases:"
16561 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16562 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16563 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16564 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16565 if test "$with_postgresql" = yes; then
16566   echo "  Compiling in support for PostgreSQL."
16567   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16568   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16569 fi
16570 if test "$with_concord" = yes; then
16571   echo "  Compiling in support for CONCORD."
16572 fi
16573
16574 echo "
16575 Multiscriptization / Multilingualization / Internationalization:"
16576 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16577 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16578 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16579 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16580 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16581 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16582 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16583 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16584 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16585 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16586 if test "$with_wnn" = yes; then
16587   echo "  Compiling in support for the WNN input method on Mule."
16588   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16589 fi
16590 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16591
16592 echo "
16593 Mail:"
16594 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16595 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16596 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16597 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16598
16599 echo "
16600 Other Features:"
16601 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16602 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16603 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16604 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16605 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16606 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16607 if test "$use_union_type" = yes; then
16608   echo "  WARNING: ---------------------------------------------------------"
16609   echo "  Using the union type for Lisp_Objects."
16610   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16611   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16612   echo "  WARNING: ---------------------------------------------------------"
16613 fi
16614 if test "$use_regex_malloc" = no; then
16615   echo "  WARNING: -----------------------------------------------------------"
16616   echo "  Using alloca to allocate the failure stack."
16617   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16618   echo "  Do NOT use this build of XEmacs for ordinary work."
16619   echo "  WARNING: -----------------------------------------------------------"
16620 fi
16621 test "$pdump" = yes && echo "  Using the new portable dumper."
16622 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16623 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16624 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16625   != "no no no no no no"; then
16626   echo "  WARNING: ---------------------------------------------------------"
16627   echo "  WARNING: Compiling in support for runtime error checking."
16628   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16629   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16630   echo "  WARNING: ---------------------------------------------------------"
16631 fi
16632 echo ""
16633 ) | tee -a Installation
16634 echo ""
16635
16636
16637 # Remove any trailing slashes in these variables.
16638 test -n "$prefix" &&
16639   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16640 test -n "$exec_prefix" &&
16641   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16642
16643
16644 for file in $internal_makefile_list; do
16645   test "$file" = src/Makefile.in && \
16646     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16647   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16648 done
16649 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16650 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
16651
16652 trap '' 1 2 15
16653
16654 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16655
16656 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16657 # Let make expand exec_prefix.
16658 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16659
16660 # Any assignment to VPATH causes Sun make to only execute
16661 # the first set of double-colon rules, so remove it if not needed.
16662 # If there is a colon in the path, we need to keep it.
16663 if test "x$srcdir" = x.; then
16664   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16665 fi
16666
16667 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16668
16669 DEFS=-DHAVE_CONFIG_H
16670
16671 # Without the "./", some shells look in PATH for config.status.
16672 : ${CONFIG_STATUS=./config.status}
16673
16674 echo creating $CONFIG_STATUS
16675 rm -f $CONFIG_STATUS
16676 cat > $CONFIG_STATUS <<EOF
16677 #! /bin/sh
16678 # Generated automatically by configure.
16679 # Run this file to recreate the current configuration.
16680 # This directory was configured as follows,
16681 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16682 #
16683 # $0 $ac_configure_args
16684 #
16685 # Compiler output produced by configure, useful for debugging
16686 # configure, is in ./config.log if it exists.
16687
16688 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16689 for ac_option
16690 do
16691   case "\$ac_option" in
16692   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16693     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16694     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16695   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16696     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16697     exit 0 ;;
16698   -help | --help | --hel | --he | --h)
16699     echo "\$ac_cs_usage"; exit 0 ;;
16700   *) echo "\$ac_cs_usage"; exit 1 ;;
16701   esac
16702 done
16703
16704 ac_given_srcdir=$srcdir
16705 ac_given_INSTALL="$INSTALL"
16706
16707 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16708 EOF
16709 cat >> $CONFIG_STATUS <<EOF
16710
16711 # Protect against being on the right side of a sed subst in config.status.
16712 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16713  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16714 $ac_vpsub
16715 $extrasub
16716 s%@SHELL@%$SHELL%g
16717 s%@CFLAGS@%$CFLAGS%g
16718 s%@CPPFLAGS@%$CPPFLAGS%g
16719 s%@CXXFLAGS@%$CXXFLAGS%g
16720 s%@FFLAGS@%$FFLAGS%g
16721 s%@DEFS@%$DEFS%g
16722 s%@LDFLAGS@%$LDFLAGS%g
16723 s%@LIBS@%$LIBS%g
16724 s%@exec_prefix@%$exec_prefix%g
16725 s%@prefix@%$prefix%g
16726 s%@program_transform_name@%$program_transform_name%g
16727 s%@bindir@%$bindir%g
16728 s%@sbindir@%$sbindir%g
16729 s%@libexecdir@%$libexecdir%g
16730 s%@datadir@%$datadir%g
16731 s%@sysconfdir@%$sysconfdir%g
16732 s%@sharedstatedir@%$sharedstatedir%g
16733 s%@localstatedir@%$localstatedir%g
16734 s%@libdir@%$libdir%g
16735 s%@includedir@%$includedir%g
16736 s%@oldincludedir@%$oldincludedir%g
16737 s%@infodir@%$infodir%g
16738 s%@mandir@%$mandir%g
16739 s%@LN_S@%$LN_S%g
16740 s%@blddir@%$blddir%g
16741 s%@CC@%$CC%g
16742 s%@CPP@%$CPP%g
16743 s%@start_flags@%$start_flags%g
16744 s%@ld_switch_shared@%$ld_switch_shared%g
16745 s%@start_files@%$start_files%g
16746 s%@ld@%$ld%g
16747 s%@lib_gcc@%$lib_gcc%g
16748 s%@RANLIB@%$RANLIB%g
16749 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16750 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16751 s%@INSTALL_DATA@%$INSTALL_DATA%g
16752 s%@YACC@%$YACC%g
16753 s%@SET_MAKE@%$SET_MAKE%g
16754 s%@GTK_CONFIG@%$GTK_CONFIG%g
16755 s%@X_CFLAGS@%$X_CFLAGS%g
16756 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16757 s%@X_LIBS@%$X_LIBS%g
16758 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16759 s%@install_pp@%$install_pp%g
16760 s%@libs_xauth@%$libs_xauth%g
16761 s%@dnd_objs@%$dnd_objs%g
16762 s%@lwlib_objs@%$lwlib_objs%g
16763 s%@ALLOCA@%$ALLOCA%g
16764 s%@have_esd_config@%$have_esd_config%g
16765 s%@dll_ld@%$dll_ld%g
16766 s%@dll_cflags@%$dll_cflags%g
16767 s%@dll_ldflags@%$dll_ldflags%g
16768 s%@dll_post@%$dll_post%g
16769 s%@dll_ldo@%$dll_ldo%g
16770 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16771 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16772 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16773 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16774 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16775 s%@PROGNAME@%$PROGNAME%g
16776 s%@version@%$version%g
16777 s%@configuration@%$configuration%g
16778 s%@canonical@%$canonical%g
16779 s%@inststaticdir@%$inststaticdir%g
16780 s%@instvardir@%$instvardir%g
16781 s%@srcdir@%$srcdir%g
16782 s%@pkgdir@%$pkgdir%g
16783 s%@statedir@%$statedir%g
16784 s%@extra_includes@%$extra_includes%g
16785 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16786 s%@PREFIX@%$PREFIX%g
16787 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16788 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16789 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16790 s%@INFODIR@%$INFODIR%g
16791 s%@infopath@%$infopath%g
16792 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16793 s%@INFOPATH@%$INFOPATH%g
16794 s%@package_path@%$package_path%g
16795 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16796 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16797 s%@lispdir@%$lispdir%g
16798 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16799 s%@LISPDIR@%$LISPDIR%g
16800 s%@moduledir@%$moduledir%g
16801 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16802 s%@MODULEDIR@%$MODULEDIR%g
16803 s%@sitelispdir@%$sitelispdir%g
16804 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16805 s%@SITELISPDIR@%$SITELISPDIR%g
16806 s%@sitemoduledir@%$sitemoduledir%g
16807 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16808 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16809 s%@etcdir@%$etcdir%g
16810 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16811 s%@ETCDIR@%$ETCDIR%g
16812 s%@docdir@%$docdir%g
16813 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16814 s%@DOCDIR@%$DOCDIR%g
16815 s%@archlibdir@%$archlibdir%g
16816 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16817 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16818 s%@bitmapdir@%$bitmapdir%g
16819 s%@extra_objs@%$extra_objs%g
16820 s%@machfile@%$machfile%g
16821 s%@opsysfile@%$opsysfile%g
16822 s%@c_switch_general@%$c_switch_general%g
16823 s%@c_switch_window_system@%$c_switch_window_system%g
16824 s%@c_switch_all@%$c_switch_all%g
16825 s%@ld_switch_general@%$ld_switch_general%g
16826 s%@ld_switch_window_system@%$ld_switch_window_system%g
16827 s%@ld_switch_all@%$ld_switch_all%g
16828 s%@ld_libs_general@%$ld_libs_general%g
16829 s%@ld_libs_window_system@%$ld_libs_window_system%g
16830 s%@ld_libs_all@%$ld_libs_all%g
16831 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
16832 s%@native_sound_lib@%$native_sound_lib%g
16833 s%@sound_cflags@%$sound_cflags%g
16834 s%@dynodump_arch@%$dynodump_arch%g
16835 s%@XEMACS_CC@%$XEMACS_CC%g
16836 s%@internal_makefile_list@%$internal_makefile_list%g
16837
16838 CEOF
16839 EOF
16840
16841 cat >> $CONFIG_STATUS <<\EOF
16842
16843 # Split the substitutions into bite-sized pieces for seds with
16844 # small command number limits, like on Digital OSF/1 and HP-UX.
16845 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16846 ac_file=1 # Number of current file.
16847 ac_beg=1 # First line for current file.
16848 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16849 ac_more_lines=:
16850 ac_sed_cmds=""
16851 while $ac_more_lines; do
16852   if test $ac_beg -gt 1; then
16853     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16854   else
16855     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16856   fi
16857   if test ! -s conftest.s$ac_file; then
16858     ac_more_lines=false
16859     rm -f conftest.s$ac_file
16860   else
16861     if test -z "$ac_sed_cmds"; then
16862       ac_sed_cmds="sed -f conftest.s$ac_file"
16863     else
16864       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16865     fi
16866     ac_file=`expr $ac_file + 1`
16867     ac_beg=$ac_end
16868     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16869   fi
16870 done
16871 if test -z "$ac_sed_cmds"; then
16872   ac_sed_cmds=cat
16873 fi
16874 EOF
16875
16876 cat >> $CONFIG_STATUS <<EOF
16877
16878 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16879 EOF
16880 cat >> $CONFIG_STATUS <<\EOF
16881 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16882   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16883   case "$ac_file" in
16884   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16885        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16886   *) ac_file_in="${ac_file}.in" ;;
16887   esac
16888
16889   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16890
16891   # Remove last slash and all that follows it.  Not all systems have dirname.
16892   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16893   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16894     # The file is in a subdirectory.
16895     test ! -d "$ac_dir" && mkdir "$ac_dir"
16896     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16897     # A "../" for each directory in $ac_dir_suffix.
16898     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16899   else
16900     ac_dir_suffix= ac_dots=
16901   fi
16902
16903   case "$ac_given_srcdir" in
16904   .)  srcdir=.
16905       if test -z "$ac_dots"; then top_srcdir=.
16906       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16907   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16908   *) # Relative path.
16909     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16910     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16911   esac
16912
16913   case "$ac_given_INSTALL" in
16914   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16915   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16916   esac
16917
16918   echo creating "$ac_file"
16919   rm -f "$ac_file"
16920   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16921   case "$ac_file" in
16922   *Makefile*) ac_comsub="1i\\
16923 # $configure_input" ;;
16924   *) ac_comsub= ;;
16925   esac
16926
16927   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16928   sed -e "$ac_comsub
16929 s%@configure_input@%$configure_input%g
16930 s%@srcdir@%$srcdir%g
16931 s%@top_srcdir@%$top_srcdir%g
16932 s%@INSTALL@%$INSTALL%g
16933 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16934 fi; done
16935 rm -f conftest.s*
16936
16937 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16938 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16939 #
16940 # ac_d sets the value in "#define NAME VALUE" lines.
16941 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16942 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16943 ac_dC='\3'
16944 ac_dD='%g'
16945 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16946 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16947 ac_uB='\([      ]\)%\1#\2define\3'
16948 ac_uC=' '
16949 ac_uD='\4%g'
16950 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16951 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16952 ac_eB='$%\1#\2define\3'
16953 ac_eC=' '
16954 ac_eD='%g'
16955
16956 if test "${CONFIG_HEADERS+set}" != set; then
16957 EOF
16958 cat >> $CONFIG_STATUS <<EOF
16959   CONFIG_HEADERS="src/config.h lwlib/config.h"
16960 EOF
16961 cat >> $CONFIG_STATUS <<\EOF
16962 fi
16963 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16964   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16965   case "$ac_file" in
16966   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16967        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16968   *) ac_file_in="${ac_file}.in" ;;
16969   esac
16970
16971   echo creating $ac_file
16972
16973   rm -f conftest.frag conftest.in conftest.out
16974   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16975   cat $ac_file_inputs > conftest.in
16976
16977 EOF
16978
16979 # Transform confdefs.h into a sed script conftest.vals that substitutes
16980 # the proper values into config.h.in to produce config.h.  And first:
16981 # Protect against being on the right side of a sed subst in config.status.
16982 # Protect against being in an unquoted here document in config.status.
16983 rm -f conftest.vals
16984 cat > conftest.hdr <<\EOF
16985 s/[\\&%]/\\&/g
16986 s%[\\$`]%\\&%g
16987 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16988 s%ac_d%ac_u%gp
16989 s%ac_u%ac_e%gp
16990 EOF
16991 sed -n -f conftest.hdr confdefs.h > conftest.vals
16992 rm -f conftest.hdr
16993
16994 # This sed command replaces #undef with comments.  This is necessary, for
16995 # example, in the case of _POSIX_SOURCE, which is predefined and required
16996 # on some systems where configure will not decide to define it.
16997 cat >> conftest.vals <<\EOF
16998 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16999 EOF
17000
17001 # Break up conftest.vals because some shells have a limit on
17002 # the size of here documents, and old seds have small limits too.
17003
17004 rm -f conftest.tail
17005 while :
17006 do
17007   ac_lines=`grep -c . conftest.vals`
17008   # grep -c gives empty output for an empty file on some AIX systems.
17009   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17010   # Write a limited-size here document to conftest.frag.
17011   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17012   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17013   echo 'CEOF
17014   sed -f conftest.frag conftest.in > conftest.out
17015   rm -f conftest.in
17016   mv conftest.out conftest.in
17017 ' >> $CONFIG_STATUS
17018   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17019   rm -f conftest.vals
17020   mv conftest.tail conftest.vals
17021 done
17022 rm -f conftest.vals
17023
17024 cat >> $CONFIG_STATUS <<\EOF
17025   rm -f conftest.frag conftest.h
17026   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17027   cat conftest.in >> conftest.h
17028   rm -f conftest.in
17029   if cmp -s $ac_file conftest.h 2>/dev/null; then
17030     echo "$ac_file is unchanged"
17031     rm -f conftest.h
17032   else
17033     # Remove last slash and all that follows it.  Not all systems have dirname.
17034       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17035       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17036       # The file is in a subdirectory.
17037       test ! -d "$ac_dir" && mkdir "$ac_dir"
17038     fi
17039     rm -f $ac_file
17040     mv conftest.h $ac_file
17041   fi
17042 fi; done
17043
17044 EOF
17045 cat >> $CONFIG_STATUS <<EOF
17046 CPP="$CPP"
17047  top_srcdir="$srcdir"
17048  MAKE_SUBDIR="$MAKE_SUBDIR"
17049
17050 EOF
17051 cat >> $CONFIG_STATUS <<\EOF
17052 for dir in . $MAKE_SUBDIR; do
17053   (
17054     cd $dir
17055     rm -f junk.c
17056     < Makefile.in \
17057       sed -e '/^# Generated/d' \
17058           -e 's%/\*\*/#.*%%' \
17059           -e 's/^ *# */#/' \
17060           -e '/^##/d' \
17061           -e '/^#/ {
17062 p
17063 d
17064 }'        \
17065           -e '/./ {
17066 s/\([\"]\)/\\\1/g
17067 s/^/"/
17068 s/$/"/
17069 }'  > junk.c;
17070
17071
17072
17073     echo creating $dir/Makefile
17074 $CPP -I. -I${top_srcdir}/src  junk.c \
17075   | sed -e 's/^\#.*//'          \
17076         -e 's/^[        ][      ]*$//'\
17077         -e 's/^ /       /'              \
17078         -e '/^[ \f]*$/d' \
17079         -e '/^\"/ {
17080         s/\\\([\"]\)/\1/g
17081         s/^[    ]*\"//
17082         s/\"[   ]*$//
17083 }' > Makefile.new
17084     chmod 444 Makefile.new
17085     mv -f Makefile.new Makefile
17086
17087     echo creating $dir/GNUmakefile
17088 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
17089   | sed -e 's/^\#.*//'          \
17090         -e 's/^[        ][      ]*$//'\
17091         -e 's/^ /       /'              \
17092         -e '/^[ \f]*$/d' \
17093         -e '/^\"/ {
17094         s/\\\([\"]\)/\1/g
17095         s/^[    ]*\"//
17096         s/\"[   ]*$//
17097 }' > Makefile.new
17098     chmod 444 Makefile.new
17099     mv -f Makefile.new GNUmakefile
17100
17101     rm -f junk.c
17102   )
17103 done
17104
17105 sed < config.status >> lib-src/config.values \
17106   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
17107   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
17108   -e 's/^\([^ ]*\) $/\1 ""/' \
17109   -e 's/ 1$/ t/'
17110
17111
17112 exit 0
17113 EOF
17114 chmod +x $CONFIG_STATUS
17115 rm -fr confdefs* $ac_clean_files
17116 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1