XEmacs 21.4.4 "Artificial Intelligence".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 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'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 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
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 with_esd_sound='no'
251 native_sound_lib=''
252 with_gtk='no'
253 with_gnome='no'
254 use_assertions="yes"
255 with_toolbars=""
256 with_tty=""
257 use_union_type="no"
258 with_dnet=""
259 pdump="no"
260 with_dragndrop="no"
261 with_ipv6_cname="yes"
262
263
264
265
266 arguments="$@"
267
268 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
269 quoted_arguments=
270 for i in "$@"; do
271    case "$i" in
272    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273    | --no-cr | --no-c) ;;
274    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
275    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
276    *)
277    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
278    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
279    esac
280 done
281
282 while test $# != 0; do
283   arg="$1"; shift
284   case "$arg" in
285     --no-create|--no-recursion) ;;
286         -* )
287             case "$arg" in
288         -*=*)
289           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
290           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
291           valomitted=no
292         ;;
293                                                                           -*)
294                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
295           val="yes" valomitted=yes
296         ;;
297       esac
298
299             optname="$opt"
300       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
301
302             case "${valomitted}-${opt}" in yes-without_* )
303         opt=`echo $opt | sed 's/without/with/'`
304         valomitted="no" val="no" ;;
305       esac
306
307             case "$opt" in
308
309         with_site_lisp  | \
310         with_prefix     | \
311         with_site_modules | \
312         with_x          | \
313         with_x11        | \
314         with_gtk        | \
315         with_gnome      | \
316         with_msw        | \
317         with_gcc        | \
318         dynamic         | \
319         with_ncurses    | \
320         with_dnet       | \
321         with_socks      | \
322         with_dragndrop  | \
323         with_cde        | \
324         with_offix      | \
325         with_gpm        | \
326         with_xpm        | \
327         with_xface      | \
328         with_gif        | \
329         with_jpeg       | \
330         with_png        | \
331         with_tiff       | \
332         with_wmcommand  | \
333         with_xmu        | \
334         with_purify     | \
335         with_quantify   | \
336         with_toolbars   | \
337         with_tty        | \
338         with_xfs        | \
339         with_i18n3      | \
340         with_mule       | \
341         with_file_coding| \
342         with_canna      | \
343         with_wnn        | \
344         with_wnn6       | \
345         with_workshop   | \
346         with_sparcworks | \
347         with_tooltalk   | \
348         with_ldap       | \
349         with_postgresql | \
350         with_pop        | \
351         with_kerberos   | \
352         with_hesiod     | \
353         with_dnet       | \
354         with_infodock   | \
355         with_netinstall | \
356         with_ipv6_cname | \
357         external_widget | \
358         verbose         | \
359         extra_verbose   | \
360         usage_tracking  | \
361         use_union_type  | \
362         pdump           | \
363         debug           | \
364         use_assertions  | \
365         memory_usage_stats | \
366         with_clash_detection | \
367         with_modules | \
368         quick_build )
369                   case "$val" in
370             y | ye | yes )      val=yes ;;
371             n | no )            val=no  ;;
372             * ) (echo "$progname: Usage error:"
373 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
374 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
375           esac
376           eval "$opt=\"$val\"" ;;
377
378
379                         srcdir          | \
380         compiler        | \
381         cflags          | \
382         cpp             | \
383         cppflags        | \
384         libs            | \
385         ldflags         | \
386         cache_file      | \
387         native_sound_lib| \
388         site_lisp       | \
389         x_includes      | \
390         x_libraries     | \
391         site_includes   | \
392         site_libraries  | \
393         site_prefixes   | \
394         site_runtime_libraries )
395                   if test "$valomitted" = "yes" ; then
396                     if test "$#" = 0 ; then
397               (echo "$progname: Usage error:"
398 echo " " "The \`--$optname' option requires a value."
399 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
400             fi
401             val="$1"; shift
402           fi
403           eval "$opt=\"$val\""
404         ;;
405
406                 rel_alloc | \
407         with_dlmalloc | \
408         with_debug_malloc  | use_debug_malloc | \
409         with_system_malloc | use_system_malloc )
410           case "$val" in
411             y | ye | yes )      val=yes ;;
412             n | no )            val=no  ;;
413             d | de | def | defa | defau | defaul | default ) val=default ;;
414             * ) (echo "$progname: Usage error:"
415 echo " " "The \`--$optname' option requires one of these values:
416   \`yes', \`no', or \`default'."
417 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
418           esac
419           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
420           eval "$opt=\"$val\""
421         ;;
422
423                 "with_database" )
424           with_database_berkdb=no
425           with_database_dbm=no
426           with_database_gdbm=no
427           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
428             case "$x" in
429               no ) ;;
430               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
431               d | db | dbm )                               with_database_dbm=yes    ;;
432               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
433               * ) (echo "$progname: Usage error:"
434 echo " " "The \`--$optname' option value
435   must be either \`no' or a comma-separated list
436   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
437 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
438             esac
439           done
440           if test "$with_database_dbm"  = "yes" -a \
441                   "$with_database_gdbm" = "yes"; then
442           (echo "$progname: Usage error:"
443 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
444   with the \`--$optname' option."
445 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
446           fi
447         ;;
448
449                 "with_sound" )
450                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
451             case "$x" in
452                       n | no | non | none ) new_sdefault=no ;;
453               a | al | all | both ) new_sdefault=yes ;;
454
455               native )       with_native_sound=yes ;;
456               nonative )     with_native_sound=no ;;
457
458               nas )          with_nas_sound=yes ;;
459               nonas )        with_nas_sound=no ;;
460
461               esd )          with_esd_sound=yes ;;
462               noesd )        with_esd_sound=no ;;
463
464               * ) bogus_sound=yes ;;
465             esac
466             if test "$bogus_sound" -o \
467                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
468                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
469                 (echo "$progname: Usage error:"
470 echo " " "Valid types for the \`--$optname' option are:
471   $types.
472 Option \`all' or \`none' must be first in the list.
473 The default is to autodetect native and NAS sound support."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
475             elif test -n "$new_sdefault" ; then
476                 with_native_sound=$new_sdefault
477                 with_nas_sound=$new_sdefault
478                 with_esd_sound=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                         "with_athena" )
486           case "$val" in
487             xa | xaw )                    val=xaw    ;;
488             3 | 3d | xaw3d )              val=3d     ;;
489                         ne | nex | next | naxtaw)     val=next   ;;
490                         9 | 95 | xaw95 )              val=95     ;;
491             xp | xpm | xawxpm )           val=xpm    ;;
492             * ) (echo "$progname: Usage error:"
493 echo " " "The \`--$optname' option must have one of these values:
494   \`xaw', \`3d', \`next', \`95', or \`xpm'."
495 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
496           esac
497           eval "$opt=\"$val\""
498         ;;
499
500                 "with_xim" )
501           case "$val" in
502             y | ye | yes )                val=yes   ;;
503             n | no | non | none )         val=no    ;;
504             x | xl | xli | xlib )         val=xlib  ;;
505             m | mo | mot | moti | motif ) val=motif ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`motif', \`xlib', \`yes', or \`no'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "mail_locking" )
515           case "$val" in
516             lockf )     val=lockf ;;
517             flock )     val=flock ;;
518             file | dot ) val=file  ;;
519             locking )   val=locking  ;;
520             * ) (echo "$progname: Usage error:"
521 echo " " "The \`--$optname' option must have one of these values:
522   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
524           esac
525           eval "$opt=\"$val\""
526         ;;
527
528                 "error_checking" )
529                           
530           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
531             case "$x" in
532                       n | no | non | none ) new_default=no ;;
533               a | al | all )        new_default=yes ;;
534
535               extents )       error_check_extents=yes ;;
536               noextents )     error_check_extents=no ;;
537
538               typecheck )     error_check_typecheck=yes ;;
539               notypecheck )   error_check_typecheck=no ;;
540
541               bufpos )        error_check_bufpos=yes ;;
542               nobufpos )      error_check_bufpos=no ;;
543
544               gc )            error_check_gc=yes ;;
545               nogc )          error_check_gc=no ;;
546
547               malloc )        error_check_malloc=yes ;;
548               nomalloc )      error_check_malloc=no ;;
549
550               byte_code )     error_check_byte_code=yes ;;
551               nobyte_code )   error_check_byte_code=no ;;
552
553               glyphs )     error_check_glyphs=yes ;;
554               noglyphs )   error_check_glyphs=no ;;
555
556               * ) bogus_error_check=yes ;;
557             esac
558             if test "$bogus_error_check" -o \
559                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
560                 if test "$error_check_default" = yes ; then
561                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
562                 else
563                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
564                 fi
565                 (echo "$progname: Usage error:"
566 echo " " "Valid types for the \`--$optname' option are:
567   $types."
568 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
569             elif test -n "$new_default" ; then
570                 error_check_extents=$new_default
571                 error_check_typecheck=$new_default
572                 error_check_bufpos=$new_default
573                 error_check_gc=$new_default
574                 error_check_malloc=$new_default
575                 error_check_byte_code=$new_default
576                 error_check_glyphs=$new_default
577                 new_default=    # reset this
578             fi
579             echeck_notfirst=true
580           done
581         ;;
582
583                                 
584                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
585         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
586         archlibdir | docdir | package_path )
587                    if test "$valomitted" = "yes"; then
588              if test "$#" = 0; then
589                  (echo "$progname: Usage error:"
590 echo " " "The \`--$optname' option requires a value."
591 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
592              fi
593              val="$1"; shift
594            fi
595            eval "$opt=\"$val\""
596
597                            case "$opt" in
598                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
599     Defining EXEC_PREFIX_USER_DEFINED
600 EOF
601 cat >> confdefs.h <<\EOF
602 #define EXEC_PREFIX_USER_DEFINED 1
603 EOF
604 }
605  ;;
606              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
607     Defining LISPDIR_USER_DEFINED
608 EOF
609 cat >> confdefs.h <<\EOF
610 #define LISPDIR_USER_DEFINED 1
611 EOF
612 }
613  ;;
614              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
615     Defining SITELISPDIR_USER_DEFINED
616 EOF
617 cat >> confdefs.h <<\EOF
618 #define SITELISPDIR_USER_DEFINED 1
619 EOF
620 }
621  ;;
622              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
623     Defining MODULEDIR_USER_DEFINED
624 EOF
625 cat >> confdefs.h <<\EOF
626 #define MODULEDIR_USER_DEFINED 1
627 EOF
628 }
629  ;;
630              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
631     Defining ETCDIR_USER_DEFINED
632 EOF
633 cat >> confdefs.h <<\EOF
634 #define ETCDIR_USER_DEFINED 1
635 EOF
636 }
637  ;;
638              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
639     Defining INFODIR_USER_DEFINED
640 EOF
641 cat >> confdefs.h <<\EOF
642 #define INFODIR_USER_DEFINED 1
643 EOF
644 }
645  ;;
646              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
647     Defining INFOPATH_USER_DEFINED
648 EOF
649 cat >> confdefs.h <<\EOF
650 #define INFOPATH_USER_DEFINED 1
651 EOF
652 }
653  ;;
654              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
655     Defining PACKAGE_PATH_USER_DEFINED
656 EOF
657 cat >> confdefs.h <<\EOF
658 #define PACKAGE_PATH_USER_DEFINED 1
659 EOF
660 }
661  ;;
662              datadir )
663                 { test "$extra_verbose" = "yes" && cat << \EOF
664     Defining INFODIR_USER_DEFINED
665 EOF
666 cat >> confdefs.h <<\EOF
667 #define INFODIR_USER_DEFINED 1
668 EOF
669 }
670
671                 { test "$extra_verbose" = "yes" && cat << \EOF
672     Defining LISPDIR_USER_DEFINED
673 EOF
674 cat >> confdefs.h <<\EOF
675 #define LISPDIR_USER_DEFINED 1
676 EOF
677 }
678
679                 { test "$extra_verbose" = "yes" && cat << \EOF
680     Defining MODULEDIR_USER_DEFINED
681 EOF
682 cat >> confdefs.h <<\EOF
683 #define MODULEDIR_USER_DEFINED 1
684 EOF
685 }
686
687                 { test "$extra_verbose" = "yes" && cat << \EOF
688     Defining ETCDIR_USER_DEFINED
689 EOF
690 cat >> confdefs.h <<\EOF
691 #define ETCDIR_USER_DEFINED 1
692 EOF
693 }
694
695                 { test "$extra_verbose" = "yes" && cat << \EOF
696     Defining DOCDIR_USER_DEFINED
697 EOF
698 cat >> confdefs.h <<\EOF
699 #define DOCDIR_USER_DEFINED 1
700 EOF
701 }
702
703                 { test "$extra_verbose" = "yes" && cat << \EOF
704     Defining ARCHLIBDIR_USER_DEFINED
705 EOF
706 cat >> confdefs.h <<\EOF
707 #define ARCHLIBDIR_USER_DEFINED 1
708 EOF
709 }
710  ;;
711              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
712     Defining DOCDIR_USER_DEFINED
713 EOF
714 cat >> confdefs.h <<\EOF
715 #define DOCDIR_USER_DEFINED 1
716 EOF
717 }
718  ;;
719              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
720     Defining ARCHLIBDIR_USER_DEFINED
721 EOF
722 cat >> confdefs.h <<\EOF
723 #define ARCHLIBDIR_USER_DEFINED 1
724 EOF
725 }
726  ;;
727            esac
728         ;;
729
730                 "no_create" ) ;;
731
732                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
733
734                 "with_menubars"   | \
735         "with_scrollbars" | \
736         "with_dialogs"    | \
737         "with_widgets" )
738           case "$val" in
739             l | lu | luc | luci | lucid )               val=lucid  ;;
740             mo | mot | moti | motif )                   val=motif  ;;
741             a | at | ath | athe | athen | athena )      val=athena ;;
742             n | no | non | none )                       val=no     ;;
743             y | ye | yes )                              val=yes    ;;
744             g | gt | gtk )                              val=gtk    ;;
745             ms | msw )                                  val=msw    ;;
746             * ) (echo "$progname: Usage error:"
747 echo " " "The \`--$optname' option must have one of these values:
748   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750           esac
751           eval "$opt=\"$val\""
752         ;;
753
754                 "use_minimal_tagbits" | \
755         "use_indexed_lrecord_implementation" | \
756         "run_in_place"  | \
757         "const_is_losing" | \
758         "with_gnu_make" )
759           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
760         ;;
761
762                 * ) (echo "$progname: Usage error:"
763 echo " " "Unrecognized option: $arg"
764 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
765
766       esac
767     ;;
768
769         *-*-*) configuration="$arg" ;;
770
771         *) (echo "$progname: Usage error:"
772 echo " " "Unrecognized argument: $arg"
773 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
774
775   esac
776 done
777
778
779 test -n "$cpp"      && CPP="$cpp"
780 test -n "$cppflags" && CPPFLAGS="$cppflags"
781 test -n "$libs"     && LIBS="$libs"
782 test -n "$ldflags"  && LDFLAGS="$ldflags"
783
784 eval set x "$quoted_arguments"; shift
785
786 test "$extra_verbose" = "yes" && verbose=yes
787
788 test -n "$with_x" && with_x11="$with_x"
789
790 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
791   test "$with_system_malloc" = "default" && with_system_malloc=yes
792 fi
793
794
795
796 if test "$with_cde $with_tooltalk" = "yes no"; then
797   (echo "$progname: Usage error:"
798 echo " " "--with-cde requires --with-tooltalk"
799 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
800 elif test "$with_tooltalk" = "no" ; then with_cde=no
801 elif test "$with_cde" = "yes"; then with_tooltalk=yes
802 fi
803
804
805 case "$srcdir" in
806
807     "" )
808     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
809       if test -f "$dir/src/lisp.h" -a \
810               -f "$dir/lisp/version.el" ; then
811         srcdir="$dir"
812         break
813       fi
814     done
815     if test -z "$srcdir" ; then
816       (echo "$progname: Usage error:"
817 echo " " "Neither the current directory nor its parent seem to
818   contain the XEmacs sources.  If you do not want to build XEmacs in its
819   source tree, you should run \`$progname' in the directory in which
820   you wish to build XEmacs, using the \`--srcdir' option to say where the
821   sources may be found."
822 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
823     fi
824   ;;
825
826     * )
827     if test ! -f "$srcdir/src/lisp.h" -o \
828             ! -f "$srcdir/lisp/version.el" ; then
829       (echo "$progname: Usage error:"
830 echo " " "The directory specified with the \`--srcdir' option,
831   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
832   either run the \`$progname' script at the top of the XEmacs source
833   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
834 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
835     fi
836   ;;
837 esac
838
839 if test -z "$configuration"; then
840     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
841   if test -z "$configuration"; then
842     (echo "$progname: Usage error:"
843 echo " " "XEmacs has not been ported to this host type.
844 Try explicitly specifying the CONFIGURATION when rerunning configure."
845 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
846   fi
847 fi
848
849 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
850 echo "configure:851: checking whether ln -s works" >&5
851
852 rm -f conftestdata
853 if ln -s X conftestdata 2>/dev/null
854 then
855   rm -f conftestdata
856   ac_cv_prog_LN_S="ln -s"
857 else
858   ac_cv_prog_LN_S=ln
859 fi
860 LN_S="$ac_cv_prog_LN_S"
861 if test "$ac_cv_prog_LN_S" = "ln -s"; then
862   echo "$ac_t""yes" 1>&6
863 else
864   echo "$ac_t""no" 1>&6
865 fi
866
867
868 for dir in lisp etc man info tests; do
869   if test ! -d "$dir" ; then
870     echo Making symbolic link to "$srcdir/$dir"
871     ${LN_S} "$srcdir/$dir" "$dir"
872   fi
873 done
874
875
876 absolute_pwd="`pwd`";
877 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
878 then blddir="$PWD"
879 else blddir="$absolute_pwd"; if test -d "/net"; then
880   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
881   blddir=`echo "$blddir" | \
882    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
883 fi
884 fi
885
886
887 case "$srcdir" in
888   /* ) ;;
889   .  ) srcdir="$blddir" ;;
890   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
891   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
892   srcdir=`echo "$srcdir" | \
893    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
894 fi ;;
895 esac
896
897 if test `pwd` != `sh -c cd $srcdir && pwd`  \
898    && test -f "$srcdir/src/config.h"; then
899   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
900    echo "   as a build directory right now; it has been configured in its own"
901    echo "   right.  To configure in another directory as well, you MUST"
902    echo "   use GNU make.  If you do not have GNU make, then you must"
903    echo "   now do \`make distclean' in $srcdir,"
904    echo "   and then run $progname again.") >&2
905   extrasub='/^VPATH[     ]*=/c\
906 vpath %.c $(srcdir)\
907 vpath %.h $(srcdir)\
908 vpath %.y $(srcdir)\
909 vpath %.l $(srcdir)\
910 vpath %.s $(srcdir)\
911 vpath %.in $(srcdir)'
912 fi
913
914 . "$srcdir/version.sh" || exit 1;
915 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
916 : "${extra_verbose=$beta}"
917 version="${emacs_major_version}.${emacs_minor_version}"
918 { test "$extra_verbose" = "yes" && cat << EOF
919     Defining EMACS_MAJOR_VERSION = $emacs_major_version
920 EOF
921 cat >> confdefs.h <<EOF
922 #define EMACS_MAJOR_VERSION $emacs_major_version
923 EOF
924 }
925
926 { test "$extra_verbose" = "yes" && cat << EOF
927     Defining EMACS_MINOR_VERSION = $emacs_minor_version
928 EOF
929 cat >> confdefs.h <<EOF
930 #define EMACS_MINOR_VERSION $emacs_minor_version
931 EOF
932 }
933
934 if test -n "$emacs_beta_version" ; then
935   if test "$beta" = "yes"; then
936         version="${version}-b${emacs_beta_version}"
937         { test "$extra_verbose" = "yes" && cat << EOF
938     Defining EMACS_BETA_VERSION = $emacs_beta_version
939 EOF
940 cat >> confdefs.h <<EOF
941 #define EMACS_BETA_VERSION $emacs_beta_version
942 EOF
943 }
944
945   else
946         version="${version}.${emacs_beta_version}"
947         { test "$extra_verbose" = "yes" && cat << EOF
948     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
949 EOF
950 cat >> confdefs.h <<EOF
951 #define EMACS_PATCH_LEVEL $emacs_beta_version
952 EOF
953 }
954
955   fi
956 fi
957 { test "$extra_verbose" = "yes" && cat << EOF
958     Defining XEMACS_CODENAME = "$xemacs_codename"
959 EOF
960 cat >> confdefs.h <<EOF
961 #define XEMACS_CODENAME "$xemacs_codename"
962 EOF
963 }
964
965 { test "$extra_verbose" = "yes" && cat << EOF
966     Defining EMACS_VERSION = "$version"
967 EOF
968 cat >> confdefs.h <<EOF
969 #define EMACS_VERSION "$version"
970 EOF
971 }
972
973
974 if test "$with_infodock" = "yes"; then
975   if test ! -f ../../ID-INSTALL; then
976     echo "Cannot build InfoDock without InfoDock sources"
977     with_infodock=no
978   fi
979 fi
980
981 if test "$with_infodock" = "yes"; then
982       { test "$extra_verbose" = "yes" && cat << EOF
983     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
984 EOF
985 cat >> confdefs.h <<EOF
986 #define INFODOCK_MAJOR_VERSION $infodock_major_version
987 EOF
988 }
989
990   { test "$extra_verbose" = "yes" && cat << EOF
991     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
992 EOF
993 cat >> confdefs.h <<EOF
994 #define INFODOCK_MINOR_VERSION $infodock_minor_version
995 EOF
996 }
997
998   { test "$extra_verbose" = "yes" && cat << EOF
999     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1000 EOF
1001 cat >> confdefs.h <<EOF
1002 #define INFODOCK_BUILD_VERSION $infodock_build_version
1003 EOF
1004 }
1005
1006   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1007   PROGNAME=infodock
1008   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1009 else
1010   PROGNAME=xemacs
1011 fi
1012
1013 { test "$extra_verbose" = "yes" && cat << EOF
1014     Defining EMACS_PROGNAME = "$PROGNAME"
1015 EOF
1016 cat >> confdefs.h <<EOF
1017 #define EMACS_PROGNAME "$PROGNAME"
1018 EOF
1019 }
1020
1021
1022 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1023 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_EXTENTS
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_EXTENTS 1
1028 EOF
1029 }
1030
1031 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_TYPECHECK
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_TYPECHECK 1
1036 EOF
1037 }
1038
1039 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_BUFPOS
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_BUFPOS 1
1044 EOF
1045 }
1046
1047 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1048     Defining ERROR_CHECK_GC
1049 EOF
1050 cat >> confdefs.h <<\EOF
1051 #define ERROR_CHECK_GC 1
1052 EOF
1053 }
1054
1055 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining ERROR_CHECK_MALLOC
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define ERROR_CHECK_MALLOC 1
1060 EOF
1061 }
1062
1063 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1064     Defining ERROR_CHECK_BYTE_CODE
1065 EOF
1066 cat >> confdefs.h <<\EOF
1067 #define ERROR_CHECK_BYTE_CODE 1
1068 EOF
1069 }
1070
1071 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1072     Defining ERROR_CHECK_GLYPHS
1073 EOF
1074 cat >> confdefs.h <<\EOF
1075 #define ERROR_CHECK_GLYPHS 1
1076 EOF
1077 }
1078
1079 if test "${debug:=$beta}" = "yes"; then
1080   use_assertions=yes memory_usage_stats=yes
1081   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1082    echo "    xemacs will be linked with \"debug.o\""
1083  fi
1084   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1085    echo "    xemacs will be linked with \"tests.o\""
1086  fi
1087   { test "$extra_verbose" = "yes" && cat << \EOF
1088     Defining DEBUG_XEMACS
1089 EOF
1090 cat >> confdefs.h <<\EOF
1091 #define DEBUG_XEMACS 1
1092 EOF
1093 }
1094
1095 fi
1096 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1097     Defining USE_ASSERTIONS
1098 EOF
1099 cat >> confdefs.h <<\EOF
1100 #define USE_ASSERTIONS 1
1101 EOF
1102 }
1103
1104 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1105     Defining MEMORY_USAGE_STATS
1106 EOF
1107 cat >> confdefs.h <<\EOF
1108 #define MEMORY_USAGE_STATS 1
1109 EOF
1110 }
1111
1112
1113
1114 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1115 echo "configure:1116: checking "host system type"" >&5
1116 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1117 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1118 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1119 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1120 echo "$ac_t""$configuration" 1>&6
1121
1122
1123
1124
1125
1126 machine='' opsys=''
1127
1128 case "$canonical" in
1129   sparc-*-*        ) machine=sparc ;;
1130   alpha*-*-*       ) machine=alpha ;;
1131   vax-*-*          ) machine=vax ;;
1132   mips-dec-*       ) machine=pmax ;;
1133   mips-sgi-irix6*  ) machine=iris6d ;;
1134   mips-sgi-*       ) machine=iris4d ;;
1135   mips*-linux      ) machine=mips ;;
1136   romp-ibm-*       ) machine=ibmrt ;;
1137   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1138   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1139   powerpc*-*       ) machine=powerpc ;;
1140   hppa-*-*         ) machine=hp800 ;;
1141   m88k-dg-*        ) machine=aviion ;;
1142   m68*-sony-*      ) machine=news ;;
1143   mips-sony-*      ) machine=news-risc ;;
1144   clipper-*        ) machine=clipper ;;
1145   arm*             ) machine=arm ;;
1146   ns32k-*          ) machine=ns32000 ;;
1147 esac
1148
1149 case "$canonical" in
1150   *-*-linux*    ) opsys=linux ;;
1151   *-*-netbsd*   ) opsys=netbsd ;;
1152   *-*-openbsd*  ) opsys=openbsd ;;
1153   *-*-nextstep* ) opsys=nextstep ;;
1154   *-*-vms       ) opsys=vms ;;
1155
1156     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1157   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1158   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1159   *-dec-osf3*                ) opsys=decosf3-1 ;;
1160   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1161
1162     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1163   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1164   *-*-ultrix* )         opsys=ultrix4-3 ;;
1165
1166     *-*-aix3.1*  ) opsys=aix3-1 ;;
1167   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1168   *-*-aix3*    ) opsys=aix3-2   ;;
1169   *-*-aix4.0*  ) opsys=aix4     ;;
1170   *-*-aix4.1*  ) opsys=aix4-1   ;;
1171   *-*-aix4*    ) opsys=aix4-2   ;;
1172
1173     *-gnu* )                    opsys=gnu    ;;
1174   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1175   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1176   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1177   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1178   *-*-aos*   )                  opsys=bsd4-3 ;;
1179   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1180   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1181   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1182   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1183   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1184   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1185         if test -z "$NON_GNU_CPP" ; then
1186           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1187             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1188           done
1189         fi
1190         opsys=usg5-4-2 ;;
1191     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1192     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1193 esac
1194
1195 case "$canonical" in
1196
1197     *-*-netbsd* )
1198     case "$canonical" in
1199       i[3-9]86-*-netbsd*) machine=intel386 ;;
1200       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1201                                             machine=hp9000s300 ;;
1202       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1203       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1204     esac
1205   ;;
1206
1207     *-*-openbsd* )
1208     case "${canonical}" in
1209       i386-*-openbsd*)          machine=intel386 ;;
1210       m68k-*-openbsd*)          machine=hp9000s300 ;;
1211       mipsel-*-openbsd*)        machine=pmax ;;
1212      esac
1213    ;;
1214
1215     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1216   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1217
1218     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1219   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1220
1221     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1222
1223     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1224
1225     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1226
1227     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1228
1229     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1230
1231     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1232   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1233   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1234
1235   
1236     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1237
1238     *-convex-bsd* | *-convex-convexos* )
1239     machine=convex opsys=bsd4-3
1240     NON_GNU_CPP="cc -E -P"
1241   ;;
1242
1243     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1244
1245     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1246   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1247   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1248   m88k-dg-dgux*                           ) opsys=dgux     ;;
1249
1250     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1251   m88k-motorola-sysv4* )
1252                     machine=delta88k opsys=usg5-4-2
1253   ;;
1254   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1255
1256     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1257   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1258
1259     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1260
1261     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1262   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1263   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1264
1265       m88k-harris-cxux* )
1266         case "`uname -r`" in
1267        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1268        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1269     esac
1270     NON_GNU_CPP="/lib/cpp"
1271   ;;
1272     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1273     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1274
1275     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1276
1277     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1278
1279     *-hp-hpux* )
1280         case "$canonical" in
1281       m68*  ) machine=hp9000s300 ;;
1282       hppa* ) machine=hp800      ;;
1283     esac
1284
1285     case "$canonical" in
1286       *-hp-hpux7*  )  opsys=hpux   ;;
1287       *-hp-hpux8*  )  opsys=hpux8  ;;
1288       *-hp-hpux9*  )  opsys=hpux9  ;;
1289       *-hp-hpux10* )  opsys=hpux10 ;;
1290       *-hp-hpux11* )  opsys=hpux11 ;;
1291       *            )  opsys=hpux   ;;
1292     esac
1293
1294         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1295    echo "    xemacs will be linked with \"strcat.o\""
1296  fi ;; esac
1297
1298     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1299         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1300     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1301
1302     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1303   ;;
1304
1305     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1306   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1307
1308     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1309   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1310   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1311   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1312   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1313   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1314
1315     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1316   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1317
1318     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1319
1320     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1321
1322     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1323
1324     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1325
1326       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1327
1328     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1329
1330     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1331
1332     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1333
1334     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1335
1336         mips-mips-usg* ) machine=mips4 ;;
1337   mips-mips-riscos4 )
1338     machine=mips4
1339     NON_GNU_CC="cc -systype bsd43"
1340     NON_GNU_CPP="cc -systype bsd43 -E"
1341     case "$canonical" in
1342       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1343       mips-mips-riscos5* ) opsys=riscos5 ;;
1344     esac
1345   ;;
1346   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1347   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1348
1349     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1350
1351     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1352
1353     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1354   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1355
1356     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1357
1358     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1359
1360     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1361
1362     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1363
1364     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1365   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1366
1367     mips-siemens-sysv* | mips-sni-sysv*)
1368     machine=mips-siemens opsys=usg5-4
1369     NON_GNU_CC=/usr/ccs/bin/cc
1370     NON_GNU_CPP=/usr/ccs/lib/cpp
1371   ;;
1372
1373     mips-nec-sysv*)
1374     machine=mips-nec
1375     NON_GNU_CC=/usr/ccs/bin/cc
1376     NON_GNU_CPP=/usr/ccs/lib/cpp
1377   ;;
1378
1379       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1380   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1381     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1382   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1383   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1384   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1385   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1386   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1387   mips-sgi-irix*      ) opsys=irix5-0 ;;
1388
1389     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1390   *-sony-news* ) opsys=newsos5 ;;
1391
1392     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1393
1394     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1395         case "$canonical" in
1396       m68*-sunos1* )             machine=sun1     ;;
1397       m68*-sunos2* )             machine=sun2     ;;
1398       m68* )                     machine=sun3     ;;
1399       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1400       i*86-*-* )                 machine=intel386 ;;
1401       rs6000* )                  machine=rs6000   ;;
1402     esac
1403
1404         case "$canonical" in *-sunos5*)
1405       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1406     esac
1407
1408                     case "$canonical" in
1409       *-sunos4* )
1410         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1411         : ;;
1412       *-solaris2* )
1413         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1414         RANLIB=':' ;;
1415     esac
1416
1417     case "$canonical" in
1418       *-solaris*          )
1419         opsys=sol2
1420         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1421         { test "$extra_verbose" = "yes" && cat << EOF
1422     Defining OS_RELEASE = $os_release
1423 EOF
1424 cat >> confdefs.h <<EOF
1425 #define OS_RELEASE $os_release
1426 EOF
1427 }
1428  ;;
1429
1430             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1431       *-sunos4.0*         ) opsys=sunos4-0      ;;
1432       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1433       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1434       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1435       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1436       *-mach*             ) opsys=mach-bsd4-3   ;;
1437       *                   ) opsys=bsd4-2        ;;
1438     esac
1439
1440     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1441
1442         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1443   ;;
1444
1445     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1446
1447     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1448   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1449
1450     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1451
1452     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1453
1454     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1455       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1456
1457     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1458
1459     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1460
1461     vax-dec-* )
1462     case "$canonical" in
1463       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1464       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1465       *-mach* )                         opsys=mach-bsd4-3 ;;
1466     esac
1467   ;;
1468
1469     ns16k-whitechapel-* ) machine=mg1 ;;
1470
1471     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1472
1473     i[3-9]86-*-* )
1474     machine=intel386
1475     case "$canonical" in
1476       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1477       *-isc2.2* )               opsys=isc2-2 ;;
1478       *-isc4.0* )               opsys=isc4-0 ;;
1479       *-isc4.* )                opsys=isc4-1
1480                                 GCC_TEST_OPTIONS=-posix
1481                                 NON_GCC_TEST_OPTIONS=-Xp
1482                                 ;;
1483       *-isc* )                  opsys=isc3-0 ;;
1484       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1485       *-esix* )                 opsys=esix ;;
1486       *-mach* )                 opsys=mach-bsd4-3 ;;
1487       *-xenix* )                opsys=xenix ;;
1488       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1489       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1490       *-bsdi4* )                opsys=bsdos4 ;;
1491       *-bsdi3* )                opsys=bsdos3 ;;
1492       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1493       *-bsdi2* )                opsys=bsdos2 ;;
1494       *-sco3.2v5* )             opsys=sco5 ;;
1495       *-sysv5* )                opsys=sco7 ;;
1496       *-386bsd* )               opsys=386bsd ;;
1497       *-freebsd* )              opsys=freebsd ;;
1498       *-nextstep* )             opsys=nextstep ;;
1499       *-pc-cygwin* )            opsys=cygwin32 ;;
1500       *-pc-mingw* )             opsys=mingw32 ;
1501                                 test -z "$with_tty" && with_tty="no";;
1502           esac
1503   ;;
1504
1505     m68k-*-linux* ) machine=m68k opsys=linux ;;
1506
1507 esac
1508
1509 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1510
1511 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1512
1513 if test -r "${srcdir}/src/m/${machine}.h"; then
1514   machfile="m/${machine}.h"
1515   { test "$extra_verbose" = "yes" && cat << EOF
1516     Defining config_machfile = "$machfile"
1517 EOF
1518 cat >> confdefs.h <<EOF
1519 #define config_machfile "$machfile"
1520 EOF
1521 }
1522
1523 else
1524   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1525   echo "Using configure-time autodetection only."
1526 fi
1527
1528 if test -r "${srcdir}/src/s/${opsys}.h"; then
1529   opsysfile="s/${opsys}.h"
1530   { test "$extra_verbose" = "yes" && cat << EOF
1531     Defining config_opsysfile = "$opsysfile"
1532 EOF
1533 cat >> confdefs.h <<EOF
1534 #define config_opsysfile "$opsysfile"
1535 EOF
1536 }
1537
1538 else
1539   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1540   echo "Using configure-time autodetection only."
1541 fi
1542
1543
1544 if test -z "$dynamic"; then
1545   case "$opsys" in
1546     hpux* | sunos4* ) dynamic=no ;;
1547     *) dynamic=yes ;;
1548   esac
1549 fi
1550 if test "$dynamic" = "yes"; then
1551   case "$opsys" in
1552     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1553     decosf* ) ld_call_shared="-call_shared" ;;
1554   esac
1555 else   case "$opsys" in
1556     sol2 )
1557       echo "Static linking is not supported on Solaris 2."
1558       echo "Rerun configure without specifying --dynamic=no."
1559       exit 1 ;;
1560     linux   ) ld_call_shared="-Bstatic" ;;
1561     decosf* ) ld_call_shared="-non_shared" ;;
1562   esac
1563 fi
1564
1565 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1566
1567 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1568 { test "$extra_verbose" = "yes" && cat << EOF
1569     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1570 EOF
1571 cat >> confdefs.h <<EOF
1572 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1573 EOF
1574 }
1575
1576
1577
1578 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1579 if test "$with_workshop $with_tooltalk" = "yes no"; then
1580   (echo "$progname: Usage error:"
1581 echo " " "--with-workshop requires --with-tooltalk"
1582 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1583 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1584 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1585 fi
1586
1587 if test "$with_workshop" = "yes"; then
1588   { test "$extra_verbose" = "yes" && cat << \EOF
1589     Defining SUNPRO
1590 EOF
1591 cat >> confdefs.h <<\EOF
1592 #define SUNPRO 1
1593 EOF
1594 }
1595
1596   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1597    echo "    xemacs will be linked with \"sunpro.o\""
1598  fi
1599 fi
1600
1601 if test "$with_clash_detection" != "no"; then
1602   { test "$extra_verbose" = "yes" && cat << \EOF
1603     Defining CLASH_DETECTION
1604 EOF
1605 cat >> confdefs.h <<\EOF
1606 #define CLASH_DETECTION 1
1607 EOF
1608 }
1609
1610   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1611    echo "    xemacs will be linked with \"filelock.o\""
1612  fi
1613 fi
1614
1615 test -n "$compiler" && CC="$compiler"
1616 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1617 fi
1618
1619 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1620 if test "${CFLAGS-unset}" != unset
1621   then cflags_specified=yes;
1622   else cflags_specified=no;
1623 fi
1624
1625 xe_save_CFLAGS="$CFLAGS"
1626
1627 # Extract the first word of "gcc", so it can be a program name with args.
1628 set dummy gcc; ac_word=$2
1629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1630 echo "configure:1631: checking for $ac_word" >&5
1631
1632 if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1636   ac_dummy="$PATH"
1637   for ac_dir in $ac_dummy; do
1638     test -z "$ac_dir" && ac_dir=.
1639     if test -f $ac_dir/$ac_word; then
1640       ac_cv_prog_CC="gcc"
1641       break
1642     fi
1643   done
1644   IFS="$ac_save_ifs"
1645 fi
1646 CC="$ac_cv_prog_CC"
1647 if test -n "$CC"; then
1648   echo "$ac_t""$CC" 1>&6
1649 else
1650   echo "$ac_t""no" 1>&6
1651 fi
1652
1653 if test -z "$CC"; then
1654   # Extract the first word of "cc", so it can be a program name with args.
1655 set dummy cc; ac_word=$2
1656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1657 echo "configure:1658: checking for $ac_word" >&5
1658
1659 if test -n "$CC"; then
1660   ac_cv_prog_CC="$CC" # Let the user override the test.
1661 else
1662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1663   ac_prog_rejected=no
1664   ac_dummy="$PATH"
1665   for ac_dir in $ac_dummy; do
1666     test -z "$ac_dir" && ac_dir=.
1667     if test -f $ac_dir/$ac_word; then
1668       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1669         ac_prog_rejected=yes
1670         continue
1671       fi
1672       ac_cv_prog_CC="cc"
1673       break
1674     fi
1675   done
1676   IFS="$ac_save_ifs"
1677 if test $ac_prog_rejected = yes; then
1678   # We found a bogon in the path, so make sure we never use it.
1679   set dummy $ac_cv_prog_CC
1680   shift
1681   if test $# -gt 0; then
1682     # We chose a different compiler from the bogus one.
1683     # However, it has the same basename, so the bogon will be chosen
1684     # first if we set CC to just the basename; use the full file name.
1685     shift
1686     set dummy "$ac_dir/$ac_word" "$@"
1687     shift
1688     ac_cv_prog_CC="$@"
1689   fi
1690 fi
1691 fi
1692 CC="$ac_cv_prog_CC"
1693 if test -n "$CC"; then
1694   echo "$ac_t""$CC" 1>&6
1695 else
1696   echo "$ac_t""no" 1>&6
1697 fi
1698
1699   if test -z "$CC"; then
1700     case "`uname -s`" in
1701     *win32* | *WIN32*)
1702       # Extract the first word of "cl", so it can be a program name with args.
1703 set dummy cl; ac_word=$2
1704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1705 echo "configure:1706: checking for $ac_word" >&5
1706
1707 if test -n "$CC"; then
1708   ac_cv_prog_CC="$CC" # Let the user override the test.
1709 else
1710   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1711   ac_dummy="$PATH"
1712   for ac_dir in $ac_dummy; do
1713     test -z "$ac_dir" && ac_dir=.
1714     if test -f $ac_dir/$ac_word; then
1715       ac_cv_prog_CC="cl"
1716       break
1717     fi
1718   done
1719   IFS="$ac_save_ifs"
1720 fi
1721 CC="$ac_cv_prog_CC"
1722 if test -n "$CC"; then
1723   echo "$ac_t""$CC" 1>&6
1724 else
1725   echo "$ac_t""no" 1>&6
1726 fi
1727  ;;
1728     esac
1729   fi
1730   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1731 fi
1732
1733 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1734 echo "configure:1735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1735
1736 ac_ext=c
1737 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1738 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1739 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'
1740 ac_cpp='$CPP '"$xe_cppflags"
1741 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1742 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1743 cross_compiling=no
1744
1745 cat > conftest.$ac_ext << EOF
1746
1747 #line 1748 "configure"
1748 #include "confdefs.h"
1749
1750 main(){return(0);}
1751 EOF
1752 if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1753   ac_cv_prog_cc_works=yes
1754   # If we can't run a trivial program, we are probably using a cross compiler.
1755   if (./conftest; exit) 2>/dev/null; then
1756     ac_cv_prog_cc_cross=no
1757   else
1758     ac_cv_prog_cc_cross=yes
1759   fi
1760 else
1761   echo "configure: failed program was:" >&5
1762   cat conftest.$ac_ext >&5
1763   ac_cv_prog_cc_works=no
1764 fi
1765 rm -fr conftest*
1766 ac_ext=c
1767 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1768 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1769 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'
1770 ac_cpp='$CPP '"$xe_cppflags"
1771 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1772 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1773 cross_compiling=no
1774
1775 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1776 if test $ac_cv_prog_cc_works = no; then
1777   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1778 fi
1779 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1780 echo "configure:1781: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1781 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1782 cross_compiling=$ac_cv_prog_cc_cross
1783
1784 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1785 echo "configure:1786: checking whether we are using GNU C" >&5
1786
1787 cat > conftest.c <<EOF
1788 #ifdef __GNUC__
1789   yes;
1790 #endif
1791 EOF
1792 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1793   ac_cv_prog_gcc=yes
1794 else
1795   ac_cv_prog_gcc=no
1796 fi
1797
1798 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1799
1800 if test $ac_cv_prog_gcc = yes; then
1801   GCC=yes
1802 else
1803   GCC=
1804 fi
1805
1806 ac_test_CFLAGS="${CFLAGS+set}"
1807 ac_save_CFLAGS="$CFLAGS"
1808 CFLAGS=
1809 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1810 echo "configure:1811: checking whether ${CC-cc} accepts -g" >&5
1811
1812 echo 'void f(){}' > conftest.c
1813 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1814   ac_cv_prog_cc_g=yes
1815 else
1816   ac_cv_prog_cc_g=no
1817 fi
1818 rm -f conftest*
1819
1820
1821 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1822 if test "$ac_test_CFLAGS" = set; then
1823   CFLAGS="$ac_save_CFLAGS"
1824 elif test $ac_cv_prog_cc_g = yes; then
1825   if test "$GCC" = yes; then
1826     CFLAGS="-g -O2"
1827   else
1828     CFLAGS="-g"
1829   fi
1830 else
1831   if test "$GCC" = yes; then
1832     CFLAGS="-O2"
1833   else
1834     CFLAGS=
1835   fi
1836 fi
1837  
1838 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1839   CC=${NON_GNU_CC-cc}
1840   # Extract the first word of "gcc", so it can be a program name with args.
1841 set dummy gcc; ac_word=$2
1842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1843 echo "configure:1844: checking for $ac_word" >&5
1844
1845 if test -n "$CC"; then
1846   ac_cv_prog_CC="$CC" # Let the user override the test.
1847 else
1848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1849   ac_dummy="$PATH"
1850   for ac_dir in $ac_dummy; do
1851     test -z "$ac_dir" && ac_dir=.
1852     if test -f $ac_dir/$ac_word; then
1853       ac_cv_prog_CC="gcc"
1854       break
1855     fi
1856   done
1857   IFS="$ac_save_ifs"
1858 fi
1859 CC="$ac_cv_prog_CC"
1860 if test -n "$CC"; then
1861   echo "$ac_t""$CC" 1>&6
1862 else
1863   echo "$ac_t""no" 1>&6
1864 fi
1865
1866 if test -z "$CC"; then
1867   # Extract the first word of "cc", so it can be a program name with args.
1868 set dummy cc; ac_word=$2
1869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1870 echo "configure:1871: checking for $ac_word" >&5
1871
1872 if test -n "$CC"; then
1873   ac_cv_prog_CC="$CC" # Let the user override the test.
1874 else
1875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1876   ac_prog_rejected=no
1877   ac_dummy="$PATH"
1878   for ac_dir in $ac_dummy; do
1879     test -z "$ac_dir" && ac_dir=.
1880     if test -f $ac_dir/$ac_word; then
1881       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1882         ac_prog_rejected=yes
1883         continue
1884       fi
1885       ac_cv_prog_CC="cc"
1886       break
1887     fi
1888   done
1889   IFS="$ac_save_ifs"
1890 if test $ac_prog_rejected = yes; then
1891   # We found a bogon in the path, so make sure we never use it.
1892   set dummy $ac_cv_prog_CC
1893   shift
1894   if test $# -gt 0; then
1895     # We chose a different compiler from the bogus one.
1896     # However, it has the same basename, so the bogon will be chosen
1897     # first if we set CC to just the basename; use the full file name.
1898     shift
1899     set dummy "$ac_dir/$ac_word" "$@"
1900     shift
1901     ac_cv_prog_CC="$@"
1902   fi
1903 fi
1904 fi
1905 CC="$ac_cv_prog_CC"
1906 if test -n "$CC"; then
1907   echo "$ac_t""$CC" 1>&6
1908 else
1909   echo "$ac_t""no" 1>&6
1910 fi
1911
1912   if test -z "$CC"; then
1913     case "`uname -s`" in
1914     *win32* | *WIN32*)
1915       # Extract the first word of "cl", so it can be a program name with args.
1916 set dummy cl; ac_word=$2
1917 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1918 echo "configure:1919: checking for $ac_word" >&5
1919
1920 if test -n "$CC"; then
1921   ac_cv_prog_CC="$CC" # Let the user override the test.
1922 else
1923   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1924   ac_dummy="$PATH"
1925   for ac_dir in $ac_dummy; do
1926     test -z "$ac_dir" && ac_dir=.
1927     if test -f $ac_dir/$ac_word; then
1928       ac_cv_prog_CC="cl"
1929       break
1930     fi
1931   done
1932   IFS="$ac_save_ifs"
1933 fi
1934 CC="$ac_cv_prog_CC"
1935 if test -n "$CC"; then
1936   echo "$ac_t""$CC" 1>&6
1937 else
1938   echo "$ac_t""no" 1>&6
1939 fi
1940  ;;
1941     esac
1942   fi
1943   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1944 fi
1945
1946 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1947 echo "configure:1948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1948
1949 ac_ext=c
1950 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1951 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1952 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'
1953 ac_cpp='$CPP '"$xe_cppflags"
1954 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1955 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1956 cross_compiling=no
1957
1958 cat > conftest.$ac_ext << EOF
1959
1960 #line 1961 "configure"
1961 #include "confdefs.h"
1962
1963 main(){return(0);}
1964 EOF
1965 if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1966   ac_cv_prog_cc_works=yes
1967   # If we can't run a trivial program, we are probably using a cross compiler.
1968   if (./conftest; exit) 2>/dev/null; then
1969     ac_cv_prog_cc_cross=no
1970   else
1971     ac_cv_prog_cc_cross=yes
1972   fi
1973 else
1974   echo "configure: failed program was:" >&5
1975   cat conftest.$ac_ext >&5
1976   ac_cv_prog_cc_works=no
1977 fi
1978 rm -fr conftest*
1979 ac_ext=c
1980 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1981 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1982 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'
1983 ac_cpp='$CPP '"$xe_cppflags"
1984 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1985 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1986 cross_compiling=no
1987
1988 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1989 if test $ac_cv_prog_cc_works = no; then
1990   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1991 fi
1992 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1993 echo "configure:1994: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1994 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1995 cross_compiling=$ac_cv_prog_cc_cross
1996
1997 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1998 echo "configure:1999: checking whether we are using GNU C" >&5
1999
2000 cat > conftest.c <<EOF
2001 #ifdef __GNUC__
2002   yes;
2003 #endif
2004 EOF
2005 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2006   ac_cv_prog_gcc=yes
2007 else
2008   ac_cv_prog_gcc=no
2009 fi
2010
2011 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2012
2013 if test $ac_cv_prog_gcc = yes; then
2014   GCC=yes
2015 else
2016   GCC=
2017 fi
2018
2019 ac_test_CFLAGS="${CFLAGS+set}"
2020 ac_save_CFLAGS="$CFLAGS"
2021 CFLAGS=
2022 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2023 echo "configure:2024: checking whether ${CC-cc} accepts -g" >&5
2024
2025 echo 'void f(){}' > conftest.c
2026 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2027   ac_cv_prog_cc_g=yes
2028 else
2029   ac_cv_prog_cc_g=no
2030 fi
2031 rm -f conftest*
2032
2033
2034 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2035 if test "$ac_test_CFLAGS" = set; then
2036   CFLAGS="$ac_save_CFLAGS"
2037 elif test $ac_cv_prog_cc_g = yes; then
2038   if test "$GCC" = yes; then
2039     CFLAGS="-g -O2"
2040   else
2041     CFLAGS="-g"
2042   fi
2043 else
2044   if test "$GCC" = yes; then
2045     CFLAGS="-O2"
2046   else
2047     CFLAGS=
2048   fi
2049 fi
2050
2051 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2052   CC=gcc
2053   # Extract the first word of "gcc", so it can be a program name with args.
2054 set dummy gcc; ac_word=$2
2055 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2056 echo "configure:2057: checking for $ac_word" >&5
2057
2058 if test -n "$CC"; then
2059   ac_cv_prog_CC="$CC" # Let the user override the test.
2060 else
2061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2062   ac_dummy="$PATH"
2063   for ac_dir in $ac_dummy; do
2064     test -z "$ac_dir" && ac_dir=.
2065     if test -f $ac_dir/$ac_word; then
2066       ac_cv_prog_CC="gcc"
2067       break
2068     fi
2069   done
2070   IFS="$ac_save_ifs"
2071 fi
2072 CC="$ac_cv_prog_CC"
2073 if test -n "$CC"; then
2074   echo "$ac_t""$CC" 1>&6
2075 else
2076   echo "$ac_t""no" 1>&6
2077 fi
2078
2079 if test -z "$CC"; then
2080   # Extract the first word of "cc", so it can be a program name with args.
2081 set dummy cc; ac_word=$2
2082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_word" >&5
2084
2085 if test -n "$CC"; then
2086   ac_cv_prog_CC="$CC" # Let the user override the test.
2087 else
2088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2089   ac_prog_rejected=no
2090   ac_dummy="$PATH"
2091   for ac_dir in $ac_dummy; do
2092     test -z "$ac_dir" && ac_dir=.
2093     if test -f $ac_dir/$ac_word; then
2094       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2095         ac_prog_rejected=yes
2096         continue
2097       fi
2098       ac_cv_prog_CC="cc"
2099       break
2100     fi
2101   done
2102   IFS="$ac_save_ifs"
2103 if test $ac_prog_rejected = yes; then
2104   # We found a bogon in the path, so make sure we never use it.
2105   set dummy $ac_cv_prog_CC
2106   shift
2107   if test $# -gt 0; then
2108     # We chose a different compiler from the bogus one.
2109     # However, it has the same basename, so the bogon will be chosen
2110     # first if we set CC to just the basename; use the full file name.
2111     shift
2112     set dummy "$ac_dir/$ac_word" "$@"
2113     shift
2114     ac_cv_prog_CC="$@"
2115   fi
2116 fi
2117 fi
2118 CC="$ac_cv_prog_CC"
2119 if test -n "$CC"; then
2120   echo "$ac_t""$CC" 1>&6
2121 else
2122   echo "$ac_t""no" 1>&6
2123 fi
2124
2125   if test -z "$CC"; then
2126     case "`uname -s`" in
2127     *win32* | *WIN32*)
2128       # Extract the first word of "cl", so it can be a program name with args.
2129 set dummy cl; ac_word=$2
2130 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2131 echo "configure:2132: checking for $ac_word" >&5
2132
2133 if test -n "$CC"; then
2134   ac_cv_prog_CC="$CC" # Let the user override the test.
2135 else
2136   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2137   ac_dummy="$PATH"
2138   for ac_dir in $ac_dummy; do
2139     test -z "$ac_dir" && ac_dir=.
2140     if test -f $ac_dir/$ac_word; then
2141       ac_cv_prog_CC="cl"
2142       break
2143     fi
2144   done
2145   IFS="$ac_save_ifs"
2146 fi
2147 CC="$ac_cv_prog_CC"
2148 if test -n "$CC"; then
2149   echo "$ac_t""$CC" 1>&6
2150 else
2151   echo "$ac_t""no" 1>&6
2152 fi
2153  ;;
2154     esac
2155   fi
2156   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2157 fi
2158
2159 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2160 echo "configure:2161: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2161
2162 ac_ext=c
2163 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2164 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2165 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'
2166 ac_cpp='$CPP '"$xe_cppflags"
2167 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2168 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2169 cross_compiling=no
2170
2171 cat > conftest.$ac_ext << EOF
2172
2173 #line 2174 "configure"
2174 #include "confdefs.h"
2175
2176 main(){return(0);}
2177 EOF
2178 if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2179   ac_cv_prog_cc_works=yes
2180   # If we can't run a trivial program, we are probably using a cross compiler.
2181   if (./conftest; exit) 2>/dev/null; then
2182     ac_cv_prog_cc_cross=no
2183   else
2184     ac_cv_prog_cc_cross=yes
2185   fi
2186 else
2187   echo "configure: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189   ac_cv_prog_cc_works=no
2190 fi
2191 rm -fr conftest*
2192 ac_ext=c
2193 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2194 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2195 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'
2196 ac_cpp='$CPP '"$xe_cppflags"
2197 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2198 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2199 cross_compiling=no
2200
2201 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2202 if test $ac_cv_prog_cc_works = no; then
2203   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2204 fi
2205 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2206 echo "configure:2207: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2207 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2208 cross_compiling=$ac_cv_prog_cc_cross
2209
2210 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2211 echo "configure:2212: checking whether we are using GNU C" >&5
2212
2213 cat > conftest.c <<EOF
2214 #ifdef __GNUC__
2215   yes;
2216 #endif
2217 EOF
2218 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2219   ac_cv_prog_gcc=yes
2220 else
2221   ac_cv_prog_gcc=no
2222 fi
2223
2224 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2225
2226 if test $ac_cv_prog_gcc = yes; then
2227   GCC=yes
2228 else
2229   GCC=
2230 fi
2231
2232 ac_test_CFLAGS="${CFLAGS+set}"
2233 ac_save_CFLAGS="$CFLAGS"
2234 CFLAGS=
2235 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2236 echo "configure:2237: checking whether ${CC-cc} accepts -g" >&5
2237
2238 echo 'void f(){}' > conftest.c
2239 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2240   ac_cv_prog_cc_g=yes
2241 else
2242   ac_cv_prog_cc_g=no
2243 fi
2244 rm -f conftest*
2245
2246
2247 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2248 if test "$ac_test_CFLAGS" = set; then
2249   CFLAGS="$ac_save_CFLAGS"
2250 elif test $ac_cv_prog_cc_g = yes; then
2251   if test "$GCC" = yes; then
2252     CFLAGS="-g -O2"
2253   else
2254     CFLAGS="-g"
2255   fi
2256 else
2257   if test "$GCC" = yes; then
2258     CFLAGS="-O2"
2259   else
2260     CFLAGS=
2261   fi
2262 fi
2263
2264 fi
2265 CFLAGS="$xe_save_CFLAGS"
2266
2267
2268 test -n "$CPP" -a -d "$CPP" && CPP=
2269
2270 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2271
2272 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2273 echo "configure:2274: checking how to run the C preprocessor" >&5
2274 # On Suns, sometimes $CPP names a directory.
2275 if test -n "$CPP" && test -d "$CPP"; then
2276   CPP=
2277 fi
2278 if test -z "$CPP"; then
2279
2280   # This must be in double quotes, not single quotes, because CPP may get
2281   # substituted into the Makefile and "${CC-cc}" will confuse make.
2282   CPP="${CC-cc} -E"
2283   # On the NeXT, cc -E runs the code through the compiler's parser,
2284   # not just through cpp.
2285   cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <assert.h>
2289 Syntax Error
2290 EOF
2291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2292 { (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2294 if test -z "$ac_err"; then
2295   :
2296 else
2297   echo "$ac_err" >&5
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   CPP="${CC-cc} -E -traditional-cpp"
2302   cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #include <assert.h>
2306 Syntax Error
2307 EOF
2308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2309 { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2311 if test -z "$ac_err"; then
2312   :
2313 else
2314   echo "$ac_err" >&5
2315   echo "configure: failed program was:" >&5
2316   cat conftest.$ac_ext >&5
2317   rm -rf conftest*
2318   CPP="${CC-cc} -nologo -E"
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <assert.h>
2323 Syntax Error
2324 EOF
2325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2326 { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328 if test -z "$ac_err"; then
2329   :
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   CPP=/lib/cpp
2336 fi
2337 rm -f conftest*
2338 fi
2339 rm -f conftest*
2340 fi
2341 rm -f conftest*
2342   ac_cv_prog_CPP="$CPP"
2343   CPP="$ac_cv_prog_CPP"
2344 else
2345   ac_cv_prog_CPP="$CPP"
2346 fi
2347 echo "$ac_t""$CPP" 1>&6
2348
2349
2350
2351 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2352 echo "configure:2353: checking for AIX" >&5
2353 cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 #ifdef _AIX
2357   yes
2358 #endif
2359
2360 EOF
2361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2362   egrep "yes" >/dev/null 2>&1; then
2363   rm -rf conftest*
2364   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2365     Defining _ALL_SOURCE
2366 EOF
2367 cat >> confdefs.h <<\EOF
2368 #define _ALL_SOURCE 1
2369 EOF
2370 }
2371
2372 else
2373   rm -rf conftest*
2374   echo "$ac_t""no" 1>&6
2375 fi
2376 rm -f conftest*
2377
2378  
2379
2380 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2381 echo "configure:2382: checking for GNU libc" >&5
2382 cat > conftest.$ac_ext <<EOF
2383 #line 2384 "configure"
2384 #include "confdefs.h"
2385 #include <features.h>
2386 int main() {
2387
2388 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2389 #error Not a GNU libc system :-(
2390 ******* ======= ******** &&&&&&&&
2391 #endif
2392
2393 ; return 0; }
2394 EOF
2395 if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2396   rm -rf conftest*
2397   have_glibc=yes
2398 else
2399   echo "configure: failed program was:" >&5
2400   cat conftest.$ac_ext >&5
2401   rm -rf conftest*
2402   have_glibc=no
2403 fi
2404 rm -f conftest*
2405 echo "$ac_t""$have_glibc" 1>&6
2406 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2407     Defining _GNU_SOURCE
2408 EOF
2409 cat >> confdefs.h <<\EOF
2410 #define _GNU_SOURCE 1
2411 EOF
2412 }
2413
2414
2415 case "$opsys" in
2416   sol2)
2417    { test "$extra_verbose" = "yes" && cat << \EOF
2418     Defining __EXTENSIONS__
2419 EOF
2420 cat >> confdefs.h <<\EOF
2421 #define __EXTENSIONS__ 1
2422 EOF
2423 }
2424
2425       if test "$os_release" -ge 55; then
2426      { test "$extra_verbose" = "yes" && cat << \EOF
2427     Defining _XOPEN_SOURCE = 500
2428 EOF
2429 cat >> confdefs.h <<\EOF
2430 #define _XOPEN_SOURCE 500
2431 EOF
2432 }
2433
2434      { test "$extra_verbose" = "yes" && cat << \EOF
2435     Defining _XOPEN_SOURCE_EXTENDED
2436 EOF
2437 cat >> confdefs.h <<\EOF
2438 #define _XOPEN_SOURCE_EXTENDED 1
2439 EOF
2440 }
2441
2442    fi ;;
2443   linux)
2444     { test "$extra_verbose" = "yes" && cat << \EOF
2445     Defining _POSIX_C_SOURCE = 199506L
2446 EOF
2447 cat >> confdefs.h <<\EOF
2448 #define _POSIX_C_SOURCE 199506L
2449 EOF
2450 }
2451
2452     { test "$extra_verbose" = "yes" && cat << \EOF
2453     Defining _XOPEN_SOURCE = 500
2454 EOF
2455 cat >> confdefs.h <<\EOF
2456 #define _XOPEN_SOURCE 500
2457 EOF
2458 }
2459
2460     { test "$extra_verbose" = "yes" && cat << \EOF
2461     Defining _XOPEN_SOURCE_EXTENDED
2462 EOF
2463 cat >> confdefs.h <<\EOF
2464 #define _XOPEN_SOURCE_EXTENDED 1
2465 EOF
2466 }
2467
2468     ;;
2469 esac
2470
2471 cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 int main () {
2475 #if defined __SUNPRO_C
2476 return 11;
2477 #elif defined __DECC
2478 return 12;
2479 #elif defined __USLC__ && defined __SCO_VERSION__
2480 return 13;
2481 #else
2482 return 0;
2483 #endif
2484 }
2485 EOF
2486 if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2487 then
2488   :
2489 else
2490   conftest_rc="$?"
2491   echo "configure: failed program was:" >&5
2492   cat conftest.$ac_ext >&5
2493   rm -fr conftest*
2494   case "$conftest_rc" in
2495   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2496   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2497   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2498 esac
2499 fi
2500 rm -fr conftest*
2501
2502
2503
2504
2505 echo "Extracting information from the machine- and system-dependent headers..."
2506
2507 tempcname="conftest.c"
2508
2509
2510
2511 cat > $tempcname < confdefs.h
2512 cat >> $tempcname <<EOF
2513 #define NOT_C_CODE
2514 #define C_SWITCH_SITE
2515 #define C_SWITCH_X_SITE
2516 #define LD_SWITCH_SITE
2517 #define LD_SWITCH_X_SITE
2518 #define LD_SWITCH_X_SITE_AUX
2519 #define OS_RELEASE $os_release
2520
2521 #ifdef config_opsysfile
2522 #include "$srcdir/src/$opsysfile"
2523 #endif
2524
2525 #ifdef config_machfile
2526 #include "$srcdir/src/$machfile"
2527 #endif
2528
2529 #ifndef LIBS_MACHINE
2530 #define LIBS_MACHINE
2531 #endif
2532 configure___ libs_machine=LIBS_MACHINE
2533
2534 #ifndef LIBS_SYSTEM
2535 #define LIBS_SYSTEM
2536 #endif
2537 configure___ libs_system=LIBS_SYSTEM
2538
2539 #ifndef LIBS_TERMCAP
2540 #define LIBS_TERMCAP
2541 #endif
2542 configure___ libs_termcap=LIBS_TERMCAP
2543
2544 #ifndef LIB_STANDARD
2545 #define LIB_STANDARD
2546 #endif
2547 configure___ libs_standard=LIB_STANDARD
2548
2549
2550 #ifndef OBJECTS_MACHINE
2551 #define OBJECTS_MACHINE
2552 #endif
2553 configure___ objects_machine=OBJECTS_MACHINE
2554
2555 #ifndef OBJECTS_SYSTEM
2556 #define OBJECTS_SYSTEM
2557 #endif
2558 configure___ objects_system=OBJECTS_SYSTEM
2559
2560
2561 #ifndef C_SWITCH_MACHINE
2562 #define C_SWITCH_MACHINE
2563 #endif
2564 configure___ c_switch_machine=C_SWITCH_MACHINE
2565
2566 #ifndef C_SWITCH_SYSTEM
2567 #define C_SWITCH_SYSTEM
2568 #endif
2569 configure___ c_switch_system=C_SWITCH_SYSTEM
2570
2571
2572 #ifndef LD_SWITCH_MACHINE
2573 #define LD_SWITCH_MACHINE
2574 #endif
2575 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2576
2577 #ifndef LD_SWITCH_SYSTEM
2578 #define LD_SWITCH_SYSTEM
2579 #endif
2580 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2581
2582
2583 #ifndef UNEXEC
2584 #define UNEXEC "unexec.o"
2585 #endif
2586 configure___ unexec=UNEXEC
2587
2588
2589 #ifndef LD_SWITCH_SHARED
2590 #define LD_SWITCH_SHARED "-c"
2591 #endif
2592 configure___ ld_switch_shared=LD_SWITCH_SHARED
2593
2594
2595 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2596 configure___ ordinary_ld=ORDINARY_LD
2597
2598 #ifdef ORDINARY_LINK
2599 #define LD ORDINARY_LD
2600 #else /* no ORDINARY LINK */
2601 #ifdef COFF_ENCAPSULATE
2602 #define LD "\$(CC) -nostdlib"
2603 #else /* not COFF_ENCAPSULATE */
2604 #ifdef LINKER
2605 #define LD LINKER
2606 #else /* ! defined (LINKER) */
2607 #define LD "ld"
2608 #endif /* ! defined (LINKER) */
2609 #endif /* ! defined (COFF_ENCAPSULATE) */
2610 #endif /* not ORDINARY_LINK */
2611 configure___ ld=LD
2612
2613 #ifndef LIB_GCC
2614 #define LIB_GCC
2615 #endif
2616 configure___ lib_gcc=LIB_GCC
2617
2618 #ifndef LD_TEXT_START_ADDR
2619 #define LD_TEXT_START_ADDR
2620 #endif
2621 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2622
2623
2624 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2625 #ifdef NO_REMAP
2626 #ifdef COFF_ENCAPSULATE
2627 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2628 #else /* ! defined (COFF_ENCAPSULATE) */
2629 #define START_FILES "pre-crt0.o /lib/crt0.o"
2630 #endif /* ! defined (COFF_ENCAPSULATE) */
2631 #else /* ! defined (NO_REMAP) */
2632 #define START_FILES "ecrt0.o"
2633 #endif /* ! defined (NO_REMAP) */
2634 #endif /* no ORDINARY_LINK */
2635 #ifndef START_FILES
2636 #define START_FILES
2637 #endif
2638 configure___ start_files=START_FILES
2639
2640 #ifdef ORDINARY_LINK
2641 configure___ ordinary_link=yes
2642 #else
2643 configure___ ordinary_link=no
2644 #endif
2645
2646 #ifdef SYSTEM_MALLOC
2647 configure___ system_malloc=yes
2648 #else
2649 configure___ system_malloc=no
2650 #endif
2651
2652 #ifdef TERMINFO
2653 configure___ have_terminfo=yes
2654 #else
2655 configure___ have_terminfo=no
2656 #endif
2657
2658 #ifdef MAIL_USE_FLOCK
2659 configure___ mail_use_flock=yes
2660 #else
2661 configure___ mail_use_flock=no
2662 #endif
2663
2664 #ifdef MAIL_USE_LOCKF
2665 configure___ mail_use_lockf=yes
2666 #else
2667 configure___ mail_use_lockf=no
2668 #endif
2669
2670 #ifdef MAIL_USE_LOCKING
2671 configure___ mail_use_locking=yes
2672 #else
2673 configure___ mail_use_locking=no
2674 #endif
2675
2676 #ifdef HAVE_WIN32_PROCESSES
2677 configure___ win32_processes=yes
2678 #else
2679 configure___ win32_processes=no
2680 #endif
2681
2682 EOF
2683
2684 CPP=`eval "echo $CPP $CPPFLAGS"`
2685 eval `$CPP -Isrc $tempcname \
2686         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2687
2688 rm $tempcname
2689
2690 if test "$pdump" = "yes"; then
2691   ordinary_link="yes"
2692   ld="${ordinary_ld}"
2693   start_files=
2694   libs_standard=
2695   unexec=
2696   lib_gcc=
2697 fi
2698
2699 test "$extra_verbose" = "yes" && \
2700   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 ""
2701
2702 case "$opsys" in mingw* | cygwin*)
2703   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2704   cygwin_include=`eval "dirname $cygwin_include"` ;
2705   cygwin_include="-I$cygwin_include/../include" ;
2706   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2707   case "$opsys" in mingw*)
2708     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2709   esac
2710   ;;
2711 esac
2712
2713 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2714
2715
2716 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2717
2718 if test "$__USLC__" = yes; then
2719   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2720 echo "configure:2721: checking for whether the -Kalloca compiler flag is needed" >&5
2721   need_kalloca=no
2722   cat > conftest.$ac_ext <<EOF
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725
2726 int main() {
2727 void *x = alloca(4);
2728 ; return 0; }
2729 EOF
2730 if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2731   rm -rf conftest*
2732   :
2733 else
2734   echo "configure: failed program was:" >&5
2735   cat conftest.$ac_ext >&5
2736   rm -rf conftest*
2737   
2738     xe_save_c_switch_system="$c_switch_system"
2739     c_switch_system="$c_switch_system -Kalloca"
2740     cat > conftest.$ac_ext <<EOF
2741 #line 2742 "configure"
2742 #include "confdefs.h"
2743
2744 int main() {
2745 void *x = alloca(4);
2746 ; return 0; }
2747 EOF
2748 if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2749   rm -rf conftest*
2750    need_kalloca=yes 
2751 else
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754 fi
2755 rm -f conftest*
2756     c_switch_system="$xe_save_c_switch_system"
2757 fi
2758 rm -f conftest*
2759   echo "$ac_t""$need_kalloca" 1>&6
2760   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
2761 fi
2762
2763 if test "$cflags_specified" = "no"; then
2764       if   test "$GCC" = "yes"; then
2765     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2766         CFLAGS="$CFLAGS -Wsign-compare"
2767             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2768               elif test "$__SUNPRO_C" = "yes"; then
2769     case "$opsys" in
2770       sol2    ) CFLAGS="-v -xO4" ;;
2771       sunos4* ) CFLAGS="-xO2";;
2772     esac
2773   elif test "$__DECC" = "yes"; then
2774     CFLAGS="-O3"
2775   elif test "$CC" = "xlc"; then
2776     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2777     else
2778     CFLAGS="-O" ;  fi
2779 fi
2780
2781 if test "$GCC" = "yes"; then
2782 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2783 echo "configure:2784: checking for buggy gcc versions" >&5
2784 GCC_VERSION=`$CC --version`
2785 case `uname -s`:`uname -m`:$GCC_VERSION in
2786                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2787                         case "$CFLAGS" in
2788             *-O2*|*-O3*)
2789                 case "$CFLAGS" in
2790                     *-fno-schedule-insns*) ;;
2791                     *)
2792                         echo "$ac_t""yes" 1>&6
2793                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2794                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2795                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2796                         ;;
2797                 esac
2798                 ;;
2799         esac
2800         ;;
2801                     Linux:alpha:egcs-2.91.*)
2802         echo "$ac_t""yes" 1>&6
2803         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2804         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2805         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2806         ;;
2807     *:i*86*:2.7.2*)
2808         case "$CFLAGS" in
2809             *-O2*|*-O3*)
2810                 case "$GCC_VERSION" in
2811                     2.7.2)
2812                         case "$CFLAGS" in
2813                             *-fno-strength-reduce*) ;;
2814                             *)
2815                                 echo "$ac_t""yes" 1>&6
2816                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2817                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2818                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2819                                 ;;
2820                         esac
2821                         ;;
2822                 esac
2823                 case "$CFLAGS" in
2824                  *-fno-caller-saves*) ;;
2825                  *)
2826                     echo "$ac_t""yes" 1>&6
2827                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2828                     echo "configure: warning: -fno-caller-saves." 1>&2
2829                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2830                     ;;
2831                 esac
2832                 ;;
2833         esac
2834         ;;
2835 esac
2836 echo "$ac_t""no" 1>&6
2837 fi
2838
2839
2840 if test "$GCC" = "yes"; then
2841   set x $ld_switch_system; shift; ld_switch_system=""
2842   while test -n "$1"; do
2843     case $1 in
2844       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2845       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2846       -Xlinker* ) ;;
2847       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2848     esac
2849     shift
2850   done
2851 fi
2852
2853 if test "$GCC" = "yes"; then
2854   set x $ld_switch_machine; shift; ld_switch_machine=""
2855   while test -n "$1"; do
2856     case $1 in
2857       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2858       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2859       -Xlinker* ) ;;
2860       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2861     esac
2862     shift
2863   done
2864 fi
2865
2866 if test "$GCC" = "yes"; then
2867   set x $LDFLAGS; shift; LDFLAGS=""
2868   while test -n "$1"; do
2869     case $1 in
2870       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2871       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2872       -Xlinker* ) ;;
2873       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2874     esac
2875     shift
2876   done
2877 fi
2878
2879 if test "$GCC" = "yes"; then
2880   set x $ld_call_shared; shift; ld_call_shared=""
2881   while test -n "$1"; do
2882     case $1 in
2883       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2884       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2885       -Xlinker* ) ;;
2886       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2887     esac
2888     shift
2889   done
2890 fi
2891
2892 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2893    echo "    xemacs will be linked with \"$objects_machine\""
2894  fi
2895 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2896    echo "    xemacs will be linked with \"$objects_system\""
2897  fi
2898 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2899    echo "    xemacs will be linked with \"$unexec\""
2900  fi
2901 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2902    echo "    xemacs will be linked with \"dumper.o\""
2903  fi
2904
2905 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2906 echo "configure:2907: checking for dynodump" >&5
2907 if test "$unexec" != "unexsol2.o"; then
2908   echo "$ac_t""no" 1>&6
2909 else
2910   echo "$ac_t""yes" 1>&6
2911   { test "$extra_verbose" = "yes" && cat << \EOF
2912     Defining DYNODUMP
2913 EOF
2914 cat >> confdefs.h <<\EOF
2915 #define DYNODUMP 1
2916 EOF
2917 }
2918
2919   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2920   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2921   case "$machine" in
2922     sparc   ) dynodump_arch=sparc ;;
2923     *86*    ) dynodump_arch=i386  ;;
2924     powerpc ) dynodump_arch=ppc   ;;
2925   esac
2926     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
2927 fi
2928
2929
2930 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2931
2932 if test "$unexec" = "unexaix.o"; then
2933   if   test "$dynamic" = "no"; then
2934   start_flags="-Wl,-bnso,-bnodelcsect"
2935   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2936   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2937     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2938   done
2939   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2940     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2941   done
2942   
2943 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2944 echo "configure:2945: checking for terminateAndUnload in -lC" >&5
2945 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2946
2947 xe_check_libs=" -lC "
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 /* Override any gcc2 internal prototype to avoid an error.  */
2952 /* We use char because int might match the return type of a gcc2
2953     builtin and then its argument prototype would still apply.  */
2954 char terminateAndUnload();
2955
2956 int main() {
2957 terminateAndUnload()
2958 ; return 0; }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=yes"
2963 else
2964   echo "configure: failed program was:" >&5
2965   cat conftest.$ac_ext >&5
2966   rm -rf conftest*
2967   eval "ac_cv_lib_$ac_lib_var=no"
2968 fi
2969 rm -f conftest*
2970 xe_check_libs=""
2971
2972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2973   echo "$ac_t""yes" 1>&6
2974   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978
2979
2980   fi
2981 elif test -n "$ld_text_start_addr"; then
2982   start_flags="-T $ld_text_start_addr -e __start"
2983 fi
2984
2985
2986
2987
2988 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2989  test -z "$linker" &&  linker='$(CC) -nostdlib'
2990  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2991 fi
2992 test "$GCC" != "yes" && lib_gcc=
2993
2994
2995
2996
2997
2998 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2999 if test -n "$site_libraries"; then
3000   for arg in $site_libraries; do
3001     case "$arg" in
3002      -* ) ;;
3003      * ) test -d "$arg" || \
3004            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3005        arg="-L${arg}" ;;
3006     esac
3007     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3008   done
3009 fi
3010
3011 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3012 if test -n "$site_includes"; then
3013   for arg in $site_includes; do
3014     case "$arg" in
3015       -* ) ;;
3016       * ) test -d "$arg" || \
3017            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3018       arg="-I${arg}" ;;
3019     esac
3020     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3021   done
3022 fi
3023
3024 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3025 if test -n "$site_prefixes"; then
3026   for dir in $site_prefixes; do
3027     lib_dir="${dir}/lib"
3028     inc_dir="${dir}/include"
3029     if test ! -d "$dir"; then
3030       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3031     elif test ! -d "$lib_dir"; then
3032       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3033     else
3034       if test -d "$inc_dir"; then
3035         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
3036       fi
3037       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
3038     fi
3039   done
3040 fi
3041
3042
3043 for dir in "/usr/ccs/lib"; do
3044   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
3045 done
3046
3047 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3048 if test -n "$site_runtime_libraries"; then
3049   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3050   export LD_RUN_PATH
3051 fi
3052
3053
3054
3055
3056
3057 if test -n "$add_runtime_path"; then :;
3058 elif test "$dynamic" = "no"; then add_runtime_path=no
3059 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3060 else case "$opsys" in
3061        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3062        * ) add_runtime_path=no ;;
3063      esac
3064 fi
3065
3066 if test "$add_runtime_path" = "yes"; then
3067       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3068 echo "configure:3069: checking "for runtime libraries flag"" >&5
3069   case "$opsys" in
3070     sol2 ) dash_r="-R" ;;
3071     decosf* | linux* | irix*) dash_r="-rpath " ;;
3072     *)
3073       dash_r=""
3074       for try_dash_r in "-R" "-R " "-rpath "; do
3075         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3076         
3077 if test "$GCC" = "yes"; then
3078   set x $xe_check_libs; shift; xe_check_libs=""
3079   while test -n "$1"; do
3080     case $1 in
3081       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3082       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3083       -Xlinker* ) ;;
3084       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3085     esac
3086     shift
3087   done
3088 fi
3089         cat > conftest.$ac_ext <<EOF
3090 #line 3091 "configure"
3091 #include "confdefs.h"
3092
3093 int main() {
3094
3095 ; return 0; }
3096 EOF
3097 if { (eval echo configure:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3098   rm -rf conftest*
3099   dash_r="$try_dash_r"
3100 else
3101   echo "configure: failed program was:" >&5
3102   cat conftest.$ac_ext >&5
3103 fi
3104 rm -f conftest*
3105         xe_check_libs=""
3106         test -n "$dash_r" && break
3107       done ;;
3108   esac
3109   if test -n "$dash_r";
3110     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3111     else echo "$ac_t""NONE" 1>&6
3112   fi
3113 fi
3114
3115 xe_add_unique_runpath_dir='
3116   xe_add_p=yes
3117   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3118   done
3119   if test "$xe_add_p" = "yes"; then
3120     test -n "$runpath" && runpath="${runpath}:"
3121     runpath="${runpath}${xe_runpath_dir}"
3122     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3123   fi'
3124
3125
3126
3127
3128 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3129     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3130   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3131   
3132         runpath="" runpath_dirs=""
3133   if test -n "$LD_RUN_PATH"; then
3134     runpath="$LD_RUN_PATH"
3135   elif test "$GCC" = "yes"; then
3136         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3137     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3138     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3139     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3140       case "$arg" in P,* | -L* | -R* )
3141         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3142           {
3143 xe_runpath_dir="$dir"
3144   test "$xe_runpath_dir" != "/lib"     -a \
3145         "$xe_runpath_dir" != "/usr/lib" -a \
3146         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3147   eval "$xe_add_unique_runpath_dir"
3148 }
3149         done ;;
3150       esac
3151     done
3152     ld_switch_run="$ld_switch_run_save"
3153     rm -f conftest*
3154   else
3155         for arg in $ld_switch_site $ld_switch_x_site; do
3156       case "$arg" in -L*) {
3157 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3158   test "$xe_runpath_dir" != "/lib"     -a \
3159         "$xe_runpath_dir" != "/usr/lib" -a \
3160         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3161   eval "$xe_add_unique_runpath_dir"
3162 };; esac
3163     done
3164         if test "$opsys $need_motif" = "sol2 yes"; then
3165       xe_runpath_dir="/opt/SUNWdt/lib";
3166       eval "$xe_add_unique_runpath_dir";
3167     fi
3168   fi 
3169   if test -n "$runpath"; then
3170     ld_switch_run="${dash_r}${runpath}"
3171     
3172 if test "$GCC" = "yes"; then
3173   set x $ld_switch_run; shift; ld_switch_run=""
3174   while test -n "$1"; do
3175     case $1 in
3176       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3177       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3178       -Xlinker* ) ;;
3179       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3180     esac
3181     shift
3182   done
3183 fi
3184     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3185   fi
3186 fi
3187
3188
3189
3190 GNU_MALLOC=yes
3191 if test "$with_dlmalloc" != "no"; then
3192         doug_lea_malloc=yes
3193 else
3194         doug_lea_malloc=no
3195 fi
3196 after_morecore_hook_exists=yes
3197 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3198 echo "configure:3199: checking for malloc_set_state" >&5
3199
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 /* System header to define __stub macros and hopefully few prototypes,
3204     which can conflict with char malloc_set_state(); below.  */
3205 #include <assert.h>
3206 /* Override any gcc2 internal prototype to avoid an error.  */
3207 /* We use char because int might match the return type of a gcc2
3208     builtin and then its argument prototype would still apply.  */
3209 char malloc_set_state();
3210
3211 int main() {
3212
3213 /* The GNU C library defines this for functions which it implements
3214     to always fail with ENOSYS.  Some functions are actually named
3215     something starting with __ and the normal name is an alias.  */
3216 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3217 choke me
3218 #else
3219 malloc_set_state();
3220 #endif
3221
3222 ; return 0; }
3223 EOF
3224 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3225   rm -rf conftest*
3226   eval "ac_cv_func_malloc_set_state=yes"
3227 else
3228   echo "configure: failed program was:" >&5
3229   cat conftest.$ac_ext >&5
3230   rm -rf conftest*
3231   eval "ac_cv_func_malloc_set_state=no"
3232 fi
3233 rm -f conftest*
3234
3235 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3236   echo "$ac_t""yes" 1>&6
3237   :
3238 else
3239   echo "$ac_t""no" 1>&6
3240 doug_lea_malloc=no
3241 fi
3242
3243 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3244 echo "configure:3245: checking whether __after_morecore_hook exists" >&5
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 extern void (* __after_morecore_hook)();
3249 int main() {
3250 __after_morecore_hook = 0
3251 ; return 0; }
3252 EOF
3253 if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3254   rm -rf conftest*
3255   echo "$ac_t""yes" 1>&6
3256 else
3257   echo "configure: failed program was:" >&5
3258   cat conftest.$ac_ext >&5
3259   rm -rf conftest*
3260   echo "$ac_t""no" 1>&6
3261    after_morecore_hook_exists=no
3262 fi
3263 rm -f conftest*
3264 if test "$system_malloc" = "yes" ; then
3265   GNU_MALLOC=no
3266   GNU_MALLOC_reason="
3267     - The GNU allocators don't work with this system configuration."
3268 elif test "$with_system_malloc" = "yes" ; then
3269   GNU_MALLOC=no
3270   GNU_MALLOC_reason="
3271     - User chose not to use GNU allocators."
3272 elif test "$with_debug_malloc" = "yes" ; then
3273   GNU_MALLOC=no
3274   GNU_MALLOC_reason="
3275     - User chose to use Debugging Malloc."
3276 fi
3277
3278 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3279   GNU_MALLOC_reason="
3280     - Using Doug Lea's new malloc from the GNU C Library."
3281   { test "$extra_verbose" = "yes" && cat << \EOF
3282     Defining DOUG_LEA_MALLOC
3283 EOF
3284 cat >> confdefs.h <<\EOF
3285 #define DOUG_LEA_MALLOC 1
3286 EOF
3287 }
3288
3289   if test "$after_morecore_hook_exists" = "no" ; then
3290     GNU_MALLOC_reason="
3291     - Using Doug Lea's new malloc from the Linux C Library."
3292     { test "$extra_verbose" = "yes" && cat << \EOF
3293     Defining _NO_MALLOC_WARNING_
3294 EOF
3295 cat >> confdefs.h <<\EOF
3296 #define _NO_MALLOC_WARNING_ 1
3297 EOF
3298 }
3299
3300   fi
3301 fi
3302
3303
3304
3305
3306 # Extract the first word of "ranlib", so it can be a program name with args.
3307 set dummy ranlib; ac_word=$2
3308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_word" >&5
3310
3311 if test -n "$RANLIB"; then
3312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_RANLIB="ranlib"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3325 fi
3326 RANLIB="$ac_cv_prog_RANLIB"
3327 if test -n "$RANLIB"; then
3328   echo "$ac_t""$RANLIB" 1>&6
3329 else
3330   echo "$ac_t""no" 1>&6
3331 fi
3332
3333 ac_aux_dir=
3334 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3335   if test -f $ac_dir/install-sh; then
3336     ac_aux_dir=$ac_dir
3337     ac_install_sh="$ac_aux_dir/install-sh -c"
3338     break
3339   elif test -f $ac_dir/install.sh; then
3340     ac_aux_dir=$ac_dir
3341     ac_install_sh="$ac_aux_dir/install.sh -c"
3342     break
3343   fi
3344 done
3345 if test -z "$ac_aux_dir"; then
3346   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3347 fi
3348 ac_config_guess=$ac_aux_dir/config.guess
3349 ac_config_sub=$ac_aux_dir/config.sub
3350 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3351
3352 # Find a good install program.  We prefer a C program (faster),
3353 # so one script is as good as another.  But avoid the broken or
3354 # incompatible versions:
3355 # SysV /etc/install, /usr/sbin/install
3356 # SunOS /usr/etc/install
3357 # IRIX /sbin/install
3358 # AIX /bin/install
3359 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3360 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3361 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3362 # ./install, which can be erroneously created by make from ./install.sh.
3363 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3364 echo "configure:3365: checking for a BSD compatible install" >&5
3365 if test -z "$INSTALL"; then
3366
3367   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3368   for ac_dir in $PATH; do
3369     # Account for people who put trailing slashes in PATH elements.
3370     case "$ac_dir/" in
3371     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3372     *)
3373       # OSF1 and SCO ODT 3.0 have their own names for install.
3374       # Don't use installbsd from OSF since it installs stuff as root
3375       # by default.
3376       for ac_prog in ginstall scoinst install; do
3377         if test -f $ac_dir/$ac_prog; then
3378           if test $ac_prog = install &&
3379             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3380             # AIX install.  It has an incompatible calling convention.
3381             :
3382           else
3383             ac_cv_path_install="$ac_dir/$ac_prog -c"
3384             break 2
3385           fi
3386         fi
3387       done
3388       ;;
3389     esac
3390   done
3391   IFS="$ac_save_IFS"
3392
3393   if test "${ac_cv_path_install+set}" = set; then
3394     INSTALL="$ac_cv_path_install"
3395   else
3396     # As a last resort, use the slow shell script.  We don't cache a
3397     # path for INSTALL within a source directory, because that will
3398     # break other packages using the cache if that directory is
3399     # removed, or if the path is relative.
3400     INSTALL="$ac_install_sh"
3401   fi
3402 fi
3403 echo "$ac_t""$INSTALL" 1>&6
3404
3405 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3406 # It thinks the first close brace ends the variable substitution.
3407 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3408
3409 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3410
3411 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3412
3413 for ac_prog in 'bison -y' byacc
3414 do
3415 # Extract the first word of "$ac_prog", so it can be a program name with args.
3416 set dummy $ac_prog; ac_word=$2
3417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3418 echo "configure:3419: checking for $ac_word" >&5
3419
3420 if test -n "$YACC"; then
3421   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3422 else
3423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3424   ac_dummy="$PATH"
3425   for ac_dir in $ac_dummy; do
3426     test -z "$ac_dir" && ac_dir=.
3427     if test -f $ac_dir/$ac_word; then
3428       ac_cv_prog_YACC="$ac_prog"
3429       break
3430     fi
3431   done
3432   IFS="$ac_save_ifs"
3433 fi
3434 YACC="$ac_cv_prog_YACC"
3435 if test -n "$YACC"; then
3436   echo "$ac_t""$YACC" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440
3441 test -n "$YACC" && break
3442 done
3443 test -n "$YACC" || YACC="yacc"
3444
3445
3446 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 
3447 do
3448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3450 echo "configure:3451: checking for $ac_hdr" >&5
3451
3452 cat > conftest.$ac_ext <<EOF
3453 #line 3454 "configure"
3454 #include "confdefs.h"
3455 #include <$ac_hdr>
3456 EOF
3457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3458 { (eval echo configure:3459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3460 if test -z "$ac_err"; then
3461   rm -rf conftest*
3462   eval "ac_cv_header_$ac_safe=yes"
3463 else
3464   echo "$ac_err" >&5
3465   echo "configure: failed program was:" >&5
3466   cat conftest.$ac_ext >&5
3467   rm -rf conftest*
3468   eval "ac_cv_header_$ac_safe=no"
3469 fi
3470 rm -f conftest*
3471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3472   echo "$ac_t""yes" 1>&6
3473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3474   { test "$extra_verbose" = "yes" && cat << EOF
3475     Defining $ac_tr_hdr
3476 EOF
3477 cat >> confdefs.h <<EOF
3478 #define $ac_tr_hdr 1
3479 EOF
3480 }
3481  
3482 else
3483   echo "$ac_t""no" 1>&6
3484 fi
3485 done
3486
3487 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3488 echo "configure:3489: checking for sys/wait.h that is POSIX.1 compatible" >&5
3489
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #include <sys/types.h>
3494 #include <sys/wait.h>
3495 #ifndef WEXITSTATUS
3496 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3497 #endif
3498 #ifndef WIFEXITED
3499 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3500 #endif
3501 int main() {
3502 int s;
3503 wait (&s);
3504 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3505 ; return 0; }
3506 EOF
3507 if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3508   rm -rf conftest*
3509   ac_cv_header_sys_wait_h=yes
3510 else
3511   echo "configure: failed program was:" >&5
3512   cat conftest.$ac_ext >&5
3513   rm -rf conftest*
3514   ac_cv_header_sys_wait_h=no
3515 fi
3516 rm -f conftest*
3517
3518 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3519 if test $ac_cv_header_sys_wait_h = yes; then
3520   { test "$extra_verbose" = "yes" && cat << \EOF
3521     Defining HAVE_SYS_WAIT_H
3522 EOF
3523 cat >> confdefs.h <<\EOF
3524 #define HAVE_SYS_WAIT_H 1
3525 EOF
3526 }
3527
3528 fi
3529
3530 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3531 echo "configure:3532: checking for ANSI C header files" >&5
3532
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 #include <stdlib.h>
3537 #include <stdarg.h>
3538 #include <string.h>
3539 #include <float.h>
3540 EOF
3541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3542 { (eval echo configure:3543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3544 if test -z "$ac_err"; then
3545   rm -rf conftest*
3546   ac_cv_header_stdc=yes
3547 else
3548   echo "$ac_err" >&5
3549   echo "configure: failed program was:" >&5
3550   cat conftest.$ac_ext >&5
3551   rm -rf conftest*
3552   ac_cv_header_stdc=no
3553 fi
3554 rm -f conftest*
3555
3556 if test $ac_cv_header_stdc = yes; then
3557   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3558 cat > conftest.$ac_ext <<EOF
3559 #line 3560 "configure"
3560 #include "confdefs.h"
3561 #include <string.h>
3562 EOF
3563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3564   egrep "memchr" >/dev/null 2>&1; then
3565   :
3566 else
3567   rm -rf conftest*
3568   ac_cv_header_stdc=no
3569 fi
3570 rm -f conftest*
3571
3572 fi
3573
3574 if test $ac_cv_header_stdc = yes; then
3575   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3576 cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579 #include <stdlib.h>
3580 EOF
3581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3582   egrep "free" >/dev/null 2>&1; then
3583   :
3584 else
3585   rm -rf conftest*
3586   ac_cv_header_stdc=no
3587 fi
3588 rm -f conftest*
3589
3590 fi
3591
3592 if test $ac_cv_header_stdc = yes; then
3593   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <ctype.h>
3598 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3599 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3600 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3601 int main () { int i; for (i = 0; i < 256; i++)
3602 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3603 exit (0); }
3604
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3607 then
3608   :
3609 else
3610   conftest_rc="$?"
3611   echo "configure: failed program was:" >&5
3612   cat conftest.$ac_ext >&5
3613   rm -fr conftest*
3614   ac_cv_header_stdc=no
3615 fi
3616 rm -fr conftest*
3617 fi
3618
3619 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3620 if test $ac_cv_header_stdc = yes; then
3621   { test "$extra_verbose" = "yes" && cat << \EOF
3622     Defining STDC_HEADERS
3623 EOF
3624 cat >> confdefs.h <<\EOF
3625 #define STDC_HEADERS 1
3626 EOF
3627 }
3628
3629 fi
3630
3631 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3632 echo "configure:3633: checking whether time.h and sys/time.h may both be included" >&5
3633
3634 cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <sys/types.h>
3638 #include <sys/time.h>
3639 #include <time.h>
3640 int main() {
3641 struct tm *tp;
3642 ; return 0; }
3643 EOF
3644 if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3645   rm -rf conftest*
3646   ac_cv_header_time=yes
3647 else
3648   echo "configure: failed program was:" >&5
3649   cat conftest.$ac_ext >&5
3650   rm -rf conftest*
3651   ac_cv_header_time=no
3652 fi
3653 rm -f conftest*
3654
3655 echo "$ac_t""$ac_cv_header_time" 1>&6
3656 if test $ac_cv_header_time = yes; then
3657   { test "$extra_verbose" = "yes" && cat << \EOF
3658     Defining TIME_WITH_SYS_TIME
3659 EOF
3660 cat >> confdefs.h <<\EOF
3661 #define TIME_WITH_SYS_TIME 1
3662 EOF
3663 }
3664
3665 fi
3666
3667 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3668 echo "configure:3669: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3669
3670 cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <sys/types.h>
3674 #include <signal.h>
3675 /* NetBSD declares sys_siglist in unistd.h.  */
3676 #ifdef HAVE_UNISTD_H
3677 #include <unistd.h>
3678 #endif
3679 int main() {
3680 char *msg = *(sys_siglist + 1);
3681 ; return 0; }
3682 EOF
3683 if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3684   rm -rf conftest*
3685   ac_cv_decl_sys_siglist=yes
3686 else
3687   echo "configure: failed program was:" >&5
3688   cat conftest.$ac_ext >&5
3689   rm -rf conftest*
3690   ac_cv_decl_sys_siglist=no
3691 fi
3692 rm -f conftest*
3693
3694 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3695 if test $ac_cv_decl_sys_siglist = yes; then
3696   { test "$extra_verbose" = "yes" && cat << \EOF
3697     Defining SYS_SIGLIST_DECLARED
3698 EOF
3699 cat >> confdefs.h <<\EOF
3700 #define SYS_SIGLIST_DECLARED 1
3701 EOF
3702 }
3703
3704 fi
3705
3706
3707
3708 echo $ac_n "checking for utime""... $ac_c" 1>&6
3709 echo "configure:3710: checking for utime" >&5
3710 cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713 #include <sys/types.h>
3714 #include <utime.h>
3715 int main() {
3716 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3720   rm -rf conftest*
3721   echo "$ac_t""yes" 1>&6
3722    { test "$extra_verbose" = "yes" && cat << \EOF
3723     Defining HAVE_UTIME
3724 EOF
3725 cat >> confdefs.h <<\EOF
3726 #define HAVE_UTIME 1
3727 EOF
3728 }
3729
3730 else
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   echo "$ac_t""no" 1>&6
3735       for ac_func in utimes
3736 do
3737 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3738 echo "configure:3739: checking for $ac_func" >&5
3739
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 /* System header to define __stub macros and hopefully few prototypes,
3744     which can conflict with char $ac_func(); below.  */
3745 #include <assert.h>
3746 /* Override any gcc2 internal prototype to avoid an error.  */
3747 /* We use char because int might match the return type of a gcc2
3748     builtin and then its argument prototype would still apply.  */
3749 char $ac_func();
3750
3751 int main() {
3752
3753 /* The GNU C library defines this for functions which it implements
3754     to always fail with ENOSYS.  Some functions are actually named
3755     something starting with __ and the normal name is an alias.  */
3756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3757 choke me
3758 #else
3759 $ac_func();
3760 #endif
3761
3762 ; return 0; }
3763 EOF
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3765   rm -rf conftest*
3766   eval "ac_cv_func_$ac_func=yes"
3767 else
3768   echo "configure: failed program was:" >&5
3769   cat conftest.$ac_ext >&5
3770   rm -rf conftest*
3771   eval "ac_cv_func_$ac_func=no"
3772 fi
3773 rm -f conftest*
3774
3775 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3776   echo "$ac_t""yes" 1>&6
3777     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3778   { test "$extra_verbose" = "yes" && cat << EOF
3779     Defining $ac_tr_func
3780 EOF
3781 cat >> confdefs.h <<EOF
3782 #define $ac_tr_func 1
3783 EOF
3784 }
3785  
3786 else
3787   echo "$ac_t""no" 1>&6
3788 fi
3789 done
3790
3791 fi
3792 rm -f conftest*
3793
3794
3795 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3796 echo "configure:3797: checking return type of signal handlers" >&5
3797
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 #include <sys/types.h>
3802 #include <signal.h>
3803 #ifdef signal
3804 #undef signal
3805 #endif
3806 #ifdef __cplusplus
3807 extern "C" void (*signal (int, void (*)(int)))(int);
3808 #else
3809 void (*signal ()) ();
3810 #endif
3811
3812 int main() {
3813 int i;
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3817   rm -rf conftest*
3818   ac_cv_type_signal=void
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   ac_cv_type_signal=int
3824 fi
3825 rm -f conftest*
3826
3827 echo "$ac_t""$ac_cv_type_signal" 1>&6
3828 { test "$extra_verbose" = "yes" && cat << EOF
3829     Defining RETSIGTYPE = $ac_cv_type_signal
3830 EOF
3831 cat >> confdefs.h <<EOF
3832 #define RETSIGTYPE $ac_cv_type_signal
3833 EOF
3834 }
3835
3836
3837 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3838 echo "configure:3839: checking for size_t" >&5
3839
3840 cat > conftest.$ac_ext <<EOF
3841 #line 3842 "configure"
3842 #include "confdefs.h"
3843 #include <sys/types.h>
3844 #if STDC_HEADERS
3845 #include <stdlib.h>
3846 #include <stddef.h>
3847 #endif
3848 EOF
3849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3850   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3851   rm -rf conftest*
3852   ac_cv_type_size_t=yes
3853 else
3854   rm -rf conftest*
3855   ac_cv_type_size_t=no
3856 fi
3857 rm -f conftest*
3858
3859 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3860 if test $ac_cv_type_size_t = no; then
3861   { test "$extra_verbose" = "yes" && cat << \EOF
3862     Defining size_t = unsigned
3863 EOF
3864 cat >> confdefs.h <<\EOF
3865 #define size_t unsigned
3866 EOF
3867 }
3868
3869 fi
3870
3871 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3872 echo "configure:3873: checking for pid_t" >&5
3873
3874 cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 #include <sys/types.h>
3878 #if STDC_HEADERS
3879 #include <stdlib.h>
3880 #include <stddef.h>
3881 #endif
3882 EOF
3883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3884   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3885   rm -rf conftest*
3886   ac_cv_type_pid_t=yes
3887 else
3888   rm -rf conftest*
3889   ac_cv_type_pid_t=no
3890 fi
3891 rm -f conftest*
3892
3893 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3894 if test $ac_cv_type_pid_t = no; then
3895   { test "$extra_verbose" = "yes" && cat << \EOF
3896     Defining pid_t = int
3897 EOF
3898 cat >> confdefs.h <<\EOF
3899 #define pid_t int
3900 EOF
3901 }
3902
3903 fi
3904
3905 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3906 echo "configure:3907: checking for uid_t in sys/types.h" >&5
3907
3908 cat > conftest.$ac_ext <<EOF
3909 #line 3910 "configure"
3910 #include "confdefs.h"
3911 #include <sys/types.h>
3912 EOF
3913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3914   egrep "uid_t" >/dev/null 2>&1; then
3915   rm -rf conftest*
3916   ac_cv_type_uid_t=yes
3917 else
3918   rm -rf conftest*
3919   ac_cv_type_uid_t=no
3920 fi
3921 rm -f conftest*
3922
3923
3924 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3925 if test $ac_cv_type_uid_t = no; then
3926   { test "$extra_verbose" = "yes" && cat << \EOF
3927     Defining uid_t = int
3928 EOF
3929 cat >> confdefs.h <<\EOF
3930 #define uid_t int
3931 EOF
3932 }
3933
3934   { test "$extra_verbose" = "yes" && cat << \EOF
3935     Defining gid_t = int
3936 EOF
3937 cat >> confdefs.h <<\EOF
3938 #define gid_t int
3939 EOF
3940 }
3941
3942 fi
3943
3944 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3945 echo "configure:3946: checking for mode_t" >&5
3946
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <sys/types.h>
3951 #if STDC_HEADERS
3952 #include <stdlib.h>
3953 #include <stddef.h>
3954 #endif
3955 EOF
3956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3957   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3958   rm -rf conftest*
3959   ac_cv_type_mode_t=yes
3960 else
3961   rm -rf conftest*
3962   ac_cv_type_mode_t=no
3963 fi
3964 rm -f conftest*
3965
3966 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3967 if test $ac_cv_type_mode_t = no; then
3968   { test "$extra_verbose" = "yes" && cat << \EOF
3969     Defining mode_t = int
3970 EOF
3971 cat >> confdefs.h <<\EOF
3972 #define mode_t int
3973 EOF
3974 }
3975
3976 fi
3977
3978 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3979 echo "configure:3980: checking for off_t" >&5
3980
3981 cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3984 #include <sys/types.h>
3985 #if STDC_HEADERS
3986 #include <stdlib.h>
3987 #include <stddef.h>
3988 #endif
3989 EOF
3990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3991   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3992   rm -rf conftest*
3993   ac_cv_type_off_t=yes
3994 else
3995   rm -rf conftest*
3996   ac_cv_type_off_t=no
3997 fi
3998 rm -f conftest*
3999
4000 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4001 if test $ac_cv_type_off_t = no; then
4002   { test "$extra_verbose" = "yes" && cat << \EOF
4003     Defining off_t = long
4004 EOF
4005 cat >> confdefs.h <<\EOF
4006 #define off_t long
4007 EOF
4008 }
4009
4010 fi
4011
4012 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4013 echo "configure:4014: checking for ssize_t" >&5
4014
4015 cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018 #include <sys/types.h>
4019 #if STDC_HEADERS
4020 #include <stdlib.h>
4021 #include <stddef.h>
4022 #endif
4023 EOF
4024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4025   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4026   rm -rf conftest*
4027   ac_cv_type_ssize_t=yes
4028 else
4029   rm -rf conftest*
4030   ac_cv_type_ssize_t=no
4031 fi
4032 rm -f conftest*
4033
4034 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4035 if test $ac_cv_type_ssize_t = no; then
4036   { test "$extra_verbose" = "yes" && cat << \EOF
4037     Defining ssize_t = int
4038 EOF
4039 cat >> confdefs.h <<\EOF
4040 #define ssize_t int
4041 EOF
4042 }
4043
4044 fi
4045
4046
4047 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4048 echo "configure:4049: checking for socklen_t" >&5
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 #include <sys/socket.h>
4053 socklen_t x;
4054
4055 int main() {
4056
4057 ; return 0; }
4058 EOF
4059 if { (eval echo configure:4060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4060   rm -rf conftest*
4061   echo "$ac_t""yes" 1>&6
4062 else
4063   echo "configure: failed program was:" >&5
4064   cat conftest.$ac_ext >&5
4065   rm -rf conftest*
4066   
4067 cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 #include <sys/socket.h>
4071 int accept (int, struct sockaddr *, size_t *);
4072
4073 int main() {
4074
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078   rm -rf conftest*
4079   
4080 echo "$ac_t""size_t" 1>&6
4081 { test "$extra_verbose" = "yes" && cat << \EOF
4082     Defining socklen_t = size_t
4083 EOF
4084 cat >> confdefs.h <<\EOF
4085 #define socklen_t size_t
4086 EOF
4087 }
4088
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   
4094 echo "$ac_t""int" 1>&6
4095 { test "$extra_verbose" = "yes" && cat << \EOF
4096     Defining socklen_t = int
4097 EOF
4098 cat >> confdefs.h <<\EOF
4099 #define socklen_t int
4100 EOF
4101 }
4102
4103 fi
4104 rm -f conftest*
4105 fi
4106 rm -f conftest*
4107
4108 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4109 echo "configure:4110: checking for struct timeval" >&5
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113 #ifdef TIME_WITH_SYS_TIME
4114 #include <sys/time.h>
4115 #include <time.h>
4116 #else
4117 #ifdef HAVE_SYS_TIME_H
4118 #include <sys/time.h>
4119 #else
4120 #include <time.h>
4121 #endif
4122 #endif
4123 int main() {
4124 static struct timeval x; x.tv_sec = x.tv_usec;
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4128   rm -rf conftest*
4129   echo "$ac_t""yes" 1>&6
4130   HAVE_TIMEVAL=yes
4131   { test "$extra_verbose" = "yes" && cat << \EOF
4132     Defining HAVE_TIMEVAL
4133 EOF
4134 cat >> confdefs.h <<\EOF
4135 #define HAVE_TIMEVAL 1
4136 EOF
4137 }
4138
4139 else
4140   echo "configure: failed program was:" >&5
4141   cat conftest.$ac_ext >&5
4142   rm -rf conftest*
4143   echo "$ac_t""no" 1>&6
4144    HAVE_TIMEVAL=no
4145 fi
4146 rm -f conftest*
4147
4148 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4149 echo "configure:4150: checking whether struct tm is in sys/time.h or time.h" >&5
4150
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #include <sys/types.h>
4155 #include <time.h>
4156 int main() {
4157 struct tm *tp; tp->tm_sec;
4158 ; return 0; }
4159 EOF
4160 if { (eval echo configure:4161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4161   rm -rf conftest*
4162   ac_cv_struct_tm=time.h
4163 else
4164   echo "configure: failed program was:" >&5
4165   cat conftest.$ac_ext >&5
4166   rm -rf conftest*
4167   ac_cv_struct_tm=sys/time.h
4168 fi
4169 rm -f conftest*
4170
4171 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4172 if test $ac_cv_struct_tm = sys/time.h; then
4173   { test "$extra_verbose" = "yes" && cat << \EOF
4174     Defining TM_IN_SYS_TIME
4175 EOF
4176 cat >> confdefs.h <<\EOF
4177 #define TM_IN_SYS_TIME 1
4178 EOF
4179 }
4180
4181 fi
4182
4183 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4184 echo "configure:4185: checking for tm_zone in struct tm" >&5
4185
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <sys/types.h>
4190 #include <$ac_cv_struct_tm>
4191 int main() {
4192 struct tm tm; tm.tm_zone;
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   ac_cv_struct_tm_zone=yes
4198 else
4199   echo "configure: failed program was:" >&5
4200   cat conftest.$ac_ext >&5
4201   rm -rf conftest*
4202   ac_cv_struct_tm_zone=no
4203 fi
4204 rm -f conftest*
4205
4206 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4207 if test "$ac_cv_struct_tm_zone" = yes; then
4208   { test "$extra_verbose" = "yes" && cat << \EOF
4209     Defining HAVE_TM_ZONE
4210 EOF
4211 cat >> confdefs.h <<\EOF
4212 #define HAVE_TM_ZONE 1
4213 EOF
4214 }
4215
4216 else
4217   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4218 echo "configure:4219: checking for tzname" >&5
4219
4220 cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <time.h>
4224 #ifndef tzname /* For SGI.  */
4225 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4226 #endif
4227 int main() {
4228 atoi(*tzname);
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4232   rm -rf conftest*
4233   ac_cv_var_tzname=yes
4234 else
4235   echo "configure: failed program was:" >&5
4236   cat conftest.$ac_ext >&5
4237   rm -rf conftest*
4238   ac_cv_var_tzname=no
4239 fi
4240 rm -f conftest*
4241
4242 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4243   if test $ac_cv_var_tzname = yes; then
4244     { test "$extra_verbose" = "yes" && cat << \EOF
4245     Defining HAVE_TZNAME
4246 EOF
4247 cat >> confdefs.h <<\EOF
4248 #define HAVE_TZNAME 1
4249 EOF
4250 }
4251
4252   fi
4253 fi
4254
4255
4256 echo $ac_n "checking for working const""... $ac_c" 1>&6
4257 echo "configure:4258: checking for working const" >&5
4258
4259 cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262
4263 int main() {
4264
4265 /* Ultrix mips cc rejects this.  */
4266 typedef int charset[2]; const charset x;
4267 /* SunOS 4.1.1 cc rejects this.  */
4268 char const *const *ccp;
4269 char **p;
4270 /* NEC SVR4.0.2 mips cc rejects this.  */
4271 struct point {int x, y;};
4272 static struct point const zero = {0,0};
4273 /* AIX XL C 1.02.0.0 rejects this.
4274    It does not let you subtract one const X* pointer from another in an arm
4275    of an if-expression whose if-part is not a constant expression */
4276 const char *g = "string";
4277 ccp = &g + (g ? g-g : 0);
4278 /* HPUX 7.0 cc rejects these. */
4279 ++ccp;
4280 p = (char**) ccp;
4281 ccp = (char const *const *) p;
4282 { /* SCO 3.2v4 cc rejects this.  */
4283   char *t;
4284   char const *s = 0 ? (char *) 0 : (char const *) 0;
4285
4286   *t++ = 0;
4287 }
4288 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4289   int x[] = {25, 17};
4290   const int *foo = &x[0];
4291   ++foo;
4292 }
4293 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4294   typedef const int *iptr;
4295   iptr p = 0;
4296   ++p;
4297 }
4298 { /* AIX XL C 1.02.0.0 rejects this saying
4299      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4300   struct s { int j; const int *ap[3]; };
4301   struct s *b; b->j = 5;
4302 }
4303 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4304   const int foo = 10;
4305 }
4306
4307 ; return 0; }
4308 EOF
4309 if { (eval echo configure:4310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4310   rm -rf conftest*
4311   ac_cv_c_const=yes
4312 else
4313   echo "configure: failed program was:" >&5
4314   cat conftest.$ac_ext >&5
4315   rm -rf conftest*
4316   ac_cv_c_const=no
4317 fi
4318 rm -f conftest*
4319
4320 echo "$ac_t""$ac_cv_c_const" 1>&6
4321 if test $ac_cv_c_const = no; then
4322   { test "$extra_verbose" = "yes" && cat << \EOF
4323     Defining const = 
4324 EOF
4325 cat >> confdefs.h <<\EOF
4326 #define const 
4327 EOF
4328 }
4329
4330 fi
4331
4332
4333 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4334 echo "configure:4335: checking whether ${MAKE-make} sets \${MAKE}" >&5
4335 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4336
4337 cat > conftestmake <<\EOF
4338 all:
4339         @echo 'ac_maketemp="${MAKE}"'
4340 EOF
4341 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4342 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4343 if test -n "$ac_maketemp"; then
4344   eval ac_cv_prog_make_${ac_make}_set=yes
4345 else
4346   eval ac_cv_prog_make_${ac_make}_set=no
4347 fi
4348 rm -f conftestmake
4349 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4350   echo "$ac_t""yes" 1>&6
4351   SET_MAKE=
4352 else
4353   echo "$ac_t""no" 1>&6
4354   SET_MAKE="MAKE=${MAKE-make}"
4355 fi
4356
4357
4358 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4359 echo "configure:4360: checking whether byte ordering is bigendian" >&5
4360
4361 ac_cv_c_bigendian=unknown
4362 # See if sys/param.h defines the BYTE_ORDER macro.
4363 cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <sys/types.h>
4367 #include <sys/param.h>
4368 int main() {
4369
4370 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4371  bogus endian macros
4372 #endif
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4376   rm -rf conftest*
4377   # It does; now see whether it defined to BIG_ENDIAN or not.
4378 cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <sys/types.h>
4382 #include <sys/param.h>
4383 int main() {
4384
4385 #if BYTE_ORDER != BIG_ENDIAN
4386  not big endian
4387 #endif
4388 ; return 0; }
4389 EOF
4390 if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4391   rm -rf conftest*
4392   ac_cv_c_bigendian=yes
4393 else
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396   rm -rf conftest*
4397   ac_cv_c_bigendian=no
4398 fi
4399 rm -f conftest*
4400 else
4401   echo "configure: failed program was:" >&5
4402   cat conftest.$ac_ext >&5
4403 fi
4404 rm -f conftest*
4405 if test $ac_cv_c_bigendian = unknown; then
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 main () {
4410   /* Are we little or big endian?  From Harbison&Steele.  */
4411   union
4412   {
4413     long l;
4414     char c[sizeof (long)];
4415   } u;
4416   u.l = 1;
4417   exit (u.c[sizeof (long) - 1] == 1);
4418 }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4421 then
4422   ac_cv_c_bigendian=no
4423 else
4424   conftest_rc="$?"
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -fr conftest*
4428   ac_cv_c_bigendian=yes
4429 fi
4430 rm -fr conftest*
4431 fi
4432
4433 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4434 if test $ac_cv_c_bigendian = yes; then
4435   { test "$extra_verbose" = "yes" && cat << \EOF
4436     Defining WORDS_BIGENDIAN
4437 EOF
4438 cat >> confdefs.h <<\EOF
4439 #define WORDS_BIGENDIAN 1
4440 EOF
4441 }
4442
4443 fi
4444
4445
4446 echo $ac_n "checking size of short""... $ac_c" 1>&6
4447 echo "configure:4448: checking size of short" >&5
4448
4449 cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 #include <stdio.h>
4453 #include <sys/types.h>
4454 main()
4455 {
4456   FILE *f=fopen("conftestval", "w");
4457   if (!f) exit(1);
4458   fprintf(f, "%d\n", sizeof(short));
4459   exit(0);
4460 }
4461 EOF
4462 if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4463 then
4464   ac_cv_sizeof_short=`cat conftestval`
4465 else
4466   conftest_rc="$?"
4467   echo "configure: failed program was:" >&5
4468   cat conftest.$ac_ext >&5
4469   rm -fr conftest*
4470   ac_cv_sizeof_short=0
4471 fi
4472 rm -fr conftest*
4473 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4474 { test "$extra_verbose" = "yes" && cat << EOF
4475     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4476 EOF
4477 cat >> confdefs.h <<EOF
4478 #define SIZEOF_SHORT $ac_cv_sizeof_short
4479 EOF
4480 }
4481
4482
4483 if test "$ac_cv_sizeof_short" = 0; then
4484   echo ""
4485   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4486   echo "*** PANIC *** Please examine config.log for compilation errors."
4487   exit 1
4488 fi
4489 echo $ac_n "checking size of int""... $ac_c" 1>&6
4490 echo "configure:4491: checking size of int" >&5
4491
4492 cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495 #include <stdio.h>
4496 #include <sys/types.h>
4497 main()
4498 {
4499   FILE *f=fopen("conftestval", "w");
4500   if (!f) exit(1);
4501   fprintf(f, "%d\n", sizeof(int));
4502   exit(0);
4503 }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4506 then
4507   ac_cv_sizeof_int=`cat conftestval`
4508 else
4509   conftest_rc="$?"
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -fr conftest*
4513   ac_cv_sizeof_int=0
4514 fi
4515 rm -fr conftest*
4516 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4517 { test "$extra_verbose" = "yes" && cat << EOF
4518     Defining SIZEOF_INT = $ac_cv_sizeof_int
4519 EOF
4520 cat >> confdefs.h <<EOF
4521 #define SIZEOF_INT $ac_cv_sizeof_int
4522 EOF
4523 }
4524
4525
4526 echo $ac_n "checking size of long""... $ac_c" 1>&6
4527 echo "configure:4528: checking size of long" >&5
4528
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <stdio.h>
4533 #include <sys/types.h>
4534 main()
4535 {
4536   FILE *f=fopen("conftestval", "w");
4537   if (!f) exit(1);
4538   fprintf(f, "%d\n", sizeof(long));
4539   exit(0);
4540 }
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4543 then
4544   ac_cv_sizeof_long=`cat conftestval`
4545 else
4546   conftest_rc="$?"
4547   echo "configure: failed program was:" >&5
4548   cat conftest.$ac_ext >&5
4549   rm -fr conftest*
4550   ac_cv_sizeof_long=0
4551 fi
4552 rm -fr conftest*
4553 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4554 { test "$extra_verbose" = "yes" && cat << EOF
4555     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4556 EOF
4557 cat >> confdefs.h <<EOF
4558 #define SIZEOF_LONG $ac_cv_sizeof_long
4559 EOF
4560 }
4561
4562
4563 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4564 echo "configure:4565: checking size of long long" >&5
4565
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <stdio.h>
4570 #include <sys/types.h>
4571 main()
4572 {
4573   FILE *f=fopen("conftestval", "w");
4574   if (!f) exit(1);
4575   fprintf(f, "%d\n", sizeof(long long));
4576   exit(0);
4577 }
4578 EOF
4579 if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4580 then
4581   ac_cv_sizeof_long_long=`cat conftestval`
4582 else
4583   conftest_rc="$?"
4584   echo "configure: failed program was:" >&5
4585   cat conftest.$ac_ext >&5
4586   rm -fr conftest*
4587   ac_cv_sizeof_long_long=0
4588 fi
4589 rm -fr conftest*
4590 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4591 { test "$extra_verbose" = "yes" && cat << EOF
4592     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4593 EOF
4594 cat >> confdefs.h <<EOF
4595 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4596 EOF
4597 }
4598
4599
4600 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4601 echo "configure:4602: checking size of void *" >&5
4602
4603 cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 #include <stdio.h>
4607 #include <sys/types.h>
4608 main()
4609 {
4610   FILE *f=fopen("conftestval", "w");
4611   if (!f) exit(1);
4612   fprintf(f, "%d\n", sizeof(void *));
4613   exit(0);
4614 }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4617 then
4618   ac_cv_sizeof_void_p=`cat conftestval`
4619 else
4620   conftest_rc="$?"
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -fr conftest*
4624   ac_cv_sizeof_void_p=0
4625 fi
4626 rm -fr conftest*
4627 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4628 { test "$extra_verbose" = "yes" && cat << EOF
4629     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4630 EOF
4631 cat >> confdefs.h <<EOF
4632 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4633 EOF
4634 }
4635
4636
4637
4638 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4639 echo "configure:4640: checking for long file names" >&5
4640
4641 ac_cv_sys_long_file_names=yes
4642 # Test for long file names in all the places we know might matter:
4643 #      .                the current directory, where building will happen
4644 #      $prefix/lib      where we will be installing things
4645 #      $exec_prefix/lib likewise
4646 # eval it to expand exec_prefix.
4647 #      $TMPDIR          if set, where it might want to write temporary files
4648 # if $TMPDIR is not set:
4649 #      /tmp             where it might want to write temporary files
4650 #      /var/tmp         likewise
4651 #      /usr/tmp         likewise
4652 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4653   ac_tmpdirs="$TMPDIR"
4654 else
4655   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4656 fi
4657 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4658   test -d $ac_dir || continue
4659   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4660   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4661   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4662   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4663   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4664     ac_cv_sys_long_file_names=no
4665     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4666     break
4667   fi
4668   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4669 done
4670
4671 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4672 if test $ac_cv_sys_long_file_names = yes; then
4673   { test "$extra_verbose" = "yes" && cat << \EOF
4674     Defining HAVE_LONG_FILE_NAMES
4675 EOF
4676 cat >> confdefs.h <<\EOF
4677 #define HAVE_LONG_FILE_NAMES 1
4678 EOF
4679 }
4680
4681 fi
4682
4683
4684 echo $ac_n "checking for sin""... $ac_c" 1>&6
4685 echo "configure:4686: checking for sin" >&5
4686
4687 cat > conftest.$ac_ext <<EOF
4688 #line 4689 "configure"
4689 #include "confdefs.h"
4690 /* System header to define __stub macros and hopefully few prototypes,
4691     which can conflict with char sin(); below.  */
4692 #include <assert.h>
4693 /* Override any gcc2 internal prototype to avoid an error.  */
4694 /* We use char because int might match the return type of a gcc2
4695     builtin and then its argument prototype would still apply.  */
4696 char sin();
4697
4698 int main() {
4699
4700 /* The GNU C library defines this for functions which it implements
4701     to always fail with ENOSYS.  Some functions are actually named
4702     something starting with __ and the normal name is an alias.  */
4703 #if defined (__stub_sin) || defined (__stub___sin)
4704 choke me
4705 #else
4706 sin();
4707 #endif
4708
4709 ; return 0; }
4710 EOF
4711 if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4712   rm -rf conftest*
4713   eval "ac_cv_func_sin=yes"
4714 else
4715   echo "configure: failed program was:" >&5
4716   cat conftest.$ac_ext >&5
4717   rm -rf conftest*
4718   eval "ac_cv_func_sin=no"
4719 fi
4720 rm -f conftest*
4721
4722 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4723   echo "$ac_t""yes" 1>&6
4724   :
4725 else
4726   echo "$ac_t""no" 1>&6
4727
4728 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4729 echo "configure:4730: checking for sin in -lm" >&5
4730 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4731
4732 xe_check_libs=" -lm "
4733 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 /* Override any gcc2 internal prototype to avoid an error.  */
4737 /* We use char because int might match the return type of a gcc2
4738     builtin and then its argument prototype would still apply.  */
4739 char sin();
4740
4741 int main() {
4742 sin()
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=yes"
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_lib_$ac_lib_var=no"
4753 fi
4754 rm -f conftest*
4755 xe_check_libs=""
4756
4757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4758   echo "$ac_t""yes" 1>&6
4759     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4760     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4761   { test "$extra_verbose" = "yes" && cat << EOF
4762     Defining $ac_tr_lib
4763 EOF
4764 cat >> confdefs.h <<EOF
4765 #define $ac_tr_lib 1
4766 EOF
4767 }
4768
4769   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4770
4771 else
4772   echo "$ac_t""no" 1>&6
4773 fi
4774
4775
4776 fi
4777
4778
4779 { test "$extra_verbose" = "yes" && cat << \EOF
4780     Defining LISP_FLOAT_TYPE
4781 EOF
4782 cat >> confdefs.h <<\EOF
4783 #define LISP_FLOAT_TYPE 1
4784 EOF
4785 }
4786
4787
4788 cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4791 #include <math.h>
4792 int main() {
4793 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   { test "$extra_verbose" = "yes" && cat << \EOF
4799     Defining HAVE_INVERSE_HYPERBOLIC
4800 EOF
4801 cat >> confdefs.h <<\EOF
4802 #define HAVE_INVERSE_HYPERBOLIC 1
4803 EOF
4804 }
4805
4806 else
4807   echo "configure: failed program was:" >&5
4808   cat conftest.$ac_ext >&5
4809 fi
4810 rm -f conftest*
4811
4812 echo "checking type of mail spool file locking" 1>&6
4813 echo "configure:4814: checking type of mail spool file locking" >&5
4814 for ac_func in lockf flock
4815 do
4816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4817 echo "configure:4818: checking for $ac_func" >&5
4818
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 /* System header to define __stub macros and hopefully few prototypes,
4823     which can conflict with char $ac_func(); below.  */
4824 #include <assert.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 $ac_func();
4829
4830 int main() {
4831
4832 /* The GNU C library defines this for functions which it implements
4833     to always fail with ENOSYS.  Some functions are actually named
4834     something starting with __ and the normal name is an alias.  */
4835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4836 choke me
4837 #else
4838 $ac_func();
4839 #endif
4840
4841 ; return 0; }
4842 EOF
4843 if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4844   rm -rf conftest*
4845   eval "ac_cv_func_$ac_func=yes"
4846 else
4847   echo "configure: failed program was:" >&5
4848   cat conftest.$ac_ext >&5
4849   rm -rf conftest*
4850   eval "ac_cv_func_$ac_func=no"
4851 fi
4852 rm -f conftest*
4853
4854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4855   echo "$ac_t""yes" 1>&6
4856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4857   { test "$extra_verbose" = "yes" && cat << EOF
4858     Defining $ac_tr_func
4859 EOF
4860 cat >> confdefs.h <<EOF
4861 #define $ac_tr_func 1
4862 EOF
4863 }
4864  
4865 else
4866   echo "$ac_t""no" 1>&6
4867 fi
4868 done
4869
4870 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4871 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4872 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4873 if   test -z "$mail_locking"; then
4874   case "$opsys" in cygwin* | mingw*)
4875     mail_locking=pop ;;
4876   esac
4877 fi
4878
4879 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4880     Defining MAIL_LOCK_LOCKF
4881 EOF
4882 cat >> confdefs.h <<\EOF
4883 #define MAIL_LOCK_LOCKF 1
4884 EOF
4885 }
4886
4887 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4888     Defining MAIL_LOCK_FLOCK
4889 EOF
4890 cat >> confdefs.h <<\EOF
4891 #define MAIL_LOCK_FLOCK 1
4892 EOF
4893 }
4894
4895 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4896     Defining MAIL_LOCK_LOCKING
4897 EOF
4898 cat >> confdefs.h <<\EOF
4899 #define MAIL_LOCK_LOCKING 1
4900 EOF
4901 }
4902
4903 elif test "$mail_locking" = "pop"; then
4904   with_pop=yes
4905   mail_locking=
4906 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4907     Defining MAIL_LOCK_DOT
4908 EOF
4909 cat >> confdefs.h <<\EOF
4910 #define MAIL_LOCK_DOT 1
4911 EOF
4912 }
4913
4914 fi
4915 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4916   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4917 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4918   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4919 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4920   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4921
4922 case "$opsys" in decosf*)
4923   
4924 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4925 echo "configure:4926: checking for cma_open in -lpthreads" >&5
4926 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4927
4928 xe_check_libs=" -lpthreads "
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 /* Override any gcc2 internal prototype to avoid an error.  */
4933 /* We use char because int might match the return type of a gcc2
4934     builtin and then its argument prototype would still apply.  */
4935 char cma_open();
4936
4937 int main() {
4938 cma_open()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=yes"
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=no"
4949 fi
4950 rm -f conftest*
4951 xe_check_libs=""
4952
4953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4954   echo "$ac_t""yes" 1>&6
4955     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4956     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4957   { test "$extra_verbose" = "yes" && cat << EOF
4958     Defining $ac_tr_lib
4959 EOF
4960 cat >> confdefs.h <<EOF
4961 #define $ac_tr_lib 1
4962 EOF
4963 }
4964
4965   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4966
4967 else
4968   echo "$ac_t""no" 1>&6
4969 fi
4970
4971
4972   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4973     c_switch_site="$c_switch_site -threads" ;;
4974 esac
4975
4976 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4977 echo "configure:4978: checking whether the -xildoff compiler flag is required" >&5
4978 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4979   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4980     then echo "$ac_t""no" 1>&6;
4981     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
4982   fi
4983   else echo "$ac_t""no" 1>&6
4984 fi
4985
4986 if test "$opsys" = "sol2"; then
4987   if test "$os_release" -ge 56; then
4988     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4989 echo "configure:4990: checking for \"-z ignore\" linker flag" >&5
4990     case "`ld -h 2>&1`" in
4991       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4992         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4993       *) echo "$ac_t""no" 1>&6 ;;
4994     esac
4995   fi
4996 fi
4997
4998
4999 echo "checking "for specified window system"" 1>&6
5000 echo "configure:5001: checking "for specified window system"" >&5
5001
5002
5003 GNOME_CONFIG=no
5004 GTK_CONFIG=no
5005
5006 if test "$with_gnome" != "no"; then
5007    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5008 echo "configure:5009: checking for GNOME configuration script" >&5
5009    for possible in gnome-config
5010    do
5011       possible_version=`${possible} --version 2> /dev/null`
5012       if test "x${possible_version}" != "x"; then
5013               GNOME_CONFIG="${possible}"
5014               with_gnome=yes
5015               with_gtk=yes
5016               break
5017       fi
5018    done
5019    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5020 fi
5021
5022 if test "${GNOME_CONFIG}" != "no"; then
5023       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5024       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5025       { test "$extra_verbose" = "yes" && cat << \EOF
5026     Defining HAVE_GNOME
5027 EOF
5028 cat >> confdefs.h <<\EOF
5029 #define HAVE_GNOME 1
5030 EOF
5031 }
5032
5033       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5034       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5035 fi
5036
5037 if test "$with_gtk" != "no";then
5038    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5039 echo "configure:5040: checking for GTK configuration script" >&5
5040    for possible in gtk12-config gtk14-config gtk-config
5041    do
5042       possible_version=`${possible} --version 2> /dev/null`
5043       if test "x${possible_version}" != "x"; then
5044               GTK_CONFIG="${possible}"
5045       fi
5046       case "${possible_version}" in
5047         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5048         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5049         1.2.*)
5050                 with_gtk=yes
5051                 break
5052                 ;;
5053         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5054       esac
5055    done
5056    echo "$ac_t""${GTK_CONFIG}" 1>&6
5057 fi
5058
5059 if test "${GTK_CONFIG}" != "no"; then
5060       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5061 echo "configure:5062: checking gtk version" >&5
5062       GTK_VERSION=`${GTK_CONFIG} --version`
5063       echo "$ac_t""${GTK_VERSION}" 1>&6
5064
5065       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5066 echo "configure:5067: checking gtk libs" >&5
5067       GTK_LIBS=`${GTK_CONFIG} --libs`
5068       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5069       echo "$ac_t""${GTK_LIBS}" 1>&6
5070
5071       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5072 echo "configure:5073: checking gtk cflags" >&5
5073       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5074       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5075       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5076
5077       
5078 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5079 echo "configure:5080: checking for main in -lgdk_imlib" >&5
5080 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5081
5082 xe_check_libs=" -lgdk_imlib "
5083 cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086
5087 int main() {
5088 main()
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=yes"
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   eval "ac_cv_lib_$ac_lib_var=no"
5099 fi
5100 rm -f conftest*
5101 xe_check_libs=""
5102
5103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5104   echo "$ac_t""yes" 1>&6
5105   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5106 else
5107   echo "$ac_t""no" 1>&6
5108 fi
5109
5110
5111       
5112 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5113 echo "configure:5114: checking for Imlib_init in -lImlib" >&5
5114 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5115
5116 xe_check_libs=" -lImlib "
5117 cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120 /* Override any gcc2 internal prototype to avoid an error.  */
5121 /* We use char because int might match the return type of a gcc2
5122     builtin and then its argument prototype would still apply.  */
5123 char Imlib_init();
5124
5125 int main() {
5126 Imlib_init()
5127 ; return 0; }
5128 EOF
5129 if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5130   rm -rf conftest*
5131   eval "ac_cv_lib_$ac_lib_var=yes"
5132 else
5133   echo "configure: failed program was:" >&5
5134   cat conftest.$ac_ext >&5
5135   rm -rf conftest*
5136   eval "ac_cv_lib_$ac_lib_var=no"
5137 fi
5138 rm -f conftest*
5139 xe_check_libs=""
5140
5141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5142   echo "$ac_t""yes" 1>&6
5143   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5144 else
5145   echo "$ac_t""no" 1>&6
5146 fi
5147
5148
5149       for ac_func in gdk_imlib_init
5150 do
5151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5152 echo "configure:5153: checking for $ac_func" >&5
5153
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 /* System header to define __stub macros and hopefully few prototypes,
5158     which can conflict with char $ac_func(); below.  */
5159 #include <assert.h>
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 /* We use char because int might match the return type of a gcc2
5162     builtin and then its argument prototype would still apply.  */
5163 char $ac_func();
5164
5165 int main() {
5166
5167 /* The GNU C library defines this for functions which it implements
5168     to always fail with ENOSYS.  Some functions are actually named
5169     something starting with __ and the normal name is an alias.  */
5170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5171 choke me
5172 #else
5173 $ac_func();
5174 #endif
5175
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179   rm -rf conftest*
5180   eval "ac_cv_func_$ac_func=yes"
5181 else
5182   echo "configure: failed program was:" >&5
5183   cat conftest.$ac_ext >&5
5184   rm -rf conftest*
5185   eval "ac_cv_func_$ac_func=no"
5186 fi
5187 rm -f conftest*
5188
5189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5190   echo "$ac_t""yes" 1>&6
5191     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5192   { test "$extra_verbose" = "yes" && cat << EOF
5193     Defining $ac_tr_func
5194 EOF
5195 cat >> confdefs.h <<EOF
5196 #define $ac_tr_func 1
5197 EOF
5198 }
5199  
5200 else
5201   echo "$ac_t""no" 1>&6
5202 fi
5203 done
5204
5205
5206       { test "$extra_verbose" = "yes" && cat << \EOF
5207     Defining HAVE_XPM
5208 EOF
5209 cat >> confdefs.h <<\EOF
5210 #define HAVE_XPM 1
5211 EOF
5212 }
5213
5214       { test "$extra_verbose" = "yes" && cat << \EOF
5215     Defining HAVE_GTK
5216 EOF
5217 cat >> confdefs.h <<\EOF
5218 #define HAVE_GTK 1
5219 EOF
5220 }
5221
5222       
5223
5224       window_system=gtk
5225       with_gtk=yes
5226       with_x11=no
5227
5228       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5229       test "${with_toolbars}" != no && with_toolbars=gtk
5230       test "${with_menubars}" != "no" && with_menubars=gtk
5231       test "${with_dialogs}" != "no" && with_dialogs=gtk
5232       test "${with_widgets}" != "no" && with_widgets=gtk
5233
5234       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5235    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5236  fi
5237       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5238    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5239  fi
5240       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5241    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5242  fi
5243       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5244    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5245  fi
5246
5247             OLD_CFLAGS="${CFLAGS}"
5248       OLD_CPPFLAGS="${CPPFLAGS}"
5249       OLD_LDFLAGS="${LDFLAGS}"
5250       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5251       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5252       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5253       for ac_hdr in glade/glade.h glade.h
5254 do
5255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5257 echo "configure:5258: checking for $ac_hdr" >&5
5258
5259 cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262 #include <$ac_hdr>
5263 EOF
5264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5265 { (eval echo configure:5266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5267 if test -z "$ac_err"; then
5268   rm -rf conftest*
5269   eval "ac_cv_header_$ac_safe=yes"
5270 else
5271   echo "$ac_err" >&5
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_header_$ac_safe=no"
5276 fi
5277 rm -f conftest*
5278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5281   { test "$extra_verbose" = "yes" && cat << EOF
5282     Defining $ac_tr_hdr
5283 EOF
5284 cat >> confdefs.h <<EOF
5285 #define $ac_tr_hdr 1
5286 EOF
5287 }
5288  
5289 else
5290   echo "$ac_t""no" 1>&6
5291 fi
5292 done
5293
5294       
5295 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5296 echo "configure:5297: checking for main in -lxml" >&5
5297 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5298
5299 xe_check_libs=" -lxml "
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303
5304 int main() {
5305 main()
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=yes"
5311 else
5312   echo "configure: failed program was:" >&5
5313   cat conftest.$ac_ext >&5
5314   rm -rf conftest*
5315   eval "ac_cv_lib_$ac_lib_var=no"
5316 fi
5317 rm -f conftest*
5318 xe_check_libs=""
5319
5320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5321   echo "$ac_t""yes" 1>&6
5322   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5323 else
5324   echo "$ac_t""no" 1>&6
5325 fi
5326
5327
5328       
5329 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5330 echo "configure:5331: checking for main in -lglade" >&5
5331 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5332
5333 xe_check_libs=" -lglade "
5334 cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337
5338 int main() {
5339 main()
5340 ; return 0; }
5341 EOF
5342 if { (eval echo configure:5343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5343   rm -rf conftest*
5344   eval "ac_cv_lib_$ac_lib_var=yes"
5345 else
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   eval "ac_cv_lib_$ac_lib_var=no"
5350 fi
5351 rm -f conftest*
5352 xe_check_libs=""
5353
5354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5355   echo "$ac_t""yes" 1>&6
5356   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5357 else
5358   echo "$ac_t""no" 1>&6
5359 fi
5360
5361
5362       
5363 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5364 echo "configure:5365: checking for main in -lglade-gnome" >&5
5365 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5366
5367 xe_check_libs=" -lglade-gnome "
5368 cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5371
5372 int main() {
5373 main()
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=yes"
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=no"
5384 fi
5385 rm -f conftest*
5386 xe_check_libs=""
5387
5388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5389   echo "$ac_t""yes" 1>&6
5390   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5391 else
5392   echo "$ac_t""no" 1>&6
5393 fi
5394
5395
5396       cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5399 #include <glade/glade-xml.h>
5400 EOF
5401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5402   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5403   rm -rf conftest*
5404   echo "$ac_t""yes" 1>&6
5405                        { test "$extra_verbose" = "yes" && cat << \EOF
5406     Defining LIBGLADE_XML_TXTDOMAIN = 1
5407 EOF
5408 cat >> confdefs.h <<\EOF
5409 #define LIBGLADE_XML_TXTDOMAIN 1
5410 EOF
5411 }
5412
5413 else
5414   rm -rf conftest*
5415   echo "$ac_t""no" 1>&6
5416 fi
5417 rm -f conftest*
5418
5419       CFLAGS="${OLD_CFLAGS}"
5420       CPPFLAGS="${OLD_CPPFLAGS}"
5421       LDFLAGS="${OLD_LDFLAGS}"
5422 fi
5423
5424
5425 if test "$with_x11" != "no"; then
5426     test "$x_includes $x_libraries" != "NONE NONE" && \
5427    window_system=x11 with_x11=yes
5428
5429         
5430       if test "$x_includes $x_libraries" = "NONE NONE" \
5431     -a -n "$OPENWINHOME" \
5432     -a "$OPENWINHOME" != "/usr/openwin" \
5433     -a -d "$OPENWINHOME"; then
5434       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5435       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5436       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5437   fi
5438
5439   if test "$x_includes" = "NONE"; then
5440                     for dir in "/usr/X11" "/usr/X11R6"; do
5441       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5442     done
5443   fi
5444
5445   if test "$x_libraries" = "NONE"; then
5446     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5447       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5448     done
5449   fi
5450
5451   # If we find X, set shell vars x_includes and x_libraries to the
5452 # paths, otherwise set no_x=yes.
5453 # Uses ac_ vars as temps to allow command line to override cache and checks.
5454 # --without-x overrides everything else, but does not touch the cache.
5455 echo $ac_n "checking for X""... $ac_c" 1>&6
5456 echo "configure:5457: checking for X" >&5
5457
5458 # Check whether --with-x or --without-x was given.
5459 if test "${with_x+set}" = set; then
5460   withval="$with_x"
5461   :
5462 fi
5463
5464 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5465 if test "x$with_x" = xno; then
5466   # The user explicitly disabled X.
5467   have_x=disabled
5468 else
5469   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5470     # Both variables are already set.
5471     have_x=yes
5472   else
5473
5474 # One or both of the vars are not set, and there is no cached value.
5475 ac_x_includes=NO ac_x_libraries=NO
5476 rm -fr conftestdir
5477 if mkdir conftestdir; then
5478   cd conftestdir
5479   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5480   cat > Imakefile <<'EOF'
5481 acfindx:
5482         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5483 EOF
5484   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5485     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5486     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5487     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5488     for ac_extension in a so sl; do
5489       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5490         test -f $ac_im_libdir/libX11.$ac_extension; then
5491         ac_im_usrlibdir=$ac_im_libdir; break
5492       fi
5493     done
5494     # Screen out bogus values from the imake configuration.  They are
5495     # bogus both because they are the default anyway, and because
5496     # using them would break gcc on systems where it needs fixed includes.
5497     case "$ac_im_incroot" in
5498         /usr/include) ;;
5499         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5500     esac
5501     case "$ac_im_usrlibdir" in
5502         /usr/lib | /lib) ;;
5503         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5504     esac
5505   fi
5506   cd ..
5507   rm -fr conftestdir
5508 fi
5509
5510 if test "$ac_x_includes" = NO; then
5511   # Guess where to find include files, by looking for this one X11 .h file.
5512   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5513
5514   # First, try using that file with no special directory specified.
5515 cat > conftest.$ac_ext <<EOF
5516 #line 5517 "configure"
5517 #include "confdefs.h"
5518 #include <$x_direct_test_include>
5519 EOF
5520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5521 { (eval echo configure:5522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5523 if test -z "$ac_err"; then
5524   rm -rf conftest*
5525   # We can compile using X headers with no special include directory.
5526 ac_x_includes=
5527 else
5528   echo "$ac_err" >&5
5529   echo "configure: failed program was:" >&5
5530   cat conftest.$ac_ext >&5
5531   rm -rf conftest*
5532   # Look for the header file in a standard set of common directories.
5533 # Check X11 before X11Rn because it is often a symlink to the current release.
5534   for ac_dir in               \
5535     /usr/X11/include          \
5536     /usr/X11R6/include        \
5537     /usr/X11R5/include        \
5538     /usr/X11R4/include        \
5539                               \
5540     /usr/include/X11          \
5541     /usr/include/X11R6        \
5542     /usr/include/X11R5        \
5543     /usr/include/X11R4        \
5544                               \
5545     /usr/local/X11/include    \
5546     /usr/local/X11R6/include  \
5547     /usr/local/X11R5/include  \
5548     /usr/local/X11R4/include  \
5549                               \
5550     /usr/local/include/X11    \
5551     /usr/local/include/X11R6  \
5552     /usr/local/include/X11R5  \
5553     /usr/local/include/X11R4  \
5554                               \
5555     /usr/X386/include         \
5556     /usr/x386/include         \
5557     /usr/XFree86/include/X11  \
5558                               \
5559     /usr/include              \
5560     /usr/local/include        \
5561     /usr/unsupported/include  \
5562     /usr/athena/include       \
5563     /usr/local/x11r5/include  \
5564     /usr/lpp/Xamples/include  \
5565                               \
5566     /usr/openwin/include      \
5567     /usr/openwin/share/include \
5568     ; \
5569   do
5570     if test -r "$ac_dir/$x_direct_test_include"; then
5571       ac_x_includes=$ac_dir
5572       break
5573     fi
5574   done
5575 fi
5576 rm -f conftest*
5577 fi # $ac_x_includes = NO
5578
5579 if test "$ac_x_libraries" = NO; then
5580   # Check for the libraries.
5581
5582   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5583   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5584
5585   # See if we find them without any special options.
5586   # Don't add to $LIBS permanently.
5587   ac_save_LIBS="$LIBS"
5588   LIBS="-l$x_direct_test_library $LIBS"
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592
5593 int main() {
5594 ${x_direct_test_function}()
5595 ; return 0; }
5596 EOF
5597 if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598   rm -rf conftest*
5599   LIBS="$ac_save_LIBS"
5600 # We can link X programs with no special library path.
5601 ac_x_libraries=
5602 else
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   LIBS="$ac_save_LIBS"
5607 # First see if replacing the include by lib works.
5608 # Check X11 before X11Rn because it is often a symlink to the current release.
5609 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5610     /usr/X11/lib          \
5611     /usr/X11R6/lib        \
5612     /usr/X11R5/lib        \
5613     /usr/X11R4/lib        \
5614                           \
5615     /usr/lib/X11          \
5616     /usr/lib/X11R6        \
5617     /usr/lib/X11R5        \
5618     /usr/lib/X11R4        \
5619                           \
5620     /usr/local/X11/lib    \
5621     /usr/local/X11R6/lib  \
5622     /usr/local/X11R5/lib  \
5623     /usr/local/X11R4/lib  \
5624                           \
5625     /usr/local/lib/X11    \
5626     /usr/local/lib/X11R6  \
5627     /usr/local/lib/X11R5  \
5628     /usr/local/lib/X11R4  \
5629                           \
5630     /usr/X386/lib         \
5631     /usr/x386/lib         \
5632     /usr/XFree86/lib/X11  \
5633                           \
5634     /usr/lib              \
5635     /usr/local/lib        \
5636     /usr/unsupported/lib  \
5637     /usr/athena/lib       \
5638     /usr/local/x11r5/lib  \
5639     /usr/lpp/Xamples/lib  \
5640     /lib/usr/lib/X11      \
5641                           \
5642     /usr/openwin/lib      \
5643     /usr/openwin/share/lib \
5644     ; \
5645 do
5646   for ac_extension in a so sl; do
5647     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5648       ac_x_libraries=$ac_dir
5649       break 2
5650     fi
5651   done
5652 done
5653 fi
5654 rm -f conftest*
5655 fi # $ac_x_libraries = NO
5656
5657 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5658   # Didn't find X anywhere.  Cache the known absence of X.
5659   ac_cv_have_x="have_x=no"
5660 else
5661   # Record where we found X for the cache.
5662   ac_cv_have_x="have_x=yes \
5663                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5664 fi
5665   fi
5666   eval "$ac_cv_have_x"
5667 fi # $with_x != no
5668
5669 if test "$have_x" != yes; then
5670   echo "$ac_t""$have_x" 1>&6
5671   no_x=yes
5672 else
5673   # If each of the values was on the command line, it overrides each guess.
5674   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5675   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5676   # Update the cache value to reflect the command line values.
5677   ac_cv_have_x="have_x=yes \
5678                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5679   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5680 fi
5681
5682 if test "$no_x" = yes; then
5683   # Not all programs may use this symbol, but it does not hurt to define it.
5684   { test "$extra_verbose" = "yes" && cat << \EOF
5685     Defining X_DISPLAY_MISSING
5686 EOF
5687 cat >> confdefs.h <<\EOF
5688 #define X_DISPLAY_MISSING 1
5689 EOF
5690 }
5691
5692   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5693 else
5694   if test -n "$x_includes"; then
5695     X_CFLAGS="$X_CFLAGS -I$x_includes"
5696   fi
5697
5698   # It would also be nice to do this for all -L options, not just this one.
5699   if test -n "$x_libraries"; then
5700     X_LIBS="$X_LIBS -L$x_libraries"
5701     # For Solaris; some versions of Sun CC require a space after -R and
5702     # others require no space.  Words are not sufficient . . . .
5703     case "`(uname -sr) 2>/dev/null`" in
5704     "SunOS 5"*)
5705       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5706 echo "configure:5707: checking whether -R must be followed by a space" >&5
5707       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5708       cat > conftest.$ac_ext <<EOF
5709 #line 5710 "configure"
5710 #include "confdefs.h"
5711
5712 int main() {
5713
5714 ; return 0; }
5715 EOF
5716 if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5717   rm -rf conftest*
5718   ac_R_nospace=yes
5719 else
5720   echo "configure: failed program was:" >&5
5721   cat conftest.$ac_ext >&5
5722   rm -rf conftest*
5723   ac_R_nospace=no
5724 fi
5725 rm -f conftest*
5726       if test $ac_R_nospace = yes; then
5727         echo "$ac_t""no" 1>&6
5728         X_LIBS="$X_LIBS -R$x_libraries"
5729       else
5730         LIBS="$ac_xsave_LIBS -R $x_libraries"
5731         cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734
5735 int main() {
5736
5737 ; return 0; }
5738 EOF
5739 if { (eval echo configure:5740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5740   rm -rf conftest*
5741   ac_R_space=yes
5742 else
5743   echo "configure: failed program was:" >&5
5744   cat conftest.$ac_ext >&5
5745   rm -rf conftest*
5746   ac_R_space=no
5747 fi
5748 rm -f conftest*
5749         if test $ac_R_space = yes; then
5750           echo "$ac_t""yes" 1>&6
5751           X_LIBS="$X_LIBS -R $x_libraries"
5752         else
5753           echo "$ac_t""neither works" 1>&6
5754         fi
5755       fi
5756       LIBS="$ac_xsave_LIBS"
5757     esac
5758   fi
5759
5760   # Check for system-dependent libraries X programs must link with.
5761   # Do this before checking for the system-independent R6 libraries
5762   # (-lICE), since we may need -lsocket or whatever for X linking.
5763
5764   if test "$ISC" = yes; then
5765     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5766   else
5767     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5768     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5769     # the Alpha needs dnet_stub (dnet does not exist).
5770     if test "$with_dnet" = "no" ; then
5771 ac_cv_lib_dnet_dnet_ntoa=no
5772 else
5773
5774 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5775 echo "configure:5776: checking for dnet_ntoa in -ldnet" >&5
5776 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5777
5778 xe_check_libs=" -ldnet "
5779 cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 /* We use char because int might match the return type of a gcc2
5784     builtin and then its argument prototype would still apply.  */
5785 char dnet_ntoa();
5786
5787 int main() {
5788 dnet_ntoa()
5789 ; return 0; }
5790 EOF
5791 if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5792   rm -rf conftest*
5793   eval "ac_cv_lib_$ac_lib_var=yes"
5794 else
5795   echo "configure: failed program was:" >&5
5796   cat conftest.$ac_ext >&5
5797   rm -rf conftest*
5798   eval "ac_cv_lib_$ac_lib_var=no"
5799 fi
5800 rm -f conftest*
5801 xe_check_libs=""
5802
5803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5804   echo "$ac_t""yes" 1>&6
5805   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5806 else
5807   echo "$ac_t""no" 1>&6
5808 fi
5809
5810 fi
5811
5812     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5813       
5814 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5815 echo "configure:5816: checking for dnet_ntoa in -ldnet_stub" >&5
5816 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5817
5818 xe_check_libs=" -ldnet_stub "
5819 cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822 /* Override any gcc2 internal prototype to avoid an error.  */
5823 /* We use char because int might match the return type of a gcc2
5824     builtin and then its argument prototype would still apply.  */
5825 char dnet_ntoa();
5826
5827 int main() {
5828 dnet_ntoa()
5829 ; return 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5832   rm -rf conftest*
5833   eval "ac_cv_lib_$ac_lib_var=yes"
5834 else
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   eval "ac_cv_lib_$ac_lib_var=no"
5839 fi
5840 rm -f conftest*
5841 xe_check_libs=""
5842
5843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5844   echo "$ac_t""yes" 1>&6
5845   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5846 else
5847   echo "$ac_t""no" 1>&6
5848 fi
5849
5850
5851     fi
5852
5853     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5854     # to get the SysV transport functions.
5855     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5856     # needs -lnsl.
5857     # The nsl library prevents programs from opening the X display
5858     # on Irix 5.2, according to dickey@clark.net.
5859     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5860 echo "configure:5861: checking for gethostbyname" >&5
5861
5862 cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 /* System header to define __stub macros and hopefully few prototypes,
5866     which can conflict with char gethostbyname(); below.  */
5867 #include <assert.h>
5868 /* Override any gcc2 internal prototype to avoid an error.  */
5869 /* We use char because int might match the return type of a gcc2
5870     builtin and then its argument prototype would still apply.  */
5871 char gethostbyname();
5872
5873 int main() {
5874
5875 /* The GNU C library defines this for functions which it implements
5876     to always fail with ENOSYS.  Some functions are actually named
5877     something starting with __ and the normal name is an alias.  */
5878 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5879 choke me
5880 #else
5881 gethostbyname();
5882 #endif
5883
5884 ; return 0; }
5885 EOF
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887   rm -rf conftest*
5888   eval "ac_cv_func_gethostbyname=yes"
5889 else
5890   echo "configure: failed program was:" >&5
5891   cat conftest.$ac_ext >&5
5892   rm -rf conftest*
5893   eval "ac_cv_func_gethostbyname=no"
5894 fi
5895 rm -f conftest*
5896
5897 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5898   echo "$ac_t""yes" 1>&6
5899   :
5900 else
5901   echo "$ac_t""no" 1>&6
5902 fi
5903
5904     if test $ac_cv_func_gethostbyname = no; then
5905       
5906 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5907 echo "configure:5908: checking for gethostbyname in -lnsl" >&5
5908 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5909
5910 xe_check_libs=" -lnsl "
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char gethostbyname();
5918
5919 int main() {
5920 gethostbyname()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 xe_check_libs=""
5934
5935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5936   echo "$ac_t""yes" 1>&6
5937   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5938 else
5939   echo "$ac_t""no" 1>&6
5940 fi
5941
5942
5943     fi
5944
5945     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5946     # socket/setsockopt and other routines are undefined under SCO ODT
5947     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5948     # on later versions), says simon@lia.di.epfl.ch: it contains
5949     # gethostby* variants that don't use the nameserver (or something).
5950     # -lsocket must be given before -lnsl if both are needed.
5951     # We assume that if connect needs -lnsl, so does gethostbyname.
5952     echo $ac_n "checking for connect""... $ac_c" 1>&6
5953 echo "configure:5954: checking for connect" >&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 connect(); 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 connect();
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_connect) || defined (__stub___connect)
5972 choke me
5973 #else
5974 connect();
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_connect=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_connect=no"
5987 fi
5988 rm -f conftest*
5989
5990 if eval "test \"`echo '$ac_cv_func_'connect`\" = 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_connect = no; then
5998       
5999 xe_msg_checking="for connect in -lsocket"
6000 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6001 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6002 echo "configure:6003: checking "$xe_msg_checking"" >&5
6003 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6004
6005 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 /* Override any gcc2 internal prototype to avoid an error.  */
6010 /* We use char because int might match the return type of a gcc2
6011     builtin and then its argument prototype would still apply.  */
6012 char connect();
6013
6014 int main() {
6015 connect()
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=no"
6026 fi
6027 rm -f conftest*
6028 xe_check_libs=""
6029
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6031   echo "$ac_t""yes" 1>&6
6032   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036
6037
6038     fi
6039
6040     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6041     echo $ac_n "checking for remove""... $ac_c" 1>&6
6042 echo "configure:6043: checking for remove" >&5
6043
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* System header to define __stub macros and hopefully few prototypes,
6048     which can conflict with char remove(); below.  */
6049 #include <assert.h>
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char remove();
6054
6055 int main() {
6056
6057 /* The GNU C library defines this for functions which it implements
6058     to always fail with ENOSYS.  Some functions are actually named
6059     something starting with __ and the normal name is an alias.  */
6060 #if defined (__stub_remove) || defined (__stub___remove)
6061 choke me
6062 #else
6063 remove();
6064 #endif
6065
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_func_remove=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_func_remove=no"
6076 fi
6077 rm -f conftest*
6078
6079 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6080   echo "$ac_t""yes" 1>&6
6081   :
6082 else
6083   echo "$ac_t""no" 1>&6
6084 fi
6085
6086     if test $ac_cv_func_remove = no; then
6087       
6088 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6089 echo "configure:6090: checking for remove in -lposix" >&5
6090 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6091
6092 xe_check_libs=" -lposix "
6093 cat > conftest.$ac_ext <<EOF
6094 #line 6095 "configure"
6095 #include "confdefs.h"
6096 /* Override any gcc2 internal prototype to avoid an error.  */
6097 /* We use char because int might match the return type of a gcc2
6098     builtin and then its argument prototype would still apply.  */
6099 char remove();
6100
6101 int main() {
6102 remove()
6103 ; return 0; }
6104 EOF
6105 if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=yes"
6108 else
6109   echo "configure: failed program was:" >&5
6110   cat conftest.$ac_ext >&5
6111   rm -rf conftest*
6112   eval "ac_cv_lib_$ac_lib_var=no"
6113 fi
6114 rm -f conftest*
6115 xe_check_libs=""
6116
6117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6118   echo "$ac_t""yes" 1>&6
6119   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6120 else
6121   echo "$ac_t""no" 1>&6
6122 fi
6123
6124
6125     fi
6126
6127     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6128     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6129 echo "configure:6130: checking for shmat" >&5
6130
6131 cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6134 /* System header to define __stub macros and hopefully few prototypes,
6135     which can conflict with char shmat(); below.  */
6136 #include <assert.h>
6137 /* Override any gcc2 internal prototype to avoid an error.  */
6138 /* We use char because int might match the return type of a gcc2
6139     builtin and then its argument prototype would still apply.  */
6140 char shmat();
6141
6142 int main() {
6143
6144 /* The GNU C library defines this for functions which it implements
6145     to always fail with ENOSYS.  Some functions are actually named
6146     something starting with __ and the normal name is an alias.  */
6147 #if defined (__stub_shmat) || defined (__stub___shmat)
6148 choke me
6149 #else
6150 shmat();
6151 #endif
6152
6153 ; return 0; }
6154 EOF
6155 if { (eval echo configure:6156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6156   rm -rf conftest*
6157   eval "ac_cv_func_shmat=yes"
6158 else
6159   echo "configure: failed program was:" >&5
6160   cat conftest.$ac_ext >&5
6161   rm -rf conftest*
6162   eval "ac_cv_func_shmat=no"
6163 fi
6164 rm -f conftest*
6165
6166 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6167   echo "$ac_t""yes" 1>&6
6168   :
6169 else
6170   echo "$ac_t""no" 1>&6
6171 fi
6172
6173     if test $ac_cv_func_shmat = no; then
6174       
6175 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6176 echo "configure:6177: checking for shmat in -lipc" >&5
6177 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6178
6179 xe_check_libs=" -lipc "
6180 cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 /* Override any gcc2 internal prototype to avoid an error.  */
6184 /* We use char because int might match the return type of a gcc2
6185     builtin and then its argument prototype would still apply.  */
6186 char shmat();
6187
6188 int main() {
6189 shmat()
6190 ; return 0; }
6191 EOF
6192 if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6193   rm -rf conftest*
6194   eval "ac_cv_lib_$ac_lib_var=yes"
6195 else
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=no"
6200 fi
6201 rm -f conftest*
6202 xe_check_libs=""
6203
6204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6205   echo "$ac_t""yes" 1>&6
6206   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6207 else
6208   echo "$ac_t""no" 1>&6
6209 fi
6210
6211
6212     fi
6213   fi
6214
6215   # Check for libraries that X11R6 Xt/Xaw programs need.
6216   ac_save_LDFLAGS="$LDFLAGS"
6217   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6218   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6219   # check for ICE first), but we must link in the order -lSM -lICE or
6220   # we get undefined symbols.  So assume we have SM if we have ICE.
6221   # These have to be linked with before -lX11, unlike the other
6222   # libraries we check for below, so use a different variable.
6223   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6224   
6225 xe_msg_checking="for IceConnectionNumber in -lICE"
6226 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6227 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6228 echo "configure:6229: checking "$xe_msg_checking"" >&5
6229 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6230
6231 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6232 cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6235 /* Override any gcc2 internal prototype to avoid an error.  */
6236 /* We use char because int might match the return type of a gcc2
6237     builtin and then its argument prototype would still apply.  */
6238 char IceConnectionNumber();
6239
6240 int main() {
6241 IceConnectionNumber()
6242 ; return 0; }
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245   rm -rf conftest*
6246   eval "ac_cv_lib_$ac_lib_var=yes"
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -rf conftest*
6251   eval "ac_cv_lib_$ac_lib_var=no"
6252 fi
6253 rm -f conftest*
6254 xe_check_libs=""
6255
6256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6257   echo "$ac_t""yes" 1>&6
6258   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6259 else
6260   echo "$ac_t""no" 1>&6
6261 fi
6262
6263
6264   LDFLAGS="$ac_save_LDFLAGS"
6265
6266 fi
6267  # Autoconf claims to find X library and include dirs for us.
6268   if test "$no_x" = "yes"
6269   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6270   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6271   fi
6272 fi
6273
6274
6275 if test "$with_x11" = "yes"; then
6276   { test "$extra_verbose" = "yes" && cat << \EOF
6277     Defining HAVE_X_WINDOWS
6278 EOF
6279 cat >> confdefs.h <<\EOF
6280 #define HAVE_X_WINDOWS 1
6281 EOF
6282 }
6283
6284   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6285   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6286
6287       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6288     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6289     if test -d "$lib_dir" -a -d "$inc_dir"; then
6290       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6291         x_libraries="$lib_dir $x_libraries"
6292         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6293       esac
6294       case "$x_includes" in "$inc_dir"* ) ;; *)
6295         x_includes="$inc_dir $x_includes"
6296         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6297       esac
6298       break;       fi
6299   done
6300
6301     for rel in "X11R6" "X11R5" "X11R4"; do
6302     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6303     if test -d "$lib_dir" -a -d "$inc_dir"; then
6304       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6305         x_libraries="$x_libraries $lib_dir"
6306         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6307       esac
6308       case "$x_includes" in "$inc_dir"* ) ;; *)
6309         x_includes="$x_includes $inc_dir"
6310         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6311       esac
6312       break;     fi
6313   done
6314
6315     case "$opsys" in
6316   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 ;;
6317   esac
6318
6319   ld_switch_x_site="$X_LIBS"
6320
6321   
6322 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6323     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6324   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6325   
6326         runpath="" runpath_dirs=""
6327   if test -n "$LD_RUN_PATH"; then
6328     runpath="$LD_RUN_PATH"
6329   elif test "$GCC" = "yes"; then
6330         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6331     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6332     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6333     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6334       case "$arg" in P,* | -L* | -R* )
6335         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6336           {
6337 xe_runpath_dir="$dir"
6338   test "$xe_runpath_dir" != "/lib"     -a \
6339         "$xe_runpath_dir" != "/usr/lib" -a \
6340         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6341   eval "$xe_add_unique_runpath_dir"
6342 }
6343         done ;;
6344       esac
6345     done
6346     ld_switch_run="$ld_switch_run_save"
6347     rm -f conftest*
6348   else
6349         for arg in $ld_switch_site $ld_switch_x_site; do
6350       case "$arg" in -L*) {
6351 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6352   test "$xe_runpath_dir" != "/lib"     -a \
6353         "$xe_runpath_dir" != "/usr/lib" -a \
6354         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6355   eval "$xe_add_unique_runpath_dir"
6356 };; esac
6357     done
6358         if test "$opsys $need_motif" = "sol2 yes"; then
6359       xe_runpath_dir="/opt/SUNWdt/lib";
6360       eval "$xe_add_unique_runpath_dir";
6361     fi
6362   fi 
6363   if test -n "$runpath"; then
6364     ld_switch_run="${dash_r}${runpath}"
6365     
6366 if test "$GCC" = "yes"; then
6367   set x $ld_switch_run; shift; ld_switch_run=""
6368   while test -n "$1"; do
6369     case $1 in
6370       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6371       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6372       -Xlinker* ) ;;
6373       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6374     esac
6375     shift
6376   done
6377 fi
6378     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6379   fi
6380 fi
6381
6382
6383   if test "$extra_verbose" = "yes"; then
6384     echo; echo "X11 compilation variables:"
6385     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6386     echo
6387   fi
6388
6389             bitmapdirs=
6390   if test "$x_includes" != NONE; then
6391     for i in $x_includes; do
6392       if test -d "$i/bitmaps"; then
6393         bitmapdirs="$i/bitmaps:$bitmapdirs"
6394       fi
6395       if test -d "$i/X11/bitmaps"; then
6396         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6397       fi
6398     done
6399     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6400   fi
6401   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6402     Defining BITMAPDIR = "$bitmapdirs"
6403 EOF
6404 cat >> confdefs.h <<EOF
6405 #define BITMAPDIR "$bitmapdirs"
6406 EOF
6407 }
6408
6409
6410     echo "checking for X defines extracted by xmkmf" 1>&6
6411 echo "configure:6412: checking for X defines extracted by xmkmf" >&5
6412   rm -fr conftestdir
6413   if mkdir conftestdir; then
6414     cd conftestdir
6415     cat > Imakefile <<'EOF'
6416 xetest:
6417         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6418 EOF
6419     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6420       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6421       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6422     fi
6423     cd ..
6424     rm -fr conftestdir
6425     for word in $xmkmf_defines; do
6426       case "$word" in 
6427       -D__STDC__*) ;;
6428       -D* )
6429         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6430         case "$word" in
6431           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6432           *     ) val=1 ;;
6433         esac
6434         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6435           if test "$val" = "1"
6436             then { test "$extra_verbose" = "yes" && cat << EOF
6437     Defining $sym
6438 EOF
6439 cat >> confdefs.h <<EOF
6440 #define $sym 1
6441 EOF
6442 }
6443
6444             else { test "$extra_verbose" = "yes" && cat << EOF
6445     Defining $sym = $val
6446 EOF
6447 cat >> confdefs.h <<EOF
6448 #define $sym $val
6449 EOF
6450 }
6451
6452           fi
6453         fi  ;;
6454       esac
6455     done
6456   fi
6457
6458     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6459 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6460 echo "configure:6461: checking for X11/Intrinsic.h" >&5
6461
6462 cat > conftest.$ac_ext <<EOF
6463 #line 6464 "configure"
6464 #include "confdefs.h"
6465 #include <X11/Intrinsic.h>
6466 EOF
6467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6468 { (eval echo configure:6469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6470 if test -z "$ac_err"; then
6471   rm -rf conftest*
6472   eval "ac_cv_header_$ac_safe=yes"
6473 else
6474   echo "$ac_err" >&5
6475   echo "configure: failed program was:" >&5
6476   cat conftest.$ac_ext >&5
6477   rm -rf conftest*
6478   eval "ac_cv_header_$ac_safe=no"
6479 fi
6480 rm -f conftest*
6481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6482   echo "$ac_t""yes" 1>&6
6483   :
6484 else
6485   echo "$ac_t""no" 1>&6
6486 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6487 fi
6488
6489
6490       
6491 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6492 echo "configure:6493: checking for XOpenDisplay in -lX11" >&5
6493 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6494
6495 xe_check_libs=" -lX11 "
6496 cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 /* We use char because int might match the return type of a gcc2
6501     builtin and then its argument prototype would still apply.  */
6502 char XOpenDisplay();
6503
6504 int main() {
6505 XOpenDisplay()
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=yes"
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_lib_$ac_lib_var=no"
6516 fi
6517 rm -f conftest*
6518 xe_check_libs=""
6519
6520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6521   echo "$ac_t""yes" 1>&6
6522   have_lib_x11=yes
6523 else
6524   echo "$ac_t""no" 1>&6
6525 fi
6526
6527
6528   if test "$have_lib_x11" != "yes"; then
6529     
6530 xe_msg_checking="for XGetFontProperty in -lX11"
6531 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6532 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6533 echo "configure:6534: checking "$xe_msg_checking"" >&5
6534 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6535
6536 xe_check_libs=" -lX11 -b i486-linuxaout"
6537 cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* Override any gcc2 internal prototype to avoid an error.  */
6541 /* We use char because int might match the return type of a gcc2
6542     builtin and then its argument prototype would still apply.  */
6543 char XGetFontProperty();
6544
6545 int main() {
6546 XGetFontProperty()
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6550   rm -rf conftest*
6551   eval "ac_cv_lib_$ac_lib_var=yes"
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   eval "ac_cv_lib_$ac_lib_var=no"
6557 fi
6558 rm -f conftest*
6559 xe_check_libs=""
6560
6561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6562   echo "$ac_t""yes" 1>&6
6563   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6564 else
6565   echo "$ac_t""no" 1>&6
6566 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6567 fi
6568
6569
6570   fi
6571   libs_x="-lX11"
6572   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6573
6574     
6575 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6576 echo "configure:6577: checking for XShapeSelectInput in -lXext" >&5
6577 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6578
6579 xe_check_libs=" -lXext "
6580 cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* Override any gcc2 internal prototype to avoid an error.  */
6584 /* We use char because int might match the return type of a gcc2
6585     builtin and then its argument prototype would still apply.  */
6586 char XShapeSelectInput();
6587
6588 int main() {
6589 XShapeSelectInput()
6590 ; return 0; }
6591 EOF
6592 if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6593   rm -rf conftest*
6594   eval "ac_cv_lib_$ac_lib_var=yes"
6595 else
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   eval "ac_cv_lib_$ac_lib_var=no"
6600 fi
6601 rm -f conftest*
6602 xe_check_libs=""
6603
6604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6605   echo "$ac_t""yes" 1>&6
6606   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6607 else
6608   echo "$ac_t""no" 1>&6
6609 fi
6610
6611
6612
6613     
6614 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6615 echo "configure:6616: checking for XtOpenDisplay in -lXt" >&5
6616 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6617
6618 xe_check_libs=" -lXt "
6619 cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* Override any gcc2 internal prototype to avoid an error.  */
6623 /* We use char because int might match the return type of a gcc2
6624     builtin and then its argument prototype would still apply.  */
6625 char XtOpenDisplay();
6626
6627 int main() {
6628 XtOpenDisplay()
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=yes"
6634 else
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_lib_$ac_lib_var=no"
6639 fi
6640 rm -f conftest*
6641 xe_check_libs=""
6642
6643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6644   echo "$ac_t""yes" 1>&6
6645   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6646 else
6647   echo "$ac_t""no" 1>&6
6648 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6649 fi
6650
6651
6652
6653   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6654 echo "configure:6655: checking the version of X11 being used" >&5
6655   cat > conftest.$ac_ext <<EOF
6656 #line 6657 "configure"
6657 #include "confdefs.h"
6658 #include <X11/Intrinsic.h>
6659     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6662 then
6663   ./conftest foobar; x11_release=$?
6664 else
6665   conftest_rc="$?"
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -fr conftest*
6669   x11_release=4
6670 fi
6671 rm -fr conftest*
6672   echo "$ac_t""R${x11_release}" 1>&6
6673   { test "$extra_verbose" = "yes" && cat << EOF
6674     Defining THIS_IS_X11R${x11_release}
6675 EOF
6676 cat >> confdefs.h <<EOF
6677 #define THIS_IS_X11R${x11_release} 1
6678 EOF
6679 }
6680
6681
6682   if test "${x11_release}" = "4"; then
6683     case "$with_widgets" in
6684       "" | "no") with_widgets=no ;;
6685       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6686     esac
6687   fi
6688
6689   for ac_func in XConvertCase
6690 do
6691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6692 echo "configure:6693: checking for $ac_func" >&5
6693
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* System header to define __stub macros and hopefully few prototypes,
6698     which can conflict with char $ac_func(); below.  */
6699 #include <assert.h>
6700 /* Override any gcc2 internal prototype to avoid an error.  */
6701 /* We use char because int might match the return type of a gcc2
6702     builtin and then its argument prototype would still apply.  */
6703 char $ac_func();
6704
6705 int main() {
6706
6707 /* The GNU C library defines this for functions which it implements
6708     to always fail with ENOSYS.  Some functions are actually named
6709     something starting with __ and the normal name is an alias.  */
6710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6711 choke me
6712 #else
6713 $ac_func();
6714 #endif
6715
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_func_$ac_func=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_func_$ac_func=no"
6726 fi
6727 rm -f conftest*
6728
6729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6730   echo "$ac_t""yes" 1>&6
6731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6732   { test "$extra_verbose" = "yes" && cat << EOF
6733     Defining $ac_tr_func
6734 EOF
6735 cat >> confdefs.h <<EOF
6736 #define $ac_tr_func 1
6737 EOF
6738 }
6739  
6740 else
6741   echo "$ac_t""no" 1>&6
6742 fi
6743 done
6744
6745
6746   for ac_hdr in X11/Xlocale.h
6747 do
6748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6750 echo "configure:6751: checking for $ac_hdr" >&5
6751
6752 cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 #include <$ac_hdr>
6756 EOF
6757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6758 { (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6760 if test -z "$ac_err"; then
6761   rm -rf conftest*
6762   eval "ac_cv_header_$ac_safe=yes"
6763 else
6764   echo "$ac_err" >&5
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_header_$ac_safe=no"
6769 fi
6770 rm -f conftest*
6771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6772   echo "$ac_t""yes" 1>&6
6773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6774   { test "$extra_verbose" = "yes" && cat << EOF
6775     Defining $ac_tr_hdr
6776 EOF
6777 cat >> confdefs.h <<EOF
6778 #define $ac_tr_hdr 1
6779 EOF
6780 }
6781  
6782 else
6783   echo "$ac_t""no" 1>&6
6784 fi
6785 done
6786
6787
6788     for ac_func in XRegisterIMInstantiateCallback
6789 do
6790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6791 echo "configure:6792: checking for $ac_func" >&5
6792
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* System header to define __stub macros and hopefully few prototypes,
6797     which can conflict with char $ac_func(); below.  */
6798 #include <assert.h>
6799 /* Override any gcc2 internal prototype to avoid an error.  */
6800 /* We use char because int might match the return type of a gcc2
6801     builtin and then its argument prototype would still apply.  */
6802 char $ac_func();
6803
6804 int main() {
6805
6806 /* The GNU C library defines this for functions which it implements
6807     to always fail with ENOSYS.  Some functions are actually named
6808     something starting with __ and the normal name is an alias.  */
6809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6810 choke me
6811 #else
6812 $ac_func();
6813 #endif
6814
6815 ; return 0; }
6816 EOF
6817 if { (eval echo configure:6818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6818   rm -rf conftest*
6819   eval "ac_cv_func_$ac_func=yes"
6820 else
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   eval "ac_cv_func_$ac_func=no"
6825 fi
6826 rm -f conftest*
6827
6828 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6829   echo "$ac_t""yes" 1>&6
6830     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6831   { test "$extra_verbose" = "yes" && cat << EOF
6832     Defining $ac_tr_func
6833 EOF
6834 cat >> confdefs.h <<EOF
6835 #define $ac_tr_func 1
6836 EOF
6837 }
6838  
6839 else
6840   echo "$ac_t""no" 1>&6
6841 fi
6842 done
6843
6844   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6845 echo "configure:6846: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6846   cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849
6850 #define NeedFunctionPrototypes 1
6851 #include <X11/Xlib.h>
6852 extern Bool XRegisterIMInstantiateCallback(
6853    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6854
6855 int main() {
6856
6857 ; return 0; }
6858 EOF
6859 if { (eval echo configure:6860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6860   rm -rf conftest*
6861   echo "$ac_t""yes" 1>&6
6862 else
6863   echo "configure: failed program was:" >&5
6864   cat conftest.$ac_ext >&5
6865   rm -rf conftest*
6866   echo "$ac_t""no" 1>&6
6867    { test "$extra_verbose" = "yes" && cat << \EOF
6868     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6869 EOF
6870 cat >> confdefs.h <<\EOF
6871 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6872 EOF
6873 }
6874
6875 fi
6876 rm -f conftest*
6877
6878     test -z "$with_xmu" && { 
6879 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6880 echo "configure:6881: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6881 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6882
6883 xe_check_libs=" -lXmu "
6884 cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 /* Override any gcc2 internal prototype to avoid an error.  */
6888 /* We use char because int might match the return type of a gcc2
6889     builtin and then its argument prototype would still apply.  */
6890 char XmuReadBitmapDataFromFile();
6891
6892 int main() {
6893 XmuReadBitmapDataFromFile()
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=yes"
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_lib_$ac_lib_var=no"
6904 fi
6905 rm -f conftest*
6906 xe_check_libs=""
6907
6908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6909   echo "$ac_t""yes" 1>&6
6910   with_xmu=yes
6911 else
6912   echo "$ac_t""no" 1>&6
6913 with_xmu=no
6914 fi
6915
6916  }
6917   if test "$with_xmu" = "no"; then
6918     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6919    echo "    xemacs will be linked with \"xmu.o\""
6920  fi
6921   else
6922     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6923     { test "$extra_verbose" = "yes" && cat << \EOF
6924     Defining HAVE_XMU
6925 EOF
6926 cat >> confdefs.h <<\EOF
6927 #define HAVE_XMU 1
6928 EOF
6929 }
6930
6931   fi
6932
6933       
6934 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6935 echo "configure:6936: checking for main in -lXbsd" >&5
6936 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6937
6938 xe_check_libs=" -lXbsd "
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942
6943 int main() {
6944 main()
6945 ; return 0; }
6946 EOF
6947 if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6948   rm -rf conftest*
6949   eval "ac_cv_lib_$ac_lib_var=yes"
6950 else
6951   echo "configure: failed program was:" >&5
6952   cat conftest.$ac_ext >&5
6953   rm -rf conftest*
6954   eval "ac_cv_lib_$ac_lib_var=no"
6955 fi
6956 rm -f conftest*
6957 xe_check_libs=""
6958
6959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6960   echo "$ac_t""yes" 1>&6
6961   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6962 else
6963   echo "$ac_t""no" 1>&6
6964 fi
6965
6966
6967
6968     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6969         if test "$GCC" = "yes"; then
6970       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6971       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6972     else
6973       case "$CC" in
6974         "xlc" ) CC="xlc_r" ;;
6975         "xlC" ) CC="xlC_r" ;;
6976         "cc"  ) CC="cc_r" ;;
6977       esac
6978     fi
6979   fi
6980
6981 fi 
6982 if test "$with_msw" != "no"; then
6983   echo "checking for MS-Windows" 1>&6
6984 echo "configure:6985: checking for MS-Windows" >&5
6985   
6986 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6987 echo "configure:6988: checking for main in -lgdi32" >&5
6988 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6989
6990 xe_check_libs=" -lgdi32 "
6991 cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994
6995 int main() {
6996 main()
6997 ; return 0; }
6998 EOF
6999 if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=yes"
7002 else
7003   echo "configure: failed program was:" >&5
7004   cat conftest.$ac_ext >&5
7005   rm -rf conftest*
7006   eval "ac_cv_lib_$ac_lib_var=no"
7007 fi
7008 rm -f conftest*
7009 xe_check_libs=""
7010
7011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7012   echo "$ac_t""yes" 1>&6
7013   with_msw=yes
7014 else
7015   echo "$ac_t""no" 1>&6
7016 fi
7017
7018
7019   if test "$with_msw" = "yes"; then
7020     { test "$extra_verbose" = "yes" && cat << \EOF
7021     Defining HAVE_MS_WINDOWS
7022 EOF
7023 cat >> confdefs.h <<\EOF
7024 #define HAVE_MS_WINDOWS 1
7025 EOF
7026 }
7027
7028
7029         if test "$with_netinstall" = "yes"; then
7030       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7031       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7032       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7033     fi
7034
7035     install_pp="$blddir/lib-src/installexe.sh"
7036     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
7037     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7038     if test "$window_system" != x11; then
7039         window_system=msw
7040         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7041             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7042    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7043  fi
7044         test "$with_menubars"   != "no" && with_menubars=msw \
7045             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7046    echo "    xemacs will be linked with \"menubar-msw.o\""
7047  fi
7048         test "$with_toolbars"   != "no" && with_toolbars=msw \
7049             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7050    echo "    xemacs will be linked with \"toolbar-msw.o\""
7051  fi
7052         test "$with_dialogs"   != "no" && with_dialogs=msw \
7053             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7054    echo "    xemacs will be linked with \"dialog-msw.o\""
7055  fi
7056         test "$with_widgets"   != "no" && with_widgets=msw
7057     else
7058         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7059    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7060  fi
7061         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7062    echo "    xemacs will be linked with \"menubar-msw.o\""
7063  fi
7064         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7065    echo "    xemacs will be linked with \"toolbar-msw.o\""
7066  fi
7067         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7068    echo "    xemacs will be linked with \"dialog-msw.o\""
7069  fi
7070     fi
7071         cat > conftest.$ac_ext <<EOF
7072 #line 7073 "configure"
7073 #include "confdefs.h"
7074 #include <fcntl.h>
7075     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7076 EOF
7077 if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7078 then
7079   { test "$extra_verbose" = "yes" && cat << \EOF
7080     Defining HAVE_MSG_SELECT
7081 EOF
7082 cat >> confdefs.h <<\EOF
7083 #define HAVE_MSG_SELECT 1
7084 EOF
7085 }
7086
7087 else
7088   conftest_rc="$?"
7089   echo "configure: failed program was:" >&5
7090   cat conftest.$ac_ext >&5
7091 fi
7092 rm -fr conftest*
7093     with_file_coding=yes
7094     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
7095    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\""
7096  fi
7097   fi
7098 fi
7099
7100
7101
7102 test -z "$window_system" && window_system="none"
7103
7104 if test "$window_system" = "none"; then
7105   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7106   do
7107     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7108        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7109     fi
7110     eval "with_${feature}=no"
7111   done
7112 else
7113   test -z "$with_toolbars" && with_toolbars=yes
7114 fi
7115
7116 if test "$with_msw" != "yes"; then
7117   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7118   do
7119     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7120        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7121     fi
7122     eval "with_${feature}=no"
7123   done
7124 else
7125   :
7126 fi
7127
7128 if test "$with_x11" != "yes"; then
7129             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7130   do
7131     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7132        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7133     fi
7134     eval "with_${feature}=no"
7135   done
7136 fi
7137
7138 if test "$with_x11" = "yes"; then
7139   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7140 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7141 echo "configure:7142: checking for X11/extensions/shape.h" >&5
7142
7143 cat > conftest.$ac_ext <<EOF
7144 #line 7145 "configure"
7145 #include "confdefs.h"
7146 #include <X11/extensions/shape.h>
7147 EOF
7148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7149 { (eval echo configure:7150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7151 if test -z "$ac_err"; then
7152   rm -rf conftest*
7153   eval "ac_cv_header_$ac_safe=yes"
7154 else
7155   echo "$ac_err" >&5
7156   echo "configure: failed program was:" >&5
7157   cat conftest.$ac_ext >&5
7158   rm -rf conftest*
7159   eval "ac_cv_header_$ac_safe=no"
7160 fi
7161 rm -f conftest*
7162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7163   echo "$ac_t""yes" 1>&6
7164   
7165    { test "$extra_verbose" = "yes" && cat << \EOF
7166     Defining HAVE_BALLOON_HELP
7167 EOF
7168 cat >> confdefs.h <<\EOF
7169 #define HAVE_BALLOON_HELP 1
7170 EOF
7171 }
7172
7173    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7174    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7175  fi
7176 else
7177   echo "$ac_t""no" 1>&6
7178 fi
7179
7180 fi
7181
7182 bitmapdir=
7183
7184 case "$window_system" in
7185   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7186   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7187   gtk  )
7188        HAVE_X_WINDOWS=no
7189        test "$with_gnome" = "yes" && echo "  Using GNOME."
7190        test "$with_gnome" = "no" && echo "  Using GTK."
7191        ;;
7192   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7193 esac
7194
7195 case "$x_libraries" in *X11R4* )
7196   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7197   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7198 esac
7199
7200 echo "checking for WM_COMMAND option" 1>&6
7201 echo "configure:7202: checking for WM_COMMAND option" >&5;
7202 if test "$with_wmcommand" != "no"; then
7203   { test "$extra_verbose" = "yes" && cat << \EOF
7204     Defining HAVE_WMCOMMAND
7205 EOF
7206 cat >> confdefs.h <<\EOF
7207 #define HAVE_WMCOMMAND 1
7208 EOF
7209 }
7210
7211 fi
7212
7213 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7214 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7215 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7216 echo "configure:7217: checking for X11/Xauth.h" >&5
7217
7218 cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221 #include <X11/Xauth.h>
7222 EOF
7223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7224 { (eval echo configure:7225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7226 if test -z "$ac_err"; then
7227   rm -rf conftest*
7228   eval "ac_cv_header_$ac_safe=yes"
7229 else
7230   echo "$ac_err" >&5
7231   echo "configure: failed program was:" >&5
7232   cat conftest.$ac_ext >&5
7233   rm -rf conftest*
7234   eval "ac_cv_header_$ac_safe=no"
7235 fi
7236 rm -f conftest*
7237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7238   echo "$ac_t""yes" 1>&6
7239   :
7240 else
7241   echo "$ac_t""no" 1>&6
7242 with_xauth=no
7243 fi
7244  }
7245 test -z "$with_xauth" && { 
7246 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7247 echo "configure:7248: checking for XauGetAuthByAddr in -lXau" >&5
7248 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7249
7250 xe_check_libs=" -lXau "
7251 cat > conftest.$ac_ext <<EOF
7252 #line 7253 "configure"
7253 #include "confdefs.h"
7254 /* Override any gcc2 internal prototype to avoid an error.  */
7255 /* We use char because int might match the return type of a gcc2
7256     builtin and then its argument prototype would still apply.  */
7257 char XauGetAuthByAddr();
7258
7259 int main() {
7260 XauGetAuthByAddr()
7261 ; return 0; }
7262 EOF
7263 if { (eval echo configure:7264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7264   rm -rf conftest*
7265   eval "ac_cv_lib_$ac_lib_var=yes"
7266 else
7267   echo "configure: failed program was:" >&5
7268   cat conftest.$ac_ext >&5
7269   rm -rf conftest*
7270   eval "ac_cv_lib_$ac_lib_var=no"
7271 fi
7272 rm -f conftest*
7273 xe_check_libs=""
7274
7275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7276   echo "$ac_t""yes" 1>&6
7277   :
7278 else
7279   echo "$ac_t""no" 1>&6
7280 with_xauth=no
7281 fi
7282
7283  }
7284 test -z "$with_xauth" && with_xauth=yes
7285 if test "$with_xauth" = "yes"; then
7286   { test "$extra_verbose" = "yes" && cat << \EOF
7287     Defining HAVE_XAUTH
7288 EOF
7289 cat >> confdefs.h <<\EOF
7290 #define HAVE_XAUTH 1
7291 EOF
7292 }
7293
7294   
7295 T=""
7296 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
7297 libs_xauth="$T"
7298
7299 fi
7300
7301
7302
7303
7304 if test "$with_tooltalk" != "no" ; then
7305       for dir in "" "Tt/" "desktop/" ; do
7306     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7307 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7308 echo "configure:7309: checking for ${dir}tt_c.h" >&5
7309
7310 cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7313 #include <${dir}tt_c.h>
7314 EOF
7315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7316 { (eval echo configure:7317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7318 if test -z "$ac_err"; then
7319   rm -rf conftest*
7320   eval "ac_cv_header_$ac_safe=yes"
7321 else
7322   echo "$ac_err" >&5
7323   echo "configure: failed program was:" >&5
7324   cat conftest.$ac_ext >&5
7325   rm -rf conftest*
7326   eval "ac_cv_header_$ac_safe=no"
7327 fi
7328 rm -f conftest*
7329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7330   echo "$ac_t""yes" 1>&6
7331   tt_c_h_file="${dir}tt_c.h"; break
7332 else
7333   echo "$ac_t""no" 1>&6
7334 fi
7335
7336   done
7337   if test -z "$tt_c_h_file"; then
7338     if test "$with_tooltalk" = "yes"; then
7339       (echo "$progname: Usage error:"
7340 echo " " "Unable to find required tooltalk header files."
7341 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7342     fi
7343     with_tooltalk=no
7344   fi
7345 fi
7346 if test "$with_tooltalk" != "no" ; then
7347   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7348     
7349 xe_msg_checking="for tt_message_create in -ltt"
7350 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7351 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7352 echo "configure:7353: checking "$xe_msg_checking"" >&5
7353 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7354
7355 xe_check_libs=" -ltt $extra_libs"
7356 cat > conftest.$ac_ext <<EOF
7357 #line 7358 "configure"
7358 #include "confdefs.h"
7359 /* Override any gcc2 internal prototype to avoid an error.  */
7360 /* We use char because int might match the return type of a gcc2
7361     builtin and then its argument prototype would still apply.  */
7362 char tt_message_create();
7363
7364 int main() {
7365 tt_message_create()
7366 ; return 0; }
7367 EOF
7368 if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7369   rm -rf conftest*
7370   eval "ac_cv_lib_$ac_lib_var=yes"
7371 else
7372   echo "configure: failed program was:" >&5
7373   cat conftest.$ac_ext >&5
7374   rm -rf conftest*
7375   eval "ac_cv_lib_$ac_lib_var=no"
7376 fi
7377 rm -f conftest*
7378 xe_check_libs=""
7379
7380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7381   echo "$ac_t""yes" 1>&6
7382   tt_libs="-ltt $extra_libs"; break
7383 else
7384   echo "$ac_t""no" 1>&6
7385 :
7386 fi
7387
7388
7389   done
7390   if test -z "$tt_libs"; then
7391     if test "$with_tooltalk" = "yes"; then
7392       (echo "$progname: Usage error:"
7393 echo " " "Unable to find required tooltalk libraries."
7394 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7395     fi
7396     with_tooltalk=no
7397   fi
7398 fi
7399 test -z "$with_tooltalk" && with_tooltalk=yes
7400 if test "$with_tooltalk" = "yes"; then
7401   { test "$extra_verbose" = "yes" && cat << \EOF
7402     Defining TOOLTALK
7403 EOF
7404 cat >> confdefs.h <<\EOF
7405 #define TOOLTALK 1
7406 EOF
7407 }
7408
7409   { test "$extra_verbose" = "yes" && cat << EOF
7410     Defining TT_C_H_FILE = "$tt_c_h_file"
7411 EOF
7412 cat >> confdefs.h <<EOF
7413 #define TT_C_H_FILE "$tt_c_h_file"
7414 EOF
7415 }
7416
7417   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7418   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7419    echo "    xemacs will be linked with \"tooltalk.o\""
7420  fi
7421 fi
7422
7423 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7424 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7425 echo "configure:7426: checking for Dt/Dt.h" >&5
7426
7427 cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430 #include <Dt/Dt.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_cde=no
7452 fi
7453  }
7454 test -z "$with_cde" && { 
7455 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7456 echo "configure:7457: checking for DtDndDragStart in -lDtSvc" >&5
7457 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7458
7459 xe_check_libs=" -lDtSvc "
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 DtDndDragStart();
7467
7468 int main() {
7469 DtDndDragStart()
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_cde=no
7490 fi
7491
7492  }
7493 test -z "$with_cde" && with_cde=yes
7494 if test "$with_dragndrop" = no; then
7495   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7496   with_cde=no
7497 fi
7498 if test "$with_cde" = "yes" ; then
7499   { test "$extra_verbose" = "yes" && cat << \EOF
7500     Defining HAVE_CDE
7501 EOF
7502 cat >> confdefs.h <<\EOF
7503 #define HAVE_CDE 1
7504 EOF
7505 }
7506
7507   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7508   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7509   with_tooltalk=yes # CDE requires Tooltalk
7510   need_motif=yes    # CDE requires Motif
7511 fi
7512
7513 test "$window_system" != "x11" && with_offix=no
7514 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7515   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7516   with_offix=no
7517 fi
7518 if test "$with_dragndrop" = no; then
7519   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7520   with_offix=no
7521 fi
7522 if test "$with_cde" = yes; then
7523   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7524   with_offix=no
7525 fi
7526 test -z "$with_offix" && with_offix=no
7527 if test "$with_offix" = "yes"; then
7528   { test "$extra_verbose" = "yes" && cat << \EOF
7529     Defining HAVE_OFFIX_DND
7530 EOF
7531 cat >> confdefs.h <<\EOF
7532 #define HAVE_OFFIX_DND 1
7533 EOF
7534 }
7535
7536   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7537   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7538 fi
7539 if test "$with_gtk" = "yes"; then
7540    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7541 fi
7542
7543 if test "$with_dragndrop" != "no" ; then
7544   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7545 echo "configure:7546: checking if drag and drop API is needed" >&5
7546   if test -n "$dragndrop_proto" ; then
7547     with_dragndrop=yes
7548     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7549     { test "$extra_verbose" = "yes" && cat << \EOF
7550     Defining HAVE_DRAGNDROP
7551 EOF
7552 cat >> confdefs.h <<\EOF
7553 #define HAVE_DRAGNDROP 1
7554 EOF
7555 }
7556
7557     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7558   else
7559     with_dragndrop=no
7560     echo "$ac_t""no" 1>&6
7561   fi
7562 fi
7563
7564 echo "checking for LDAP" 1>&6
7565 echo "configure:7566: checking for LDAP" >&5
7566 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7567 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7568 echo "configure:7569: checking for ldap.h" >&5
7569
7570 cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573 #include <ldap.h>
7574 EOF
7575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7576 { (eval echo configure:7577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7578 if test -z "$ac_err"; then
7579   rm -rf conftest*
7580   eval "ac_cv_header_$ac_safe=yes"
7581 else
7582   echo "$ac_err" >&5
7583   echo "configure: failed program was:" >&5
7584   cat conftest.$ac_ext >&5
7585   rm -rf conftest*
7586   eval "ac_cv_header_$ac_safe=no"
7587 fi
7588 rm -f conftest*
7589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7590   echo "$ac_t""yes" 1>&6
7591   :
7592 else
7593   echo "$ac_t""no" 1>&6
7594 with_ldap=no
7595 fi
7596  }
7597 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7598 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7599 echo "configure:7600: checking for lber.h" >&5
7600
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604 #include <lber.h>
7605 EOF
7606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7607 { (eval echo configure:7608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7609 if test -z "$ac_err"; then
7610   rm -rf conftest*
7611   eval "ac_cv_header_$ac_safe=yes"
7612 else
7613   echo "$ac_err" >&5
7614   echo "configure: failed program was:" >&5
7615   cat conftest.$ac_ext >&5
7616   rm -rf conftest*
7617   eval "ac_cv_header_$ac_safe=no"
7618 fi
7619 rm -f conftest*
7620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7621   echo "$ac_t""yes" 1>&6
7622   :
7623 else
7624   echo "$ac_t""no" 1>&6
7625 with_ldap=no
7626 fi
7627  }
7628 if test "$with_ldap" != "no"; then
7629   
7630 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7631 echo "configure:7632: checking for ldap_search in -lldap" >&5
7632 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7633
7634 xe_check_libs=" -lldap "
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* Override any gcc2 internal prototype to avoid an error.  */
7639 /* We use char because int might match the return type of a gcc2
7640     builtin and then its argument prototype would still apply.  */
7641 char ldap_search();
7642
7643 int main() {
7644 ldap_search()
7645 ; return 0; }
7646 EOF
7647 if { (eval echo configure:7648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7648   rm -rf conftest*
7649   eval "ac_cv_lib_$ac_lib_var=yes"
7650 else
7651   echo "configure: failed program was:" >&5
7652   cat conftest.$ac_ext >&5
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=no"
7655 fi
7656 rm -f conftest*
7657 xe_check_libs=""
7658
7659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7660   echo "$ac_t""yes" 1>&6
7661   with_ldap_nolber=yes
7662 else
7663   echo "$ac_t""no" 1>&6
7664 with_ldap_nolber=no
7665 fi
7666
7667
7668   test "$with_ldap_nolber" = "no" && { 
7669 xe_msg_checking="for ldap_open in -lldap"
7670 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7671 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7672 echo "configure:7673: checking "$xe_msg_checking"" >&5
7673 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7674
7675 xe_check_libs=" -lldap -llber"
7676 cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* Override any gcc2 internal prototype to avoid an error.  */
7680 /* We use char because int might match the return type of a gcc2
7681     builtin and then its argument prototype would still apply.  */
7682 char ldap_open();
7683
7684 int main() {
7685 ldap_open()
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7689   rm -rf conftest*
7690   eval "ac_cv_lib_$ac_lib_var=yes"
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   eval "ac_cv_lib_$ac_lib_var=no"
7696 fi
7697 rm -f conftest*
7698 xe_check_libs=""
7699
7700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7701   echo "$ac_t""yes" 1>&6
7702   with_ldap_lber=yes
7703 else
7704   echo "$ac_t""no" 1>&6
7705 with_ldap_lber=no
7706 fi
7707
7708  }
7709   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7710 xe_msg_checking="for ldap_open in -lldap"
7711 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7712 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7713 echo "configure:7714: checking "$xe_msg_checking"" >&5
7714 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7715
7716 xe_check_libs=" -lldap -llber -lkrb"
7717 cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char ldap_open();
7724
7725 int main() {
7726 ldap_open()
7727 ; return 0; }
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7730   rm -rf conftest*
7731   eval "ac_cv_lib_$ac_lib_var=yes"
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -rf conftest*
7736   eval "ac_cv_lib_$ac_lib_var=no"
7737 fi
7738 rm -f conftest*
7739 xe_check_libs=""
7740
7741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7742   echo "$ac_t""yes" 1>&6
7743   with_ldap_krb=yes
7744 else
7745   echo "$ac_t""no" 1>&6
7746 with_ldap_krb=no
7747 fi
7748
7749  }
7750   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7751 xe_msg_checking="for ldap_open in -lldap"
7752 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7753 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7754 echo "configure:7755: checking "$xe_msg_checking"" >&5
7755 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7756
7757 xe_check_libs=" -lldap -llber -lkrb -ldes"
7758 cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 /* Override any gcc2 internal prototype to avoid an error.  */
7762 /* We use char because int might match the return type of a gcc2
7763     builtin and then its argument prototype would still apply.  */
7764 char ldap_open();
7765
7766 int main() {
7767 ldap_open()
7768 ; return 0; }
7769 EOF
7770 if { (eval echo configure:7771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7771   rm -rf conftest*
7772   eval "ac_cv_lib_$ac_lib_var=yes"
7773 else
7774   echo "configure: failed program was:" >&5
7775   cat conftest.$ac_ext >&5
7776   rm -rf conftest*
7777   eval "ac_cv_lib_$ac_lib_var=no"
7778 fi
7779 rm -f conftest*
7780 xe_check_libs=""
7781
7782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7783   echo "$ac_t""yes" 1>&6
7784   with_ldap_krbdes=yes
7785 else
7786   echo "$ac_t""no" 1>&6
7787 with_ldap_krbdes=no
7788 fi
7789
7790  }
7791   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
7792 fi
7793 if test "$with_ldap" = "yes"; then
7794   { test "$extra_verbose" = "yes" && cat << \EOF
7795     Defining HAVE_LDAP
7796 EOF
7797 cat >> confdefs.h <<\EOF
7798 #define HAVE_LDAP 1
7799 EOF
7800 }
7801
7802   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7803    echo "    xemacs will be linked with \"eldap.o\""
7804  fi
7805   if test "$with_ldap_nolber" = "yes" ; then
7806     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7807   else
7808     if test "$with_ldap_krb" = "yes" ; then
7809       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7810     fi
7811     if test "$with_ldap_krbdes" = "yes" ; then
7812       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7813       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7814     fi
7815     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7816     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7817   fi
7818   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7819 do
7820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7821 echo "configure:7822: checking for $ac_func" >&5
7822
7823 cat > conftest.$ac_ext <<EOF
7824 #line 7825 "configure"
7825 #include "confdefs.h"
7826 /* System header to define __stub macros and hopefully few prototypes,
7827     which can conflict with char $ac_func(); below.  */
7828 #include <assert.h>
7829 /* Override any gcc2 internal prototype to avoid an error.  */
7830 /* We use char because int might match the return type of a gcc2
7831     builtin and then its argument prototype would still apply.  */
7832 char $ac_func();
7833
7834 int main() {
7835
7836 /* The GNU C library defines this for functions which it implements
7837     to always fail with ENOSYS.  Some functions are actually named
7838     something starting with __ and the normal name is an alias.  */
7839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7840 choke me
7841 #else
7842 $ac_func();
7843 #endif
7844
7845 ; return 0; }
7846 EOF
7847 if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7848   rm -rf conftest*
7849   eval "ac_cv_func_$ac_func=yes"
7850 else
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   eval "ac_cv_func_$ac_func=no"
7855 fi
7856 rm -f conftest*
7857
7858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7859   echo "$ac_t""yes" 1>&6
7860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7861   { test "$extra_verbose" = "yes" && cat << EOF
7862     Defining $ac_tr_func
7863 EOF
7864 cat >> confdefs.h <<EOF
7865 #define $ac_tr_func 1
7866 EOF
7867 }
7868  
7869 else
7870   echo "$ac_t""no" 1>&6
7871 fi
7872 done
7873
7874 fi
7875
7876 if test "$with_postgresql" != "no"; then
7877   echo "checking for PostgreSQL" 1>&6
7878 echo "configure:7879: checking for PostgreSQL" >&5
7879
7880   for header_dir in "" "pgsql/" "postgresql/"; do
7881     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7882 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7883 echo "configure:7884: checking for ${header_dir}libpq-fe.h" >&5
7884
7885 cat > conftest.$ac_ext <<EOF
7886 #line 7887 "configure"
7887 #include "confdefs.h"
7888 #include <${header_dir}libpq-fe.h>
7889 EOF
7890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7891 { (eval echo configure:7892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7893 if test -z "$ac_err"; then
7894   rm -rf conftest*
7895   eval "ac_cv_header_$ac_safe=yes"
7896 else
7897   echo "$ac_err" >&5
7898   echo "configure: failed program was:" >&5
7899   cat conftest.$ac_ext >&5
7900   rm -rf conftest*
7901   eval "ac_cv_header_$ac_safe=no"
7902 fi
7903 rm -f conftest*
7904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7905   echo "$ac_t""yes" 1>&6
7906   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7907 else
7908   echo "$ac_t""no" 1>&6
7909 fi
7910
7911   done
7912
7913   test -n "$libpq_fe_h_file" && { 
7914 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7915 echo "configure:7916: checking for PQconnectdb in -lpq" >&5
7916 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7917
7918 xe_check_libs=" -lpq "
7919 cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922 /* Override any gcc2 internal prototype to avoid an error.  */
7923 /* We use char because int might match the return type of a gcc2
7924     builtin and then its argument prototype would still apply.  */
7925 char PQconnectdb();
7926
7927 int main() {
7928 PQconnectdb()
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7932   rm -rf conftest*
7933   eval "ac_cv_lib_$ac_lib_var=yes"
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   eval "ac_cv_lib_$ac_lib_var=no"
7939 fi
7940 rm -f conftest*
7941 xe_check_libs=""
7942
7943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7944   echo "$ac_t""yes" 1>&6
7945   have_libpq=yes
7946 else
7947   echo "$ac_t""no" 1>&6
7948 fi
7949
7950  }
7951
7952   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7953     with_postgresql=yes
7954     { test "$extra_verbose" = "yes" && cat << \EOF
7955     Defining HAVE_POSTGRESQL
7956 EOF
7957 cat >> confdefs.h <<\EOF
7958 #define HAVE_POSTGRESQL 1
7959 EOF
7960 }
7961
7962     
7963 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7964 echo "configure:7965: checking for PQconnectStart in -lpq" >&5
7965 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7966
7967 xe_check_libs=" -lpq "
7968 cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971 /* Override any gcc2 internal prototype to avoid an error.  */
7972 /* We use char because int might match the return type of a gcc2
7973     builtin and then its argument prototype would still apply.  */
7974 char PQconnectStart();
7975
7976 int main() {
7977 PQconnectStart()
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=yes"
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   eval "ac_cv_lib_$ac_lib_var=no"
7988 fi
7989 rm -f conftest*
7990 xe_check_libs=""
7991
7992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7993   echo "$ac_t""yes" 1>&6
7994   with_postgresqlv7=yes;
7995                  { test "$extra_verbose" = "yes" && cat << \EOF
7996     Defining HAVE_POSTGRESQLV7
7997 EOF
7998 cat >> confdefs.h <<\EOF
7999 #define HAVE_POSTGRESQLV7 1
8000 EOF
8001 }
8002
8003 else
8004   echo "$ac_t""no" 1>&6
8005 fi
8006
8007
8008     { test "$extra_verbose" = "yes" && cat << EOF
8009     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8010 EOF
8011 cat >> confdefs.h <<EOF
8012 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8013 EOF
8014 }
8015
8016     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8017     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8018    echo "    xemacs will be linked with \"postgresql.o\""
8019  fi
8020   elif test "$with_postgresql" = "yes"; then
8021     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8022   fi
8023 fi
8024
8025
8026 if test "$window_system" != "none"; then
8027   echo "checking for graphics libraries" 1>&6
8028 echo "configure:8029: checking for graphics libraries" >&5
8029
8030     xpm_problem=""
8031   if test -z "$with_xpm"; then
8032     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8033 echo "configure:8034: checking for Xpm - no older than 3.4f" >&5
8034     xe_check_libs=-lXpm
8035     cat > conftest.$ac_ext <<EOF
8036 #line 8037 "configure"
8037 #include "confdefs.h"
8038 #define XPM_NUMBERS
8039 #include <X11/xpm.h>
8040     int main(int c, char **v) {
8041     return c == 1 ? 0 :
8042       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8043       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8044 EOF
8045 if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8046 then
8047   ./conftest dummy_arg; xpm_status=$?;
8048       if test "$xpm_status" = "0"; then
8049         with_xpm=yes;
8050       else
8051         with_xpm=no;
8052         if test "$xpm_status" = "1"; then
8053           xpm_problem="Xpm library version and header file version don't match!"
8054         elif test "$xpm_status" = "2"; then
8055           xpm_problem="Xpm library version is too old!"
8056         else
8057           xpm_problem="Internal xpm detection logic error!"
8058         fi
8059         echo "
8060 *** WARNING *** $xpm_problem
8061   I'm not touching that with a 10-foot pole!
8062   If you really want to use the installed version of Xpm, rerun
8063   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8064     fi
8065 else
8066   conftest_rc="$?"
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -fr conftest*
8070   with_xpm=no
8071 fi
8072 rm -fr conftest*
8073     xe_check_libs=
8074     echo "$ac_t""$with_xpm" 1>&6
8075   fi
8076   if test "$with_xpm" = "yes"; then
8077                 { test "$extra_verbose" = "yes" && cat << \EOF
8078     Defining HAVE_XPM
8079 EOF
8080 cat >> confdefs.h <<\EOF
8081 #define HAVE_XPM 1
8082 EOF
8083 }
8084
8085     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8086     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8087 echo "configure:8088: checking for \"FOR_MSW\" xpm" >&5
8088     xe_check_libs=-lXpm
8089     cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092
8093 int main() {
8094 XpmCreatePixmapFromData()
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8098   rm -rf conftest*
8099   xpm_for_msw=no
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   xpm_for_msw=yes
8105 fi
8106 rm -f conftest*
8107     xe_check_libs=
8108     echo "$ac_t""$xpm_for_msw" 1>&6
8109     if test "$xpm_for_msw" = "yes"; then
8110       { test "$extra_verbose" = "yes" && cat << \EOF
8111     Defining FOR_MSW
8112 EOF
8113 cat >> confdefs.h <<\EOF
8114 #define FOR_MSW 1
8115 EOF
8116 }
8117
8118     fi
8119   fi
8120
8121     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8122 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8123 echo "configure:8124: checking for compface.h" >&5
8124
8125 cat > conftest.$ac_ext <<EOF
8126 #line 8127 "configure"
8127 #include "confdefs.h"
8128 #include <compface.h>
8129 EOF
8130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8131 { (eval echo configure:8132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8133 if test -z "$ac_err"; then
8134   rm -rf conftest*
8135   eval "ac_cv_header_$ac_safe=yes"
8136 else
8137   echo "$ac_err" >&5
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_header_$ac_safe=no"
8142 fi
8143 rm -f conftest*
8144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8145   echo "$ac_t""yes" 1>&6
8146   :
8147 else
8148   echo "$ac_t""no" 1>&6
8149 with_xface=no
8150 fi
8151  }
8152   test -z "$with_xface" && { 
8153 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8154 echo "configure:8155: checking for UnGenFace in -lcompface" >&5
8155 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8156
8157 xe_check_libs=" -lcompface "
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 UnGenFace();
8165
8166 int main() {
8167 UnGenFace()
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   : 
8185 else
8186   echo "$ac_t""no" 1>&6
8187 with_xface=no
8188 fi
8189
8190  }
8191   test -z "$with_xface" && with_xface=yes
8192   if test "$with_xface" = "yes"; then
8193     { test "$extra_verbose" = "yes" && cat << \EOF
8194     Defining HAVE_XFACE
8195 EOF
8196 cat >> confdefs.h <<\EOF
8197 #define HAVE_XFACE 1
8198 EOF
8199 }
8200
8201     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8202   fi
8203
8204         if test "$with_gif" != "no"; then
8205     with_gif="yes"
8206     { test "$extra_verbose" = "yes" && cat << \EOF
8207     Defining HAVE_GIF
8208 EOF
8209 cat >> confdefs.h <<\EOF
8210 #define HAVE_GIF 1
8211 EOF
8212 }
8213
8214     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8215    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8216  fi
8217   fi
8218
8219       if test "$with_png $with_tiff" != "no no"; then
8220     
8221 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8222 echo "configure:8223: checking for inflate in -lc" >&5
8223 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8224
8225 xe_check_libs=" -lc "
8226 cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* Override any gcc2 internal prototype to avoid an error.  */
8230 /* We use char because int might match the return type of a gcc2
8231     builtin and then its argument prototype would still apply.  */
8232 char inflate();
8233
8234 int main() {
8235 inflate()
8236 ; return 0; }
8237 EOF
8238 if { (eval echo configure:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=yes"
8241 else
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=no"
8246 fi
8247 rm -f conftest*
8248 xe_check_libs=""
8249
8250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8251   echo "$ac_t""yes" 1>&6
8252   :
8253 else
8254   echo "$ac_t""no" 1>&6
8255
8256 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8257 echo "configure:8258: checking for inflate in -lz" >&5
8258 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8259
8260 xe_check_libs=" -lz "
8261 cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 /* Override any gcc2 internal prototype to avoid an error.  */
8265 /* We use char because int might match the return type of a gcc2
8266     builtin and then its argument prototype would still apply.  */
8267 char inflate();
8268
8269 int main() {
8270 inflate()
8271 ; return 0; }
8272 EOF
8273 if { (eval echo configure:8274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8274   rm -rf conftest*
8275   eval "ac_cv_lib_$ac_lib_var=yes"
8276 else
8277   echo "configure: failed program was:" >&5
8278   cat conftest.$ac_ext >&5
8279   rm -rf conftest*
8280   eval "ac_cv_lib_$ac_lib_var=no"
8281 fi
8282 rm -f conftest*
8283 xe_check_libs=""
8284
8285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8286   echo "$ac_t""yes" 1>&6
8287   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8288 else
8289   echo "$ac_t""no" 1>&6
8290
8291 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8292 echo "configure:8293: checking for inflate in -lgz" >&5
8293 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8294
8295 xe_check_libs=" -lgz "
8296 cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299 /* Override any gcc2 internal prototype to avoid an error.  */
8300 /* We use char because int might match the return type of a gcc2
8301     builtin and then its argument prototype would still apply.  */
8302 char inflate();
8303
8304 int main() {
8305 inflate()
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8309   rm -rf conftest*
8310   eval "ac_cv_lib_$ac_lib_var=yes"
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=no"
8316 fi
8317 rm -f conftest*
8318 xe_check_libs=""
8319
8320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8321   echo "$ac_t""yes" 1>&6
8322   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8323 else
8324   echo "$ac_t""no" 1>&6
8325 fi
8326
8327
8328 fi
8329
8330
8331 fi
8332
8333
8334   fi
8335
8336     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8337 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8338 echo "configure:8339: checking for jpeglib.h" >&5
8339
8340 cat > conftest.$ac_ext <<EOF
8341 #line 8342 "configure"
8342 #include "confdefs.h"
8343 #include <jpeglib.h>
8344 EOF
8345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8346 { (eval echo configure:8347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8348 if test -z "$ac_err"; then
8349   rm -rf conftest*
8350   eval "ac_cv_header_$ac_safe=yes"
8351 else
8352   echo "$ac_err" >&5
8353   echo "configure: failed program was:" >&5
8354   cat conftest.$ac_ext >&5
8355   rm -rf conftest*
8356   eval "ac_cv_header_$ac_safe=no"
8357 fi
8358 rm -f conftest*
8359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8360   echo "$ac_t""yes" 1>&6
8361   :
8362 else
8363   echo "$ac_t""no" 1>&6
8364 with_jpeg=no
8365 fi
8366  }
8367   test -z "$with_jpeg" && { 
8368 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8369 echo "configure:8370: checking for jpeg_destroy_decompress in -ljpeg" >&5
8370 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8371
8372 xe_check_libs=" -ljpeg "
8373 cat > conftest.$ac_ext <<EOF
8374 #line 8375 "configure"
8375 #include "confdefs.h"
8376 /* Override any gcc2 internal prototype to avoid an error.  */
8377 /* We use char because int might match the return type of a gcc2
8378     builtin and then its argument prototype would still apply.  */
8379 char jpeg_destroy_decompress();
8380
8381 int main() {
8382 jpeg_destroy_decompress()
8383 ; return 0; }
8384 EOF
8385 if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8386   rm -rf conftest*
8387   eval "ac_cv_lib_$ac_lib_var=yes"
8388 else
8389   echo "configure: failed program was:" >&5
8390   cat conftest.$ac_ext >&5
8391   rm -rf conftest*
8392   eval "ac_cv_lib_$ac_lib_var=no"
8393 fi
8394 rm -f conftest*
8395 xe_check_libs=""
8396
8397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8398   echo "$ac_t""yes" 1>&6
8399   :
8400 else
8401   echo "$ac_t""no" 1>&6
8402 with_jpeg=no
8403 fi
8404
8405  }
8406   test -z "$with_jpeg" && with_jpeg=yes
8407   if test "$with_jpeg" = "yes"; then
8408     { test "$extra_verbose" = "yes" && cat << \EOF
8409     Defining HAVE_JPEG
8410 EOF
8411 cat >> confdefs.h <<\EOF
8412 #define HAVE_JPEG 1
8413 EOF
8414 }
8415
8416     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8417   fi
8418
8419     png_problem=""
8420   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8421 echo "configure:8422: checking for pow" >&5
8422
8423 cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 /* System header to define __stub macros and hopefully few prototypes,
8427     which can conflict with char pow(); below.  */
8428 #include <assert.h>
8429 /* Override any gcc2 internal prototype to avoid an error.  */
8430 /* We use char because int might match the return type of a gcc2
8431     builtin and then its argument prototype would still apply.  */
8432 char pow();
8433
8434 int main() {
8435
8436 /* The GNU C library defines this for functions which it implements
8437     to always fail with ENOSYS.  Some functions are actually named
8438     something starting with __ and the normal name is an alias.  */
8439 #if defined (__stub_pow) || defined (__stub___pow)
8440 choke me
8441 #else
8442 pow();
8443 #endif
8444
8445 ; return 0; }
8446 EOF
8447 if { (eval echo configure:8448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8448   rm -rf conftest*
8449   eval "ac_cv_func_pow=yes"
8450 else
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   eval "ac_cv_func_pow=no"
8455 fi
8456 rm -f conftest*
8457
8458 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8459   echo "$ac_t""yes" 1>&6
8460   :
8461 else
8462   echo "$ac_t""no" 1>&6
8463 with_png=no
8464 fi
8465  }
8466   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8467 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8468 echo "configure:8469: checking for png.h" >&5
8469
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <png.h>
8474 EOF
8475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8476 { (eval echo configure:8477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8478 if test -z "$ac_err"; then
8479   rm -rf conftest*
8480   eval "ac_cv_header_$ac_safe=yes"
8481 else
8482   echo "$ac_err" >&5
8483   echo "configure: failed program was:" >&5
8484   cat conftest.$ac_ext >&5
8485   rm -rf conftest*
8486   eval "ac_cv_header_$ac_safe=no"
8487 fi
8488 rm -f conftest*
8489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8490   echo "$ac_t""yes" 1>&6
8491   :
8492 else
8493   echo "$ac_t""no" 1>&6
8494 with_png=no
8495 fi
8496  }
8497   test -z "$with_png" && { 
8498 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8499 echo "configure:8500: checking for png_read_image in -lpng" >&5
8500 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8501
8502 xe_check_libs=" -lpng "
8503 cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 /* Override any gcc2 internal prototype to avoid an error.  */
8507 /* We use char because int might match the return type of a gcc2
8508     builtin and then its argument prototype would still apply.  */
8509 char png_read_image();
8510
8511 int main() {
8512 png_read_image()
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_lib_$ac_lib_var=no"
8523 fi
8524 rm -f conftest*
8525 xe_check_libs=""
8526
8527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8528   echo "$ac_t""yes" 1>&6
8529   :
8530 else
8531   echo "$ac_t""no" 1>&6
8532 with_png=no
8533 fi
8534
8535  }
8536   if test -z "$with_png"; then
8537     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8538 echo "configure:8539: checking for workable png version information" >&5
8539     xe_check_libs="-lpng -lz"
8540     cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <png.h>
8544     int main(int c, char **v) {
8545     if (c == 1) return 0;
8546     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8547     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8550 then
8551   ./conftest dummy_arg; png_status=$?;
8552       if test "$png_status" = "0"; then
8553         with_png=yes;
8554       else
8555         with_png=no;
8556         if test "$png_status" = "1"; then
8557           png_problem="PNG library version and header file don't match!"
8558         elif test "$png_status" = "2"; then
8559           png_problem="PNG library version too old (pre 1.0.2)!"
8560         fi
8561         echo "
8562 *** WARNING *** $png_problem
8563   I'm not touching that with a 10-foot pole!
8564   If you really want to use the installed version of libPNG, rerun
8565   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8566     fi
8567 else
8568   conftest_rc="$?"
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -fr conftest*
8572   with_png=no
8573 fi
8574 rm -fr conftest*
8575     xe_check_libs=
8576     echo "$ac_t""$with_png" 1>&6
8577   fi
8578   if test "$with_png" = "yes"; then
8579     { test "$extra_verbose" = "yes" && cat << \EOF
8580     Defining HAVE_PNG
8581 EOF
8582 cat >> confdefs.h <<\EOF
8583 #define HAVE_PNG 1
8584 EOF
8585 }
8586
8587     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8588   fi
8589
8590     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8591 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8592 echo "configure:8593: checking for tiffio.h" >&5
8593
8594 cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 #include <tiffio.h>
8598 EOF
8599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8600 { (eval echo configure:8601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8602 if test -z "$ac_err"; then
8603   rm -rf conftest*
8604   eval "ac_cv_header_$ac_safe=yes"
8605 else
8606   echo "$ac_err" >&5
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_header_$ac_safe=no"
8611 fi
8612 rm -f conftest*
8613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8614   echo "$ac_t""yes" 1>&6
8615   :
8616 else
8617   echo "$ac_t""no" 1>&6
8618 with_tiff=no
8619 fi
8620  }
8621   test -z "$with_tiff" && { 
8622 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8623 echo "configure:8624: checking for TIFFClientOpen in -ltiff" >&5
8624 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8625
8626 xe_check_libs=" -ltiff "
8627 cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 /* Override any gcc2 internal prototype to avoid an error.  */
8631 /* We use char because int might match the return type of a gcc2
8632     builtin and then its argument prototype would still apply.  */
8633 char TIFFClientOpen();
8634
8635 int main() {
8636 TIFFClientOpen()
8637 ; return 0; }
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8640   rm -rf conftest*
8641   eval "ac_cv_lib_$ac_lib_var=yes"
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=no"
8647 fi
8648 rm -f conftest*
8649 xe_check_libs=""
8650
8651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8652   echo "$ac_t""yes" 1>&6
8653   :
8654 else
8655   echo "$ac_t""no" 1>&6
8656 with_tiff=no
8657 fi
8658
8659  }
8660   test -z "$with_tiff" && with_tiff=yes
8661   if test "$with_tiff" = "yes"; then
8662     { test "$extra_verbose" = "yes" && cat << \EOF
8663     Defining HAVE_TIFF
8664 EOF
8665 cat >> confdefs.h <<\EOF
8666 #define HAVE_TIFF 1
8667 EOF
8668 }
8669
8670     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8671   fi
8672 fi
8673
8674
8675 if test "$with_gtk" = "yes"; then
8676     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8677 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8678 echo "configure:8679: checking for compface.h" >&5
8679
8680 cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8683 #include <compface.h>
8684 EOF
8685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8686 { (eval echo configure:8687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8688 if test -z "$ac_err"; then
8689   rm -rf conftest*
8690   eval "ac_cv_header_$ac_safe=yes"
8691 else
8692   echo "$ac_err" >&5
8693   echo "configure: failed program was:" >&5
8694   cat conftest.$ac_ext >&5
8695   rm -rf conftest*
8696   eval "ac_cv_header_$ac_safe=no"
8697 fi
8698 rm -f conftest*
8699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701   :
8702 else
8703   echo "$ac_t""no" 1>&6
8704 with_xface=no
8705 fi
8706  }
8707   test -z "$with_xface" && { 
8708 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8709 echo "configure:8710: checking for UnGenFace in -lcompface" >&5
8710 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8711
8712 xe_check_libs=" -lcompface "
8713 cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 /* Override any gcc2 internal prototype to avoid an error.  */
8717 /* We use char because int might match the return type of a gcc2
8718     builtin and then its argument prototype would still apply.  */
8719 char UnGenFace();
8720
8721 int main() {
8722 UnGenFace()
8723 ; return 0; }
8724 EOF
8725 if { (eval echo configure:8726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8726   rm -rf conftest*
8727   eval "ac_cv_lib_$ac_lib_var=yes"
8728 else
8729   echo "configure: failed program was:" >&5
8730   cat conftest.$ac_ext >&5
8731   rm -rf conftest*
8732   eval "ac_cv_lib_$ac_lib_var=no"
8733 fi
8734 rm -f conftest*
8735 xe_check_libs=""
8736
8737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8738   echo "$ac_t""yes" 1>&6
8739   : 
8740 else
8741   echo "$ac_t""no" 1>&6
8742 with_xface=no
8743 fi
8744
8745  }
8746   test -z "$with_xface" && with_xface=yes
8747   if test "$with_xface" = "yes"; then
8748     { test "$extra_verbose" = "yes" && cat << \EOF
8749     Defining HAVE_XFACE
8750 EOF
8751 cat >> confdefs.h <<\EOF
8752 #define HAVE_XFACE 1
8753 EOF
8754 }
8755
8756     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8757   fi
8758 fi
8759
8760
8761
8762 if test "$with_x11" = "yes"; then
8763   echo "checking for X11 graphics libraries" 1>&6
8764 echo "configure:8765: checking for X11 graphics libraries" >&5
8765 fi
8766
8767 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8768   echo "checking for the Athena widgets" 1>&6
8769 echo "configure:8770: checking for the Athena widgets" >&5
8770
8771     case "$with_athena" in
8772         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8773     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8774     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8775     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8776     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8777     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8778   esac
8779
8780     if test "$athena_3d" = "no"; then
8781     
8782 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8783 echo "configure:8784: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8784 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8785
8786 xe_check_libs=" -l$athena_variant "
8787 cat > conftest.$ac_ext <<EOF
8788 #line 8789 "configure"
8789 #include "confdefs.h"
8790 /* Override any gcc2 internal prototype to avoid an error.  */
8791 /* We use char because int might match the return type of a gcc2
8792     builtin and then its argument prototype would still apply.  */
8793 char XawScrollbarSetThumb();
8794
8795 int main() {
8796 XawScrollbarSetThumb()
8797 ; return 0; }
8798 EOF
8799 if { (eval echo configure:8800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8800   rm -rf conftest*
8801   eval "ac_cv_lib_$ac_lib_var=yes"
8802 else
8803   echo "configure: failed program was:" >&5
8804   cat conftest.$ac_ext >&5
8805   rm -rf conftest*
8806   eval "ac_cv_lib_$ac_lib_var=no"
8807 fi
8808 rm -f conftest*
8809 xe_check_libs=""
8810
8811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8812   echo "$ac_t""yes" 1>&6
8813           
8814 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8815 echo "configure:8816: checking for threeDClassRec in -l$athena_variant" >&5
8816 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8817
8818 xe_check_libs=" -l$athena_variant "
8819 cat > conftest.$ac_ext <<EOF
8820 #line 8821 "configure"
8821 #include "confdefs.h"
8822 /* Override any gcc2 internal prototype to avoid an error.  */
8823 /* We use char because int might match the return type of a gcc2
8824     builtin and then its argument prototype would still apply.  */
8825 char threeDClassRec();
8826
8827 int main() {
8828 threeDClassRec()
8829 ; return 0; }
8830 EOF
8831 if { (eval echo configure:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8832   rm -rf conftest*
8833   eval "ac_cv_lib_$ac_lib_var=yes"
8834 else
8835   echo "configure: failed program was:" >&5
8836   cat conftest.$ac_ext >&5
8837   rm -rf conftest*
8838   eval "ac_cv_lib_$ac_lib_var=no"
8839 fi
8840 rm -f conftest*
8841 xe_check_libs=""
8842
8843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8844   echo "$ac_t""yes" 1>&6
8845   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8846 else
8847   echo "$ac_t""no" 1>&6
8848 athena_lib=$athena_variant
8849 fi
8850
8851
8852       
8853 else
8854   echo "$ac_t""no" 1>&6
8855 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8856 fi
8857
8858
8859   else
8860         
8861 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8862 echo "configure:8863: checking for threeDClassRec in -l$athena_variant" >&5
8863 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8864
8865 xe_check_libs=" -l$athena_variant "
8866 cat > conftest.$ac_ext <<EOF
8867 #line 8868 "configure"
8868 #include "confdefs.h"
8869 /* Override any gcc2 internal prototype to avoid an error.  */
8870 /* We use char because int might match the return type of a gcc2
8871     builtin and then its argument prototype would still apply.  */
8872 char threeDClassRec();
8873
8874 int main() {
8875 threeDClassRec()
8876 ; return 0; }
8877 EOF
8878 if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8879   rm -rf conftest*
8880   eval "ac_cv_lib_$ac_lib_var=yes"
8881 else
8882   echo "configure: failed program was:" >&5
8883   cat conftest.$ac_ext >&5
8884   rm -rf conftest*
8885   eval "ac_cv_lib_$ac_lib_var=no"
8886 fi
8887 rm -f conftest*
8888 xe_check_libs=""
8889
8890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8891   echo "$ac_t""yes" 1>&6
8892   athena_lib=$athena_variant
8893 else
8894   echo "$ac_t""no" 1>&6
8895 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8896 echo "configure:8897: checking for threeDClassRec in -lXaw" >&5
8897 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8898
8899 xe_check_libs=" -lXaw "
8900 cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 /* Override any gcc2 internal prototype to avoid an error.  */
8904 /* We use char because int might match the return type of a gcc2
8905     builtin and then its argument prototype would still apply.  */
8906 char threeDClassRec();
8907
8908 int main() {
8909 threeDClassRec()
8910 ; return 0; }
8911 EOF
8912 if { (eval echo configure:8913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8913   rm -rf conftest*
8914   eval "ac_cv_lib_$ac_lib_var=yes"
8915 else
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   eval "ac_cv_lib_$ac_lib_var=no"
8920 fi
8921 rm -f conftest*
8922 xe_check_libs=""
8923
8924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8925   echo "$ac_t""yes" 1>&6
8926   athena_lib=Xaw;
8927           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8928         
8929 else
8930   echo "$ac_t""no" 1>&6
8931 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8932 fi
8933
8934
8935 fi
8936
8937
8938   fi
8939
8940     if test "$athena_3d" = "no"; then
8941     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8942 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8943 echo "configure:8944: checking for X11/Xaw/ThreeD.h" >&5
8944
8945 cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 #include <X11/Xaw/ThreeD.h>
8949 EOF
8950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8951 { (eval echo configure:8952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8953 if test -z "$ac_err"; then
8954   rm -rf conftest*
8955   eval "ac_cv_header_$ac_safe=yes"
8956 else
8957   echo "$ac_err" >&5
8958   echo "configure: failed program was:" >&5
8959   cat conftest.$ac_ext >&5
8960   rm -rf conftest*
8961   eval "ac_cv_header_$ac_safe=no"
8962 fi
8963 rm -f conftest*
8964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8965   echo "$ac_t""yes" 1>&6
8966   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8967 else
8968   echo "$ac_t""no" 1>&6
8969 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8970 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8971 echo "configure:8972: checking for X11/Xaw/XawInit.h" >&5
8972
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 #include <X11/Xaw/XawInit.h>
8977 EOF
8978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8979 { (eval echo configure:8980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8981 if test -z "$ac_err"; then
8982   rm -rf conftest*
8983   eval "ac_cv_header_$ac_safe=yes"
8984 else
8985   echo "$ac_err" >&5
8986   echo "configure: failed program was:" >&5
8987   cat conftest.$ac_ext >&5
8988   rm -rf conftest*
8989   eval "ac_cv_header_$ac_safe=no"
8990 fi
8991 rm -f conftest*
8992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8993   echo "$ac_t""yes" 1>&6
8994   athena_h_path=X11/Xaw
8995 else
8996   echo "$ac_t""no" 1>&6
8997 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8998 fi
8999
9000 fi
9001
9002   else
9003             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9004 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9005 echo "configure:9006: checking for X11/$athena_variant/XawInit.h" >&5
9006
9007 cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 #include <X11/$athena_variant/XawInit.h>
9011 EOF
9012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9013 { (eval echo configure:9014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9015 if test -z "$ac_err"; then
9016   rm -rf conftest*
9017   eval "ac_cv_header_$ac_safe=yes"
9018 else
9019   echo "$ac_err" >&5
9020   echo "configure: failed program was:" >&5
9021   cat conftest.$ac_ext >&5
9022   rm -rf conftest*
9023   eval "ac_cv_header_$ac_safe=no"
9024 fi
9025 rm -f conftest*
9026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9027   echo "$ac_t""yes" 1>&6
9028   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9029 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9030 echo "configure:9031: checking for X11/$athena_variant/ThreeD.h" >&5
9031
9032 cat > conftest.$ac_ext <<EOF
9033 #line 9034 "configure"
9034 #include "confdefs.h"
9035 #include <X11/$athena_variant/ThreeD.h>
9036 EOF
9037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9038 { (eval echo configure:9039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9040 if test -z "$ac_err"; then
9041   rm -rf conftest*
9042   eval "ac_cv_header_$ac_safe=yes"
9043 else
9044   echo "$ac_err" >&5
9045   echo "configure: failed program was:" >&5
9046   cat conftest.$ac_ext >&5
9047   rm -rf conftest*
9048   eval "ac_cv_header_$ac_safe=no"
9049 fi
9050 rm -f conftest*
9051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9052   echo "$ac_t""yes" 1>&6
9053   athena_h_path=X11/$athena_variant
9054 else
9055   echo "$ac_t""no" 1>&6
9056 fi
9057
9058 else
9059   echo "$ac_t""no" 1>&6
9060 fi
9061
9062
9063         if test -z "$athena_h_path"; then
9064       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9065 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9066 echo "configure:9067: checking for $athena_variant/XawInit.h" >&5
9067
9068 cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071 #include <$athena_variant/XawInit.h>
9072 EOF
9073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9074 { (eval echo configure:9075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9076 if test -z "$ac_err"; then
9077   rm -rf conftest*
9078   eval "ac_cv_header_$ac_safe=yes"
9079 else
9080   echo "$ac_err" >&5
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_header_$ac_safe=no"
9085 fi
9086 rm -f conftest*
9087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9088   echo "$ac_t""yes" 1>&6
9089   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9090 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9091 echo "configure:9092: checking for $athena_variant/ThreeD.h" >&5
9092
9093 cat > conftest.$ac_ext <<EOF
9094 #line 9095 "configure"
9095 #include "confdefs.h"
9096 #include <$athena_variant/ThreeD.h>
9097 EOF
9098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9099 { (eval echo configure:9100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9101 if test -z "$ac_err"; then
9102   rm -rf conftest*
9103   eval "ac_cv_header_$ac_safe=yes"
9104 else
9105   echo "$ac_err" >&5
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_header_$ac_safe=no"
9110 fi
9111 rm -f conftest*
9112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9113   echo "$ac_t""yes" 1>&6
9114   athena_h_path=$athena_variant
9115 else
9116   echo "$ac_t""no" 1>&6
9117 fi
9118
9119 else
9120   echo "$ac_t""no" 1>&6
9121 fi
9122
9123     fi
9124
9125         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9126       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9127 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9128 echo "configure:9129: checking for X11/Xaw3d/XawInit.h" >&5
9129
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 #include <X11/Xaw3d/XawInit.h>
9134 EOF
9135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9136 { (eval echo configure:9137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9138 if test -z "$ac_err"; then
9139   rm -rf conftest*
9140   eval "ac_cv_header_$ac_safe=yes"
9141 else
9142   echo "$ac_err" >&5
9143   echo "configure: failed program was:" >&5
9144   cat conftest.$ac_ext >&5
9145   rm -rf conftest*
9146   eval "ac_cv_header_$ac_safe=no"
9147 fi
9148 rm -f conftest*
9149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9150   echo "$ac_t""yes" 1>&6
9151   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9152 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9153 echo "configure:9154: checking for X11/Xaw3d/ThreeD.h" >&5
9154
9155 cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158 #include <X11/Xaw3d/ThreeD.h>
9159 EOF
9160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9161 { (eval echo configure:9162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9163 if test -z "$ac_err"; then
9164   rm -rf conftest*
9165   eval "ac_cv_header_$ac_safe=yes"
9166 else
9167   echo "$ac_err" >&5
9168   echo "configure: failed program was:" >&5
9169   cat conftest.$ac_ext >&5
9170   rm -rf conftest*
9171   eval "ac_cv_header_$ac_safe=no"
9172 fi
9173 rm -f conftest*
9174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9175   echo "$ac_t""yes" 1>&6
9176   
9177             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9178             athena_h_path=X11/Xaw3d
9179           
9180 else
9181   echo "$ac_t""no" 1>&6
9182 fi
9183
9184 else
9185   echo "$ac_t""no" 1>&6
9186 fi
9187
9188     fi
9189
9190         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9191       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9192 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9193 echo "configure:9194: checking for Xaw3d/XawInit.h" >&5
9194
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198 #include <Xaw3d/XawInit.h>
9199 EOF
9200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9201 { (eval echo configure:9202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9203 if test -z "$ac_err"; then
9204   rm -rf conftest*
9205   eval "ac_cv_header_$ac_safe=yes"
9206 else
9207   echo "$ac_err" >&5
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_header_$ac_safe=no"
9212 fi
9213 rm -f conftest*
9214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9217 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9218 echo "configure:9219: checking for Xaw3d/ThreeD.h" >&5
9219
9220 cat > conftest.$ac_ext <<EOF
9221 #line 9222 "configure"
9222 #include "confdefs.h"
9223 #include <Xaw3d/ThreeD.h>
9224 EOF
9225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9226 { (eval echo configure:9227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9228 if test -z "$ac_err"; then
9229   rm -rf conftest*
9230   eval "ac_cv_header_$ac_safe=yes"
9231 else
9232   echo "$ac_err" >&5
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   eval "ac_cv_header_$ac_safe=no"
9237 fi
9238 rm -f conftest*
9239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241   
9242             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9243             athena_h_path=Xaw3d
9244           
9245 else
9246   echo "$ac_t""no" 1>&6
9247 fi
9248
9249 else
9250   echo "$ac_t""no" 1>&6
9251 fi
9252
9253     fi
9254
9255             if test -z "$athena_h_path"; then
9256       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9257 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9258 echo "configure:9259: checking for X11/Xaw/ThreeD.h" >&5
9259
9260 cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 #include <X11/Xaw/ThreeD.h>
9264 EOF
9265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9266 { (eval echo configure:9267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9268 if test -z "$ac_err"; then
9269   rm -rf conftest*
9270   eval "ac_cv_header_$ac_safe=yes"
9271 else
9272   echo "$ac_err" >&5
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   eval "ac_cv_header_$ac_safe=no"
9277 fi
9278 rm -f conftest*
9279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9280   echo "$ac_t""yes" 1>&6
9281   
9282           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9283           athena_h_path=X11/Xaw
9284         
9285 else
9286   echo "$ac_t""no" 1>&6
9287 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9288 fi
9289
9290     fi
9291   fi
9292
9293     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9294     have_xaw=yes
9295   else
9296     have_xaw=no
9297   fi
9298
9299 else
9300   have_xaw=no
9301 fi 
9302 if test "$with_x11" = "yes"; then
9303     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9304 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9305 echo "configure:9306: checking for Xm/Xm.h" >&5
9306
9307 cat > conftest.$ac_ext <<EOF
9308 #line 9309 "configure"
9309 #include "confdefs.h"
9310 #include <Xm/Xm.h>
9311 EOF
9312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9313 { (eval echo configure:9314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9315 if test -z "$ac_err"; then
9316   rm -rf conftest*
9317   eval "ac_cv_header_$ac_safe=yes"
9318 else
9319   echo "$ac_err" >&5
9320   echo "configure: failed program was:" >&5
9321   cat conftest.$ac_ext >&5
9322   rm -rf conftest*
9323   eval "ac_cv_header_$ac_safe=no"
9324 fi
9325 rm -f conftest*
9326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9327   echo "$ac_t""yes" 1>&6
9328   
9329 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9330 echo "configure:9331: checking for XmStringFree in -lXm" >&5
9331 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9332
9333 xe_check_libs=" -lXm "
9334 cat > conftest.$ac_ext <<EOF
9335 #line 9336 "configure"
9336 #include "confdefs.h"
9337 /* Override any gcc2 internal prototype to avoid an error.  */
9338 /* We use char because int might match the return type of a gcc2
9339     builtin and then its argument prototype would still apply.  */
9340 char XmStringFree();
9341
9342 int main() {
9343 XmStringFree()
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9347   rm -rf conftest*
9348   eval "ac_cv_lib_$ac_lib_var=yes"
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -rf conftest*
9353   eval "ac_cv_lib_$ac_lib_var=no"
9354 fi
9355 rm -f conftest*
9356 xe_check_libs=""
9357
9358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9359   echo "$ac_t""yes" 1>&6
9360   have_motif=yes
9361 else
9362   echo "$ac_t""no" 1>&6
9363 have_motif=no
9364 fi
9365
9366
9367 else
9368   echo "$ac_t""no" 1>&6
9369 have_motif=no
9370 fi
9371
9372
9373   if test "$have_motif" = "yes"; then
9374         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9375 echo "configure:9376: checking for Lesstif" >&5
9376     cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 #include <Xm/Xm.h>
9380 #ifdef LESSTIF_VERSION
9381 yes
9382 #endif
9383
9384 EOF
9385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9386   egrep "yes" >/dev/null 2>&1; then
9387   rm -rf conftest*
9388   have_lesstif=yes
9389 else
9390   rm -rf conftest*
9391   have_lesstif=no
9392 fi
9393 rm -f conftest*
9394
9395   echo "$ac_t""$have_lesstif" 1>&6
9396   fi
9397
9398 fi 
9399
9400 case "$with_menubars" in "" | "yes" | "athena" )
9401   with_menubars="lucid" ;;
9402 esac
9403 case "$with_dialogs" in "" | "yes" | "lucid" )
9404   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9405   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9406   else with_dialogs=no
9407   fi ;;
9408 esac
9409 case "$with_scrollbars" in "" | "yes" )
9410   with_scrollbars="lucid" ;;
9411 esac
9412 case "$with_widgets" in "" | "yes" | "lucid")
9413   if   test "$have_motif" = "yes"; then with_widgets="motif"
9414   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9415   else with_widgets=no
9416   fi ;;
9417 esac
9418
9419 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9420
9421 case "$all_widgets" in
9422   *athena* )
9423     if test "$have_xaw" != "yes"; then
9424       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9425     fi
9426
9427         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9428
9429         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9430
9431                     { test "$extra_verbose" = "yes" && cat << EOF
9432     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9433 EOF
9434 cat >> confdefs.h <<EOF
9435 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9436 EOF
9437 }
9438
9439     { test "$extra_verbose" = "yes" && cat << EOF
9440     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9441 EOF
9442 cat >> confdefs.h <<EOF
9443 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9444 EOF
9445 }
9446
9447     { test "$extra_verbose" = "yes" && cat << EOF
9448     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9449 EOF
9450 cat >> confdefs.h <<EOF
9451 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9452 EOF
9453 }
9454
9455     { test "$extra_verbose" = "yes" && cat << EOF
9456     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9457 EOF
9458 cat >> confdefs.h <<EOF
9459 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9460 EOF
9461 }
9462
9463     { test "$extra_verbose" = "yes" && cat << EOF
9464     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9465 EOF
9466 cat >> confdefs.h <<EOF
9467 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9468 EOF
9469 }
9470
9471     { test "$extra_verbose" = "yes" && cat << EOF
9472     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9473 EOF
9474 cat >> confdefs.h <<EOF
9475 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9476 EOF
9477 }
9478
9479     { test "$extra_verbose" = "yes" && cat << EOF
9480     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9481 EOF
9482 cat >> confdefs.h <<EOF
9483 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9484 EOF
9485 }
9486
9487     { test "$extra_verbose" = "yes" && cat << EOF
9488     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9489 EOF
9490 cat >> confdefs.h <<EOF
9491 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9492 EOF
9493 }
9494
9495     { test "$extra_verbose" = "yes" && cat << EOF
9496     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9497 EOF
9498 cat >> confdefs.h <<EOF
9499 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9500 EOF
9501 }
9502
9503     { test "$extra_verbose" = "yes" && cat << EOF
9504     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9505 EOF
9506 cat >> confdefs.h <<EOF
9507 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9508 EOF
9509 }
9510
9511
9512     { test "$extra_verbose" = "yes" && cat << \EOF
9513     Defining LWLIB_USES_ATHENA
9514 EOF
9515 cat >> confdefs.h <<\EOF
9516 #define LWLIB_USES_ATHENA 1
9517 EOF
9518 }
9519
9520     { test "$extra_verbose" = "yes" && cat << \EOF
9521     Defining NEED_ATHENA
9522 EOF
9523 cat >> confdefs.h <<\EOF
9524 #define NEED_ATHENA 1
9525 EOF
9526 }
9527
9528     need_athena="yes"
9529
9530     if test "$athena_3d" = "yes"; then
9531       { test "$extra_verbose" = "yes" && cat << \EOF
9532     Defining HAVE_ATHENA_3D
9533 EOF
9534 cat >> confdefs.h <<\EOF
9535 #define HAVE_ATHENA_3D 1
9536 EOF
9537 }
9538
9539     fi
9540   ;;
9541 esac
9542
9543 case "$all_widgets" in *motif* )
9544   { test "$extra_verbose" = "yes" && cat << \EOF
9545     Defining LWLIB_USES_MOTIF
9546 EOF
9547 cat >> confdefs.h <<\EOF
9548 #define LWLIB_USES_MOTIF 1
9549 EOF
9550 }
9551
9552   { test "$extra_verbose" = "yes" && cat << \EOF
9553     Defining NEED_MOTIF
9554 EOF
9555 cat >> confdefs.h <<\EOF
9556 #define NEED_MOTIF 1
9557 EOF
9558 }
9559
9560   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9561   need_motif=yes ;;
9562 esac
9563
9564 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9565 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9566 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9567 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9568         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9569 case "$with_widgets" in athena* )
9570         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;;
9571 esac
9572 case "$all_widgets" in *lucid* )
9573   { test "$extra_verbose" = "yes" && cat << \EOF
9574     Defining NEED_LUCID
9575 EOF
9576 cat >> confdefs.h <<\EOF
9577 #define NEED_LUCID 1
9578 EOF
9579 }
9580
9581   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9582 esac
9583
9584
9585
9586 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9587     Defining LWLIB_SCROLLBARS_ATHENA
9588 EOF
9589 cat >> confdefs.h <<\EOF
9590 #define LWLIB_SCROLLBARS_ATHENA 1
9591 EOF
9592 }
9593
9594 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9595     Defining LWLIB_DIALOGS_ATHENA
9596 EOF
9597 cat >> confdefs.h <<\EOF
9598 #define LWLIB_DIALOGS_ATHENA 1
9599 EOF
9600 }
9601
9602
9603 if test "$athena_3d" = "yes"; then
9604   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9605     Defining LWLIB_SCROLLBARS_ATHENA3D
9606 EOF
9607 cat >> confdefs.h <<\EOF
9608 #define LWLIB_SCROLLBARS_ATHENA3D 1
9609 EOF
9610 }
9611
9612   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9613     Defining LWLIB_DIALOGS_ATHENA3D
9614 EOF
9615 cat >> confdefs.h <<\EOF
9616 #define LWLIB_DIALOGS_ATHENA3D 1
9617 EOF
9618 }
9619
9620 fi
9621
9622 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9623     Defining LWLIB_WIDGETS_ATHENA
9624 EOF
9625 cat >> confdefs.h <<\EOF
9626 #define LWLIB_WIDGETS_ATHENA 1
9627 EOF
9628 }
9629 ;; esac
9630 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9631         { test "$extra_verbose" = "yes" && cat << \EOF
9632     Defining LWLIB_TABS_LUCID
9633 EOF
9634 cat >> confdefs.h <<\EOF
9635 #define LWLIB_TABS_LUCID 1
9636 EOF
9637 }
9638
9639
9640 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9641     Defining HAVE_MENUBARS
9642 EOF
9643 cat >> confdefs.h <<\EOF
9644 #define HAVE_MENUBARS 1
9645 EOF
9646 }
9647
9648 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9649     Defining HAVE_SCROLLBARS
9650 EOF
9651 cat >> confdefs.h <<\EOF
9652 #define HAVE_SCROLLBARS 1
9653 EOF
9654 }
9655
9656 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9657     Defining HAVE_DIALOGS
9658 EOF
9659 cat >> confdefs.h <<\EOF
9660 #define HAVE_DIALOGS 1
9661 EOF
9662 }
9663
9664 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9665     Defining HAVE_TOOLBARS
9666 EOF
9667 cat >> confdefs.h <<\EOF
9668 #define HAVE_TOOLBARS 1
9669 EOF
9670 }
9671
9672 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9673     Defining HAVE_WIDGETS
9674 EOF
9675 cat >> confdefs.h <<\EOF
9676 #define HAVE_WIDGETS 1
9677 EOF
9678 }
9679
9680
9681 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9682     Defining LWLIB_MENUBARS_LUCID
9683 EOF
9684 cat >> confdefs.h <<\EOF
9685 #define LWLIB_MENUBARS_LUCID 1
9686 EOF
9687 }
9688
9689 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9690     Defining LWLIB_SCROLLBARS_LUCID
9691 EOF
9692 cat >> confdefs.h <<\EOF
9693 #define LWLIB_SCROLLBARS_LUCID 1
9694 EOF
9695 }
9696
9697
9698 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9699     Defining LWLIB_MENUBARS_MOTIF
9700 EOF
9701 cat >> confdefs.h <<\EOF
9702 #define LWLIB_MENUBARS_MOTIF 1
9703 EOF
9704 }
9705
9706 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9707     Defining LWLIB_SCROLLBARS_MOTIF
9708 EOF
9709 cat >> confdefs.h <<\EOF
9710 #define LWLIB_SCROLLBARS_MOTIF 1
9711 EOF
9712 }
9713
9714 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9715     Defining LWLIB_DIALOGS_MOTIF
9716 EOF
9717 cat >> confdefs.h <<\EOF
9718 #define LWLIB_DIALOGS_MOTIF 1
9719 EOF
9720 }
9721
9722 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9723     Defining LWLIB_WIDGETS_MOTIF
9724 EOF
9725 cat >> confdefs.h <<\EOF
9726 #define LWLIB_WIDGETS_MOTIF 1
9727 EOF
9728 }
9729
9730
9731 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9732    echo "    xemacs will be linked with \"menubar.o\""
9733  fi
9734 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9735    echo "    xemacs will be linked with \"scrollbar.o\""
9736  fi
9737 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9738    echo "    xemacs will be linked with \"dialog.o\""
9739  fi
9740 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9741    echo "    xemacs will be linked with \"toolbar.o\""
9742  fi
9743
9744 if test "$with_gtk" = "yes"; then
9745   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9746    echo "    xemacs will be linked with \"menubar-gtk.o\""
9747  fi
9748   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9749    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9750  fi
9751   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"dialog-gtk.o\""
9753  fi
9754   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9755    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9756  fi
9757   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9758    echo "    xemacs will be linked with \"gui-gtk.o\""
9759  fi
9760 fi
9761
9762 if test "$with_x11" = "yes"; then
9763   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9764    echo "    xemacs will be linked with \"menubar-x.o\""
9765  fi
9766   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9767    echo "    xemacs will be linked with \"scrollbar-x.o\""
9768  fi
9769   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9770    echo "    xemacs will be linked with \"dialog-x.o\""
9771  fi
9772   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9773    echo "    xemacs will be linked with \"toolbar-x.o\""
9774  fi
9775   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9776    echo "    xemacs will be linked with \"gui-x.o\""
9777  fi
9778 fi
9779
9780
9781 test -z "$with_mule" && with_mule=no
9782 test -z "$with_file_coding" && with_file_coding=no
9783
9784
9785 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9786   { test "$extra_verbose" = "yes" && cat << \EOF
9787     Defining FILE_CODING
9788 EOF
9789 cat >> confdefs.h <<\EOF
9790 #define FILE_CODING 1
9791 EOF
9792 }
9793
9794   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9795    echo "    xemacs will be linked with \"file-coding.o\""
9796  fi
9797 fi
9798
9799 if test "$with_mule" = "yes" ; then
9800   echo "checking for Mule-related features" 1>&6
9801 echo "configure:9802: checking for Mule-related features" >&5
9802   { test "$extra_verbose" = "yes" && cat << \EOF
9803     Defining MULE
9804 EOF
9805 cat >> confdefs.h <<\EOF
9806 #define MULE 1
9807 EOF
9808 }
9809
9810   { test "$extra_verbose" = "yes" && cat << \EOF
9811     Defining FILE_CODING
9812 EOF
9813 cat >> confdefs.h <<\EOF
9814 #define FILE_CODING 1
9815 EOF
9816 }
9817
9818   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9819    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9820  fi
9821
9822     for ac_hdr in libintl.h
9823 do
9824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9826 echo "configure:9827: checking for $ac_hdr" >&5
9827
9828 cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 #include <$ac_hdr>
9832 EOF
9833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9834 { (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9836 if test -z "$ac_err"; then
9837   rm -rf conftest*
9838   eval "ac_cv_header_$ac_safe=yes"
9839 else
9840   echo "$ac_err" >&5
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=no"
9845 fi
9846 rm -f conftest*
9847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9848   echo "$ac_t""yes" 1>&6
9849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9850   { test "$extra_verbose" = "yes" && cat << EOF
9851     Defining $ac_tr_hdr
9852 EOF
9853 cat >> confdefs.h <<EOF
9854 #define $ac_tr_hdr 1
9855 EOF
9856 }
9857  
9858 else
9859   echo "$ac_t""no" 1>&6
9860 fi
9861 done
9862
9863   
9864 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9865 echo "configure:9866: checking for strerror in -lintl" >&5
9866 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9867
9868 xe_check_libs=" -lintl "
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 /* Override any gcc2 internal prototype to avoid an error.  */
9873 /* We use char because int might match the return type of a gcc2
9874     builtin and then its argument prototype would still apply.  */
9875 char strerror();
9876
9877 int main() {
9878 strerror()
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   eval "ac_cv_lib_$ac_lib_var=yes"
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   eval "ac_cv_lib_$ac_lib_var=no"
9889 fi
9890 rm -f conftest*
9891 xe_check_libs=""
9892
9893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9894   echo "$ac_t""yes" 1>&6
9895     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9896     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9897   { test "$extra_verbose" = "yes" && cat << EOF
9898     Defining $ac_tr_lib
9899 EOF
9900 cat >> confdefs.h <<EOF
9901 #define $ac_tr_lib 1
9902 EOF
9903 }
9904
9905   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9906
9907 else
9908   echo "$ac_t""no" 1>&6
9909 fi
9910
9911
9912
9913   echo "checking for Mule input methods" 1>&6
9914 echo "configure:9915: checking for Mule input methods" >&5
9915         case "$with_xim" in "" | "yes" )
9916     echo "checking for XIM" 1>&6
9917 echo "configure:9918: checking for XIM" >&5
9918     
9919 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9920 echo "configure:9921: checking for XOpenIM in -lX11" >&5
9921 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9922
9923 xe_check_libs=" -lX11 "
9924 cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* Override any gcc2 internal prototype to avoid an error.  */
9928 /* We use char because int might match the return type of a gcc2
9929     builtin and then its argument prototype would still apply.  */
9930 char XOpenIM();
9931
9932 int main() {
9933 XOpenIM()
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   eval "ac_cv_lib_$ac_lib_var=yes"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_lib_$ac_lib_var=no"
9944 fi
9945 rm -f conftest*
9946 xe_check_libs=""
9947
9948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9949   echo "$ac_t""yes" 1>&6
9950   with_xim=xlib
9951 else
9952   echo "$ac_t""no" 1>&6
9953 with_xim=no
9954 fi
9955
9956
9957         if test "$have_motif $have_lesstif" = "yes no"; then
9958       
9959 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9960 echo "configure:9961: checking for XmImMbLookupString in -lXm" >&5
9961 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9962
9963 xe_check_libs=" -lXm "
9964 cat > conftest.$ac_ext <<EOF
9965 #line 9966 "configure"
9966 #include "confdefs.h"
9967 /* Override any gcc2 internal prototype to avoid an error.  */
9968 /* We use char because int might match the return type of a gcc2
9969     builtin and then its argument prototype would still apply.  */
9970 char XmImMbLookupString();
9971
9972 int main() {
9973 XmImMbLookupString()
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   eval "ac_cv_lib_$ac_lib_var=yes"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_lib_$ac_lib_var=no"
9984 fi
9985 rm -f conftest*
9986 xe_check_libs=""
9987
9988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9989   echo "$ac_t""yes" 1>&6
9990   with_xim=motif
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994
9995
9996     fi ;;
9997   esac
9998   if test "$with_xim" != "no"; then
9999     { test "$extra_verbose" = "yes" && cat << \EOF
10000     Defining HAVE_XIM
10001 EOF
10002 cat >> confdefs.h <<\EOF
10003 #define HAVE_XIM 1
10004 EOF
10005 }
10006
10007     if test "$with_xim" = "xlib"; then
10008       { test "$extra_verbose" = "yes" && cat << \EOF
10009     Defining XIM_XLIB
10010 EOF
10011 cat >> confdefs.h <<\EOF
10012 #define XIM_XLIB 1
10013 EOF
10014 }
10015
10016       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10017    echo "    xemacs will be linked with \"input-method-xlib.o\""
10018  fi
10019     fi
10020     if test "$with_xim" = "motif"; then
10021       { test "$extra_verbose" = "yes" && cat << \EOF
10022     Defining XIM_MOTIF
10023 EOF
10024 cat >> confdefs.h <<\EOF
10025 #define XIM_MOTIF 1
10026 EOF
10027 }
10028
10029       need_motif=yes
10030       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10031    echo "    xemacs will be linked with \"input-method-motif.o\""
10032  fi
10033     fi
10034     if test "$with_xim" = "motif"; then
10035       with_xfs=no
10036     fi
10037   fi
10038
10039     if test "$with_xfs" = "yes" ; then
10040     echo "checking for XFontSet" 1>&6
10041 echo "configure:10042: checking for XFontSet" >&5
10042     
10043 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10044 echo "configure:10045: checking for XmbDrawString in -lX11" >&5
10045 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10046
10047 xe_check_libs=" -lX11 "
10048 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 /* Override any gcc2 internal prototype to avoid an error.  */
10052 /* We use char because int might match the return type of a gcc2
10053     builtin and then its argument prototype would still apply.  */
10054 char XmbDrawString();
10055
10056 int main() {
10057 XmbDrawString()
10058 ; return 0; }
10059 EOF
10060 if { (eval echo configure:10061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10061   rm -rf conftest*
10062   eval "ac_cv_lib_$ac_lib_var=yes"
10063 else
10064   echo "configure: failed program was:" >&5
10065   cat conftest.$ac_ext >&5
10066   rm -rf conftest*
10067   eval "ac_cv_lib_$ac_lib_var=no"
10068 fi
10069 rm -f conftest*
10070 xe_check_libs=""
10071
10072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10073   echo "$ac_t""yes" 1>&6
10074   :
10075 else
10076   echo "$ac_t""no" 1>&6
10077 with_xfs=no
10078 fi
10079
10080
10081     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10082       { test "$extra_verbose" = "yes" && cat << \EOF
10083     Defining USE_XFONTSET
10084 EOF
10085 cat >> confdefs.h <<\EOF
10086 #define USE_XFONTSET 1
10087 EOF
10088 }
10089
10090       if test "$with_xim" = "no" ; then
10091         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10092    echo "    xemacs will be linked with \"input-method-xlib.o\""
10093  fi
10094       fi
10095     fi
10096   fi 
10097     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10098   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10099 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10100 echo "configure:10101: checking for wnn/jllib.h" >&5
10101
10102 cat > conftest.$ac_ext <<EOF
10103 #line 10104 "configure"
10104 #include "confdefs.h"
10105 #include <wnn/jllib.h>
10106 EOF
10107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10108 { (eval echo configure:10109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10110 if test -z "$ac_err"; then
10111   rm -rf conftest*
10112   eval "ac_cv_header_$ac_safe=yes"
10113 else
10114   echo "$ac_err" >&5
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_header_$ac_safe=no"
10119 fi
10120 rm -f conftest*
10121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10122   echo "$ac_t""yes" 1>&6
10123   :
10124 else
10125   echo "$ac_t""no" 1>&6
10126 with_wnn=no
10127 fi
10128  }
10129     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10130 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10131 echo "configure:10132: checking for wnn/commonhd.h" >&5
10132
10133 cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 #include <wnn/commonhd.h>
10137 EOF
10138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10139 { (eval echo configure:10140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10141 if test -z "$ac_err"; then
10142   rm -rf conftest*
10143   eval "ac_cv_header_$ac_safe=yes"
10144 else
10145   echo "$ac_err" >&5
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -rf conftest*
10149   eval "ac_cv_header_$ac_safe=no"
10150 fi
10151 rm -f conftest*
10152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10153   echo "$ac_t""yes" 1>&6
10154   :
10155 else
10156   echo "$ac_t""no" 1>&6
10157 with_wnn=no
10158 fi
10159  }
10160     if test "$with_wnn" != "no"; then
10161     for ac_func in crypt
10162 do
10163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10164 echo "configure:10165: checking for $ac_func" >&5
10165
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 /* System header to define __stub macros and hopefully few prototypes,
10170     which can conflict with char $ac_func(); below.  */
10171 #include <assert.h>
10172 /* Override any gcc2 internal prototype to avoid an error.  */
10173 /* We use char because int might match the return type of a gcc2
10174     builtin and then its argument prototype would still apply.  */
10175 char $ac_func();
10176
10177 int main() {
10178
10179 /* The GNU C library defines this for functions which it implements
10180     to always fail with ENOSYS.  Some functions are actually named
10181     something starting with __ and the normal name is an alias.  */
10182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10183 choke me
10184 #else
10185 $ac_func();
10186 #endif
10187
10188 ; return 0; }
10189 EOF
10190 if { (eval echo configure:10191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10191   rm -rf conftest*
10192   eval "ac_cv_func_$ac_func=yes"
10193 else
10194   echo "configure: failed program was:" >&5
10195   cat conftest.$ac_ext >&5
10196   rm -rf conftest*
10197   eval "ac_cv_func_$ac_func=no"
10198 fi
10199 rm -f conftest*
10200
10201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10202   echo "$ac_t""yes" 1>&6
10203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10204   { test "$extra_verbose" = "yes" && cat << EOF
10205     Defining $ac_tr_func
10206 EOF
10207 cat >> confdefs.h <<EOF
10208 #define $ac_tr_func 1
10209 EOF
10210 }
10211  
10212 else
10213   echo "$ac_t""no" 1>&6
10214 fi
10215 done
10216
10217     test "$ac_cv_func_crypt" != "yes" && { 
10218 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10219 echo "configure:10220: checking for crypt in -lcrypt" >&5
10220 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10221
10222 xe_check_libs=" -lcrypt "
10223 cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226 /* Override any gcc2 internal prototype to avoid an error.  */
10227 /* We use char because int might match the return type of a gcc2
10228     builtin and then its argument prototype would still apply.  */
10229 char crypt();
10230
10231 int main() {
10232 crypt()
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10236   rm -rf conftest*
10237   eval "ac_cv_lib_$ac_lib_var=yes"
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   eval "ac_cv_lib_$ac_lib_var=no"
10243 fi
10244 rm -f conftest*
10245 xe_check_libs=""
10246
10247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10248   echo "$ac_t""yes" 1>&6
10249     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10250     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10251   { test "$extra_verbose" = "yes" && cat << EOF
10252     Defining $ac_tr_lib
10253 EOF
10254 cat >> confdefs.h <<EOF
10255 #define $ac_tr_lib 1
10256 EOF
10257 }
10258
10259   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10260
10261 else
10262   echo "$ac_t""no" 1>&6
10263 fi
10264
10265  }
10266   fi
10267     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10268     
10269 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10270 echo "configure:10271: checking for jl_dic_list_e in -lwnn" >&5
10271 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10272
10273 xe_check_libs=" -lwnn "
10274 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 /* Override any gcc2 internal prototype to avoid an error.  */
10278 /* We use char because int might match the return type of a gcc2
10279     builtin and then its argument prototype would still apply.  */
10280 char jl_dic_list_e();
10281
10282 int main() {
10283 jl_dic_list_e()
10284 ; return 0; }
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10287   rm -rf conftest*
10288   eval "ac_cv_lib_$ac_lib_var=yes"
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -rf conftest*
10293   eval "ac_cv_lib_$ac_lib_var=no"
10294 fi
10295 rm -f conftest*
10296 xe_check_libs=""
10297
10298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10299   echo "$ac_t""yes" 1>&6
10300   libwnn=wnn
10301 else
10302   echo "$ac_t""no" 1>&6
10303 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10304 echo "configure:10305: checking for jl_dic_list_e in -lwnn4" >&5
10305 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10306
10307 xe_check_libs=" -lwnn4 "
10308 cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311 /* Override any gcc2 internal prototype to avoid an error.  */
10312 /* We use char because int might match the return type of a gcc2
10313     builtin and then its argument prototype would still apply.  */
10314 char jl_dic_list_e();
10315
10316 int main() {
10317 jl_dic_list_e()
10318 ; return 0; }
10319 EOF
10320 if { (eval echo configure:10321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10321   rm -rf conftest*
10322   eval "ac_cv_lib_$ac_lib_var=yes"
10323 else
10324   echo "configure: failed program was:" >&5
10325   cat conftest.$ac_ext >&5
10326   rm -rf conftest*
10327   eval "ac_cv_lib_$ac_lib_var=no"
10328 fi
10329 rm -f conftest*
10330 xe_check_libs=""
10331
10332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10333   echo "$ac_t""yes" 1>&6
10334   libwnn=wnn4
10335 else
10336   echo "$ac_t""no" 1>&6
10337 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10338 echo "configure:10339: checking for jl_dic_list_e in -lwnn6" >&5
10339 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10340
10341 xe_check_libs=" -lwnn6 "
10342 cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345 /* Override any gcc2 internal prototype to avoid an error.  */
10346 /* We use char because int might match the return type of a gcc2
10347     builtin and then its argument prototype would still apply.  */
10348 char jl_dic_list_e();
10349
10350 int main() {
10351 jl_dic_list_e()
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10355   rm -rf conftest*
10356   eval "ac_cv_lib_$ac_lib_var=yes"
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   eval "ac_cv_lib_$ac_lib_var=no"
10362 fi
10363 rm -f conftest*
10364 xe_check_libs=""
10365
10366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10367   echo "$ac_t""yes" 1>&6
10368   libwnn=wnn6
10369 else
10370   echo "$ac_t""no" 1>&6
10371 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10372 echo "configure:10373: checking for dic_list_e in -lwnn6_fromsrc" >&5
10373 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10374
10375 xe_check_libs=" -lwnn6_fromsrc "
10376 cat > conftest.$ac_ext <<EOF
10377 #line 10378 "configure"
10378 #include "confdefs.h"
10379 /* Override any gcc2 internal prototype to avoid an error.  */
10380 /* We use char because int might match the return type of a gcc2
10381     builtin and then its argument prototype would still apply.  */
10382 char dic_list_e();
10383
10384 int main() {
10385 dic_list_e()
10386 ; return 0; }
10387 EOF
10388 if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10389   rm -rf conftest*
10390   eval "ac_cv_lib_$ac_lib_var=yes"
10391 else
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   eval "ac_cv_lib_$ac_lib_var=no"
10396 fi
10397 rm -f conftest*
10398 xe_check_libs=""
10399
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10401   echo "$ac_t""yes" 1>&6
10402   libwnn=wnn6_fromsrc
10403 else
10404   echo "$ac_t""no" 1>&6
10405 with_wnn=no
10406 fi
10407
10408
10409 fi
10410
10411
10412 fi
10413
10414
10415 fi
10416
10417
10418   fi
10419   test -z "$with_wnn" && with_wnn=yes
10420   if test "$with_wnn" = "yes"; then
10421     { test "$extra_verbose" = "yes" && cat << \EOF
10422     Defining HAVE_WNN
10423 EOF
10424 cat >> confdefs.h <<\EOF
10425 #define HAVE_WNN 1
10426 EOF
10427 }
10428
10429     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10430     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10431    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10432  fi
10433     if test "$with_wnn6" != "no"; then
10434       
10435 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10436 echo "configure:10437: checking for jl_fi_dic_list in -l$libwnn" >&5
10437 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10438
10439 xe_check_libs=" -l$libwnn "
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 jl_fi_dic_list();
10447
10448 int main() {
10449 jl_fi_dic_list()
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_wnn6=yes
10467 else
10468   echo "$ac_t""no" 1>&6
10469 fi
10470
10471
10472       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10473     Defining WNN6
10474 EOF
10475 cat >> confdefs.h <<\EOF
10476 #define WNN6 1
10477 EOF
10478 }
10479
10480     fi
10481   fi
10482
10483     canna_includes_found=no
10484   if test "$with_canna" != "no"; then
10485     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10486 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10487 echo "configure:10488: checking for canna/jrkanji.h" >&5
10488
10489 cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492 #include <canna/jrkanji.h>
10493 EOF
10494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10495 { (eval echo configure:10496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10497 if test -z "$ac_err"; then
10498   rm -rf conftest*
10499   eval "ac_cv_header_$ac_safe=yes"
10500 else
10501   echo "$ac_err" >&5
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=no"
10506 fi
10507 rm -f conftest*
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510   canna_includes_found=yes
10511 else
10512   echo "$ac_t""no" 1>&6
10513 fi
10514
10515   fi
10516   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10517       -d "/usr/local/canna/include"; then
10518     save_c_switch_site="$c_switch_site"
10519     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10520     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10521 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10522 echo "configure:10523: checking for canna/jrkanji.h" >&5
10523
10524 cat > conftest.$ac_ext <<EOF
10525 #line 10526 "configure"
10526 #include "confdefs.h"
10527 #include <canna/jrkanji.h>
10528 EOF
10529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10530 { (eval echo configure:10531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10532 if test -z "$ac_err"; then
10533   rm -rf conftest*
10534   eval "ac_cv_header_$ac_safe=yes"
10535 else
10536   echo "$ac_err" >&5
10537   echo "configure: failed program was:" >&5
10538   cat conftest.$ac_ext >&5
10539   rm -rf conftest*
10540   eval "ac_cv_header_$ac_safe=no"
10541 fi
10542 rm -f conftest*
10543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10544   echo "$ac_t""yes" 1>&6
10545   canna_includes_found=yes
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549
10550     if test "$canna_includes_found" != "yes"; then
10551       c_switch_site="$save_c_switch_site"
10552       with_canna="no"
10553     fi
10554   fi
10555
10556   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10557 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10558 echo "configure:10559: checking for canna/RK.h" >&5
10559
10560 cat > conftest.$ac_ext <<EOF
10561 #line 10562 "configure"
10562 #include "confdefs.h"
10563 #include <canna/RK.h>
10564 EOF
10565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10566 { (eval echo configure:10567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10568 if test -z "$ac_err"; then
10569   rm -rf conftest*
10570   eval "ac_cv_header_$ac_safe=yes"
10571 else
10572   echo "$ac_err" >&5
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -rf conftest*
10576   eval "ac_cv_header_$ac_safe=no"
10577 fi
10578 rm -f conftest*
10579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10580   echo "$ac_t""yes" 1>&6
10581   :
10582 else
10583   echo "$ac_t""no" 1>&6
10584 with_canna=no
10585 fi
10586  }
10587   test -z "$with_canna" && { 
10588 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10589 echo "configure:10590: checking for RkBgnBun in -lRKC" >&5
10590 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10591
10592 xe_check_libs=" -lRKC "
10593 cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596 /* Override any gcc2 internal prototype to avoid an error.  */
10597 /* We use char because int might match the return type of a gcc2
10598     builtin and then its argument prototype would still apply.  */
10599 char RkBgnBun();
10600
10601 int main() {
10602 RkBgnBun()
10603 ; return 0; }
10604 EOF
10605 if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10606   rm -rf conftest*
10607   eval "ac_cv_lib_$ac_lib_var=yes"
10608 else
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=no"
10613 fi
10614 rm -f conftest*
10615 xe_check_libs=""
10616
10617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10618   echo "$ac_t""yes" 1>&6
10619   :
10620 else
10621   echo "$ac_t""no" 1>&6
10622 with_canna=no
10623 fi
10624
10625  }
10626   test -z "$with_canna" && { 
10627 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10628 echo "configure:10629: checking for jrKanjiControl in -lcanna" >&5
10629 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10630
10631 xe_check_libs=" -lcanna "
10632 cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635 /* Override any gcc2 internal prototype to avoid an error.  */
10636 /* We use char because int might match the return type of a gcc2
10637     builtin and then its argument prototype would still apply.  */
10638 char jrKanjiControl();
10639
10640 int main() {
10641 jrKanjiControl()
10642 ; return 0; }
10643 EOF
10644 if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10645   rm -rf conftest*
10646   eval "ac_cv_lib_$ac_lib_var=yes"
10647 else
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -rf conftest*
10651   eval "ac_cv_lib_$ac_lib_var=no"
10652 fi
10653 rm -f conftest*
10654 xe_check_libs=""
10655
10656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10657   echo "$ac_t""yes" 1>&6
10658   :
10659 else
10660   echo "$ac_t""no" 1>&6
10661 with_canna=no
10662 fi
10663
10664  }
10665   test -z "$with_canna" && with_canna=yes
10666   if test "$with_canna" = "yes"; then
10667     { test "$extra_verbose" = "yes" && cat << \EOF
10668     Defining HAVE_CANNA
10669 EOF
10670 cat >> confdefs.h <<\EOF
10671 #define HAVE_CANNA 1
10672 EOF
10673 }
10674
10675     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10676     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10677    echo "    xemacs will be linked with \"mule-canna.o\""
10678  fi
10679   fi
10680
10681 else   for feature in xim canna wnn; do
10682     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10683       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10684     fi
10685     eval "with_${feature}=no"
10686   done
10687 fi 
10688
10689 if test "$need_motif" = "yes" ; then
10690   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10691     
10692 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10693 echo "configure:10694: checking for layout_object_getvalue in -li18n" >&5
10694 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10695
10696 xe_check_libs=" -li18n "
10697 cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 /* Override any gcc2 internal prototype to avoid an error.  */
10701 /* We use char because int might match the return type of a gcc2
10702     builtin and then its argument prototype would still apply.  */
10703 char layout_object_getvalue();
10704
10705 int main() {
10706 layout_object_getvalue()
10707 ; return 0; }
10708 EOF
10709 if { (eval echo configure:10710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10710   rm -rf conftest*
10711   eval "ac_cv_lib_$ac_lib_var=yes"
10712 else
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_lib_$ac_lib_var=no"
10717 fi
10718 rm -f conftest*
10719 xe_check_libs=""
10720
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10722   echo "$ac_t""yes" 1>&6
10723   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10724 else
10725   echo "$ac_t""no" 1>&6
10726 fi
10727
10728
10729   
10730 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10731     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10732   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10733   
10734         runpath="" runpath_dirs=""
10735   if test -n "$LD_RUN_PATH"; then
10736     runpath="$LD_RUN_PATH"
10737   elif test "$GCC" = "yes"; then
10738         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10739     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10740     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10741     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10742       case "$arg" in P,* | -L* | -R* )
10743         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10744           {
10745 xe_runpath_dir="$dir"
10746   test "$xe_runpath_dir" != "/lib"     -a \
10747         "$xe_runpath_dir" != "/usr/lib" -a \
10748         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10749   eval "$xe_add_unique_runpath_dir"
10750 }
10751         done ;;
10752       esac
10753     done
10754     ld_switch_run="$ld_switch_run_save"
10755     rm -f conftest*
10756   else
10757         for arg in $ld_switch_site $ld_switch_x_site; do
10758       case "$arg" in -L*) {
10759 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10760   test "$xe_runpath_dir" != "/lib"     -a \
10761         "$xe_runpath_dir" != "/usr/lib" -a \
10762         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10763   eval "$xe_add_unique_runpath_dir"
10764 };; esac
10765     done
10766         if test "$opsys $need_motif" = "sol2 yes"; then
10767       xe_runpath_dir="/opt/SUNWdt/lib";
10768       eval "$xe_add_unique_runpath_dir";
10769     fi
10770   fi 
10771   if test -n "$runpath"; then
10772     ld_switch_run="${dash_r}${runpath}"
10773     
10774 if test "$GCC" = "yes"; then
10775   set x $ld_switch_run; shift; ld_switch_run=""
10776   while test -n "$1"; do
10777     case $1 in
10778       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10779       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10780       -Xlinker* ) ;;
10781       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10782     esac
10783     shift
10784   done
10785 fi
10786     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10787   fi
10788 fi
10789
10790 fi
10791
10792 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
10793 do
10794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10795 echo "configure:10796: checking for $ac_func" >&5
10796
10797 cat > conftest.$ac_ext <<EOF
10798 #line 10799 "configure"
10799 #include "confdefs.h"
10800 /* System header to define __stub macros and hopefully few prototypes,
10801     which can conflict with char $ac_func(); below.  */
10802 #include <assert.h>
10803 /* Override any gcc2 internal prototype to avoid an error.  */
10804 /* We use char because int might match the return type of a gcc2
10805     builtin and then its argument prototype would still apply.  */
10806 char $ac_func();
10807
10808 int main() {
10809
10810 /* The GNU C library defines this for functions which it implements
10811     to always fail with ENOSYS.  Some functions are actually named
10812     something starting with __ and the normal name is an alias.  */
10813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10814 choke me
10815 #else
10816 $ac_func();
10817 #endif
10818
10819 ; return 0; }
10820 EOF
10821 if { (eval echo configure:10822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10822   rm -rf conftest*
10823   eval "ac_cv_func_$ac_func=yes"
10824 else
10825   echo "configure: failed program was:" >&5
10826   cat conftest.$ac_ext >&5
10827   rm -rf conftest*
10828   eval "ac_cv_func_$ac_func=no"
10829 fi
10830 rm -f conftest*
10831
10832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10833   echo "$ac_t""yes" 1>&6
10834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10835   { test "$extra_verbose" = "yes" && cat << EOF
10836     Defining $ac_tr_func
10837 EOF
10838 cat >> confdefs.h <<EOF
10839 #define $ac_tr_func 1
10840 EOF
10841 }
10842  
10843 else
10844   echo "$ac_t""no" 1>&6
10845 fi
10846 done
10847
10848
10849
10850 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10851 do
10852 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10853 echo "configure:10854: checking for $ac_func" >&5
10854
10855 cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 /* System header to define __stub macros and hopefully few prototypes,
10859     which can conflict with char $ac_func(); below.  */
10860 #include <assert.h>
10861 /* Override any gcc2 internal prototype to avoid an error.  */
10862 /* We use char because int might match the return type of a gcc2
10863     builtin and then its argument prototype would still apply.  */
10864 char $ac_func();
10865
10866 int main() {
10867
10868 /* The GNU C library defines this for functions which it implements
10869     to always fail with ENOSYS.  Some functions are actually named
10870     something starting with __ and the normal name is an alias.  */
10871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10872 choke me
10873 #else
10874 $ac_func();
10875 #endif
10876
10877 ; return 0; }
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10880   rm -rf conftest*
10881   eval "ac_cv_func_$ac_func=yes"
10882 else
10883   echo "configure: failed program was:" >&5
10884   cat conftest.$ac_ext >&5
10885   rm -rf conftest*
10886   eval "ac_cv_func_$ac_func=no"
10887 fi
10888 rm -f conftest*
10889
10890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10891   echo "$ac_t""yes" 1>&6
10892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10893   { test "$extra_verbose" = "yes" && cat << EOF
10894     Defining $ac_tr_func
10895 EOF
10896 cat >> confdefs.h <<EOF
10897 #define $ac_tr_func 1
10898 EOF
10899 }
10900  
10901 else
10902   echo "$ac_t""no" 1>&6
10903 fi
10904 done
10905
10906
10907 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10908 echo "configure:10909: checking for openpty" >&5
10909
10910 cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 /* System header to define __stub macros and hopefully few prototypes,
10914     which can conflict with char openpty(); below.  */
10915 #include <assert.h>
10916 /* Override any gcc2 internal prototype to avoid an error.  */
10917 /* We use char because int might match the return type of a gcc2
10918     builtin and then its argument prototype would still apply.  */
10919 char openpty();
10920
10921 int main() {
10922
10923 /* The GNU C library defines this for functions which it implements
10924     to always fail with ENOSYS.  Some functions are actually named
10925     something starting with __ and the normal name is an alias.  */
10926 #if defined (__stub_openpty) || defined (__stub___openpty)
10927 choke me
10928 #else
10929 openpty();
10930 #endif
10931
10932 ; return 0; }
10933 EOF
10934 if { (eval echo configure:10935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10935   rm -rf conftest*
10936   eval "ac_cv_func_openpty=yes"
10937 else
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -rf conftest*
10941   eval "ac_cv_func_openpty=no"
10942 fi
10943 rm -f conftest*
10944
10945 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10946   echo "$ac_t""yes" 1>&6
10947   have_openpty=yes
10948 else
10949   echo "$ac_t""no" 1>&6
10950
10951   
10952 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10953 echo "configure:10954: checking for openpty in -lutil" >&5
10954 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10955
10956 xe_check_libs=" -lutil "
10957 cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 /* Override any gcc2 internal prototype to avoid an error.  */
10961 /* We use char because int might match the return type of a gcc2
10962     builtin and then its argument prototype would still apply.  */
10963 char openpty();
10964
10965 int main() {
10966 openpty()
10967 ; return 0; }
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10970   rm -rf conftest*
10971   eval "ac_cv_lib_$ac_lib_var=yes"
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=no"
10977 fi
10978 rm -f conftest*
10979 xe_check_libs=""
10980
10981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10982   echo "$ac_t""yes" 1>&6
10983   have_openpty=yes need_libutil=yes
10984 else
10985   echo "$ac_t""no" 1>&6
10986 fi
10987
10988
10989 fi
10990
10991 if test "$have_openpty" = "yes"; then
10992   { test "$extra_verbose" = "yes" && cat << \EOF
10993     Defining HAVE_OPENPTY
10994 EOF
10995 cat >> confdefs.h <<\EOF
10996 #define HAVE_OPENPTY 1
10997 EOF
10998 }
10999
11000   for ac_hdr in pty.h libutil.h util.h
11001 do
11002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11004 echo "configure:11005: checking for $ac_hdr" >&5
11005
11006 cat > conftest.$ac_ext <<EOF
11007 #line 11008 "configure"
11008 #include "confdefs.h"
11009 #include <$ac_hdr>
11010 EOF
11011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11012 { (eval echo configure:11013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11014 if test -z "$ac_err"; then
11015   rm -rf conftest*
11016   eval "ac_cv_header_$ac_safe=yes"
11017 else
11018   echo "$ac_err" >&5
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -rf conftest*
11022   eval "ac_cv_header_$ac_safe=no"
11023 fi
11024 rm -f conftest*
11025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11028   { test "$extra_verbose" = "yes" && cat << EOF
11029     Defining $ac_tr_hdr
11030 EOF
11031 cat >> confdefs.h <<EOF
11032 #define $ac_tr_hdr 1
11033 EOF
11034 }
11035  break
11036 else
11037   echo "$ac_t""no" 1>&6
11038 fi
11039 done
11040
11041   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11042 fi
11043
11044 for ac_hdr in stropts.h
11045 do
11046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11048 echo "configure:11049: checking for $ac_hdr" >&5
11049
11050 cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <$ac_hdr>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   { test "$extra_verbose" = "yes" && cat << EOF
11073     Defining $ac_tr_hdr
11074 EOF
11075 cat >> confdefs.h <<EOF
11076 #define $ac_tr_hdr 1
11077 EOF
11078 }
11079  
11080 else
11081   echo "$ac_t""no" 1>&6
11082 fi
11083 done
11084
11085 if test "$ac_cv_header_stropts_h" = "yes"; then
11086   for ac_func in isastream
11087 do
11088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11089 echo "configure:11090: checking for $ac_func" >&5
11090
11091 cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094 /* System header to define __stub macros and hopefully few prototypes,
11095     which can conflict with char $ac_func(); below.  */
11096 #include <assert.h>
11097 /* Override any gcc2 internal prototype to avoid an error.  */
11098 /* We use char because int might match the return type of a gcc2
11099     builtin and then its argument prototype would still apply.  */
11100 char $ac_func();
11101
11102 int main() {
11103
11104 /* The GNU C library defines this for functions which it implements
11105     to always fail with ENOSYS.  Some functions are actually named
11106     something starting with __ and the normal name is an alias.  */
11107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11108 choke me
11109 #else
11110 $ac_func();
11111 #endif
11112
11113 ; return 0; }
11114 EOF
11115 if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11116   rm -rf conftest*
11117   eval "ac_cv_func_$ac_func=yes"
11118 else
11119   echo "configure: failed program was:" >&5
11120   cat conftest.$ac_ext >&5
11121   rm -rf conftest*
11122   eval "ac_cv_func_$ac_func=no"
11123 fi
11124 rm -f conftest*
11125
11126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11127   echo "$ac_t""yes" 1>&6
11128     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11129   { test "$extra_verbose" = "yes" && cat << EOF
11130     Defining $ac_tr_func
11131 EOF
11132 cat >> confdefs.h <<EOF
11133 #define $ac_tr_func 1
11134 EOF
11135 }
11136  
11137 else
11138   echo "$ac_t""no" 1>&6
11139 fi
11140 done
11141
11142   for ac_hdr in strtio.h
11143 do
11144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11146 echo "configure:11147: checking for $ac_hdr" >&5
11147
11148 cat > conftest.$ac_ext <<EOF
11149 #line 11150 "configure"
11150 #include "confdefs.h"
11151 #include <$ac_hdr>
11152 EOF
11153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11154 { (eval echo configure:11155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11156 if test -z "$ac_err"; then
11157   rm -rf conftest*
11158   eval "ac_cv_header_$ac_safe=yes"
11159 else
11160   echo "$ac_err" >&5
11161   echo "configure: failed program was:" >&5
11162   cat conftest.$ac_ext >&5
11163   rm -rf conftest*
11164   eval "ac_cv_header_$ac_safe=no"
11165 fi
11166 rm -f conftest*
11167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11168   echo "$ac_t""yes" 1>&6
11169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11170   { test "$extra_verbose" = "yes" && cat << EOF
11171     Defining $ac_tr_hdr
11172 EOF
11173 cat >> confdefs.h <<EOF
11174 #define $ac_tr_hdr 1
11175 EOF
11176 }
11177  
11178 else
11179   echo "$ac_t""no" 1>&6
11180 fi
11181 done
11182  fi
11183
11184 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11185    echo "    xemacs will be linked with \"realpath.o\""
11186  fi
11187
11188 for ac_func in getloadavg
11189 do
11190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11191 echo "configure:11192: checking for $ac_func" >&5
11192
11193 cat > conftest.$ac_ext <<EOF
11194 #line 11195 "configure"
11195 #include "confdefs.h"
11196 /* System header to define __stub macros and hopefully few prototypes,
11197     which can conflict with char $ac_func(); below.  */
11198 #include <assert.h>
11199 /* Override any gcc2 internal prototype to avoid an error.  */
11200 /* We use char because int might match the return type of a gcc2
11201     builtin and then its argument prototype would still apply.  */
11202 char $ac_func();
11203
11204 int main() {
11205
11206 /* The GNU C library defines this for functions which it implements
11207     to always fail with ENOSYS.  Some functions are actually named
11208     something starting with __ and the normal name is an alias.  */
11209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11210 choke me
11211 #else
11212 $ac_func();
11213 #endif
11214
11215 ; return 0; }
11216 EOF
11217 if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11218   rm -rf conftest*
11219   eval "ac_cv_func_$ac_func=yes"
11220 else
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -rf conftest*
11224   eval "ac_cv_func_$ac_func=no"
11225 fi
11226 rm -f conftest*
11227
11228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11229   echo "$ac_t""yes" 1>&6
11230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11231   { test "$extra_verbose" = "yes" && cat << EOF
11232     Defining $ac_tr_func
11233 EOF
11234 cat >> confdefs.h <<EOF
11235 #define $ac_tr_func 1
11236 EOF
11237 }
11238  
11239 else
11240   echo "$ac_t""no" 1>&6
11241 fi
11242 done
11243
11244
11245 if test "$ac_cv_func_getloadavg" = "yes"; then
11246         for ac_hdr in sys/loadavg.h
11247 do
11248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11250 echo "configure:11251: checking for $ac_hdr" >&5
11251
11252 cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 #include <$ac_hdr>
11256 EOF
11257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11258 { (eval echo configure:11259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11260 if test -z "$ac_err"; then
11261   rm -rf conftest*
11262   eval "ac_cv_header_$ac_safe=yes"
11263 else
11264   echo "$ac_err" >&5
11265   echo "configure: failed program was:" >&5
11266   cat conftest.$ac_ext >&5
11267   rm -rf conftest*
11268   eval "ac_cv_header_$ac_safe=no"
11269 fi
11270 rm -f conftest*
11271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11272   echo "$ac_t""yes" 1>&6
11273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11274   { test "$extra_verbose" = "yes" && cat << EOF
11275     Defining $ac_tr_hdr
11276 EOF
11277 cat >> confdefs.h <<EOF
11278 #define $ac_tr_hdr 1
11279 EOF
11280 }
11281  
11282 else
11283   echo "$ac_t""no" 1>&6
11284 fi
11285 done
11286
11287 else
11288     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11289    echo "    xemacs will be linked with \"getloadavg.o\""
11290  fi
11291
11292     
11293 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11294 echo "configure:11295: checking for kstat_open in -lkstat" >&5
11295 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11296
11297 xe_check_libs=" -lkstat "
11298 cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 /* Override any gcc2 internal prototype to avoid an error.  */
11302 /* We use char because int might match the return type of a gcc2
11303     builtin and then its argument prototype would still apply.  */
11304 char kstat_open();
11305
11306 int main() {
11307 kstat_open()
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   eval "ac_cv_lib_$ac_lib_var=yes"
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_lib_$ac_lib_var=no"
11318 fi
11319 rm -f conftest*
11320 xe_check_libs=""
11321
11322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11323   echo "$ac_t""yes" 1>&6
11324     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11325     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11326   { test "$extra_verbose" = "yes" && cat << EOF
11327     Defining $ac_tr_lib
11328 EOF
11329 cat >> confdefs.h <<EOF
11330 #define $ac_tr_lib 1
11331 EOF
11332 }
11333
11334   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11335
11336 else
11337   echo "$ac_t""no" 1>&6
11338 fi
11339
11340
11341   for ac_hdr in kstat.h
11342 do
11343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11345 echo "configure:11346: checking for $ac_hdr" >&5
11346
11347 cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 #include <$ac_hdr>
11351 EOF
11352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11353 { (eval echo configure:11354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11355 if test -z "$ac_err"; then
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=yes"
11358 else
11359   echo "$ac_err" >&5
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   eval "ac_cv_header_$ac_safe=no"
11364 fi
11365 rm -f conftest*
11366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11367   echo "$ac_t""yes" 1>&6
11368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11369   { test "$extra_verbose" = "yes" && cat << EOF
11370     Defining $ac_tr_hdr
11371 EOF
11372 cat >> confdefs.h <<EOF
11373 #define $ac_tr_hdr 1
11374 EOF
11375 }
11376  
11377 else
11378   echo "$ac_t""no" 1>&6
11379 fi
11380 done
11381
11382
11383     
11384 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11385 echo "configure:11386: checking for kvm_read in -lkvm" >&5
11386 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11387
11388 xe_check_libs=" -lkvm "
11389 cat > conftest.$ac_ext <<EOF
11390 #line 11391 "configure"
11391 #include "confdefs.h"
11392 /* Override any gcc2 internal prototype to avoid an error.  */
11393 /* We use char because int might match the return type of a gcc2
11394     builtin and then its argument prototype would still apply.  */
11395 char kvm_read();
11396
11397 int main() {
11398 kvm_read()
11399 ; return 0; }
11400 EOF
11401 if { (eval echo configure:11402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11402   rm -rf conftest*
11403   eval "ac_cv_lib_$ac_lib_var=yes"
11404 else
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -rf conftest*
11408   eval "ac_cv_lib_$ac_lib_var=no"
11409 fi
11410 rm -f conftest*
11411 xe_check_libs=""
11412
11413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11414   echo "$ac_t""yes" 1>&6
11415     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11416     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11417   { test "$extra_verbose" = "yes" && cat << EOF
11418     Defining $ac_tr_lib
11419 EOF
11420 cat >> confdefs.h <<EOF
11421 #define $ac_tr_lib 1
11422 EOF
11423 }
11424
11425   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11426
11427 else
11428   echo "$ac_t""no" 1>&6
11429 fi
11430
11431
11432 fi
11433
11434 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11435 echo "configure:11436: checking whether netdb declares h_errno" >&5
11436 cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 #include <netdb.h>
11440 int main() {
11441 return h_errno;
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   echo "$ac_t""yes" 1>&6
11447    { test "$extra_verbose" = "yes" && cat << \EOF
11448     Defining HAVE_H_ERRNO
11449 EOF
11450 cat >> confdefs.h <<\EOF
11451 #define HAVE_H_ERRNO 1
11452 EOF
11453 }
11454
11455 else
11456   echo "configure: failed program was:" >&5
11457   cat conftest.$ac_ext >&5
11458   rm -rf conftest*
11459   echo "$ac_t""no" 1>&6
11460 fi
11461 rm -f conftest*
11462
11463 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11464 echo "configure:11465: checking for sigsetjmp" >&5
11465 cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468 #include <setjmp.h>
11469 int main() {
11470 sigjmp_buf bar; sigsetjmp (bar, 0);
11471 ; return 0; }
11472 EOF
11473 if { (eval echo configure:11474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11474   rm -rf conftest*
11475   echo "$ac_t""yes" 1>&6
11476    { test "$extra_verbose" = "yes" && cat << \EOF
11477     Defining HAVE_SIGSETJMP
11478 EOF
11479 cat >> confdefs.h <<\EOF
11480 #define HAVE_SIGSETJMP 1
11481 EOF
11482 }
11483
11484 else
11485   echo "configure: failed program was:" >&5
11486   cat conftest.$ac_ext >&5
11487   rm -rf conftest*
11488   echo "$ac_t""no" 1>&6
11489 fi
11490 rm -f conftest*
11491
11492 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11493 echo "configure:11494: checking whether localtime caches TZ" >&5
11494
11495 if test "$ac_cv_func_tzset" = "yes"; then
11496 cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 #include <time.h>
11500 #if STDC_HEADERS
11501 # include <stdlib.h>
11502 #endif
11503 extern char **environ;
11504 unset_TZ ()
11505 {
11506   char **from, **to;
11507   for (to = from = environ; (*to = *from); from++)
11508     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11509       to++;
11510 }
11511 char TZ_GMT0[] = "TZ=GMT0";
11512 char TZ_PST8[] = "TZ=PST8";
11513 main()
11514 {
11515   time_t now = time ((time_t *) 0);
11516   int hour_GMT0, hour_unset;
11517   if (putenv (TZ_GMT0) != 0)
11518     exit (1);
11519   hour_GMT0 = localtime (&now)->tm_hour;
11520   unset_TZ ();
11521   hour_unset = localtime (&now)->tm_hour;
11522   if (putenv (TZ_PST8) != 0)
11523     exit (1);
11524   if (localtime (&now)->tm_hour == hour_GMT0)
11525     exit (1);
11526   unset_TZ ();
11527   if (localtime (&now)->tm_hour != hour_unset)
11528     exit (1);
11529   exit (0);
11530 }
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11533 then
11534   emacs_cv_localtime_cache=no
11535 else
11536   conftest_rc="$?"
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -fr conftest*
11540   emacs_cv_localtime_cache=yes
11541 fi
11542 rm -fr conftest*
11543 else
11544         # If we lack tzset, report that localtime does not cache TZ,
11545         # since we can't invalidate the cache if we don't have tzset.
11546         emacs_cv_localtime_cache=no
11547 fi
11548 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11549 if test $emacs_cv_localtime_cache = yes; then
11550   { test "$extra_verbose" = "yes" && cat << \EOF
11551     Defining LOCALTIME_CACHE
11552 EOF
11553 cat >> confdefs.h <<\EOF
11554 #define LOCALTIME_CACHE 1
11555 EOF
11556 }
11557
11558 fi
11559
11560 if test "$HAVE_TIMEVAL" = "yes"; then
11561 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11562 echo "configure:11563: checking whether gettimeofday accepts one or two arguments" >&5
11563 cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566
11567 #ifdef TIME_WITH_SYS_TIME
11568 #include <sys/time.h>
11569 #include <time.h>
11570 #else
11571 #ifdef HAVE_SYS_TIME_H
11572 #include <sys/time.h>
11573 #else
11574 #include <time.h>
11575 #endif
11576 #endif
11577   
11578 int main() {
11579
11580   struct timeval time;
11581   gettimeofday (&time, 0);
11582
11583 ; return 0; }
11584 EOF
11585 if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11586   rm -rf conftest*
11587   echo "$ac_t""two" 1>&6
11588 else
11589   echo "configure: failed program was:" >&5
11590   cat conftest.$ac_ext >&5
11591   rm -rf conftest*
11592   echo "$ac_t""one" 1>&6
11593    { test "$extra_verbose" = "yes" && cat << \EOF
11594     Defining GETTIMEOFDAY_ONE_ARGUMENT
11595 EOF
11596 cat >> confdefs.h <<\EOF
11597 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11598 EOF
11599 }
11600
11601 fi
11602 rm -f conftest*
11603 fi
11604
11605
11606 echo $ac_n "checking for inline""... $ac_c" 1>&6
11607 echo "configure:11608: checking for inline" >&5
11608
11609 ac_cv_c_inline=no
11610 for ac_kw in inline __inline__ __inline; do
11611   cat > conftest.$ac_ext <<EOF
11612 #line 11613 "configure"
11613 #include "confdefs.h"
11614
11615 int main() {
11616 } $ac_kw foo() {
11617 ; return 0; }
11618 EOF
11619 if { (eval echo configure:11620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11620   rm -rf conftest*
11621   ac_cv_c_inline=$ac_kw; break
11622 else
11623   echo "configure: failed program was:" >&5
11624   cat conftest.$ac_ext >&5
11625 fi
11626 rm -f conftest*
11627 done
11628
11629
11630 echo "$ac_t""$ac_cv_c_inline" 1>&6
11631 case "$ac_cv_c_inline" in
11632   inline | yes) ;;
11633   no) { test "$extra_verbose" = "yes" && cat << \EOF
11634     Defining inline = 
11635 EOF
11636 cat >> confdefs.h <<\EOF
11637 #define inline 
11638 EOF
11639 }
11640  ;;
11641   *)  { test "$extra_verbose" = "yes" && cat << EOF
11642     Defining inline = $ac_cv_c_inline
11643 EOF
11644 cat >> confdefs.h <<EOF
11645 #define inline $ac_cv_c_inline
11646 EOF
11647 }
11648  ;;
11649 esac
11650
11651 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11652    echo "    xemacs will be linked with \"inline.o\""
11653  fi
11654
11655
11656 if test "$__DECC" != "yes"; then
11657   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11658 # for constant arguments.  Useless!
11659 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11660 echo "configure:11661: checking for working alloca.h" >&5
11661
11662 cat > conftest.$ac_ext <<EOF
11663 #line 11664 "configure"
11664 #include "confdefs.h"
11665 #include <alloca.h>
11666 int main() {
11667 char *p = alloca(2 * sizeof(int));
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   ac_cv_header_alloca_h=yes
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   ac_cv_header_alloca_h=no
11678 fi
11679 rm -f conftest*
11680
11681 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11682 if test $ac_cv_header_alloca_h = yes; then
11683   { test "$extra_verbose" = "yes" && cat << \EOF
11684     Defining HAVE_ALLOCA_H
11685 EOF
11686 cat >> confdefs.h <<\EOF
11687 #define HAVE_ALLOCA_H 1
11688 EOF
11689 }
11690
11691 fi
11692
11693 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11694 echo "configure:11695: checking for alloca" >&5
11695
11696 cat > conftest.$ac_ext <<EOF
11697 #line 11698 "configure"
11698 #include "confdefs.h"
11699
11700 #ifdef __GNUC__
11701 # define alloca __builtin_alloca
11702 #else
11703 # ifdef _MSC_VER
11704 #  include <malloc.h>
11705 #  define alloca _alloca
11706 # else
11707 #  if HAVE_ALLOCA_H
11708 #   include <alloca.h>
11709 #  else
11710 #   ifdef _AIX
11711  #pragma alloca
11712 #   else
11713 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11714 char *alloca ();
11715 #    endif
11716 #   endif
11717 #  endif
11718 # endif
11719 #endif
11720
11721 int main() {
11722 char *p = (char *) alloca(1);
11723 ; return 0; }
11724 EOF
11725 if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11726   rm -rf conftest*
11727   ac_cv_func_alloca_works=yes
11728 else
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   ac_cv_func_alloca_works=no
11733 fi
11734 rm -f conftest*
11735
11736 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11737 if test $ac_cv_func_alloca_works = yes; then
11738   { test "$extra_verbose" = "yes" && cat << \EOF
11739     Defining HAVE_ALLOCA
11740 EOF
11741 cat >> confdefs.h <<\EOF
11742 #define HAVE_ALLOCA 1
11743 EOF
11744 }
11745
11746 fi
11747
11748 if test $ac_cv_func_alloca_works = no; then
11749   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11750   # that cause trouble.  Some versions do not even contain alloca or
11751   # contain a buggy version.  If you still want to use their alloca,
11752   # use ar to extract alloca.o from them instead of compiling alloca.c.
11753   ALLOCA=alloca.${ac_objext}
11754   { test "$extra_verbose" = "yes" && cat << \EOF
11755     Defining C_ALLOCA
11756 EOF
11757 cat >> confdefs.h <<\EOF
11758 #define C_ALLOCA 1
11759 EOF
11760 }
11761
11762
11763 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11764 echo "configure:11765: checking whether alloca needs Cray hooks" >&5
11765
11766 cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769 #if defined(CRAY) && ! defined(CRAY2)
11770 webecray
11771 #else
11772 wenotbecray
11773 #endif
11774
11775 EOF
11776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11777   egrep "webecray" >/dev/null 2>&1; then
11778   rm -rf conftest*
11779   ac_cv_os_cray=yes
11780 else
11781   rm -rf conftest*
11782   ac_cv_os_cray=no
11783 fi
11784 rm -f conftest*
11785
11786
11787 echo "$ac_t""$ac_cv_os_cray" 1>&6
11788 if test $ac_cv_os_cray = yes; then
11789 for ac_func in _getb67 GETB67 getb67; do
11790   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11791 echo "configure:11792: checking for $ac_func" >&5
11792
11793 cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796 /* System header to define __stub macros and hopefully few prototypes,
11797     which can conflict with char $ac_func(); below.  */
11798 #include <assert.h>
11799 /* Override any gcc2 internal prototype to avoid an error.  */
11800 /* We use char because int might match the return type of a gcc2
11801     builtin and then its argument prototype would still apply.  */
11802 char $ac_func();
11803
11804 int main() {
11805
11806 /* The GNU C library defines this for functions which it implements
11807     to always fail with ENOSYS.  Some functions are actually named
11808     something starting with __ and the normal name is an alias.  */
11809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11810 choke me
11811 #else
11812 $ac_func();
11813 #endif
11814
11815 ; return 0; }
11816 EOF
11817 if { (eval echo configure:11818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11818   rm -rf conftest*
11819   eval "ac_cv_func_$ac_func=yes"
11820 else
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   eval "ac_cv_func_$ac_func=no"
11825 fi
11826 rm -f conftest*
11827
11828 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11829   echo "$ac_t""yes" 1>&6
11830   { test "$extra_verbose" = "yes" && cat << EOF
11831     Defining CRAY_STACKSEG_END = $ac_func
11832 EOF
11833 cat >> confdefs.h <<EOF
11834 #define CRAY_STACKSEG_END $ac_func
11835 EOF
11836 }
11837
11838   break
11839 else
11840   echo "$ac_t""no" 1>&6
11841 fi
11842
11843 done
11844 fi
11845
11846 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11847 echo "configure:11848: checking stack direction for C alloca" >&5
11848
11849 cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 find_stack_direction ()
11853 {
11854   static char *addr = 0;
11855   auto char dummy;
11856   if (addr == 0)
11857     {
11858       addr = &dummy;
11859       return find_stack_direction ();
11860     }
11861   else
11862     return (&dummy > addr) ? 1 : -1;
11863 }
11864 main ()
11865 {
11866   exit (find_stack_direction() < 0);
11867 }
11868 EOF
11869 if { (eval echo configure:11870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11870 then
11871   ac_cv_c_stack_direction=1
11872 else
11873   conftest_rc="$?"
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -fr conftest*
11877   ac_cv_c_stack_direction=-1
11878 fi
11879 rm -fr conftest*
11880
11881 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11882 { test "$extra_verbose" = "yes" && cat << EOF
11883     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11884 EOF
11885 cat >> confdefs.h <<EOF
11886 #define STACK_DIRECTION $ac_cv_c_stack_direction
11887 EOF
11888 }
11889
11890 fi
11891
11892   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11893    echo "    xemacs will be linked with \"$ALLOCA\""
11894  fi
11895 fi
11896
11897 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11898 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11899 echo "configure:11900: checking for vfork.h" >&5
11900
11901 cat > conftest.$ac_ext <<EOF
11902 #line 11903 "configure"
11903 #include "confdefs.h"
11904 #include <vfork.h>
11905 EOF
11906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11907 { (eval echo configure:11908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11909 if test -z "$ac_err"; then
11910   rm -rf conftest*
11911   eval "ac_cv_header_$ac_safe=yes"
11912 else
11913   echo "$ac_err" >&5
11914   echo "configure: failed program was:" >&5
11915   cat conftest.$ac_ext >&5
11916   rm -rf conftest*
11917   eval "ac_cv_header_$ac_safe=no"
11918 fi
11919 rm -f conftest*
11920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11921   echo "$ac_t""yes" 1>&6
11922   { test "$extra_verbose" = "yes" && cat << \EOF
11923     Defining HAVE_VFORK_H
11924 EOF
11925 cat >> confdefs.h <<\EOF
11926 #define HAVE_VFORK_H 1
11927 EOF
11928 }
11929
11930 else
11931   echo "$ac_t""no" 1>&6
11932 fi
11933
11934 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11935 echo "configure:11936: checking for working vfork" >&5
11936
11937 cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940 /* Thanks to Paul Eggert for this test.  */
11941 #include <stdio.h>
11942 #include <sys/types.h>
11943 #include <sys/stat.h>
11944 #ifdef HAVE_UNISTD_H
11945 #include <unistd.h>
11946 #endif
11947 #ifdef HAVE_VFORK_H
11948 #include <vfork.h>
11949 #endif
11950 /* On some sparc systems, changes by the child to local and incoming
11951    argument registers are propagated back to the parent.
11952    The compiler is told about this with #include <vfork.h>,
11953    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11954    Test for this by using a static variable whose address
11955    is put into a register that is clobbered by the vfork.  */
11956 static
11957 #ifdef __cplusplus
11958 sparc_address_test (int arg)
11959 #else
11960 sparc_address_test (arg) int arg;
11961 #endif
11962 {
11963   static pid_t child;
11964   if (!child) {
11965     child = vfork ();
11966     if (child < 0) {
11967       perror ("vfork");
11968       _exit(2);
11969     }
11970     if (!child) {
11971       arg = getpid();
11972       write(-1, "", 0);
11973       _exit (arg);
11974     }
11975   }
11976 }
11977 main() {
11978   pid_t parent = getpid ();
11979   pid_t child;
11980
11981   sparc_address_test ();
11982
11983   child = vfork ();
11984
11985   if (child == 0) {
11986     /* Here is another test for sparc vfork register problems.
11987        This test uses lots of local variables, at least
11988        as many local variables as main has allocated so far
11989        including compiler temporaries.  4 locals are enough for
11990        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11991        A buggy compiler should reuse the register of parent
11992        for one of the local variables, since it will think that
11993        parent can't possibly be used any more in this routine.
11994        Assigning to the local variable will thus munge parent
11995        in the parent process.  */
11996     pid_t
11997       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11998       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11999     /* Convince the compiler that p..p7 are live; otherwise, it might
12000        use the same hardware register for all 8 local variables.  */
12001     if (p != p1 || p != p2 || p != p3 || p != p4
12002         || p != p5 || p != p6 || p != p7)
12003       _exit(1);
12004
12005     /* On some systems (e.g. IRIX 3.3),
12006        vfork doesn't separate parent from child file descriptors.
12007        If the child closes a descriptor before it execs or exits,
12008        this munges the parent's descriptor as well.
12009        Test for this by closing stdout in the child.  */
12010     _exit(close(fileno(stdout)) != 0);
12011   } else {
12012     int status;
12013     struct stat st;
12014
12015     while (wait(&status) != child)
12016       ;
12017     exit(
12018          /* Was there some problem with vforking?  */
12019          child < 0
12020
12021          /* Did the child fail?  (This shouldn't happen.)  */
12022          || status
12023
12024          /* Did the vfork/compiler bug occur?  */
12025          || parent != getpid()
12026
12027          /* Did the file descriptor bug occur?  */
12028          || fstat(fileno(stdout), &st) != 0
12029          );
12030   }
12031 }
12032 EOF
12033 if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12034 then
12035   ac_cv_func_vfork_works=yes
12036 else
12037   conftest_rc="$?"
12038   echo "configure: failed program was:" >&5
12039   cat conftest.$ac_ext >&5
12040   rm -fr conftest*
12041   ac_cv_func_vfork_works=no
12042 fi
12043 rm -fr conftest*
12044
12045 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12046 if test $ac_cv_func_vfork_works = no; then
12047   { test "$extra_verbose" = "yes" && cat << \EOF
12048     Defining vfork = fork
12049 EOF
12050 cat >> confdefs.h <<\EOF
12051 #define vfork fork
12052 EOF
12053 }
12054
12055 fi
12056
12057
12058 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12059 echo "configure:12060: checking for working strcoll" >&5
12060
12061 cat > conftest.$ac_ext <<EOF
12062 #line 12063 "configure"
12063 #include "confdefs.h"
12064 #include <string.h>
12065 main ()
12066 {
12067   exit (strcoll ("abc", "def") >= 0 ||
12068         strcoll ("ABC", "DEF") >= 0 ||
12069         strcoll ("123", "456") >= 0);
12070 }
12071 EOF
12072 if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12073 then
12074   ac_cv_func_strcoll_works=yes
12075 else
12076   conftest_rc="$?"
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -fr conftest*
12080   ac_cv_func_strcoll_works=no
12081 fi
12082 rm -fr conftest*
12083
12084 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12085 if test $ac_cv_func_strcoll_works = yes; then
12086   { test "$extra_verbose" = "yes" && cat << \EOF
12087     Defining HAVE_STRCOLL
12088 EOF
12089 cat >> confdefs.h <<\EOF
12090 #define HAVE_STRCOLL 1
12091 EOF
12092 }
12093
12094 fi
12095
12096
12097 for ac_func in getpgrp
12098 do
12099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12100 echo "configure:12101: checking for $ac_func" >&5
12101
12102 cat > conftest.$ac_ext <<EOF
12103 #line 12104 "configure"
12104 #include "confdefs.h"
12105 /* System header to define __stub macros and hopefully few prototypes,
12106     which can conflict with char $ac_func(); below.  */
12107 #include <assert.h>
12108 /* Override any gcc2 internal prototype to avoid an error.  */
12109 /* We use char because int might match the return type of a gcc2
12110     builtin and then its argument prototype would still apply.  */
12111 char $ac_func();
12112
12113 int main() {
12114
12115 /* The GNU C library defines this for functions which it implements
12116     to always fail with ENOSYS.  Some functions are actually named
12117     something starting with __ and the normal name is an alias.  */
12118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12119 choke me
12120 #else
12121 $ac_func();
12122 #endif
12123
12124 ; return 0; }
12125 EOF
12126 if { (eval echo configure:12127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12127   rm -rf conftest*
12128   eval "ac_cv_func_$ac_func=yes"
12129 else
12130   echo "configure: failed program was:" >&5
12131   cat conftest.$ac_ext >&5
12132   rm -rf conftest*
12133   eval "ac_cv_func_$ac_func=no"
12134 fi
12135 rm -f conftest*
12136
12137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12138   echo "$ac_t""yes" 1>&6
12139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12140   { test "$extra_verbose" = "yes" && cat << EOF
12141     Defining $ac_tr_func
12142 EOF
12143 cat >> confdefs.h <<EOF
12144 #define $ac_tr_func 1
12145 EOF
12146 }
12147  
12148 else
12149   echo "$ac_t""no" 1>&6
12150 fi
12151 done
12152
12153 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12154 echo "configure:12155: checking whether getpgrp takes no argument" >&5
12155
12156 cat > conftest.$ac_ext <<EOF
12157 #line 12158 "configure"
12158 #include "confdefs.h"
12159
12160 /*
12161  * If this system has a BSD-style getpgrp(),
12162  * which takes a pid argument, exit unsuccessfully.
12163  *
12164  * Snarfed from Chet Ramey's bash pgrp.c test program
12165  */
12166 #include <stdio.h>
12167 #include <sys/types.h>
12168
12169 int     pid;
12170 int     pg1, pg2, pg3, pg4;
12171 int     ng, np, s, child;
12172
12173 main()
12174 {
12175         pid = getpid();
12176         pg1 = getpgrp(0);
12177         pg2 = getpgrp();
12178         pg3 = getpgrp(pid);
12179         pg4 = getpgrp(1);
12180
12181         /*
12182          * If all of these values are the same, it's pretty sure that
12183          * we're on a system that ignores getpgrp's first argument.
12184          */
12185         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12186                 exit(0);
12187
12188         child = fork();
12189         if (child < 0)
12190                 exit(1);
12191         else if (child == 0) {
12192                 np = getpid();
12193                 /*
12194                  * If this is Sys V, this will not work; pgrp will be
12195                  * set to np because setpgrp just changes a pgrp to be
12196                  * the same as the pid.
12197                  */
12198                 setpgrp(np, pg1);
12199                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12200                 if (ng == pg1) {
12201                         exit(1);
12202                 } else {
12203                         exit(0);
12204                 }
12205         } else {
12206                 wait(&s);
12207                 exit(s>>8);
12208         }
12209 }
12210
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12213 then
12214   ac_cv_func_getpgrp_void=yes
12215 else
12216   conftest_rc="$?"
12217   echo "configure: failed program was:" >&5
12218   cat conftest.$ac_ext >&5
12219   rm -fr conftest*
12220   ac_cv_func_getpgrp_void=no
12221 fi
12222 rm -fr conftest*
12223
12224
12225 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12226 if test $ac_cv_func_getpgrp_void = yes; then
12227   { test "$extra_verbose" = "yes" && cat << \EOF
12228     Defining GETPGRP_VOID
12229 EOF
12230 cat >> confdefs.h <<\EOF
12231 #define GETPGRP_VOID 1
12232 EOF
12233 }
12234
12235 fi
12236
12237
12238 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12239 echo "configure:12240: checking for working mmap" >&5
12240 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12241 cat > conftest.$ac_ext <<EOF
12242 #line 12243 "configure"
12243 #include "confdefs.h"
12244 #include <stdio.h>
12245 #include <unistd.h>
12246 #include <fcntl.h>
12247 #include <sys/mman.h>
12248
12249 #ifndef MAP_VARIABLE
12250 #define MAP_VARIABLE 0
12251 #endif
12252
12253 #ifndef MAP_FAILED
12254 #define MAP_FAILED -1
12255 #endif
12256
12257 int main (int argc, char *argv[])
12258 {
12259   int fd = -1;
12260   caddr_t p;
12261 #ifndef MAP_ANONYMOUS
12262   fd = open ("/dev/zero", O_RDWR);
12263   if (fd < 0)
12264     return 1;
12265 #define MAP_ANONYMOUS 0
12266 #endif
12267   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12268            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12269            fd, 0) != (void *) MAP_FAILED)
12270     return 0;
12271   perror ("conftest: mmap failed");
12272   return 1;
12273 }
12274 EOF
12275 if { (eval echo configure:12276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12276 then
12277   have_mmap=yes
12278 else
12279   conftest_rc="$?"
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -fr conftest*
12283   have_mmap=no
12284 fi
12285 rm -fr conftest* ;;
12286 esac
12287 echo "$ac_t""$have_mmap" 1>&6
12288 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12289     Defining HAVE_MMAP
12290 EOF
12291 cat >> confdefs.h <<\EOF
12292 #define HAVE_MMAP 1
12293 EOF
12294 }
12295
12296
12297 case "$opsys" in cygwin*) 
12298         test "$rel_alloc" = "default" && rel_alloc=no ;;
12299 esac
12300 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12301 if test "$rel_alloc $have_mmap" = "default yes"; then
12302   if test "$doug_lea_malloc" = "yes"; then
12303         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12304 echo "configure:12305: checking for M_MMAP_THRESHOLD" >&5
12305     cat > conftest.$ac_ext <<EOF
12306 #line 12307 "configure"
12307 #include "confdefs.h"
12308 #include <malloc.h>
12309 int main() {
12310
12311 #ifndef M_MMAP_THRESHOLD
12312 #error No M_MMAP_THRESHOLD :-(
12313 !@+$%^&*_)(_ - unlikely to compile...
12314 #endif
12315
12316 ; return 0; }
12317 EOF
12318 if { (eval echo configure:12319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12319   rm -rf conftest*
12320   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12321 else
12322   echo "configure: failed program was:" >&5
12323   cat conftest.$ac_ext >&5
12324   rm -rf conftest*
12325   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12326 fi
12327 rm -f conftest*
12328   else
12329     rel_alloc=yes
12330   fi
12331 fi
12332 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12333     Defining REL_ALLOC
12334 EOF
12335 cat >> confdefs.h <<\EOF
12336 #define REL_ALLOC 1
12337 EOF
12338 }
12339
12340
12341 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12342 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12343 echo "configure:12344: checking for termios.h" >&5
12344
12345 cat > conftest.$ac_ext <<EOF
12346 #line 12347 "configure"
12347 #include "confdefs.h"
12348 #include <termios.h>
12349 EOF
12350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12351 { (eval echo configure:12352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12353 if test -z "$ac_err"; then
12354   rm -rf conftest*
12355   eval "ac_cv_header_$ac_safe=yes"
12356 else
12357   echo "$ac_err" >&5
12358   echo "configure: failed program was:" >&5
12359   cat conftest.$ac_ext >&5
12360   rm -rf conftest*
12361   eval "ac_cv_header_$ac_safe=no"
12362 fi
12363 rm -f conftest*
12364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12365   echo "$ac_t""yes" 1>&6
12366   { test "$extra_verbose" = "yes" && cat << \EOF
12367     Defining HAVE_TERMIOS
12368 EOF
12369 cat >> confdefs.h <<\EOF
12370 #define HAVE_TERMIOS 1
12371 EOF
12372 }
12373
12374   { test "$extra_verbose" = "yes" && cat << \EOF
12375     Defining SIGNALS_VIA_CHARACTERS
12376 EOF
12377 cat >> confdefs.h <<\EOF
12378 #define SIGNALS_VIA_CHARACTERS 1
12379 EOF
12380 }
12381
12382   { test "$extra_verbose" = "yes" && cat << \EOF
12383     Defining NO_TERMIO
12384 EOF
12385 cat >> confdefs.h <<\EOF
12386 #define NO_TERMIO 1
12387 EOF
12388 }
12389
12390 else
12391   echo "$ac_t""no" 1>&6
12392 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12393 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12394 echo "configure:12395: checking for termio.h" >&5
12395
12396 cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 #include <termio.h>
12400 EOF
12401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12402 { (eval echo configure:12403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12404 if test -z "$ac_err"; then
12405   rm -rf conftest*
12406   eval "ac_cv_header_$ac_safe=yes"
12407 else
12408   echo "$ac_err" >&5
12409   echo "configure: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   rm -rf conftest*
12412   eval "ac_cv_header_$ac_safe=no"
12413 fi
12414 rm -f conftest*
12415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12416   echo "$ac_t""yes" 1>&6
12417   { test "$extra_verbose" = "yes" && cat << \EOF
12418     Defining HAVE_TERMIO
12419 EOF
12420 cat >> confdefs.h <<\EOF
12421 #define HAVE_TERMIO 1
12422 EOF
12423 }
12424
12425 else
12426   echo "$ac_t""no" 1>&6
12427 fi
12428
12429 fi
12430
12431
12432
12433 echo $ac_n "checking for socket""... $ac_c" 1>&6
12434 echo "configure:12435: checking for socket" >&5
12435
12436 cat > conftest.$ac_ext <<EOF
12437 #line 12438 "configure"
12438 #include "confdefs.h"
12439 /* System header to define __stub macros and hopefully few prototypes,
12440     which can conflict with char socket(); below.  */
12441 #include <assert.h>
12442 /* Override any gcc2 internal prototype to avoid an error.  */
12443 /* We use char because int might match the return type of a gcc2
12444     builtin and then its argument prototype would still apply.  */
12445 char socket();
12446
12447 int main() {
12448
12449 /* The GNU C library defines this for functions which it implements
12450     to always fail with ENOSYS.  Some functions are actually named
12451     something starting with __ and the normal name is an alias.  */
12452 #if defined (__stub_socket) || defined (__stub___socket)
12453 choke me
12454 #else
12455 socket();
12456 #endif
12457
12458 ; return 0; }
12459 EOF
12460 if { (eval echo configure:12461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12461   rm -rf conftest*
12462   eval "ac_cv_func_socket=yes"
12463 else
12464   echo "configure: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   rm -rf conftest*
12467   eval "ac_cv_func_socket=no"
12468 fi
12469 rm -f conftest*
12470
12471 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12472   echo "$ac_t""yes" 1>&6
12473   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12474 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12475 echo "configure:12476: checking for netinet/in.h" >&5
12476
12477 cat > conftest.$ac_ext <<EOF
12478 #line 12479 "configure"
12479 #include "confdefs.h"
12480 #include <netinet/in.h>
12481 EOF
12482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12483 { (eval echo configure:12484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12485 if test -z "$ac_err"; then
12486   rm -rf conftest*
12487   eval "ac_cv_header_$ac_safe=yes"
12488 else
12489   echo "$ac_err" >&5
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -rf conftest*
12493   eval "ac_cv_header_$ac_safe=no"
12494 fi
12495 rm -f conftest*
12496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12497   echo "$ac_t""yes" 1>&6
12498   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12499 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12500 echo "configure:12501: checking for arpa/inet.h" >&5
12501
12502 cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505 #include <arpa/inet.h>
12506 EOF
12507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12508 { (eval echo configure:12509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12510 if test -z "$ac_err"; then
12511   rm -rf conftest*
12512   eval "ac_cv_header_$ac_safe=yes"
12513 else
12514   echo "$ac_err" >&5
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   eval "ac_cv_header_$ac_safe=no"
12519 fi
12520 rm -f conftest*
12521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12522   echo "$ac_t""yes" 1>&6
12523   
12524   { test "$extra_verbose" = "yes" && cat << \EOF
12525     Defining HAVE_SOCKETS
12526 EOF
12527 cat >> confdefs.h <<\EOF
12528 #define HAVE_SOCKETS 1
12529 EOF
12530 }
12531
12532       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12533 echo "configure:12534: checking "for sun_len member in struct sockaddr_un"" >&5
12534       cat > conftest.$ac_ext <<EOF
12535 #line 12536 "configure"
12536 #include "confdefs.h"
12537
12538 #include <sys/types.h>
12539 #include <sys/socket.h>
12540 #include <sys/un.h>
12541       
12542 int main() {
12543 static struct sockaddr_un x; x.sun_len = 1;
12544 ; return 0; }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12547   rm -rf conftest*
12548   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12549     Defining HAVE_SOCKADDR_SUN_LEN
12550 EOF
12551 cat >> confdefs.h <<\EOF
12552 #define HAVE_SOCKADDR_SUN_LEN 1
12553 EOF
12554 }
12555
12556 else
12557   echo "configure: failed program was:" >&5
12558   cat conftest.$ac_ext >&5
12559   rm -rf conftest*
12560   echo "$ac_t""no" 1>&6
12561 fi
12562 rm -f conftest*
12563       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12564 echo "configure:12565: checking "for ip_mreq struct in netinet/in.h"" >&5
12565       cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568
12569 #include <sys/types.h>
12570 #include <netinet/in.h>
12571       
12572 int main() {
12573 static struct ip_mreq x;
12574 ; return 0; }
12575 EOF
12576 if { (eval echo configure:12577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12577   rm -rf conftest*
12578   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12579     Defining HAVE_MULTICAST
12580 EOF
12581 cat >> confdefs.h <<\EOF
12582 #define HAVE_MULTICAST 1
12583 EOF
12584 }
12585
12586 else
12587   echo "configure: failed program was:" >&5
12588   cat conftest.$ac_ext >&5
12589   rm -rf conftest*
12590   echo "$ac_t""no" 1>&6
12591 fi
12592 rm -f conftest*
12593 else
12594   echo "$ac_t""no" 1>&6
12595 fi
12596
12597 else
12598   echo "$ac_t""no" 1>&6
12599 fi
12600
12601 else
12602   echo "$ac_t""no" 1>&6
12603 fi
12604
12605
12606 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12607 echo "configure:12608: checking for msgget" >&5
12608
12609 cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612 /* System header to define __stub macros and hopefully few prototypes,
12613     which can conflict with char msgget(); below.  */
12614 #include <assert.h>
12615 /* Override any gcc2 internal prototype to avoid an error.  */
12616 /* We use char because int might match the return type of a gcc2
12617     builtin and then its argument prototype would still apply.  */
12618 char msgget();
12619
12620 int main() {
12621
12622 /* The GNU C library defines this for functions which it implements
12623     to always fail with ENOSYS.  Some functions are actually named
12624     something starting with __ and the normal name is an alias.  */
12625 #if defined (__stub_msgget) || defined (__stub___msgget)
12626 choke me
12627 #else
12628 msgget();
12629 #endif
12630
12631 ; return 0; }
12632 EOF
12633 if { (eval echo configure:12634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12634   rm -rf conftest*
12635   eval "ac_cv_func_msgget=yes"
12636 else
12637   echo "configure: failed program was:" >&5
12638   cat conftest.$ac_ext >&5
12639   rm -rf conftest*
12640   eval "ac_cv_func_msgget=no"
12641 fi
12642 rm -f conftest*
12643
12644 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12645   echo "$ac_t""yes" 1>&6
12646   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12647 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12648 echo "configure:12649: checking for sys/ipc.h" >&5
12649
12650 cat > conftest.$ac_ext <<EOF
12651 #line 12652 "configure"
12652 #include "confdefs.h"
12653 #include <sys/ipc.h>
12654 EOF
12655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12656 { (eval echo configure:12657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12658 if test -z "$ac_err"; then
12659   rm -rf conftest*
12660   eval "ac_cv_header_$ac_safe=yes"
12661 else
12662   echo "$ac_err" >&5
12663   echo "configure: failed program was:" >&5
12664   cat conftest.$ac_ext >&5
12665   rm -rf conftest*
12666   eval "ac_cv_header_$ac_safe=no"
12667 fi
12668 rm -f conftest*
12669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12670   echo "$ac_t""yes" 1>&6
12671   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12672 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12673 echo "configure:12674: checking for sys/msg.h" >&5
12674
12675 cat > conftest.$ac_ext <<EOF
12676 #line 12677 "configure"
12677 #include "confdefs.h"
12678 #include <sys/msg.h>
12679 EOF
12680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12681 { (eval echo configure:12682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12683 if test -z "$ac_err"; then
12684   rm -rf conftest*
12685   eval "ac_cv_header_$ac_safe=yes"
12686 else
12687   echo "$ac_err" >&5
12688   echo "configure: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   rm -rf conftest*
12691   eval "ac_cv_header_$ac_safe=no"
12692 fi
12693 rm -f conftest*
12694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12695   echo "$ac_t""yes" 1>&6
12696   { test "$extra_verbose" = "yes" && cat << \EOF
12697     Defining HAVE_SYSVIPC
12698 EOF
12699 cat >> confdefs.h <<\EOF
12700 #define HAVE_SYSVIPC 1
12701 EOF
12702 }
12703
12704 else
12705   echo "$ac_t""no" 1>&6
12706 fi
12707
12708 else
12709   echo "$ac_t""no" 1>&6
12710 fi
12711
12712 else
12713   echo "$ac_t""no" 1>&6
12714 fi
12715
12716
12717 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12718 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12719 echo "configure:12720: checking for dirent.h" >&5
12720
12721 cat > conftest.$ac_ext <<EOF
12722 #line 12723 "configure"
12723 #include "confdefs.h"
12724 #include <dirent.h>
12725 EOF
12726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12727 { (eval echo configure:12728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12729 if test -z "$ac_err"; then
12730   rm -rf conftest*
12731   eval "ac_cv_header_$ac_safe=yes"
12732 else
12733   echo "$ac_err" >&5
12734   echo "configure: failed program was:" >&5
12735   cat conftest.$ac_ext >&5
12736   rm -rf conftest*
12737   eval "ac_cv_header_$ac_safe=no"
12738 fi
12739 rm -f conftest*
12740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12741   echo "$ac_t""yes" 1>&6
12742   { test "$extra_verbose" = "yes" && cat << \EOF
12743     Defining SYSV_SYSTEM_DIR
12744 EOF
12745 cat >> confdefs.h <<\EOF
12746 #define SYSV_SYSTEM_DIR 1
12747 EOF
12748 }
12749
12750 else
12751   echo "$ac_t""no" 1>&6
12752 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12753 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12754 echo "configure:12755: checking for sys/dir.h" >&5
12755
12756 cat > conftest.$ac_ext <<EOF
12757 #line 12758 "configure"
12758 #include "confdefs.h"
12759 #include <sys/dir.h>
12760 EOF
12761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12762 { (eval echo configure:12763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12764 if test -z "$ac_err"; then
12765   rm -rf conftest*
12766   eval "ac_cv_header_$ac_safe=yes"
12767 else
12768   echo "$ac_err" >&5
12769   echo "configure: failed program was:" >&5
12770   cat conftest.$ac_ext >&5
12771   rm -rf conftest*
12772   eval "ac_cv_header_$ac_safe=no"
12773 fi
12774 rm -f conftest*
12775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12776   echo "$ac_t""yes" 1>&6
12777   :
12778 else
12779   echo "$ac_t""no" 1>&6
12780 { test "$extra_verbose" = "yes" && cat << \EOF
12781     Defining NONSYSTEM_DIR_LIBRARY
12782 EOF
12783 cat >> confdefs.h <<\EOF
12784 #define NONSYSTEM_DIR_LIBRARY 1
12785 EOF
12786 }
12787
12788 fi
12789
12790 fi
12791
12792
12793 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12794 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12795 echo "configure:12796: checking for nlist.h" >&5
12796
12797 cat > conftest.$ac_ext <<EOF
12798 #line 12799 "configure"
12799 #include "confdefs.h"
12800 #include <nlist.h>
12801 EOF
12802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12803 { (eval echo configure:12804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12805 if test -z "$ac_err"; then
12806   rm -rf conftest*
12807   eval "ac_cv_header_$ac_safe=yes"
12808 else
12809   echo "$ac_err" >&5
12810   echo "configure: failed program was:" >&5
12811   cat conftest.$ac_ext >&5
12812   rm -rf conftest*
12813   eval "ac_cv_header_$ac_safe=no"
12814 fi
12815 rm -f conftest*
12816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12817   echo "$ac_t""yes" 1>&6
12818   { test "$extra_verbose" = "yes" && cat << \EOF
12819     Defining NLIST_STRUCT
12820 EOF
12821 cat >> confdefs.h <<\EOF
12822 #define NLIST_STRUCT 1
12823 EOF
12824 }
12825
12826 else
12827   echo "$ac_t""no" 1>&6
12828 fi
12829
12830
12831
12832 echo "checking "for sound support"" 1>&6
12833 echo "configure:12834: checking "for sound support"" >&5
12834 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12835
12836 if test "$with_native_sound" != "no"; then
12837     if test -n "$native_sound_lib"; then
12838     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12839 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12840 echo "configure:12841: checking for multimedia/audio_device.h" >&5
12841
12842 cat > conftest.$ac_ext <<EOF
12843 #line 12844 "configure"
12844 #include "confdefs.h"
12845 #include <multimedia/audio_device.h>
12846 EOF
12847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12848 { (eval echo configure:12849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12850 if test -z "$ac_err"; then
12851   rm -rf conftest*
12852   eval "ac_cv_header_$ac_safe=yes"
12853 else
12854   echo "$ac_err" >&5
12855   echo "configure: failed program was:" >&5
12856   cat conftest.$ac_ext >&5
12857   rm -rf conftest*
12858   eval "ac_cv_header_$ac_safe=no"
12859 fi
12860 rm -f conftest*
12861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12862   echo "$ac_t""yes" 1>&6
12863   sound_found=yes sound_cflags=""
12864       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12865    echo "    xemacs will be linked with \"sunplay.o\""
12866  fi
12867 else
12868   echo "$ac_t""no" 1>&6
12869 fi
12870
12871   fi
12872
12873     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12874     sound_found=yes
12875     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12876    echo "    xemacs will be linked with \"sunplay.o\""
12877  fi
12878     if test -d "/usr/demo/SOUND/include"
12879       then sound_cflags="-I/usr/demo/SOUND/include"
12880       else sound_cflags="-I/usr/demo/SOUND"
12881     fi
12882     if test -z "$native_sound_lib" ; then
12883       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12884         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12885         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12886       fi
12887     fi
12888   fi
12889
12890     if test -z "$sound_found"; then
12891     case "$canonical" in
12892     *-sgi-* )
12893       if test -z "$native_sound_lib"; then
12894         
12895 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12896 echo "configure:12897: checking for ALopenport in -laudio" >&5
12897 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12898
12899 xe_check_libs=" -laudio "
12900 cat > conftest.$ac_ext <<EOF
12901 #line 12902 "configure"
12902 #include "confdefs.h"
12903 /* Override any gcc2 internal prototype to avoid an error.  */
12904 /* We use char because int might match the return type of a gcc2
12905     builtin and then its argument prototype would still apply.  */
12906 char ALopenport();
12907
12908 int main() {
12909 ALopenport()
12910 ; return 0; }
12911 EOF
12912 if { (eval echo configure:12913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12913   rm -rf conftest*
12914   eval "ac_cv_lib_$ac_lib_var=yes"
12915 else
12916   echo "configure: failed program was:" >&5
12917   cat conftest.$ac_ext >&5
12918   rm -rf conftest*
12919   eval "ac_cv_lib_$ac_lib_var=no"
12920 fi
12921 rm -f conftest*
12922 xe_check_libs=""
12923
12924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12925   echo "$ac_t""yes" 1>&6
12926   native_sound_lib="-laudio"
12927 else
12928   echo "$ac_t""no" 1>&6
12929 fi
12930
12931
12932       fi
12933       if test -n "$native_sound_lib"; then
12934         sound_found=yes sound_cflags=""
12935         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12936    echo "    xemacs will be linked with \"sgiplay.o\""
12937  fi
12938       fi ;;
12939     hppa*-hp-hpux* )
12940       if test -z "$native_sound_lib"; then
12941         
12942 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12943 echo "configure:12944: checking for AOpenAudio in -lAlib" >&5
12944 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12945
12946 xe_check_libs=" -lAlib "
12947 cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 /* Override any gcc2 internal prototype to avoid an error.  */
12951 /* We use char because int might match the return type of a gcc2
12952     builtin and then its argument prototype would still apply.  */
12953 char AOpenAudio();
12954
12955 int main() {
12956 AOpenAudio()
12957 ; return 0; }
12958 EOF
12959 if { (eval echo configure:12960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12960   rm -rf conftest*
12961   eval "ac_cv_lib_$ac_lib_var=yes"
12962 else
12963   echo "configure: failed program was:" >&5
12964   cat conftest.$ac_ext >&5
12965   rm -rf conftest*
12966   eval "ac_cv_lib_$ac_lib_var=no"
12967 fi
12968 rm -f conftest*
12969 xe_check_libs=""
12970
12971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12972   echo "$ac_t""yes" 1>&6
12973   native_sound_lib="-lAlib"
12974 else
12975   echo "$ac_t""no" 1>&6
12976 fi
12977
12978
12979       fi
12980       if test -n "$native_sound_lib"; then
12981         sound_found=yes
12982         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12983    echo "    xemacs will be linked with \"hpplay.o\""
12984  fi
12985         if test "$GCC" = "yes" # Kludge city
12986           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12987           else sound_cflags="+e -I/usr/audio/examples"
12988         fi
12989       fi ;;
12990     esac
12991   fi
12992
12993     if test -z "$sound_found"; then
12994     if test "$with_msw" = "yes"; then
12995     sound_found=yes
12996     native_sound_lib=
12997     fi
12998   fi
12999
13000     if test -z "$sound_found"; then
13001     for dir in "machine" "sys" "linux"; do
13002       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13003 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13004 echo "configure:13005: checking for ${dir}/soundcard.h" >&5
13005
13006 cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 #include <${dir}/soundcard.h>
13010 EOF
13011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13012 { (eval echo configure:13013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13014 if test -z "$ac_err"; then
13015   rm -rf conftest*
13016   eval "ac_cv_header_$ac_safe=yes"
13017 else
13018   echo "$ac_err" >&5
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   eval "ac_cv_header_$ac_safe=no"
13023 fi
13024 rm -f conftest*
13025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13026   echo "$ac_t""yes" 1>&6
13027   sound_found=yes
13028        need_miscplay=yes
13029         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13030    echo "    xemacs will be linked with \"linuxplay.o\""
13031  fi
13032         { test "$extra_verbose" = "yes" && cat << EOF
13033     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13034 EOF
13035 cat >> confdefs.h <<EOF
13036 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13037 EOF
13038 }
13039
13040         break
13041 else
13042   echo "$ac_t""no" 1>&6
13043 fi
13044
13045     done
13046   fi
13047
13048   test "$sound_found" = "yes" && with_native_sound=yes
13049 fi
13050
13051 if test "$with_native_sound" = "yes"; then
13052   { test "$extra_verbose" = "yes" && cat << \EOF
13053     Defining HAVE_NATIVE_SOUND
13054 EOF
13055 cat >> confdefs.h <<\EOF
13056 #define HAVE_NATIVE_SOUND 1
13057 EOF
13058 }
13059
13060   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13061 fi
13062
13063 if test "$with_nas_sound" != "no"; then
13064   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13065 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13066 echo "configure:13067: checking for audio/audiolib.h" >&5
13067
13068 cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071 #include <audio/audiolib.h>
13072 EOF
13073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13074 { (eval echo configure:13075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13076 if test -z "$ac_err"; then
13077   rm -rf conftest*
13078   eval "ac_cv_header_$ac_safe=yes"
13079 else
13080   echo "$ac_err" >&5
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -rf conftest*
13084   eval "ac_cv_header_$ac_safe=no"
13085 fi
13086 rm -f conftest*
13087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13088   echo "$ac_t""yes" 1>&6
13089   
13090     
13091 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13092 echo "configure:13093: checking for AuOpenServer in -laudio" >&5
13093 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13094
13095 xe_check_libs=" -laudio "
13096 cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 /* Override any gcc2 internal prototype to avoid an error.  */
13100 /* We use char because int might match the return type of a gcc2
13101     builtin and then its argument prototype would still apply.  */
13102 char AuOpenServer();
13103
13104 int main() {
13105 AuOpenServer()
13106 ; return 0; }
13107 EOF
13108 if { (eval echo configure:13109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13109   rm -rf conftest*
13110   eval "ac_cv_lib_$ac_lib_var=yes"
13111 else
13112   echo "configure: failed program was:" >&5
13113   cat conftest.$ac_ext >&5
13114   rm -rf conftest*
13115   eval "ac_cv_lib_$ac_lib_var=no"
13116 fi
13117 rm -f conftest*
13118 xe_check_libs=""
13119
13120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13121   echo "$ac_t""yes" 1>&6
13122   have_nas_sound=yes
13123 else
13124   echo "$ac_t""no" 1>&6
13125 fi
13126
13127
13128 else
13129   echo "$ac_t""no" 1>&6
13130 fi
13131
13132   if test "$have_nas_sound" = "yes"; then
13133     with_nas_sound=yes
13134     { test "$extra_verbose" = "yes" && cat << \EOF
13135     Defining HAVE_NAS_SOUND
13136 EOF
13137 cat >> confdefs.h <<\EOF
13138 #define HAVE_NAS_SOUND 1
13139 EOF
13140 }
13141
13142     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13143    echo "    xemacs will be linked with \"nas.o\""
13144  fi
13145     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13146             cat > conftest.$ac_ext <<EOF
13147 #line 13148 "configure"
13148 #include "confdefs.h"
13149 #include <audio/Xtutil.h>
13150 EOF
13151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13152   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13153   :
13154 else
13155   rm -rf conftest*
13156   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13157     Defining NAS_NO_ERROR_JUMP
13158 EOF
13159 cat >> confdefs.h <<\EOF
13160 #define NAS_NO_ERROR_JUMP 1
13161 EOF
13162 }
13163
13164 fi
13165 rm -f conftest*
13166
13167   else
13168     test "$with_nas_sound" = "yes" && \
13169       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13170     with_nas_sound=no
13171   fi
13172 fi
13173
13174 if test "$with_esd_sound" != "no"; then
13175   # Extract the first word of "esd-config", so it can be a program name with args.
13176 set dummy esd-config; ac_word=$2
13177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13178 echo "configure:13179: checking for $ac_word" >&5
13179
13180 if test -n "$have_esd_config"; then
13181   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13182 else
13183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13184   ac_dummy="$PATH"
13185   for ac_dir in $ac_dummy; do
13186     test -z "$ac_dir" && ac_dir=.
13187     if test -f $ac_dir/$ac_word; then
13188       ac_cv_prog_have_esd_config="yes"
13189       break
13190     fi
13191   done
13192   IFS="$ac_save_ifs"
13193   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13194 fi
13195 have_esd_config="$ac_cv_prog_have_esd_config"
13196 if test -n "$have_esd_config"; then
13197   echo "$ac_t""$have_esd_config" 1>&6
13198 else
13199   echo "$ac_t""no" 1>&6
13200 fi
13201
13202   if test "$have_esd_config" = "yes"; then
13203     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13204     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
13205     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13206     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13207 echo "configure:13208: checking for esd_play_stream" >&5
13208
13209 cat > conftest.$ac_ext <<EOF
13210 #line 13211 "configure"
13211 #include "confdefs.h"
13212 /* System header to define __stub macros and hopefully few prototypes,
13213     which can conflict with char esd_play_stream(); below.  */
13214 #include <assert.h>
13215 /* Override any gcc2 internal prototype to avoid an error.  */
13216 /* We use char because int might match the return type of a gcc2
13217     builtin and then its argument prototype would still apply.  */
13218 char esd_play_stream();
13219
13220 int main() {
13221
13222 /* The GNU C library defines this for functions which it implements
13223     to always fail with ENOSYS.  Some functions are actually named
13224     something starting with __ and the normal name is an alias.  */
13225 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13226 choke me
13227 #else
13228 esd_play_stream();
13229 #endif
13230
13231 ; return 0; }
13232 EOF
13233 if { (eval echo configure:13234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13234   rm -rf conftest*
13235   eval "ac_cv_func_esd_play_stream=yes"
13236 else
13237   echo "configure: failed program was:" >&5
13238   cat conftest.$ac_ext >&5
13239   rm -rf conftest*
13240   eval "ac_cv_func_esd_play_stream=no"
13241 fi
13242 rm -f conftest*
13243
13244 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13245   echo "$ac_t""yes" 1>&6
13246   have_esd_sound=yes
13247 else
13248   echo "$ac_t""no" 1>&6
13249 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13250 fi
13251
13252   fi
13253
13254   if test "$have_esd_sound" = "yes"; then
13255     with_esd_sound=yes
13256     need_miscplay=yes
13257     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13258    echo "    xemacs will be linked with \"esd.o\""
13259  fi
13260     { test "$extra_verbose" = "yes" && cat << \EOF
13261     Defining HAVE_ESD_SOUND
13262 EOF
13263 cat >> confdefs.h <<\EOF
13264 #define HAVE_ESD_SOUND 1
13265 EOF
13266 }
13267
13268   else
13269     test "$with_esd_sound" = "yes" && \
13270       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13271     with_esd_sound=no
13272   fi
13273 fi
13274
13275 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13276    echo "    xemacs will be linked with \"miscplay.o\""
13277  fi
13278
13279
13280 test -z "$with_tty" && with_tty=yes
13281
13282 if test "$with_tty" = "yes"  ; then
13283   echo "checking for TTY-related features" 1>&6
13284 echo "configure:13285: checking for TTY-related features" >&5
13285   { test "$extra_verbose" = "yes" && cat << \EOF
13286     Defining HAVE_TTY
13287 EOF
13288 cat >> confdefs.h <<\EOF
13289 #define HAVE_TTY 1
13290 EOF
13291 }
13292
13293   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
13294    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\""
13295  fi
13296
13297     if test -z "$with_ncurses"; then
13298     
13299 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13300 echo "configure:13301: checking for tgetent in -lncurses" >&5
13301 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13302
13303 xe_check_libs=" -lncurses "
13304 cat > conftest.$ac_ext <<EOF
13305 #line 13306 "configure"
13306 #include "confdefs.h"
13307 /* Override any gcc2 internal prototype to avoid an error.  */
13308 /* We use char because int might match the return type of a gcc2
13309     builtin and then its argument prototype would still apply.  */
13310 char tgetent();
13311
13312 int main() {
13313 tgetent()
13314 ; return 0; }
13315 EOF
13316 if { (eval echo configure:13317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13317   rm -rf conftest*
13318   eval "ac_cv_lib_$ac_lib_var=yes"
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -rf conftest*
13323   eval "ac_cv_lib_$ac_lib_var=no"
13324 fi
13325 rm -f conftest*
13326 xe_check_libs=""
13327
13328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13329   echo "$ac_t""yes" 1>&6
13330   with_ncurses=yes
13331 else
13332   echo "$ac_t""no" 1>&6
13333 with_ncurses=no
13334 fi
13335
13336
13337   fi
13338   if test "$with_ncurses" = "yes"; then
13339     { test "$extra_verbose" = "yes" && cat << \EOF
13340     Defining HAVE_NCURSES
13341 EOF
13342 cat >> confdefs.h <<\EOF
13343 #define HAVE_NCURSES 1
13344 EOF
13345 }
13346
13347     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13348 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13349 echo "configure:13350: checking for ncurses/curses.h" >&5
13350
13351 cat > conftest.$ac_ext <<EOF
13352 #line 13353 "configure"
13353 #include "confdefs.h"
13354 #include <ncurses/curses.h>
13355 EOF
13356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13357 { (eval echo configure:13358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13359 if test -z "$ac_err"; then
13360   rm -rf conftest*
13361   eval "ac_cv_header_$ac_safe=yes"
13362 else
13363   echo "$ac_err" >&5
13364   echo "configure: failed program was:" >&5
13365   cat conftest.$ac_ext >&5
13366   rm -rf conftest*
13367   eval "ac_cv_header_$ac_safe=no"
13368 fi
13369 rm -f conftest*
13370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13371   echo "$ac_t""yes" 1>&6
13372   curses_h_file=ncurses/curses.h
13373 else
13374   echo "$ac_t""no" 1>&6
13375 fi
13376
13377     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13378 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13379 echo "configure:13380: checking for ncurses/term.h" >&5
13380
13381 cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 #include <ncurses/term.h>
13385 EOF
13386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13387 { (eval echo configure:13388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13389 if test -z "$ac_err"; then
13390   rm -rf conftest*
13391   eval "ac_cv_header_$ac_safe=yes"
13392 else
13393   echo "$ac_err" >&5
13394   echo "configure: failed program was:" >&5
13395   cat conftest.$ac_ext >&5
13396   rm -rf conftest*
13397   eval "ac_cv_header_$ac_safe=no"
13398 fi
13399 rm -f conftest*
13400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13401   echo "$ac_t""yes" 1>&6
13402   term_h_file=ncurses/term.h
13403 else
13404   echo "$ac_t""no" 1>&6
13405 fi
13406
13407     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13408    echo "    xemacs will be linked with \"terminfo.o\""
13409  fi
13410     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13411
13412     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13413                         save_c_switch_site="$c_switch_site"
13414       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13415       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13416 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13417 echo "configure:13418: checking for ncurses/curses.h" >&5
13418
13419 cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 #include <ncurses/curses.h>
13423 EOF
13424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13425 { (eval echo configure:13426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13427 if test -z "$ac_err"; then
13428   rm -rf conftest*
13429   eval "ac_cv_header_$ac_safe=yes"
13430 else
13431   echo "$ac_err" >&5
13432   echo "configure: failed program was:" >&5
13433   cat conftest.$ac_ext >&5
13434   rm -rf conftest*
13435   eval "ac_cv_header_$ac_safe=no"
13436 fi
13437 rm -f conftest*
13438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13439   echo "$ac_t""yes" 1>&6
13440   curses_h_file=ncurses/curses.h
13441 else
13442   echo "$ac_t""no" 1>&6
13443 fi
13444
13445       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13446         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13447         else c_switch_site="$save_c_switch_site"
13448       fi
13449     fi
13450   else         if test "$have_terminfo" = "yes"; then
13451       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13452    echo "    xemacs will be linked with \"terminfo.o\""
13453  fi
13454       if test -n "$libs_termcap"; then
13455         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13456       else
13457         for lib in curses termlib termcap; do
13458           
13459 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13460 echo "configure:13461: checking for tgetent in -l$lib" >&5
13461 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13462
13463 xe_check_libs=" -l$lib "
13464 cat > conftest.$ac_ext <<EOF
13465 #line 13466 "configure"
13466 #include "confdefs.h"
13467 /* Override any gcc2 internal prototype to avoid an error.  */
13468 /* We use char because int might match the return type of a gcc2
13469     builtin and then its argument prototype would still apply.  */
13470 char tgetent();
13471
13472 int main() {
13473 tgetent()
13474 ; return 0; }
13475 EOF
13476 if { (eval echo configure:13477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13477   rm -rf conftest*
13478   eval "ac_cv_lib_$ac_lib_var=yes"
13479 else
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482   rm -rf conftest*
13483   eval "ac_cv_lib_$ac_lib_var=no"
13484 fi
13485 rm -f conftest*
13486 xe_check_libs=""
13487
13488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13489   echo "$ac_t""yes" 1>&6
13490   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13491 else
13492   echo "$ac_t""no" 1>&6
13493 fi
13494
13495
13496         done
13497       fi
13498     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13499    echo "    xemacs will be linked with \"tparam.o\""
13500  fi
13501                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13502       if test -n "$libs_termcap"; then
13503         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13504       else
13505         
13506 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13507 echo "configure:13508: checking for tgetent in -lcurses" >&5
13508 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13509
13510 xe_check_libs=" -lcurses "
13511 cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 /* Override any gcc2 internal prototype to avoid an error.  */
13515 /* We use char because int might match the return type of a gcc2
13516     builtin and then its argument prototype would still apply.  */
13517 char tgetent();
13518
13519 int main() {
13520 tgetent()
13521 ; return 0; }
13522 EOF
13523 if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13524   rm -rf conftest*
13525   eval "ac_cv_lib_$ac_lib_var=yes"
13526 else
13527   echo "configure: failed program was:" >&5
13528   cat conftest.$ac_ext >&5
13529   rm -rf conftest*
13530   eval "ac_cv_lib_$ac_lib_var=no"
13531 fi
13532 rm -f conftest*
13533 xe_check_libs=""
13534
13535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13536   echo "$ac_t""yes" 1>&6
13537   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13538 else
13539   echo "$ac_t""no" 1>&6
13540 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13541 echo "configure:13542: checking for tgetent in -ltermcap" >&5
13542 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13543
13544 xe_check_libs=" -ltermcap "
13545 cat > conftest.$ac_ext <<EOF
13546 #line 13547 "configure"
13547 #include "confdefs.h"
13548 /* Override any gcc2 internal prototype to avoid an error.  */
13549 /* We use char because int might match the return type of a gcc2
13550     builtin and then its argument prototype would still apply.  */
13551 char tgetent();
13552
13553 int main() {
13554 tgetent()
13555 ; return 0; }
13556 EOF
13557 if { (eval echo configure:13558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13558   rm -rf conftest*
13559   eval "ac_cv_lib_$ac_lib_var=yes"
13560 else
13561   echo "configure: failed program was:" >&5
13562   cat conftest.$ac_ext >&5
13563   rm -rf conftest*
13564   eval "ac_cv_lib_$ac_lib_var=no"
13565 fi
13566 rm -f conftest*
13567 xe_check_libs=""
13568
13569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13570   echo "$ac_t""yes" 1>&6
13571   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13572 else
13573   echo "$ac_t""no" 1>&6
13574 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13575    echo "    xemacs will be linked with \"termcap.o\""
13576  fi
13577 fi
13578
13579
13580 fi
13581
13582
13583       fi
13584     fi
13585   fi
13586   { test "$extra_verbose" = "yes" && cat << EOF
13587     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13588 EOF
13589 cat >> confdefs.h <<EOF
13590 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13591 EOF
13592 }
13593
13594   { test "$extra_verbose" = "yes" && cat << EOF
13595     Defining TERM_H_FILE = "${term_h_file-term.h}"
13596 EOF
13597 cat >> confdefs.h <<EOF
13598 #define TERM_H_FILE "${term_h_file-term.h}"
13599 EOF
13600 }
13601
13602
13603     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13604 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13605 echo "configure:13606: checking for gpm.h" >&5
13606
13607 cat > conftest.$ac_ext <<EOF
13608 #line 13609 "configure"
13609 #include "confdefs.h"
13610 #include <gpm.h>
13611 EOF
13612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13613 { (eval echo configure:13614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13615 if test -z "$ac_err"; then
13616   rm -rf conftest*
13617   eval "ac_cv_header_$ac_safe=yes"
13618 else
13619   echo "$ac_err" >&5
13620   echo "configure: failed program was:" >&5
13621   cat conftest.$ac_ext >&5
13622   rm -rf conftest*
13623   eval "ac_cv_header_$ac_safe=no"
13624 fi
13625 rm -f conftest*
13626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13627   echo "$ac_t""yes" 1>&6
13628   :
13629 else
13630   echo "$ac_t""no" 1>&6
13631 with_gpm=no
13632 fi
13633  }
13634   test -z "$with_gpm" && { 
13635 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13636 echo "configure:13637: checking for Gpm_Open in -lgpm" >&5
13637 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13638
13639 xe_check_libs=" -lgpm "
13640 cat > conftest.$ac_ext <<EOF
13641 #line 13642 "configure"
13642 #include "confdefs.h"
13643 /* Override any gcc2 internal prototype to avoid an error.  */
13644 /* We use char because int might match the return type of a gcc2
13645     builtin and then its argument prototype would still apply.  */
13646 char Gpm_Open();
13647
13648 int main() {
13649 Gpm_Open()
13650 ; return 0; }
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13653   rm -rf conftest*
13654   eval "ac_cv_lib_$ac_lib_var=yes"
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   eval "ac_cv_lib_$ac_lib_var=no"
13660 fi
13661 rm -f conftest*
13662 xe_check_libs=""
13663
13664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13665   echo "$ac_t""yes" 1>&6
13666   with_gpm=yes
13667 else
13668   echo "$ac_t""no" 1>&6
13669 with_gpm=no
13670 fi
13671
13672  }
13673   if test "$with_gpm" = "yes"; then
13674     { test "$extra_verbose" = "yes" && cat << \EOF
13675     Defining HAVE_GPM
13676 EOF
13677 cat >> confdefs.h <<\EOF
13678 #define HAVE_GPM 1
13679 EOF
13680 }
13681
13682     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13683    echo "    xemacs will be linked with \"gpmevent.o\""
13684  fi
13685     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13686   fi
13687
13688 else   for feature in ncurses gpm; do
13689     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13690       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13691     fi
13692     eval "with_${feature}=no"
13693   done
13694 fi 
13695 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13696    echo "    xemacs will be linked with \"event-unixoid.o\""
13697  fi
13698
13699
13700 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13701   != "no no no" && echo "checking for database support" 1>&6
13702 echo "configure:13703: checking for database support" >&5
13703
13704 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13705   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13706 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13707 echo "configure:13708: checking for ndbm.h" >&5
13708
13709 cat > conftest.$ac_ext <<EOF
13710 #line 13711 "configure"
13711 #include "confdefs.h"
13712 #include <ndbm.h>
13713 EOF
13714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13715 { (eval echo configure:13716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13717 if test -z "$ac_err"; then
13718   rm -rf conftest*
13719   eval "ac_cv_header_$ac_safe=yes"
13720 else
13721   echo "$ac_err" >&5
13722   echo "configure: failed program was:" >&5
13723   cat conftest.$ac_ext >&5
13724   rm -rf conftest*
13725   eval "ac_cv_header_$ac_safe=no"
13726 fi
13727 rm -f conftest*
13728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13729   echo "$ac_t""yes" 1>&6
13730   :
13731 else
13732   echo "$ac_t""no" 1>&6
13733
13734     test "$with_database_gdbm" = "yes" -o \
13735          "$with_database_dbm"  = "yes" && \
13736       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13737     with_database_gdbm=no with_database_dbm=no
13738 fi
13739
13740 fi
13741
13742 if test "$with_database_gdbm" != "no"; then
13743   
13744 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13745 echo "configure:13746: checking for dbm_open in -lgdbm" >&5
13746 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13747
13748 xe_check_libs=" -lgdbm "
13749 cat > conftest.$ac_ext <<EOF
13750 #line 13751 "configure"
13751 #include "confdefs.h"
13752 /* Override any gcc2 internal prototype to avoid an error.  */
13753 /* We use char because int might match the return type of a gcc2
13754     builtin and then its argument prototype would still apply.  */
13755 char dbm_open();
13756
13757 int main() {
13758 dbm_open()
13759 ; return 0; }
13760 EOF
13761 if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13762   rm -rf conftest*
13763   eval "ac_cv_lib_$ac_lib_var=yes"
13764 else
13765   echo "configure: failed program was:" >&5
13766   cat conftest.$ac_ext >&5
13767   rm -rf conftest*
13768   eval "ac_cv_lib_$ac_lib_var=no"
13769 fi
13770 rm -f conftest*
13771 xe_check_libs=""
13772
13773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13774   echo "$ac_t""yes" 1>&6
13775   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13776 else
13777   echo "$ac_t""no" 1>&6
13778 if test "$with_database_gdbm" = "yes"; then
13779      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13780    fi
13781    with_database_gdbm=no
13782 fi
13783
13784
13785 fi
13786
13787 if test "$with_database_dbm" != "no"; then
13788   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13789 echo "configure:13790: checking for dbm_open" >&5
13790
13791 cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* System header to define __stub macros and hopefully few prototypes,
13795     which can conflict with char dbm_open(); below.  */
13796 #include <assert.h>
13797 /* Override any gcc2 internal prototype to avoid an error.  */
13798 /* We use char because int might match the return type of a gcc2
13799     builtin and then its argument prototype would still apply.  */
13800 char dbm_open();
13801
13802 int main() {
13803
13804 /* The GNU C library defines this for functions which it implements
13805     to always fail with ENOSYS.  Some functions are actually named
13806     something starting with __ and the normal name is an alias.  */
13807 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13808 choke me
13809 #else
13810 dbm_open();
13811 #endif
13812
13813 ; return 0; }
13814 EOF
13815 if { (eval echo configure:13816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13816   rm -rf conftest*
13817   eval "ac_cv_func_dbm_open=yes"
13818 else
13819   echo "configure: failed program was:" >&5
13820   cat conftest.$ac_ext >&5
13821   rm -rf conftest*
13822   eval "ac_cv_func_dbm_open=no"
13823 fi
13824 rm -f conftest*
13825
13826 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13827   echo "$ac_t""yes" 1>&6
13828   with_database_dbm=yes libdbm=
13829 else
13830   echo "$ac_t""no" 1>&6
13831
13832     
13833 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13834 echo "configure:13835: checking for dbm_open in -ldbm" >&5
13835 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13836
13837 xe_check_libs=" -ldbm "
13838 cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 /* Override any gcc2 internal prototype to avoid an error.  */
13842 /* We use char because int might match the return type of a gcc2
13843     builtin and then its argument prototype would still apply.  */
13844 char dbm_open();
13845
13846 int main() {
13847 dbm_open()
13848 ; return 0; }
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13851   rm -rf conftest*
13852   eval "ac_cv_lib_$ac_lib_var=yes"
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   eval "ac_cv_lib_$ac_lib_var=no"
13858 fi
13859 rm -f conftest*
13860 xe_check_libs=""
13861
13862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13863   echo "$ac_t""yes" 1>&6
13864   with_database_dbm=yes libdbm=-ldbm
13865 else
13866   echo "$ac_t""no" 1>&6
13867 test "$with_database_dbm" = "yes" && \
13868         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13869       with_database_dbm=no
13870 fi
13871
13872
13873 fi
13874
13875 fi
13876
13877 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13878 test "$with_database_gdbm" = "yes" -o \
13879      "$with_database_dbm"  = "yes" && \
13880   { test "$extra_verbose" = "yes" && cat << \EOF
13881     Defining HAVE_DBM
13882 EOF
13883 cat >> confdefs.h <<\EOF
13884 #define HAVE_DBM 1
13885 EOF
13886 }
13887
13888
13889 if test "$with_database_berkdb" != "no"; then
13890   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13891 echo "configure:13892: checking for Berkeley db.h" >&5
13892   for header in "db/db.h" "db.h"; do
13893     cat > conftest.$ac_ext <<EOF
13894 #line 13895 "configure"
13895 #include "confdefs.h"
13896
13897 #include <stdlib.h>
13898 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13899 #ifdef HAVE_INTTYPES_H
13900 #define __BIT_TYPES_DEFINED__
13901 #include <inttypes.h>
13902 typedef uint8_t  u_int8_t;
13903 typedef uint16_t u_int16_t;
13904 typedef uint32_t u_int32_t;
13905 #ifdef WE_DONT_NEED_QUADS
13906 typedef uint64_t u_int64_t;
13907 #endif
13908 #endif
13909 #endif
13910 #include <$header>
13911
13912 int main() {
13913
13914 ; return 0; }
13915 EOF
13916 if { (eval echo configure:13917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13917   rm -rf conftest*
13918   db_h_file="$header"; break
13919 else
13920   echo "configure: failed program was:" >&5
13921   cat conftest.$ac_ext >&5
13922 fi
13923 rm -f conftest*
13924   done
13925   if test -z "$db_h_file"
13926   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13927   else echo "$ac_t""$db_h_file" 1>&6
13928   fi
13929
13930   if test "$with_database_berkdb" != "no"; then
13931     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13932 echo "configure:13933: checking for Berkeley DB version" >&5
13933     cat > conftest.$ac_ext <<EOF
13934 #line 13935 "configure"
13935 #include "confdefs.h"
13936 #include <$db_h_file>
13937 #if DB_VERSION_MAJOR > 1
13938 yes
13939 #endif
13940
13941 EOF
13942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13943   egrep "yes" >/dev/null 2>&1; then
13944   rm -rf conftest*
13945   cat > conftest.$ac_ext <<EOF
13946 #line 13947 "configure"
13947 #include "confdefs.h"
13948 #include <$db_h_file>
13949 #if DB_VERSION_MAJOR > 2
13950 yes
13951 #endif
13952
13953 EOF
13954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13955   egrep "yes" >/dev/null 2>&1; then
13956   rm -rf conftest*
13957   echo "$ac_t""3" 1>&6; dbfunc=db_create
13958 else
13959   rm -rf conftest*
13960   
13961     echo "$ac_t""2" 1>&6; dbfunc=db_open
13962 fi
13963 rm -f conftest*
13964
13965 else
13966   rm -rf conftest*
13967   
13968     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13969 fi
13970 rm -f conftest*
13971
13972     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13973 echo "configure:13974: checking for $dbfunc" >&5
13974
13975 cat > conftest.$ac_ext <<EOF
13976 #line 13977 "configure"
13977 #include "confdefs.h"
13978 /* System header to define __stub macros and hopefully few prototypes,
13979     which can conflict with char $dbfunc(); below.  */
13980 #include <assert.h>
13981 /* Override any gcc2 internal prototype to avoid an error.  */
13982 /* We use char because int might match the return type of a gcc2
13983     builtin and then its argument prototype would still apply.  */
13984 char $dbfunc();
13985
13986 int main() {
13987
13988 /* The GNU C library defines this for functions which it implements
13989     to always fail with ENOSYS.  Some functions are actually named
13990     something starting with __ and the normal name is an alias.  */
13991 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13992 choke me
13993 #else
13994 $dbfunc();
13995 #endif
13996
13997 ; return 0; }
13998 EOF
13999 if { (eval echo configure:14000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14000   rm -rf conftest*
14001   eval "ac_cv_func_$dbfunc=yes"
14002 else
14003   echo "configure: failed program was:" >&5
14004   cat conftest.$ac_ext >&5
14005   rm -rf conftest*
14006   eval "ac_cv_func_$dbfunc=no"
14007 fi
14008 rm -f conftest*
14009
14010 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14011   echo "$ac_t""yes" 1>&6
14012   with_database_berkdb=yes need_libdb=no
14013 else
14014   echo "$ac_t""no" 1>&6
14015
14016     
14017 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14018 echo "configure:14019: checking for $dbfunc in -ldb" >&5
14019 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14020
14021 xe_check_libs=" -ldb "
14022 cat > conftest.$ac_ext <<EOF
14023 #line 14024 "configure"
14024 #include "confdefs.h"
14025 /* Override any gcc2 internal prototype to avoid an error.  */
14026 /* We use char because int might match the return type of a gcc2
14027     builtin and then its argument prototype would still apply.  */
14028 char $dbfunc();
14029
14030 int main() {
14031 $dbfunc()
14032 ; return 0; }
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14035   rm -rf conftest*
14036   eval "ac_cv_lib_$ac_lib_var=yes"
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -rf conftest*
14041   eval "ac_cv_lib_$ac_lib_var=no"
14042 fi
14043 rm -f conftest*
14044 xe_check_libs=""
14045
14046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14047   echo "$ac_t""yes" 1>&6
14048   with_database_berkdb=yes need_libdb=yes
14049 else
14050   echo "$ac_t""no" 1>&6
14051 fi
14052
14053
14054 fi
14055
14056   fi
14057
14058   if test "$with_database_berkdb" = "yes"; then
14059     { test "$extra_verbose" = "yes" && cat << EOF
14060     Defining DB_H_FILE = "$db_h_file"
14061 EOF
14062 cat >> confdefs.h <<EOF
14063 #define DB_H_FILE "$db_h_file"
14064 EOF
14065 }
14066
14067     { test "$extra_verbose" = "yes" && cat << \EOF
14068     Defining HAVE_BERKELEY_DB
14069 EOF
14070 cat >> confdefs.h <<\EOF
14071 #define HAVE_BERKELEY_DB 1
14072 EOF
14073 }
14074
14075     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14076   else with_database_berkdb=no
14077   fi
14078 fi
14079
14080 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14081      != "no no no"; then
14082   { test "$extra_verbose" = "yes" && cat << \EOF
14083     Defining HAVE_DATABASE
14084 EOF
14085 cat >> confdefs.h <<\EOF
14086 #define HAVE_DATABASE 1
14087 EOF
14088 }
14089
14090   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14091    echo "    xemacs will be linked with \"database.o\""
14092  fi
14093 fi
14094
14095 if test "$with_socks" = "yes"; then
14096   
14097 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14098 echo "configure:14099: checking for SOCKSinit in -lsocks" >&5
14099 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14100
14101 xe_check_libs=" -lsocks "
14102 cat > conftest.$ac_ext <<EOF
14103 #line 14104 "configure"
14104 #include "confdefs.h"
14105 /* Override any gcc2 internal prototype to avoid an error.  */
14106 /* We use char because int might match the return type of a gcc2
14107     builtin and then its argument prototype would still apply.  */
14108 char SOCKSinit();
14109
14110 int main() {
14111 SOCKSinit()
14112 ; return 0; }
14113 EOF
14114 if { (eval echo configure:14115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14115   rm -rf conftest*
14116   eval "ac_cv_lib_$ac_lib_var=yes"
14117 else
14118   echo "configure: failed program was:" >&5
14119   cat conftest.$ac_ext >&5
14120   rm -rf conftest*
14121   eval "ac_cv_lib_$ac_lib_var=no"
14122 fi
14123 rm -f conftest*
14124 xe_check_libs=""
14125
14126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14127   echo "$ac_t""yes" 1>&6
14128     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14129     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14130   { test "$extra_verbose" = "yes" && cat << EOF
14131     Defining $ac_tr_lib
14132 EOF
14133 cat >> confdefs.h <<EOF
14134 #define $ac_tr_lib 1
14135 EOF
14136 }
14137
14138   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14139
14140 else
14141   echo "$ac_t""no" 1>&6
14142 fi
14143
14144
14145   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14146     Defining HAVE_SOCKS
14147 EOF
14148 cat >> confdefs.h <<\EOF
14149 #define HAVE_SOCKS 1
14150 EOF
14151 }
14152
14153 fi
14154
14155 if test "$usage_tracking" = "yes"; then
14156   { test "$extra_verbose" = "yes" && cat << \EOF
14157     Defining USAGE_TRACKING
14158 EOF
14159 cat >> confdefs.h <<\EOF
14160 #define USAGE_TRACKING 1
14161 EOF
14162 }
14163
14164   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14165 fi
14166
14167 if test "$with_modules" != "no"; then
14168   echo "checking for module support" 1>&6
14169 echo "configure:14170: checking for module support" >&5
14170
14171     if test "$with_msw" = "yes"; then
14172     have_dl=yes;
14173   else
14174         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14175 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14176 echo "configure:14177: checking for dlfcn.h" >&5
14177
14178 cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 #include <dlfcn.h>
14182 EOF
14183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14184 { (eval echo configure:14185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14186 if test -z "$ac_err"; then
14187   rm -rf conftest*
14188   eval "ac_cv_header_$ac_safe=yes"
14189 else
14190   echo "$ac_err" >&5
14191   echo "configure: failed program was:" >&5
14192   cat conftest.$ac_ext >&5
14193   rm -rf conftest*
14194   eval "ac_cv_header_$ac_safe=no"
14195 fi
14196 rm -f conftest*
14197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14198   echo "$ac_t""yes" 1>&6
14199   
14200       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14201 echo "configure:14202: checking for dlopen in -lc" >&5
14202       cat > conftest.$ac_ext <<EOF
14203 #line 14204 "configure"
14204 #include "confdefs.h"
14205 #include <dlfcn.h>
14206 int main() {
14207         dlopen ("", 0);
14208 ; return 0; }
14209 EOF
14210 if { (eval echo configure:14211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14211   rm -rf conftest*
14212    have_dl=yes 
14213 else
14214   echo "configure: failed program was:" >&5
14215   cat conftest.$ac_ext >&5
14216   rm -rf conftest*
14217   
14218       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14219 echo "configure:14220: checking for dlopen in -ldl" >&5
14220       ac_save_LIBS="$LIBS"
14221       LIBS="-ldl $LIBS"
14222       cat > conftest.$ac_ext <<EOF
14223 #line 14224 "configure"
14224 #include "confdefs.h"
14225 #include <dlfcn.h>
14226 int main() {
14227         dlopen ("", 0);
14228 ; return 0; }
14229 EOF
14230 if { (eval echo configure:14231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14231   rm -rf conftest*
14232    have_dl=yes 
14233 else
14234   echo "configure: failed program was:" >&5
14235   cat conftest.$ac_ext >&5
14236   rm -rf conftest*
14237   LIBS="$ac_save_LIBS"
14238 fi
14239 rm -f conftest*
14240       ac_save_LIBS=
14241 fi
14242 rm -f conftest*
14243 else
14244   echo "$ac_t""no" 1>&6
14245 fi
14246
14247     if test -n "$have_dl"; then
14248       { test "$extra_verbose" = "yes" && cat << \EOF
14249     Defining HAVE_DLOPEN
14250 EOF
14251 cat >> confdefs.h <<\EOF
14252 #define HAVE_DLOPEN 1
14253 EOF
14254 }
14255
14256     else
14257       
14258 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14259 echo "configure:14260: checking for shl_load in -ldld" >&5
14260 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14261
14262 xe_check_libs=" -ldld "
14263 cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266 /* Override any gcc2 internal prototype to avoid an error.  */
14267 /* We use char because int might match the return type of a gcc2
14268     builtin and then its argument prototype would still apply.  */
14269 char shl_load();
14270
14271 int main() {
14272 shl_load()
14273 ; return 0; }
14274 EOF
14275 if { (eval echo configure:14276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14276   rm -rf conftest*
14277   eval "ac_cv_lib_$ac_lib_var=yes"
14278 else
14279   echo "configure: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   rm -rf conftest*
14282   eval "ac_cv_lib_$ac_lib_var=no"
14283 fi
14284 rm -f conftest*
14285 xe_check_libs=""
14286
14287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14288   echo "$ac_t""yes" 1>&6
14289   libdl=dld have_dl=yes;
14290         { test "$extra_verbose" = "yes" && cat << \EOF
14291     Defining HAVE_SHL_LOAD
14292 EOF
14293 cat >> confdefs.h <<\EOF
14294 #define HAVE_SHL_LOAD 1
14295 EOF
14296 }
14297
14298 else
14299   echo "$ac_t""no" 1>&6
14300
14301 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14302 echo "configure:14303: checking for dld_init in -ldld" >&5
14303 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14304
14305 xe_check_libs=" -ldld "
14306 cat > conftest.$ac_ext <<EOF
14307 #line 14308 "configure"
14308 #include "confdefs.h"
14309 /* Override any gcc2 internal prototype to avoid an error.  */
14310 /* We use char because int might match the return type of a gcc2
14311     builtin and then its argument prototype would still apply.  */
14312 char dld_init();
14313
14314 int main() {
14315 dld_init()
14316 ; return 0; }
14317 EOF
14318 if { (eval echo configure:14319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14319   rm -rf conftest*
14320   eval "ac_cv_lib_$ac_lib_var=yes"
14321 else
14322   echo "configure: failed program was:" >&5
14323   cat conftest.$ac_ext >&5
14324   rm -rf conftest*
14325   eval "ac_cv_lib_$ac_lib_var=no"
14326 fi
14327 rm -f conftest*
14328 xe_check_libs=""
14329
14330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14331   echo "$ac_t""yes" 1>&6
14332   libdl=dld have_dl=yes;
14333         { test "$extra_verbose" = "yes" && cat << \EOF
14334     Defining HAVE_DLD_INIT
14335 EOF
14336 cat >> confdefs.h <<\EOF
14337 #define HAVE_DLD_INIT 1
14338 EOF
14339 }
14340
14341 else
14342   echo "$ac_t""no" 1>&6
14343 fi
14344
14345
14346 fi
14347
14348
14349     fi
14350   fi 
14351   if test -n "$have_dl"; then
14352         
14353 dll_ld=
14354 dll_ldflags=
14355 dll_cflags=
14356 dll_post=
14357 dll_ldo="-o"
14358 ld_dynamic_link_flags=
14359 xehost=$canonical
14360 xealias=$internal_configuration
14361
14362 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14363 echo "configure:14364: checking how to build dynamic libraries for ${xehost}" >&5
14364 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14365 case "$xehost" in
14366 *-*-linux-gnu*) ;;
14367 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14368 esac
14369
14370 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14371 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14372 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14373
14374 case "$xehost_os" in
14375 aix3*)
14376   # AIX sometimes has problems with the GCC collect2 program.  For some
14377   # reason, if we set the COLLECT_NAMES environment variable, the problems
14378   # vanish in a puff of smoke.
14379   if test "${COLLECT_NAMES+set}" != set; then
14380     COLLECT_NAMES=
14381     export COLLECT_NAMES
14382   fi
14383   ;;
14384 esac
14385
14386 # Now see if the compiler is really GCC.
14387 if test "$GCC" = "yes"; then
14388   XEGCC=yes
14389 else
14390   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14391 echo "configure:14392: checking checking whether we are using GNU C" >&5
14392   cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395
14396 #ifdef __GNUC__
14397   yes;
14398 #endif
14399
14400 EOF
14401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14402   egrep "yes" >/dev/null 2>&1; then
14403   rm -rf conftest*
14404   XEGCC=yes
14405 else
14406   rm -rf conftest*
14407   XEGCC=no
14408 fi
14409 rm -f conftest*
14410
14411   echo "$ac_t""${XEGCC}" 1>&6
14412 fi
14413
14414 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14415 echo "configure:14416: checking how to produce PIC code" >&5
14416 wl=
14417
14418 can_build_shared=yes
14419 if test "$XEGCC" = yes; then
14420   wl='-Wl,'
14421
14422   case "$xehost_os" in
14423   aix[3-9]* | irix[5-9]* | osf[3-9])
14424     # PIC is the default for these OSes.
14425     ;;
14426
14427   os2*)
14428     # We can build DLLs from non-PIC.
14429     ;;
14430   amigaos*)
14431     # FIXME: we need at least 68020 code to build shared libraries, but
14432     # adding the `-m68020' flag to GCC prevents building anything better,
14433     # like `-m68040'.
14434     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14435     ;;
14436   *cygwin* | *mingw* )
14437     # PIC is the default
14438     ;;
14439   *)
14440     dll_cflags='-fPIC'
14441     ;;
14442   esac
14443 else
14444   # PORTME Check for PIC flags for the system compiler.
14445   case "$xehost_os" in
14446   hpux9* | hpux1[0-9]*)
14447     # Is there a better link_static_flag that works with the bundled CC?
14448     wl='-Wl,'
14449     dll_cflags='+Z'
14450     ;;
14451
14452   irix[5-9]*)
14453     wl='-Wl,'
14454     # PIC (with -KPIC) is the default.
14455     ;;
14456
14457   os2*)
14458     # We can build DLLs from non-PIC.
14459     ;;
14460
14461   osf[3-9]*)
14462     # All OSF/1 code is PIC.
14463     wl='-Wl,'
14464     ;;
14465
14466   aix[3-9]*)
14467     # All AIX code is PIC.
14468     wl='-Wl,'
14469     ;;
14470
14471   sco3.2v5*)
14472     dll_cflags='-belf -Kpic'
14473     wl='-Wl,'
14474     ;;
14475
14476   unixware*)
14477     dll_cflags="-KPIC"
14478     wl="-Wl,"
14479     ;;
14480
14481   sysv4*)
14482     dll_cflags="-KPIC"
14483     wl="-Wl,"
14484     ;;
14485
14486   sysv5*)
14487     dll_cflags="-KPIC"
14488     wl="-Wl,"
14489     ;;
14490
14491   solaris2*)
14492     dll_cflags='-KPIC'
14493     wl='-Wl,'
14494     ;;
14495
14496   sunos4*)
14497     dll_cflags='-PIC'
14498     wl='-Qoption ld '
14499     ;;
14500
14501   uts4*)
14502     dll_cflags='-pic'
14503     ;;
14504
14505   *)
14506     can_build_shared=no
14507     ;;
14508   esac
14509 fi
14510
14511 if test -n "$dll_cflags"; then
14512   echo "$ac_t""${dll_cflags}" 1>&6
14513
14514   # Check to make sure the dll_cflags actually works.
14515   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14516 echo "configure:14517: checking if PIC flag ${dll_cflags} really works" >&5
14517   save_CFLAGS="$CFLAGS"
14518   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14519   cat > conftest.$ac_ext <<EOF
14520 #line 14521 "configure"
14521 #include "confdefs.h"
14522
14523 int main() {
14524 int x=0;
14525 ; return 0; }
14526 EOF
14527 if { (eval echo configure:14528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14528   rm -rf conftest*
14529   
14530     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14531     # reports no error.  So, we need to grep stderr for (Bundled).
14532     if grep '(Bundled)' config.log >/dev/null; then
14533       echo "$ac_t""no" 1>&6
14534       can_build_shared=no
14535       dll_cflags=
14536     else
14537       echo "$ac_t""yes" 1>&6
14538     fi
14539 else
14540   echo "configure: failed program was:" >&5
14541   cat conftest.$ac_ext >&5
14542   rm -rf conftest*
14543   echo "$ac_t""no" 1>&6
14544     can_build_shared=no
14545     dll_cflags=
14546 fi
14547 rm -f conftest*
14548   CFLAGS="$save_CFLAGS"
14549 else
14550   echo "$ac_t""none" 1>&6
14551 fi
14552
14553 if test "$can_build_shared" = "yes"; then
14554 cc_produces_so=no
14555 xldf=
14556 xcldf=
14557 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14558 echo "configure:14559: checking if C compiler can produce shared libraries" >&5
14559 if test "$XEGCC" = yes; then
14560   xcldf="-shared"
14561   xldf="-shared"
14562 else # Not using GCC
14563   case "$xehost_os" in
14564     aix[3-9]*)
14565       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14566       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14567       ;;
14568
14569     freebsd2* | netbsd* | openbsd*)
14570       xldf="-Bshareable"
14571       xcldf="${wl}-Bshareable"
14572       ;;
14573
14574     freebsd3*)
14575       xcldf="-shared"
14576       ;;
14577
14578     hpux*)
14579       xldf="-b +s"
14580       xcldf="${wl}-b ${wl}+s"
14581       ;;
14582
14583     irix[5-9]* | osf[3-9]*)
14584       xcldf="${wl}-shared"
14585       xldf="-shared"
14586       ;;
14587
14588     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14589       xcldf="-G"
14590       xldf="-G"
14591       ;;
14592
14593     sunos4*)
14594       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14595       xldf="-assert pure-text -Bstatic"
14596       ;;
14597   esac
14598 fi # End if if we are using gcc
14599
14600 if test -n "$xcldf"; then
14601   save_LDFLAGS=$LDFLAGS
14602   save_LIBS=$LIBS
14603   save_xe_libs=$xe_libs
14604   LDFLAGS="$xcldf $LDFLAGS"
14605   LIBS=
14606   xe_libs=
14607   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14608   cat > conftest.$ac_ext <<EOF
14609 #line 14610 "configure"
14610 #include "confdefs.h"
14611
14612 int main() {
14613 int x=0;
14614 ; return 0; }
14615 EOF
14616 if { (eval echo configure:14617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14617   rm -rf conftest*
14618   cc_produces_so=yes
14619 else
14620   echo "configure: failed program was:" >&5
14621   cat conftest.$ac_ext >&5
14622   rm -rf conftest*
14623   cc_produces_so=no
14624 fi
14625 rm -f conftest*
14626   LDFLAGS=$save_LDFLAGS
14627   LIBS=$save_LIBS
14628   xe_libs=$save_xe_libs
14629   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14630 else
14631   cc_produces_so=no
14632 fi
14633 echo "$ac_t""${cc_produces_so}" 1>&6
14634
14635 LTLD=$LD
14636 if test -z "$LTLD"; then
14637   ac_prog=ld
14638   if test "$XEGCC" = yes; then
14639     # Check if gcc -print-prog-name=ld gives a path.
14640     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14641 echo "configure:14642: checking for ld used by GCC" >&5
14642     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14643     case "$ac_prog" in
14644     # Accept absolute paths.
14645     /*)
14646       if test -z "$LTLD"; then
14647 #        case "$ac_prog" in
14648 #          *gcc-lib*) LTLD="$CC"
14649 #                     ;;
14650 #          *)
14651          LTLD="$ac_prog"
14652 #                     ;;
14653 #        esac
14654       fi
14655       ;;
14656     "")
14657       # If it fails, then pretend we aren't using GCC.
14658       ac_prog=ld
14659       ;;
14660     *)
14661       # If it is relative, then search for the first ld in PATH.
14662       with_gnu_ld=unknown
14663       ;;
14664     esac
14665   else
14666     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14667 echo "configure:14668: checking for GNU ld" >&5
14668   fi
14669
14670   if test -z "$LTLD"; then
14671     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14672     for ac_dir in $PATH; do
14673       test -z "$ac_dir" && ac_dir=.
14674       if test -f "$ac_dir/$ac_prog"; then
14675         LTLD="$ac_dir/$ac_prog"
14676         # Check to see if the program is GNU ld.  I'd rather use --version,
14677         # but apparently some GNU ld's only accept -v.
14678         # Break only if it was the GNU/non-GNU ld that we prefer.
14679         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14680           xe_gnu_ld=yes
14681         else
14682           xe_gnu_ld=no
14683         fi
14684       fi
14685     done
14686     IFS="$ac_save_ifs"
14687   fi
14688
14689   if test -n "$LTLD"; then
14690     echo "$ac_t""${LTLD}" 1>&6
14691   else
14692     echo "$ac_t""no" 1>&6
14693   fi
14694
14695   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14696     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14697     exit 1
14698   fi
14699 fi
14700
14701 ld_dynamic_link_flags=
14702
14703 # Check to see if it really is or isn't GNU ld.
14704 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14705 echo "configure:14706: checking if the linker is GNU ld" >&5
14706 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14707 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14708   xe_gnu_ld=yes
14709 else
14710   xe_gnu_ld=no
14711 fi
14712 echo "$ac_t""${xe_gnu_ld}" 1>&6
14713
14714 case "$xehost_os" in
14715   amigaos* | sunos4*)
14716     # On these operating systems, we should treat GNU ld like the system ld.
14717     gnu_ld_acts_native=yes
14718     ;;
14719   *)
14720     gnu_ld_acts_native=no
14721     ;;
14722 esac
14723
14724 if test "$cc_produces_so" = "yes"; then
14725   dll_ld=$CC
14726   dll_ldflags=$xcldf
14727   can_build_shared=yes
14728   ld_shlibs=yes
14729 else
14730   # OK - only NOW do we futz about with ld.
14731   # See if the linker supports building shared libraries.
14732   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14733 echo "configure:14734: checking whether the linker supports shared libraries" >&5
14734   dll_ld=$CC
14735   dll_ldflags=$LDFLAGS
14736   ld_shlibs=yes
14737   can_build_shared=yes
14738   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14739     # See if GNU ld supports shared libraries.
14740     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14741       dll_ld=$CC
14742       dll_ldflags="-shared"
14743       ld_shlibs=yes
14744     else
14745       ld_shlibs=no
14746     fi
14747   else
14748     # PORTME fill in a description of your system's linker (not GNU ld)
14749     case "$xehost_os" in
14750     aix3*)
14751       dll_ld=$LTLD
14752       dll_ldflags=$xldf
14753       ;;
14754
14755     aix[4-9]*)
14756       dll_ldflags=$xcldf
14757       ;;
14758
14759     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14760     # support.  Future versions do this automatically, but an explicit c++rt0.o
14761     # doesn't break anything, and helps significantly (at the cost of a little
14762     # extra space).
14763     freebsd2.2*)
14764       dll_ld=$LTLD
14765       dll_ldflags=$xldf
14766       dll_post="/usr/lib/c++rt0.o"
14767       ;;
14768
14769     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14770     freebsd2*)
14771       dll_ld=$LTLD
14772       dll_ldflags="-Bshareable"
14773       ;;
14774
14775     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14776     freebsd3*)
14777       dll_ldflags="-shared"
14778       ;;
14779
14780     hpux*)
14781       dll_ld=$LTLD
14782       dll_ldflags=$xldf
14783       ;;
14784
14785     irix[5-9]*)
14786       dll_ld=$LTLD
14787       dll_ldflags=$xldf
14788       ;;
14789
14790     netbsd*)
14791       # Tested with NetBSD 1.2 ld
14792       dll_ld=$LTLD
14793       dll_ldflags=$xldf
14794       ;;
14795
14796     openbsd*)
14797       dll_ld=$LTLD
14798       dll_ldflags=$xldf
14799       ;;
14800
14801     osf3* | osf4*)
14802       dll_ld=$LTLD
14803       dll_ldflags=$xldf
14804       ;;
14805
14806     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14807     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14808       dll_ld=$LTLD
14809       case "$dll_ld" in
14810         *gcc*) dll_ldflags="-shared"
14811                dll_ld=$CC
14812                ;;
14813         *)     dll_ldflags="-G"
14814                ;;
14815       esac
14816       ;;
14817
14818     sunos4*)
14819       if test "$XEGCC" = yes; then
14820         dll_ld=$CC
14821       else
14822         dll_ld=$LTLD
14823       fi
14824       dll_ldflags=$xldf
14825       ;;
14826
14827     uts4*)
14828       dll_ld=$LTLD
14829       dll_ldflags="-G"
14830       ;;
14831
14832     bsdi*)
14833       dll_ldflags="-r"
14834       dll_ld="shlicc2"
14835       ;;
14836
14837     *)
14838       ld_shlibs=no
14839       can_build_shared=no
14840       ;;
14841     esac
14842   fi
14843   echo "$ac_t""${ld_shlibs}" 1>&6
14844   if test "$ld_shlibs" = "no"; then
14845     can_build_shared=no
14846   fi
14847 fi # End of if cc_produces_so = no
14848
14849
14850 if test "$xe_gnu_ld" = yes; then
14851   if test "$ld_shlibs" = yes; then
14852     ld_dynamic_link_flags="${wl}-export-dynamic"
14853   fi
14854 fi
14855
14856 if test -z "$ld_dynamic_link_flags"; then
14857   case "$xehost_os" in
14858   aix[3-9]*)
14859     ld_dynamic_link_flags=
14860     ;;
14861
14862   freebsd2.2*)
14863     ld_dynamic_link_flags=
14864     ;;
14865
14866   freebsd2*)
14867     ld_dynamic_link_flags=
14868     ;;
14869
14870   freebsd3*)
14871     ld_dynamic_link_flags=
14872     ;;
14873
14874   hpux*)
14875     ld_dynamic_link_flags="${wl}-E"
14876     ;;
14877
14878   irix[5-9]*)
14879     ld_dynamic_link_flags=
14880     ;;
14881
14882   netbsd*)
14883     ld_dynamic_link_flags=
14884     ;;
14885
14886   openbsd*)
14887     ld_dynamic_link_flags=
14888     ;;
14889
14890   osf3* | osf4*)
14891     ld_dynamic_link_flags=
14892     ;;
14893
14894   solaris2* | solaris7*)
14895     ld_dynamic_link_flags=
14896     ;;
14897
14898   sco3.2v5* | unixware* | sysv5* | sysv4*)
14899     ld_dynamic_link_flags="${wl}-Bexport"
14900     ;;
14901
14902   sunos4*)
14903     ld_dynamic_link_flags=
14904     ;;
14905
14906   uts4*)
14907     ld_dynamic_link_flags=
14908     ;;
14909
14910   bsdi*)
14911     ld_dynamic_link_flags=
14912     ;;
14913
14914   esac
14915 fi # End of if -z ld_dynamic_link_flags
14916 fi # End of if test "$can_build_shared" = "yes"
14917
14918
14919
14920
14921
14922
14923
14924
14925   fi
14926
14927   if test "$can_build_shared" = "yes"; then
14928     { test "$extra_verbose" = "yes" && cat << \EOF
14929     Defining HAVE_SHLIB
14930 EOF
14931 cat >> confdefs.h <<\EOF
14932 #define HAVE_SHLIB 1
14933 EOF
14934 }
14935
14936     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14937    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14938  fi
14939     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14940     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14941     for ac_func in dlerror _dlerror
14942 do
14943 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14944 echo "configure:14945: checking for $ac_func" >&5
14945
14946 cat > conftest.$ac_ext <<EOF
14947 #line 14948 "configure"
14948 #include "confdefs.h"
14949 /* System header to define __stub macros and hopefully few prototypes,
14950     which can conflict with char $ac_func(); below.  */
14951 #include <assert.h>
14952 /* Override any gcc2 internal prototype to avoid an error.  */
14953 /* We use char because int might match the return type of a gcc2
14954     builtin and then its argument prototype would still apply.  */
14955 char $ac_func();
14956
14957 int main() {
14958
14959 /* The GNU C library defines this for functions which it implements
14960     to always fail with ENOSYS.  Some functions are actually named
14961     something starting with __ and the normal name is an alias.  */
14962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14963 choke me
14964 #else
14965 $ac_func();
14966 #endif
14967
14968 ; return 0; }
14969 EOF
14970 if { (eval echo configure:14971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14971   rm -rf conftest*
14972   eval "ac_cv_func_$ac_func=yes"
14973 else
14974   echo "configure: failed program was:" >&5
14975   cat conftest.$ac_ext >&5
14976   rm -rf conftest*
14977   eval "ac_cv_func_$ac_func=no"
14978 fi
14979 rm -f conftest*
14980
14981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14982   echo "$ac_t""yes" 1>&6
14983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14984   { test "$extra_verbose" = "yes" && cat << EOF
14985     Defining $ac_tr_func
14986 EOF
14987 cat >> confdefs.h <<EOF
14988 #define $ac_tr_func 1
14989 EOF
14990 }
14991  
14992 else
14993   echo "$ac_t""no" 1>&6
14994 fi
14995 done
14996
14997     with_modules=yes
14998   else
14999     if test "$with_modules" = "yes"; then
15000       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15001     else
15002       echo "configure: warning: "Module support cannot be provided."" 1>&2
15003     fi
15004     with_modules=no
15005   fi
15006 fi
15007
15008 cat > conftest.$ac_ext <<EOF
15009 #line 15010 "configure"
15010 #include "confdefs.h"
15011 int main(int c,char *v[]){return 0;}
15012 EOF
15013 if { (eval echo configure:15014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15014 then
15015   :
15016 else
15017   conftest_rc="$?"
15018   echo "configure: failed program was:" >&5
15019   cat conftest.$ac_ext >&5
15020   rm -fr conftest*
15021   
15022   echo ""
15023   echo "*** PANIC *** The C compiler can no longer build working executables."
15024   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15025   echo "*** PANIC *** The most likely reason for this problem is that configure"
15026   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15027   echo "*** PANIC *** found at run time."
15028   echo "*** PANIC ***"
15029   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15030   echo "*** PANIC *** On other systems, try telling configure where to find the"
15031   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15032   echo "*** PANIC ***"
15033   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15034   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15035   echo "*** PANIC *** on your system.  Don't do that."
15036   exit 1
15037 fi
15038 rm -fr conftest*
15039
15040 if test "$win32_processes" = "yes"; then
15041   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15042    echo "    xemacs will be linked with \"process-nt.o\""
15043  fi
15044 else
15045   { test "$extra_verbose" = "yes" && cat << \EOF
15046     Defining HAVE_UNIX_PROCESSES
15047 EOF
15048 cat >> confdefs.h <<\EOF
15049 #define HAVE_UNIX_PROCESSES 1
15050 EOF
15051 }
15052
15053   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15054    echo "    xemacs will be linked with \"process-unix.o\""
15055  fi
15056 fi
15057
15058
15059
15060 T=""
15061 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15062 CFLAGS="$T"
15063
15064
15065 T=""
15066 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15067 extra_objs="$T"
15068
15069
15070 T=""
15071 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
15072 c_switch_general="$T"
15073
15074
15075 T=""
15076 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
15077 c_switch_window_system="$T"
15078
15079
15080 T=""
15081 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15082 c_switch_all="$T"
15083
15084
15085 T=""
15086 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
15087 ld_switch_general="$T"
15088
15089
15090 T=""
15091 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15092 ld_switch_window_system="$T"
15093
15094
15095 T=""
15096 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15097 ld_switch_all="$T"
15098
15099
15100 T=""
15101 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15102 ld_libs_general="$T"
15103
15104
15105 T=""
15106 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
15107 ld_libs_window_system="$T"
15108
15109
15110 T=""
15111 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15112 ld_libs_all="$T"
15113
15114
15115
15116 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15117 internal_makefile_list="Makefile.in"
15118 SUBDIR_MAKEFILES=''
15119 test -d lock || mkdir lock
15120 for dir in $MAKE_SUBDIR; do
15121   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15122         test -d "$d" || mkdir "$d"; cd "$d"
15123       done ) ;;
15124    * ) test -d "$dir" || mkdir "$dir" ;;
15125   esac
15126   
15127 T=""
15128 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15129 SUBDIR_MAKEFILES="$T"
15130
15131   
15132 T=""
15133 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15134 internal_makefile_list="$T"
15135
15136 done
15137
15138
15139
15140
15141 for dir in src/s src/m; do
15142   if test ! -d "$dir" ; then
15143     echo Making symbolic link to "$srcdir/$dir"
15144     ${LN_S} "$srcdir/$dir" "$dir"
15145   fi
15146 done
15147
15148 if test "$extra_verbose" = "yes"; then
15149   echo ""
15150   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
15151   echo ""
15152 fi
15153
15154
15155 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15156   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15157   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15158 fi
15159
15160 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15161   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15162   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15163 fi
15164
15165 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15166   test "$extra_verbose" = "yes" && echo "creating TAGS"
15167   echo "\f
15168 $srcdir/TAGS,include" > "TAGS"
15169 fi
15170
15171 if test "$__SUNPRO_C" = "yes"; then
15172   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15173   ( echo "# For use with Sun WorkShop's Source browser."
15174     echo "# See sbquery(1) and sbinit(4) for more information"
15175     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15176   ) > .sbinit
15177 fi
15178
15179 rm -f core
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200 PREFIX=$prefix
15201 while true; do
15202   case "$PREFIX" in
15203     *\$* ) eval "PREFIX=$PREFIX" ;;
15204     *) break ;;
15205   esac
15206 done
15207
15208
15209
15210
15211 EXEC_PREFIX=$exec_prefix
15212 while true; do
15213   case "$EXEC_PREFIX" in
15214     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15215     *) break ;;
15216   esac
15217 done
15218
15219
15220
15221
15222 INFODIR=$infodir
15223 while true; do
15224   case "$INFODIR" in
15225     *\$* ) eval "INFODIR=$INFODIR" ;;
15226     *) break ;;
15227   esac
15228 done
15229
15230
15231
15232
15233 INFOPATH=$infopath
15234 while true; do
15235   case "$INFOPATH" in
15236     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15237     *) break ;;
15238   esac
15239 done
15240
15241
15242
15243
15244 PACKAGE_PATH=$package_path
15245 while true; do
15246   case "$PACKAGE_PATH" in
15247     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15248     *) break ;;
15249   esac
15250 done
15251
15252
15253
15254
15255 LISPDIR=$lispdir
15256 while true; do
15257   case "$LISPDIR" in
15258     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15259     *) break ;;
15260   esac
15261 done
15262
15263
15264
15265
15266 MODULEDIR=$moduledir
15267 while true; do
15268   case "$MODULEDIR" in
15269     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15270     *) break ;;
15271   esac
15272 done
15273
15274
15275
15276
15277 SITELISPDIR=$sitelispdir
15278 while true; do
15279   case "$SITELISPDIR" in
15280     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15281     *) break ;;
15282   esac
15283 done
15284
15285
15286
15287
15288 SITEMODULEDIR=$sitemoduledir
15289 while true; do
15290   case "$SITEMODULEDIR" in
15291     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15292     *) break ;;
15293   esac
15294 done
15295
15296
15297
15298
15299 ETCDIR=$etcdir
15300 while true; do
15301   case "$ETCDIR" in
15302     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15303     *) break ;;
15304   esac
15305 done
15306
15307
15308
15309
15310 DOCDIR=$docdir
15311 while true; do
15312   case "$DOCDIR" in
15313     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15314     *) break ;;
15315   esac
15316 done
15317
15318
15319
15320
15321 ARCHLIBDIR=$archlibdir
15322 while true; do
15323   case "$ARCHLIBDIR" in
15324     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15325     *) break ;;
15326   esac
15327 done
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15349
15350
15351
15352
15353
15354
15355
15356 : ${XEMACS_CC:=$CC}
15357
15358
15359 if test "$with_prefix" = "yes"; then
15360   { test "$extra_verbose" = "yes" && cat << \EOF
15361     Defining PREFIX_USER_DEFINED
15362 EOF
15363 cat >> confdefs.h <<\EOF
15364 #define PREFIX_USER_DEFINED 1
15365 EOF
15366 }
15367
15368 fi
15369
15370 if test "$with_site_lisp" = "no"; then
15371   { test "$extra_verbose" = "yes" && cat << \EOF
15372     Defining INHIBIT_SITE_LISP
15373 EOF
15374 cat >> confdefs.h <<\EOF
15375 #define INHIBIT_SITE_LISP 1
15376 EOF
15377 }
15378
15379 fi
15380 if test "$with_site_modules" = "no"; then
15381   { test "$extra_verbose" = "yes" && cat << \EOF
15382     Defining INHIBIT_SITE_MODULES
15383 EOF
15384 cat >> confdefs.h <<\EOF
15385 #define INHIBIT_SITE_MODULES 1
15386 EOF
15387 }
15388
15389 fi
15390
15391
15392 T=""
15393 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15394 ac_configure_args="$T"
15395
15396 { test "$extra_verbose" = "yes" && cat << EOF
15397     Defining EMACS_CONFIGURATION = "$configuration"
15398 EOF
15399 cat >> confdefs.h <<EOF
15400 #define EMACS_CONFIGURATION "$configuration"
15401 EOF
15402 }
15403
15404 { test "$extra_verbose" = "yes" && cat << EOF
15405     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15406 EOF
15407 cat >> confdefs.h <<EOF
15408 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15409 EOF
15410 }
15411
15412
15413
15414 null_string=""
15415 { test "$extra_verbose" = "yes" && cat << EOF
15416     Defining LD_SWITCH_X_SITE = $null_string
15417 EOF
15418 cat >> confdefs.h <<EOF
15419 #define LD_SWITCH_X_SITE $null_string
15420 EOF
15421 }
15422
15423 { test "$extra_verbose" = "yes" && cat << EOF
15424     Defining LD_SWITCH_X_SITE_AUX = $null_string
15425 EOF
15426 cat >> confdefs.h <<EOF
15427 #define LD_SWITCH_X_SITE_AUX $null_string
15428 EOF
15429 }
15430
15431 { test "$extra_verbose" = "yes" && cat << EOF
15432     Defining C_SWITCH_X_SITE = $null_string
15433 EOF
15434 cat >> confdefs.h <<EOF
15435 #define C_SWITCH_X_SITE $null_string
15436 EOF
15437 }
15438
15439 { test "$extra_verbose" = "yes" && cat << EOF
15440     Defining LD_SWITCH_SITE = $null_string
15441 EOF
15442 cat >> confdefs.h <<EOF
15443 #define LD_SWITCH_SITE $null_string
15444 EOF
15445 }
15446
15447 { test "$extra_verbose" = "yes" && cat << EOF
15448     Defining C_SWITCH_SITE = $null_string
15449 EOF
15450 cat >> confdefs.h <<EOF
15451 #define C_SWITCH_SITE $null_string
15452 EOF
15453 }
15454
15455
15456
15457 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15458     Defining GNU_MALLOC
15459 EOF
15460 cat >> confdefs.h <<\EOF
15461 #define GNU_MALLOC 1
15462 EOF
15463 }
15464
15465 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15466     Defining USE_SYSTEM_MALLOC
15467 EOF
15468 cat >> confdefs.h <<\EOF
15469 #define USE_SYSTEM_MALLOC 1
15470 EOF
15471 }
15472
15473 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15474     Defining USE_DEBUG_MALLOC
15475 EOF
15476 cat >> confdefs.h <<\EOF
15477 #define USE_DEBUG_MALLOC 1
15478 EOF
15479 }
15480
15481                                               { test "$extra_verbose" = "yes" && cat << \EOF
15482     Defining USE_SYSTEM_MALLOC
15483 EOF
15484 cat >> confdefs.h <<\EOF
15485 #define USE_SYSTEM_MALLOC 1
15486 EOF
15487 }
15488
15489 fi
15490 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15491     Defining I18N3
15492 EOF
15493 cat >> confdefs.h <<\EOF
15494 #define I18N3 1
15495 EOF
15496 }
15497
15498 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15499     Defining USE_GCC
15500 EOF
15501 cat >> confdefs.h <<\EOF
15502 #define USE_GCC 1
15503 EOF
15504 }
15505
15506 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15507     Defining EXTERNAL_WIDGET
15508 EOF
15509 cat >> confdefs.h <<\EOF
15510 #define EXTERNAL_WIDGET 1
15511 EOF
15512 }
15513
15514 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15515     Defining QUICK_BUILD
15516 EOF
15517 cat >> confdefs.h <<\EOF
15518 #define QUICK_BUILD 1
15519 EOF
15520 }
15521
15522 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15523     Defining PURIFY
15524 EOF
15525 cat >> confdefs.h <<\EOF
15526 #define PURIFY 1
15527 EOF
15528 }
15529
15530 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15531     Defining QUANTIFY
15532 EOF
15533 cat >> confdefs.h <<\EOF
15534 #define QUANTIFY 1
15535 EOF
15536 }
15537
15538 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15539     Defining MAIL_USE_POP
15540 EOF
15541 cat >> confdefs.h <<\EOF
15542 #define MAIL_USE_POP 1
15543 EOF
15544 }
15545
15546 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15547     Defining KERBEROS
15548 EOF
15549 cat >> confdefs.h <<\EOF
15550 #define KERBEROS 1
15551 EOF
15552 }
15553
15554 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15555     Defining HESIOD
15556 EOF
15557 cat >> confdefs.h <<\EOF
15558 #define HESIOD 1
15559 EOF
15560 }
15561
15562 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15563     Defining USE_UNION_TYPE
15564 EOF
15565 cat >> confdefs.h <<\EOF
15566 #define USE_UNION_TYPE 1
15567 EOF
15568 }
15569
15570 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15571     Defining PDUMP
15572 EOF
15573 cat >> confdefs.h <<\EOF
15574 #define PDUMP 1
15575 EOF
15576 }
15577
15578 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15579     Defining IPV6_CANONICALIZE
15580 EOF
15581 cat >> confdefs.h <<\EOF
15582 #define IPV6_CANONICALIZE 1
15583 EOF
15584 }
15585
15586
15587
15588 (
15589 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15590 else
15591   echo "uname -a: `uname -a`"
15592 fi
15593 echo ""
15594 echo "$0 $quoted_arguments"
15595 ) > Installation
15596
15597 if test ! -z ${emacs_beta_version} ; then
15598   if test -z "${emacs_is_beta}" ; then
15599         xemacs_betaname=".${emacs_beta_version}"
15600   else
15601         xemacs_betaname="-b${emacs_beta_version}"
15602   fi
15603 else
15604   xemacs_betaname=""
15605 fi
15606
15607 (
15608 echo "
15609
15610 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15611 "
15612 echo "
15613 Compilation / Installation:"
15614 echo "  Source code location:              $srcdir"
15615 echo "  Installation prefix:               $prefix"
15616 if test -n "$site_includes"; then
15617   echo "  Additional header files:           $site_includes"
15618 fi
15619 if test -n "$site_libraries"; then
15620   echo "  Additional libraries:              $site_libraries"
15621 fi
15622 if test -n "$site_prefixes"; then
15623   echo "  Additional prefixes:               $site_prefixes"
15624 fi
15625 if test -n "$runpath"; then
15626   echo "  Runtime library search path:       $runpath"
15627 fi
15628
15629 if test -n "$opsysfile"
15630 then echo "  Operating system description file: \`$opsysfile'"
15631 else echo "  Not using any operating system description file"
15632 fi
15633 if test -n "$machfile"
15634 then echo "  Machine description file:          \`$machfile'"
15635 else echo "  Not using any machine description file"
15636 fi
15637
15638 echo "  Compiler:                          $CC $CFLAGS"
15639 echo "  Relocating allocator for buffers:  $rel_alloc"
15640 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15641
15642 echo "
15643 Window System:"
15644 if test "$with_msw" = "yes"; then
15645   echo "  Compiling in support for the Microsoft window system."
15646 fi
15647 if test "$with_x11" = "yes"; then
15648   echo "  Compiling in support for the X window system:"
15649   echo "    - X Windows headers location:                 $x_includes"
15650   echo "    - X Windows libraries location:               $x_libraries"
15651   if test "$with_xauth" != yes; then
15652     echo "    - Xau (X authority) not available."
15653   fi
15654   if test "$with_xmu" != yes; then
15655     echo "    - Xmu library not available; substituting equivalent routines."
15656   fi
15657   if test "$with_wmcommand" != no; then
15658     echo "    - Handling WM_COMMAND properly."
15659   fi
15660 fi
15661 if test "$need_athena" = "yes"; then
15662   echo "  Compiling in support for the Athena widget set:"
15663   echo "    - Athena headers location:                    $athena_h_path"
15664   echo "    - Athena library to link:                     $athena_lib"
15665 fi
15666 case "$with_menubars" in
15667   gtk   ) echo "  Using GTK menubars."   ;;
15668   lucid ) echo "  Using Lucid menubars." ;;
15669   motif ) echo "  Using Motif menubars."
15670           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15671           echo "             We recommend using the Lucid menubar instead."
15672           echo "             Re-run configure with --with-menubars='lucid'." ;;
15673     msw ) echo "  Using MS-Windows menubars." ;;
15674 esac
15675 case "$with_scrollbars" in
15676   gtk    ) echo "  Using GTK scrollbars."        ;;
15677   lucid  ) echo "  Using Lucid scrollbars."      ;;
15678   motif  ) echo "  Using Motif scrollbars."      ;;
15679   athena ) echo "  Using Athena scrollbars."     ;;
15680      msw ) echo "  Using MS-Windows scrollbars." ;;
15681 esac
15682 case "$with_dialogs" in
15683   gtk    ) echo "  Using GTK dialog boxes." ;;
15684   motif  ) echo "  Using Motif dialog boxes."
15685            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15686              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15687              echo "             We recommend using the Athena dialog boxes instead."
15688              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15689              echo "             Read the PROBLEMS file for more information."
15690            fi; fi ;;
15691   athena ) echo "  Using Athena dialog boxes."     ;;
15692      msw ) echo "  Using MS-Windows dialog boxes." ;;
15693 esac
15694 case "$with_widgets" in
15695   gtk    ) echo "  Using GTK native widgets."        ;;
15696   motif  ) echo "  Using Motif native widgets."      ;;
15697   athena ) echo "  Using Athena native widgets."     ;;
15698      msw ) echo "  Using MS-Windows native widgets." ;;
15699 esac
15700 if test "$with_dragndrop" = yes; then
15701   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15702   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15703 fi
15704
15705 echo "
15706 TTY:"
15707 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15708 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15709
15710 echo "
15711 Images:"
15712 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15713 if test "$with_xpm" = yes; then
15714   echo "  Compiling in support for XPM  images."
15715 elif test "$with_x11" = yes; then
15716   echo "  WARNING: -----------------------------------------------------------"
15717   echo "  WARNING: Compiling without XPM image support."
15718   if test "$xpm_problem" != ""; then
15719     echo "  Reason: $xpm_problem"
15720   fi
15721   echo "  WARNING: You should strongly consider installing XPM."
15722   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15723   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15724   echo "  WARNING: -----------------------------------------------------------"
15725 fi
15726 if test "$with_png" = yes; then
15727   echo "  Compiling in support for PNG  images."
15728 elif test "$window_system" != "none"; then
15729   echo "  WARNING: -----------------------------------------------------------"
15730   echo "  WARNING: Compiling without PNG image support."
15731   if test "$png_problem" != ""; then
15732     echo "  Reason: $png_problem"
15733   fi
15734   echo "  WARNING: You should strongly consider installing the PNG libraries."
15735   echo "  WARNING: Otherwise certain images and glyphs may not display."
15736   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15737   echo "  WARNING: -----------------------------------------------------------"
15738 fi
15739 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15740 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15741 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15742
15743 echo "
15744 Sound:"
15745 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15746 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15747 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15748 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15749
15750 echo "
15751 Databases:"
15752 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15753 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15754 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15755 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15756 if test "$with_postgresql" = yes; then
15757   echo "  Compiling in support for PostgreSQL."
15758   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15759   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15760 fi
15761
15762 echo "
15763 Internationalization:"
15764 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15765 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15766 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15767 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15768 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15769 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15770 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15771 if test "$with_wnn" = yes; then
15772   echo "  Compiling in support for the WNN input method on Mule."
15773   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15774 fi
15775 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15776
15777 echo "
15778 Mail:"
15779 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15780 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15781 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15782 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15783
15784 echo "
15785 Other Features:"
15786 test "with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15787 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15788 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15789 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15790 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15791 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15792 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15793 test "$pdump" = yes && echo "  Using the new portable dumper."
15794 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15795 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15796 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15797   != "no no no no no no"; then
15798   echo "  WARNING: ---------------------------------------------------------"
15799   echo "  WARNING: Compiling in support for runtime error checking."
15800   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15801   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15802   echo "  WARNING: ---------------------------------------------------------"
15803 fi
15804 echo ""
15805 ) | tee -a Installation
15806 echo ""
15807
15808
15809 # Remove any trailing slashes in these variables.
15810 test -n "$prefix" &&
15811   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15812 test -n "$exec_prefix" &&
15813   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15814
15815
15816 for file in $internal_makefile_list; do
15817   test "$file" = src/Makefile.in && \
15818     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15819   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15820 done
15821 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15822 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
15823
15824 trap '' 1 2 15
15825
15826 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15827
15828 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15829 # Let make expand exec_prefix.
15830 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15831
15832 # Any assignment to VPATH causes Sun make to only execute
15833 # the first set of double-colon rules, so remove it if not needed.
15834 # If there is a colon in the path, we need to keep it.
15835 if test "x$srcdir" = x.; then
15836   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15837 fi
15838
15839 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15840
15841 DEFS=-DHAVE_CONFIG_H
15842
15843 # Without the "./", some shells look in PATH for config.status.
15844 : ${CONFIG_STATUS=./config.status}
15845
15846 echo creating $CONFIG_STATUS
15847 rm -f $CONFIG_STATUS
15848 cat > $CONFIG_STATUS <<EOF
15849 #! /bin/sh
15850 # Generated automatically by configure.
15851 # Run this file to recreate the current configuration.
15852 # This directory was configured as follows,
15853 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15854 #
15855 # $0 $ac_configure_args
15856 #
15857 # Compiler output produced by configure, useful for debugging
15858 # configure, is in ./config.log if it exists.
15859
15860 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15861 for ac_option
15862 do
15863   case "\$ac_option" in
15864   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15865     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15866     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15867   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15868     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15869     exit 0 ;;
15870   -help | --help | --hel | --he | --h)
15871     echo "\$ac_cs_usage"; exit 0 ;;
15872   *) echo "\$ac_cs_usage"; exit 1 ;;
15873   esac
15874 done
15875
15876 ac_given_srcdir=$srcdir
15877 ac_given_INSTALL="$INSTALL"
15878
15879 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15880 EOF
15881 cat >> $CONFIG_STATUS <<EOF
15882
15883 # Protect against being on the right side of a sed subst in config.status.
15884 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15885  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15886 $ac_vpsub
15887 $extrasub
15888 s%@SHELL@%$SHELL%g
15889 s%@CFLAGS@%$CFLAGS%g
15890 s%@CPPFLAGS@%$CPPFLAGS%g
15891 s%@CXXFLAGS@%$CXXFLAGS%g
15892 s%@FFLAGS@%$FFLAGS%g
15893 s%@DEFS@%$DEFS%g
15894 s%@LDFLAGS@%$LDFLAGS%g
15895 s%@LIBS@%$LIBS%g
15896 s%@exec_prefix@%$exec_prefix%g
15897 s%@prefix@%$prefix%g
15898 s%@program_transform_name@%$program_transform_name%g
15899 s%@bindir@%$bindir%g
15900 s%@sbindir@%$sbindir%g
15901 s%@libexecdir@%$libexecdir%g
15902 s%@datadir@%$datadir%g
15903 s%@sysconfdir@%$sysconfdir%g
15904 s%@sharedstatedir@%$sharedstatedir%g
15905 s%@localstatedir@%$localstatedir%g
15906 s%@libdir@%$libdir%g
15907 s%@includedir@%$includedir%g
15908 s%@oldincludedir@%$oldincludedir%g
15909 s%@infodir@%$infodir%g
15910 s%@mandir@%$mandir%g
15911 s%@LN_S@%$LN_S%g
15912 s%@blddir@%$blddir%g
15913 s%@CC@%$CC%g
15914 s%@CPP@%$CPP%g
15915 s%@start_flags@%$start_flags%g
15916 s%@ld_switch_shared@%$ld_switch_shared%g
15917 s%@start_files@%$start_files%g
15918 s%@ld@%$ld%g
15919 s%@lib_gcc@%$lib_gcc%g
15920 s%@RANLIB@%$RANLIB%g
15921 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15922 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15923 s%@INSTALL_DATA@%$INSTALL_DATA%g
15924 s%@YACC@%$YACC%g
15925 s%@SET_MAKE@%$SET_MAKE%g
15926 s%@GTK_CONFIG@%$GTK_CONFIG%g
15927 s%@X_CFLAGS@%$X_CFLAGS%g
15928 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15929 s%@X_LIBS@%$X_LIBS%g
15930 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15931 s%@install_pp@%$install_pp%g
15932 s%@libs_xauth@%$libs_xauth%g
15933 s%@dnd_objs@%$dnd_objs%g
15934 s%@lwlib_objs@%$lwlib_objs%g
15935 s%@ALLOCA@%$ALLOCA%g
15936 s%@have_esd_config@%$have_esd_config%g
15937 s%@dll_ld@%$dll_ld%g
15938 s%@dll_cflags@%$dll_cflags%g
15939 s%@dll_ldflags@%$dll_ldflags%g
15940 s%@dll_post@%$dll_post%g
15941 s%@dll_ldo@%$dll_ldo%g
15942 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15943 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15944 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15945 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15946 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15947 s%@PROGNAME@%$PROGNAME%g
15948 s%@version@%$version%g
15949 s%@configuration@%$configuration%g
15950 s%@canonical@%$canonical%g
15951 s%@inststaticdir@%$inststaticdir%g
15952 s%@instvardir@%$instvardir%g
15953 s%@srcdir@%$srcdir%g
15954 s%@pkgdir@%$pkgdir%g
15955 s%@statedir@%$statedir%g
15956 s%@extra_includes@%$extra_includes%g
15957 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15958 s%@PREFIX@%$PREFIX%g
15959 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15960 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15961 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15962 s%@INFODIR@%$INFODIR%g
15963 s%@infopath@%$infopath%g
15964 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15965 s%@INFOPATH@%$INFOPATH%g
15966 s%@package_path@%$package_path%g
15967 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15968 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15969 s%@lispdir@%$lispdir%g
15970 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15971 s%@LISPDIR@%$LISPDIR%g
15972 s%@moduledir@%$moduledir%g
15973 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15974 s%@MODULEDIR@%$MODULEDIR%g
15975 s%@sitelispdir@%$sitelispdir%g
15976 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15977 s%@SITELISPDIR@%$SITELISPDIR%g
15978 s%@sitemoduledir@%$sitemoduledir%g
15979 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15980 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15981 s%@etcdir@%$etcdir%g
15982 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15983 s%@ETCDIR@%$ETCDIR%g
15984 s%@docdir@%$docdir%g
15985 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15986 s%@DOCDIR@%$DOCDIR%g
15987 s%@archlibdir@%$archlibdir%g
15988 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15989 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15990 s%@bitmapdir@%$bitmapdir%g
15991 s%@extra_objs@%$extra_objs%g
15992 s%@machfile@%$machfile%g
15993 s%@opsysfile@%$opsysfile%g
15994 s%@c_switch_general@%$c_switch_general%g
15995 s%@c_switch_window_system@%$c_switch_window_system%g
15996 s%@c_switch_all@%$c_switch_all%g
15997 s%@ld_switch_general@%$ld_switch_general%g
15998 s%@ld_switch_window_system@%$ld_switch_window_system%g
15999 s%@ld_switch_all@%$ld_switch_all%g
16000 s%@ld_libs_general@%$ld_libs_general%g
16001 s%@ld_libs_window_system@%$ld_libs_window_system%g
16002 s%@ld_libs_all@%$ld_libs_all%g
16003 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16004 s%@native_sound_lib@%$native_sound_lib%g
16005 s%@sound_cflags@%$sound_cflags%g
16006 s%@dynodump_arch@%$dynodump_arch%g
16007 s%@XEMACS_CC@%$XEMACS_CC%g
16008 s%@internal_makefile_list@%$internal_makefile_list%g
16009
16010 CEOF
16011 EOF
16012
16013 cat >> $CONFIG_STATUS <<\EOF
16014
16015 # Split the substitutions into bite-sized pieces for seds with
16016 # small command number limits, like on Digital OSF/1 and HP-UX.
16017 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16018 ac_file=1 # Number of current file.
16019 ac_beg=1 # First line for current file.
16020 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16021 ac_more_lines=:
16022 ac_sed_cmds=""
16023 while $ac_more_lines; do
16024   if test $ac_beg -gt 1; then
16025     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16026   else
16027     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16028   fi
16029   if test ! -s conftest.s$ac_file; then
16030     ac_more_lines=false
16031     rm -f conftest.s$ac_file
16032   else
16033     if test -z "$ac_sed_cmds"; then
16034       ac_sed_cmds="sed -f conftest.s$ac_file"
16035     else
16036       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16037     fi
16038     ac_file=`expr $ac_file + 1`
16039     ac_beg=$ac_end
16040     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16041   fi
16042 done
16043 if test -z "$ac_sed_cmds"; then
16044   ac_sed_cmds=cat
16045 fi
16046 EOF
16047
16048 cat >> $CONFIG_STATUS <<EOF
16049
16050 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16051 EOF
16052 cat >> $CONFIG_STATUS <<\EOF
16053 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16054   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16055   case "$ac_file" in
16056   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16057        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16058   *) ac_file_in="${ac_file}.in" ;;
16059   esac
16060
16061   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16062
16063   # Remove last slash and all that follows it.  Not all systems have dirname.
16064   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16065   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16066     # The file is in a subdirectory.
16067     test ! -d "$ac_dir" && mkdir "$ac_dir"
16068     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16069     # A "../" for each directory in $ac_dir_suffix.
16070     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16071   else
16072     ac_dir_suffix= ac_dots=
16073   fi
16074
16075   case "$ac_given_srcdir" in
16076   .)  srcdir=.
16077       if test -z "$ac_dots"; then top_srcdir=.
16078       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16079   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16080   *) # Relative path.
16081     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16082     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16083   esac
16084
16085   case "$ac_given_INSTALL" in
16086   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16087   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16088   esac
16089
16090   echo creating "$ac_file"
16091   rm -f "$ac_file"
16092   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16093   case "$ac_file" in
16094   *Makefile*) ac_comsub="1i\\
16095 # $configure_input" ;;
16096   *) ac_comsub= ;;
16097   esac
16098
16099   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16100   sed -e "$ac_comsub
16101 s%@configure_input@%$configure_input%g
16102 s%@srcdir@%$srcdir%g
16103 s%@top_srcdir@%$top_srcdir%g
16104 s%@INSTALL@%$INSTALL%g
16105 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16106 fi; done
16107 rm -f conftest.s*
16108
16109 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16110 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16111 #
16112 # ac_d sets the value in "#define NAME VALUE" lines.
16113 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16114 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16115 ac_dC='\3'
16116 ac_dD='%g'
16117 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16118 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16119 ac_uB='\([      ]\)%\1#\2define\3'
16120 ac_uC=' '
16121 ac_uD='\4%g'
16122 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16123 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16124 ac_eB='$%\1#\2define\3'
16125 ac_eC=' '
16126 ac_eD='%g'
16127
16128 if test "${CONFIG_HEADERS+set}" != set; then
16129 EOF
16130 cat >> $CONFIG_STATUS <<EOF
16131   CONFIG_HEADERS="src/config.h lwlib/config.h"
16132 EOF
16133 cat >> $CONFIG_STATUS <<\EOF
16134 fi
16135 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16136   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16137   case "$ac_file" in
16138   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16139        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16140   *) ac_file_in="${ac_file}.in" ;;
16141   esac
16142
16143   echo creating $ac_file
16144
16145   rm -f conftest.frag conftest.in conftest.out
16146   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16147   cat $ac_file_inputs > conftest.in
16148
16149 EOF
16150
16151 # Transform confdefs.h into a sed script conftest.vals that substitutes
16152 # the proper values into config.h.in to produce config.h.  And first:
16153 # Protect against being on the right side of a sed subst in config.status.
16154 # Protect against being in an unquoted here document in config.status.
16155 rm -f conftest.vals
16156 cat > conftest.hdr <<\EOF
16157 s/[\\&%]/\\&/g
16158 s%[\\$`]%\\&%g
16159 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16160 s%ac_d%ac_u%gp
16161 s%ac_u%ac_e%gp
16162 EOF
16163 sed -n -f conftest.hdr confdefs.h > conftest.vals
16164 rm -f conftest.hdr
16165
16166 # This sed command replaces #undef with comments.  This is necessary, for
16167 # example, in the case of _POSIX_SOURCE, which is predefined and required
16168 # on some systems where configure will not decide to define it.
16169 cat >> conftest.vals <<\EOF
16170 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16171 EOF
16172
16173 # Break up conftest.vals because some shells have a limit on
16174 # the size of here documents, and old seds have small limits too.
16175
16176 rm -f conftest.tail
16177 while :
16178 do
16179   ac_lines=`grep -c . conftest.vals`
16180   # grep -c gives empty output for an empty file on some AIX systems.
16181   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16182   # Write a limited-size here document to conftest.frag.
16183   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16184   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16185   echo 'CEOF
16186   sed -f conftest.frag conftest.in > conftest.out
16187   rm -f conftest.in
16188   mv conftest.out conftest.in
16189 ' >> $CONFIG_STATUS
16190   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16191   rm -f conftest.vals
16192   mv conftest.tail conftest.vals
16193 done
16194 rm -f conftest.vals
16195
16196 cat >> $CONFIG_STATUS <<\EOF
16197   rm -f conftest.frag conftest.h
16198   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16199   cat conftest.in >> conftest.h
16200   rm -f conftest.in
16201   if cmp -s $ac_file conftest.h 2>/dev/null; then
16202     echo "$ac_file is unchanged"
16203     rm -f conftest.h
16204   else
16205     # Remove last slash and all that follows it.  Not all systems have dirname.
16206       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16207       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16208       # The file is in a subdirectory.
16209       test ! -d "$ac_dir" && mkdir "$ac_dir"
16210     fi
16211     rm -f $ac_file
16212     mv conftest.h $ac_file
16213   fi
16214 fi; done
16215
16216 EOF
16217 cat >> $CONFIG_STATUS <<EOF
16218 CPP="$CPP"
16219  top_srcdir="$srcdir"
16220  MAKE_SUBDIR="$MAKE_SUBDIR"
16221
16222 EOF
16223 cat >> $CONFIG_STATUS <<\EOF
16224 for dir in . $MAKE_SUBDIR; do
16225   (
16226     cd $dir
16227     rm -f junk.c
16228     < Makefile.in \
16229       sed -e '/^# Generated/d' \
16230           -e 's%/\*\*/#.*%%' \
16231           -e 's/^ *# */#/' \
16232           -e '/^##/d' \
16233           -e '/^#/ {
16234 p
16235 d
16236 }'        \
16237           -e '/./ {
16238 s/\([\"]\)/\\\1/g
16239 s/^/"/
16240 s/$/"/
16241 }'  > junk.c;
16242
16243
16244
16245     echo creating $dir/Makefile
16246 $CPP -I. -I${top_srcdir}/src  junk.c \
16247   | sed -e 's/^\#.*//'          \
16248         -e 's/^[        ][      ]*$//'\
16249         -e 's/^ /       /'              \
16250         -e '/^[ \f]*$/d' \
16251         -e '/^\"/ {
16252         s/\\\([\"]\)/\1/g
16253         s/^[    ]*\"//
16254         s/\"[   ]*$//
16255 }' > Makefile.new
16256     chmod 444 Makefile.new
16257     mv -f Makefile.new Makefile
16258
16259     echo creating $dir/GNUmakefile
16260 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16261   | sed -e 's/^\#.*//'          \
16262         -e 's/^[        ][      ]*$//'\
16263         -e 's/^ /       /'              \
16264         -e '/^[ \f]*$/d' \
16265         -e '/^\"/ {
16266         s/\\\([\"]\)/\1/g
16267         s/^[    ]*\"//
16268         s/\"[   ]*$//
16269 }' > Makefile.new
16270     chmod 444 Makefile.new
16271     mv -f Makefile.new GNUmakefile
16272
16273     rm -f junk.c
16274   )
16275 done
16276
16277 sed < config.status >> lib-src/config.values \
16278   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16279   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16280   -e 's/^\([^ ]*\) $/\1 ""/' \
16281   -e 's/ 1$/ t/'
16282
16283
16284 exit 0
16285 EOF
16286 chmod +x $CONFIG_STATUS
16287 rm -fr confdefs* $ac_clean_files
16288 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1