XEmacs 21.4.13 "Rational FORTRAN".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump=''
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_file_coding| \
343         with_canna      | \
344         with_wnn        | \
345         with_wnn6       | \
346         with_workshop   | \
347         with_sparcworks | \
348         with_tooltalk   | \
349         with_ldap       | \
350         with_postgresql | \
351         with_pop        | \
352         with_kerberos   | \
353         with_hesiod     | \
354         with_dnet       | \
355         with_infodock   | \
356         with_netinstall | \
357         with_ipv6_cname | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         quick_build )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 Option \`all' or \`none' must be first in the list.
474 The default is to autodetect native and NAS sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               glyphs )     error_check_glyphs=yes ;;
555               noglyphs )   error_check_glyphs=no ;;
556
557               * ) bogus_error_check=yes ;;
558             esac
559             if test "$bogus_error_check" -o \
560                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
561                 if test "$error_check_default" = yes ; then
562                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
563                 else
564                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
565                 fi
566                 (echo "$progname: Usage error:"
567 echo " " "Valid types for the \`--$optname' option are:
568   $types."
569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
570             elif test -n "$new_default" ; then
571                 error_check_extents=$new_default
572                 error_check_typecheck=$new_default
573                 error_check_bufpos=$new_default
574                 error_check_gc=$new_default
575                 error_check_malloc=$new_default
576                 error_check_byte_code=$new_default
577                 error_check_glyphs=$new_default
578                 new_default=    # reset this
579             fi
580             echeck_notfirst=true
581           done
582         ;;
583
584                                 
585                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
586         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
587         archlibdir | docdir | package_path | moduledir )
588                    if test "$valomitted" = "yes"; then
589              if test "$#" = 0; then
590                  (echo "$progname: Usage error:"
591 echo " " "The \`--$optname' option requires a value."
592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
593              fi
594              val="$1"; shift
595            fi
596            eval "$opt=\"$val\""
597
598                            case "$opt" in
599                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining EXEC_PREFIX_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define EXEC_PREFIX_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining LISPDIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define LISPDIR_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining SITELISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define SITELISPDIR_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630  ;;
631              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining INFODIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define INFODIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining INFOPATH_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define INFOPATH_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining PACKAGE_PATH_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define PACKAGE_PATH_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              datadir )
664                 { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining INFODIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define INFODIR_USER_DEFINED 1
669 EOF
670 }
671
672                 { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining LISPDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define LISPDIR_USER_DEFINED 1
677 EOF
678 }
679
680                 { test "$extra_verbose" = "yes" && cat << \EOF
681     Defining MODULEDIR_USER_DEFINED
682 EOF
683 cat >> confdefs.h <<\EOF
684 #define MODULEDIR_USER_DEFINED 1
685 EOF
686 }
687
688                 { test "$extra_verbose" = "yes" && cat << \EOF
689     Defining ETCDIR_USER_DEFINED
690 EOF
691 cat >> confdefs.h <<\EOF
692 #define ETCDIR_USER_DEFINED 1
693 EOF
694 }
695
696                 { test "$extra_verbose" = "yes" && cat << \EOF
697     Defining DOCDIR_USER_DEFINED
698 EOF
699 cat >> confdefs.h <<\EOF
700 #define DOCDIR_USER_DEFINED 1
701 EOF
702 }
703
704                 { test "$extra_verbose" = "yes" && cat << \EOF
705     Defining ARCHLIBDIR_USER_DEFINED
706 EOF
707 cat >> confdefs.h <<\EOF
708 #define ARCHLIBDIR_USER_DEFINED 1
709 EOF
710 }
711  ;;
712              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
713     Defining DOCDIR_USER_DEFINED
714 EOF
715 cat >> confdefs.h <<\EOF
716 #define DOCDIR_USER_DEFINED 1
717 EOF
718 }
719  ;;
720              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
721     Defining ARCHLIBDIR_USER_DEFINED
722 EOF
723 cat >> confdefs.h <<\EOF
724 #define ARCHLIBDIR_USER_DEFINED 1
725 EOF
726 }
727  ;;
728            esac
729         ;;
730
731                 "no_create" ) ;;
732
733                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
734
735                 "with_menubars"   | \
736         "with_scrollbars" | \
737         "with_dialogs"    | \
738         "with_widgets" )
739           case "$val" in
740             l | lu | luc | luci | lucid )               val=lucid  ;;
741             mo | mot | moti | motif )                   val=motif  ;;
742             a | at | ath | athe | athen | athena )      val=athena ;;
743             n | no | non | none )                       val=no     ;;
744             y | ye | yes )                              val=yes    ;;
745                         "")                                             val=yes    ;;
746             g | gt | gtk )                              val=gtk    ;;
747             ms | msw )                                  val=msw    ;;
748             * ) (echo "$progname: Usage error:"
749 echo " " "The \`--$optname' option must have one of these values:
750   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752           esac
753           eval "$opt=\"$val\""
754         ;;
755
756                 "use_minimal_tagbits" | \
757         "use_indexed_lrecord_implementation" | \
758         "run_in_place"  | \
759         "const_is_losing" | \
760         "with_gnu_make" )
761           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
762         ;;
763
764                 * ) (echo "$progname: Usage error:"
765 echo " " "Unrecognized option: $arg"
766 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
767
768       esac
769     ;;
770
771         *-*-*) configuration="$arg" ;;
772
773         *) (echo "$progname: Usage error:"
774 echo " " "Unrecognized argument: $arg"
775 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
776
777   esac
778 done
779
780
781 test -n "$cpp"      && CPP="$cpp"
782 test -n "$cppflags" && CPPFLAGS="$cppflags"
783 test -n "$libs"     && LIBS="$libs"
784 test -n "$ldflags"  && LDFLAGS="$ldflags"
785
786 eval set x "$quoted_arguments"; shift
787
788 test "$extra_verbose" = "yes" && verbose=yes
789
790 test -n "$with_x" && with_x11="$with_x"
791
792 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
793   test "$with_system_malloc" = "default" && with_system_malloc=yes
794 fi
795
796
797
798 if test "$with_cde $with_tooltalk" = "yes no"; then
799   (echo "$progname: Usage error:"
800 echo " " "--with-cde requires --with-tooltalk"
801 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
802 elif test "$with_tooltalk" = "no" ; then with_cde=no
803 elif test "$with_cde" = "yes"; then with_tooltalk=yes
804 fi
805
806
807 case "$srcdir" in
808
809     "" )
810     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
811       if test -f "$dir/src/lisp.h" -a \
812               -f "$dir/lisp/version.el" ; then
813         srcdir="$dir"
814         break
815       fi
816     done
817     if test -z "$srcdir" ; then
818       (echo "$progname: Usage error:"
819 echo " " "Neither the current directory nor its parent seem to
820   contain the XEmacs sources.  If you do not want to build XEmacs in its
821   source tree, you should run \`$progname' in the directory in which
822   you wish to build XEmacs, using the \`--srcdir' option to say where the
823   sources may be found."
824 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
825     fi
826   ;;
827
828     * )
829     if test ! -f "$srcdir/src/lisp.h" -o \
830             ! -f "$srcdir/lisp/version.el" ; then
831       (echo "$progname: Usage error:"
832 echo " " "The directory specified with the \`--srcdir' option,
833   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
834   either run the \`$progname' script at the top of the XEmacs source
835   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837     fi
838   ;;
839 esac
840
841 if test -z "$configuration"; then
842     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
843   if test -z "$configuration"; then
844     (echo "$progname: Usage error:"
845 echo " " "XEmacs has not been ported to this host type.
846 Try explicitly specifying the CONFIGURATION when rerunning configure."
847 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
848   fi
849 fi
850
851 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
852 echo "configure:853: checking whether ln -s works" >&5
853
854 rm -f conftestdata
855 if ln -s X conftestdata 2>/dev/null
856 then
857   rm -f conftestdata
858   ac_cv_prog_LN_S="ln -s"
859 else
860   ac_cv_prog_LN_S=ln
861 fi
862 LN_S="$ac_cv_prog_LN_S"
863 if test "$ac_cv_prog_LN_S" = "ln -s"; then
864   echo "$ac_t""yes" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869
870 for dir in lisp etc man info tests; do
871   if test ! -d "$dir" ; then
872     echo Making symbolic link to "$srcdir/$dir"
873     ${LN_S} "$srcdir/$dir" "$dir"
874   fi
875 done
876
877
878 absolute_pwd="`pwd`";
879 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
880 then blddir="$PWD"
881 else blddir="$absolute_pwd"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   blddir=`echo "$blddir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi
886 fi
887
888
889 case "$srcdir" in
890   /* ) ;;
891   .  ) srcdir="$blddir" ;;
892   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
893   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
894   srcdir=`echo "$srcdir" | \
895    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
896 fi ;;
897 esac
898
899 if test `pwd` != `sh -c cd $srcdir && pwd`  \
900    && test -f "$srcdir/src/config.h"; then
901   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
902    echo "   as a build directory right now; it has been configured in its own"
903    echo "   right.  To configure in another directory as well, you MUST"
904    echo "   use GNU make.  If you do not have GNU make, then you must"
905    echo "   now do \`make distclean' in $srcdir,"
906    echo "   and then run $progname again.") >&2
907   extrasub='/^VPATH[     ]*=/c\
908 vpath %.c $(srcdir)\
909 vpath %.h $(srcdir)\
910 vpath %.y $(srcdir)\
911 vpath %.l $(srcdir)\
912 vpath %.s $(srcdir)\
913 vpath %.in $(srcdir)'
914 fi
915
916 . "$srcdir/version.sh" || exit 1;
917 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
918 : "${extra_verbose=$beta}"
919 version="${emacs_major_version}.${emacs_minor_version}"
920 { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_MAJOR_VERSION = $emacs_major_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_MAJOR_VERSION $emacs_major_version
925 EOF
926 }
927
928 { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_MINOR_VERSION = $emacs_minor_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_MINOR_VERSION $emacs_minor_version
933 EOF
934 }
935
936 if test -n "$emacs_beta_version" ; then
937   if test "$beta" = "yes"; then
938         version="${version}-b${emacs_beta_version}"
939         { test "$extra_verbose" = "yes" && cat << EOF
940     Defining EMACS_BETA_VERSION = $emacs_beta_version
941 EOF
942 cat >> confdefs.h <<EOF
943 #define EMACS_BETA_VERSION $emacs_beta_version
944 EOF
945 }
946
947   else
948         version="${version}.${emacs_beta_version}"
949         { test "$extra_verbose" = "yes" && cat << EOF
950     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
951 EOF
952 cat >> confdefs.h <<EOF
953 #define EMACS_PATCH_LEVEL $emacs_beta_version
954 EOF
955 }
956
957   fi
958 fi
959 { test "$extra_verbose" = "yes" && cat << EOF
960     Defining XEMACS_CODENAME = "$xemacs_codename"
961 EOF
962 cat >> confdefs.h <<EOF
963 #define XEMACS_CODENAME "$xemacs_codename"
964 EOF
965 }
966
967 { test "$extra_verbose" = "yes" && cat << EOF
968     Defining EMACS_VERSION = "$version"
969 EOF
970 cat >> confdefs.h <<EOF
971 #define EMACS_VERSION "$version"
972 EOF
973 }
974
975
976 if test "$with_infodock" = "yes"; then
977   if test ! -f ../../ID-INSTALL; then
978     echo "Cannot build InfoDock without InfoDock sources"
979     with_infodock=no
980   fi
981 fi
982
983 if test "$with_infodock" = "yes"; then
984       { test "$extra_verbose" = "yes" && cat << EOF
985     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
986 EOF
987 cat >> confdefs.h <<EOF
988 #define INFODOCK_MAJOR_VERSION $infodock_major_version
989 EOF
990 }
991
992   { test "$extra_verbose" = "yes" && cat << EOF
993     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
994 EOF
995 cat >> confdefs.h <<EOF
996 #define INFODOCK_MINOR_VERSION $infodock_minor_version
997 EOF
998 }
999
1000   { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define INFODOCK_BUILD_VERSION $infodock_build_version
1005 EOF
1006 }
1007
1008   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1009   PROGNAME=infodock
1010   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1011 else
1012   PROGNAME=xemacs
1013 fi
1014
1015 { test "$extra_verbose" = "yes" && cat << EOF
1016     Defining EMACS_PROGNAME = "$PROGNAME"
1017 EOF
1018 cat >> confdefs.h <<EOF
1019 #define EMACS_PROGNAME "$PROGNAME"
1020 EOF
1021 }
1022
1023
1024 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1025 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_EXTENTS
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_EXTENTS 1
1030 EOF
1031 }
1032
1033 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1034     Defining ERROR_CHECK_TYPECHECK
1035 EOF
1036 cat >> confdefs.h <<\EOF
1037 #define ERROR_CHECK_TYPECHECK 1
1038 EOF
1039 }
1040
1041 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1042     Defining ERROR_CHECK_BUFPOS
1043 EOF
1044 cat >> confdefs.h <<\EOF
1045 #define ERROR_CHECK_BUFPOS 1
1046 EOF
1047 }
1048
1049 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1050     Defining ERROR_CHECK_GC
1051 EOF
1052 cat >> confdefs.h <<\EOF
1053 #define ERROR_CHECK_GC 1
1054 EOF
1055 }
1056
1057 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1058     Defining ERROR_CHECK_MALLOC
1059 EOF
1060 cat >> confdefs.h <<\EOF
1061 #define ERROR_CHECK_MALLOC 1
1062 EOF
1063 }
1064
1065 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1066     Defining ERROR_CHECK_BYTE_CODE
1067 EOF
1068 cat >> confdefs.h <<\EOF
1069 #define ERROR_CHECK_BYTE_CODE 1
1070 EOF
1071 }
1072
1073 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1074     Defining ERROR_CHECK_GLYPHS
1075 EOF
1076 cat >> confdefs.h <<\EOF
1077 #define ERROR_CHECK_GLYPHS 1
1078 EOF
1079 }
1080
1081 if test "${debug:=$beta}" = "yes"; then
1082   use_assertions=yes memory_usage_stats=yes
1083   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1084    echo "    xemacs will be linked with \"debug.o\""
1085  fi
1086   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"tests.o\""
1088  fi
1089   { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining DEBUG_XEMACS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define DEBUG_XEMACS 1
1094 EOF
1095 }
1096
1097 fi
1098 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1099     Defining USE_ASSERTIONS
1100 EOF
1101 cat >> confdefs.h <<\EOF
1102 #define USE_ASSERTIONS 1
1103 EOF
1104 }
1105
1106 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1107     Defining MEMORY_USAGE_STATS
1108 EOF
1109 cat >> confdefs.h <<\EOF
1110 #define MEMORY_USAGE_STATS 1
1111 EOF
1112 }
1113
1114
1115
1116 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1117 echo "configure:1118: checking "host system type"" >&5
1118 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1119 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1120 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 echo "$ac_t""$configuration" 1>&6
1123
1124
1125
1126
1127
1128 machine='' opsys=''
1129
1130 case "$canonical" in
1131   sparc-*-*        ) machine=sparc ;;
1132   alpha*-*-*       ) machine=alpha ;;
1133   vax-*-*          ) machine=vax ;;
1134   mips-dec-*       ) machine=pmax ;;
1135   mips-sgi-irix6*  ) machine=iris6d ;;
1136   mips-sgi-*       ) machine=iris4d ;;
1137   mips*-linux      ) machine=mips ;;
1138   romp-ibm-*       ) machine=ibmrt ;;
1139   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1140   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1141   powerpc*-*       ) machine=powerpc ;;
1142   hppa-*-*         ) machine=hp800 ;;
1143   m88k-dg-*        ) machine=aviion ;;
1144   m68*-sony-*      ) machine=news ;;
1145   mips-sony-*      ) machine=news-risc ;;
1146   clipper-*        ) machine=clipper ;;
1147   arm*             ) machine=arm ;;
1148   ns32k-*          ) machine=ns32000 ;;
1149 esac
1150
1151 case "$canonical" in
1152   *-*-linux*    ) opsys=linux ;;
1153   *-*-netbsd*   ) opsys=netbsd ;;
1154   *-*-openbsd*  ) opsys=openbsd ;;
1155   *-*-nextstep* ) opsys=nextstep ;;
1156   *-*-vms       ) opsys=vms ;;
1157
1158     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1159   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1160   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1161   *-dec-osf3*                ) opsys=decosf3-1 ;;
1162   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1163
1164     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1165   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1166   *-*-ultrix* )         opsys=ultrix4-3 ;;
1167
1168     *-*-aix3.1*     ) opsys=aix3-1   ;;
1169   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1170   *-*-aix3*       ) opsys=aix3-2   ;;
1171   *-*-aix4.0*     ) opsys=aix4     ;;
1172   *-*-aix4.1*     ) opsys=aix4-1   ;;
1173   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1174
1175     *-gnu* )                    opsys=gnu    ;;
1176   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1177   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1178   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1179   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1180   *-*-aos*   )                  opsys=bsd4-3 ;;
1181   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1182   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1183   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1184   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1185   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1186   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1187         if test -z "$NON_GNU_CPP" ; then
1188           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1189             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1190           done
1191         fi
1192         opsys=usg5-4-2 ;;
1193     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1194     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1195 esac
1196
1197 case "$canonical" in
1198
1199     *-*-netbsd* )
1200     case "$canonical" in
1201       i[3-9]86-*-netbsd*) machine=intel386 ;;
1202       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1203                                             machine=hp9000s300 ;;
1204       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1205       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1206     esac
1207   ;;
1208
1209     *-*-openbsd* )
1210     case "${canonical}" in
1211       i386-*-openbsd*)          machine=intel386 ;;
1212       m68k-*-openbsd*)          machine=hp9000s300 ;;
1213       mipsel-*-openbsd*)        machine=pmax ;;
1214      esac
1215    ;;
1216
1217     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1218   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1219
1220     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1221   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1222
1223     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1224
1225     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1226
1227     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1228
1229     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1230
1231     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1232
1233     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1234   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1235   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1236
1237   
1238     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1239
1240     *-convex-bsd* | *-convex-convexos* )
1241     machine=convex opsys=bsd4-3
1242     NON_GNU_CPP="cc -E -P"
1243   ;;
1244
1245     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1246
1247     *-*-darwin*)
1248     opsys=darwin
1249     RANLIB="ranlib -c"     ;;
1250
1251     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1252   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1253   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1254   m88k-dg-dgux*                           ) opsys=dgux     ;;
1255
1256     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1257   m88k-motorola-sysv4* )
1258                     machine=delta88k opsys=usg5-4-2
1259   ;;
1260   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1261
1262     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1263   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1264
1265     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1266
1267     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1268   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1269   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1270
1271       m88k-harris-cxux* )
1272         case "`uname -r`" in
1273        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1274        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1275     esac
1276     NON_GNU_CPP="/lib/cpp"
1277   ;;
1278     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1279     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1280
1281     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1282
1283     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1284
1285     *-hp-hpux* )
1286         case "$canonical" in
1287       m68*  ) machine=hp9000s300 ;;
1288       hppa* ) machine=hp800      ;;
1289     esac
1290
1291     case "$canonical" in
1292       *-hp-hpux7*  )  opsys=hpux   ;;
1293       *-hp-hpux8*  )  opsys=hpux8  ;;
1294       *-hp-hpux9*  )  opsys=hpux9  ;;
1295       *-hp-hpux10* )  opsys=hpux10 ;;
1296       *-hp-hpux11* )  opsys=hpux11 ;;
1297       *            )  opsys=hpux   ;;
1298     esac
1299
1300         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1301    echo "    xemacs will be linked with \"strcat.o\""
1302  fi ;; esac
1303
1304     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1305         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1306     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1307
1308     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1309   ;;
1310
1311     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1312   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1313
1314     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1315   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1316   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1317   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1318   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1319   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1320
1321     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1322   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1323
1324     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1325
1326     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1327
1328     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1329
1330     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1331
1332       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1333
1334     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1335
1336     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1337
1338     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1339
1340     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1341
1342         mips-mips-usg* ) machine=mips4 ;;
1343   mips-mips-riscos4 )
1344     machine=mips4
1345     NON_GNU_CC="cc -systype bsd43"
1346     NON_GNU_CPP="cc -systype bsd43 -E"
1347     case "$canonical" in
1348       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1349       mips-mips-riscos5* ) opsys=riscos5 ;;
1350     esac
1351   ;;
1352   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1353   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1354
1355     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1356
1357     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1358
1359     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1360   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1361
1362     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1363
1364     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1365
1366     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1367
1368     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1369
1370     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1371   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1372
1373     mips-siemens-sysv* | mips-sni-sysv*)
1374     machine=mips-siemens opsys=usg5-4
1375     NON_GNU_CC=/usr/ccs/bin/cc
1376     NON_GNU_CPP=/usr/ccs/lib/cpp
1377   ;;
1378
1379     mips-nec-sysv*)
1380     machine=mips-nec
1381     NON_GNU_CC=/usr/ccs/bin/cc
1382     NON_GNU_CPP=/usr/ccs/lib/cpp
1383   ;;
1384
1385       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1386   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1387     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1388   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1389   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1390   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1391   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1392   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1393   mips-sgi-irix*      ) opsys=irix5-0 ;;
1394
1395     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1396   *-sony-news* ) opsys=newsos5 ;;
1397
1398     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1399
1400     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1401         case "$canonical" in
1402       m68*-sunos1* )             machine=sun1     ;;
1403       m68*-sunos2* )             machine=sun2     ;;
1404       m68* )                     machine=sun3     ;;
1405       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1406       i*86-*-* )                 machine=intel386 ;;
1407       rs6000* )                  machine=rs6000   ;;
1408     esac
1409
1410         case "$canonical" in *-sunos5*)
1411       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1412     esac
1413
1414                     case "$canonical" in
1415       *-sunos4* )
1416         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1417         : ;;
1418       *-solaris2* )
1419         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1420         RANLIB=':' ;;
1421     esac
1422
1423     case "$canonical" in
1424       *-solaris*          )
1425         opsys=sol2
1426         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1427         { test "$extra_verbose" = "yes" && cat << EOF
1428     Defining OS_RELEASE = $os_release
1429 EOF
1430 cat >> confdefs.h <<EOF
1431 #define OS_RELEASE $os_release
1432 EOF
1433 }
1434  ;;
1435
1436             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1437       *-sunos4.0*         ) opsys=sunos4-0      ;;
1438       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1439       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1440       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1441       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1442       *-mach*             ) opsys=mach-bsd4-3   ;;
1443       *                   ) opsys=bsd4-2        ;;
1444     esac
1445
1446     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1447
1448         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1449   ;;
1450
1451     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1452
1453     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1454   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1455
1456     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1457
1458     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1459
1460     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1461       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1462
1463     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1464
1465     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1466
1467     vax-dec-* )
1468     case "$canonical" in
1469       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1470       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1471       *-mach* )                         opsys=mach-bsd4-3 ;;
1472     esac
1473   ;;
1474
1475     ns16k-whitechapel-* ) machine=mg1 ;;
1476
1477     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1478
1479     i[3-9]86-*-* )
1480     machine=intel386
1481     case "$canonical" in
1482       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1483       *-isc2.2* )               opsys=isc2-2 ;;
1484       *-isc4.0* )               opsys=isc4-0 ;;
1485       *-isc4.* )                opsys=isc4-1
1486                                 GCC_TEST_OPTIONS=-posix
1487                                 NON_GCC_TEST_OPTIONS=-Xp
1488                                 ;;
1489       *-isc* )                  opsys=isc3-0 ;;
1490       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1491       *-esix* )                 opsys=esix ;;
1492       *-mach* )                 opsys=mach-bsd4-3 ;;
1493       *-xenix* )                opsys=xenix ;;
1494       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1495       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1496       *-bsdi4* )                opsys=bsdos4 ;;
1497       *-bsdi3* )                opsys=bsdos3 ;;
1498       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1499       *-bsdi2* )                opsys=bsdos2 ;;
1500       *-sco3.2v5* )             opsys=sco5 ;;
1501       *-sysv5* )                opsys=sco7 ;;
1502       *-386bsd* )               opsys=386bsd ;;
1503       *-freebsd* )              opsys=freebsd ;;
1504       *-nextstep* )             opsys=nextstep ;;
1505       *-pc-cygwin* )            opsys=cygwin32 ;;
1506       *-pc-mingw* )             opsys=mingw32 ;
1507                                 test -z "$with_tty" && with_tty="no";;
1508           esac
1509   ;;
1510
1511     m68k-*-linux* ) machine=m68k opsys=linux ;;
1512
1513 esac
1514
1515 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1516
1517 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1518
1519 if test -r "${srcdir}/src/m/${machine}.h"; then
1520   machfile="m/${machine}.h"
1521   { test "$extra_verbose" = "yes" && cat << EOF
1522     Defining config_machfile = "$machfile"
1523 EOF
1524 cat >> confdefs.h <<EOF
1525 #define config_machfile "$machfile"
1526 EOF
1527 }
1528
1529 else
1530   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1531   echo "Using configure-time autodetection only."
1532 fi
1533
1534 if test -r "${srcdir}/src/s/${opsys}.h"; then
1535   opsysfile="s/${opsys}.h"
1536   { test "$extra_verbose" = "yes" && cat << EOF
1537     Defining config_opsysfile = "$opsysfile"
1538 EOF
1539 cat >> confdefs.h <<EOF
1540 #define config_opsysfile "$opsysfile"
1541 EOF
1542 }
1543
1544 else
1545   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1546   echo "Using configure-time autodetection only."
1547 fi
1548
1549
1550 if test -z "$pdump"; then
1551   case "$opsys" in
1552     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1553   esac
1554 fi
1555
1556 if test -z "$dynamic"; then
1557   case "$opsys" in
1558     hpux* | sunos4* ) dynamic=no ;;
1559     *) dynamic=yes ;;
1560   esac
1561 fi
1562 if test "$dynamic" = "yes"; then
1563   case "$opsys" in
1564     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1565     decosf* ) ld_call_shared="-call_shared" ;;
1566     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1567     Defining DLSYM_NEEDS_UNDERSCORE
1568 EOF
1569 cat >> confdefs.h <<\EOF
1570 #define DLSYM_NEEDS_UNDERSCORE 1
1571 EOF
1572 }
1573  ;;
1574   esac
1575 else   case "$opsys" in
1576     sol2 )
1577       echo "Static linking is not supported on Solaris 2."
1578       echo "Rerun configure without specifying --dynamic=no."
1579       exit 1 ;;
1580     linux   ) ld_call_shared="-Bstatic" ;;
1581     decosf* ) ld_call_shared="-non_shared" ;;
1582   esac
1583 fi
1584
1585 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1586
1587 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1588 { test "$extra_verbose" = "yes" && cat << EOF
1589     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1590 EOF
1591 cat >> confdefs.h <<EOF
1592 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1593 EOF
1594 }
1595
1596
1597
1598 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1599 if test "$with_workshop $with_tooltalk" = "yes no"; then
1600   (echo "$progname: Usage error:"
1601 echo " " "--with-workshop requires --with-tooltalk"
1602 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1603 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1604 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1605 fi
1606
1607 if test "$with_workshop" = "yes"; then
1608   { test "$extra_verbose" = "yes" && cat << \EOF
1609     Defining SUNPRO
1610 EOF
1611 cat >> confdefs.h <<\EOF
1612 #define SUNPRO 1
1613 EOF
1614 }
1615
1616   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1617    echo "    xemacs will be linked with \"sunpro.o\""
1618  fi
1619 fi
1620
1621 if test "$with_clash_detection" != "no"; then
1622   { test "$extra_verbose" = "yes" && cat << \EOF
1623     Defining CLASH_DETECTION
1624 EOF
1625 cat >> confdefs.h <<\EOF
1626 #define CLASH_DETECTION 1
1627 EOF
1628 }
1629
1630   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1631    echo "    xemacs will be linked with \"filelock.o\""
1632  fi
1633 fi
1634
1635 test -n "$compiler" && CC="$compiler"
1636 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1637 fi
1638
1639 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1640 if test "${CFLAGS-unset}" != unset
1641   then cflags_specified=yes;
1642   else cflags_specified=no;
1643 fi
1644
1645 xe_save_CFLAGS="$CFLAGS"
1646
1647 # Extract the first word of "gcc", so it can be a program name with args.
1648 set dummy gcc; ac_word=$2
1649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1650 echo "configure:1651: checking for $ac_word" >&5
1651
1652 if test -n "$CC"; then
1653   ac_cv_prog_CC="$CC" # Let the user override the test.
1654 else
1655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1656   ac_dummy="$PATH"
1657   for ac_dir in $ac_dummy; do
1658     test -z "$ac_dir" && ac_dir=.
1659     if test -f $ac_dir/$ac_word; then
1660       ac_cv_prog_CC="gcc"
1661       break
1662     fi
1663   done
1664   IFS="$ac_save_ifs"
1665 fi
1666 CC="$ac_cv_prog_CC"
1667 if test -n "$CC"; then
1668   echo "$ac_t""$CC" 1>&6
1669 else
1670   echo "$ac_t""no" 1>&6
1671 fi
1672
1673 if test -z "$CC"; then
1674   # Extract the first word of "cc", so it can be a program name with args.
1675 set dummy cc; ac_word=$2
1676 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1677 echo "configure:1678: checking for $ac_word" >&5
1678
1679 if test -n "$CC"; then
1680   ac_cv_prog_CC="$CC" # Let the user override the test.
1681 else
1682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1683   ac_prog_rejected=no
1684   ac_dummy="$PATH"
1685   for ac_dir in $ac_dummy; do
1686     test -z "$ac_dir" && ac_dir=.
1687     if test -f $ac_dir/$ac_word; then
1688       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1689         ac_prog_rejected=yes
1690         continue
1691       fi
1692       ac_cv_prog_CC="cc"
1693       break
1694     fi
1695   done
1696   IFS="$ac_save_ifs"
1697 if test $ac_prog_rejected = yes; then
1698   # We found a bogon in the path, so make sure we never use it.
1699   set dummy $ac_cv_prog_CC
1700   shift
1701   if test $# -gt 0; then
1702     # We chose a different compiler from the bogus one.
1703     # However, it has the same basename, so the bogon will be chosen
1704     # first if we set CC to just the basename; use the full file name.
1705     shift
1706     set dummy "$ac_dir/$ac_word" "$@"
1707     shift
1708     ac_cv_prog_CC="$@"
1709   fi
1710 fi
1711 fi
1712 CC="$ac_cv_prog_CC"
1713 if test -n "$CC"; then
1714   echo "$ac_t""$CC" 1>&6
1715 else
1716   echo "$ac_t""no" 1>&6
1717 fi
1718
1719   if test -z "$CC"; then
1720     case "`uname -s`" in
1721     *win32* | *WIN32*)
1722       # Extract the first word of "cl", so it can be a program name with args.
1723 set dummy cl; ac_word=$2
1724 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1725 echo "configure:1726: checking for $ac_word" >&5
1726
1727 if test -n "$CC"; then
1728   ac_cv_prog_CC="$CC" # Let the user override the test.
1729 else
1730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1731   ac_dummy="$PATH"
1732   for ac_dir in $ac_dummy; do
1733     test -z "$ac_dir" && ac_dir=.
1734     if test -f $ac_dir/$ac_word; then
1735       ac_cv_prog_CC="cl"
1736       break
1737     fi
1738   done
1739   IFS="$ac_save_ifs"
1740 fi
1741 CC="$ac_cv_prog_CC"
1742 if test -n "$CC"; then
1743   echo "$ac_t""$CC" 1>&6
1744 else
1745   echo "$ac_t""no" 1>&6
1746 fi
1747  ;;
1748     esac
1749   fi
1750   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1751 fi
1752
1753 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1754 echo "configure:1755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1755
1756 ac_ext=c
1757 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1758 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1759 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'
1760 ac_cpp='$CPP '"$xe_cppflags"
1761 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1762 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1763 cross_compiling=no
1764
1765 cat > conftest.$ac_ext << EOF
1766
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769
1770 main(){return(0);}
1771 EOF
1772 if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1773   ac_cv_prog_cc_works=yes
1774   # If we can't run a trivial program, we are probably using a cross compiler.
1775   if (./conftest; exit) 2>/dev/null; then
1776     ac_cv_prog_cc_cross=no
1777   else
1778     ac_cv_prog_cc_cross=yes
1779   fi
1780 else
1781   echo "configure: failed program was:" >&5
1782   cat conftest.$ac_ext >&5
1783   ac_cv_prog_cc_works=no
1784 fi
1785 rm -fr conftest*
1786 ac_ext=c
1787 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1788 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1789 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'
1790 ac_cpp='$CPP '"$xe_cppflags"
1791 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1792 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1793 cross_compiling=no
1794
1795 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1796 if test $ac_cv_prog_cc_works = no; then
1797   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1798 fi
1799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1800 echo "configure:1801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1801 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1802 cross_compiling=$ac_cv_prog_cc_cross
1803
1804 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1805 echo "configure:1806: checking whether we are using GNU C" >&5
1806
1807 cat > conftest.c <<EOF
1808 #ifdef __GNUC__
1809   yes;
1810 #endif
1811 EOF
1812 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1813   ac_cv_prog_gcc=yes
1814 else
1815   ac_cv_prog_gcc=no
1816 fi
1817
1818 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1819
1820 if test $ac_cv_prog_gcc = yes; then
1821   GCC=yes
1822 else
1823   GCC=
1824 fi
1825
1826 ac_test_CFLAGS="${CFLAGS+set}"
1827 ac_save_CFLAGS="$CFLAGS"
1828 CFLAGS=
1829 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1830 echo "configure:1831: checking whether ${CC-cc} accepts -g" >&5
1831
1832 echo 'void f(){}' > conftest.c
1833 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1834   ac_cv_prog_cc_g=yes
1835 else
1836   ac_cv_prog_cc_g=no
1837 fi
1838 rm -f conftest*
1839
1840
1841 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1842 if test "$ac_test_CFLAGS" = set; then
1843   CFLAGS="$ac_save_CFLAGS"
1844 elif test $ac_cv_prog_cc_g = yes; then
1845   if test "$GCC" = yes; then
1846     CFLAGS="-g -O2"
1847   else
1848     CFLAGS="-g"
1849   fi
1850 else
1851   if test "$GCC" = yes; then
1852     CFLAGS="-O2"
1853   else
1854     CFLAGS=
1855   fi
1856 fi
1857  
1858 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1859   CC=${NON_GNU_CC-cc}
1860   # Extract the first word of "gcc", so it can be a program name with args.
1861 set dummy gcc; ac_word=$2
1862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1863 echo "configure:1864: checking for $ac_word" >&5
1864
1865 if test -n "$CC"; then
1866   ac_cv_prog_CC="$CC" # Let the user override the test.
1867 else
1868   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1869   ac_dummy="$PATH"
1870   for ac_dir in $ac_dummy; do
1871     test -z "$ac_dir" && ac_dir=.
1872     if test -f $ac_dir/$ac_word; then
1873       ac_cv_prog_CC="gcc"
1874       break
1875     fi
1876   done
1877   IFS="$ac_save_ifs"
1878 fi
1879 CC="$ac_cv_prog_CC"
1880 if test -n "$CC"; then
1881   echo "$ac_t""$CC" 1>&6
1882 else
1883   echo "$ac_t""no" 1>&6
1884 fi
1885
1886 if test -z "$CC"; then
1887   # Extract the first word of "cc", so it can be a program name with args.
1888 set dummy cc; ac_word=$2
1889 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1890 echo "configure:1891: checking for $ac_word" >&5
1891
1892 if test -n "$CC"; then
1893   ac_cv_prog_CC="$CC" # Let the user override the test.
1894 else
1895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1896   ac_prog_rejected=no
1897   ac_dummy="$PATH"
1898   for ac_dir in $ac_dummy; do
1899     test -z "$ac_dir" && ac_dir=.
1900     if test -f $ac_dir/$ac_word; then
1901       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1902         ac_prog_rejected=yes
1903         continue
1904       fi
1905       ac_cv_prog_CC="cc"
1906       break
1907     fi
1908   done
1909   IFS="$ac_save_ifs"
1910 if test $ac_prog_rejected = yes; then
1911   # We found a bogon in the path, so make sure we never use it.
1912   set dummy $ac_cv_prog_CC
1913   shift
1914   if test $# -gt 0; then
1915     # We chose a different compiler from the bogus one.
1916     # However, it has the same basename, so the bogon will be chosen
1917     # first if we set CC to just the basename; use the full file name.
1918     shift
1919     set dummy "$ac_dir/$ac_word" "$@"
1920     shift
1921     ac_cv_prog_CC="$@"
1922   fi
1923 fi
1924 fi
1925 CC="$ac_cv_prog_CC"
1926 if test -n "$CC"; then
1927   echo "$ac_t""$CC" 1>&6
1928 else
1929   echo "$ac_t""no" 1>&6
1930 fi
1931
1932   if test -z "$CC"; then
1933     case "`uname -s`" in
1934     *win32* | *WIN32*)
1935       # Extract the first word of "cl", so it can be a program name with args.
1936 set dummy cl; ac_word=$2
1937 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1938 echo "configure:1939: checking for $ac_word" >&5
1939
1940 if test -n "$CC"; then
1941   ac_cv_prog_CC="$CC" # Let the user override the test.
1942 else
1943   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1944   ac_dummy="$PATH"
1945   for ac_dir in $ac_dummy; do
1946     test -z "$ac_dir" && ac_dir=.
1947     if test -f $ac_dir/$ac_word; then
1948       ac_cv_prog_CC="cl"
1949       break
1950     fi
1951   done
1952   IFS="$ac_save_ifs"
1953 fi
1954 CC="$ac_cv_prog_CC"
1955 if test -n "$CC"; then
1956   echo "$ac_t""$CC" 1>&6
1957 else
1958   echo "$ac_t""no" 1>&6
1959 fi
1960  ;;
1961     esac
1962   fi
1963   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1964 fi
1965
1966 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1967 echo "configure:1968: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1968
1969 ac_ext=c
1970 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1971 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1972 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'
1973 ac_cpp='$CPP '"$xe_cppflags"
1974 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1975 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1976 cross_compiling=no
1977
1978 cat > conftest.$ac_ext << EOF
1979
1980 #line 1981 "configure"
1981 #include "confdefs.h"
1982
1983 main(){return(0);}
1984 EOF
1985 if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1986   ac_cv_prog_cc_works=yes
1987   # If we can't run a trivial program, we are probably using a cross compiler.
1988   if (./conftest; exit) 2>/dev/null; then
1989     ac_cv_prog_cc_cross=no
1990   else
1991     ac_cv_prog_cc_cross=yes
1992   fi
1993 else
1994   echo "configure: failed program was:" >&5
1995   cat conftest.$ac_ext >&5
1996   ac_cv_prog_cc_works=no
1997 fi
1998 rm -fr conftest*
1999 ac_ext=c
2000 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2001 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2002 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'
2003 ac_cpp='$CPP '"$xe_cppflags"
2004 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2005 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2006 cross_compiling=no
2007
2008 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2009 if test $ac_cv_prog_cc_works = no; then
2010   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2011 fi
2012 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2013 echo "configure:2014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2014 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2015 cross_compiling=$ac_cv_prog_cc_cross
2016
2017 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether we are using GNU C" >&5
2019
2020 cat > conftest.c <<EOF
2021 #ifdef __GNUC__
2022   yes;
2023 #endif
2024 EOF
2025 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2026   ac_cv_prog_gcc=yes
2027 else
2028   ac_cv_prog_gcc=no
2029 fi
2030
2031 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2032
2033 if test $ac_cv_prog_gcc = yes; then
2034   GCC=yes
2035 else
2036   GCC=
2037 fi
2038
2039 ac_test_CFLAGS="${CFLAGS+set}"
2040 ac_save_CFLAGS="$CFLAGS"
2041 CFLAGS=
2042 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2043 echo "configure:2044: checking whether ${CC-cc} accepts -g" >&5
2044
2045 echo 'void f(){}' > conftest.c
2046 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2047   ac_cv_prog_cc_g=yes
2048 else
2049   ac_cv_prog_cc_g=no
2050 fi
2051 rm -f conftest*
2052
2053
2054 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2055 if test "$ac_test_CFLAGS" = set; then
2056   CFLAGS="$ac_save_CFLAGS"
2057 elif test $ac_cv_prog_cc_g = yes; then
2058   if test "$GCC" = yes; then
2059     CFLAGS="-g -O2"
2060   else
2061     CFLAGS="-g"
2062   fi
2063 else
2064   if test "$GCC" = yes; then
2065     CFLAGS="-O2"
2066   else
2067     CFLAGS=
2068   fi
2069 fi
2070
2071 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2072   CC=gcc
2073   # Extract the first word of "gcc", so it can be a program name with args.
2074 set dummy gcc; ac_word=$2
2075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2076 echo "configure:2077: checking for $ac_word" >&5
2077
2078 if test -n "$CC"; then
2079   ac_cv_prog_CC="$CC" # Let the user override the test.
2080 else
2081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2082   ac_dummy="$PATH"
2083   for ac_dir in $ac_dummy; do
2084     test -z "$ac_dir" && ac_dir=.
2085     if test -f $ac_dir/$ac_word; then
2086       ac_cv_prog_CC="gcc"
2087       break
2088     fi
2089   done
2090   IFS="$ac_save_ifs"
2091 fi
2092 CC="$ac_cv_prog_CC"
2093 if test -n "$CC"; then
2094   echo "$ac_t""$CC" 1>&6
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098
2099 if test -z "$CC"; then
2100   # Extract the first word of "cc", so it can be a program name with args.
2101 set dummy cc; ac_word=$2
2102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2103 echo "configure:2104: checking for $ac_word" >&5
2104
2105 if test -n "$CC"; then
2106   ac_cv_prog_CC="$CC" # Let the user override the test.
2107 else
2108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2109   ac_prog_rejected=no
2110   ac_dummy="$PATH"
2111   for ac_dir in $ac_dummy; do
2112     test -z "$ac_dir" && ac_dir=.
2113     if test -f $ac_dir/$ac_word; then
2114       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2115         ac_prog_rejected=yes
2116         continue
2117       fi
2118       ac_cv_prog_CC="cc"
2119       break
2120     fi
2121   done
2122   IFS="$ac_save_ifs"
2123 if test $ac_prog_rejected = yes; then
2124   # We found a bogon in the path, so make sure we never use it.
2125   set dummy $ac_cv_prog_CC
2126   shift
2127   if test $# -gt 0; then
2128     # We chose a different compiler from the bogus one.
2129     # However, it has the same basename, so the bogon will be chosen
2130     # first if we set CC to just the basename; use the full file name.
2131     shift
2132     set dummy "$ac_dir/$ac_word" "$@"
2133     shift
2134     ac_cv_prog_CC="$@"
2135   fi
2136 fi
2137 fi
2138 CC="$ac_cv_prog_CC"
2139 if test -n "$CC"; then
2140   echo "$ac_t""$CC" 1>&6
2141 else
2142   echo "$ac_t""no" 1>&6
2143 fi
2144
2145   if test -z "$CC"; then
2146     case "`uname -s`" in
2147     *win32* | *WIN32*)
2148       # Extract the first word of "cl", so it can be a program name with args.
2149 set dummy cl; ac_word=$2
2150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_word" >&5
2152
2153 if test -n "$CC"; then
2154   ac_cv_prog_CC="$CC" # Let the user override the test.
2155 else
2156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2157   ac_dummy="$PATH"
2158   for ac_dir in $ac_dummy; do
2159     test -z "$ac_dir" && ac_dir=.
2160     if test -f $ac_dir/$ac_word; then
2161       ac_cv_prog_CC="cl"
2162       break
2163     fi
2164   done
2165   IFS="$ac_save_ifs"
2166 fi
2167 CC="$ac_cv_prog_CC"
2168 if test -n "$CC"; then
2169   echo "$ac_t""$CC" 1>&6
2170 else
2171   echo "$ac_t""no" 1>&6
2172 fi
2173  ;;
2174     esac
2175   fi
2176   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2177 fi
2178
2179 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2180 echo "configure:2181: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2181
2182 ac_ext=c
2183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2185 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'
2186 ac_cpp='$CPP '"$xe_cppflags"
2187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2189 cross_compiling=no
2190
2191 cat > conftest.$ac_ext << EOF
2192
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195
2196 main(){return(0);}
2197 EOF
2198 if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2199   ac_cv_prog_cc_works=yes
2200   # If we can't run a trivial program, we are probably using a cross compiler.
2201   if (./conftest; exit) 2>/dev/null; then
2202     ac_cv_prog_cc_cross=no
2203   else
2204     ac_cv_prog_cc_cross=yes
2205   fi
2206 else
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   ac_cv_prog_cc_works=no
2210 fi
2211 rm -fr conftest*
2212 ac_ext=c
2213 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2214 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2215 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'
2216 ac_cpp='$CPP '"$xe_cppflags"
2217 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2218 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2219 cross_compiling=no
2220
2221 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2222 if test $ac_cv_prog_cc_works = no; then
2223   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2224 fi
2225 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2226 echo "configure:2227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2227 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2228 cross_compiling=$ac_cv_prog_cc_cross
2229
2230 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2231 echo "configure:2232: checking whether we are using GNU C" >&5
2232
2233 cat > conftest.c <<EOF
2234 #ifdef __GNUC__
2235   yes;
2236 #endif
2237 EOF
2238 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2239   ac_cv_prog_gcc=yes
2240 else
2241   ac_cv_prog_gcc=no
2242 fi
2243
2244 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2245
2246 if test $ac_cv_prog_gcc = yes; then
2247   GCC=yes
2248 else
2249   GCC=
2250 fi
2251
2252 ac_test_CFLAGS="${CFLAGS+set}"
2253 ac_save_CFLAGS="$CFLAGS"
2254 CFLAGS=
2255 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2256 echo "configure:2257: checking whether ${CC-cc} accepts -g" >&5
2257
2258 echo 'void f(){}' > conftest.c
2259 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2260   ac_cv_prog_cc_g=yes
2261 else
2262   ac_cv_prog_cc_g=no
2263 fi
2264 rm -f conftest*
2265
2266
2267 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2268 if test "$ac_test_CFLAGS" = set; then
2269   CFLAGS="$ac_save_CFLAGS"
2270 elif test $ac_cv_prog_cc_g = yes; then
2271   if test "$GCC" = yes; then
2272     CFLAGS="-g -O2"
2273   else
2274     CFLAGS="-g"
2275   fi
2276 else
2277   if test "$GCC" = yes; then
2278     CFLAGS="-O2"
2279   else
2280     CFLAGS=
2281   fi
2282 fi
2283
2284 fi
2285 CFLAGS="$xe_save_CFLAGS"
2286
2287
2288 test -n "$CPP" -a -d "$CPP" && CPP=
2289
2290 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2291
2292 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2293 echo "configure:2294: checking how to run the C preprocessor" >&5
2294 # On Suns, sometimes $CPP names a directory.
2295 if test -n "$CPP" && test -d "$CPP"; then
2296   CPP=
2297 fi
2298 if test -z "$CPP"; then
2299
2300   # This must be in double quotes, not single quotes, because CPP may get
2301   # substituted into the Makefile and "${CC-cc}" will confuse make.
2302   CPP="${CC-cc} -E"
2303   # On the NeXT, cc -E runs the code through the compiler's parser,
2304   # not just through cpp.
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309 Syntax Error
2310 EOF
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2315   :
2316 else
2317   echo "$ac_err" >&5
2318   echo "configure: failed program was:" >&5
2319   cat conftest.$ac_ext >&5
2320   rm -rf conftest*
2321   CPP="${CC-cc} -E -traditional-cpp"
2322   cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <assert.h>
2326 Syntax Error
2327 EOF
2328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2329 { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2331 if test -z "$ac_err"; then
2332   :
2333 else
2334   echo "$ac_err" >&5
2335   echo "configure: failed program was:" >&5
2336   cat conftest.$ac_ext >&5
2337   rm -rf conftest*
2338   CPP="${CC-cc} -nologo -E"
2339   cat > conftest.$ac_ext <<EOF
2340 #line 2341 "configure"
2341 #include "confdefs.h"
2342 #include <assert.h>
2343 Syntax Error
2344 EOF
2345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2346 { (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2348 if test -z "$ac_err"; then
2349   :
2350 else
2351   echo "$ac_err" >&5
2352   echo "configure: failed program was:" >&5
2353   cat conftest.$ac_ext >&5
2354   rm -rf conftest*
2355   CPP=/lib/cpp
2356 fi
2357 rm -f conftest*
2358 fi
2359 rm -f conftest*
2360 fi
2361 rm -f conftest*
2362   ac_cv_prog_CPP="$CPP"
2363   CPP="$ac_cv_prog_CPP"
2364 else
2365   ac_cv_prog_CPP="$CPP"
2366 fi
2367 echo "$ac_t""$CPP" 1>&6
2368
2369
2370
2371 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2372 echo "configure:2373: checking for AIX" >&5
2373 cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376 #ifdef _AIX
2377   yes
2378 #endif
2379
2380 EOF
2381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2382   egrep "yes" >/dev/null 2>&1; then
2383   rm -rf conftest*
2384   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2385     Defining _ALL_SOURCE
2386 EOF
2387 cat >> confdefs.h <<\EOF
2388 #define _ALL_SOURCE 1
2389 EOF
2390 }
2391
2392 else
2393   rm -rf conftest*
2394   echo "$ac_t""no" 1>&6
2395 fi
2396 rm -f conftest*
2397
2398  
2399
2400 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2401 echo "configure:2402: checking for GNU libc" >&5
2402 cat > conftest.$ac_ext <<EOF
2403 #line 2404 "configure"
2404 #include "confdefs.h"
2405 #include <features.h>
2406 int main() {
2407
2408 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2409 #error Not a GNU libc system :-(
2410 ******* ======= ******** &&&&&&&&
2411 #endif
2412
2413 ; return 0; }
2414 EOF
2415 if { (eval echo configure:2416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2416   rm -rf conftest*
2417   have_glibc=yes
2418 else
2419   echo "configure: failed program was:" >&5
2420   cat conftest.$ac_ext >&5
2421   rm -rf conftest*
2422   have_glibc=no
2423 fi
2424 rm -f conftest*
2425 echo "$ac_t""$have_glibc" 1>&6
2426 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2427     Defining _GNU_SOURCE
2428 EOF
2429 cat >> confdefs.h <<\EOF
2430 #define _GNU_SOURCE 1
2431 EOF
2432 }
2433
2434
2435 case "$opsys" in
2436   sol2)
2437    { test "$extra_verbose" = "yes" && cat << \EOF
2438     Defining __EXTENSIONS__
2439 EOF
2440 cat >> confdefs.h <<\EOF
2441 #define __EXTENSIONS__ 1
2442 EOF
2443 }
2444
2445       if test "$os_release" -ge 55; then
2446      { test "$extra_verbose" = "yes" && cat << \EOF
2447     Defining _XOPEN_SOURCE = 500
2448 EOF
2449 cat >> confdefs.h <<\EOF
2450 #define _XOPEN_SOURCE 500
2451 EOF
2452 }
2453
2454      { test "$extra_verbose" = "yes" && cat << \EOF
2455     Defining _XOPEN_SOURCE_EXTENDED
2456 EOF
2457 cat >> confdefs.h <<\EOF
2458 #define _XOPEN_SOURCE_EXTENDED 1
2459 EOF
2460 }
2461
2462    fi ;;
2463   linux)
2464     { test "$extra_verbose" = "yes" && cat << \EOF
2465     Defining _POSIX_C_SOURCE = 199506L
2466 EOF
2467 cat >> confdefs.h <<\EOF
2468 #define _POSIX_C_SOURCE 199506L
2469 EOF
2470 }
2471
2472     { test "$extra_verbose" = "yes" && cat << \EOF
2473     Defining _XOPEN_SOURCE = 500
2474 EOF
2475 cat >> confdefs.h <<\EOF
2476 #define _XOPEN_SOURCE 500
2477 EOF
2478 }
2479
2480     { test "$extra_verbose" = "yes" && cat << \EOF
2481     Defining _XOPEN_SOURCE_EXTENDED
2482 EOF
2483 cat >> confdefs.h <<\EOF
2484 #define _XOPEN_SOURCE_EXTENDED 1
2485 EOF
2486 }
2487
2488     ;;
2489 esac
2490
2491 cat > conftest.$ac_ext <<EOF
2492 #line 2493 "configure"
2493 #include "confdefs.h"
2494 int main () {
2495 #if defined __SUNPRO_C
2496 return 11;
2497 #elif defined __DECC
2498 return 12;
2499 #elif defined __USLC__ && defined __SCO_VERSION__
2500 return 13;
2501 #else
2502 return 0;
2503 #endif
2504 }
2505 EOF
2506 if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2507 then
2508   :
2509 else
2510   conftest_rc="$?"
2511   echo "configure: failed program was:" >&5
2512   cat conftest.$ac_ext >&5
2513   rm -fr conftest*
2514   case "$conftest_rc" in
2515   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2516   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2517   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2518 esac
2519 fi
2520 rm -fr conftest*
2521
2522
2523
2524
2525 echo "Extracting information from the machine- and system-dependent headers..."
2526
2527 tempcname="conftest.c"
2528
2529
2530
2531 cat > $tempcname < confdefs.h
2532 cat >> $tempcname <<EOF
2533 #define NOT_C_CODE
2534 #define C_SWITCH_SITE
2535 #define C_SWITCH_X_SITE
2536 #define LD_SWITCH_SITE
2537 #define LD_SWITCH_X_SITE
2538 #define LD_SWITCH_X_SITE_AUX
2539 #define OS_RELEASE $os_release
2540
2541 #ifdef config_opsysfile
2542 #include "$srcdir/src/$opsysfile"
2543 #endif
2544
2545 #ifdef config_machfile
2546 #include "$srcdir/src/$machfile"
2547 #endif
2548
2549 #ifndef LIBS_MACHINE
2550 #define LIBS_MACHINE
2551 #endif
2552 configure___ libs_machine=LIBS_MACHINE
2553
2554 #ifndef LIBS_SYSTEM
2555 #define LIBS_SYSTEM
2556 #endif
2557 configure___ libs_system=LIBS_SYSTEM
2558
2559 #ifndef LIBS_TERMCAP
2560 #define LIBS_TERMCAP
2561 #endif
2562 configure___ libs_termcap=LIBS_TERMCAP
2563
2564 #ifndef LIB_STANDARD
2565 #define LIB_STANDARD
2566 #endif
2567 configure___ libs_standard=LIB_STANDARD
2568
2569
2570 #ifndef OBJECTS_MACHINE
2571 #define OBJECTS_MACHINE
2572 #endif
2573 configure___ objects_machine=OBJECTS_MACHINE
2574
2575 #ifndef OBJECTS_SYSTEM
2576 #define OBJECTS_SYSTEM
2577 #endif
2578 configure___ objects_system=OBJECTS_SYSTEM
2579
2580
2581 #ifndef C_SWITCH_MACHINE
2582 #define C_SWITCH_MACHINE
2583 #endif
2584 configure___ c_switch_machine=C_SWITCH_MACHINE
2585
2586 #ifndef C_SWITCH_SYSTEM
2587 #define C_SWITCH_SYSTEM
2588 #endif
2589 configure___ c_switch_system=C_SWITCH_SYSTEM
2590
2591
2592 #ifndef LD_SWITCH_MACHINE
2593 #define LD_SWITCH_MACHINE
2594 #endif
2595 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2596
2597 #ifndef LD_SWITCH_SYSTEM
2598 #define LD_SWITCH_SYSTEM
2599 #endif
2600 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2601
2602
2603 #ifndef UNEXEC
2604 #define UNEXEC "unexec.o"
2605 #endif
2606 configure___ unexec=UNEXEC
2607
2608
2609 #ifndef LD_SWITCH_SHARED
2610 #define LD_SWITCH_SHARED "-c"
2611 #endif
2612 configure___ ld_switch_shared=LD_SWITCH_SHARED
2613
2614
2615 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2616 configure___ ordinary_ld=ORDINARY_LD
2617
2618 #ifdef ORDINARY_LINK
2619 #define LD ORDINARY_LD
2620 #else /* no ORDINARY LINK */
2621 #ifdef COFF_ENCAPSULATE
2622 #define LD "\$(CC) -nostdlib"
2623 #else /* not COFF_ENCAPSULATE */
2624 #ifdef LINKER
2625 #define LD LINKER
2626 #else /* ! defined (LINKER) */
2627 #define LD "ld"
2628 #endif /* ! defined (LINKER) */
2629 #endif /* ! defined (COFF_ENCAPSULATE) */
2630 #endif /* not ORDINARY_LINK */
2631 configure___ ld=LD
2632
2633 #ifndef LIB_GCC
2634 #define LIB_GCC
2635 #endif
2636 configure___ lib_gcc=LIB_GCC
2637
2638 #ifndef LD_TEXT_START_ADDR
2639 #define LD_TEXT_START_ADDR
2640 #endif
2641 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2642
2643
2644 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2645 #ifdef NO_REMAP
2646 #ifdef COFF_ENCAPSULATE
2647 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2648 #else /* ! defined (COFF_ENCAPSULATE) */
2649 #define START_FILES "pre-crt0.o /lib/crt0.o"
2650 #endif /* ! defined (COFF_ENCAPSULATE) */
2651 #else /* ! defined (NO_REMAP) */
2652 #define START_FILES "ecrt0.o"
2653 #endif /* ! defined (NO_REMAP) */
2654 #endif /* no ORDINARY_LINK */
2655 #ifndef START_FILES
2656 #define START_FILES
2657 #endif
2658 configure___ start_files=START_FILES
2659
2660 #ifdef ORDINARY_LINK
2661 configure___ ordinary_link=yes
2662 #else
2663 configure___ ordinary_link=no
2664 #endif
2665
2666 #ifdef SYSTEM_MALLOC
2667 configure___ system_malloc=yes
2668 #else
2669 configure___ system_malloc=no
2670 #endif
2671
2672 #ifdef TERMINFO
2673 configure___ have_terminfo=yes
2674 #else
2675 configure___ have_terminfo=no
2676 #endif
2677
2678 #ifdef MAIL_USE_FLOCK
2679 configure___ mail_use_flock=yes
2680 #else
2681 configure___ mail_use_flock=no
2682 #endif
2683
2684 #ifdef MAIL_USE_LOCKF
2685 configure___ mail_use_lockf=yes
2686 #else
2687 configure___ mail_use_lockf=no
2688 #endif
2689
2690 #ifdef MAIL_USE_LOCKING
2691 configure___ mail_use_locking=yes
2692 #else
2693 configure___ mail_use_locking=no
2694 #endif
2695
2696 #ifdef HAVE_WIN32_PROCESSES
2697 configure___ win32_processes=yes
2698 #else
2699 configure___ win32_processes=no
2700 #endif
2701
2702 EOF
2703
2704 CPP=`eval "echo $CPP $CPPFLAGS"`
2705 eval `$CPP -Isrc $tempcname \
2706         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2707
2708 rm $tempcname
2709
2710 if test "$pdump" = "yes"; then
2711   ordinary_link="yes"
2712   ld="${ordinary_ld}"
2713   start_files=
2714   libs_standard=
2715   unexec=
2716   lib_gcc=
2717 fi
2718
2719 test "$extra_verbose" = "yes" && \
2720   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 ""
2721
2722 case "$opsys" in mingw* | cygwin*)
2723   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2724   cygwin_include=`eval "dirname $cygwin_include"` ;
2725   cygwin_include="-I$cygwin_include/../include" ;
2726   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2727   case "$opsys" in mingw*)
2728     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2729   esac
2730   ;;
2731 esac
2732
2733 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2734
2735
2736 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2737
2738 if test "$__USLC__" = yes; then
2739   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2740 echo "configure:2741: checking for whether the -Kalloca compiler flag is needed" >&5
2741   need_kalloca=no
2742   cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745
2746 int main() {
2747 void *x = alloca(4);
2748 ; return 0; }
2749 EOF
2750 if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2751   rm -rf conftest*
2752   :
2753 else
2754   echo "configure: failed program was:" >&5
2755   cat conftest.$ac_ext >&5
2756   rm -rf conftest*
2757   
2758     xe_save_c_switch_system="$c_switch_system"
2759     c_switch_system="$c_switch_system -Kalloca"
2760     cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763
2764 int main() {
2765 void *x = alloca(4);
2766 ; return 0; }
2767 EOF
2768 if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769   rm -rf conftest*
2770    need_kalloca=yes 
2771 else
2772   echo "configure: failed program was:" >&5
2773   cat conftest.$ac_ext >&5
2774 fi
2775 rm -f conftest*
2776     c_switch_system="$xe_save_c_switch_system"
2777 fi
2778 rm -f conftest*
2779   echo "$ac_t""$need_kalloca" 1>&6
2780   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
2781 fi
2782
2783 if test "$cflags_specified" = "no"; then
2784       if   test "$GCC" = "yes"; then
2785     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2786         CFLAGS="$CFLAGS -Wsign-compare"
2787                 if test "$xemacs_compiler" != "g++"; then
2788       CFLAGS="$CFLAGS -Wshadow"
2789     fi
2790             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2791               elif test "$__SUNPRO_C" = "yes"; then
2792     case "$opsys" in
2793       sol2    ) CFLAGS="-v -xO4" ;;
2794       sunos4* ) CFLAGS="-xO2";;
2795     esac
2796   elif test "$__DECC" = "yes"; then
2797     CFLAGS="-O3"
2798   elif test "$CC" = "xlc"; then
2799     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2800     else
2801     CFLAGS="-O" ;  fi
2802 fi
2803
2804 if test "$GCC" = "yes"; then
2805 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2806 echo "configure:2807: checking for buggy gcc versions" >&5
2807 GCC_VERSION=`$CC --version`
2808 case `uname -s`:`uname -m`:$GCC_VERSION in
2809                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2810                         case "$CFLAGS" in
2811             *-O2*|*-O3*)
2812                 case "$CFLAGS" in
2813                     *-fno-schedule-insns*) ;;
2814                     *)
2815                         echo "$ac_t""yes" 1>&6
2816                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2817                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2818                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2819                         ;;
2820                 esac
2821                 ;;
2822         esac
2823         ;;
2824                     Linux:alpha:egcs-2.91.*)
2825         echo "$ac_t""yes" 1>&6
2826         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2827         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2828         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2829         ;;
2830     *:i*86*:2.7.2*)
2831         case "$CFLAGS" in
2832             *-O2*|*-O3*)
2833                 case "$GCC_VERSION" in
2834                     2.7.2)
2835                         case "$CFLAGS" in
2836                             *-fno-strength-reduce*) ;;
2837                             *)
2838                                 echo "$ac_t""yes" 1>&6
2839                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2840                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2841                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2842                                 ;;
2843                         esac
2844                         ;;
2845                 esac
2846                 case "$CFLAGS" in
2847                  *-fno-caller-saves*) ;;
2848                  *)
2849                     echo "$ac_t""yes" 1>&6
2850                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2851                     echo "configure: warning: -fno-caller-saves." 1>&2
2852                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2853                     ;;
2854                 esac
2855                 ;;
2856         esac
2857         ;;
2858 esac
2859 echo "$ac_t""no" 1>&6
2860 fi
2861
2862 if test "$pdump" != "yes"; then
2863   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2864 echo "configure:2865: checking for \"-z nocombreloc\" linker flag" >&5
2865   case "`ld --help 2>&1`" in
2866     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2867       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2868     *) echo "$ac_t""no" 1>&6 ;;
2869   esac
2870 fi
2871
2872
2873
2874 if test "$GCC" = "yes"; then
2875   set x $ld_switch_system; shift; ld_switch_system=""
2876   while test -n "$1"; do
2877     case $1 in
2878       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2879       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2880       -Xlinker* ) ;;
2881       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2882     esac
2883     shift
2884   done
2885 fi
2886
2887 if test "$GCC" = "yes"; then
2888   set x $ld_switch_machine; shift; ld_switch_machine=""
2889   while test -n "$1"; do
2890     case $1 in
2891       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2892       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2893       -Xlinker* ) ;;
2894       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2895     esac
2896     shift
2897   done
2898 fi
2899
2900 if test "$GCC" = "yes"; then
2901   set x $ld_switch_site; shift; ld_switch_site=""
2902   while test -n "$1"; do
2903     case $1 in
2904       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2905       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2906       -Xlinker* ) ;;
2907       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2908     esac
2909     shift
2910   done
2911 fi
2912
2913 if test "$GCC" = "yes"; then
2914   set x $LDFLAGS; shift; LDFLAGS=""
2915   while test -n "$1"; do
2916     case $1 in
2917       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2918       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2919       -Xlinker* ) ;;
2920       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2921     esac
2922     shift
2923   done
2924 fi
2925
2926 if test "$GCC" = "yes"; then
2927   set x $ld_call_shared; shift; ld_call_shared=""
2928   while test -n "$1"; do
2929     case $1 in
2930       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2931       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2932       -Xlinker* ) ;;
2933       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2934     esac
2935     shift
2936   done
2937 fi
2938
2939 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2940    echo "    xemacs will be linked with \"$objects_machine\""
2941  fi
2942 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2943    echo "    xemacs will be linked with \"$objects_system\""
2944  fi
2945 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2946    echo "    xemacs will be linked with \"$unexec\""
2947  fi
2948 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2949    echo "    xemacs will be linked with \"dumper.o\""
2950  fi
2951
2952 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2953 echo "configure:2954: checking for dynodump" >&5
2954 if test "$unexec" != "unexsol2.o"; then
2955   echo "$ac_t""no" 1>&6
2956 else
2957   echo "$ac_t""yes" 1>&6
2958   { test "$extra_verbose" = "yes" && cat << \EOF
2959     Defining DYNODUMP
2960 EOF
2961 cat >> confdefs.h <<\EOF
2962 #define DYNODUMP 1
2963 EOF
2964 }
2965
2966   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2967   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2968   case "$machine" in
2969     sparc   ) dynodump_arch=sparc ;;
2970     *86*    ) dynodump_arch=i386  ;;
2971     powerpc ) dynodump_arch=ppc   ;;
2972   esac
2973     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
2974 fi
2975
2976
2977 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2978
2979 if test "$unexec" = "unexaix.o"; then
2980   if   test "$dynamic" = "no"; then
2981   start_flags="-Wl,-bnso,-bnodelcsect"
2982   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2983   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2984     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2985   done
2986   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2987     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2988   done
2989   
2990 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2991 echo "configure:2992: checking for terminateAndUnload in -lC" >&5
2992 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2993
2994 xe_check_libs=" -lC "
2995 cat > conftest.$ac_ext <<EOF
2996 #line 2997 "configure"
2997 #include "confdefs.h"
2998 /* Override any gcc2 internal prototype to avoid an error.  */
2999 /* We use char because int might match the return type of a gcc2
3000     builtin and then its argument prototype would still apply.  */
3001 char terminateAndUnload();
3002
3003 int main() {
3004 terminateAndUnload()
3005 ; return 0; }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3008   rm -rf conftest*
3009   eval "ac_cv_lib_$ac_lib_var=yes"
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   eval "ac_cv_lib_$ac_lib_var=no"
3015 fi
3016 rm -f conftest*
3017 xe_check_libs=""
3018
3019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3020   echo "$ac_t""yes" 1>&6
3021   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025
3026
3027   fi
3028 elif test -n "$ld_text_start_addr"; then
3029   start_flags="-T $ld_text_start_addr -e __start"
3030 fi
3031
3032
3033
3034
3035 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3036  test -z "$linker" &&  linker='$(CC) -nostdlib'
3037  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3038 fi
3039 test "$GCC" != "yes" && lib_gcc=
3040
3041
3042
3043
3044
3045 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3046 if test -n "$site_libraries"; then
3047   for arg in $site_libraries; do
3048     case "$arg" in
3049      -* ) ;;
3050      * ) test -d "$arg" || \
3051            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3052        arg="-L${arg}" ;;
3053     esac
3054     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3055   done
3056 fi
3057
3058 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3059 if test -n "$site_includes"; then
3060   for arg in $site_includes; do
3061     case "$arg" in
3062       -* ) ;;
3063       * ) test -d "$arg" || \
3064            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3065       arg="-I${arg}" ;;
3066     esac
3067     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3068   done
3069 fi
3070
3071 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3072 if test -n "$site_prefixes"; then
3073   for dir in $site_prefixes; do
3074     lib_dir="${dir}/lib"
3075     inc_dir="${dir}/include"
3076     if test ! -d "$dir"; then
3077       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3078     elif test ! -d "$lib_dir"; then
3079       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3080     else
3081       if test -d "$inc_dir"; then
3082         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
3083       fi
3084       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
3085     fi
3086   done
3087 fi
3088
3089
3090 for dir in "/usr/ccs/lib"; do
3091   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
3092 done
3093
3094 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3095 if test -n "$site_runtime_libraries"; then
3096   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3097   export LD_RUN_PATH
3098 fi
3099
3100
3101
3102
3103
3104 if test -n "$add_runtime_path"; then :;
3105 elif test "$dynamic" = "no"; then add_runtime_path=no
3106 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3107 else case "$opsys" in
3108        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3109        * ) add_runtime_path=no ;;
3110      esac
3111 fi
3112
3113 if test "$add_runtime_path" = "yes"; then
3114       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3115 echo "configure:3116: checking "for runtime libraries flag"" >&5
3116   case "$opsys" in
3117     sol2 ) dash_r="-R" ;;
3118     decosf* | linux* | irix*) dash_r="-rpath " ;;
3119     *)
3120       dash_r=""
3121       for try_dash_r in "-R" "-R " "-rpath "; do
3122         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3123         
3124 if test "$GCC" = "yes"; then
3125   set x $xe_check_libs; shift; xe_check_libs=""
3126   while test -n "$1"; do
3127     case $1 in
3128       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3129       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3130       -Xlinker* ) ;;
3131       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3132     esac
3133     shift
3134   done
3135 fi
3136         cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145   rm -rf conftest*
3146   dash_r="$try_dash_r"
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150 fi
3151 rm -f conftest*
3152         xe_check_libs=""
3153         test -n "$dash_r" && break
3154       done ;;
3155   esac
3156   if test -n "$dash_r";
3157     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3158     else echo "$ac_t""NONE" 1>&6
3159   fi
3160 fi
3161
3162 xe_add_unique_runpath_dir='
3163   xe_add_p=yes
3164   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3165   done
3166   if test "$xe_add_p" = "yes"; then
3167     test -n "$runpath" && runpath="${runpath}:"
3168     runpath="${runpath}${xe_runpath_dir}"
3169     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3170   fi'
3171
3172
3173
3174
3175 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3176     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3177   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3178   
3179         runpath="" runpath_dirs=""
3180   if test -n "$LD_RUN_PATH"; then
3181     runpath="$LD_RUN_PATH"
3182   elif test "$GCC" = "yes"; then
3183         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3184     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3185     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3186     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3187       case "$arg" in P,* | -L* | -R* )
3188         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3189           {
3190 xe_runpath_dir="$dir"
3191   test "$xe_runpath_dir" != "/lib"     -a \
3192         "$xe_runpath_dir" != "/usr/lib" -a \
3193         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3194   eval "$xe_add_unique_runpath_dir"
3195 }
3196         done ;;
3197       esac
3198     done
3199     ld_switch_run="$ld_switch_run_save"
3200     rm -f conftest*
3201   else
3202         for arg in $ld_switch_site $ld_switch_x_site; do
3203       case "$arg" in -L*) {
3204 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3205   test "$xe_runpath_dir" != "/lib"     -a \
3206         "$xe_runpath_dir" != "/usr/lib" -a \
3207         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3208   eval "$xe_add_unique_runpath_dir"
3209 };; esac
3210     done
3211         if test "$opsys $need_motif" = "sol2 yes"; then
3212       xe_runpath_dir="/opt/SUNWdt/lib";
3213       eval "$xe_add_unique_runpath_dir";
3214     fi
3215   fi 
3216   if test -n "$runpath"; then
3217     ld_switch_run="${dash_r}${runpath}"
3218     
3219 if test "$GCC" = "yes"; then
3220   set x $ld_switch_run; shift; ld_switch_run=""
3221   while test -n "$1"; do
3222     case $1 in
3223       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3224       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3225       -Xlinker* ) ;;
3226       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3227     esac
3228     shift
3229   done
3230 fi
3231     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3232   fi
3233 fi
3234
3235
3236
3237 GNU_MALLOC=yes
3238 if test "$with_dlmalloc" != "no"; then
3239         doug_lea_malloc=yes
3240 else
3241         doug_lea_malloc=no
3242 fi
3243 after_morecore_hook_exists=yes
3244 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3245 echo "configure:3246: checking for malloc_set_state" >&5
3246
3247 cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250 /* System header to define __stub macros and hopefully few prototypes,
3251     which can conflict with char malloc_set_state(); below.  */
3252 #include <assert.h>
3253 /* Override any gcc2 internal prototype to avoid an error.  */
3254 /* We use char because int might match the return type of a gcc2
3255     builtin and then its argument prototype would still apply.  */
3256 char malloc_set_state();
3257
3258 int main() {
3259
3260 /* The GNU C library defines this for functions which it implements
3261     to always fail with ENOSYS.  Some functions are actually named
3262     something starting with __ and the normal name is an alias.  */
3263 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3264 choke me
3265 #else
3266 malloc_set_state();
3267 #endif
3268
3269 ; return 0; }
3270 EOF
3271 if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3272   rm -rf conftest*
3273   eval "ac_cv_func_malloc_set_state=yes"
3274 else
3275   echo "configure: failed program was:" >&5
3276   cat conftest.$ac_ext >&5
3277   rm -rf conftest*
3278   eval "ac_cv_func_malloc_set_state=no"
3279 fi
3280 rm -f conftest*
3281
3282 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3283   echo "$ac_t""yes" 1>&6
3284   :
3285 else
3286   echo "$ac_t""no" 1>&6
3287 doug_lea_malloc=no
3288 fi
3289
3290 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3291 echo "configure:3292: checking whether __after_morecore_hook exists" >&5
3292 cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295 extern void (* __after_morecore_hook)();
3296 int main() {
3297 __after_morecore_hook = 0
3298 ; return 0; }
3299 EOF
3300 if { (eval echo configure:3301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3301   rm -rf conftest*
3302   echo "$ac_t""yes" 1>&6
3303 else
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   echo "$ac_t""no" 1>&6
3308    after_morecore_hook_exists=no
3309 fi
3310 rm -f conftest*
3311 if test "$system_malloc" = "yes" ; then
3312   GNU_MALLOC=no
3313   GNU_MALLOC_reason="
3314     - The GNU allocators don't work with this system configuration."
3315 elif test "$with_system_malloc" = "yes" ; then
3316   GNU_MALLOC=no
3317   GNU_MALLOC_reason="
3318     - User chose not to use GNU allocators."
3319 elif test "$with_debug_malloc" = "yes" ; then
3320   GNU_MALLOC=no
3321   GNU_MALLOC_reason="
3322     - User chose to use Debugging Malloc."
3323 fi
3324
3325 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3326   GNU_MALLOC_reason="
3327     - Using Doug Lea's new malloc from the GNU C Library."
3328   { test "$extra_verbose" = "yes" && cat << \EOF
3329     Defining DOUG_LEA_MALLOC
3330 EOF
3331 cat >> confdefs.h <<\EOF
3332 #define DOUG_LEA_MALLOC 1
3333 EOF
3334 }
3335
3336   if test "$after_morecore_hook_exists" = "no" ; then
3337     GNU_MALLOC_reason="
3338     - Using Doug Lea's new malloc from the Linux C Library."
3339     { test "$extra_verbose" = "yes" && cat << \EOF
3340     Defining _NO_MALLOC_WARNING_
3341 EOF
3342 cat >> confdefs.h <<\EOF
3343 #define _NO_MALLOC_WARNING_ 1
3344 EOF
3345 }
3346
3347   fi
3348 fi
3349
3350
3351
3352
3353 # Extract the first word of "ranlib", so it can be a program name with args.
3354 set dummy ranlib; ac_word=$2
3355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3356 echo "configure:3357: checking for $ac_word" >&5
3357
3358 if test -n "$RANLIB"; then
3359   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3360 else
3361   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3362   ac_dummy="$PATH"
3363   for ac_dir in $ac_dummy; do
3364     test -z "$ac_dir" && ac_dir=.
3365     if test -f $ac_dir/$ac_word; then
3366       ac_cv_prog_RANLIB="ranlib"
3367       break
3368     fi
3369   done
3370   IFS="$ac_save_ifs"
3371   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3372 fi
3373 RANLIB="$ac_cv_prog_RANLIB"
3374 if test -n "$RANLIB"; then
3375   echo "$ac_t""$RANLIB" 1>&6
3376 else
3377   echo "$ac_t""no" 1>&6
3378 fi
3379
3380 ac_aux_dir=
3381 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3382   if test -f $ac_dir/install-sh; then
3383     ac_aux_dir=$ac_dir
3384     ac_install_sh="$ac_aux_dir/install-sh -c"
3385     break
3386   elif test -f $ac_dir/install.sh; then
3387     ac_aux_dir=$ac_dir
3388     ac_install_sh="$ac_aux_dir/install.sh -c"
3389     break
3390   fi
3391 done
3392 if test -z "$ac_aux_dir"; then
3393   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3394 fi
3395 ac_config_guess=$ac_aux_dir/config.guess
3396 ac_config_sub=$ac_aux_dir/config.sub
3397 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3398
3399 # Find a good install program.  We prefer a C program (faster),
3400 # so one script is as good as another.  But avoid the broken or
3401 # incompatible versions:
3402 # SysV /etc/install, /usr/sbin/install
3403 # SunOS /usr/etc/install
3404 # IRIX /sbin/install
3405 # AIX /bin/install
3406 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3407 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3408 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3409 # ./install, which can be erroneously created by make from ./install.sh.
3410 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3411 echo "configure:3412: checking for a BSD compatible install" >&5
3412 if test -z "$INSTALL"; then
3413
3414   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3415   for ac_dir in $PATH; do
3416     # Account for people who put trailing slashes in PATH elements.
3417     case "$ac_dir/" in
3418     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3419     *)
3420       # OSF1 and SCO ODT 3.0 have their own names for install.
3421       # Don't use installbsd from OSF since it installs stuff as root
3422       # by default.
3423       for ac_prog in ginstall scoinst install; do
3424         if test -f $ac_dir/$ac_prog; then
3425           if test $ac_prog = install &&
3426             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3427             # AIX install.  It has an incompatible calling convention.
3428             :
3429           else
3430             ac_cv_path_install="$ac_dir/$ac_prog -c"
3431             break 2
3432           fi
3433         fi
3434       done
3435       ;;
3436     esac
3437   done
3438   IFS="$ac_save_IFS"
3439
3440   if test "${ac_cv_path_install+set}" = set; then
3441     INSTALL="$ac_cv_path_install"
3442   else
3443     # As a last resort, use the slow shell script.  We don't cache a
3444     # path for INSTALL within a source directory, because that will
3445     # break other packages using the cache if that directory is
3446     # removed, or if the path is relative.
3447     INSTALL="$ac_install_sh"
3448   fi
3449 fi
3450 echo "$ac_t""$INSTALL" 1>&6
3451
3452 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3453 # It thinks the first close brace ends the variable substitution.
3454 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3455
3456 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3457
3458 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3459
3460 for ac_prog in 'bison -y' byacc
3461 do
3462 # Extract the first word of "$ac_prog", so it can be a program name with args.
3463 set dummy $ac_prog; ac_word=$2
3464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3465 echo "configure:3466: checking for $ac_word" >&5
3466
3467 if test -n "$YACC"; then
3468   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3469 else
3470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3471   ac_dummy="$PATH"
3472   for ac_dir in $ac_dummy; do
3473     test -z "$ac_dir" && ac_dir=.
3474     if test -f $ac_dir/$ac_word; then
3475       ac_cv_prog_YACC="$ac_prog"
3476       break
3477     fi
3478   done
3479   IFS="$ac_save_ifs"
3480 fi
3481 YACC="$ac_cv_prog_YACC"
3482 if test -n "$YACC"; then
3483   echo "$ac_t""$YACC" 1>&6
3484 else
3485   echo "$ac_t""no" 1>&6
3486 fi
3487
3488 test -n "$YACC" && break
3489 done
3490 test -n "$YACC" || YACC="yacc"
3491
3492
3493 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 
3494 do
3495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3497 echo "configure:3498: checking for $ac_hdr" >&5
3498
3499 cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502 #include <$ac_hdr>
3503 EOF
3504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3505 { (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3507 if test -z "$ac_err"; then
3508   rm -rf conftest*
3509   eval "ac_cv_header_$ac_safe=yes"
3510 else
3511   echo "$ac_err" >&5
3512   echo "configure: failed program was:" >&5
3513   cat conftest.$ac_ext >&5
3514   rm -rf conftest*
3515   eval "ac_cv_header_$ac_safe=no"
3516 fi
3517 rm -f conftest*
3518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3519   echo "$ac_t""yes" 1>&6
3520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3521   { test "$extra_verbose" = "yes" && cat << EOF
3522     Defining $ac_tr_hdr
3523 EOF
3524 cat >> confdefs.h <<EOF
3525 #define $ac_tr_hdr 1
3526 EOF
3527 }
3528  
3529 else
3530   echo "$ac_t""no" 1>&6
3531 fi
3532 done
3533
3534 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3535 echo "configure:3536: checking for sys/wait.h that is POSIX.1 compatible" >&5
3536
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 #include <sys/types.h>
3541 #include <sys/wait.h>
3542 #ifndef WEXITSTATUS
3543 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3544 #endif
3545 #ifndef WIFEXITED
3546 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3547 #endif
3548 int main() {
3549 int s;
3550 wait (&s);
3551 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3552 ; return 0; }
3553 EOF
3554 if { (eval echo configure:3555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3555   rm -rf conftest*
3556   ac_cv_header_sys_wait_h=yes
3557 else
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   ac_cv_header_sys_wait_h=no
3562 fi
3563 rm -f conftest*
3564
3565 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3566 if test $ac_cv_header_sys_wait_h = yes; then
3567   { test "$extra_verbose" = "yes" && cat << \EOF
3568     Defining HAVE_SYS_WAIT_H
3569 EOF
3570 cat >> confdefs.h <<\EOF
3571 #define HAVE_SYS_WAIT_H 1
3572 EOF
3573 }
3574
3575 fi
3576
3577 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3578 echo "configure:3579: checking for ANSI C header files" >&5
3579
3580 cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <stdlib.h>
3584 #include <stdarg.h>
3585 #include <string.h>
3586 #include <float.h>
3587 EOF
3588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3589 { (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3591 if test -z "$ac_err"; then
3592   rm -rf conftest*
3593   ac_cv_header_stdc=yes
3594 else
3595   echo "$ac_err" >&5
3596   echo "configure: failed program was:" >&5
3597   cat conftest.$ac_ext >&5
3598   rm -rf conftest*
3599   ac_cv_header_stdc=no
3600 fi
3601 rm -f conftest*
3602
3603 if test $ac_cv_header_stdc = yes; then
3604   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <string.h>
3609 EOF
3610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3611   egrep "memchr" >/dev/null 2>&1; then
3612   :
3613 else
3614   rm -rf conftest*
3615   ac_cv_header_stdc=no
3616 fi
3617 rm -f conftest*
3618
3619 fi
3620
3621 if test $ac_cv_header_stdc = yes; then
3622   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <stdlib.h>
3627 EOF
3628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3629   egrep "free" >/dev/null 2>&1; then
3630   :
3631 else
3632   rm -rf conftest*
3633   ac_cv_header_stdc=no
3634 fi
3635 rm -f conftest*
3636
3637 fi
3638
3639 if test $ac_cv_header_stdc = yes; then
3640   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <ctype.h>
3645 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3646 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3647 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3648 int main () { int i; for (i = 0; i < 256; i++)
3649 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3650 exit (0); }
3651
3652 EOF
3653 if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3654 then
3655   :
3656 else
3657   conftest_rc="$?"
3658   echo "configure: failed program was:" >&5
3659   cat conftest.$ac_ext >&5
3660   rm -fr conftest*
3661   ac_cv_header_stdc=no
3662 fi
3663 rm -fr conftest*
3664 fi
3665
3666 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3667 if test $ac_cv_header_stdc = yes; then
3668   { test "$extra_verbose" = "yes" && cat << \EOF
3669     Defining STDC_HEADERS
3670 EOF
3671 cat >> confdefs.h <<\EOF
3672 #define STDC_HEADERS 1
3673 EOF
3674 }
3675
3676 fi
3677
3678 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3679 echo "configure:3680: checking whether time.h and sys/time.h may both be included" >&5
3680
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684 #include <sys/types.h>
3685 #include <sys/time.h>
3686 #include <time.h>
3687 int main() {
3688 struct tm *tp;
3689 ; return 0; }
3690 EOF
3691 if { (eval echo configure:3692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3692   rm -rf conftest*
3693   ac_cv_header_time=yes
3694 else
3695   echo "configure: failed program was:" >&5
3696   cat conftest.$ac_ext >&5
3697   rm -rf conftest*
3698   ac_cv_header_time=no
3699 fi
3700 rm -f conftest*
3701
3702 echo "$ac_t""$ac_cv_header_time" 1>&6
3703 if test $ac_cv_header_time = yes; then
3704   { test "$extra_verbose" = "yes" && cat << \EOF
3705     Defining TIME_WITH_SYS_TIME
3706 EOF
3707 cat >> confdefs.h <<\EOF
3708 #define TIME_WITH_SYS_TIME 1
3709 EOF
3710 }
3711
3712 fi
3713
3714 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3715 echo "configure:3716: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3716
3717 cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <sys/types.h>
3721 #include <signal.h>
3722 /* NetBSD declares sys_siglist in unistd.h.  */
3723 #ifdef HAVE_UNISTD_H
3724 #include <unistd.h>
3725 #endif
3726 int main() {
3727 char *msg = *(sys_siglist + 1);
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3731   rm -rf conftest*
3732   ac_cv_decl_sys_siglist=yes
3733 else
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   ac_cv_decl_sys_siglist=no
3738 fi
3739 rm -f conftest*
3740
3741 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3742 if test $ac_cv_decl_sys_siglist = yes; then
3743   { test "$extra_verbose" = "yes" && cat << \EOF
3744     Defining SYS_SIGLIST_DECLARED
3745 EOF
3746 cat >> confdefs.h <<\EOF
3747 #define SYS_SIGLIST_DECLARED 1
3748 EOF
3749 }
3750
3751 fi
3752
3753
3754
3755 echo $ac_n "checking for utime""... $ac_c" 1>&6
3756 echo "configure:3757: checking for utime" >&5
3757 cat > conftest.$ac_ext <<EOF
3758 #line 3759 "configure"
3759 #include "confdefs.h"
3760 #include <sys/types.h>
3761 #include <utime.h>
3762 int main() {
3763 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3767   rm -rf conftest*
3768   echo "$ac_t""yes" 1>&6
3769    { test "$extra_verbose" = "yes" && cat << \EOF
3770     Defining HAVE_UTIME
3771 EOF
3772 cat >> confdefs.h <<\EOF
3773 #define HAVE_UTIME 1
3774 EOF
3775 }
3776
3777 else
3778   echo "configure: failed program was:" >&5
3779   cat conftest.$ac_ext >&5
3780   rm -rf conftest*
3781   echo "$ac_t""no" 1>&6
3782       for ac_func in utimes
3783 do
3784 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3785 echo "configure:3786: checking for $ac_func" >&5
3786
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3790 /* System header to define __stub macros and hopefully few prototypes,
3791     which can conflict with char $ac_func(); below.  */
3792 #include <assert.h>
3793 /* Override any gcc2 internal prototype to avoid an error.  */
3794 /* We use char because int might match the return type of a gcc2
3795     builtin and then its argument prototype would still apply.  */
3796 char $ac_func();
3797
3798 int main() {
3799
3800 /* The GNU C library defines this for functions which it implements
3801     to always fail with ENOSYS.  Some functions are actually named
3802     something starting with __ and the normal name is an alias.  */
3803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3804 choke me
3805 #else
3806 $ac_func();
3807 #endif
3808
3809 ; return 0; }
3810 EOF
3811 if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3812   rm -rf conftest*
3813   eval "ac_cv_func_$ac_func=yes"
3814 else
3815   echo "configure: failed program was:" >&5
3816   cat conftest.$ac_ext >&5
3817   rm -rf conftest*
3818   eval "ac_cv_func_$ac_func=no"
3819 fi
3820 rm -f conftest*
3821
3822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3823   echo "$ac_t""yes" 1>&6
3824     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3825   { test "$extra_verbose" = "yes" && cat << EOF
3826     Defining $ac_tr_func
3827 EOF
3828 cat >> confdefs.h <<EOF
3829 #define $ac_tr_func 1
3830 EOF
3831 }
3832  
3833 else
3834   echo "$ac_t""no" 1>&6
3835 fi
3836 done
3837
3838 fi
3839 rm -f conftest*
3840
3841
3842 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3843 echo "configure:3844: checking return type of signal handlers" >&5
3844
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 #include <sys/types.h>
3849 #include <signal.h>
3850 #ifdef signal
3851 #undef signal
3852 #endif
3853 #ifdef __cplusplus
3854 extern "C" void (*signal (int, void (*)(int)))(int);
3855 #else
3856 void (*signal ()) ();
3857 #endif
3858
3859 int main() {
3860 int i;
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3864   rm -rf conftest*
3865   ac_cv_type_signal=void
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   ac_cv_type_signal=int
3871 fi
3872 rm -f conftest*
3873
3874 echo "$ac_t""$ac_cv_type_signal" 1>&6
3875 { test "$extra_verbose" = "yes" && cat << EOF
3876     Defining RETSIGTYPE = $ac_cv_type_signal
3877 EOF
3878 cat >> confdefs.h <<EOF
3879 #define RETSIGTYPE $ac_cv_type_signal
3880 EOF
3881 }
3882
3883
3884 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3885 echo "configure:3886: checking for size_t" >&5
3886
3887 cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 #include <sys/types.h>
3891 #if STDC_HEADERS
3892 #include <stdlib.h>
3893 #include <stddef.h>
3894 #endif
3895 EOF
3896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3897   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3898   rm -rf conftest*
3899   ac_cv_type_size_t=yes
3900 else
3901   rm -rf conftest*
3902   ac_cv_type_size_t=no
3903 fi
3904 rm -f conftest*
3905
3906 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3907 if test $ac_cv_type_size_t = no; then
3908   { test "$extra_verbose" = "yes" && cat << \EOF
3909     Defining size_t = unsigned
3910 EOF
3911 cat >> confdefs.h <<\EOF
3912 #define size_t unsigned
3913 EOF
3914 }
3915
3916 fi
3917
3918 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3919 echo "configure:3920: checking for pid_t" >&5
3920
3921 cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <sys/types.h>
3925 #if STDC_HEADERS
3926 #include <stdlib.h>
3927 #include <stddef.h>
3928 #endif
3929 EOF
3930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3931   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3932   rm -rf conftest*
3933   ac_cv_type_pid_t=yes
3934 else
3935   rm -rf conftest*
3936   ac_cv_type_pid_t=no
3937 fi
3938 rm -f conftest*
3939
3940 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3941 if test $ac_cv_type_pid_t = no; then
3942   { test "$extra_verbose" = "yes" && cat << \EOF
3943     Defining pid_t = int
3944 EOF
3945 cat >> confdefs.h <<\EOF
3946 #define pid_t int
3947 EOF
3948 }
3949
3950 fi
3951
3952 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3953 echo "configure:3954: checking for uid_t in sys/types.h" >&5
3954
3955 cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958 #include <sys/types.h>
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "uid_t" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_uid_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_uid_t=no
3967 fi
3968 rm -f conftest*
3969
3970
3971 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3972 if test $ac_cv_type_uid_t = no; then
3973   { test "$extra_verbose" = "yes" && cat << \EOF
3974     Defining uid_t = int
3975 EOF
3976 cat >> confdefs.h <<\EOF
3977 #define uid_t int
3978 EOF
3979 }
3980
3981   { test "$extra_verbose" = "yes" && cat << \EOF
3982     Defining gid_t = int
3983 EOF
3984 cat >> confdefs.h <<\EOF
3985 #define gid_t int
3986 EOF
3987 }
3988
3989 fi
3990
3991 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3992 echo "configure:3993: checking for mode_t" >&5
3993
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <sys/types.h>
3998 #if STDC_HEADERS
3999 #include <stdlib.h>
4000 #include <stddef.h>
4001 #endif
4002 EOF
4003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4004   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4005   rm -rf conftest*
4006   ac_cv_type_mode_t=yes
4007 else
4008   rm -rf conftest*
4009   ac_cv_type_mode_t=no
4010 fi
4011 rm -f conftest*
4012
4013 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4014 if test $ac_cv_type_mode_t = no; then
4015   { test "$extra_verbose" = "yes" && cat << \EOF
4016     Defining mode_t = int
4017 EOF
4018 cat >> confdefs.h <<\EOF
4019 #define mode_t int
4020 EOF
4021 }
4022
4023 fi
4024
4025 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4026 echo "configure:4027: checking for off_t" >&5
4027
4028 cat > conftest.$ac_ext <<EOF
4029 #line 4030 "configure"
4030 #include "confdefs.h"
4031 #include <sys/types.h>
4032 #if STDC_HEADERS
4033 #include <stdlib.h>
4034 #include <stddef.h>
4035 #endif
4036 EOF
4037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4038   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4039   rm -rf conftest*
4040   ac_cv_type_off_t=yes
4041 else
4042   rm -rf conftest*
4043   ac_cv_type_off_t=no
4044 fi
4045 rm -f conftest*
4046
4047 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4048 if test $ac_cv_type_off_t = no; then
4049   { test "$extra_verbose" = "yes" && cat << \EOF
4050     Defining off_t = long
4051 EOF
4052 cat >> confdefs.h <<\EOF
4053 #define off_t long
4054 EOF
4055 }
4056
4057 fi
4058
4059 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4060 echo "configure:4061: checking for ssize_t" >&5
4061
4062 cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <sys/types.h>
4066 #if STDC_HEADERS
4067 #include <stdlib.h>
4068 #include <stddef.h>
4069 #endif
4070 EOF
4071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4072   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4073   rm -rf conftest*
4074   ac_cv_type_ssize_t=yes
4075 else
4076   rm -rf conftest*
4077   ac_cv_type_ssize_t=no
4078 fi
4079 rm -f conftest*
4080
4081 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4082 if test $ac_cv_type_ssize_t = no; then
4083   { test "$extra_verbose" = "yes" && cat << \EOF
4084     Defining ssize_t = int
4085 EOF
4086 cat >> confdefs.h <<\EOF
4087 #define ssize_t int
4088 EOF
4089 }
4090
4091 fi
4092
4093
4094 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4095 echo "configure:4096: checking for socklen_t" >&5
4096 cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099 #include <sys/types.h>
4100 #include <sys/socket.h>
4101 socklen_t x;
4102
4103 int main() {
4104
4105 ; return 0; }
4106 EOF
4107 if { (eval echo configure:4108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4108   rm -rf conftest*
4109   echo "$ac_t""yes" 1>&6
4110 else
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -rf conftest*
4114   
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 #include <sys/types.h>
4119 #include <sys/socket.h>
4120 int accept (int, struct sockaddr *, size_t *);
4121
4122 int main() {
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127   rm -rf conftest*
4128   
4129 echo "$ac_t""size_t" 1>&6
4130 { test "$extra_verbose" = "yes" && cat << \EOF
4131     Defining socklen_t = size_t
4132 EOF
4133 cat >> confdefs.h <<\EOF
4134 #define socklen_t size_t
4135 EOF
4136 }
4137
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -rf conftest*
4142   
4143 echo "$ac_t""int" 1>&6
4144 { test "$extra_verbose" = "yes" && cat << \EOF
4145     Defining socklen_t = int
4146 EOF
4147 cat >> confdefs.h <<\EOF
4148 #define socklen_t int
4149 EOF
4150 }
4151
4152 fi
4153 rm -f conftest*
4154 fi
4155 rm -f conftest*
4156
4157 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4158 echo "configure:4159: checking for struct timeval" >&5
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #ifdef TIME_WITH_SYS_TIME
4163 #include <sys/time.h>
4164 #include <time.h>
4165 #else
4166 #ifdef HAVE_SYS_TIME_H
4167 #include <sys/time.h>
4168 #else
4169 #include <time.h>
4170 #endif
4171 #endif
4172 int main() {
4173 static struct timeval x; x.tv_sec = x.tv_usec;
4174 ; return 0; }
4175 EOF
4176 if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4177   rm -rf conftest*
4178   echo "$ac_t""yes" 1>&6
4179   HAVE_TIMEVAL=yes
4180   { test "$extra_verbose" = "yes" && cat << \EOF
4181     Defining HAVE_TIMEVAL
4182 EOF
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_TIMEVAL 1
4185 EOF
4186 }
4187
4188 else
4189   echo "configure: failed program was:" >&5
4190   cat conftest.$ac_ext >&5
4191   rm -rf conftest*
4192   echo "$ac_t""no" 1>&6
4193    HAVE_TIMEVAL=no
4194 fi
4195 rm -f conftest*
4196
4197 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4198 echo "configure:4199: checking whether struct tm is in sys/time.h or time.h" >&5
4199
4200 cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <sys/types.h>
4204 #include <time.h>
4205 int main() {
4206 struct tm *tp; tp->tm_sec;
4207 ; return 0; }
4208 EOF
4209 if { (eval echo configure:4210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4210   rm -rf conftest*
4211   ac_cv_struct_tm=time.h
4212 else
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   ac_cv_struct_tm=sys/time.h
4217 fi
4218 rm -f conftest*
4219
4220 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4221 if test $ac_cv_struct_tm = sys/time.h; then
4222   { test "$extra_verbose" = "yes" && cat << \EOF
4223     Defining TM_IN_SYS_TIME
4224 EOF
4225 cat >> confdefs.h <<\EOF
4226 #define TM_IN_SYS_TIME 1
4227 EOF
4228 }
4229
4230 fi
4231
4232 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4233 echo "configure:4234: checking for tm_zone in struct tm" >&5
4234
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <sys/types.h>
4239 #include <$ac_cv_struct_tm>
4240 int main() {
4241 struct tm tm; tm.tm_zone;
4242 ; return 0; }
4243 EOF
4244 if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4245   rm -rf conftest*
4246   ac_cv_struct_tm_zone=yes
4247 else
4248   echo "configure: failed program was:" >&5
4249   cat conftest.$ac_ext >&5
4250   rm -rf conftest*
4251   ac_cv_struct_tm_zone=no
4252 fi
4253 rm -f conftest*
4254
4255 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4256 if test "$ac_cv_struct_tm_zone" = yes; then
4257   { test "$extra_verbose" = "yes" && cat << \EOF
4258     Defining HAVE_TM_ZONE
4259 EOF
4260 cat >> confdefs.h <<\EOF
4261 #define HAVE_TM_ZONE 1
4262 EOF
4263 }
4264
4265 else
4266   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4267 echo "configure:4268: checking for tzname" >&5
4268
4269 cat > conftest.$ac_ext <<EOF
4270 #line 4271 "configure"
4271 #include "confdefs.h"
4272 #include <time.h>
4273 #ifndef tzname /* For SGI.  */
4274 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4275 #endif
4276 int main() {
4277 atoi(*tzname);
4278 ; return 0; }
4279 EOF
4280 if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4281   rm -rf conftest*
4282   ac_cv_var_tzname=yes
4283 else
4284   echo "configure: failed program was:" >&5
4285   cat conftest.$ac_ext >&5
4286   rm -rf conftest*
4287   ac_cv_var_tzname=no
4288 fi
4289 rm -f conftest*
4290
4291 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4292   if test $ac_cv_var_tzname = yes; then
4293     { test "$extra_verbose" = "yes" && cat << \EOF
4294     Defining HAVE_TZNAME
4295 EOF
4296 cat >> confdefs.h <<\EOF
4297 #define HAVE_TZNAME 1
4298 EOF
4299 }
4300
4301   fi
4302 fi
4303
4304
4305 echo $ac_n "checking for working const""... $ac_c" 1>&6
4306 echo "configure:4307: checking for working const" >&5
4307
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311
4312 int main() {
4313
4314 /* Ultrix mips cc rejects this.  */
4315 typedef int charset[2]; const charset x;
4316 /* SunOS 4.1.1 cc rejects this.  */
4317 char const *const *ccp;
4318 char **p;
4319 /* NEC SVR4.0.2 mips cc rejects this.  */
4320 struct point {int x, y;};
4321 static struct point const zero = {0,0};
4322 /* AIX XL C 1.02.0.0 rejects this.
4323    It does not let you subtract one const X* pointer from another in an arm
4324    of an if-expression whose if-part is not a constant expression */
4325 const char *g = "string";
4326 ccp = &g + (g ? g-g : 0);
4327 /* HPUX 7.0 cc rejects these. */
4328 ++ccp;
4329 p = (char**) ccp;
4330 ccp = (char const *const *) p;
4331 { /* SCO 3.2v4 cc rejects this.  */
4332   char *t;
4333   char const *s = 0 ? (char *) 0 : (char const *) 0;
4334
4335   *t++ = 0;
4336 }
4337 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4338   int x[] = {25, 17};
4339   const int *foo = &x[0];
4340   ++foo;
4341 }
4342 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4343   typedef const int *iptr;
4344   iptr p = 0;
4345   ++p;
4346 }
4347 { /* AIX XL C 1.02.0.0 rejects this saying
4348      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4349   struct s { int j; const int *ap[3]; };
4350   struct s *b; b->j = 5;
4351 }
4352 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4353   const int foo = 10;
4354 }
4355
4356 ; return 0; }
4357 EOF
4358 if { (eval echo configure:4359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4359   rm -rf conftest*
4360   ac_cv_c_const=yes
4361 else
4362   echo "configure: failed program was:" >&5
4363   cat conftest.$ac_ext >&5
4364   rm -rf conftest*
4365   ac_cv_c_const=no
4366 fi
4367 rm -f conftest*
4368
4369 echo "$ac_t""$ac_cv_c_const" 1>&6
4370 if test $ac_cv_c_const = no; then
4371   { test "$extra_verbose" = "yes" && cat << \EOF
4372     Defining const = 
4373 EOF
4374 cat >> confdefs.h <<\EOF
4375 #define const 
4376 EOF
4377 }
4378
4379 fi
4380
4381
4382 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4383 echo "configure:4384: checking whether ${MAKE-make} sets \${MAKE}" >&5
4384 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4385
4386 cat > conftestmake <<\EOF
4387 all:
4388         @echo 'ac_maketemp="${MAKE}"'
4389 EOF
4390 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4391 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4392 if test -n "$ac_maketemp"; then
4393   eval ac_cv_prog_make_${ac_make}_set=yes
4394 else
4395   eval ac_cv_prog_make_${ac_make}_set=no
4396 fi
4397 rm -f conftestmake
4398 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4399   echo "$ac_t""yes" 1>&6
4400   SET_MAKE=
4401 else
4402   echo "$ac_t""no" 1>&6
4403   SET_MAKE="MAKE=${MAKE-make}"
4404 fi
4405
4406
4407 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4408 echo "configure:4409: checking whether byte ordering is bigendian" >&5
4409
4410 ac_cv_c_bigendian=unknown
4411 # See if sys/param.h defines the BYTE_ORDER macro.
4412 cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 #include <sys/types.h>
4416 #include <sys/param.h>
4417 int main() {
4418
4419 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4420  bogus endian macros
4421 #endif
4422 ; return 0; }
4423 EOF
4424 if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4425   rm -rf conftest*
4426   # It does; now see whether it defined to BIG_ENDIAN or not.
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <sys/types.h>
4431 #include <sys/param.h>
4432 int main() {
4433
4434 #if BYTE_ORDER != BIG_ENDIAN
4435  not big endian
4436 #endif
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4440   rm -rf conftest*
4441   ac_cv_c_bigendian=yes
4442 else
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   ac_cv_c_bigendian=no
4447 fi
4448 rm -f conftest*
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452 fi
4453 rm -f conftest*
4454 if test $ac_cv_c_bigendian = unknown; then
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 main () {
4459   /* Are we little or big endian?  From Harbison&Steele.  */
4460   union
4461   {
4462     long l;
4463     char c[sizeof (long)];
4464   } u;
4465   u.l = 1;
4466   exit (u.c[sizeof (long) - 1] == 1);
4467 }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4470 then
4471   ac_cv_c_bigendian=no
4472 else
4473   conftest_rc="$?"
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -fr conftest*
4477   ac_cv_c_bigendian=yes
4478 fi
4479 rm -fr conftest*
4480 fi
4481
4482 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4483 if test $ac_cv_c_bigendian = yes; then
4484   { test "$extra_verbose" = "yes" && cat << \EOF
4485     Defining WORDS_BIGENDIAN
4486 EOF
4487 cat >> confdefs.h <<\EOF
4488 #define WORDS_BIGENDIAN 1
4489 EOF
4490 }
4491
4492 fi
4493
4494
4495 echo $ac_n "checking size of short""... $ac_c" 1>&6
4496 echo "configure:4497: checking size of short" >&5
4497
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 #include <stdio.h>
4502 main()
4503 {
4504   FILE *f=fopen("conftestval", "w");
4505   if (!f) exit(1);
4506   fprintf(f, "%d\n", sizeof(short));
4507   exit(0);
4508 }
4509 EOF
4510 if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4511 then
4512   ac_cv_sizeof_short=`cat conftestval`
4513 else
4514   conftest_rc="$?"
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -fr conftest*
4518   ac_cv_sizeof_short=0
4519 fi
4520 rm -fr conftest*
4521 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4522 { test "$extra_verbose" = "yes" && cat << EOF
4523     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4524 EOF
4525 cat >> confdefs.h <<EOF
4526 #define SIZEOF_SHORT $ac_cv_sizeof_short
4527 EOF
4528 }
4529
4530
4531 if test "$ac_cv_sizeof_short" = 0; then
4532   echo ""
4533   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4534   echo "*** PANIC *** Please examine config.log for compilation errors."
4535   exit 1
4536 fi
4537 echo $ac_n "checking size of int""... $ac_c" 1>&6
4538 echo "configure:4539: checking size of int" >&5
4539
4540 cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543 #include <stdio.h>
4544 main()
4545 {
4546   FILE *f=fopen("conftestval", "w");
4547   if (!f) exit(1);
4548   fprintf(f, "%d\n", sizeof(int));
4549   exit(0);
4550 }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4553 then
4554   ac_cv_sizeof_int=`cat conftestval`
4555 else
4556   conftest_rc="$?"
4557   echo "configure: failed program was:" >&5
4558   cat conftest.$ac_ext >&5
4559   rm -fr conftest*
4560   ac_cv_sizeof_int=0
4561 fi
4562 rm -fr conftest*
4563 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4564 { test "$extra_verbose" = "yes" && cat << EOF
4565     Defining SIZEOF_INT = $ac_cv_sizeof_int
4566 EOF
4567 cat >> confdefs.h <<EOF
4568 #define SIZEOF_INT $ac_cv_sizeof_int
4569 EOF
4570 }
4571
4572
4573 echo $ac_n "checking size of long""... $ac_c" 1>&6
4574 echo "configure:4575: checking size of long" >&5
4575
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 #include <stdio.h>
4580 main()
4581 {
4582   FILE *f=fopen("conftestval", "w");
4583   if (!f) exit(1);
4584   fprintf(f, "%d\n", sizeof(long));
4585   exit(0);
4586 }
4587 EOF
4588 if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4589 then
4590   ac_cv_sizeof_long=`cat conftestval`
4591 else
4592   conftest_rc="$?"
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -fr conftest*
4596   ac_cv_sizeof_long=0
4597 fi
4598 rm -fr conftest*
4599 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4600 { test "$extra_verbose" = "yes" && cat << EOF
4601     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4602 EOF
4603 cat >> confdefs.h <<EOF
4604 #define SIZEOF_LONG $ac_cv_sizeof_long
4605 EOF
4606 }
4607
4608
4609 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4610 echo "configure:4611: checking size of long long" >&5
4611
4612 cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615 #include <stdio.h>
4616 main()
4617 {
4618   FILE *f=fopen("conftestval", "w");
4619   if (!f) exit(1);
4620   fprintf(f, "%d\n", sizeof(long long));
4621   exit(0);
4622 }
4623 EOF
4624 if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4625 then
4626   ac_cv_sizeof_long_long=`cat conftestval`
4627 else
4628   conftest_rc="$?"
4629   echo "configure: failed program was:" >&5
4630   cat conftest.$ac_ext >&5
4631   rm -fr conftest*
4632   ac_cv_sizeof_long_long=0
4633 fi
4634 rm -fr conftest*
4635 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4636 { test "$extra_verbose" = "yes" && cat << EOF
4637     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4638 EOF
4639 cat >> confdefs.h <<EOF
4640 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4641 EOF
4642 }
4643
4644
4645 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4646 echo "configure:4647: checking size of void *" >&5
4647
4648 cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 #include <stdio.h>
4652 main()
4653 {
4654   FILE *f=fopen("conftestval", "w");
4655   if (!f) exit(1);
4656   fprintf(f, "%d\n", sizeof(void *));
4657   exit(0);
4658 }
4659 EOF
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4661 then
4662   ac_cv_sizeof_void_p=`cat conftestval`
4663 else
4664   conftest_rc="$?"
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -fr conftest*
4668   ac_cv_sizeof_void_p=0
4669 fi
4670 rm -fr conftest*
4671 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4672 { test "$extra_verbose" = "yes" && cat << EOF
4673     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4674 EOF
4675 cat >> confdefs.h <<EOF
4676 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4677 EOF
4678 }
4679
4680
4681
4682 case $opsys in
4683   cygwin* ) cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686 #include <cygwin/types.h>
4687 EOF
4688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4689   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4690   rm -rf conftest*
4691   echo "$ac_t""yes" 1>&6
4692                              { test "$extra_verbose" = "yes" && cat << \EOF
4693     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4694 EOF
4695 cat >> confdefs.h <<\EOF
4696 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4697 EOF
4698 }
4699
4700 else
4701   rm -rf conftest*
4702   echo "$ac_t""no" 1>&6
4703 fi
4704 rm -f conftest*
4705  ;;
4706 esac
4707
4708 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4709 echo "configure:4710: checking for long file names" >&5
4710
4711 ac_cv_sys_long_file_names=yes
4712 # Test for long file names in all the places we know might matter:
4713 #      .                the current directory, where building will happen
4714 #      $prefix/lib      where we will be installing things
4715 #      $exec_prefix/lib likewise
4716 # eval it to expand exec_prefix.
4717 #      $TMPDIR          if set, where it might want to write temporary files
4718 # if $TMPDIR is not set:
4719 #      /tmp             where it might want to write temporary files
4720 #      /var/tmp         likewise
4721 #      /usr/tmp         likewise
4722 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4723   ac_tmpdirs="$TMPDIR"
4724 else
4725   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4726 fi
4727 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4728   test -d $ac_dir || continue
4729   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4730   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4731   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4732   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4733   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4734     ac_cv_sys_long_file_names=no
4735     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4736     break
4737   fi
4738   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4739 done
4740
4741 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4742 if test $ac_cv_sys_long_file_names = yes; then
4743   { test "$extra_verbose" = "yes" && cat << \EOF
4744     Defining HAVE_LONG_FILE_NAMES
4745 EOF
4746 cat >> confdefs.h <<\EOF
4747 #define HAVE_LONG_FILE_NAMES 1
4748 EOF
4749 }
4750
4751 fi
4752
4753
4754 echo $ac_n "checking for sin""... $ac_c" 1>&6
4755 echo "configure:4756: checking for sin" >&5
4756
4757 cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4760 /* System header to define __stub macros and hopefully few prototypes,
4761     which can conflict with char sin(); below.  */
4762 #include <assert.h>
4763 /* Override any gcc2 internal prototype to avoid an error.  */
4764 /* We use char because int might match the return type of a gcc2
4765     builtin and then its argument prototype would still apply.  */
4766 char sin();
4767
4768 int main() {
4769
4770 /* The GNU C library defines this for functions which it implements
4771     to always fail with ENOSYS.  Some functions are actually named
4772     something starting with __ and the normal name is an alias.  */
4773 #if defined (__stub_sin) || defined (__stub___sin)
4774 choke me
4775 #else
4776 sin();
4777 #endif
4778
4779 ; return 0; }
4780 EOF
4781 if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4782   rm -rf conftest*
4783   eval "ac_cv_func_sin=yes"
4784 else
4785   echo "configure: failed program was:" >&5
4786   cat conftest.$ac_ext >&5
4787   rm -rf conftest*
4788   eval "ac_cv_func_sin=no"
4789 fi
4790 rm -f conftest*
4791
4792 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4793   echo "$ac_t""yes" 1>&6
4794   :
4795 else
4796   echo "$ac_t""no" 1>&6
4797
4798 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4799 echo "configure:4800: checking for sin in -lm" >&5
4800 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4801
4802 xe_check_libs=" -lm "
4803 cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806 /* Override any gcc2 internal prototype to avoid an error.  */
4807 /* We use char because int might match the return type of a gcc2
4808     builtin and then its argument prototype would still apply.  */
4809 char sin();
4810
4811 int main() {
4812 sin()
4813 ; return 0; }
4814 EOF
4815 if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4816   rm -rf conftest*
4817   eval "ac_cv_lib_$ac_lib_var=yes"
4818 else
4819   echo "configure: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   rm -rf conftest*
4822   eval "ac_cv_lib_$ac_lib_var=no"
4823 fi
4824 rm -f conftest*
4825 xe_check_libs=""
4826
4827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4828   echo "$ac_t""yes" 1>&6
4829     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4830     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4831   { test "$extra_verbose" = "yes" && cat << EOF
4832     Defining $ac_tr_lib
4833 EOF
4834 cat >> confdefs.h <<EOF
4835 #define $ac_tr_lib 1
4836 EOF
4837 }
4838
4839   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4840
4841 else
4842   echo "$ac_t""no" 1>&6
4843 fi
4844
4845
4846 fi
4847
4848
4849 { test "$extra_verbose" = "yes" && cat << \EOF
4850     Defining LISP_FLOAT_TYPE
4851 EOF
4852 cat >> confdefs.h <<\EOF
4853 #define LISP_FLOAT_TYPE 1
4854 EOF
4855 }
4856
4857
4858 cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861 #include <math.h>
4862 int main() {
4863 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   { test "$extra_verbose" = "yes" && cat << \EOF
4869     Defining HAVE_INVERSE_HYPERBOLIC
4870 EOF
4871 cat >> confdefs.h <<\EOF
4872 #define HAVE_INVERSE_HYPERBOLIC 1
4873 EOF
4874 }
4875
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879 fi
4880 rm -f conftest*
4881
4882 echo "checking type of mail spool file locking" 1>&6
4883 echo "configure:4884: checking type of mail spool file locking" >&5
4884 for ac_func in lockf flock
4885 do
4886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4887 echo "configure:4888: checking for $ac_func" >&5
4888
4889 cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892 /* System header to define __stub macros and hopefully few prototypes,
4893     which can conflict with char $ac_func(); below.  */
4894 #include <assert.h>
4895 /* Override any gcc2 internal prototype to avoid an error.  */
4896 /* We use char because int might match the return type of a gcc2
4897     builtin and then its argument prototype would still apply.  */
4898 char $ac_func();
4899
4900 int main() {
4901
4902 /* The GNU C library defines this for functions which it implements
4903     to always fail with ENOSYS.  Some functions are actually named
4904     something starting with __ and the normal name is an alias.  */
4905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4906 choke me
4907 #else
4908 $ac_func();
4909 #endif
4910
4911 ; return 0; }
4912 EOF
4913 if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4914   rm -rf conftest*
4915   eval "ac_cv_func_$ac_func=yes"
4916 else
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   eval "ac_cv_func_$ac_func=no"
4921 fi
4922 rm -f conftest*
4923
4924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4925   echo "$ac_t""yes" 1>&6
4926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4927   { test "$extra_verbose" = "yes" && cat << EOF
4928     Defining $ac_tr_func
4929 EOF
4930 cat >> confdefs.h <<EOF
4931 #define $ac_tr_func 1
4932 EOF
4933 }
4934  
4935 else
4936   echo "$ac_t""no" 1>&6
4937 fi
4938 done
4939
4940 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4941 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4942 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4943 if   test -z "$mail_locking"; then
4944   case "$opsys" in cygwin* | mingw*)
4945     mail_locking=pop ;;
4946   esac
4947 fi
4948
4949 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4950     Defining MAIL_LOCK_LOCKF
4951 EOF
4952 cat >> confdefs.h <<\EOF
4953 #define MAIL_LOCK_LOCKF 1
4954 EOF
4955 }
4956
4957 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4958     Defining MAIL_LOCK_FLOCK
4959 EOF
4960 cat >> confdefs.h <<\EOF
4961 #define MAIL_LOCK_FLOCK 1
4962 EOF
4963 }
4964
4965 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4966     Defining MAIL_LOCK_LOCKING
4967 EOF
4968 cat >> confdefs.h <<\EOF
4969 #define MAIL_LOCK_LOCKING 1
4970 EOF
4971 }
4972
4973 elif test "$mail_locking" = "pop"; then
4974   with_pop=yes
4975   mail_locking=
4976 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4977     Defining MAIL_LOCK_DOT
4978 EOF
4979 cat >> confdefs.h <<\EOF
4980 #define MAIL_LOCK_DOT 1
4981 EOF
4982 }
4983
4984 fi
4985 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4986   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4987 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4988   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4989 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4990   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4991
4992 case "$opsys" in decosf*)
4993   
4994 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4995 echo "configure:4996: checking for cma_open in -lpthreads" >&5
4996 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4997
4998 xe_check_libs=" -lpthreads "
4999 cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5002 /* Override any gcc2 internal prototype to avoid an error.  */
5003 /* We use char because int might match the return type of a gcc2
5004     builtin and then its argument prototype would still apply.  */
5005 char cma_open();
5006
5007 int main() {
5008 cma_open()
5009 ; return 0; }
5010 EOF
5011 if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5012   rm -rf conftest*
5013   eval "ac_cv_lib_$ac_lib_var=yes"
5014 else
5015   echo "configure: failed program was:" >&5
5016   cat conftest.$ac_ext >&5
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=no"
5019 fi
5020 rm -f conftest*
5021 xe_check_libs=""
5022
5023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5026     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5027   { test "$extra_verbose" = "yes" && cat << EOF
5028     Defining $ac_tr_lib
5029 EOF
5030 cat >> confdefs.h <<EOF
5031 #define $ac_tr_lib 1
5032 EOF
5033 }
5034
5035   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5036
5037 else
5038   echo "$ac_t""no" 1>&6
5039 fi
5040
5041
5042   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5043     c_switch_site="$c_switch_site -threads" ;;
5044 esac
5045
5046
5047 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5048 echo "configure:5049: checking whether the -xildoff compiler flag is required" >&5
5049 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5050   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5051     then echo "$ac_t""no" 1>&6;
5052     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
5053   fi
5054   else echo "$ac_t""no" 1>&6
5055 fi
5056
5057 if test "$opsys" = "sol2"; then
5058   if test "$os_release" -ge 56; then
5059     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5060 echo "configure:5061: checking for \"-z ignore\" linker flag" >&5
5061     case "`ld -h 2>&1`" in
5062       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5063         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5064       *) echo "$ac_t""no" 1>&6 ;;
5065     esac
5066   fi
5067 fi
5068
5069
5070 echo "checking "for specified window system"" 1>&6
5071 echo "configure:5072: checking "for specified window system"" >&5
5072
5073
5074 GNOME_CONFIG=no
5075 GTK_CONFIG=no
5076
5077 if test "$with_gnome" != "no"; then
5078    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5079 echo "configure:5080: checking for GNOME configuration script" >&5
5080    for possible in gnome-config
5081    do
5082       possible_version=`${possible} --version 2> /dev/null`
5083       if test "x${possible_version}" != "x"; then
5084               GNOME_CONFIG="${possible}"
5085               with_gnome=yes
5086               with_gtk=yes
5087               break
5088       fi
5089    done
5090    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5091 fi
5092
5093 if test "${GNOME_CONFIG}" != "no"; then
5094       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5095       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5096       { test "$extra_verbose" = "yes" && cat << \EOF
5097     Defining HAVE_GNOME
5098 EOF
5099 cat >> confdefs.h <<\EOF
5100 #define HAVE_GNOME 1
5101 EOF
5102 }
5103
5104       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5105       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5106 fi
5107
5108 if test "$with_gtk" != "no";then
5109    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5110 echo "configure:5111: checking for GTK configuration script" >&5
5111    for possible in gtk12-config gtk14-config gtk-config
5112    do
5113       possible_version=`${possible} --version 2> /dev/null`
5114       if test "x${possible_version}" != "x"; then
5115               GTK_CONFIG="${possible}"
5116       fi
5117       case "${possible_version}" in
5118         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5119         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5120         1.2.*)
5121                 with_gtk=yes
5122                 break
5123                 ;;
5124         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5125       esac
5126    done
5127    echo "$ac_t""${GTK_CONFIG}" 1>&6
5128 fi
5129
5130 if test "${GTK_CONFIG}" != "no"; then
5131       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5132 echo "configure:5133: checking gtk version" >&5
5133       GTK_VERSION=`${GTK_CONFIG} --version`
5134       echo "$ac_t""${GTK_VERSION}" 1>&6
5135
5136       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5137 echo "configure:5138: checking gtk libs" >&5
5138       GTK_LIBS=`${GTK_CONFIG} --libs`
5139       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5140       echo "$ac_t""${GTK_LIBS}" 1>&6
5141
5142       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5143 echo "configure:5144: checking gtk cflags" >&5
5144       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5145       if test "$GCC" = "yes"; then
5146         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5147       fi
5148       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5149       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5150
5151       
5152 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5153 echo "configure:5154: checking for main in -lgdk_imlib" >&5
5154 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5155
5156 xe_check_libs=" -lgdk_imlib "
5157 cat > conftest.$ac_ext <<EOF
5158 #line 5159 "configure"
5159 #include "confdefs.h"
5160
5161 int main() {
5162 main()
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   eval "ac_cv_lib_$ac_lib_var=yes"
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=no"
5173 fi
5174 rm -f conftest*
5175 xe_check_libs=""
5176
5177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5178   echo "$ac_t""yes" 1>&6
5179   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5180 else
5181   echo "$ac_t""no" 1>&6
5182 fi
5183
5184
5185       
5186 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5187 echo "configure:5188: checking for Imlib_init in -lImlib" >&5
5188 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5189
5190 xe_check_libs=" -lImlib "
5191 cat > conftest.$ac_ext <<EOF
5192 #line 5193 "configure"
5193 #include "confdefs.h"
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 /* We use char because int might match the return type of a gcc2
5196     builtin and then its argument prototype would still apply.  */
5197 char Imlib_init();
5198
5199 int main() {
5200 Imlib_init()
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5204   rm -rf conftest*
5205   eval "ac_cv_lib_$ac_lib_var=yes"
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210   eval "ac_cv_lib_$ac_lib_var=no"
5211 fi
5212 rm -f conftest*
5213 xe_check_libs=""
5214
5215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5216   echo "$ac_t""yes" 1>&6
5217   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5218 else
5219   echo "$ac_t""no" 1>&6
5220 fi
5221
5222
5223       for ac_func in gdk_imlib_init
5224 do
5225 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5226 echo "configure:5227: checking for $ac_func" >&5
5227
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 /* System header to define __stub macros and hopefully few prototypes,
5232     which can conflict with char $ac_func(); below.  */
5233 #include <assert.h>
5234 /* Override any gcc2 internal prototype to avoid an error.  */
5235 /* We use char because int might match the return type of a gcc2
5236     builtin and then its argument prototype would still apply.  */
5237 char $ac_func();
5238
5239 int main() {
5240
5241 /* The GNU C library defines this for functions which it implements
5242     to always fail with ENOSYS.  Some functions are actually named
5243     something starting with __ and the normal name is an alias.  */
5244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5245 choke me
5246 #else
5247 $ac_func();
5248 #endif
5249
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253   rm -rf conftest*
5254   eval "ac_cv_func_$ac_func=yes"
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258   rm -rf conftest*
5259   eval "ac_cv_func_$ac_func=no"
5260 fi
5261 rm -f conftest*
5262
5263 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5264   echo "$ac_t""yes" 1>&6
5265     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5266   { test "$extra_verbose" = "yes" && cat << EOF
5267     Defining $ac_tr_func
5268 EOF
5269 cat >> confdefs.h <<EOF
5270 #define $ac_tr_func 1
5271 EOF
5272 }
5273  
5274 else
5275   echo "$ac_t""no" 1>&6
5276 fi
5277 done
5278
5279
5280       { test "$extra_verbose" = "yes" && cat << \EOF
5281     Defining HAVE_XPM
5282 EOF
5283 cat >> confdefs.h <<\EOF
5284 #define HAVE_XPM 1
5285 EOF
5286 }
5287
5288       { test "$extra_verbose" = "yes" && cat << \EOF
5289     Defining HAVE_GTK
5290 EOF
5291 cat >> confdefs.h <<\EOF
5292 #define HAVE_GTK 1
5293 EOF
5294 }
5295
5296       
5297
5298       window_system=gtk
5299       with_gtk=yes
5300       with_x11=no
5301
5302       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5303       test "${with_toolbars}" != no && with_toolbars=gtk
5304       test "${with_menubars}" != "no" && with_menubars=gtk
5305       test "${with_dialogs}" != "no" && with_dialogs=gtk
5306       test "${with_widgets}" != "no" && with_widgets=gtk
5307
5308       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5309    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5310  fi
5311       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5312    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5313  fi
5314       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5315    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5316  fi
5317       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5318    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5319  fi
5320
5321             OLD_CFLAGS="${CFLAGS}"
5322       OLD_CPPFLAGS="${CPPFLAGS}"
5323       OLD_LDFLAGS="${LDFLAGS}"
5324       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5325       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5326       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5327       for ac_hdr in glade/glade.h glade.h
5328 do
5329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5331 echo "configure:5332: checking for $ac_hdr" >&5
5332
5333 cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336 #include <$ac_hdr>
5337 EOF
5338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5339 { (eval echo configure:5340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5341 if test -z "$ac_err"; then
5342   rm -rf conftest*
5343   eval "ac_cv_header_$ac_safe=yes"
5344 else
5345   echo "$ac_err" >&5
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   eval "ac_cv_header_$ac_safe=no"
5350 fi
5351 rm -f conftest*
5352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5353   echo "$ac_t""yes" 1>&6
5354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5355   { test "$extra_verbose" = "yes" && cat << EOF
5356     Defining $ac_tr_hdr
5357 EOF
5358 cat >> confdefs.h <<EOF
5359 #define $ac_tr_hdr 1
5360 EOF
5361 }
5362  
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366 done
5367
5368       
5369 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5370 echo "configure:5371: checking for main in -lxml" >&5
5371 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5372
5373 xe_check_libs=" -lxml "
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377
5378 int main() {
5379 main()
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=no"
5390 fi
5391 rm -f conftest*
5392 xe_check_libs=""
5393
5394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5395   echo "$ac_t""yes" 1>&6
5396   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5397 else
5398   echo "$ac_t""no" 1>&6
5399 fi
5400
5401
5402       
5403 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5404 echo "configure:5405: checking for main in -lglade" >&5
5405 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5406
5407 xe_check_libs=" -lglade "
5408 cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411
5412 int main() {
5413 main()
5414 ; return 0; }
5415 EOF
5416 if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5417   rm -rf conftest*
5418   eval "ac_cv_lib_$ac_lib_var=yes"
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=no"
5424 fi
5425 rm -f conftest*
5426 xe_check_libs=""
5427
5428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5429   echo "$ac_t""yes" 1>&6
5430   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434
5435
5436       
5437 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5438 echo "configure:5439: checking for main in -lglade-gnome" >&5
5439 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5440
5441 xe_check_libs=" -lglade-gnome "
5442 cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445
5446 int main() {
5447 main()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 xe_check_libs=""
5461
5462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5463   echo "$ac_t""yes" 1>&6
5464   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5465 else
5466   echo "$ac_t""no" 1>&6
5467 fi
5468
5469
5470       cat > conftest.$ac_ext <<EOF
5471 #line 5472 "configure"
5472 #include "confdefs.h"
5473 #include <glade/glade-xml.h>
5474 EOF
5475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5476   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5477   rm -rf conftest*
5478   echo "$ac_t""yes" 1>&6
5479                        { test "$extra_verbose" = "yes" && cat << \EOF
5480     Defining LIBGLADE_XML_TXTDOMAIN = 1
5481 EOF
5482 cat >> confdefs.h <<\EOF
5483 #define LIBGLADE_XML_TXTDOMAIN 1
5484 EOF
5485 }
5486
5487 else
5488   rm -rf conftest*
5489   echo "$ac_t""no" 1>&6
5490 fi
5491 rm -f conftest*
5492
5493       CFLAGS="${OLD_CFLAGS}"
5494       CPPFLAGS="${OLD_CPPFLAGS}"
5495       LDFLAGS="${OLD_LDFLAGS}"
5496 fi
5497
5498
5499 if test "$with_x11" != "no"; then
5500     test "$x_includes $x_libraries" != "NONE NONE" && \
5501    window_system=x11 with_x11=yes
5502
5503         
5504       if test "$x_includes $x_libraries" = "NONE NONE" \
5505     -a -n "$OPENWINHOME" \
5506     -a "$OPENWINHOME" != "/usr/openwin" \
5507     -a -d "$OPENWINHOME"; then
5508       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5509       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5510       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5511   fi
5512
5513   if test "$x_includes" = "NONE"; then
5514                     for dir in "/usr/X11" "/usr/X11R6"; do
5515       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5516     done
5517   fi
5518
5519   if test "$x_libraries" = "NONE"; then
5520     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5521       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5522     done
5523   fi
5524
5525   # If we find X, set shell vars x_includes and x_libraries to the
5526 # paths, otherwise set no_x=yes.
5527 # Uses ac_ vars as temps to allow command line to override cache and checks.
5528 # --without-x overrides everything else, but does not touch the cache.
5529 echo $ac_n "checking for X""... $ac_c" 1>&6
5530 echo "configure:5531: checking for X" >&5
5531
5532 # Check whether --with-x or --without-x was given.
5533 if test "${with_x+set}" = set; then
5534   withval="$with_x"
5535   :
5536 fi
5537
5538 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5539 if test "x$with_x" = xno; then
5540   # The user explicitly disabled X.
5541   have_x=disabled
5542 else
5543   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5544     # Both variables are already set.
5545     have_x=yes
5546   else
5547
5548 # One or both of the vars are not set, and there is no cached value.
5549 ac_x_includes=NO ac_x_libraries=NO
5550 rm -fr conftestdir
5551 if mkdir conftestdir; then
5552   cd conftestdir
5553   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5554   cat > Imakefile <<'EOF'
5555 acfindx:
5556         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5557 EOF
5558   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5559     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5560     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5561     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5562     for ac_extension in a so sl; do
5563       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5564         test -f $ac_im_libdir/libX11.$ac_extension; then
5565         ac_im_usrlibdir=$ac_im_libdir; break
5566       fi
5567     done
5568     # Screen out bogus values from the imake configuration.  They are
5569     # bogus both because they are the default anyway, and because
5570     # using them would break gcc on systems where it needs fixed includes.
5571     case "$ac_im_incroot" in
5572         /usr/include) ;;
5573         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5574     esac
5575     case "$ac_im_usrlibdir" in
5576         /usr/lib | /lib) ;;
5577         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5578     esac
5579   fi
5580   cd ..
5581   rm -fr conftestdir
5582 fi
5583
5584 if test "$ac_x_includes" = NO; then
5585   # Guess where to find include files, by looking for this one X11 .h file.
5586   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5587
5588   # First, try using that file with no special directory specified.
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 #include <$x_direct_test_include>
5593 EOF
5594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5595 { (eval echo configure:5596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5597 if test -z "$ac_err"; then
5598   rm -rf conftest*
5599   # We can compile using X headers with no special include directory.
5600 ac_x_includes=
5601 else
5602   echo "$ac_err" >&5
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   # Look for the header file in a standard set of common directories.
5607 # Check X11 before X11Rn because it is often a symlink to the current release.
5608   for ac_dir in               \
5609     /usr/X11/include          \
5610     /usr/X11R6/include        \
5611     /usr/X11R5/include        \
5612     /usr/X11R4/include        \
5613                               \
5614     /usr/include/X11          \
5615     /usr/include/X11R6        \
5616     /usr/include/X11R5        \
5617     /usr/include/X11R4        \
5618                               \
5619     /usr/local/X11/include    \
5620     /usr/local/X11R6/include  \
5621     /usr/local/X11R5/include  \
5622     /usr/local/X11R4/include  \
5623                               \
5624     /usr/local/include/X11    \
5625     /usr/local/include/X11R6  \
5626     /usr/local/include/X11R5  \
5627     /usr/local/include/X11R4  \
5628                               \
5629     /usr/X386/include         \
5630     /usr/x386/include         \
5631     /usr/XFree86/include/X11  \
5632                               \
5633     /usr/include              \
5634     /usr/local/include        \
5635     /usr/unsupported/include  \
5636     /usr/athena/include       \
5637     /usr/local/x11r5/include  \
5638     /usr/lpp/Xamples/include  \
5639                               \
5640     /usr/openwin/include      \
5641     /usr/openwin/share/include \
5642     ; \
5643   do
5644     if test -r "$ac_dir/$x_direct_test_include"; then
5645       ac_x_includes=$ac_dir
5646       break
5647     fi
5648   done
5649 fi
5650 rm -f conftest*
5651 fi # $ac_x_includes = NO
5652
5653 if test "$ac_x_libraries" = NO; then
5654   # Check for the libraries.
5655
5656   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5657   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5658
5659   # See if we find them without any special options.
5660   # Don't add to $LIBS permanently.
5661   ac_save_LIBS="$LIBS"
5662   LIBS="-l$x_direct_test_library $LIBS"
5663 cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666
5667 int main() {
5668 ${x_direct_test_function}()
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672   rm -rf conftest*
5673   LIBS="$ac_save_LIBS"
5674 # We can link X programs with no special library path.
5675 ac_x_libraries=
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   LIBS="$ac_save_LIBS"
5681 # First see if replacing the include by lib works.
5682 # Check X11 before X11Rn because it is often a symlink to the current release.
5683 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5684     /usr/X11/lib          \
5685     /usr/X11R6/lib        \
5686     /usr/X11R5/lib        \
5687     /usr/X11R4/lib        \
5688                           \
5689     /usr/lib/X11          \
5690     /usr/lib/X11R6        \
5691     /usr/lib/X11R5        \
5692     /usr/lib/X11R4        \
5693                           \
5694     /usr/local/X11/lib    \
5695     /usr/local/X11R6/lib  \
5696     /usr/local/X11R5/lib  \
5697     /usr/local/X11R4/lib  \
5698                           \
5699     /usr/local/lib/X11    \
5700     /usr/local/lib/X11R6  \
5701     /usr/local/lib/X11R5  \
5702     /usr/local/lib/X11R4  \
5703                           \
5704     /usr/X386/lib         \
5705     /usr/x386/lib         \
5706     /usr/XFree86/lib/X11  \
5707                           \
5708     /usr/lib              \
5709     /usr/local/lib        \
5710     /usr/unsupported/lib  \
5711     /usr/athena/lib       \
5712     /usr/local/x11r5/lib  \
5713     /usr/lpp/Xamples/lib  \
5714     /lib/usr/lib/X11      \
5715                           \
5716     /usr/openwin/lib      \
5717     /usr/openwin/share/lib \
5718     ; \
5719 do
5720   for ac_extension in a so sl; do
5721     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5722       ac_x_libraries=$ac_dir
5723       break 2
5724     fi
5725   done
5726 done
5727 fi
5728 rm -f conftest*
5729 fi # $ac_x_libraries = NO
5730
5731 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5732   # Didn't find X anywhere.  Cache the known absence of X.
5733   ac_cv_have_x="have_x=no"
5734 else
5735   # Record where we found X for the cache.
5736   ac_cv_have_x="have_x=yes \
5737                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5738 fi
5739   fi
5740   eval "$ac_cv_have_x"
5741 fi # $with_x != no
5742
5743 if test "$have_x" != yes; then
5744   echo "$ac_t""$have_x" 1>&6
5745   no_x=yes
5746 else
5747   # If each of the values was on the command line, it overrides each guess.
5748   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5749   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5750   # Update the cache value to reflect the command line values.
5751   ac_cv_have_x="have_x=yes \
5752                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5753   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5754 fi
5755
5756 if test "$no_x" = yes; then
5757   # Not all programs may use this symbol, but it does not hurt to define it.
5758   { test "$extra_verbose" = "yes" && cat << \EOF
5759     Defining X_DISPLAY_MISSING
5760 EOF
5761 cat >> confdefs.h <<\EOF
5762 #define X_DISPLAY_MISSING 1
5763 EOF
5764 }
5765
5766   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5767 else
5768   if test -n "$x_includes"; then
5769     X_CFLAGS="$X_CFLAGS -I$x_includes"
5770   fi
5771
5772   # It would also be nice to do this for all -L options, not just this one.
5773   if test -n "$x_libraries"; then
5774     X_LIBS="$X_LIBS -L$x_libraries"
5775     # For Solaris; some versions of Sun CC require a space after -R and
5776     # others require no space.  Words are not sufficient . . . .
5777     case "`(uname -sr) 2>/dev/null`" in
5778     "SunOS 5"*)
5779       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5780 echo "configure:5781: checking whether -R must be followed by a space" >&5
5781       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5782       cat > conftest.$ac_ext <<EOF
5783 #line 5784 "configure"
5784 #include "confdefs.h"
5785
5786 int main() {
5787
5788 ; return 0; }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5791   rm -rf conftest*
5792   ac_R_nospace=yes
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   ac_R_nospace=no
5798 fi
5799 rm -f conftest*
5800       if test $ac_R_nospace = yes; then
5801         echo "$ac_t""no" 1>&6
5802         X_LIBS="$X_LIBS -R$x_libraries"
5803       else
5804         LIBS="$ac_xsave_LIBS -R $x_libraries"
5805         cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808
5809 int main() {
5810
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5814   rm -rf conftest*
5815   ac_R_space=yes
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   ac_R_space=no
5821 fi
5822 rm -f conftest*
5823         if test $ac_R_space = yes; then
5824           echo "$ac_t""yes" 1>&6
5825           X_LIBS="$X_LIBS -R $x_libraries"
5826         else
5827           echo "$ac_t""neither works" 1>&6
5828         fi
5829       fi
5830       LIBS="$ac_xsave_LIBS"
5831     esac
5832   fi
5833
5834   # Check for system-dependent libraries X programs must link with.
5835   # Do this before checking for the system-independent R6 libraries
5836   # (-lICE), since we may need -lsocket or whatever for X linking.
5837
5838   if test "$ISC" = yes; then
5839     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5840   else
5841     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5842     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5843     # the Alpha needs dnet_stub (dnet does not exist).
5844     if test "$with_dnet" = "no" ; then
5845 ac_cv_lib_dnet_dnet_ntoa=no
5846 else
5847
5848 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5849 echo "configure:5850: checking for dnet_ntoa in -ldnet" >&5
5850 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5851
5852 xe_check_libs=" -ldnet "
5853 cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856 /* Override any gcc2 internal prototype to avoid an error.  */
5857 /* We use char because int might match the return type of a gcc2
5858     builtin and then its argument prototype would still apply.  */
5859 char dnet_ntoa();
5860
5861 int main() {
5862 dnet_ntoa()
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=yes"
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   eval "ac_cv_lib_$ac_lib_var=no"
5873 fi
5874 rm -f conftest*
5875 xe_check_libs=""
5876
5877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5878   echo "$ac_t""yes" 1>&6
5879   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5880 else
5881   echo "$ac_t""no" 1>&6
5882 fi
5883
5884 fi
5885
5886     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5887       
5888 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5889 echo "configure:5890: checking for dnet_ntoa in -ldnet_stub" >&5
5890 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5891
5892 xe_check_libs=" -ldnet_stub "
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5896 /* Override any gcc2 internal prototype to avoid an error.  */
5897 /* We use char because int might match the return type of a gcc2
5898     builtin and then its argument prototype would still apply.  */
5899 char dnet_ntoa();
5900
5901 int main() {
5902 dnet_ntoa()
5903 ; return 0; }
5904 EOF
5905 if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5906   rm -rf conftest*
5907   eval "ac_cv_lib_$ac_lib_var=yes"
5908 else
5909   echo "configure: failed program was:" >&5
5910   cat conftest.$ac_ext >&5
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=no"
5913 fi
5914 rm -f conftest*
5915 xe_check_libs=""
5916
5917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5918   echo "$ac_t""yes" 1>&6
5919   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5920 else
5921   echo "$ac_t""no" 1>&6
5922 fi
5923
5924
5925     fi
5926
5927     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5928     # to get the SysV transport functions.
5929     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5930     # needs -lnsl.
5931     # The nsl library prevents programs from opening the X display
5932     # on Irix 5.2, according to dickey@clark.net.
5933     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5934 echo "configure:5935: checking for gethostbyname" >&5
5935
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 /* System header to define __stub macros and hopefully few prototypes,
5940     which can conflict with char gethostbyname(); below.  */
5941 #include <assert.h>
5942 /* Override any gcc2 internal prototype to avoid an error.  */
5943 /* We use char because int might match the return type of a gcc2
5944     builtin and then its argument prototype would still apply.  */
5945 char gethostbyname();
5946
5947 int main() {
5948
5949 /* The GNU C library defines this for functions which it implements
5950     to always fail with ENOSYS.  Some functions are actually named
5951     something starting with __ and the normal name is an alias.  */
5952 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5953 choke me
5954 #else
5955 gethostbyname();
5956 #endif
5957
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5961   rm -rf conftest*
5962   eval "ac_cv_func_gethostbyname=yes"
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_func_gethostbyname=no"
5968 fi
5969 rm -f conftest*
5970
5971 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5972   echo "$ac_t""yes" 1>&6
5973   :
5974 else
5975   echo "$ac_t""no" 1>&6
5976 fi
5977
5978     if test $ac_cv_func_gethostbyname = no; then
5979       
5980 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5981 echo "configure:5982: checking for gethostbyname in -lnsl" >&5
5982 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5983
5984 xe_check_libs=" -lnsl "
5985 cat > conftest.$ac_ext <<EOF
5986 #line 5987 "configure"
5987 #include "confdefs.h"
5988 /* Override any gcc2 internal prototype to avoid an error.  */
5989 /* We use char because int might match the return type of a gcc2
5990     builtin and then its argument prototype would still apply.  */
5991 char gethostbyname();
5992
5993 int main() {
5994 gethostbyname()
5995 ; return 0; }
5996 EOF
5997 if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5998   rm -rf conftest*
5999   eval "ac_cv_lib_$ac_lib_var=yes"
6000 else
6001   echo "configure: failed program was:" >&5
6002   cat conftest.$ac_ext >&5
6003   rm -rf conftest*
6004   eval "ac_cv_lib_$ac_lib_var=no"
6005 fi
6006 rm -f conftest*
6007 xe_check_libs=""
6008
6009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6010   echo "$ac_t""yes" 1>&6
6011   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6012 else
6013   echo "$ac_t""no" 1>&6
6014 fi
6015
6016
6017     fi
6018
6019     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6020     # socket/setsockopt and other routines are undefined under SCO ODT
6021     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6022     # on later versions), says simon@lia.di.epfl.ch: it contains
6023     # gethostby* variants that don't use the nameserver (or something).
6024     # -lsocket must be given before -lnsl if both are needed.
6025     # We assume that if connect needs -lnsl, so does gethostbyname.
6026     echo $ac_n "checking for connect""... $ac_c" 1>&6
6027 echo "configure:6028: checking for connect" >&5
6028
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 /* System header to define __stub macros and hopefully few prototypes,
6033     which can conflict with char connect(); below.  */
6034 #include <assert.h>
6035 /* Override any gcc2 internal prototype to avoid an error.  */
6036 /* We use char because int might match the return type of a gcc2
6037     builtin and then its argument prototype would still apply.  */
6038 char connect();
6039
6040 int main() {
6041
6042 /* The GNU C library defines this for functions which it implements
6043     to always fail with ENOSYS.  Some functions are actually named
6044     something starting with __ and the normal name is an alias.  */
6045 #if defined (__stub_connect) || defined (__stub___connect)
6046 choke me
6047 #else
6048 connect();
6049 #endif
6050
6051 ; return 0; }
6052 EOF
6053 if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6054   rm -rf conftest*
6055   eval "ac_cv_func_connect=yes"
6056 else
6057   echo "configure: failed program was:" >&5
6058   cat conftest.$ac_ext >&5
6059   rm -rf conftest*
6060   eval "ac_cv_func_connect=no"
6061 fi
6062 rm -f conftest*
6063
6064 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6065   echo "$ac_t""yes" 1>&6
6066   :
6067 else
6068   echo "$ac_t""no" 1>&6
6069 fi
6070
6071     if test $ac_cv_func_connect = no; then
6072       
6073 xe_msg_checking="for connect in -lsocket"
6074 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6075 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6076 echo "configure:6077: checking "$xe_msg_checking"" >&5
6077 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6078
6079 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6080 cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 /* Override any gcc2 internal prototype to avoid an error.  */
6084 /* We use char because int might match the return type of a gcc2
6085     builtin and then its argument prototype would still apply.  */
6086 char connect();
6087
6088 int main() {
6089 connect()
6090 ; return 0; }
6091 EOF
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093   rm -rf conftest*
6094   eval "ac_cv_lib_$ac_lib_var=yes"
6095 else
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=no"
6100 fi
6101 rm -f conftest*
6102 xe_check_libs=""
6103
6104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6105   echo "$ac_t""yes" 1>&6
6106   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110
6111
6112     fi
6113
6114     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6115     echo $ac_n "checking for remove""... $ac_c" 1>&6
6116 echo "configure:6117: checking for remove" >&5
6117
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* System header to define __stub macros and hopefully few prototypes,
6122     which can conflict with char remove(); below.  */
6123 #include <assert.h>
6124 /* Override any gcc2 internal prototype to avoid an error.  */
6125 /* We use char because int might match the return type of a gcc2
6126     builtin and then its argument prototype would still apply.  */
6127 char remove();
6128
6129 int main() {
6130
6131 /* The GNU C library defines this for functions which it implements
6132     to always fail with ENOSYS.  Some functions are actually named
6133     something starting with __ and the normal name is an alias.  */
6134 #if defined (__stub_remove) || defined (__stub___remove)
6135 choke me
6136 #else
6137 remove();
6138 #endif
6139
6140 ; return 0; }
6141 EOF
6142 if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6143   rm -rf conftest*
6144   eval "ac_cv_func_remove=yes"
6145 else
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_func_remove=no"
6150 fi
6151 rm -f conftest*
6152
6153 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   :
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159
6160     if test $ac_cv_func_remove = no; then
6161       
6162 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6163 echo "configure:6164: checking for remove in -lposix" >&5
6164 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6165
6166 xe_check_libs=" -lposix "
6167 cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6170 /* Override any gcc2 internal prototype to avoid an error.  */
6171 /* We use char because int might match the return type of a gcc2
6172     builtin and then its argument prototype would still apply.  */
6173 char remove();
6174
6175 int main() {
6176 remove()
6177 ; return 0; }
6178 EOF
6179 if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6180   rm -rf conftest*
6181   eval "ac_cv_lib_$ac_lib_var=yes"
6182 else
6183   echo "configure: failed program was:" >&5
6184   cat conftest.$ac_ext >&5
6185   rm -rf conftest*
6186   eval "ac_cv_lib_$ac_lib_var=no"
6187 fi
6188 rm -f conftest*
6189 xe_check_libs=""
6190
6191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6192   echo "$ac_t""yes" 1>&6
6193   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6194 else
6195   echo "$ac_t""no" 1>&6
6196 fi
6197
6198
6199     fi
6200
6201     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6202     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6203 echo "configure:6204: checking for shmat" >&5
6204
6205 cat > conftest.$ac_ext <<EOF
6206 #line 6207 "configure"
6207 #include "confdefs.h"
6208 /* System header to define __stub macros and hopefully few prototypes,
6209     which can conflict with char shmat(); below.  */
6210 #include <assert.h>
6211 /* Override any gcc2 internal prototype to avoid an error.  */
6212 /* We use char because int might match the return type of a gcc2
6213     builtin and then its argument prototype would still apply.  */
6214 char shmat();
6215
6216 int main() {
6217
6218 /* The GNU C library defines this for functions which it implements
6219     to always fail with ENOSYS.  Some functions are actually named
6220     something starting with __ and the normal name is an alias.  */
6221 #if defined (__stub_shmat) || defined (__stub___shmat)
6222 choke me
6223 #else
6224 shmat();
6225 #endif
6226
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_func_shmat=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_func_shmat=no"
6237 fi
6238 rm -f conftest*
6239
6240 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6241   echo "$ac_t""yes" 1>&6
6242   :
6243 else
6244   echo "$ac_t""no" 1>&6
6245 fi
6246
6247     if test $ac_cv_func_shmat = no; then
6248       
6249 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6250 echo "configure:6251: checking for shmat in -lipc" >&5
6251 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6252
6253 xe_check_libs=" -lipc "
6254 cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 /* Override any gcc2 internal prototype to avoid an error.  */
6258 /* We use char because int might match the return type of a gcc2
6259     builtin and then its argument prototype would still apply.  */
6260 char shmat();
6261
6262 int main() {
6263 shmat()
6264 ; return 0; }
6265 EOF
6266 if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6267   rm -rf conftest*
6268   eval "ac_cv_lib_$ac_lib_var=yes"
6269 else
6270   echo "configure: failed program was:" >&5
6271   cat conftest.$ac_ext >&5
6272   rm -rf conftest*
6273   eval "ac_cv_lib_$ac_lib_var=no"
6274 fi
6275 rm -f conftest*
6276 xe_check_libs=""
6277
6278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6279   echo "$ac_t""yes" 1>&6
6280   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6281 else
6282   echo "$ac_t""no" 1>&6
6283 fi
6284
6285
6286     fi
6287   fi
6288
6289   # Check for libraries that X11R6 Xt/Xaw programs need.
6290   ac_save_LDFLAGS="$LDFLAGS"
6291   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6292   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6293   # check for ICE first), but we must link in the order -lSM -lICE or
6294   # we get undefined symbols.  So assume we have SM if we have ICE.
6295   # These have to be linked with before -lX11, unlike the other
6296   # libraries we check for below, so use a different variable.
6297   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6298   
6299 xe_msg_checking="for IceConnectionNumber in -lICE"
6300 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6301 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6302 echo "configure:6303: checking "$xe_msg_checking"" >&5
6303 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6304
6305 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6306 cat > conftest.$ac_ext <<EOF
6307 #line 6308 "configure"
6308 #include "confdefs.h"
6309 /* Override any gcc2 internal prototype to avoid an error.  */
6310 /* We use char because int might match the return type of a gcc2
6311     builtin and then its argument prototype would still apply.  */
6312 char IceConnectionNumber();
6313
6314 int main() {
6315 IceConnectionNumber()
6316 ; return 0; }
6317 EOF
6318 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6319   rm -rf conftest*
6320   eval "ac_cv_lib_$ac_lib_var=yes"
6321 else
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   eval "ac_cv_lib_$ac_lib_var=no"
6326 fi
6327 rm -f conftest*
6328 xe_check_libs=""
6329
6330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6331   echo "$ac_t""yes" 1>&6
6332   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6333 else
6334   echo "$ac_t""no" 1>&6
6335 fi
6336
6337
6338   LDFLAGS="$ac_save_LDFLAGS"
6339
6340 fi
6341  # Autoconf claims to find X library and include dirs for us.
6342   if test "$no_x" = "yes"
6343   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6344   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6345   fi
6346 fi
6347
6348
6349 if test "$with_x11" = "yes"; then
6350   { test "$extra_verbose" = "yes" && cat << \EOF
6351     Defining HAVE_X_WINDOWS
6352 EOF
6353 cat >> confdefs.h <<\EOF
6354 #define HAVE_X_WINDOWS 1
6355 EOF
6356 }
6357
6358   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6359   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6360
6361
6362     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6363 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6364 echo "configure:6365: checking for Xm/Xm.h" >&5
6365
6366 cat > conftest.$ac_ext <<EOF
6367 #line 6368 "configure"
6368 #include "confdefs.h"
6369 #include <Xm/Xm.h>
6370 EOF
6371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6372 { (eval echo configure:6373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6374 if test -z "$ac_err"; then
6375   rm -rf conftest*
6376   eval "ac_cv_header_$ac_safe=yes"
6377 else
6378   echo "$ac_err" >&5
6379   echo "configure: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   rm -rf conftest*
6382   eval "ac_cv_header_$ac_safe=no"
6383 fi
6384 rm -f conftest*
6385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6386   echo "$ac_t""yes" 1>&6
6387   
6388 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6389 echo "configure:6390: checking for XmStringFree in -lXm" >&5
6390 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6391
6392 xe_check_libs=" -lXm "
6393 cat > conftest.$ac_ext <<EOF
6394 #line 6395 "configure"
6395 #include "confdefs.h"
6396 /* Override any gcc2 internal prototype to avoid an error.  */
6397 /* We use char because int might match the return type of a gcc2
6398     builtin and then its argument prototype would still apply.  */
6399 char XmStringFree();
6400
6401 int main() {
6402 XmStringFree()
6403 ; return 0; }
6404 EOF
6405 if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6406   rm -rf conftest*
6407   eval "ac_cv_lib_$ac_lib_var=yes"
6408 else
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=no"
6413 fi
6414 rm -f conftest*
6415 xe_check_libs=""
6416
6417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6418   echo "$ac_t""yes" 1>&6
6419   got_motif=yes
6420 else
6421   echo "$ac_t""no" 1>&6
6422 fi
6423
6424
6425 else
6426   echo "$ac_t""no" 1>&6
6427 fi
6428
6429
6430   if test "$got_motif" != "yes"; then
6431             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6432                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6433       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6434       if test -d "$lib_dir" -a -d "$inc_dir"; then
6435         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6436           x_libraries="$lib_dir $x_libraries"
6437           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6438         esac
6439         case "$x_includes" in "$inc_dir"* ) ;; *)
6440           x_includes="$inc_dir $x_includes"
6441           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6442         esac
6443         break;  fi
6444     done
6445   fi
6446
6447     for rel in "X11R6" "X11R5" "X11R4"; do
6448     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6449     if test -d "$lib_dir" -a -d "$inc_dir"; then
6450       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6451         x_libraries="$x_libraries $lib_dir"
6452         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6453       esac
6454       case "$x_includes" in "$inc_dir"* ) ;; *)
6455         x_includes="$x_includes $inc_dir"
6456         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6457       esac
6458       break;     fi
6459   done
6460
6461     case "$opsys" in
6462   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 ;;
6463   esac
6464
6465   ld_switch_x_site="$X_LIBS"
6466
6467   
6468 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6469     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6470   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6471   
6472         runpath="" runpath_dirs=""
6473   if test -n "$LD_RUN_PATH"; then
6474     runpath="$LD_RUN_PATH"
6475   elif test "$GCC" = "yes"; then
6476         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6477     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6478     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6479     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6480       case "$arg" in P,* | -L* | -R* )
6481         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6482           {
6483 xe_runpath_dir="$dir"
6484   test "$xe_runpath_dir" != "/lib"     -a \
6485         "$xe_runpath_dir" != "/usr/lib" -a \
6486         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6487   eval "$xe_add_unique_runpath_dir"
6488 }
6489         done ;;
6490       esac
6491     done
6492     ld_switch_run="$ld_switch_run_save"
6493     rm -f conftest*
6494   else
6495         for arg in $ld_switch_site $ld_switch_x_site; do
6496       case "$arg" in -L*) {
6497 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6498   test "$xe_runpath_dir" != "/lib"     -a \
6499         "$xe_runpath_dir" != "/usr/lib" -a \
6500         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6501   eval "$xe_add_unique_runpath_dir"
6502 };; esac
6503     done
6504         if test "$opsys $need_motif" = "sol2 yes"; then
6505       xe_runpath_dir="/opt/SUNWdt/lib";
6506       eval "$xe_add_unique_runpath_dir";
6507     fi
6508   fi 
6509   if test -n "$runpath"; then
6510     ld_switch_run="${dash_r}${runpath}"
6511     
6512 if test "$GCC" = "yes"; then
6513   set x $ld_switch_run; shift; ld_switch_run=""
6514   while test -n "$1"; do
6515     case $1 in
6516       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6517       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6518       -Xlinker* ) ;;
6519       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6520     esac
6521     shift
6522   done
6523 fi
6524     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6525   fi
6526 fi
6527
6528
6529   if test "$extra_verbose" = "yes"; then
6530     echo; echo "X11 compilation variables:"
6531     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6532     echo
6533   fi
6534
6535             bitmapdirs=
6536   if test "$x_includes" != NONE; then
6537     for i in $x_includes; do
6538       if test -d "$i/bitmaps"; then
6539         bitmapdirs="$i/bitmaps:$bitmapdirs"
6540       fi
6541       if test -d "$i/X11/bitmaps"; then
6542         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6543       fi
6544     done
6545     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6546   fi
6547   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6548     Defining BITMAPDIR = "$bitmapdirs"
6549 EOF
6550 cat >> confdefs.h <<EOF
6551 #define BITMAPDIR "$bitmapdirs"
6552 EOF
6553 }
6554
6555
6556     echo "checking for X defines extracted by xmkmf" 1>&6
6557 echo "configure:6558: checking for X defines extracted by xmkmf" >&5
6558   rm -fr conftestdir
6559   if mkdir conftestdir; then
6560     cd conftestdir
6561     cat > Imakefile <<'EOF'
6562 xetest:
6563         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6564 EOF
6565     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6566       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6567       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6568     fi
6569     cd ..
6570     rm -fr conftestdir
6571     for word in $xmkmf_defines; do
6572       case "$word" in 
6573       -D__STDC__*) ;;
6574       -D* )
6575         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6576         case "$word" in
6577           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6578           *     ) val=1 ;;
6579         esac
6580         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6581           if test "$val" = "1"
6582             then { test "$extra_verbose" = "yes" && cat << EOF
6583     Defining $sym
6584 EOF
6585 cat >> confdefs.h <<EOF
6586 #define $sym 1
6587 EOF
6588 }
6589
6590             else { test "$extra_verbose" = "yes" && cat << EOF
6591     Defining $sym = $val
6592 EOF
6593 cat >> confdefs.h <<EOF
6594 #define $sym $val
6595 EOF
6596 }
6597
6598           fi
6599         fi  ;;
6600       esac
6601     done
6602   fi
6603
6604     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6605 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6606 echo "configure:6607: checking for X11/Intrinsic.h" >&5
6607
6608 cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 #include <X11/Intrinsic.h>
6612 EOF
6613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6614 { (eval echo configure:6615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6616 if test -z "$ac_err"; then
6617   rm -rf conftest*
6618   eval "ac_cv_header_$ac_safe=yes"
6619 else
6620   echo "$ac_err" >&5
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623   rm -rf conftest*
6624   eval "ac_cv_header_$ac_safe=no"
6625 fi
6626 rm -f conftest*
6627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6628   echo "$ac_t""yes" 1>&6
6629   :
6630 else
6631   echo "$ac_t""no" 1>&6
6632 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6633 fi
6634
6635
6636       
6637 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6638 echo "configure:6639: checking for XOpenDisplay in -lX11" >&5
6639 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6640
6641 xe_check_libs=" -lX11 "
6642 cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645 /* Override any gcc2 internal prototype to avoid an error.  */
6646 /* We use char because int might match the return type of a gcc2
6647     builtin and then its argument prototype would still apply.  */
6648 char XOpenDisplay();
6649
6650 int main() {
6651 XOpenDisplay()
6652 ; return 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6655   rm -rf conftest*
6656   eval "ac_cv_lib_$ac_lib_var=yes"
6657 else
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_lib_$ac_lib_var=no"
6662 fi
6663 rm -f conftest*
6664 xe_check_libs=""
6665
6666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6667   echo "$ac_t""yes" 1>&6
6668   have_lib_x11=yes
6669 else
6670   echo "$ac_t""no" 1>&6
6671 fi
6672
6673
6674   if test "$have_lib_x11" != "yes"; then
6675     
6676 xe_msg_checking="for XGetFontProperty in -lX11"
6677 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6678 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6679 echo "configure:6680: checking "$xe_msg_checking"" >&5
6680 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6681
6682 xe_check_libs=" -lX11 -b i486-linuxaout"
6683 cat > conftest.$ac_ext <<EOF
6684 #line 6685 "configure"
6685 #include "confdefs.h"
6686 /* Override any gcc2 internal prototype to avoid an error.  */
6687 /* We use char because int might match the return type of a gcc2
6688     builtin and then its argument prototype would still apply.  */
6689 char XGetFontProperty();
6690
6691 int main() {
6692 XGetFontProperty()
6693 ; return 0; }
6694 EOF
6695 if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6696   rm -rf conftest*
6697   eval "ac_cv_lib_$ac_lib_var=yes"
6698 else
6699   echo "configure: failed program was:" >&5
6700   cat conftest.$ac_ext >&5
6701   rm -rf conftest*
6702   eval "ac_cv_lib_$ac_lib_var=no"
6703 fi
6704 rm -f conftest*
6705 xe_check_libs=""
6706
6707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6708   echo "$ac_t""yes" 1>&6
6709   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6710 else
6711   echo "$ac_t""no" 1>&6
6712 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6713 fi
6714
6715
6716   fi
6717   libs_x="-lX11"
6718   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6719
6720     
6721 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6722 echo "configure:6723: checking for XShapeSelectInput in -lXext" >&5
6723 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6724
6725 xe_check_libs=" -lXext "
6726 cat > conftest.$ac_ext <<EOF
6727 #line 6728 "configure"
6728 #include "confdefs.h"
6729 /* Override any gcc2 internal prototype to avoid an error.  */
6730 /* We use char because int might match the return type of a gcc2
6731     builtin and then its argument prototype would still apply.  */
6732 char XShapeSelectInput();
6733
6734 int main() {
6735 XShapeSelectInput()
6736 ; return 0; }
6737 EOF
6738 if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6739   rm -rf conftest*
6740   eval "ac_cv_lib_$ac_lib_var=yes"
6741 else
6742   echo "configure: failed program was:" >&5
6743   cat conftest.$ac_ext >&5
6744   rm -rf conftest*
6745   eval "ac_cv_lib_$ac_lib_var=no"
6746 fi
6747 rm -f conftest*
6748 xe_check_libs=""
6749
6750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6751   echo "$ac_t""yes" 1>&6
6752   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6753 else
6754   echo "$ac_t""no" 1>&6
6755 fi
6756
6757
6758
6759     
6760 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6761 echo "configure:6762: checking for XtOpenDisplay in -lXt" >&5
6762 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6763
6764 xe_check_libs=" -lXt "
6765 cat > conftest.$ac_ext <<EOF
6766 #line 6767 "configure"
6767 #include "confdefs.h"
6768 /* Override any gcc2 internal prototype to avoid an error.  */
6769 /* We use char because int might match the return type of a gcc2
6770     builtin and then its argument prototype would still apply.  */
6771 char XtOpenDisplay();
6772
6773 int main() {
6774 XtOpenDisplay()
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6778   rm -rf conftest*
6779   eval "ac_cv_lib_$ac_lib_var=yes"
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   eval "ac_cv_lib_$ac_lib_var=no"
6785 fi
6786 rm -f conftest*
6787 xe_check_libs=""
6788
6789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6790   echo "$ac_t""yes" 1>&6
6791   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6792 else
6793   echo "$ac_t""no" 1>&6
6794 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6795 fi
6796
6797
6798
6799   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6800 echo "configure:6801: checking the version of X11 being used" >&5
6801   cat > conftest.$ac_ext <<EOF
6802 #line 6803 "configure"
6803 #include "confdefs.h"
6804 #include <X11/Intrinsic.h>
6805     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6808 then
6809   ./conftest foobar; x11_release=$?
6810 else
6811   conftest_rc="$?"
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -fr conftest*
6815   x11_release=4
6816 fi
6817 rm -fr conftest*
6818   echo "$ac_t""R${x11_release}" 1>&6
6819   { test "$extra_verbose" = "yes" && cat << EOF
6820     Defining THIS_IS_X11R${x11_release}
6821 EOF
6822 cat >> confdefs.h <<EOF
6823 #define THIS_IS_X11R${x11_release} 1
6824 EOF
6825 }
6826
6827
6828   if test "${x11_release}" = "4"; then
6829     case "$with_widgets" in
6830       "" | "no") with_widgets=no ;;
6831       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6832     esac
6833   fi
6834
6835   for ac_func in XConvertCase
6836 do
6837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6838 echo "configure:6839: checking for $ac_func" >&5
6839
6840 cat > conftest.$ac_ext <<EOF
6841 #line 6842 "configure"
6842 #include "confdefs.h"
6843 /* System header to define __stub macros and hopefully few prototypes,
6844     which can conflict with char $ac_func(); below.  */
6845 #include <assert.h>
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 /* We use char because int might match the return type of a gcc2
6848     builtin and then its argument prototype would still apply.  */
6849 char $ac_func();
6850
6851 int main() {
6852
6853 /* The GNU C library defines this for functions which it implements
6854     to always fail with ENOSYS.  Some functions are actually named
6855     something starting with __ and the normal name is an alias.  */
6856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6857 choke me
6858 #else
6859 $ac_func();
6860 #endif
6861
6862 ; return 0; }
6863 EOF
6864 if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6865   rm -rf conftest*
6866   eval "ac_cv_func_$ac_func=yes"
6867 else
6868   echo "configure: failed program was:" >&5
6869   cat conftest.$ac_ext >&5
6870   rm -rf conftest*
6871   eval "ac_cv_func_$ac_func=no"
6872 fi
6873 rm -f conftest*
6874
6875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6876   echo "$ac_t""yes" 1>&6
6877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6878   { test "$extra_verbose" = "yes" && cat << EOF
6879     Defining $ac_tr_func
6880 EOF
6881 cat >> confdefs.h <<EOF
6882 #define $ac_tr_func 1
6883 EOF
6884 }
6885  
6886 else
6887   echo "$ac_t""no" 1>&6
6888 fi
6889 done
6890
6891
6892   for ac_hdr in X11/Xlocale.h
6893 do
6894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6896 echo "configure:6897: checking for $ac_hdr" >&5
6897
6898 cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 #include <$ac_hdr>
6902 EOF
6903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6904 { (eval echo configure:6905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6906 if test -z "$ac_err"; then
6907   rm -rf conftest*
6908   eval "ac_cv_header_$ac_safe=yes"
6909 else
6910   echo "$ac_err" >&5
6911   echo "configure: failed program was:" >&5
6912   cat conftest.$ac_ext >&5
6913   rm -rf conftest*
6914   eval "ac_cv_header_$ac_safe=no"
6915 fi
6916 rm -f conftest*
6917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6918   echo "$ac_t""yes" 1>&6
6919     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6920   { test "$extra_verbose" = "yes" && cat << EOF
6921     Defining $ac_tr_hdr
6922 EOF
6923 cat >> confdefs.h <<EOF
6924 #define $ac_tr_hdr 1
6925 EOF
6926 }
6927  
6928 else
6929   echo "$ac_t""no" 1>&6
6930 fi
6931 done
6932
6933
6934     for ac_func in XRegisterIMInstantiateCallback
6935 do
6936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6937 echo "configure:6938: checking for $ac_func" >&5
6938
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 /* System header to define __stub macros and hopefully few prototypes,
6943     which can conflict with char $ac_func(); below.  */
6944 #include <assert.h>
6945 /* Override any gcc2 internal prototype to avoid an error.  */
6946 /* We use char because int might match the return type of a gcc2
6947     builtin and then its argument prototype would still apply.  */
6948 char $ac_func();
6949
6950 int main() {
6951
6952 /* The GNU C library defines this for functions which it implements
6953     to always fail with ENOSYS.  Some functions are actually named
6954     something starting with __ and the normal name is an alias.  */
6955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6956 choke me
6957 #else
6958 $ac_func();
6959 #endif
6960
6961 ; return 0; }
6962 EOF
6963 if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6964   rm -rf conftest*
6965   eval "ac_cv_func_$ac_func=yes"
6966 else
6967   echo "configure: failed program was:" >&5
6968   cat conftest.$ac_ext >&5
6969   rm -rf conftest*
6970   eval "ac_cv_func_$ac_func=no"
6971 fi
6972 rm -f conftest*
6973
6974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6975   echo "$ac_t""yes" 1>&6
6976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6977   { test "$extra_verbose" = "yes" && cat << EOF
6978     Defining $ac_tr_func
6979 EOF
6980 cat >> confdefs.h <<EOF
6981 #define $ac_tr_func 1
6982 EOF
6983 }
6984  
6985 else
6986   echo "$ac_t""no" 1>&6
6987 fi
6988 done
6989
6990   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6991 echo "configure:6992: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6992   cat > conftest.$ac_ext <<EOF
6993 #line 6994 "configure"
6994 #include "confdefs.h"
6995
6996 #define NeedFunctionPrototypes 1
6997 #include <X11/Xlib.h>
6998 extern Bool XRegisterIMInstantiateCallback(
6999    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7000
7001 int main() {
7002
7003 ; return 0; }
7004 EOF
7005 if { (eval echo configure:7006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7006   rm -rf conftest*
7007   echo "$ac_t""yes" 1>&6
7008 else
7009   echo "configure: failed program was:" >&5
7010   cat conftest.$ac_ext >&5
7011   rm -rf conftest*
7012   echo "$ac_t""no" 1>&6
7013    { test "$extra_verbose" = "yes" && cat << \EOF
7014     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7015 EOF
7016 cat >> confdefs.h <<\EOF
7017 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7018 EOF
7019 }
7020
7021 fi
7022 rm -f conftest*
7023
7024     test -z "$with_xmu" && { 
7025 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7026 echo "configure:7027: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7027 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7028
7029 xe_check_libs=" -lXmu "
7030 cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* Override any gcc2 internal prototype to avoid an error.  */
7034 /* We use char because int might match the return type of a gcc2
7035     builtin and then its argument prototype would still apply.  */
7036 char XmuReadBitmapDataFromFile();
7037
7038 int main() {
7039 XmuReadBitmapDataFromFile()
7040 ; return 0; }
7041 EOF
7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7043   rm -rf conftest*
7044   eval "ac_cv_lib_$ac_lib_var=yes"
7045 else
7046   echo "configure: failed program was:" >&5
7047   cat conftest.$ac_ext >&5
7048   rm -rf conftest*
7049   eval "ac_cv_lib_$ac_lib_var=no"
7050 fi
7051 rm -f conftest*
7052 xe_check_libs=""
7053
7054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7055   echo "$ac_t""yes" 1>&6
7056   with_xmu=yes
7057 else
7058   echo "$ac_t""no" 1>&6
7059 with_xmu=no
7060 fi
7061
7062  }
7063   if test "$with_xmu" = "no"; then
7064     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7065    echo "    xemacs will be linked with \"xmu.o\""
7066  fi
7067   else
7068     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7069     { test "$extra_verbose" = "yes" && cat << \EOF
7070     Defining HAVE_XMU
7071 EOF
7072 cat >> confdefs.h <<\EOF
7073 #define HAVE_XMU 1
7074 EOF
7075 }
7076
7077   fi
7078
7079       
7080 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7081 echo "configure:7082: checking for main in -lXbsd" >&5
7082 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7083
7084 xe_check_libs=" -lXbsd "
7085 cat > conftest.$ac_ext <<EOF
7086 #line 7087 "configure"
7087 #include "confdefs.h"
7088
7089 int main() {
7090 main()
7091 ; return 0; }
7092 EOF
7093 if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7094   rm -rf conftest*
7095   eval "ac_cv_lib_$ac_lib_var=yes"
7096 else
7097   echo "configure: failed program was:" >&5
7098   cat conftest.$ac_ext >&5
7099   rm -rf conftest*
7100   eval "ac_cv_lib_$ac_lib_var=no"
7101 fi
7102 rm -f conftest*
7103 xe_check_libs=""
7104
7105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7106   echo "$ac_t""yes" 1>&6
7107   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7108 else
7109   echo "$ac_t""no" 1>&6
7110 fi
7111
7112
7113
7114     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7115         if test "$GCC" = "yes"; then
7116                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7117 echo "configure:7118: checking for name of AIX gcc threads option" >&5
7118       case `$CC -v --help 2>&1` in
7119         *-mthreads*) aix_threads=-mthreads ;;
7120                   *) aix_threads=-pthread  ;;
7121       esac
7122       echo "$ac_t""$aix_threads" 1>&6
7123       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7124       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7125     else
7126             case "$CC" in *_r) : ;;
7127         *)
7128          xe_save_CC="$CC"
7129          CC="${CC}_r"
7130          echo $ac_n "checking size of short""... $ac_c" 1>&6
7131 echo "configure:7132: checking size of short" >&5
7132
7133 cat > conftest.$ac_ext <<EOF
7134 #line 7135 "configure"
7135 #include "confdefs.h"
7136 #include <stdio.h>
7137 main()
7138 {
7139   FILE *f=fopen("conftestval", "w");
7140   if (!f) exit(1);
7141   fprintf(f, "%d\n", sizeof(short));
7142   exit(0);
7143 }
7144 EOF
7145 if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7146 then
7147   ac_cv_sizeof_short=`cat conftestval`
7148 else
7149   conftest_rc="$?"
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -fr conftest*
7153   ac_cv_sizeof_short=0
7154 fi
7155 rm -fr conftest*
7156 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7157 { test "$extra_verbose" = "yes" && cat << EOF
7158     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7159 EOF
7160 cat >> confdefs.h <<EOF
7161 #define SIZEOF_SHORT $ac_cv_sizeof_short
7162 EOF
7163 }
7164
7165
7166          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7167       esac
7168     fi
7169   fi
7170
7171 fi 
7172 if test "$with_msw" != "no"; then
7173   echo "checking for MS-Windows" 1>&6
7174 echo "configure:7175: checking for MS-Windows" >&5
7175   
7176 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7177 echo "configure:7178: checking for main in -lgdi32" >&5
7178 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7179
7180 xe_check_libs=" -lgdi32 "
7181 cat > conftest.$ac_ext <<EOF
7182 #line 7183 "configure"
7183 #include "confdefs.h"
7184
7185 int main() {
7186 main()
7187 ; return 0; }
7188 EOF
7189 if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7190   rm -rf conftest*
7191   eval "ac_cv_lib_$ac_lib_var=yes"
7192 else
7193   echo "configure: failed program was:" >&5
7194   cat conftest.$ac_ext >&5
7195   rm -rf conftest*
7196   eval "ac_cv_lib_$ac_lib_var=no"
7197 fi
7198 rm -f conftest*
7199 xe_check_libs=""
7200
7201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7202   echo "$ac_t""yes" 1>&6
7203   with_msw=yes
7204 else
7205   echo "$ac_t""no" 1>&6
7206 fi
7207
7208
7209   if test "$with_msw" = "yes"; then
7210     { test "$extra_verbose" = "yes" && cat << \EOF
7211     Defining HAVE_MS_WINDOWS
7212 EOF
7213 cat >> confdefs.h <<\EOF
7214 #define HAVE_MS_WINDOWS 1
7215 EOF
7216 }
7217
7218
7219         if test "$with_netinstall" = "yes"; then
7220       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7221       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7222       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7223     fi
7224
7225     install_pp="$blddir/lib-src/installexe.sh"
7226     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool\" to \$libs_system"; fi
7227     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7228     if test "$window_system" != x11; then
7229         window_system=msw
7230         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7231             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7232    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7233  fi
7234         test "$with_menubars"   != "no" && with_menubars=msw \
7235             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7236    echo "    xemacs will be linked with \"menubar-msw.o\""
7237  fi
7238         test "$with_toolbars"   != "no" && with_toolbars=msw \
7239             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7240    echo "    xemacs will be linked with \"toolbar-msw.o\""
7241  fi
7242         test "$with_dialogs"   != "no" && with_dialogs=msw \
7243             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7244    echo "    xemacs will be linked with \"dialog-msw.o\""
7245  fi
7246         test "$with_widgets"   != "no" && with_widgets=msw
7247     else
7248         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7249    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7250  fi
7251         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7252    echo "    xemacs will be linked with \"menubar-msw.o\""
7253  fi
7254         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7255    echo "    xemacs will be linked with \"toolbar-msw.o\""
7256  fi
7257         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7258    echo "    xemacs will be linked with \"dialog-msw.o\""
7259  fi
7260     fi
7261         cat > conftest.$ac_ext <<EOF
7262 #line 7263 "configure"
7263 #include "confdefs.h"
7264 #include <fcntl.h>
7265     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7266 EOF
7267 if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7268 then
7269   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7270     Defining HAVE_MSG_SELECT
7271 EOF
7272 cat >> confdefs.h <<\EOF
7273 #define HAVE_MSG_SELECT 1
7274 EOF
7275 }
7276
7277 else
7278   conftest_rc="$?"
7279   echo "configure: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281 fi
7282 rm -fr conftest*
7283     with_file_coding=yes
7284     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
7285    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\""
7286  fi
7287   fi
7288 fi
7289
7290
7291
7292 test -z "$window_system" && window_system="none"
7293
7294 if test "$window_system" = "none"; then
7295   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7296   do
7297     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7298        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7299     fi
7300     eval "with_${feature}=no"
7301   done
7302 else
7303   test -z "$with_toolbars" && with_toolbars=yes
7304 fi
7305
7306 if test "$with_msw" != "yes"; then
7307   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7308   do
7309     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7310        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7311     fi
7312     eval "with_${feature}=no"
7313   done
7314 else
7315   :
7316 fi
7317
7318 if test "$with_x11" != "yes"; then
7319             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7320   do
7321     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7322        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7323     fi
7324     eval "with_${feature}=no"
7325   done
7326 fi
7327
7328 if test "$with_x11" = "yes"; then
7329   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7330 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7331 echo "configure:7332: checking for X11/extensions/shape.h" >&5
7332
7333 cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 #include <X11/extensions/shape.h>
7337 EOF
7338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7339 { (eval echo configure:7340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7341 if test -z "$ac_err"; then
7342   rm -rf conftest*
7343   eval "ac_cv_header_$ac_safe=yes"
7344 else
7345   echo "$ac_err" >&5
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -rf conftest*
7349   eval "ac_cv_header_$ac_safe=no"
7350 fi
7351 rm -f conftest*
7352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7353   echo "$ac_t""yes" 1>&6
7354   
7355    { test "$extra_verbose" = "yes" && cat << \EOF
7356     Defining HAVE_BALLOON_HELP
7357 EOF
7358 cat >> confdefs.h <<\EOF
7359 #define HAVE_BALLOON_HELP 1
7360 EOF
7361 }
7362
7363    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7364    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7365  fi
7366 else
7367   echo "$ac_t""no" 1>&6
7368 fi
7369
7370 fi
7371
7372 bitmapdir=
7373
7374 case "$window_system" in
7375   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7376   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7377   gtk  )
7378        HAVE_X_WINDOWS=no
7379        test "$with_gnome" = "yes" && echo "  Using GNOME."
7380        test "$with_gnome" = "no" && echo "  Using GTK."
7381        ;;
7382   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7383 esac
7384
7385 case "$x_libraries" in *X11R4* )
7386   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7387   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7388 esac
7389
7390 echo "checking for WM_COMMAND option" 1>&6
7391 echo "configure:7392: checking for WM_COMMAND option" >&5;
7392 if test "$with_wmcommand" != "no"; then
7393   { test "$extra_verbose" = "yes" && cat << \EOF
7394     Defining HAVE_WMCOMMAND
7395 EOF
7396 cat >> confdefs.h <<\EOF
7397 #define HAVE_WMCOMMAND 1
7398 EOF
7399 }
7400
7401 fi
7402
7403 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7404 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7405 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7406 echo "configure:7407: checking for X11/Xauth.h" >&5
7407
7408 cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 #include <X11/Xauth.h>
7412 EOF
7413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7414 { (eval echo configure:7415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7416 if test -z "$ac_err"; then
7417   rm -rf conftest*
7418   eval "ac_cv_header_$ac_safe=yes"
7419 else
7420   echo "$ac_err" >&5
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   eval "ac_cv_header_$ac_safe=no"
7425 fi
7426 rm -f conftest*
7427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7428   echo "$ac_t""yes" 1>&6
7429   :
7430 else
7431   echo "$ac_t""no" 1>&6
7432 with_xauth=no
7433 fi
7434  }
7435 test -z "$with_xauth" && { 
7436 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7437 echo "configure:7438: checking for XauGetAuthByAddr in -lXau" >&5
7438 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7439
7440 xe_check_libs=" -lXau "
7441 cat > conftest.$ac_ext <<EOF
7442 #line 7443 "configure"
7443 #include "confdefs.h"
7444 /* Override any gcc2 internal prototype to avoid an error.  */
7445 /* We use char because int might match the return type of a gcc2
7446     builtin and then its argument prototype would still apply.  */
7447 char XauGetAuthByAddr();
7448
7449 int main() {
7450 XauGetAuthByAddr()
7451 ; return 0; }
7452 EOF
7453 if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7454   rm -rf conftest*
7455   eval "ac_cv_lib_$ac_lib_var=yes"
7456 else
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -rf conftest*
7460   eval "ac_cv_lib_$ac_lib_var=no"
7461 fi
7462 rm -f conftest*
7463 xe_check_libs=""
7464
7465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7466   echo "$ac_t""yes" 1>&6
7467   :
7468 else
7469   echo "$ac_t""no" 1>&6
7470 with_xauth=no
7471 fi
7472
7473  }
7474 test -z "$with_xauth" && with_xauth=yes
7475 if test "$with_xauth" = "yes"; then
7476   { test "$extra_verbose" = "yes" && cat << \EOF
7477     Defining HAVE_XAUTH
7478 EOF
7479 cat >> confdefs.h <<\EOF
7480 #define HAVE_XAUTH 1
7481 EOF
7482 }
7483
7484   
7485 T=""
7486 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
7487 libs_xauth="$T"
7488
7489 fi
7490
7491
7492
7493
7494 if test "$with_tooltalk" != "no" ; then
7495       for dir in "" "Tt/" "desktop/" ; do
7496     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7497 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7498 echo "configure:7499: checking for ${dir}tt_c.h" >&5
7499
7500 cat > conftest.$ac_ext <<EOF
7501 #line 7502 "configure"
7502 #include "confdefs.h"
7503 #include <${dir}tt_c.h>
7504 EOF
7505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7506 { (eval echo configure:7507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7508 if test -z "$ac_err"; then
7509   rm -rf conftest*
7510   eval "ac_cv_header_$ac_safe=yes"
7511 else
7512   echo "$ac_err" >&5
7513   echo "configure: failed program was:" >&5
7514   cat conftest.$ac_ext >&5
7515   rm -rf conftest*
7516   eval "ac_cv_header_$ac_safe=no"
7517 fi
7518 rm -f conftest*
7519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7520   echo "$ac_t""yes" 1>&6
7521   tt_c_h_file="${dir}tt_c.h"; break
7522 else
7523   echo "$ac_t""no" 1>&6
7524 fi
7525
7526   done
7527   if test -z "$tt_c_h_file"; then
7528     if test "$with_tooltalk" = "yes"; then
7529       (echo "$progname: Usage error:"
7530 echo " " "Unable to find required tooltalk header files."
7531 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7532     fi
7533     with_tooltalk=no
7534   fi
7535 fi
7536 if test "$with_tooltalk" != "no" ; then
7537   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7538     
7539 xe_msg_checking="for tt_message_create in -ltt"
7540 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7541 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7542 echo "configure:7543: checking "$xe_msg_checking"" >&5
7543 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7544
7545 xe_check_libs=" -ltt $extra_libs"
7546 cat > conftest.$ac_ext <<EOF
7547 #line 7548 "configure"
7548 #include "confdefs.h"
7549 /* Override any gcc2 internal prototype to avoid an error.  */
7550 /* We use char because int might match the return type of a gcc2
7551     builtin and then its argument prototype would still apply.  */
7552 char tt_message_create();
7553
7554 int main() {
7555 tt_message_create()
7556 ; return 0; }
7557 EOF
7558 if { (eval echo configure:7559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7559   rm -rf conftest*
7560   eval "ac_cv_lib_$ac_lib_var=yes"
7561 else
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -rf conftest*
7565   eval "ac_cv_lib_$ac_lib_var=no"
7566 fi
7567 rm -f conftest*
7568 xe_check_libs=""
7569
7570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7571   echo "$ac_t""yes" 1>&6
7572   tt_libs="-ltt $extra_libs"; break
7573 else
7574   echo "$ac_t""no" 1>&6
7575 :
7576 fi
7577
7578
7579   done
7580   if test -z "$tt_libs"; then
7581     if test "$with_tooltalk" = "yes"; then
7582       (echo "$progname: Usage error:"
7583 echo " " "Unable to find required tooltalk libraries."
7584 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7585     fi
7586     with_tooltalk=no
7587   fi
7588 fi
7589 test -z "$with_tooltalk" && with_tooltalk=yes
7590 if test "$with_tooltalk" = "yes"; then
7591   { test "$extra_verbose" = "yes" && cat << \EOF
7592     Defining TOOLTALK
7593 EOF
7594 cat >> confdefs.h <<\EOF
7595 #define TOOLTALK 1
7596 EOF
7597 }
7598
7599   { test "$extra_verbose" = "yes" && cat << EOF
7600     Defining TT_C_H_FILE = "$tt_c_h_file"
7601 EOF
7602 cat >> confdefs.h <<EOF
7603 #define TT_C_H_FILE "$tt_c_h_file"
7604 EOF
7605 }
7606
7607   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7608   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7609    echo "    xemacs will be linked with \"tooltalk.o\""
7610  fi
7611 fi
7612
7613 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7614 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7615 echo "configure:7616: checking for Dt/Dt.h" >&5
7616
7617 cat > conftest.$ac_ext <<EOF
7618 #line 7619 "configure"
7619 #include "confdefs.h"
7620 #include <Dt/Dt.h>
7621 EOF
7622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7623 { (eval echo configure:7624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7625 if test -z "$ac_err"; then
7626   rm -rf conftest*
7627   eval "ac_cv_header_$ac_safe=yes"
7628 else
7629   echo "$ac_err" >&5
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_header_$ac_safe=no"
7634 fi
7635 rm -f conftest*
7636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7637   echo "$ac_t""yes" 1>&6
7638   :
7639 else
7640   echo "$ac_t""no" 1>&6
7641 with_cde=no
7642 fi
7643  }
7644 test -z "$with_cde" && { 
7645 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7646 echo "configure:7647: checking for DtDndDragStart in -lDtSvc" >&5
7647 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7648
7649 xe_check_libs=" -lDtSvc "
7650 cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7653 /* Override any gcc2 internal prototype to avoid an error.  */
7654 /* We use char because int might match the return type of a gcc2
7655     builtin and then its argument prototype would still apply.  */
7656 char DtDndDragStart();
7657
7658 int main() {
7659 DtDndDragStart()
7660 ; return 0; }
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7663   rm -rf conftest*
7664   eval "ac_cv_lib_$ac_lib_var=yes"
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -rf conftest*
7669   eval "ac_cv_lib_$ac_lib_var=no"
7670 fi
7671 rm -f conftest*
7672 xe_check_libs=""
7673
7674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7675   echo "$ac_t""yes" 1>&6
7676   :
7677 else
7678   echo "$ac_t""no" 1>&6
7679 with_cde=no
7680 fi
7681
7682  }
7683 test -z "$with_cde" && with_cde=yes
7684 if test "$with_dragndrop" = no; then
7685   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7686   with_cde=no
7687 fi
7688 if test "$with_cde" = "yes" ; then
7689   { test "$extra_verbose" = "yes" && cat << \EOF
7690     Defining HAVE_CDE
7691 EOF
7692 cat >> confdefs.h <<\EOF
7693 #define HAVE_CDE 1
7694 EOF
7695 }
7696
7697   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7698   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7699   with_tooltalk=yes # CDE requires Tooltalk
7700   need_motif=yes    # CDE requires Motif
7701 fi
7702
7703 test "$window_system" != "x11" && with_offix=no
7704 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7705   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7706   with_offix=no
7707 fi
7708 if test "$with_dragndrop" = no; then
7709   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7710   with_offix=no
7711 fi
7712 if test "$with_cde" = yes; then
7713   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7714   with_offix=no
7715 fi
7716 test -z "$with_offix" && with_offix=no
7717 if test "$with_offix" = "yes"; then
7718   { test "$extra_verbose" = "yes" && cat << \EOF
7719     Defining HAVE_OFFIX_DND
7720 EOF
7721 cat >> confdefs.h <<\EOF
7722 #define HAVE_OFFIX_DND 1
7723 EOF
7724 }
7725
7726   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7727   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7728 fi
7729 if test "$with_gtk" = "yes"; then
7730    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7731 fi
7732
7733 if test "$with_dragndrop" != "no" ; then
7734   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7735 echo "configure:7736: checking if drag and drop API is needed" >&5
7736   if test -n "$dragndrop_proto" ; then
7737     with_dragndrop=yes
7738     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7739     { test "$extra_verbose" = "yes" && cat << \EOF
7740     Defining HAVE_DRAGNDROP
7741 EOF
7742 cat >> confdefs.h <<\EOF
7743 #define HAVE_DRAGNDROP 1
7744 EOF
7745 }
7746
7747     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7748   else
7749     with_dragndrop=no
7750     echo "$ac_t""no" 1>&6
7751   fi
7752 fi
7753
7754 echo "checking for LDAP" 1>&6
7755 echo "configure:7756: checking for LDAP" >&5
7756 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7757 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7758 echo "configure:7759: checking for ldap.h" >&5
7759
7760 cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 #include <ldap.h>
7764 EOF
7765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7766 { (eval echo configure:7767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7768 if test -z "$ac_err"; then
7769   rm -rf conftest*
7770   eval "ac_cv_header_$ac_safe=yes"
7771 else
7772   echo "$ac_err" >&5
7773   echo "configure: failed program was:" >&5
7774   cat conftest.$ac_ext >&5
7775   rm -rf conftest*
7776   eval "ac_cv_header_$ac_safe=no"
7777 fi
7778 rm -f conftest*
7779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7780   echo "$ac_t""yes" 1>&6
7781   :
7782 else
7783   echo "$ac_t""no" 1>&6
7784 with_ldap=no
7785 fi
7786  }
7787 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7788 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7789 echo "configure:7790: checking for lber.h" >&5
7790
7791 cat > conftest.$ac_ext <<EOF
7792 #line 7793 "configure"
7793 #include "confdefs.h"
7794 #include <lber.h>
7795 EOF
7796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7797 { (eval echo configure:7798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7799 if test -z "$ac_err"; then
7800   rm -rf conftest*
7801   eval "ac_cv_header_$ac_safe=yes"
7802 else
7803   echo "$ac_err" >&5
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -rf conftest*
7807   eval "ac_cv_header_$ac_safe=no"
7808 fi
7809 rm -f conftest*
7810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7811   echo "$ac_t""yes" 1>&6
7812   :
7813 else
7814   echo "$ac_t""no" 1>&6
7815 with_ldap=no
7816 fi
7817  }
7818 if test "$with_ldap" != "no"; then
7819   
7820 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7821 echo "configure:7822: checking for ldap_search in -lldap" >&5
7822 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7823
7824 xe_check_libs=" -lldap "
7825 cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* Override any gcc2 internal prototype to avoid an error.  */
7829 /* We use char because int might match the return type of a gcc2
7830     builtin and then its argument prototype would still apply.  */
7831 char ldap_search();
7832
7833 int main() {
7834 ldap_search()
7835 ; return 0; }
7836 EOF
7837 if { (eval echo configure:7838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7838   rm -rf conftest*
7839   eval "ac_cv_lib_$ac_lib_var=yes"
7840 else
7841   echo "configure: failed program was:" >&5
7842   cat conftest.$ac_ext >&5
7843   rm -rf conftest*
7844   eval "ac_cv_lib_$ac_lib_var=no"
7845 fi
7846 rm -f conftest*
7847 xe_check_libs=""
7848
7849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7850   echo "$ac_t""yes" 1>&6
7851   with_ldap_nolber=yes
7852 else
7853   echo "$ac_t""no" 1>&6
7854 with_ldap_nolber=no
7855 fi
7856
7857
7858   test "$with_ldap_nolber" = "no" && { 
7859 xe_msg_checking="for ldap_open in -lldap"
7860 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7861 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7862 echo "configure:7863: checking "$xe_msg_checking"" >&5
7863 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7864
7865 xe_check_libs=" -lldap -llber"
7866 cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 /* Override any gcc2 internal prototype to avoid an error.  */
7870 /* We use char because int might match the return type of a gcc2
7871     builtin and then its argument prototype would still apply.  */
7872 char ldap_open();
7873
7874 int main() {
7875 ldap_open()
7876 ; return 0; }
7877 EOF
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7879   rm -rf conftest*
7880   eval "ac_cv_lib_$ac_lib_var=yes"
7881 else
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   eval "ac_cv_lib_$ac_lib_var=no"
7886 fi
7887 rm -f conftest*
7888 xe_check_libs=""
7889
7890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7891   echo "$ac_t""yes" 1>&6
7892   with_ldap_lber=yes
7893 else
7894   echo "$ac_t""no" 1>&6
7895 with_ldap_lber=no
7896 fi
7897
7898  }
7899   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7900 xe_msg_checking="for ldap_open in -lldap"
7901 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7902 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7903 echo "configure:7904: checking "$xe_msg_checking"" >&5
7904 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7905
7906 xe_check_libs=" -lldap -llber -lkrb"
7907 cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 /* Override any gcc2 internal prototype to avoid an error.  */
7911 /* We use char because int might match the return type of a gcc2
7912     builtin and then its argument prototype would still apply.  */
7913 char ldap_open();
7914
7915 int main() {
7916 ldap_open()
7917 ; return 0; }
7918 EOF
7919 if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7920   rm -rf conftest*
7921   eval "ac_cv_lib_$ac_lib_var=yes"
7922 else
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   eval "ac_cv_lib_$ac_lib_var=no"
7927 fi
7928 rm -f conftest*
7929 xe_check_libs=""
7930
7931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7932   echo "$ac_t""yes" 1>&6
7933   with_ldap_krb=yes
7934 else
7935   echo "$ac_t""no" 1>&6
7936 with_ldap_krb=no
7937 fi
7938
7939  }
7940   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7941 xe_msg_checking="for ldap_open in -lldap"
7942 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7943 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7944 echo "configure:7945: checking "$xe_msg_checking"" >&5
7945 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7946
7947 xe_check_libs=" -lldap -llber -lkrb -ldes"
7948 cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951 /* Override any gcc2 internal prototype to avoid an error.  */
7952 /* We use char because int might match the return type of a gcc2
7953     builtin and then its argument prototype would still apply.  */
7954 char ldap_open();
7955
7956 int main() {
7957 ldap_open()
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=yes"
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=no"
7968 fi
7969 rm -f conftest*
7970 xe_check_libs=""
7971
7972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7973   echo "$ac_t""yes" 1>&6
7974   with_ldap_krbdes=yes
7975 else
7976   echo "$ac_t""no" 1>&6
7977 with_ldap_krbdes=no
7978 fi
7979
7980  }
7981   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
7982 fi
7983 if test "$with_ldap" = "yes"; then
7984   { test "$extra_verbose" = "yes" && cat << \EOF
7985     Defining HAVE_LDAP
7986 EOF
7987 cat >> confdefs.h <<\EOF
7988 #define HAVE_LDAP 1
7989 EOF
7990 }
7991
7992   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7993    echo "    xemacs will be linked with \"eldap.o\""
7994  fi
7995   if test "$with_ldap_nolber" = "yes" ; then
7996     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7997   else
7998     if test "$with_ldap_krb" = "yes" ; then
7999       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8000     fi
8001     if test "$with_ldap_krbdes" = "yes" ; then
8002       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8003       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8004     fi
8005     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8006     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8007   fi
8008   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8009 do
8010 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8011 echo "configure:8012: checking for $ac_func" >&5
8012
8013 cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* System header to define __stub macros and hopefully few prototypes,
8017     which can conflict with char $ac_func(); below.  */
8018 #include <assert.h>
8019 /* Override any gcc2 internal prototype to avoid an error.  */
8020 /* We use char because int might match the return type of a gcc2
8021     builtin and then its argument prototype would still apply.  */
8022 char $ac_func();
8023
8024 int main() {
8025
8026 /* The GNU C library defines this for functions which it implements
8027     to always fail with ENOSYS.  Some functions are actually named
8028     something starting with __ and the normal name is an alias.  */
8029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8030 choke me
8031 #else
8032 $ac_func();
8033 #endif
8034
8035 ; return 0; }
8036 EOF
8037 if { (eval echo configure:8038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8038   rm -rf conftest*
8039   eval "ac_cv_func_$ac_func=yes"
8040 else
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   eval "ac_cv_func_$ac_func=no"
8045 fi
8046 rm -f conftest*
8047
8048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8049   echo "$ac_t""yes" 1>&6
8050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8051   { test "$extra_verbose" = "yes" && cat << EOF
8052     Defining $ac_tr_func
8053 EOF
8054 cat >> confdefs.h <<EOF
8055 #define $ac_tr_func 1
8056 EOF
8057 }
8058  
8059 else
8060   echo "$ac_t""no" 1>&6
8061 fi
8062 done
8063
8064 fi
8065
8066 if test "$with_postgresql" != "no"; then
8067   echo "checking for PostgreSQL" 1>&6
8068 echo "configure:8069: checking for PostgreSQL" >&5
8069
8070   for header_dir in "" "pgsql/" "postgresql/"; do
8071     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8072 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8073 echo "configure:8074: checking for ${header_dir}libpq-fe.h" >&5
8074
8075 cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078 #include <${header_dir}libpq-fe.h>
8079 EOF
8080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8081 { (eval echo configure:8082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8083 if test -z "$ac_err"; then
8084   rm -rf conftest*
8085   eval "ac_cv_header_$ac_safe=yes"
8086 else
8087   echo "$ac_err" >&5
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_header_$ac_safe=no"
8092 fi
8093 rm -f conftest*
8094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8095   echo "$ac_t""yes" 1>&6
8096   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8097 else
8098   echo "$ac_t""no" 1>&6
8099 fi
8100
8101   done
8102
8103   test -n "$libpq_fe_h_file" && { 
8104 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8105 echo "configure:8106: checking for PQconnectdb in -lpq" >&5
8106 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8107
8108 xe_check_libs=" -lpq "
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* Override any gcc2 internal prototype to avoid an error.  */
8113 /* We use char because int might match the return type of a gcc2
8114     builtin and then its argument prototype would still apply.  */
8115 char PQconnectdb();
8116
8117 int main() {
8118 PQconnectdb()
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=yes"
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=no"
8129 fi
8130 rm -f conftest*
8131 xe_check_libs=""
8132
8133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8134   echo "$ac_t""yes" 1>&6
8135   have_libpq=yes
8136 else
8137   echo "$ac_t""no" 1>&6
8138 fi
8139
8140  }
8141
8142   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8143     with_postgresql=yes
8144     { test "$extra_verbose" = "yes" && cat << \EOF
8145     Defining HAVE_POSTGRESQL
8146 EOF
8147 cat >> confdefs.h <<\EOF
8148 #define HAVE_POSTGRESQL 1
8149 EOF
8150 }
8151
8152     
8153 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8154 echo "configure:8155: checking for PQconnectStart in -lpq" >&5
8155 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8156
8157 xe_check_libs=" -lpq "
8158 cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 /* Override any gcc2 internal prototype to avoid an error.  */
8162 /* We use char because int might match the return type of a gcc2
8163     builtin and then its argument prototype would still apply.  */
8164 char PQconnectStart();
8165
8166 int main() {
8167 PQconnectStart()
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   with_postgresqlv7=yes;
8185                  { test "$extra_verbose" = "yes" && cat << \EOF
8186     Defining HAVE_POSTGRESQLV7
8187 EOF
8188 cat >> confdefs.h <<\EOF
8189 #define HAVE_POSTGRESQLV7 1
8190 EOF
8191 }
8192
8193 else
8194   echo "$ac_t""no" 1>&6
8195 fi
8196
8197
8198     { test "$extra_verbose" = "yes" && cat << EOF
8199     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8200 EOF
8201 cat >> confdefs.h <<EOF
8202 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8203 EOF
8204 }
8205
8206     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8207     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8208    echo "    xemacs will be linked with \"postgresql.o\""
8209  fi
8210   elif test "$with_postgresql" = "yes"; then
8211     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8212   fi
8213 fi
8214
8215
8216 if test "$window_system" != "none"; then
8217   echo "checking for graphics libraries" 1>&6
8218 echo "configure:8219: checking for graphics libraries" >&5
8219
8220       libpath_xpm=
8221   incpath_xpm=
8222   case "$opsys" in 
8223     cygwin*)
8224       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8225       cygwin_top=`eval "dirname ${cygwin_top}"`;
8226       cygwin_top="${cygwin_top}/..";
8227       case "$window_system" in
8228                 x11)  ;;
8229                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8230              incpath_xpm="-I${cygwin_top}/include/noX"
8231               ;;
8232                 gtk)  ;;
8233                 none) ;;
8234                 *)    ;;
8235       esac
8236       ;;
8237         *) ;;
8238   esac
8239     xpm_problem=""
8240   if test -z "$with_xpm"; then
8241     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8242     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8243     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8244 echo "configure:8245: checking for Xpm - no older than 3.4f" >&5
8245     xe_check_libs=-lXpm
8246     cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 #define XPM_NUMBERS
8250 #include <X11/xpm.h>
8251     int main(int c, char **v) {
8252     return c == 1 ? 0 :
8253       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8254       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8255 EOF
8256 if { (eval echo configure:8257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8257 then
8258   ./conftest dummy_arg; xpm_status=$?;
8259       if test "$xpm_status" = "0"; then
8260         with_xpm=yes;
8261       else
8262         with_xpm=no;
8263         if test "$xpm_status" = "1"; then
8264           xpm_problem="Xpm library version and header file version don't match!"
8265         elif test "$xpm_status" = "2"; then
8266           xpm_problem="Xpm library version is too old!"
8267         else
8268           xpm_problem="Internal xpm detection logic error!"
8269         fi
8270         echo "
8271 *** WARNING *** $xpm_problem
8272   I'm not touching that with a 10-foot pole!
8273   If you really want to use the installed version of Xpm, rerun
8274   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8275     fi
8276 else
8277   conftest_rc="$?"
8278   echo "configure: failed program was:" >&5
8279   cat conftest.$ac_ext >&5
8280   rm -fr conftest*
8281   with_xpm=no
8282 fi
8283 rm -fr conftest*
8284     xe_check_libs=
8285     echo "$ac_t""$with_xpm" 1>&6
8286   fi
8287   if test "$with_xpm" = "yes"; then
8288                 { test "$extra_verbose" = "yes" && cat << \EOF
8289     Defining HAVE_XPM
8290 EOF
8291 cat >> confdefs.h <<\EOF
8292 #define HAVE_XPM 1
8293 EOF
8294 }
8295
8296     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8297     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8298     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8299     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8300 echo "configure:8301: checking for \"FOR_MSW\" xpm" >&5
8301     xe_check_libs=-lXpm
8302     cat > conftest.$ac_ext <<EOF
8303 #line 8304 "configure"
8304 #include "confdefs.h"
8305
8306 int main() {
8307 XpmCreatePixmapFromData()
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   xpm_for_msw=no
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   xpm_for_msw=yes
8318 fi
8319 rm -f conftest*
8320     xe_check_libs=
8321     echo "$ac_t""$xpm_for_msw" 1>&6
8322     if test "$xpm_for_msw" = "yes"; then
8323       { test "$extra_verbose" = "yes" && cat << \EOF
8324     Defining FOR_MSW
8325 EOF
8326 cat >> confdefs.h <<\EOF
8327 #define FOR_MSW 1
8328 EOF
8329 }
8330
8331     fi
8332   fi
8333
8334     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8335 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8336 echo "configure:8337: checking for compface.h" >&5
8337
8338 cat > conftest.$ac_ext <<EOF
8339 #line 8340 "configure"
8340 #include "confdefs.h"
8341 #include <compface.h>
8342 EOF
8343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8344 { (eval echo configure:8345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8346 if test -z "$ac_err"; then
8347   rm -rf conftest*
8348   eval "ac_cv_header_$ac_safe=yes"
8349 else
8350   echo "$ac_err" >&5
8351   echo "configure: failed program was:" >&5
8352   cat conftest.$ac_ext >&5
8353   rm -rf conftest*
8354   eval "ac_cv_header_$ac_safe=no"
8355 fi
8356 rm -f conftest*
8357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8358   echo "$ac_t""yes" 1>&6
8359   :
8360 else
8361   echo "$ac_t""no" 1>&6
8362 with_xface=no
8363 fi
8364  }
8365   test -z "$with_xface" && { 
8366 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8367 echo "configure:8368: checking for UnGenFace in -lcompface" >&5
8368 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8369
8370 xe_check_libs=" -lcompface "
8371 cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374 /* Override any gcc2 internal prototype to avoid an error.  */
8375 /* We use char because int might match the return type of a gcc2
8376     builtin and then its argument prototype would still apply.  */
8377 char UnGenFace();
8378
8379 int main() {
8380 UnGenFace()
8381 ; return 0; }
8382 EOF
8383 if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8384   rm -rf conftest*
8385   eval "ac_cv_lib_$ac_lib_var=yes"
8386 else
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -rf conftest*
8390   eval "ac_cv_lib_$ac_lib_var=no"
8391 fi
8392 rm -f conftest*
8393 xe_check_libs=""
8394
8395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8396   echo "$ac_t""yes" 1>&6
8397   : 
8398 else
8399   echo "$ac_t""no" 1>&6
8400 with_xface=no
8401 fi
8402
8403  }
8404   test -z "$with_xface" && with_xface=yes
8405   if test "$with_xface" = "yes"; then
8406     { test "$extra_verbose" = "yes" && cat << \EOF
8407     Defining HAVE_XFACE
8408 EOF
8409 cat >> confdefs.h <<\EOF
8410 #define HAVE_XFACE 1
8411 EOF
8412 }
8413
8414     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8415   fi
8416
8417         if test "$with_gif" != "no"; then
8418     with_gif="yes"
8419     { test "$extra_verbose" = "yes" && cat << \EOF
8420     Defining HAVE_GIF
8421 EOF
8422 cat >> confdefs.h <<\EOF
8423 #define HAVE_GIF 1
8424 EOF
8425 }
8426
8427     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8428    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8429  fi
8430   fi
8431
8432       if test "$with_png $with_tiff" != "no no"; then
8433     
8434 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8435 echo "configure:8436: checking for inflate in -lc" >&5
8436 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8437
8438 xe_check_libs=" -lc "
8439 cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 /* Override any gcc2 internal prototype to avoid an error.  */
8443 /* We use char because int might match the return type of a gcc2
8444     builtin and then its argument prototype would still apply.  */
8445 char inflate();
8446
8447 int main() {
8448 inflate()
8449 ; return 0; }
8450 EOF
8451 if { (eval echo configure:8452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8452   rm -rf conftest*
8453   eval "ac_cv_lib_$ac_lib_var=yes"
8454 else
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   eval "ac_cv_lib_$ac_lib_var=no"
8459 fi
8460 rm -f conftest*
8461 xe_check_libs=""
8462
8463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8464   echo "$ac_t""yes" 1>&6
8465   :
8466 else
8467   echo "$ac_t""no" 1>&6
8468
8469 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8470 echo "configure:8471: checking for inflate in -lz" >&5
8471 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8472
8473 xe_check_libs=" -lz "
8474 cat > conftest.$ac_ext <<EOF
8475 #line 8476 "configure"
8476 #include "confdefs.h"
8477 /* Override any gcc2 internal prototype to avoid an error.  */
8478 /* We use char because int might match the return type of a gcc2
8479     builtin and then its argument prototype would still apply.  */
8480 char inflate();
8481
8482 int main() {
8483 inflate()
8484 ; return 0; }
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8487   rm -rf conftest*
8488   eval "ac_cv_lib_$ac_lib_var=yes"
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   eval "ac_cv_lib_$ac_lib_var=no"
8494 fi
8495 rm -f conftest*
8496 xe_check_libs=""
8497
8498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8499   echo "$ac_t""yes" 1>&6
8500   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8501 else
8502   echo "$ac_t""no" 1>&6
8503
8504 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8505 echo "configure:8506: checking for inflate in -lgz" >&5
8506 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8507
8508 xe_check_libs=" -lgz "
8509 cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 /* Override any gcc2 internal prototype to avoid an error.  */
8513 /* We use char because int might match the return type of a gcc2
8514     builtin and then its argument prototype would still apply.  */
8515 char inflate();
8516
8517 int main() {
8518 inflate()
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   eval "ac_cv_lib_$ac_lib_var=yes"
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   eval "ac_cv_lib_$ac_lib_var=no"
8529 fi
8530 rm -f conftest*
8531 xe_check_libs=""
8532
8533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8534   echo "$ac_t""yes" 1>&6
8535   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8536 else
8537   echo "$ac_t""no" 1>&6
8538 fi
8539
8540
8541 fi
8542
8543
8544 fi
8545
8546
8547   fi
8548
8549     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8550 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8551 echo "configure:8552: checking for jpeglib.h" >&5
8552
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8556 #include <jpeglib.h>
8557 EOF
8558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8559 { (eval echo configure:8560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8561 if test -z "$ac_err"; then
8562   rm -rf conftest*
8563   eval "ac_cv_header_$ac_safe=yes"
8564 else
8565   echo "$ac_err" >&5
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -rf conftest*
8569   eval "ac_cv_header_$ac_safe=no"
8570 fi
8571 rm -f conftest*
8572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8573   echo "$ac_t""yes" 1>&6
8574   :
8575 else
8576   echo "$ac_t""no" 1>&6
8577 with_jpeg=no
8578 fi
8579  }
8580   test -z "$with_jpeg" && { 
8581 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8582 echo "configure:8583: checking for jpeg_destroy_decompress in -ljpeg" >&5
8583 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8584
8585 xe_check_libs=" -ljpeg "
8586 cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 /* Override any gcc2 internal prototype to avoid an error.  */
8590 /* We use char because int might match the return type of a gcc2
8591     builtin and then its argument prototype would still apply.  */
8592 char jpeg_destroy_decompress();
8593
8594 int main() {
8595 jpeg_destroy_decompress()
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8599   rm -rf conftest*
8600   eval "ac_cv_lib_$ac_lib_var=yes"
8601 else
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=no"
8606 fi
8607 rm -f conftest*
8608 xe_check_libs=""
8609
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8611   echo "$ac_t""yes" 1>&6
8612   :
8613 else
8614   echo "$ac_t""no" 1>&6
8615 with_jpeg=no
8616 fi
8617
8618  }
8619   test -z "$with_jpeg" && with_jpeg=yes
8620   if test "$with_jpeg" = "yes"; then
8621     { test "$extra_verbose" = "yes" && cat << \EOF
8622     Defining HAVE_JPEG
8623 EOF
8624 cat >> confdefs.h <<\EOF
8625 #define HAVE_JPEG 1
8626 EOF
8627 }
8628
8629     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8630   fi
8631
8632     png_problem=""
8633   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8634 echo "configure:8635: checking for pow" >&5
8635
8636 cat > conftest.$ac_ext <<EOF
8637 #line 8638 "configure"
8638 #include "confdefs.h"
8639 /* System header to define __stub macros and hopefully few prototypes,
8640     which can conflict with char pow(); below.  */
8641 #include <assert.h>
8642 /* Override any gcc2 internal prototype to avoid an error.  */
8643 /* We use char because int might match the return type of a gcc2
8644     builtin and then its argument prototype would still apply.  */
8645 char pow();
8646
8647 int main() {
8648
8649 /* The GNU C library defines this for functions which it implements
8650     to always fail with ENOSYS.  Some functions are actually named
8651     something starting with __ and the normal name is an alias.  */
8652 #if defined (__stub_pow) || defined (__stub___pow)
8653 choke me
8654 #else
8655 pow();
8656 #endif
8657
8658 ; return 0; }
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8661   rm -rf conftest*
8662   eval "ac_cv_func_pow=yes"
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -rf conftest*
8667   eval "ac_cv_func_pow=no"
8668 fi
8669 rm -f conftest*
8670
8671 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8672   echo "$ac_t""yes" 1>&6
8673   :
8674 else
8675   echo "$ac_t""no" 1>&6
8676 with_png=no
8677 fi
8678  }
8679   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8680 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8681 echo "configure:8682: checking for png.h" >&5
8682
8683 cat > conftest.$ac_ext <<EOF
8684 #line 8685 "configure"
8685 #include "confdefs.h"
8686 #include <png.h>
8687 EOF
8688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8689 { (eval echo configure:8690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8691 if test -z "$ac_err"; then
8692   rm -rf conftest*
8693   eval "ac_cv_header_$ac_safe=yes"
8694 else
8695   echo "$ac_err" >&5
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   eval "ac_cv_header_$ac_safe=no"
8700 fi
8701 rm -f conftest*
8702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8703   echo "$ac_t""yes" 1>&6
8704   :
8705 else
8706   echo "$ac_t""no" 1>&6
8707 with_png=no
8708 fi
8709  }
8710   test -z "$with_png" && { 
8711 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8712 echo "configure:8713: checking for png_read_image in -lpng" >&5
8713 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8714
8715 xe_check_libs=" -lpng "
8716 cat > conftest.$ac_ext <<EOF
8717 #line 8718 "configure"
8718 #include "confdefs.h"
8719 /* Override any gcc2 internal prototype to avoid an error.  */
8720 /* We use char because int might match the return type of a gcc2
8721     builtin and then its argument prototype would still apply.  */
8722 char png_read_image();
8723
8724 int main() {
8725 png_read_image()
8726 ; return 0; }
8727 EOF
8728 if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8729   rm -rf conftest*
8730   eval "ac_cv_lib_$ac_lib_var=yes"
8731 else
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_lib_$ac_lib_var=no"
8736 fi
8737 rm -f conftest*
8738 xe_check_libs=""
8739
8740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8741   echo "$ac_t""yes" 1>&6
8742   :
8743 else
8744   echo "$ac_t""no" 1>&6
8745 with_png=no
8746 fi
8747
8748  }
8749   if test -z "$with_png"; then
8750     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8751 echo "configure:8752: checking for workable png version information" >&5
8752     xe_check_libs="-lpng -lz"
8753     cat > conftest.$ac_ext <<EOF
8754 #line 8755 "configure"
8755 #include "confdefs.h"
8756 #include <png.h>
8757     int main(int c, char **v) {
8758     if (c == 1) return 0;
8759     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8760     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8763 then
8764   ./conftest dummy_arg; png_status=$?;
8765       if test "$png_status" = "0"; then
8766         with_png=yes;
8767       else
8768         with_png=no;
8769         if test "$png_status" = "1"; then
8770           png_problem="PNG library version and header file don't match!"
8771         elif test "$png_status" = "2"; then
8772           png_problem="PNG library version too old (pre 1.0.2)!"
8773         fi
8774         echo "
8775 *** WARNING *** $png_problem
8776   I'm not touching that with a 10-foot pole!
8777   If you really want to use the installed version of libPNG, rerun
8778   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8779     fi
8780 else
8781   conftest_rc="$?"
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -fr conftest*
8785   with_png=no
8786 fi
8787 rm -fr conftest*
8788     xe_check_libs=
8789     echo "$ac_t""$with_png" 1>&6
8790   fi
8791   if test "$with_png" = "yes"; then
8792     { test "$extra_verbose" = "yes" && cat << \EOF
8793     Defining HAVE_PNG
8794 EOF
8795 cat >> confdefs.h <<\EOF
8796 #define HAVE_PNG 1
8797 EOF
8798 }
8799
8800     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8801   fi
8802
8803     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8804 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8805 echo "configure:8806: checking for tiffio.h" >&5
8806
8807 cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 #include <tiffio.h>
8811 EOF
8812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8813 { (eval echo configure:8814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8815 if test -z "$ac_err"; then
8816   rm -rf conftest*
8817   eval "ac_cv_header_$ac_safe=yes"
8818 else
8819   echo "$ac_err" >&5
8820   echo "configure: failed program was:" >&5
8821   cat conftest.$ac_ext >&5
8822   rm -rf conftest*
8823   eval "ac_cv_header_$ac_safe=no"
8824 fi
8825 rm -f conftest*
8826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8827   echo "$ac_t""yes" 1>&6
8828   :
8829 else
8830   echo "$ac_t""no" 1>&6
8831 with_tiff=no
8832 fi
8833  }
8834   test -z "$with_tiff" && { 
8835 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8836 echo "configure:8837: checking for TIFFClientOpen in -ltiff" >&5
8837 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8838
8839 xe_check_libs=" -ltiff "
8840 cat > conftest.$ac_ext <<EOF
8841 #line 8842 "configure"
8842 #include "confdefs.h"
8843 /* Override any gcc2 internal prototype to avoid an error.  */
8844 /* We use char because int might match the return type of a gcc2
8845     builtin and then its argument prototype would still apply.  */
8846 char TIFFClientOpen();
8847
8848 int main() {
8849 TIFFClientOpen()
8850 ; return 0; }
8851 EOF
8852 if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8853   rm -rf conftest*
8854   eval "ac_cv_lib_$ac_lib_var=yes"
8855 else
8856   echo "configure: failed program was:" >&5
8857   cat conftest.$ac_ext >&5
8858   rm -rf conftest*
8859   eval "ac_cv_lib_$ac_lib_var=no"
8860 fi
8861 rm -f conftest*
8862 xe_check_libs=""
8863
8864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8865   echo "$ac_t""yes" 1>&6
8866   :
8867 else
8868   echo "$ac_t""no" 1>&6
8869 with_tiff=no
8870 fi
8871
8872  }
8873   test -z "$with_tiff" && with_tiff=yes
8874   if test "$with_tiff" = "yes"; then
8875     { test "$extra_verbose" = "yes" && cat << \EOF
8876     Defining HAVE_TIFF
8877 EOF
8878 cat >> confdefs.h <<\EOF
8879 #define HAVE_TIFF 1
8880 EOF
8881 }
8882
8883     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8884   fi
8885 fi
8886
8887
8888 if test "$with_gtk" = "yes"; then
8889     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8890 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8891 echo "configure:8892: checking for compface.h" >&5
8892
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 #include <compface.h>
8897 EOF
8898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8899 { (eval echo configure:8900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8901 if test -z "$ac_err"; then
8902   rm -rf conftest*
8903   eval "ac_cv_header_$ac_safe=yes"
8904 else
8905   echo "$ac_err" >&5
8906   echo "configure: failed program was:" >&5
8907   cat conftest.$ac_ext >&5
8908   rm -rf conftest*
8909   eval "ac_cv_header_$ac_safe=no"
8910 fi
8911 rm -f conftest*
8912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8913   echo "$ac_t""yes" 1>&6
8914   :
8915 else
8916   echo "$ac_t""no" 1>&6
8917 with_xface=no
8918 fi
8919  }
8920   test -z "$with_xface" && { 
8921 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8922 echo "configure:8923: checking for UnGenFace in -lcompface" >&5
8923 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8924
8925 xe_check_libs=" -lcompface "
8926 cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* Override any gcc2 internal prototype to avoid an error.  */
8930 /* We use char because int might match the return type of a gcc2
8931     builtin and then its argument prototype would still apply.  */
8932 char UnGenFace();
8933
8934 int main() {
8935 UnGenFace()
8936 ; return 0; }
8937 EOF
8938 if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8939   rm -rf conftest*
8940   eval "ac_cv_lib_$ac_lib_var=yes"
8941 else
8942   echo "configure: failed program was:" >&5
8943   cat conftest.$ac_ext >&5
8944   rm -rf conftest*
8945   eval "ac_cv_lib_$ac_lib_var=no"
8946 fi
8947 rm -f conftest*
8948 xe_check_libs=""
8949
8950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8951   echo "$ac_t""yes" 1>&6
8952   : 
8953 else
8954   echo "$ac_t""no" 1>&6
8955 with_xface=no
8956 fi
8957
8958  }
8959   test -z "$with_xface" && with_xface=yes
8960   if test "$with_xface" = "yes"; then
8961     { test "$extra_verbose" = "yes" && cat << \EOF
8962     Defining HAVE_XFACE
8963 EOF
8964 cat >> confdefs.h <<\EOF
8965 #define HAVE_XFACE 1
8966 EOF
8967 }
8968
8969     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8970   fi
8971 fi
8972
8973
8974
8975 if test "$with_x11" = "yes"; then
8976   echo "checking for X11 graphics libraries" 1>&6
8977 echo "configure:8978: checking for X11 graphics libraries" >&5
8978 fi
8979
8980 if test "$with_x11" = "yes"; then
8981   echo "checking for the Athena widgets" 1>&6
8982 echo "configure:8983: checking for the Athena widgets" >&5
8983
8984     case "$with_athena" in
8985         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8986     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8987     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8988     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8989     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8990     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8991   esac
8992
8993   athena_3d_function=Xaw3dComputeBottomShadowRGB
8994
8995     if test "$athena_3d" = "no"; then
8996     
8997 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8998 echo "configure:8999: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8999 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9000
9001 xe_check_libs=" -l$athena_variant "
9002 cat > conftest.$ac_ext <<EOF
9003 #line 9004 "configure"
9004 #include "confdefs.h"
9005 /* Override any gcc2 internal prototype to avoid an error.  */
9006 /* We use char because int might match the return type of a gcc2
9007     builtin and then its argument prototype would still apply.  */
9008 char XawScrollbarSetThumb();
9009
9010 int main() {
9011 XawScrollbarSetThumb()
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9015   rm -rf conftest*
9016   eval "ac_cv_lib_$ac_lib_var=yes"
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=no"
9022 fi
9023 rm -f conftest*
9024 xe_check_libs=""
9025
9026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9027   echo "$ac_t""yes" 1>&6
9028           
9029 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9030 echo "configure:9031: checking for $athena_3d_function in -l$athena_variant" >&5
9031 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9032
9033 xe_check_libs=" -l$athena_variant "
9034 cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037 /* Override any gcc2 internal prototype to avoid an error.  */
9038 /* We use char because int might match the return type of a gcc2
9039     builtin and then its argument prototype would still apply.  */
9040 char $athena_3d_function();
9041
9042 int main() {
9043 $athena_3d_function()
9044 ; return 0; }
9045 EOF
9046 if { (eval echo configure:9047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9047   rm -rf conftest*
9048   eval "ac_cv_lib_$ac_lib_var=yes"
9049 else
9050   echo "configure: failed program was:" >&5
9051   cat conftest.$ac_ext >&5
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=no"
9054 fi
9055 rm -f conftest*
9056 xe_check_libs=""
9057
9058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9059   echo "$ac_t""yes" 1>&6
9060   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9061 else
9062   echo "$ac_t""no" 1>&6
9063 athena_lib=$athena_variant
9064 fi
9065
9066
9067       
9068 else
9069   echo "$ac_t""no" 1>&6
9070 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9071 fi
9072
9073
9074   else
9075         
9076 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9077 echo "configure:9078: checking for $athena_3d_function in -l$athena_variant" >&5
9078 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9079
9080 xe_check_libs=" -l$athena_variant "
9081 cat > conftest.$ac_ext <<EOF
9082 #line 9083 "configure"
9083 #include "confdefs.h"
9084 /* Override any gcc2 internal prototype to avoid an error.  */
9085 /* We use char because int might match the return type of a gcc2
9086     builtin and then its argument prototype would still apply.  */
9087 char $athena_3d_function();
9088
9089 int main() {
9090 $athena_3d_function()
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   eval "ac_cv_lib_$ac_lib_var=yes"
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   eval "ac_cv_lib_$ac_lib_var=no"
9101 fi
9102 rm -f conftest*
9103 xe_check_libs=""
9104
9105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9106   echo "$ac_t""yes" 1>&6
9107   athena_lib=$athena_variant
9108 else
9109   echo "$ac_t""no" 1>&6
9110 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9111 echo "configure:9112: checking for $athena_3d_function in -lXaw" >&5
9112 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9113
9114 xe_check_libs=" -lXaw "
9115 cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118 /* Override any gcc2 internal prototype to avoid an error.  */
9119 /* We use char because int might match the return type of a gcc2
9120     builtin and then its argument prototype would still apply.  */
9121 char $athena_3d_function();
9122
9123 int main() {
9124 $athena_3d_function()
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=yes"
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=no"
9135 fi
9136 rm -f conftest*
9137 xe_check_libs=""
9138
9139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9140   echo "$ac_t""yes" 1>&6
9141   athena_lib=Xaw;
9142           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9143         
9144 else
9145   echo "$ac_t""no" 1>&6
9146 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9147 fi
9148
9149
9150 fi
9151
9152
9153   fi
9154
9155     if test "$athena_3d" = "no"; then
9156     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9157 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9158 echo "configure:9159: checking for X11/Xaw/ThreeD.h" >&5
9159
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 #include <X11/Xaw/ThreeD.h>
9164 EOF
9165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9166 { (eval echo configure:9167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9168 if test -z "$ac_err"; then
9169   rm -rf conftest*
9170   eval "ac_cv_header_$ac_safe=yes"
9171 else
9172   echo "$ac_err" >&5
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_header_$ac_safe=no"
9177 fi
9178 rm -f conftest*
9179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9182 else
9183   echo "$ac_t""no" 1>&6
9184 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9185 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9186 echo "configure:9187: checking for X11/Xaw/XawInit.h" >&5
9187
9188 cat > conftest.$ac_ext <<EOF
9189 #line 9190 "configure"
9190 #include "confdefs.h"
9191 #include <X11/Xaw/XawInit.h>
9192 EOF
9193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9194 { (eval echo configure:9195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9196 if test -z "$ac_err"; then
9197   rm -rf conftest*
9198   eval "ac_cv_header_$ac_safe=yes"
9199 else
9200   echo "$ac_err" >&5
9201   echo "configure: failed program was:" >&5
9202   cat conftest.$ac_ext >&5
9203   rm -rf conftest*
9204   eval "ac_cv_header_$ac_safe=no"
9205 fi
9206 rm -f conftest*
9207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9208   echo "$ac_t""yes" 1>&6
9209   athena_h_path=X11/Xaw
9210 else
9211   echo "$ac_t""no" 1>&6
9212 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9213 fi
9214
9215 fi
9216
9217   else
9218             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9219 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9220 echo "configure:9221: checking for X11/$athena_variant/XawInit.h" >&5
9221
9222 cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <X11/$athena_variant/XawInit.h>
9226 EOF
9227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9228 { (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9230 if test -z "$ac_err"; then
9231   rm -rf conftest*
9232   eval "ac_cv_header_$ac_safe=yes"
9233 else
9234   echo "$ac_err" >&5
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_header_$ac_safe=no"
9239 fi
9240 rm -f conftest*
9241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9242   echo "$ac_t""yes" 1>&6
9243   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9244 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9245 echo "configure:9246: checking for X11/$athena_variant/ThreeD.h" >&5
9246
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250 #include <X11/$athena_variant/ThreeD.h>
9251 EOF
9252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9253 { (eval echo configure:9254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9255 if test -z "$ac_err"; then
9256   rm -rf conftest*
9257   eval "ac_cv_header_$ac_safe=yes"
9258 else
9259   echo "$ac_err" >&5
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -rf conftest*
9263   eval "ac_cv_header_$ac_safe=no"
9264 fi
9265 rm -f conftest*
9266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9267   echo "$ac_t""yes" 1>&6
9268   athena_h_path=X11/$athena_variant
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273 else
9274   echo "$ac_t""no" 1>&6
9275 fi
9276
9277
9278         if test -z "$athena_h_path"; then
9279       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9280 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9281 echo "configure:9282: checking for $athena_variant/XawInit.h" >&5
9282
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286 #include <$athena_variant/XawInit.h>
9287 EOF
9288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9289 { (eval echo configure:9290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9291 if test -z "$ac_err"; then
9292   rm -rf conftest*
9293   eval "ac_cv_header_$ac_safe=yes"
9294 else
9295   echo "$ac_err" >&5
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   eval "ac_cv_header_$ac_safe=no"
9300 fi
9301 rm -f conftest*
9302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9305 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9306 echo "configure:9307: checking for $athena_variant/ThreeD.h" >&5
9307
9308 cat > conftest.$ac_ext <<EOF
9309 #line 9310 "configure"
9310 #include "confdefs.h"
9311 #include <$athena_variant/ThreeD.h>
9312 EOF
9313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9314 { (eval echo configure:9315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9316 if test -z "$ac_err"; then
9317   rm -rf conftest*
9318   eval "ac_cv_header_$ac_safe=yes"
9319 else
9320   echo "$ac_err" >&5
9321   echo "configure: failed program was:" >&5
9322   cat conftest.$ac_ext >&5
9323   rm -rf conftest*
9324   eval "ac_cv_header_$ac_safe=no"
9325 fi
9326 rm -f conftest*
9327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9328   echo "$ac_t""yes" 1>&6
9329   athena_h_path=$athena_variant
9330 else
9331   echo "$ac_t""no" 1>&6
9332 fi
9333
9334 else
9335   echo "$ac_t""no" 1>&6
9336 fi
9337
9338     fi
9339
9340         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9341       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9342 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9343 echo "configure:9344: checking for X11/Xaw3d/XawInit.h" >&5
9344
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 #include <X11/Xaw3d/XawInit.h>
9349 EOF
9350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9351 { (eval echo configure:9352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9353 if test -z "$ac_err"; then
9354   rm -rf conftest*
9355   eval "ac_cv_header_$ac_safe=yes"
9356 else
9357   echo "$ac_err" >&5
9358   echo "configure: failed program was:" >&5
9359   cat conftest.$ac_ext >&5
9360   rm -rf conftest*
9361   eval "ac_cv_header_$ac_safe=no"
9362 fi
9363 rm -f conftest*
9364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9365   echo "$ac_t""yes" 1>&6
9366   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9367 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9368 echo "configure:9369: checking for X11/Xaw3d/ThreeD.h" >&5
9369
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 #include <X11/Xaw3d/ThreeD.h>
9374 EOF
9375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9376 { (eval echo configure:9377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9378 if test -z "$ac_err"; then
9379   rm -rf conftest*
9380   eval "ac_cv_header_$ac_safe=yes"
9381 else
9382   echo "$ac_err" >&5
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_header_$ac_safe=no"
9387 fi
9388 rm -f conftest*
9389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9390   echo "$ac_t""yes" 1>&6
9391   
9392             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9393             athena_h_path=X11/Xaw3d
9394           
9395 else
9396   echo "$ac_t""no" 1>&6
9397 fi
9398
9399 else
9400   echo "$ac_t""no" 1>&6
9401 fi
9402
9403     fi
9404
9405         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9406       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9407 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9408 echo "configure:9409: checking for Xaw3d/XawInit.h" >&5
9409
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413 #include <Xaw3d/XawInit.h>
9414 EOF
9415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9416 { (eval echo configure:9417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9418 if test -z "$ac_err"; then
9419   rm -rf conftest*
9420   eval "ac_cv_header_$ac_safe=yes"
9421 else
9422   echo "$ac_err" >&5
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_header_$ac_safe=no"
9427 fi
9428 rm -f conftest*
9429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9430   echo "$ac_t""yes" 1>&6
9431   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9432 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9433 echo "configure:9434: checking for Xaw3d/ThreeD.h" >&5
9434
9435 cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438 #include <Xaw3d/ThreeD.h>
9439 EOF
9440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9441 { (eval echo configure:9442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9443 if test -z "$ac_err"; then
9444   rm -rf conftest*
9445   eval "ac_cv_header_$ac_safe=yes"
9446 else
9447   echo "$ac_err" >&5
9448   echo "configure: failed program was:" >&5
9449   cat conftest.$ac_ext >&5
9450   rm -rf conftest*
9451   eval "ac_cv_header_$ac_safe=no"
9452 fi
9453 rm -f conftest*
9454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9455   echo "$ac_t""yes" 1>&6
9456   
9457             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9458             athena_h_path=Xaw3d
9459           
9460 else
9461   echo "$ac_t""no" 1>&6
9462 fi
9463
9464 else
9465   echo "$ac_t""no" 1>&6
9466 fi
9467
9468     fi
9469
9470             if test -z "$athena_h_path"; then
9471       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9472 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9473 echo "configure:9474: checking for X11/Xaw/ThreeD.h" >&5
9474
9475 cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 #include <X11/Xaw/ThreeD.h>
9479 EOF
9480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9481 { (eval echo configure:9482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9483 if test -z "$ac_err"; then
9484   rm -rf conftest*
9485   eval "ac_cv_header_$ac_safe=yes"
9486 else
9487   echo "$ac_err" >&5
9488   echo "configure: failed program was:" >&5
9489   cat conftest.$ac_ext >&5
9490   rm -rf conftest*
9491   eval "ac_cv_header_$ac_safe=no"
9492 fi
9493 rm -f conftest*
9494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9495   echo "$ac_t""yes" 1>&6
9496   
9497           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9498           athena_h_path=X11/Xaw
9499         
9500 else
9501   echo "$ac_t""no" 1>&6
9502 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9503 fi
9504
9505     fi
9506   fi
9507
9508     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9509     have_xaw=yes
9510   else
9511     have_xaw=no
9512   fi
9513
9514 else
9515   have_xaw=no
9516 fi 
9517 if test "$with_x11" = "yes"; then
9518     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9519 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9520 echo "configure:9521: checking for Xm/Xm.h" >&5
9521
9522 cat > conftest.$ac_ext <<EOF
9523 #line 9524 "configure"
9524 #include "confdefs.h"
9525 #include <Xm/Xm.h>
9526 EOF
9527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9528 { (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9530 if test -z "$ac_err"; then
9531   rm -rf conftest*
9532   eval "ac_cv_header_$ac_safe=yes"
9533 else
9534   echo "$ac_err" >&5
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_header_$ac_safe=no"
9539 fi
9540 rm -f conftest*
9541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9542   echo "$ac_t""yes" 1>&6
9543   
9544 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9545 echo "configure:9546: checking for XmStringFree in -lXm" >&5
9546 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9547
9548 xe_check_libs=" -lXm "
9549 cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 /* Override any gcc2 internal prototype to avoid an error.  */
9553 /* We use char because int might match the return type of a gcc2
9554     builtin and then its argument prototype would still apply.  */
9555 char XmStringFree();
9556
9557 int main() {
9558 XmStringFree()
9559 ; return 0; }
9560 EOF
9561 if { (eval echo configure:9562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9562   rm -rf conftest*
9563   eval "ac_cv_lib_$ac_lib_var=yes"
9564 else
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -rf conftest*
9568   eval "ac_cv_lib_$ac_lib_var=no"
9569 fi
9570 rm -f conftest*
9571 xe_check_libs=""
9572
9573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9574   echo "$ac_t""yes" 1>&6
9575   have_motif=yes
9576 else
9577   echo "$ac_t""no" 1>&6
9578 have_motif=no
9579 fi
9580
9581
9582 else
9583   echo "$ac_t""no" 1>&6
9584 have_motif=no
9585 fi
9586
9587
9588   if test "$have_motif" = "yes"; then
9589         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9590 echo "configure:9591: checking for Lesstif" >&5
9591     cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 #include <Xm/Xm.h>
9595 #ifdef LESSTIF_VERSION
9596 yes
9597 #endif
9598
9599 EOF
9600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9601   egrep "yes" >/dev/null 2>&1; then
9602   rm -rf conftest*
9603   have_lesstif=yes
9604 else
9605   rm -rf conftest*
9606   have_lesstif=no
9607 fi
9608 rm -f conftest*
9609
9610   echo "$ac_t""$have_lesstif" 1>&6
9611   fi
9612
9613 fi 
9614
9615 case "$with_menubars" in "" | "yes" | "athena" )
9616   with_menubars="lucid" ;;
9617 esac
9618 case "$with_dialogs" in "" | "yes" | "lucid" )
9619   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9620   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9621   else with_dialogs=no
9622   fi ;;
9623 esac
9624 case "$with_scrollbars" in "" | "yes" )
9625   with_scrollbars="lucid" ;;
9626 esac
9627 case "$with_widgets" in "" | "yes" | "lucid")
9628   if   test "$have_motif" = "yes"; then with_widgets="motif"
9629   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9630   else with_widgets=no
9631   fi ;;
9632 esac
9633
9634 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9635
9636 case "$all_widgets" in
9637   *athena* )
9638     if test "$have_xaw" != "yes"; then
9639       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9640     fi
9641
9642         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9643
9644         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9645
9646                     { test "$extra_verbose" = "yes" && cat << EOF
9647     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9648 EOF
9649 cat >> confdefs.h <<EOF
9650 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9651 EOF
9652 }
9653
9654     { test "$extra_verbose" = "yes" && cat << EOF
9655     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9656 EOF
9657 cat >> confdefs.h <<EOF
9658 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9659 EOF
9660 }
9661
9662     { test "$extra_verbose" = "yes" && cat << EOF
9663     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9664 EOF
9665 cat >> confdefs.h <<EOF
9666 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9667 EOF
9668 }
9669
9670     { test "$extra_verbose" = "yes" && cat << EOF
9671     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9672 EOF
9673 cat >> confdefs.h <<EOF
9674 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9675 EOF
9676 }
9677
9678     { test "$extra_verbose" = "yes" && cat << EOF
9679     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9680 EOF
9681 cat >> confdefs.h <<EOF
9682 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9683 EOF
9684 }
9685
9686     { test "$extra_verbose" = "yes" && cat << EOF
9687     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9688 EOF
9689 cat >> confdefs.h <<EOF
9690 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9691 EOF
9692 }
9693
9694     { test "$extra_verbose" = "yes" && cat << EOF
9695     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9696 EOF
9697 cat >> confdefs.h <<EOF
9698 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9699 EOF
9700 }
9701
9702     { test "$extra_verbose" = "yes" && cat << EOF
9703     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9704 EOF
9705 cat >> confdefs.h <<EOF
9706 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9707 EOF
9708 }
9709
9710     { test "$extra_verbose" = "yes" && cat << EOF
9711     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9712 EOF
9713 cat >> confdefs.h <<EOF
9714 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9715 EOF
9716 }
9717
9718     { test "$extra_verbose" = "yes" && cat << EOF
9719     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9720 EOF
9721 cat >> confdefs.h <<EOF
9722 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9723 EOF
9724 }
9725
9726
9727     { test "$extra_verbose" = "yes" && cat << \EOF
9728     Defining LWLIB_USES_ATHENA
9729 EOF
9730 cat >> confdefs.h <<\EOF
9731 #define LWLIB_USES_ATHENA 1
9732 EOF
9733 }
9734
9735     { test "$extra_verbose" = "yes" && cat << \EOF
9736     Defining NEED_ATHENA
9737 EOF
9738 cat >> confdefs.h <<\EOF
9739 #define NEED_ATHENA 1
9740 EOF
9741 }
9742
9743     need_athena="yes"
9744
9745     if test "$athena_3d" = "yes"; then
9746       { test "$extra_verbose" = "yes" && cat << \EOF
9747     Defining HAVE_ATHENA_3D
9748 EOF
9749 cat >> confdefs.h <<\EOF
9750 #define HAVE_ATHENA_3D 1
9751 EOF
9752 }
9753
9754     fi
9755   ;;
9756 esac
9757
9758 case "$all_widgets" in *motif* )
9759   { test "$extra_verbose" = "yes" && cat << \EOF
9760     Defining LWLIB_USES_MOTIF
9761 EOF
9762 cat >> confdefs.h <<\EOF
9763 #define LWLIB_USES_MOTIF 1
9764 EOF
9765 }
9766
9767   { test "$extra_verbose" = "yes" && cat << \EOF
9768     Defining NEED_MOTIF
9769 EOF
9770 cat >> confdefs.h <<\EOF
9771 #define NEED_MOTIF 1
9772 EOF
9773 }
9774
9775   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9776   need_motif=yes ;;
9777 esac
9778
9779 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9780 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9781 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9782 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9783         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9784 case "$with_widgets" in athena* )
9785         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;;
9786 esac
9787 case "$all_widgets" in *lucid* )
9788   { test "$extra_verbose" = "yes" && cat << \EOF
9789     Defining NEED_LUCID
9790 EOF
9791 cat >> confdefs.h <<\EOF
9792 #define NEED_LUCID 1
9793 EOF
9794 }
9795
9796   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9797 esac
9798
9799
9800
9801 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9802     Defining LWLIB_SCROLLBARS_ATHENA
9803 EOF
9804 cat >> confdefs.h <<\EOF
9805 #define LWLIB_SCROLLBARS_ATHENA 1
9806 EOF
9807 }
9808
9809 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9810     Defining LWLIB_DIALOGS_ATHENA
9811 EOF
9812 cat >> confdefs.h <<\EOF
9813 #define LWLIB_DIALOGS_ATHENA 1
9814 EOF
9815 }
9816
9817
9818 if test "$athena_3d" = "yes"; then
9819   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9820     Defining LWLIB_SCROLLBARS_ATHENA3D
9821 EOF
9822 cat >> confdefs.h <<\EOF
9823 #define LWLIB_SCROLLBARS_ATHENA3D 1
9824 EOF
9825 }
9826
9827   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9828     Defining LWLIB_DIALOGS_ATHENA3D
9829 EOF
9830 cat >> confdefs.h <<\EOF
9831 #define LWLIB_DIALOGS_ATHENA3D 1
9832 EOF
9833 }
9834
9835 fi
9836
9837 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9838     Defining LWLIB_WIDGETS_ATHENA
9839 EOF
9840 cat >> confdefs.h <<\EOF
9841 #define LWLIB_WIDGETS_ATHENA 1
9842 EOF
9843 }
9844 ;; esac
9845 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9846         { test "$extra_verbose" = "yes" && cat << \EOF
9847     Defining LWLIB_TABS_LUCID
9848 EOF
9849 cat >> confdefs.h <<\EOF
9850 #define LWLIB_TABS_LUCID 1
9851 EOF
9852 }
9853
9854
9855 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9856     Defining HAVE_MENUBARS
9857 EOF
9858 cat >> confdefs.h <<\EOF
9859 #define HAVE_MENUBARS 1
9860 EOF
9861 }
9862
9863 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9864     Defining HAVE_SCROLLBARS
9865 EOF
9866 cat >> confdefs.h <<\EOF
9867 #define HAVE_SCROLLBARS 1
9868 EOF
9869 }
9870
9871 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining HAVE_DIALOGS
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define HAVE_DIALOGS 1
9876 EOF
9877 }
9878
9879 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9880     Defining HAVE_TOOLBARS
9881 EOF
9882 cat >> confdefs.h <<\EOF
9883 #define HAVE_TOOLBARS 1
9884 EOF
9885 }
9886
9887 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9888     Defining HAVE_WIDGETS
9889 EOF
9890 cat >> confdefs.h <<\EOF
9891 #define HAVE_WIDGETS 1
9892 EOF
9893 }
9894
9895
9896 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9897     Defining LWLIB_MENUBARS_LUCID
9898 EOF
9899 cat >> confdefs.h <<\EOF
9900 #define LWLIB_MENUBARS_LUCID 1
9901 EOF
9902 }
9903
9904 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9905     Defining LWLIB_SCROLLBARS_LUCID
9906 EOF
9907 cat >> confdefs.h <<\EOF
9908 #define LWLIB_SCROLLBARS_LUCID 1
9909 EOF
9910 }
9911
9912
9913 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9914     Defining LWLIB_MENUBARS_MOTIF
9915 EOF
9916 cat >> confdefs.h <<\EOF
9917 #define LWLIB_MENUBARS_MOTIF 1
9918 EOF
9919 }
9920
9921 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9922     Defining LWLIB_SCROLLBARS_MOTIF
9923 EOF
9924 cat >> confdefs.h <<\EOF
9925 #define LWLIB_SCROLLBARS_MOTIF 1
9926 EOF
9927 }
9928
9929 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9930     Defining LWLIB_DIALOGS_MOTIF
9931 EOF
9932 cat >> confdefs.h <<\EOF
9933 #define LWLIB_DIALOGS_MOTIF 1
9934 EOF
9935 }
9936
9937 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9938     Defining LWLIB_WIDGETS_MOTIF
9939 EOF
9940 cat >> confdefs.h <<\EOF
9941 #define LWLIB_WIDGETS_MOTIF 1
9942 EOF
9943 }
9944
9945
9946 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9947    echo "    xemacs will be linked with \"menubar.o\""
9948  fi
9949 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9950    echo "    xemacs will be linked with \"scrollbar.o\""
9951  fi
9952 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9953    echo "    xemacs will be linked with \"dialog.o\""
9954  fi
9955 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9956    echo "    xemacs will be linked with \"toolbar.o\""
9957  fi
9958
9959 if test "$with_gtk" = "yes"; then
9960   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9961    echo "    xemacs will be linked with \"menubar-gtk.o\""
9962  fi
9963   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9964    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9965  fi
9966   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9967    echo "    xemacs will be linked with \"dialog-gtk.o\""
9968  fi
9969   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9970    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9971  fi
9972   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9973    echo "    xemacs will be linked with \"gui-gtk.o\""
9974  fi
9975 fi
9976
9977 if test "$with_x11" = "yes"; then
9978   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9979    echo "    xemacs will be linked with \"menubar-x.o\""
9980  fi
9981   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9982    echo "    xemacs will be linked with \"scrollbar-x.o\""
9983  fi
9984   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9985    echo "    xemacs will be linked with \"dialog-x.o\""
9986  fi
9987   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9988    echo "    xemacs will be linked with \"toolbar-x.o\""
9989  fi
9990   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9991    echo "    xemacs will be linked with \"gui-x.o\""
9992  fi
9993 fi
9994
9995
9996 test -z "$with_mule" && with_mule=no
9997 test -z "$with_file_coding" && with_file_coding=no
9998
9999
10000 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10001   { test "$extra_verbose" = "yes" && cat << \EOF
10002     Defining FILE_CODING
10003 EOF
10004 cat >> confdefs.h <<\EOF
10005 #define FILE_CODING 1
10006 EOF
10007 }
10008
10009   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10010    echo "    xemacs will be linked with \"file-coding.o\""
10011  fi
10012 fi
10013
10014 if test "$with_mule" = "yes" ; then
10015   echo "checking for Mule-related features" 1>&6
10016 echo "configure:10017: checking for Mule-related features" >&5
10017   { test "$extra_verbose" = "yes" && cat << \EOF
10018     Defining MULE
10019 EOF
10020 cat >> confdefs.h <<\EOF
10021 #define MULE 1
10022 EOF
10023 }
10024
10025   { test "$extra_verbose" = "yes" && cat << \EOF
10026     Defining FILE_CODING
10027 EOF
10028 cat >> confdefs.h <<\EOF
10029 #define FILE_CODING 1
10030 EOF
10031 }
10032
10033   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10034    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
10035  fi
10036
10037     for ac_hdr in libintl.h
10038 do
10039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10041 echo "configure:10042: checking for $ac_hdr" >&5
10042
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 #include <$ac_hdr>
10047 EOF
10048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10049 { (eval echo configure:10050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10051 if test -z "$ac_err"; then
10052   rm -rf conftest*
10053   eval "ac_cv_header_$ac_safe=yes"
10054 else
10055   echo "$ac_err" >&5
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -rf conftest*
10059   eval "ac_cv_header_$ac_safe=no"
10060 fi
10061 rm -f conftest*
10062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10063   echo "$ac_t""yes" 1>&6
10064     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10065   { test "$extra_verbose" = "yes" && cat << EOF
10066     Defining $ac_tr_hdr
10067 EOF
10068 cat >> confdefs.h <<EOF
10069 #define $ac_tr_hdr 1
10070 EOF
10071 }
10072  
10073 else
10074   echo "$ac_t""no" 1>&6
10075 fi
10076 done
10077
10078   
10079 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10080 echo "configure:10081: checking for strerror in -lintl" >&5
10081 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10082
10083 xe_check_libs=" -lintl "
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 /* Override any gcc2 internal prototype to avoid an error.  */
10088 /* We use char because int might match the return type of a gcc2
10089     builtin and then its argument prototype would still apply.  */
10090 char strerror();
10091
10092 int main() {
10093 strerror()
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10097   rm -rf conftest*
10098   eval "ac_cv_lib_$ac_lib_var=yes"
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   eval "ac_cv_lib_$ac_lib_var=no"
10104 fi
10105 rm -f conftest*
10106 xe_check_libs=""
10107
10108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10109   echo "$ac_t""yes" 1>&6
10110     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10111     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10112   { test "$extra_verbose" = "yes" && cat << EOF
10113     Defining $ac_tr_lib
10114 EOF
10115 cat >> confdefs.h <<EOF
10116 #define $ac_tr_lib 1
10117 EOF
10118 }
10119
10120   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10121
10122 else
10123   echo "$ac_t""no" 1>&6
10124 fi
10125
10126
10127
10128   echo "checking for Mule input methods" 1>&6
10129 echo "configure:10130: checking for Mule input methods" >&5
10130         case "$with_xim" in "" | "yes" )
10131     echo "checking for XIM" 1>&6
10132 echo "configure:10133: checking for XIM" >&5
10133     
10134 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10135 echo "configure:10136: checking for XOpenIM in -lX11" >&5
10136 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10137
10138 xe_check_libs=" -lX11 "
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* Override any gcc2 internal prototype to avoid an error.  */
10143 /* We use char because int might match the return type of a gcc2
10144     builtin and then its argument prototype would still apply.  */
10145 char XOpenIM();
10146
10147 int main() {
10148 XOpenIM()
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10152   rm -rf conftest*
10153   eval "ac_cv_lib_$ac_lib_var=yes"
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=no"
10159 fi
10160 rm -f conftest*
10161 xe_check_libs=""
10162
10163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10164   echo "$ac_t""yes" 1>&6
10165   with_xim=xlib
10166 else
10167   echo "$ac_t""no" 1>&6
10168 with_xim=no
10169 fi
10170
10171
10172         if test "$have_motif $have_lesstif" = "yes no"; then
10173       
10174 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10175 echo "configure:10176: checking for XmImMbLookupString in -lXm" >&5
10176 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10177
10178 xe_check_libs=" -lXm "
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182 /* Override any gcc2 internal prototype to avoid an error.  */
10183 /* We use char because int might match the return type of a gcc2
10184     builtin and then its argument prototype would still apply.  */
10185 char XmImMbLookupString();
10186
10187 int main() {
10188 XmImMbLookupString()
10189 ; return 0; }
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10192   rm -rf conftest*
10193   eval "ac_cv_lib_$ac_lib_var=yes"
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=no"
10199 fi
10200 rm -f conftest*
10201 xe_check_libs=""
10202
10203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10204   echo "$ac_t""yes" 1>&6
10205   with_xim=motif
10206 else
10207   echo "$ac_t""no" 1>&6
10208 fi
10209
10210
10211     fi ;;
10212   esac
10213   if test "$with_xim" != "no"; then
10214     { test "$extra_verbose" = "yes" && cat << \EOF
10215     Defining HAVE_XIM
10216 EOF
10217 cat >> confdefs.h <<\EOF
10218 #define HAVE_XIM 1
10219 EOF
10220 }
10221
10222     if test "$with_xim" = "xlib"; then
10223       { test "$extra_verbose" = "yes" && cat << \EOF
10224     Defining XIM_XLIB
10225 EOF
10226 cat >> confdefs.h <<\EOF
10227 #define XIM_XLIB 1
10228 EOF
10229 }
10230
10231       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10232    echo "    xemacs will be linked with \"input-method-xlib.o\""
10233  fi
10234     fi
10235     if test "$with_xim" = "motif"; then
10236       { test "$extra_verbose" = "yes" && cat << \EOF
10237     Defining XIM_MOTIF
10238 EOF
10239 cat >> confdefs.h <<\EOF
10240 #define XIM_MOTIF 1
10241 EOF
10242 }
10243
10244       need_motif=yes
10245       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10246    echo "    xemacs will be linked with \"input-method-motif.o\""
10247  fi
10248     fi
10249     if test "$with_xim" = "motif"; then
10250       with_xfs=no
10251     fi
10252   fi
10253
10254     if test "$with_xfs" = "yes" ; then
10255     echo "checking for XFontSet" 1>&6
10256 echo "configure:10257: checking for XFontSet" >&5
10257     
10258 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10259 echo "configure:10260: checking for XmbDrawString in -lX11" >&5
10260 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10261
10262 xe_check_libs=" -lX11 "
10263 cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 /* Override any gcc2 internal prototype to avoid an error.  */
10267 /* We use char because int might match the return type of a gcc2
10268     builtin and then its argument prototype would still apply.  */
10269 char XmbDrawString();
10270
10271 int main() {
10272 XmbDrawString()
10273 ; return 0; }
10274 EOF
10275 if { (eval echo configure:10276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10276   rm -rf conftest*
10277   eval "ac_cv_lib_$ac_lib_var=yes"
10278 else
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -rf conftest*
10282   eval "ac_cv_lib_$ac_lib_var=no"
10283 fi
10284 rm -f conftest*
10285 xe_check_libs=""
10286
10287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10288   echo "$ac_t""yes" 1>&6
10289   :
10290 else
10291   echo "$ac_t""no" 1>&6
10292 with_xfs=no
10293 fi
10294
10295
10296     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10297       { test "$extra_verbose" = "yes" && cat << \EOF
10298     Defining USE_XFONTSET
10299 EOF
10300 cat >> confdefs.h <<\EOF
10301 #define USE_XFONTSET 1
10302 EOF
10303 }
10304
10305       if test "$with_xim" = "no" ; then
10306         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10307    echo "    xemacs will be linked with \"input-method-xlib.o\""
10308  fi
10309       fi
10310     fi
10311   fi 
10312     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10313   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10314 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10315 echo "configure:10316: checking for wnn/jllib.h" >&5
10316
10317 cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320 #include <wnn/jllib.h>
10321 EOF
10322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10323 { (eval echo configure:10324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10325 if test -z "$ac_err"; then
10326   rm -rf conftest*
10327   eval "ac_cv_header_$ac_safe=yes"
10328 else
10329   echo "$ac_err" >&5
10330   echo "configure: failed program was:" >&5
10331   cat conftest.$ac_ext >&5
10332   rm -rf conftest*
10333   eval "ac_cv_header_$ac_safe=no"
10334 fi
10335 rm -f conftest*
10336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10337   echo "$ac_t""yes" 1>&6
10338   :
10339 else
10340   echo "$ac_t""no" 1>&6
10341 with_wnn=no
10342 fi
10343  }
10344     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10345 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10346 echo "configure:10347: checking for wnn/commonhd.h" >&5
10347
10348 cat > conftest.$ac_ext <<EOF
10349 #line 10350 "configure"
10350 #include "confdefs.h"
10351 #include <wnn/commonhd.h>
10352 EOF
10353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10354 { (eval echo configure:10355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10356 if test -z "$ac_err"; then
10357   rm -rf conftest*
10358   eval "ac_cv_header_$ac_safe=yes"
10359 else
10360   echo "$ac_err" >&5
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -rf conftest*
10364   eval "ac_cv_header_$ac_safe=no"
10365 fi
10366 rm -f conftest*
10367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10368   echo "$ac_t""yes" 1>&6
10369   :
10370 else
10371   echo "$ac_t""no" 1>&6
10372 with_wnn=no
10373 fi
10374  }
10375     if test "$with_wnn" != "no"; then
10376     for ac_func in crypt
10377 do
10378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_func" >&5
10380
10381 cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 /* System header to define __stub macros and hopefully few prototypes,
10385     which can conflict with char $ac_func(); below.  */
10386 #include <assert.h>
10387 /* Override any gcc2 internal prototype to avoid an error.  */
10388 /* We use char because int might match the return type of a gcc2
10389     builtin and then its argument prototype would still apply.  */
10390 char $ac_func();
10391
10392 int main() {
10393
10394 /* The GNU C library defines this for functions which it implements
10395     to always fail with ENOSYS.  Some functions are actually named
10396     something starting with __ and the normal name is an alias.  */
10397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10398 choke me
10399 #else
10400 $ac_func();
10401 #endif
10402
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_func_$ac_func=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_func_$ac_func=no"
10413 fi
10414 rm -f conftest*
10415
10416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10417   echo "$ac_t""yes" 1>&6
10418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10419   { test "$extra_verbose" = "yes" && cat << EOF
10420     Defining $ac_tr_func
10421 EOF
10422 cat >> confdefs.h <<EOF
10423 #define $ac_tr_func 1
10424 EOF
10425 }
10426  
10427 else
10428   echo "$ac_t""no" 1>&6
10429 fi
10430 done
10431
10432     test "$ac_cv_func_crypt" != "yes" && { 
10433 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10434 echo "configure:10435: checking for crypt in -lcrypt" >&5
10435 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10436
10437 xe_check_libs=" -lcrypt "
10438 cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441 /* Override any gcc2 internal prototype to avoid an error.  */
10442 /* We use char because int might match the return type of a gcc2
10443     builtin and then its argument prototype would still apply.  */
10444 char crypt();
10445
10446 int main() {
10447 crypt()
10448 ; return 0; }
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=yes"
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -rf conftest*
10457   eval "ac_cv_lib_$ac_lib_var=no"
10458 fi
10459 rm -f conftest*
10460 xe_check_libs=""
10461
10462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10463   echo "$ac_t""yes" 1>&6
10464     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10465     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10466   { test "$extra_verbose" = "yes" && cat << EOF
10467     Defining $ac_tr_lib
10468 EOF
10469 cat >> confdefs.h <<EOF
10470 #define $ac_tr_lib 1
10471 EOF
10472 }
10473
10474   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10475
10476 else
10477   echo "$ac_t""no" 1>&6
10478 fi
10479
10480  }
10481   fi
10482     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10483     
10484 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10485 echo "configure:10486: checking for jl_dic_list_e in -lwnn" >&5
10486 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10487
10488 xe_check_libs=" -lwnn "
10489 cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492 /* Override any gcc2 internal prototype to avoid an error.  */
10493 /* We use char because int might match the return type of a gcc2
10494     builtin and then its argument prototype would still apply.  */
10495 char jl_dic_list_e();
10496
10497 int main() {
10498 jl_dic_list_e()
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=yes"
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   eval "ac_cv_lib_$ac_lib_var=no"
10509 fi
10510 rm -f conftest*
10511 xe_check_libs=""
10512
10513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10514   echo "$ac_t""yes" 1>&6
10515   libwnn=wnn
10516 else
10517   echo "$ac_t""no" 1>&6
10518 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10519 echo "configure:10520: checking for jl_dic_list_e in -lwnn4" >&5
10520 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10521
10522 xe_check_libs=" -lwnn4 "
10523 cat > conftest.$ac_ext <<EOF
10524 #line 10525 "configure"
10525 #include "confdefs.h"
10526 /* Override any gcc2 internal prototype to avoid an error.  */
10527 /* We use char because int might match the return type of a gcc2
10528     builtin and then its argument prototype would still apply.  */
10529 char jl_dic_list_e();
10530
10531 int main() {
10532 jl_dic_list_e()
10533 ; return 0; }
10534 EOF
10535 if { (eval echo configure:10536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10536   rm -rf conftest*
10537   eval "ac_cv_lib_$ac_lib_var=yes"
10538 else
10539   echo "configure: failed program was:" >&5
10540   cat conftest.$ac_ext >&5
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=no"
10543 fi
10544 rm -f conftest*
10545 xe_check_libs=""
10546
10547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10548   echo "$ac_t""yes" 1>&6
10549   libwnn=wnn4
10550 else
10551   echo "$ac_t""no" 1>&6
10552 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10553 echo "configure:10554: checking for jl_dic_list_e in -lwnn6" >&5
10554 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10555
10556 xe_check_libs=" -lwnn6 "
10557 cat > conftest.$ac_ext <<EOF
10558 #line 10559 "configure"
10559 #include "confdefs.h"
10560 /* Override any gcc2 internal prototype to avoid an error.  */
10561 /* We use char because int might match the return type of a gcc2
10562     builtin and then its argument prototype would still apply.  */
10563 char jl_dic_list_e();
10564
10565 int main() {
10566 jl_dic_list_e()
10567 ; return 0; }
10568 EOF
10569 if { (eval echo configure:10570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10570   rm -rf conftest*
10571   eval "ac_cv_lib_$ac_lib_var=yes"
10572 else
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=no"
10577 fi
10578 rm -f conftest*
10579 xe_check_libs=""
10580
10581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10582   echo "$ac_t""yes" 1>&6
10583   libwnn=wnn6
10584 else
10585   echo "$ac_t""no" 1>&6
10586 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10587 echo "configure:10588: checking for dic_list_e in -lwnn6_fromsrc" >&5
10588 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10589
10590 xe_check_libs=" -lwnn6_fromsrc "
10591 cat > conftest.$ac_ext <<EOF
10592 #line 10593 "configure"
10593 #include "confdefs.h"
10594 /* Override any gcc2 internal prototype to avoid an error.  */
10595 /* We use char because int might match the return type of a gcc2
10596     builtin and then its argument prototype would still apply.  */
10597 char dic_list_e();
10598
10599 int main() {
10600 dic_list_e()
10601 ; return 0; }
10602 EOF
10603 if { (eval echo configure:10604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=yes"
10606 else
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -rf conftest*
10610   eval "ac_cv_lib_$ac_lib_var=no"
10611 fi
10612 rm -f conftest*
10613 xe_check_libs=""
10614
10615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10616   echo "$ac_t""yes" 1>&6
10617   libwnn=wnn6_fromsrc
10618 else
10619   echo "$ac_t""no" 1>&6
10620 with_wnn=no
10621 fi
10622
10623
10624 fi
10625
10626
10627 fi
10628
10629
10630 fi
10631
10632
10633   fi
10634   test -z "$with_wnn" && with_wnn=yes
10635   if test "$with_wnn" = "yes"; then
10636     { test "$extra_verbose" = "yes" && cat << \EOF
10637     Defining HAVE_WNN
10638 EOF
10639 cat >> confdefs.h <<\EOF
10640 #define HAVE_WNN 1
10641 EOF
10642 }
10643
10644     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10645     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10646    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10647  fi
10648     if test "$with_wnn6" != "no"; then
10649       
10650 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10651 echo "configure:10652: checking for jl_fi_dic_list in -l$libwnn" >&5
10652 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10653
10654 xe_check_libs=" -l$libwnn "
10655 cat > conftest.$ac_ext <<EOF
10656 #line 10657 "configure"
10657 #include "confdefs.h"
10658 /* Override any gcc2 internal prototype to avoid an error.  */
10659 /* We use char because int might match the return type of a gcc2
10660     builtin and then its argument prototype would still apply.  */
10661 char jl_fi_dic_list();
10662
10663 int main() {
10664 jl_fi_dic_list()
10665 ; return 0; }
10666 EOF
10667 if { (eval echo configure:10668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10668   rm -rf conftest*
10669   eval "ac_cv_lib_$ac_lib_var=yes"
10670 else
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -rf conftest*
10674   eval "ac_cv_lib_$ac_lib_var=no"
10675 fi
10676 rm -f conftest*
10677 xe_check_libs=""
10678
10679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10680   echo "$ac_t""yes" 1>&6
10681   with_wnn6=yes
10682 else
10683   echo "$ac_t""no" 1>&6
10684 fi
10685
10686
10687       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10688     Defining WNN6
10689 EOF
10690 cat >> confdefs.h <<\EOF
10691 #define WNN6 1
10692 EOF
10693 }
10694
10695     fi
10696   fi
10697
10698     canna_includes_found=no
10699   if test "$with_canna" != "no"; then
10700     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10701 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10702 echo "configure:10703: checking for canna/jrkanji.h" >&5
10703
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 #include <canna/jrkanji.h>
10708 EOF
10709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10710 { (eval echo configure:10711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10712 if test -z "$ac_err"; then
10713   rm -rf conftest*
10714   eval "ac_cv_header_$ac_safe=yes"
10715 else
10716   echo "$ac_err" >&5
10717   echo "configure: failed program was:" >&5
10718   cat conftest.$ac_ext >&5
10719   rm -rf conftest*
10720   eval "ac_cv_header_$ac_safe=no"
10721 fi
10722 rm -f conftest*
10723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725   canna_includes_found=yes
10726 else
10727   echo "$ac_t""no" 1>&6
10728 fi
10729
10730   fi
10731   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10732       -d "/usr/local/canna/include"; then
10733     save_c_switch_site="$c_switch_site"
10734     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10735     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10736 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10737 echo "configure:10738: checking for canna/jrkanji.h" >&5
10738
10739 cat > conftest.$ac_ext <<EOF
10740 #line 10741 "configure"
10741 #include "confdefs.h"
10742 #include <canna/jrkanji.h>
10743 EOF
10744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10745 { (eval echo configure:10746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10747 if test -z "$ac_err"; then
10748   rm -rf conftest*
10749   eval "ac_cv_header_$ac_safe=yes"
10750 else
10751   echo "$ac_err" >&5
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -rf conftest*
10755   eval "ac_cv_header_$ac_safe=no"
10756 fi
10757 rm -f conftest*
10758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10759   echo "$ac_t""yes" 1>&6
10760   canna_includes_found=yes
10761 else
10762   echo "$ac_t""no" 1>&6
10763 fi
10764
10765     if test "$canna_includes_found" != "yes"; then
10766       c_switch_site="$save_c_switch_site"
10767       with_canna="no"
10768     fi
10769   fi
10770
10771   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10772 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10773 echo "configure:10774: checking for canna/RK.h" >&5
10774
10775 cat > conftest.$ac_ext <<EOF
10776 #line 10777 "configure"
10777 #include "confdefs.h"
10778 #include <canna/RK.h>
10779 EOF
10780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10781 { (eval echo configure:10782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10783 if test -z "$ac_err"; then
10784   rm -rf conftest*
10785   eval "ac_cv_header_$ac_safe=yes"
10786 else
10787   echo "$ac_err" >&5
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=no"
10792 fi
10793 rm -f conftest*
10794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10795   echo "$ac_t""yes" 1>&6
10796   :
10797 else
10798   echo "$ac_t""no" 1>&6
10799 with_canna=no
10800 fi
10801  }
10802   test -z "$with_canna" && { 
10803 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10804 echo "configure:10805: checking for RkBgnBun in -lRKC" >&5
10805 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10806
10807 xe_check_libs=" -lRKC "
10808 cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811 /* Override any gcc2 internal prototype to avoid an error.  */
10812 /* We use char because int might match the return type of a gcc2
10813     builtin and then its argument prototype would still apply.  */
10814 char RkBgnBun();
10815
10816 int main() {
10817 RkBgnBun()
10818 ; return 0; }
10819 EOF
10820 if { (eval echo configure:10821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10821   rm -rf conftest*
10822   eval "ac_cv_lib_$ac_lib_var=yes"
10823 else
10824   echo "configure: failed program was:" >&5
10825   cat conftest.$ac_ext >&5
10826   rm -rf conftest*
10827   eval "ac_cv_lib_$ac_lib_var=no"
10828 fi
10829 rm -f conftest*
10830 xe_check_libs=""
10831
10832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10833   echo "$ac_t""yes" 1>&6
10834   :
10835 else
10836   echo "$ac_t""no" 1>&6
10837 with_canna=no
10838 fi
10839
10840  }
10841   test -z "$with_canna" && { 
10842 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10843 echo "configure:10844: checking for jrKanjiControl in -lcanna" >&5
10844 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10845
10846 xe_check_libs=" -lcanna "
10847 cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850 /* Override any gcc2 internal prototype to avoid an error.  */
10851 /* We use char because int might match the return type of a gcc2
10852     builtin and then its argument prototype would still apply.  */
10853 char jrKanjiControl();
10854
10855 int main() {
10856 jrKanjiControl()
10857 ; return 0; }
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10860   rm -rf conftest*
10861   eval "ac_cv_lib_$ac_lib_var=yes"
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   eval "ac_cv_lib_$ac_lib_var=no"
10867 fi
10868 rm -f conftest*
10869 xe_check_libs=""
10870
10871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10872   echo "$ac_t""yes" 1>&6
10873   :
10874 else
10875   echo "$ac_t""no" 1>&6
10876 with_canna=no
10877 fi
10878
10879  }
10880   test -z "$with_canna" && with_canna=yes
10881   if test "$with_canna" = "yes"; then
10882     { test "$extra_verbose" = "yes" && cat << \EOF
10883     Defining HAVE_CANNA
10884 EOF
10885 cat >> confdefs.h <<\EOF
10886 #define HAVE_CANNA 1
10887 EOF
10888 }
10889
10890     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10891     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10892    echo "    xemacs will be linked with \"mule-canna.o\""
10893  fi
10894   fi
10895
10896 else   for feature in xim canna wnn; do
10897     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10898       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10899     fi
10900     eval "with_${feature}=no"
10901   done
10902 fi 
10903
10904 if test "$need_motif" = "yes" ; then
10905   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10906     
10907 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10908 echo "configure:10909: checking for layout_object_getvalue in -li18n" >&5
10909 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10910
10911 xe_check_libs=" -li18n "
10912 cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915 /* Override any gcc2 internal prototype to avoid an error.  */
10916 /* We use char because int might match the return type of a gcc2
10917     builtin and then its argument prototype would still apply.  */
10918 char layout_object_getvalue();
10919
10920 int main() {
10921 layout_object_getvalue()
10922 ; return 0; }
10923 EOF
10924 if { (eval echo configure:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10925   rm -rf conftest*
10926   eval "ac_cv_lib_$ac_lib_var=yes"
10927 else
10928   echo "configure: failed program was:" >&5
10929   cat conftest.$ac_ext >&5
10930   rm -rf conftest*
10931   eval "ac_cv_lib_$ac_lib_var=no"
10932 fi
10933 rm -f conftest*
10934 xe_check_libs=""
10935
10936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10937   echo "$ac_t""yes" 1>&6
10938   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10939 else
10940   echo "$ac_t""no" 1>&6
10941 fi
10942
10943
10944   
10945 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10946     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10947   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10948   
10949         runpath="" runpath_dirs=""
10950   if test -n "$LD_RUN_PATH"; then
10951     runpath="$LD_RUN_PATH"
10952   elif test "$GCC" = "yes"; then
10953         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10954     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10955     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10956     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10957       case "$arg" in P,* | -L* | -R* )
10958         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10959           {
10960 xe_runpath_dir="$dir"
10961   test "$xe_runpath_dir" != "/lib"     -a \
10962         "$xe_runpath_dir" != "/usr/lib" -a \
10963         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10964   eval "$xe_add_unique_runpath_dir"
10965 }
10966         done ;;
10967       esac
10968     done
10969     ld_switch_run="$ld_switch_run_save"
10970     rm -f conftest*
10971   else
10972         for arg in $ld_switch_site $ld_switch_x_site; do
10973       case "$arg" in -L*) {
10974 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10975   test "$xe_runpath_dir" != "/lib"     -a \
10976         "$xe_runpath_dir" != "/usr/lib" -a \
10977         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10978   eval "$xe_add_unique_runpath_dir"
10979 };; esac
10980     done
10981         if test "$opsys $need_motif" = "sol2 yes"; then
10982       xe_runpath_dir="/opt/SUNWdt/lib";
10983       eval "$xe_add_unique_runpath_dir";
10984     fi
10985   fi 
10986   if test -n "$runpath"; then
10987     ld_switch_run="${dash_r}${runpath}"
10988     
10989 if test "$GCC" = "yes"; then
10990   set x $ld_switch_run; shift; ld_switch_run=""
10991   while test -n "$1"; do
10992     case $1 in
10993       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10994       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10995       -Xlinker* ) ;;
10996       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10997     esac
10998     shift
10999   done
11000 fi
11001     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11002   fi
11003 fi
11004
11005 fi
11006
11007
11008 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
11009 do
11010 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11011 echo "configure:11012: checking for $ac_func" >&5
11012
11013 cat > conftest.$ac_ext <<EOF
11014 #line 11015 "configure"
11015 #include "confdefs.h"
11016 /* System header to define __stub macros and hopefully few prototypes,
11017     which can conflict with char $ac_func(); below.  */
11018 #include <assert.h>
11019 /* Override any gcc2 internal prototype to avoid an error.  */
11020 /* We use char because int might match the return type of a gcc2
11021     builtin and then its argument prototype would still apply.  */
11022 char $ac_func();
11023
11024 int main() {
11025
11026 /* The GNU C library defines this for functions which it implements
11027     to always fail with ENOSYS.  Some functions are actually named
11028     something starting with __ and the normal name is an alias.  */
11029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11030 choke me
11031 #else
11032 $ac_func();
11033 #endif
11034
11035 ; return 0; }
11036 EOF
11037 if { (eval echo configure:11038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11038   rm -rf conftest*
11039   eval "ac_cv_func_$ac_func=yes"
11040 else
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -rf conftest*
11044   eval "ac_cv_func_$ac_func=no"
11045 fi
11046 rm -f conftest*
11047
11048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11051   { test "$extra_verbose" = "yes" && cat << EOF
11052     Defining $ac_tr_func
11053 EOF
11054 cat >> confdefs.h <<EOF
11055 #define $ac_tr_func 1
11056 EOF
11057 }
11058  
11059 else
11060   echo "$ac_t""no" 1>&6
11061 fi
11062 done
11063
11064
11065 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11066   case "$opsys" in
11067     hpux11* )
11068       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11069       ac_cv_func_getaddrinfo=no
11070       ;;
11071   esac
11072 fi
11073
11074
11075 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11076 do
11077 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11078 echo "configure:11079: checking for $ac_func" >&5
11079
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 /* System header to define __stub macros and hopefully few prototypes,
11084     which can conflict with char $ac_func(); below.  */
11085 #include <assert.h>
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char $ac_func();
11090
11091 int main() {
11092
11093 /* The GNU C library defines this for functions which it implements
11094     to always fail with ENOSYS.  Some functions are actually named
11095     something starting with __ and the normal name is an alias.  */
11096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11097 choke me
11098 #else
11099 $ac_func();
11100 #endif
11101
11102 ; return 0; }
11103 EOF
11104 if { (eval echo configure:11105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11105   rm -rf conftest*
11106   eval "ac_cv_func_$ac_func=yes"
11107 else
11108   echo "configure: failed program was:" >&5
11109   cat conftest.$ac_ext >&5
11110   rm -rf conftest*
11111   eval "ac_cv_func_$ac_func=no"
11112 fi
11113 rm -f conftest*
11114
11115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11116   echo "$ac_t""yes" 1>&6
11117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11118   { test "$extra_verbose" = "yes" && cat << EOF
11119     Defining $ac_tr_func
11120 EOF
11121 cat >> confdefs.h <<EOF
11122 #define $ac_tr_func 1
11123 EOF
11124 }
11125  
11126 else
11127   echo "$ac_t""no" 1>&6
11128 fi
11129 done
11130
11131
11132 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11133 echo "configure:11134: checking for openpty" >&5
11134
11135 cat > conftest.$ac_ext <<EOF
11136 #line 11137 "configure"
11137 #include "confdefs.h"
11138 /* System header to define __stub macros and hopefully few prototypes,
11139     which can conflict with char openpty(); below.  */
11140 #include <assert.h>
11141 /* Override any gcc2 internal prototype to avoid an error.  */
11142 /* We use char because int might match the return type of a gcc2
11143     builtin and then its argument prototype would still apply.  */
11144 char openpty();
11145
11146 int main() {
11147
11148 /* The GNU C library defines this for functions which it implements
11149     to always fail with ENOSYS.  Some functions are actually named
11150     something starting with __ and the normal name is an alias.  */
11151 #if defined (__stub_openpty) || defined (__stub___openpty)
11152 choke me
11153 #else
11154 openpty();
11155 #endif
11156
11157 ; return 0; }
11158 EOF
11159 if { (eval echo configure:11160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11160   rm -rf conftest*
11161   eval "ac_cv_func_openpty=yes"
11162 else
11163   echo "configure: failed program was:" >&5
11164   cat conftest.$ac_ext >&5
11165   rm -rf conftest*
11166   eval "ac_cv_func_openpty=no"
11167 fi
11168 rm -f conftest*
11169
11170 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11171   echo "$ac_t""yes" 1>&6
11172   have_openpty=yes
11173 else
11174   echo "$ac_t""no" 1>&6
11175
11176   
11177 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11178 echo "configure:11179: checking for openpty in -lutil" >&5
11179 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11180
11181 xe_check_libs=" -lutil "
11182 cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185 /* Override any gcc2 internal prototype to avoid an error.  */
11186 /* We use char because int might match the return type of a gcc2
11187     builtin and then its argument prototype would still apply.  */
11188 char openpty();
11189
11190 int main() {
11191 openpty()
11192 ; return 0; }
11193 EOF
11194 if { (eval echo configure:11195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11195   rm -rf conftest*
11196   eval "ac_cv_lib_$ac_lib_var=yes"
11197 else
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -rf conftest*
11201   eval "ac_cv_lib_$ac_lib_var=no"
11202 fi
11203 rm -f conftest*
11204 xe_check_libs=""
11205
11206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11207   echo "$ac_t""yes" 1>&6
11208   have_openpty=yes need_libutil=yes
11209 else
11210   echo "$ac_t""no" 1>&6
11211 fi
11212
11213
11214 fi
11215
11216 if test "$have_openpty" = "yes"; then
11217   { test "$extra_verbose" = "yes" && cat << \EOF
11218     Defining HAVE_OPENPTY
11219 EOF
11220 cat >> confdefs.h <<\EOF
11221 #define HAVE_OPENPTY 1
11222 EOF
11223 }
11224
11225   for ac_hdr in pty.h libutil.h util.h
11226 do
11227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_hdr" >&5
11230
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 #include <$ac_hdr>
11235 EOF
11236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11237 { (eval echo configure:11238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11239 if test -z "$ac_err"; then
11240   rm -rf conftest*
11241   eval "ac_cv_header_$ac_safe=yes"
11242 else
11243   echo "$ac_err" >&5
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_header_$ac_safe=no"
11248 fi
11249 rm -f conftest*
11250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11251   echo "$ac_t""yes" 1>&6
11252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11253   { test "$extra_verbose" = "yes" && cat << EOF
11254     Defining $ac_tr_hdr
11255 EOF
11256 cat >> confdefs.h <<EOF
11257 #define $ac_tr_hdr 1
11258 EOF
11259 }
11260  break
11261 else
11262   echo "$ac_t""no" 1>&6
11263 fi
11264 done
11265
11266   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11267 fi
11268
11269 for ac_hdr in stropts.h
11270 do
11271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11273 echo "configure:11274: checking for $ac_hdr" >&5
11274
11275 cat > conftest.$ac_ext <<EOF
11276 #line 11277 "configure"
11277 #include "confdefs.h"
11278 #include <$ac_hdr>
11279 EOF
11280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11281 { (eval echo configure:11282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11283 if test -z "$ac_err"; then
11284   rm -rf conftest*
11285   eval "ac_cv_header_$ac_safe=yes"
11286 else
11287   echo "$ac_err" >&5
11288   echo "configure: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   rm -rf conftest*
11291   eval "ac_cv_header_$ac_safe=no"
11292 fi
11293 rm -f conftest*
11294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11295   echo "$ac_t""yes" 1>&6
11296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11297   { test "$extra_verbose" = "yes" && cat << EOF
11298     Defining $ac_tr_hdr
11299 EOF
11300 cat >> confdefs.h <<EOF
11301 #define $ac_tr_hdr 1
11302 EOF
11303 }
11304  
11305 else
11306   echo "$ac_t""no" 1>&6
11307 fi
11308 done
11309
11310 if test "$ac_cv_header_stropts_h" = "yes"; then
11311   for ac_func in isastream
11312 do
11313 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11314 echo "configure:11315: checking for $ac_func" >&5
11315
11316 cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 /* System header to define __stub macros and hopefully few prototypes,
11320     which can conflict with char $ac_func(); below.  */
11321 #include <assert.h>
11322 /* Override any gcc2 internal prototype to avoid an error.  */
11323 /* We use char because int might match the return type of a gcc2
11324     builtin and then its argument prototype would still apply.  */
11325 char $ac_func();
11326
11327 int main() {
11328
11329 /* The GNU C library defines this for functions which it implements
11330     to always fail with ENOSYS.  Some functions are actually named
11331     something starting with __ and the normal name is an alias.  */
11332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11333 choke me
11334 #else
11335 $ac_func();
11336 #endif
11337
11338 ; return 0; }
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11341   rm -rf conftest*
11342   eval "ac_cv_func_$ac_func=yes"
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   eval "ac_cv_func_$ac_func=no"
11348 fi
11349 rm -f conftest*
11350
11351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11352   echo "$ac_t""yes" 1>&6
11353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11354   { test "$extra_verbose" = "yes" && cat << EOF
11355     Defining $ac_tr_func
11356 EOF
11357 cat >> confdefs.h <<EOF
11358 #define $ac_tr_func 1
11359 EOF
11360 }
11361  
11362 else
11363   echo "$ac_t""no" 1>&6
11364 fi
11365 done
11366
11367   for ac_hdr in strtio.h
11368 do
11369 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11370 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11371 echo "configure:11372: checking for $ac_hdr" >&5
11372
11373 cat > conftest.$ac_ext <<EOF
11374 #line 11375 "configure"
11375 #include "confdefs.h"
11376 #include <$ac_hdr>
11377 EOF
11378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11379 { (eval echo configure:11380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11381 if test -z "$ac_err"; then
11382   rm -rf conftest*
11383   eval "ac_cv_header_$ac_safe=yes"
11384 else
11385   echo "$ac_err" >&5
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -rf conftest*
11389   eval "ac_cv_header_$ac_safe=no"
11390 fi
11391 rm -f conftest*
11392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11393   echo "$ac_t""yes" 1>&6
11394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11395   { test "$extra_verbose" = "yes" && cat << EOF
11396     Defining $ac_tr_hdr
11397 EOF
11398 cat >> confdefs.h <<EOF
11399 #define $ac_tr_hdr 1
11400 EOF
11401 }
11402  
11403 else
11404   echo "$ac_t""no" 1>&6
11405 fi
11406 done
11407  fi
11408
11409 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11410    echo "    xemacs will be linked with \"realpath.o\""
11411  fi
11412
11413 for ac_func in getloadavg
11414 do
11415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11416 echo "configure:11417: checking for $ac_func" >&5
11417
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* System header to define __stub macros and hopefully few prototypes,
11422     which can conflict with char $ac_func(); below.  */
11423 #include <assert.h>
11424 /* Override any gcc2 internal prototype to avoid an error.  */
11425 /* We use char because int might match the return type of a gcc2
11426     builtin and then its argument prototype would still apply.  */
11427 char $ac_func();
11428
11429 int main() {
11430
11431 /* The GNU C library defines this for functions which it implements
11432     to always fail with ENOSYS.  Some functions are actually named
11433     something starting with __ and the normal name is an alias.  */
11434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11435 choke me
11436 #else
11437 $ac_func();
11438 #endif
11439
11440 ; return 0; }
11441 EOF
11442 if { (eval echo configure:11443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11443   rm -rf conftest*
11444   eval "ac_cv_func_$ac_func=yes"
11445 else
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   eval "ac_cv_func_$ac_func=no"
11450 fi
11451 rm -f conftest*
11452
11453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11454   echo "$ac_t""yes" 1>&6
11455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11456   { test "$extra_verbose" = "yes" && cat << EOF
11457     Defining $ac_tr_func
11458 EOF
11459 cat >> confdefs.h <<EOF
11460 #define $ac_tr_func 1
11461 EOF
11462 }
11463  
11464 else
11465   echo "$ac_t""no" 1>&6
11466 fi
11467 done
11468
11469
11470 if test "$ac_cv_func_getloadavg" = "yes"; then
11471         for ac_hdr in sys/loadavg.h
11472 do
11473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11475 echo "configure:11476: checking for $ac_hdr" >&5
11476
11477 cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 #include <$ac_hdr>
11481 EOF
11482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11483 { (eval echo configure:11484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11485 if test -z "$ac_err"; then
11486   rm -rf conftest*
11487   eval "ac_cv_header_$ac_safe=yes"
11488 else
11489   echo "$ac_err" >&5
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -rf conftest*
11493   eval "ac_cv_header_$ac_safe=no"
11494 fi
11495 rm -f conftest*
11496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11497   echo "$ac_t""yes" 1>&6
11498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11499   { test "$extra_verbose" = "yes" && cat << EOF
11500     Defining $ac_tr_hdr
11501 EOF
11502 cat >> confdefs.h <<EOF
11503 #define $ac_tr_hdr 1
11504 EOF
11505 }
11506  
11507 else
11508   echo "$ac_t""no" 1>&6
11509 fi
11510 done
11511
11512 else
11513     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11514    echo "    xemacs will be linked with \"getloadavg.o\""
11515  fi
11516
11517     
11518 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11519 echo "configure:11520: checking for kstat_open in -lkstat" >&5
11520 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11521
11522 xe_check_libs=" -lkstat "
11523 cat > conftest.$ac_ext <<EOF
11524 #line 11525 "configure"
11525 #include "confdefs.h"
11526 /* Override any gcc2 internal prototype to avoid an error.  */
11527 /* We use char because int might match the return type of a gcc2
11528     builtin and then its argument prototype would still apply.  */
11529 char kstat_open();
11530
11531 int main() {
11532 kstat_open()
11533 ; return 0; }
11534 EOF
11535 if { (eval echo configure:11536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11536   rm -rf conftest*
11537   eval "ac_cv_lib_$ac_lib_var=yes"
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   eval "ac_cv_lib_$ac_lib_var=no"
11543 fi
11544 rm -f conftest*
11545 xe_check_libs=""
11546
11547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11548   echo "$ac_t""yes" 1>&6
11549     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11550     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11551   { test "$extra_verbose" = "yes" && cat << EOF
11552     Defining $ac_tr_lib
11553 EOF
11554 cat >> confdefs.h <<EOF
11555 #define $ac_tr_lib 1
11556 EOF
11557 }
11558
11559   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11560
11561 else
11562   echo "$ac_t""no" 1>&6
11563 fi
11564
11565
11566   for ac_hdr in kstat.h
11567 do
11568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11570 echo "configure:11571: checking for $ac_hdr" >&5
11571
11572 cat > conftest.$ac_ext <<EOF
11573 #line 11574 "configure"
11574 #include "confdefs.h"
11575 #include <$ac_hdr>
11576 EOF
11577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11578 { (eval echo configure:11579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11580 if test -z "$ac_err"; then
11581   rm -rf conftest*
11582   eval "ac_cv_header_$ac_safe=yes"
11583 else
11584   echo "$ac_err" >&5
11585   echo "configure: failed program was:" >&5
11586   cat conftest.$ac_ext >&5
11587   rm -rf conftest*
11588   eval "ac_cv_header_$ac_safe=no"
11589 fi
11590 rm -f conftest*
11591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11592   echo "$ac_t""yes" 1>&6
11593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11594   { test "$extra_verbose" = "yes" && cat << EOF
11595     Defining $ac_tr_hdr
11596 EOF
11597 cat >> confdefs.h <<EOF
11598 #define $ac_tr_hdr 1
11599 EOF
11600 }
11601  
11602 else
11603   echo "$ac_t""no" 1>&6
11604 fi
11605 done
11606
11607
11608     
11609 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11610 echo "configure:11611: checking for kvm_read in -lkvm" >&5
11611 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11612
11613 xe_check_libs=" -lkvm "
11614 cat > conftest.$ac_ext <<EOF
11615 #line 11616 "configure"
11616 #include "confdefs.h"
11617 /* Override any gcc2 internal prototype to avoid an error.  */
11618 /* We use char because int might match the return type of a gcc2
11619     builtin and then its argument prototype would still apply.  */
11620 char kvm_read();
11621
11622 int main() {
11623 kvm_read()
11624 ; return 0; }
11625 EOF
11626 if { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11627   rm -rf conftest*
11628   eval "ac_cv_lib_$ac_lib_var=yes"
11629 else
11630   echo "configure: failed program was:" >&5
11631   cat conftest.$ac_ext >&5
11632   rm -rf conftest*
11633   eval "ac_cv_lib_$ac_lib_var=no"
11634 fi
11635 rm -f conftest*
11636 xe_check_libs=""
11637
11638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11639   echo "$ac_t""yes" 1>&6
11640     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11641     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11642   { test "$extra_verbose" = "yes" && cat << EOF
11643     Defining $ac_tr_lib
11644 EOF
11645 cat >> confdefs.h <<EOF
11646 #define $ac_tr_lib 1
11647 EOF
11648 }
11649
11650   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11651
11652 else
11653   echo "$ac_t""no" 1>&6
11654 fi
11655
11656
11657 fi
11658
11659 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11660 echo "configure:11661: checking whether netdb declares h_errno" >&5
11661 cat > conftest.$ac_ext <<EOF
11662 #line 11663 "configure"
11663 #include "confdefs.h"
11664 #include <netdb.h>
11665 int main() {
11666 return h_errno;
11667 ; return 0; }
11668 EOF
11669 if { (eval echo configure:11670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11670   rm -rf conftest*
11671   echo "$ac_t""yes" 1>&6
11672    { test "$extra_verbose" = "yes" && cat << \EOF
11673     Defining HAVE_H_ERRNO
11674 EOF
11675 cat >> confdefs.h <<\EOF
11676 #define HAVE_H_ERRNO 1
11677 EOF
11678 }
11679
11680 else
11681   echo "configure: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   rm -rf conftest*
11684   echo "$ac_t""no" 1>&6
11685 fi
11686 rm -f conftest*
11687
11688 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11689 echo "configure:11690: checking for sigsetjmp" >&5
11690 cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693 #include <setjmp.h>
11694 int main() {
11695 sigjmp_buf bar; sigsetjmp (bar, 0);
11696 ; return 0; }
11697 EOF
11698 if { (eval echo configure:11699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11699   rm -rf conftest*
11700   echo "$ac_t""yes" 1>&6
11701    { test "$extra_verbose" = "yes" && cat << \EOF
11702     Defining HAVE_SIGSETJMP
11703 EOF
11704 cat >> confdefs.h <<\EOF
11705 #define HAVE_SIGSETJMP 1
11706 EOF
11707 }
11708
11709 else
11710   echo "configure: failed program was:" >&5
11711   cat conftest.$ac_ext >&5
11712   rm -rf conftest*
11713   echo "$ac_t""no" 1>&6
11714 fi
11715 rm -f conftest*
11716
11717 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11718 echo "configure:11719: checking whether localtime caches TZ" >&5
11719
11720 if test "$ac_cv_func_tzset" = "yes"; then
11721 cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 #include <time.h>
11725 #if STDC_HEADERS
11726 # include <stdlib.h>
11727 #endif
11728 extern char **environ;
11729 unset_TZ ()
11730 {
11731   char **from, **to;
11732   for (to = from = environ; (*to = *from); from++)
11733     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11734       to++;
11735 }
11736 char TZ_GMT0[] = "TZ=GMT0";
11737 char TZ_PST8[] = "TZ=PST8";
11738 main()
11739 {
11740   time_t now = time ((time_t *) 0);
11741   int hour_GMT0, hour_unset;
11742   if (putenv (TZ_GMT0) != 0)
11743     exit (1);
11744   hour_GMT0 = localtime (&now)->tm_hour;
11745   unset_TZ ();
11746   hour_unset = localtime (&now)->tm_hour;
11747   if (putenv (TZ_PST8) != 0)
11748     exit (1);
11749   if (localtime (&now)->tm_hour == hour_GMT0)
11750     exit (1);
11751   unset_TZ ();
11752   if (localtime (&now)->tm_hour != hour_unset)
11753     exit (1);
11754   exit (0);
11755 }
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11758 then
11759   emacs_cv_localtime_cache=no
11760 else
11761   conftest_rc="$?"
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -fr conftest*
11765   emacs_cv_localtime_cache=yes
11766 fi
11767 rm -fr conftest*
11768 else
11769         # If we lack tzset, report that localtime does not cache TZ,
11770         # since we can't invalidate the cache if we don't have tzset.
11771         emacs_cv_localtime_cache=no
11772 fi
11773 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11774 if test $emacs_cv_localtime_cache = yes; then
11775   { test "$extra_verbose" = "yes" && cat << \EOF
11776     Defining LOCALTIME_CACHE
11777 EOF
11778 cat >> confdefs.h <<\EOF
11779 #define LOCALTIME_CACHE 1
11780 EOF
11781 }
11782
11783 fi
11784
11785 if test "$HAVE_TIMEVAL" = "yes"; then
11786 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11787 echo "configure:11788: checking whether gettimeofday accepts one or two arguments" >&5
11788 cat > conftest.$ac_ext <<EOF
11789 #line 11790 "configure"
11790 #include "confdefs.h"
11791
11792 #ifdef TIME_WITH_SYS_TIME
11793 #include <sys/time.h>
11794 #include <time.h>
11795 #else
11796 #ifdef HAVE_SYS_TIME_H
11797 #include <sys/time.h>
11798 #else
11799 #include <time.h>
11800 #endif
11801 #endif
11802   
11803 int main() {
11804
11805   struct timeval time;
11806   gettimeofday (&time, 0);
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   echo "$ac_t""two" 1>&6
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   echo "$ac_t""one" 1>&6
11818    { test "$extra_verbose" = "yes" && cat << \EOF
11819     Defining GETTIMEOFDAY_ONE_ARGUMENT
11820 EOF
11821 cat >> confdefs.h <<\EOF
11822 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11823 EOF
11824 }
11825
11826 fi
11827 rm -f conftest*
11828 fi
11829
11830
11831 echo $ac_n "checking for inline""... $ac_c" 1>&6
11832 echo "configure:11833: checking for inline" >&5
11833
11834 ac_cv_c_inline=no
11835 for ac_kw in inline __inline__ __inline; do
11836   cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839
11840 int main() {
11841 } $ac_kw foo() {
11842 ; return 0; }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11845   rm -rf conftest*
11846   ac_cv_c_inline=$ac_kw; break
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850 fi
11851 rm -f conftest*
11852 done
11853
11854
11855 echo "$ac_t""$ac_cv_c_inline" 1>&6
11856 case "$ac_cv_c_inline" in
11857   inline | yes) ;;
11858   no) { test "$extra_verbose" = "yes" && cat << \EOF
11859     Defining inline = 
11860 EOF
11861 cat >> confdefs.h <<\EOF
11862 #define inline 
11863 EOF
11864 }
11865  ;;
11866   *)  { test "$extra_verbose" = "yes" && cat << EOF
11867     Defining inline = $ac_cv_c_inline
11868 EOF
11869 cat >> confdefs.h <<EOF
11870 #define inline $ac_cv_c_inline
11871 EOF
11872 }
11873  ;;
11874 esac
11875
11876 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11877    echo "    xemacs will be linked with \"inline.o\""
11878  fi
11879
11880
11881 if test "$__DECC" != "yes"; then
11882   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11883 # for constant arguments.  Useless!
11884 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11885 echo "configure:11886: checking for working alloca.h" >&5
11886
11887 cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890 #include <alloca.h>
11891 int main() {
11892 char *p = alloca(2 * sizeof(int));
11893 ; return 0; }
11894 EOF
11895 if { (eval echo configure:11896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896   rm -rf conftest*
11897   ac_cv_header_alloca_h=yes
11898 else
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   ac_cv_header_alloca_h=no
11903 fi
11904 rm -f conftest*
11905
11906 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11907 if test $ac_cv_header_alloca_h = yes; then
11908   { test "$extra_verbose" = "yes" && cat << \EOF
11909     Defining HAVE_ALLOCA_H
11910 EOF
11911 cat >> confdefs.h <<\EOF
11912 #define HAVE_ALLOCA_H 1
11913 EOF
11914 }
11915
11916 fi
11917
11918 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11919 echo "configure:11920: checking for alloca" >&5
11920
11921 cat > conftest.$ac_ext <<EOF
11922 #line 11923 "configure"
11923 #include "confdefs.h"
11924
11925 #ifdef __GNUC__
11926 # define alloca __builtin_alloca
11927 #else
11928 # ifdef _MSC_VER
11929 #  include <malloc.h>
11930 #  define alloca _alloca
11931 # else
11932 #  if HAVE_ALLOCA_H
11933 #   include <alloca.h>
11934 #  else
11935 #   ifdef _AIX
11936  #pragma alloca
11937 #   else
11938 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11939 char *alloca ();
11940 #    endif
11941 #   endif
11942 #  endif
11943 # endif
11944 #endif
11945
11946 int main() {
11947 char *p = (char *) alloca(1);
11948 ; return 0; }
11949 EOF
11950 if { (eval echo configure:11951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11951   rm -rf conftest*
11952   ac_cv_func_alloca_works=yes
11953 else
11954   echo "configure: failed program was:" >&5
11955   cat conftest.$ac_ext >&5
11956   rm -rf conftest*
11957   ac_cv_func_alloca_works=no
11958 fi
11959 rm -f conftest*
11960
11961 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11962 if test $ac_cv_func_alloca_works = yes; then
11963   { test "$extra_verbose" = "yes" && cat << \EOF
11964     Defining HAVE_ALLOCA
11965 EOF
11966 cat >> confdefs.h <<\EOF
11967 #define HAVE_ALLOCA 1
11968 EOF
11969 }
11970
11971 fi
11972
11973 if test $ac_cv_func_alloca_works = no; then
11974   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11975   # that cause trouble.  Some versions do not even contain alloca or
11976   # contain a buggy version.  If you still want to use their alloca,
11977   # use ar to extract alloca.o from them instead of compiling alloca.c.
11978   ALLOCA=alloca.${ac_objext}
11979   { test "$extra_verbose" = "yes" && cat << \EOF
11980     Defining C_ALLOCA
11981 EOF
11982 cat >> confdefs.h <<\EOF
11983 #define C_ALLOCA 1
11984 EOF
11985 }
11986
11987
11988 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11989 echo "configure:11990: checking whether alloca needs Cray hooks" >&5
11990
11991 cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994 #if defined(CRAY) && ! defined(CRAY2)
11995 webecray
11996 #else
11997 wenotbecray
11998 #endif
11999
12000 EOF
12001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12002   egrep "webecray" >/dev/null 2>&1; then
12003   rm -rf conftest*
12004   ac_cv_os_cray=yes
12005 else
12006   rm -rf conftest*
12007   ac_cv_os_cray=no
12008 fi
12009 rm -f conftest*
12010
12011
12012 echo "$ac_t""$ac_cv_os_cray" 1>&6
12013 if test $ac_cv_os_cray = yes; then
12014 for ac_func in _getb67 GETB67 getb67; do
12015   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12016 echo "configure:12017: checking for $ac_func" >&5
12017
12018 cat > conftest.$ac_ext <<EOF
12019 #line 12020 "configure"
12020 #include "confdefs.h"
12021 /* System header to define __stub macros and hopefully few prototypes,
12022     which can conflict with char $ac_func(); below.  */
12023 #include <assert.h>
12024 /* Override any gcc2 internal prototype to avoid an error.  */
12025 /* We use char because int might match the return type of a gcc2
12026     builtin and then its argument prototype would still apply.  */
12027 char $ac_func();
12028
12029 int main() {
12030
12031 /* The GNU C library defines this for functions which it implements
12032     to always fail with ENOSYS.  Some functions are actually named
12033     something starting with __ and the normal name is an alias.  */
12034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12035 choke me
12036 #else
12037 $ac_func();
12038 #endif
12039
12040 ; return 0; }
12041 EOF
12042 if { (eval echo configure:12043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12043   rm -rf conftest*
12044   eval "ac_cv_func_$ac_func=yes"
12045 else
12046   echo "configure: failed program was:" >&5
12047   cat conftest.$ac_ext >&5
12048   rm -rf conftest*
12049   eval "ac_cv_func_$ac_func=no"
12050 fi
12051 rm -f conftest*
12052
12053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12054   echo "$ac_t""yes" 1>&6
12055   { test "$extra_verbose" = "yes" && cat << EOF
12056     Defining CRAY_STACKSEG_END = $ac_func
12057 EOF
12058 cat >> confdefs.h <<EOF
12059 #define CRAY_STACKSEG_END $ac_func
12060 EOF
12061 }
12062
12063   break
12064 else
12065   echo "$ac_t""no" 1>&6
12066 fi
12067
12068 done
12069 fi
12070
12071 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12072 echo "configure:12073: checking stack direction for C alloca" >&5
12073
12074 cat > conftest.$ac_ext <<EOF
12075 #line 12076 "configure"
12076 #include "confdefs.h"
12077 find_stack_direction ()
12078 {
12079   static char *addr = 0;
12080   auto char dummy;
12081   if (addr == 0)
12082     {
12083       addr = &dummy;
12084       return find_stack_direction ();
12085     }
12086   else
12087     return (&dummy > addr) ? 1 : -1;
12088 }
12089 main ()
12090 {
12091   exit (find_stack_direction() < 0);
12092 }
12093 EOF
12094 if { (eval echo configure:12095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12095 then
12096   ac_cv_c_stack_direction=1
12097 else
12098   conftest_rc="$?"
12099   echo "configure: failed program was:" >&5
12100   cat conftest.$ac_ext >&5
12101   rm -fr conftest*
12102   ac_cv_c_stack_direction=-1
12103 fi
12104 rm -fr conftest*
12105
12106 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12107 { test "$extra_verbose" = "yes" && cat << EOF
12108     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12109 EOF
12110 cat >> confdefs.h <<EOF
12111 #define STACK_DIRECTION $ac_cv_c_stack_direction
12112 EOF
12113 }
12114
12115 fi
12116
12117   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12118    echo "    xemacs will be linked with \"$ALLOCA\""
12119  fi
12120 fi
12121
12122 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12123 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12124 echo "configure:12125: checking for vfork.h" >&5
12125
12126 cat > conftest.$ac_ext <<EOF
12127 #line 12128 "configure"
12128 #include "confdefs.h"
12129 #include <vfork.h>
12130 EOF
12131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12132 { (eval echo configure:12133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12134 if test -z "$ac_err"; then
12135   rm -rf conftest*
12136   eval "ac_cv_header_$ac_safe=yes"
12137 else
12138   echo "$ac_err" >&5
12139   echo "configure: failed program was:" >&5
12140   cat conftest.$ac_ext >&5
12141   rm -rf conftest*
12142   eval "ac_cv_header_$ac_safe=no"
12143 fi
12144 rm -f conftest*
12145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12146   echo "$ac_t""yes" 1>&6
12147   { test "$extra_verbose" = "yes" && cat << \EOF
12148     Defining HAVE_VFORK_H
12149 EOF
12150 cat >> confdefs.h <<\EOF
12151 #define HAVE_VFORK_H 1
12152 EOF
12153 }
12154
12155 else
12156   echo "$ac_t""no" 1>&6
12157 fi
12158
12159 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12160 echo "configure:12161: checking for working vfork" >&5
12161
12162 cat > conftest.$ac_ext <<EOF
12163 #line 12164 "configure"
12164 #include "confdefs.h"
12165 /* Thanks to Paul Eggert for this test.  */
12166 #include <stdio.h>
12167 #include <sys/types.h>
12168 #include <sys/stat.h>
12169 #ifdef HAVE_UNISTD_H
12170 #include <unistd.h>
12171 #endif
12172 #ifdef HAVE_VFORK_H
12173 #include <vfork.h>
12174 #endif
12175 /* On some sparc systems, changes by the child to local and incoming
12176    argument registers are propagated back to the parent.
12177    The compiler is told about this with #include <vfork.h>,
12178    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12179    Test for this by using a static variable whose address
12180    is put into a register that is clobbered by the vfork.  */
12181 static
12182 #ifdef __cplusplus
12183 sparc_address_test (int arg)
12184 #else
12185 sparc_address_test (arg) int arg;
12186 #endif
12187 {
12188   static pid_t child;
12189   if (!child) {
12190     child = vfork ();
12191     if (child < 0) {
12192       perror ("vfork");
12193       _exit(2);
12194     }
12195     if (!child) {
12196       arg = getpid();
12197       write(-1, "", 0);
12198       _exit (arg);
12199     }
12200   }
12201 }
12202 main() {
12203   pid_t parent = getpid ();
12204   pid_t child;
12205
12206   sparc_address_test ();
12207
12208   child = vfork ();
12209
12210   if (child == 0) {
12211     /* Here is another test for sparc vfork register problems.
12212        This test uses lots of local variables, at least
12213        as many local variables as main has allocated so far
12214        including compiler temporaries.  4 locals are enough for
12215        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12216        A buggy compiler should reuse the register of parent
12217        for one of the local variables, since it will think that
12218        parent can't possibly be used any more in this routine.
12219        Assigning to the local variable will thus munge parent
12220        in the parent process.  */
12221     pid_t
12222       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12223       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12224     /* Convince the compiler that p..p7 are live; otherwise, it might
12225        use the same hardware register for all 8 local variables.  */
12226     if (p != p1 || p != p2 || p != p3 || p != p4
12227         || p != p5 || p != p6 || p != p7)
12228       _exit(1);
12229
12230     /* On some systems (e.g. IRIX 3.3),
12231        vfork doesn't separate parent from child file descriptors.
12232        If the child closes a descriptor before it execs or exits,
12233        this munges the parent's descriptor as well.
12234        Test for this by closing stdout in the child.  */
12235     _exit(close(fileno(stdout)) != 0);
12236   } else {
12237     int status;
12238     struct stat st;
12239
12240     while (wait(&status) != child)
12241       ;
12242     exit(
12243          /* Was there some problem with vforking?  */
12244          child < 0
12245
12246          /* Did the child fail?  (This shouldn't happen.)  */
12247          || status
12248
12249          /* Did the vfork/compiler bug occur?  */
12250          || parent != getpid()
12251
12252          /* Did the file descriptor bug occur?  */
12253          || fstat(fileno(stdout), &st) != 0
12254          );
12255   }
12256 }
12257 EOF
12258 if { (eval echo configure:12259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12259 then
12260   ac_cv_func_vfork_works=yes
12261 else
12262   conftest_rc="$?"
12263   echo "configure: failed program was:" >&5
12264   cat conftest.$ac_ext >&5
12265   rm -fr conftest*
12266   ac_cv_func_vfork_works=no
12267 fi
12268 rm -fr conftest*
12269
12270 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12271 if test $ac_cv_func_vfork_works = no; then
12272   { test "$extra_verbose" = "yes" && cat << \EOF
12273     Defining vfork = fork
12274 EOF
12275 cat >> confdefs.h <<\EOF
12276 #define vfork fork
12277 EOF
12278 }
12279
12280 fi
12281
12282
12283 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12284 echo "configure:12285: checking for working strcoll" >&5
12285
12286 cat > conftest.$ac_ext <<EOF
12287 #line 12288 "configure"
12288 #include "confdefs.h"
12289 #include <string.h>
12290 main ()
12291 {
12292   exit (strcoll ("abc", "def") >= 0 ||
12293         strcoll ("ABC", "DEF") >= 0 ||
12294         strcoll ("123", "456") >= 0);
12295 }
12296 EOF
12297 if { (eval echo configure:12298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12298 then
12299   ac_cv_func_strcoll_works=yes
12300 else
12301   conftest_rc="$?"
12302   echo "configure: failed program was:" >&5
12303   cat conftest.$ac_ext >&5
12304   rm -fr conftest*
12305   ac_cv_func_strcoll_works=no
12306 fi
12307 rm -fr conftest*
12308
12309 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12310 if test $ac_cv_func_strcoll_works = yes; then
12311   { test "$extra_verbose" = "yes" && cat << \EOF
12312     Defining HAVE_STRCOLL
12313 EOF
12314 cat >> confdefs.h <<\EOF
12315 #define HAVE_STRCOLL 1
12316 EOF
12317 }
12318
12319 fi
12320
12321
12322 for ac_func in getpgrp
12323 do
12324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12325 echo "configure:12326: checking for $ac_func" >&5
12326
12327 cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 /* System header to define __stub macros and hopefully few prototypes,
12331     which can conflict with char $ac_func(); below.  */
12332 #include <assert.h>
12333 /* Override any gcc2 internal prototype to avoid an error.  */
12334 /* We use char because int might match the return type of a gcc2
12335     builtin and then its argument prototype would still apply.  */
12336 char $ac_func();
12337
12338 int main() {
12339
12340 /* The GNU C library defines this for functions which it implements
12341     to always fail with ENOSYS.  Some functions are actually named
12342     something starting with __ and the normal name is an alias.  */
12343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12344 choke me
12345 #else
12346 $ac_func();
12347 #endif
12348
12349 ; return 0; }
12350 EOF
12351 if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12352   rm -rf conftest*
12353   eval "ac_cv_func_$ac_func=yes"
12354 else
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -rf conftest*
12358   eval "ac_cv_func_$ac_func=no"
12359 fi
12360 rm -f conftest*
12361
12362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12363   echo "$ac_t""yes" 1>&6
12364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12365   { test "$extra_verbose" = "yes" && cat << EOF
12366     Defining $ac_tr_func
12367 EOF
12368 cat >> confdefs.h <<EOF
12369 #define $ac_tr_func 1
12370 EOF
12371 }
12372  
12373 else
12374   echo "$ac_t""no" 1>&6
12375 fi
12376 done
12377
12378 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12379 echo "configure:12380: checking whether getpgrp takes no argument" >&5
12380
12381 cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384
12385 /*
12386  * If this system has a BSD-style getpgrp(),
12387  * which takes a pid argument, exit unsuccessfully.
12388  *
12389  * Snarfed from Chet Ramey's bash pgrp.c test program
12390  */
12391 #include <stdio.h>
12392 #include <sys/types.h>
12393
12394 int     pid;
12395 int     pg1, pg2, pg3, pg4;
12396 int     ng, np, s, child;
12397
12398 main()
12399 {
12400         pid = getpid();
12401         pg1 = getpgrp(0);
12402         pg2 = getpgrp();
12403         pg3 = getpgrp(pid);
12404         pg4 = getpgrp(1);
12405
12406         /*
12407          * If all of these values are the same, it's pretty sure that
12408          * we're on a system that ignores getpgrp's first argument.
12409          */
12410         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12411                 exit(0);
12412
12413         child = fork();
12414         if (child < 0)
12415                 exit(1);
12416         else if (child == 0) {
12417                 np = getpid();
12418                 /*
12419                  * If this is Sys V, this will not work; pgrp will be
12420                  * set to np because setpgrp just changes a pgrp to be
12421                  * the same as the pid.
12422                  */
12423                 setpgrp(np, pg1);
12424                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12425                 if (ng == pg1) {
12426                         exit(1);
12427                 } else {
12428                         exit(0);
12429                 }
12430         } else {
12431                 wait(&s);
12432                 exit(s>>8);
12433         }
12434 }
12435
12436 EOF
12437 if { (eval echo configure:12438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12438 then
12439   ac_cv_func_getpgrp_void=yes
12440 else
12441   conftest_rc="$?"
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -fr conftest*
12445   ac_cv_func_getpgrp_void=no
12446 fi
12447 rm -fr conftest*
12448
12449
12450 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12451 if test $ac_cv_func_getpgrp_void = yes; then
12452   { test "$extra_verbose" = "yes" && cat << \EOF
12453     Defining GETPGRP_VOID
12454 EOF
12455 cat >> confdefs.h <<\EOF
12456 #define GETPGRP_VOID 1
12457 EOF
12458 }
12459
12460 fi
12461
12462
12463 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12464 echo "configure:12465: checking for working mmap" >&5
12465 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12466 cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 #include <stdio.h>
12470 #include <unistd.h>
12471 #include <fcntl.h>
12472 #include <sys/mman.h>
12473
12474 #ifndef MAP_VARIABLE
12475 #define MAP_VARIABLE 0
12476 #endif
12477
12478 #ifndef MAP_FAILED
12479 #define MAP_FAILED -1
12480 #endif
12481
12482 int main (int argc, char *argv[])
12483 {
12484   int fd = -1;
12485   caddr_t p;
12486 #ifndef MAP_ANONYMOUS
12487   fd = open ("/dev/zero", O_RDWR);
12488   if (fd < 0)
12489     return 1;
12490 #define MAP_ANONYMOUS 0
12491 #endif
12492   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12493            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12494            fd, 0) != (void *) MAP_FAILED)
12495     return 0;
12496   perror ("conftest: mmap failed");
12497   return 1;
12498 }
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12501 then
12502   have_mmap=yes
12503 else
12504   conftest_rc="$?"
12505   echo "configure: failed program was:" >&5
12506   cat conftest.$ac_ext >&5
12507   rm -fr conftest*
12508   have_mmap=no
12509 fi
12510 rm -fr conftest* ;;
12511 esac
12512 echo "$ac_t""$have_mmap" 1>&6
12513 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12514     Defining HAVE_MMAP
12515 EOF
12516 cat >> confdefs.h <<\EOF
12517 #define HAVE_MMAP 1
12518 EOF
12519 }
12520
12521
12522 case "$opsys" in cygwin*) 
12523         test "$rel_alloc" = "default" && rel_alloc=no ;;
12524 esac
12525 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12526 if test "$rel_alloc $have_mmap" = "default yes"; then
12527   if test "$doug_lea_malloc" = "yes"; then
12528         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12529 echo "configure:12530: checking for M_MMAP_THRESHOLD" >&5
12530     cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 #include <malloc.h>
12534 int main() {
12535
12536 #ifndef M_MMAP_THRESHOLD
12537 #error No M_MMAP_THRESHOLD :-(
12538 !@+$%^&*_)(_ - unlikely to compile...
12539 #endif
12540
12541 ; return 0; }
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12544   rm -rf conftest*
12545   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12546 else
12547   echo "configure: failed program was:" >&5
12548   cat conftest.$ac_ext >&5
12549   rm -rf conftest*
12550   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12551 fi
12552 rm -f conftest*
12553   else
12554     rel_alloc=yes
12555   fi
12556 fi
12557 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12558     Defining REL_ALLOC
12559 EOF
12560 cat >> confdefs.h <<\EOF
12561 #define REL_ALLOC 1
12562 EOF
12563 }
12564
12565
12566 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12567 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12568 echo "configure:12569: checking for termios.h" >&5
12569
12570 cat > conftest.$ac_ext <<EOF
12571 #line 12572 "configure"
12572 #include "confdefs.h"
12573 #include <termios.h>
12574 EOF
12575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12576 { (eval echo configure:12577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12578 if test -z "$ac_err"; then
12579   rm -rf conftest*
12580   eval "ac_cv_header_$ac_safe=yes"
12581 else
12582   echo "$ac_err" >&5
12583   echo "configure: failed program was:" >&5
12584   cat conftest.$ac_ext >&5
12585   rm -rf conftest*
12586   eval "ac_cv_header_$ac_safe=no"
12587 fi
12588 rm -f conftest*
12589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12590   echo "$ac_t""yes" 1>&6
12591   { test "$extra_verbose" = "yes" && cat << \EOF
12592     Defining HAVE_TERMIOS
12593 EOF
12594 cat >> confdefs.h <<\EOF
12595 #define HAVE_TERMIOS 1
12596 EOF
12597 }
12598
12599   { test "$extra_verbose" = "yes" && cat << \EOF
12600     Defining SIGNALS_VIA_CHARACTERS
12601 EOF
12602 cat >> confdefs.h <<\EOF
12603 #define SIGNALS_VIA_CHARACTERS 1
12604 EOF
12605 }
12606
12607   { test "$extra_verbose" = "yes" && cat << \EOF
12608     Defining NO_TERMIO
12609 EOF
12610 cat >> confdefs.h <<\EOF
12611 #define NO_TERMIO 1
12612 EOF
12613 }
12614
12615 else
12616   echo "$ac_t""no" 1>&6
12617 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12618 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12619 echo "configure:12620: checking for termio.h" >&5
12620
12621 cat > conftest.$ac_ext <<EOF
12622 #line 12623 "configure"
12623 #include "confdefs.h"
12624 #include <termio.h>
12625 EOF
12626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12627 { (eval echo configure:12628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12629 if test -z "$ac_err"; then
12630   rm -rf conftest*
12631   eval "ac_cv_header_$ac_safe=yes"
12632 else
12633   echo "$ac_err" >&5
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -rf conftest*
12637   eval "ac_cv_header_$ac_safe=no"
12638 fi
12639 rm -f conftest*
12640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12641   echo "$ac_t""yes" 1>&6
12642   { test "$extra_verbose" = "yes" && cat << \EOF
12643     Defining HAVE_TERMIO
12644 EOF
12645 cat >> confdefs.h <<\EOF
12646 #define HAVE_TERMIO 1
12647 EOF
12648 }
12649
12650 else
12651   echo "$ac_t""no" 1>&6
12652 fi
12653
12654 fi
12655
12656
12657
12658 echo $ac_n "checking for socket""... $ac_c" 1>&6
12659 echo "configure:12660: checking for socket" >&5
12660
12661 cat > conftest.$ac_ext <<EOF
12662 #line 12663 "configure"
12663 #include "confdefs.h"
12664 /* System header to define __stub macros and hopefully few prototypes,
12665     which can conflict with char socket(); below.  */
12666 #include <assert.h>
12667 /* Override any gcc2 internal prototype to avoid an error.  */
12668 /* We use char because int might match the return type of a gcc2
12669     builtin and then its argument prototype would still apply.  */
12670 char socket();
12671
12672 int main() {
12673
12674 /* The GNU C library defines this for functions which it implements
12675     to always fail with ENOSYS.  Some functions are actually named
12676     something starting with __ and the normal name is an alias.  */
12677 #if defined (__stub_socket) || defined (__stub___socket)
12678 choke me
12679 #else
12680 socket();
12681 #endif
12682
12683 ; return 0; }
12684 EOF
12685 if { (eval echo configure:12686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12686   rm -rf conftest*
12687   eval "ac_cv_func_socket=yes"
12688 else
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -rf conftest*
12692   eval "ac_cv_func_socket=no"
12693 fi
12694 rm -f conftest*
12695
12696 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12697   echo "$ac_t""yes" 1>&6
12698   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12699 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12700 echo "configure:12701: checking for netinet/in.h" >&5
12701
12702 cat > conftest.$ac_ext <<EOF
12703 #line 12704 "configure"
12704 #include "confdefs.h"
12705 #include <netinet/in.h>
12706 EOF
12707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12708 { (eval echo configure:12709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12710 if test -z "$ac_err"; then
12711   rm -rf conftest*
12712   eval "ac_cv_header_$ac_safe=yes"
12713 else
12714   echo "$ac_err" >&5
12715   echo "configure: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   rm -rf conftest*
12718   eval "ac_cv_header_$ac_safe=no"
12719 fi
12720 rm -f conftest*
12721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12722   echo "$ac_t""yes" 1>&6
12723   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12724 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12725 echo "configure:12726: checking for arpa/inet.h" >&5
12726
12727 cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 #include <arpa/inet.h>
12731 EOF
12732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12733 { (eval echo configure:12734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12735 if test -z "$ac_err"; then
12736   rm -rf conftest*
12737   eval "ac_cv_header_$ac_safe=yes"
12738 else
12739   echo "$ac_err" >&5
12740   echo "configure: failed program was:" >&5
12741   cat conftest.$ac_ext >&5
12742   rm -rf conftest*
12743   eval "ac_cv_header_$ac_safe=no"
12744 fi
12745 rm -f conftest*
12746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12747   echo "$ac_t""yes" 1>&6
12748   
12749   { test "$extra_verbose" = "yes" && cat << \EOF
12750     Defining HAVE_SOCKETS
12751 EOF
12752 cat >> confdefs.h <<\EOF
12753 #define HAVE_SOCKETS 1
12754 EOF
12755 }
12756
12757       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12758 echo "configure:12759: checking "for sun_len member in struct sockaddr_un"" >&5
12759       cat > conftest.$ac_ext <<EOF
12760 #line 12761 "configure"
12761 #include "confdefs.h"
12762
12763 #include <sys/types.h>
12764 #include <sys/socket.h>
12765 #include <sys/un.h>
12766       
12767 int main() {
12768 static struct sockaddr_un x; x.sun_len = 1;
12769 ; return 0; }
12770 EOF
12771 if { (eval echo configure:12772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12772   rm -rf conftest*
12773   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12774     Defining HAVE_SOCKADDR_SUN_LEN
12775 EOF
12776 cat >> confdefs.h <<\EOF
12777 #define HAVE_SOCKADDR_SUN_LEN 1
12778 EOF
12779 }
12780
12781 else
12782   echo "configure: failed program was:" >&5
12783   cat conftest.$ac_ext >&5
12784   rm -rf conftest*
12785   echo "$ac_t""no" 1>&6
12786 fi
12787 rm -f conftest*
12788       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12789 echo "configure:12790: checking "for ip_mreq struct in netinet/in.h"" >&5
12790       cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793
12794 #include <sys/types.h>
12795 #include <netinet/in.h>
12796       
12797 int main() {
12798 static struct ip_mreq x;
12799 ; return 0; }
12800 EOF
12801 if { (eval echo configure:12802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12802   rm -rf conftest*
12803   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12804     Defining HAVE_MULTICAST
12805 EOF
12806 cat >> confdefs.h <<\EOF
12807 #define HAVE_MULTICAST 1
12808 EOF
12809 }
12810
12811 else
12812   echo "configure: failed program was:" >&5
12813   cat conftest.$ac_ext >&5
12814   rm -rf conftest*
12815   echo "$ac_t""no" 1>&6
12816 fi
12817 rm -f conftest*
12818 else
12819   echo "$ac_t""no" 1>&6
12820 fi
12821
12822 else
12823   echo "$ac_t""no" 1>&6
12824 fi
12825
12826 else
12827   echo "$ac_t""no" 1>&6
12828 fi
12829
12830
12831 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12832 echo "configure:12833: checking for msgget" >&5
12833
12834 cat > conftest.$ac_ext <<EOF
12835 #line 12836 "configure"
12836 #include "confdefs.h"
12837 /* System header to define __stub macros and hopefully few prototypes,
12838     which can conflict with char msgget(); below.  */
12839 #include <assert.h>
12840 /* Override any gcc2 internal prototype to avoid an error.  */
12841 /* We use char because int might match the return type of a gcc2
12842     builtin and then its argument prototype would still apply.  */
12843 char msgget();
12844
12845 int main() {
12846
12847 /* The GNU C library defines this for functions which it implements
12848     to always fail with ENOSYS.  Some functions are actually named
12849     something starting with __ and the normal name is an alias.  */
12850 #if defined (__stub_msgget) || defined (__stub___msgget)
12851 choke me
12852 #else
12853 msgget();
12854 #endif
12855
12856 ; return 0; }
12857 EOF
12858 if { (eval echo configure:12859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12859   rm -rf conftest*
12860   eval "ac_cv_func_msgget=yes"
12861 else
12862   echo "configure: failed program was:" >&5
12863   cat conftest.$ac_ext >&5
12864   rm -rf conftest*
12865   eval "ac_cv_func_msgget=no"
12866 fi
12867 rm -f conftest*
12868
12869 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12870   echo "$ac_t""yes" 1>&6
12871   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12872 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12873 echo "configure:12874: checking for sys/ipc.h" >&5
12874
12875 cat > conftest.$ac_ext <<EOF
12876 #line 12877 "configure"
12877 #include "confdefs.h"
12878 #include <sys/ipc.h>
12879 EOF
12880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12881 { (eval echo configure:12882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12883 if test -z "$ac_err"; then
12884   rm -rf conftest*
12885   eval "ac_cv_header_$ac_safe=yes"
12886 else
12887   echo "$ac_err" >&5
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -rf conftest*
12891   eval "ac_cv_header_$ac_safe=no"
12892 fi
12893 rm -f conftest*
12894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12895   echo "$ac_t""yes" 1>&6
12896   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12897 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12898 echo "configure:12899: checking for sys/msg.h" >&5
12899
12900 cat > conftest.$ac_ext <<EOF
12901 #line 12902 "configure"
12902 #include "confdefs.h"
12903 #include <sys/msg.h>
12904 EOF
12905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12906 { (eval echo configure:12907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12908 if test -z "$ac_err"; then
12909   rm -rf conftest*
12910   eval "ac_cv_header_$ac_safe=yes"
12911 else
12912   echo "$ac_err" >&5
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   eval "ac_cv_header_$ac_safe=no"
12917 fi
12918 rm -f conftest*
12919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12920   echo "$ac_t""yes" 1>&6
12921   { test "$extra_verbose" = "yes" && cat << \EOF
12922     Defining HAVE_SYSVIPC
12923 EOF
12924 cat >> confdefs.h <<\EOF
12925 #define HAVE_SYSVIPC 1
12926 EOF
12927 }
12928
12929 else
12930   echo "$ac_t""no" 1>&6
12931 fi
12932
12933 else
12934   echo "$ac_t""no" 1>&6
12935 fi
12936
12937 else
12938   echo "$ac_t""no" 1>&6
12939 fi
12940
12941
12942 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12943 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12944 echo "configure:12945: checking for dirent.h" >&5
12945
12946 cat > conftest.$ac_ext <<EOF
12947 #line 12948 "configure"
12948 #include "confdefs.h"
12949 #include <dirent.h>
12950 EOF
12951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12952 { (eval echo configure:12953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12954 if test -z "$ac_err"; then
12955   rm -rf conftest*
12956   eval "ac_cv_header_$ac_safe=yes"
12957 else
12958   echo "$ac_err" >&5
12959   echo "configure: failed program was:" >&5
12960   cat conftest.$ac_ext >&5
12961   rm -rf conftest*
12962   eval "ac_cv_header_$ac_safe=no"
12963 fi
12964 rm -f conftest*
12965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12966   echo "$ac_t""yes" 1>&6
12967   { test "$extra_verbose" = "yes" && cat << \EOF
12968     Defining SYSV_SYSTEM_DIR
12969 EOF
12970 cat >> confdefs.h <<\EOF
12971 #define SYSV_SYSTEM_DIR 1
12972 EOF
12973 }
12974
12975 else
12976   echo "$ac_t""no" 1>&6
12977 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12978 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12979 echo "configure:12980: checking for sys/dir.h" >&5
12980
12981 cat > conftest.$ac_ext <<EOF
12982 #line 12983 "configure"
12983 #include "confdefs.h"
12984 #include <sys/dir.h>
12985 EOF
12986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12987 { (eval echo configure:12988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12989 if test -z "$ac_err"; then
12990   rm -rf conftest*
12991   eval "ac_cv_header_$ac_safe=yes"
12992 else
12993   echo "$ac_err" >&5
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   eval "ac_cv_header_$ac_safe=no"
12998 fi
12999 rm -f conftest*
13000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13001   echo "$ac_t""yes" 1>&6
13002   :
13003 else
13004   echo "$ac_t""no" 1>&6
13005 { test "$extra_verbose" = "yes" && cat << \EOF
13006     Defining NONSYSTEM_DIR_LIBRARY
13007 EOF
13008 cat >> confdefs.h <<\EOF
13009 #define NONSYSTEM_DIR_LIBRARY 1
13010 EOF
13011 }
13012
13013 fi
13014
13015 fi
13016
13017
13018 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13019 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13020 echo "configure:13021: checking for nlist.h" >&5
13021
13022 cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 #include <nlist.h>
13026 EOF
13027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13028 { (eval echo configure:13029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13030 if test -z "$ac_err"; then
13031   rm -rf conftest*
13032   eval "ac_cv_header_$ac_safe=yes"
13033 else
13034   echo "$ac_err" >&5
13035   echo "configure: failed program was:" >&5
13036   cat conftest.$ac_ext >&5
13037   rm -rf conftest*
13038   eval "ac_cv_header_$ac_safe=no"
13039 fi
13040 rm -f conftest*
13041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13042   echo "$ac_t""yes" 1>&6
13043   { test "$extra_verbose" = "yes" && cat << \EOF
13044     Defining NLIST_STRUCT
13045 EOF
13046 cat >> confdefs.h <<\EOF
13047 #define NLIST_STRUCT 1
13048 EOF
13049 }
13050
13051 else
13052   echo "$ac_t""no" 1>&6
13053 fi
13054
13055
13056
13057 echo "checking "for sound support"" 1>&6
13058 echo "configure:13059: checking "for sound support"" >&5
13059 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13060
13061 if test "$with_native_sound" != "no"; then
13062     if test -n "$native_sound_lib"; then
13063     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13064 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13065 echo "configure:13066: checking for multimedia/audio_device.h" >&5
13066
13067 cat > conftest.$ac_ext <<EOF
13068 #line 13069 "configure"
13069 #include "confdefs.h"
13070 #include <multimedia/audio_device.h>
13071 EOF
13072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13073 { (eval echo configure:13074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13075 if test -z "$ac_err"; then
13076   rm -rf conftest*
13077   eval "ac_cv_header_$ac_safe=yes"
13078 else
13079   echo "$ac_err" >&5
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   eval "ac_cv_header_$ac_safe=no"
13084 fi
13085 rm -f conftest*
13086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13087   echo "$ac_t""yes" 1>&6
13088   sound_found=yes sound_cflags=""
13089       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13090    echo "    xemacs will be linked with \"sunplay.o\""
13091  fi
13092 else
13093   echo "$ac_t""no" 1>&6
13094 fi
13095
13096   fi
13097
13098     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13099     sound_found=yes
13100     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13101    echo "    xemacs will be linked with \"sunplay.o\""
13102  fi
13103     if test -d "/usr/demo/SOUND/include"
13104       then sound_cflags="-I/usr/demo/SOUND/include"
13105       else sound_cflags="-I/usr/demo/SOUND"
13106     fi
13107     if test -z "$native_sound_lib" ; then
13108       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13109         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13110         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13111       fi
13112     fi
13113   fi
13114
13115     if test -z "$sound_found"; then
13116     case "$canonical" in
13117     *-sgi-* )
13118       if test -z "$native_sound_lib"; then
13119         
13120 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13121 echo "configure:13122: checking for ALopenport in -laudio" >&5
13122 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13123
13124 xe_check_libs=" -laudio "
13125 cat > conftest.$ac_ext <<EOF
13126 #line 13127 "configure"
13127 #include "confdefs.h"
13128 /* Override any gcc2 internal prototype to avoid an error.  */
13129 /* We use char because int might match the return type of a gcc2
13130     builtin and then its argument prototype would still apply.  */
13131 char ALopenport();
13132
13133 int main() {
13134 ALopenport()
13135 ; return 0; }
13136 EOF
13137 if { (eval echo configure:13138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13138   rm -rf conftest*
13139   eval "ac_cv_lib_$ac_lib_var=yes"
13140 else
13141   echo "configure: failed program was:" >&5
13142   cat conftest.$ac_ext >&5
13143   rm -rf conftest*
13144   eval "ac_cv_lib_$ac_lib_var=no"
13145 fi
13146 rm -f conftest*
13147 xe_check_libs=""
13148
13149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13150   echo "$ac_t""yes" 1>&6
13151   native_sound_lib="-laudio"
13152 else
13153   echo "$ac_t""no" 1>&6
13154 fi
13155
13156
13157       fi
13158       if test -n "$native_sound_lib"; then
13159         sound_found=yes sound_cflags=""
13160         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13161    echo "    xemacs will be linked with \"sgiplay.o\""
13162  fi
13163       fi ;;
13164     hppa*-hp-hpux* )
13165       if test -z "$native_sound_lib"; then
13166         
13167 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13168 echo "configure:13169: checking for AOpenAudio in -lAlib" >&5
13169 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13170
13171 xe_check_libs=" -lAlib "
13172 cat > conftest.$ac_ext <<EOF
13173 #line 13174 "configure"
13174 #include "confdefs.h"
13175 /* Override any gcc2 internal prototype to avoid an error.  */
13176 /* We use char because int might match the return type of a gcc2
13177     builtin and then its argument prototype would still apply.  */
13178 char AOpenAudio();
13179
13180 int main() {
13181 AOpenAudio()
13182 ; return 0; }
13183 EOF
13184 if { (eval echo configure:13185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13185   rm -rf conftest*
13186   eval "ac_cv_lib_$ac_lib_var=yes"
13187 else
13188   echo "configure: failed program was:" >&5
13189   cat conftest.$ac_ext >&5
13190   rm -rf conftest*
13191   eval "ac_cv_lib_$ac_lib_var=no"
13192 fi
13193 rm -f conftest*
13194 xe_check_libs=""
13195
13196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13197   echo "$ac_t""yes" 1>&6
13198   native_sound_lib="-lAlib"
13199 else
13200   echo "$ac_t""no" 1>&6
13201 fi
13202
13203
13204       fi
13205       if test -n "$native_sound_lib"; then
13206         sound_found=yes
13207         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13208    echo "    xemacs will be linked with \"hpplay.o\""
13209  fi
13210         if test "$GCC" = "yes" # Kludge city
13211           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13212           else sound_cflags="+e -I/usr/audio/examples"
13213         fi
13214       fi ;;
13215     esac
13216   fi
13217
13218     if test -z "$sound_found"; then
13219     if test "$with_msw" = "yes"; then
13220     sound_found=yes
13221     native_sound_lib=
13222     fi
13223   fi
13224
13225     if test -z "$sound_found"; then
13226     for dir in "machine" "sys" "linux"; do
13227       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13228 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13229 echo "configure:13230: checking for ${dir}/soundcard.h" >&5
13230
13231 cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234 #include <${dir}/soundcard.h>
13235 EOF
13236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13237 { (eval echo configure:13238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13239 if test -z "$ac_err"; then
13240   rm -rf conftest*
13241   eval "ac_cv_header_$ac_safe=yes"
13242 else
13243   echo "$ac_err" >&5
13244   echo "configure: failed program was:" >&5
13245   cat conftest.$ac_ext >&5
13246   rm -rf conftest*
13247   eval "ac_cv_header_$ac_safe=no"
13248 fi
13249 rm -f conftest*
13250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13251   echo "$ac_t""yes" 1>&6
13252   sound_found=yes
13253        need_miscplay=yes
13254         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13255    echo "    xemacs will be linked with \"linuxplay.o\""
13256  fi
13257         { test "$extra_verbose" = "yes" && cat << EOF
13258     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13259 EOF
13260 cat >> confdefs.h <<EOF
13261 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13262 EOF
13263 }
13264
13265         break
13266 else
13267   echo "$ac_t""no" 1>&6
13268 fi
13269
13270     done
13271   fi
13272
13273   test "$sound_found" = "yes" && with_native_sound=yes
13274 fi
13275
13276 if test "$with_native_sound" = "yes"; then
13277   { test "$extra_verbose" = "yes" && cat << \EOF
13278     Defining HAVE_NATIVE_SOUND
13279 EOF
13280 cat >> confdefs.h <<\EOF
13281 #define HAVE_NATIVE_SOUND 1
13282 EOF
13283 }
13284
13285   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13286 fi
13287
13288 if test "$with_nas_sound" != "no"; then
13289   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13290 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13291 echo "configure:13292: checking for audio/audiolib.h" >&5
13292
13293 cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 #include <audio/audiolib.h>
13297 EOF
13298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13299 { (eval echo configure:13300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13301 if test -z "$ac_err"; then
13302   rm -rf conftest*
13303   eval "ac_cv_header_$ac_safe=yes"
13304 else
13305   echo "$ac_err" >&5
13306   echo "configure: failed program was:" >&5
13307   cat conftest.$ac_ext >&5
13308   rm -rf conftest*
13309   eval "ac_cv_header_$ac_safe=no"
13310 fi
13311 rm -f conftest*
13312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13313   echo "$ac_t""yes" 1>&6
13314   
13315     
13316 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13317 echo "configure:13318: checking for AuOpenServer in -laudio" >&5
13318 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13319
13320 xe_check_libs=" -laudio "
13321 cat > conftest.$ac_ext <<EOF
13322 #line 13323 "configure"
13323 #include "confdefs.h"
13324 /* Override any gcc2 internal prototype to avoid an error.  */
13325 /* We use char because int might match the return type of a gcc2
13326     builtin and then its argument prototype would still apply.  */
13327 char AuOpenServer();
13328
13329 int main() {
13330 AuOpenServer()
13331 ; return 0; }
13332 EOF
13333 if { (eval echo configure:13334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13334   rm -rf conftest*
13335   eval "ac_cv_lib_$ac_lib_var=yes"
13336 else
13337   echo "configure: failed program was:" >&5
13338   cat conftest.$ac_ext >&5
13339   rm -rf conftest*
13340   eval "ac_cv_lib_$ac_lib_var=no"
13341 fi
13342 rm -f conftest*
13343 xe_check_libs=""
13344
13345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13346   echo "$ac_t""yes" 1>&6
13347   have_nas_sound=yes
13348 else
13349   echo "$ac_t""no" 1>&6
13350 fi
13351
13352
13353 else
13354   echo "$ac_t""no" 1>&6
13355 fi
13356
13357   if test "$have_nas_sound" = "yes"; then
13358     with_nas_sound=yes
13359     { test "$extra_verbose" = "yes" && cat << \EOF
13360     Defining HAVE_NAS_SOUND
13361 EOF
13362 cat >> confdefs.h <<\EOF
13363 #define HAVE_NAS_SOUND 1
13364 EOF
13365 }
13366
13367     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13368    echo "    xemacs will be linked with \"nas.o\""
13369  fi
13370     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13371             cat > conftest.$ac_ext <<EOF
13372 #line 13373 "configure"
13373 #include "confdefs.h"
13374 #include <audio/Xtutil.h>
13375 EOF
13376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13377   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13378   :
13379 else
13380   rm -rf conftest*
13381   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13382     Defining NAS_NO_ERROR_JUMP
13383 EOF
13384 cat >> confdefs.h <<\EOF
13385 #define NAS_NO_ERROR_JUMP 1
13386 EOF
13387 }
13388
13389 fi
13390 rm -f conftest*
13391
13392   else
13393     test "$with_nas_sound" = "yes" && \
13394       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13395     with_nas_sound=no
13396   fi
13397 fi
13398
13399 if test "$with_esd_sound" != "no"; then
13400   # Extract the first word of "esd-config", so it can be a program name with args.
13401 set dummy esd-config; ac_word=$2
13402 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13403 echo "configure:13404: checking for $ac_word" >&5
13404
13405 if test -n "$have_esd_config"; then
13406   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13407 else
13408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13409   ac_dummy="$PATH"
13410   for ac_dir in $ac_dummy; do
13411     test -z "$ac_dir" && ac_dir=.
13412     if test -f $ac_dir/$ac_word; then
13413       ac_cv_prog_have_esd_config="yes"
13414       break
13415     fi
13416   done
13417   IFS="$ac_save_ifs"
13418   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13419 fi
13420 have_esd_config="$ac_cv_prog_have_esd_config"
13421 if test -n "$have_esd_config"; then
13422   echo "$ac_t""$have_esd_config" 1>&6
13423 else
13424   echo "$ac_t""no" 1>&6
13425 fi
13426
13427   if test "$have_esd_config" = "yes"; then
13428     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13429     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
13430     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13431     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13432 echo "configure:13433: checking for esd_play_stream" >&5
13433
13434 cat > conftest.$ac_ext <<EOF
13435 #line 13436 "configure"
13436 #include "confdefs.h"
13437 /* System header to define __stub macros and hopefully few prototypes,
13438     which can conflict with char esd_play_stream(); below.  */
13439 #include <assert.h>
13440 /* Override any gcc2 internal prototype to avoid an error.  */
13441 /* We use char because int might match the return type of a gcc2
13442     builtin and then its argument prototype would still apply.  */
13443 char esd_play_stream();
13444
13445 int main() {
13446
13447 /* The GNU C library defines this for functions which it implements
13448     to always fail with ENOSYS.  Some functions are actually named
13449     something starting with __ and the normal name is an alias.  */
13450 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13451 choke me
13452 #else
13453 esd_play_stream();
13454 #endif
13455
13456 ; return 0; }
13457 EOF
13458 if { (eval echo configure:13459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13459   rm -rf conftest*
13460   eval "ac_cv_func_esd_play_stream=yes"
13461 else
13462   echo "configure: failed program was:" >&5
13463   cat conftest.$ac_ext >&5
13464   rm -rf conftest*
13465   eval "ac_cv_func_esd_play_stream=no"
13466 fi
13467 rm -f conftest*
13468
13469 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13470   echo "$ac_t""yes" 1>&6
13471   have_esd_sound=yes
13472 else
13473   echo "$ac_t""no" 1>&6
13474 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13475 fi
13476
13477   fi
13478
13479   if test "$have_esd_sound" = "yes"; then
13480     with_esd_sound=yes
13481     need_miscplay=yes
13482     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13483    echo "    xemacs will be linked with \"esd.o\""
13484  fi
13485     { test "$extra_verbose" = "yes" && cat << \EOF
13486     Defining HAVE_ESD_SOUND
13487 EOF
13488 cat >> confdefs.h <<\EOF
13489 #define HAVE_ESD_SOUND 1
13490 EOF
13491 }
13492
13493   else
13494     test "$with_esd_sound" = "yes" && \
13495       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13496     with_esd_sound=no
13497   fi
13498 fi
13499
13500 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13501    echo "    xemacs will be linked with \"miscplay.o\""
13502  fi
13503
13504
13505 test -z "$with_tty" && with_tty=yes
13506
13507 if test "$with_tty" = "yes"  ; then
13508   echo "checking for TTY-related features" 1>&6
13509 echo "configure:13510: checking for TTY-related features" >&5
13510   { test "$extra_verbose" = "yes" && cat << \EOF
13511     Defining HAVE_TTY
13512 EOF
13513 cat >> confdefs.h <<\EOF
13514 #define HAVE_TTY 1
13515 EOF
13516 }
13517
13518   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
13519    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\""
13520  fi
13521
13522     if test -z "$with_ncurses"; then
13523     
13524 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13525 echo "configure:13526: checking for tgetent in -lncurses" >&5
13526 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13527
13528 xe_check_libs=" -lncurses "
13529 cat > conftest.$ac_ext <<EOF
13530 #line 13531 "configure"
13531 #include "confdefs.h"
13532 /* Override any gcc2 internal prototype to avoid an error.  */
13533 /* We use char because int might match the return type of a gcc2
13534     builtin and then its argument prototype would still apply.  */
13535 char tgetent();
13536
13537 int main() {
13538 tgetent()
13539 ; return 0; }
13540 EOF
13541 if { (eval echo configure:13542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13542   rm -rf conftest*
13543   eval "ac_cv_lib_$ac_lib_var=yes"
13544 else
13545   echo "configure: failed program was:" >&5
13546   cat conftest.$ac_ext >&5
13547   rm -rf conftest*
13548   eval "ac_cv_lib_$ac_lib_var=no"
13549 fi
13550 rm -f conftest*
13551 xe_check_libs=""
13552
13553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13554   echo "$ac_t""yes" 1>&6
13555   with_ncurses=yes
13556 else
13557   echo "$ac_t""no" 1>&6
13558 with_ncurses=no
13559 fi
13560
13561
13562   fi
13563   if test "$with_ncurses" = "yes"; then
13564     { test "$extra_verbose" = "yes" && cat << \EOF
13565     Defining HAVE_NCURSES
13566 EOF
13567 cat >> confdefs.h <<\EOF
13568 #define HAVE_NCURSES 1
13569 EOF
13570 }
13571
13572     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13573 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13574 echo "configure:13575: checking for ncurses/curses.h" >&5
13575
13576 cat > conftest.$ac_ext <<EOF
13577 #line 13578 "configure"
13578 #include "confdefs.h"
13579 #include <ncurses/curses.h>
13580 EOF
13581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13582 { (eval echo configure:13583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13584 if test -z "$ac_err"; then
13585   rm -rf conftest*
13586   eval "ac_cv_header_$ac_safe=yes"
13587 else
13588   echo "$ac_err" >&5
13589   echo "configure: failed program was:" >&5
13590   cat conftest.$ac_ext >&5
13591   rm -rf conftest*
13592   eval "ac_cv_header_$ac_safe=no"
13593 fi
13594 rm -f conftest*
13595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13596   echo "$ac_t""yes" 1>&6
13597   curses_h_file=ncurses/curses.h
13598 else
13599   echo "$ac_t""no" 1>&6
13600 fi
13601
13602     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13603 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13604 echo "configure:13605: checking for ncurses/term.h" >&5
13605
13606 cat > conftest.$ac_ext <<EOF
13607 #line 13608 "configure"
13608 #include "confdefs.h"
13609 #include <ncurses/term.h>
13610 EOF
13611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13612 { (eval echo configure:13613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13614 if test -z "$ac_err"; then
13615   rm -rf conftest*
13616   eval "ac_cv_header_$ac_safe=yes"
13617 else
13618   echo "$ac_err" >&5
13619   echo "configure: failed program was:" >&5
13620   cat conftest.$ac_ext >&5
13621   rm -rf conftest*
13622   eval "ac_cv_header_$ac_safe=no"
13623 fi
13624 rm -f conftest*
13625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13626   echo "$ac_t""yes" 1>&6
13627   term_h_file=ncurses/term.h
13628 else
13629   echo "$ac_t""no" 1>&6
13630 fi
13631
13632     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13633    echo "    xemacs will be linked with \"terminfo.o\""
13634  fi
13635     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13636
13637     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13638                         save_c_switch_site="$c_switch_site"
13639       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13640       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13641 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13642 echo "configure:13643: checking for ncurses/curses.h" >&5
13643
13644 cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 #include <ncurses/curses.h>
13648 EOF
13649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13650 { (eval echo configure:13651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13652 if test -z "$ac_err"; then
13653   rm -rf conftest*
13654   eval "ac_cv_header_$ac_safe=yes"
13655 else
13656   echo "$ac_err" >&5
13657   echo "configure: failed program was:" >&5
13658   cat conftest.$ac_ext >&5
13659   rm -rf conftest*
13660   eval "ac_cv_header_$ac_safe=no"
13661 fi
13662 rm -f conftest*
13663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13664   echo "$ac_t""yes" 1>&6
13665   curses_h_file=ncurses/curses.h
13666 else
13667   echo "$ac_t""no" 1>&6
13668 fi
13669
13670       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13671         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13672         else c_switch_site="$save_c_switch_site"
13673       fi
13674     fi
13675   else         if test "$have_terminfo" = "yes"; then
13676       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13677    echo "    xemacs will be linked with \"terminfo.o\""
13678  fi
13679       if test -n "$libs_termcap"; then
13680         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13681       else
13682         for lib in curses termlib termcap; do
13683           
13684 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13685 echo "configure:13686: checking for tgetent in -l$lib" >&5
13686 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13687
13688 xe_check_libs=" -l$lib "
13689 cat > conftest.$ac_ext <<EOF
13690 #line 13691 "configure"
13691 #include "confdefs.h"
13692 /* Override any gcc2 internal prototype to avoid an error.  */
13693 /* We use char because int might match the return type of a gcc2
13694     builtin and then its argument prototype would still apply.  */
13695 char tgetent();
13696
13697 int main() {
13698 tgetent()
13699 ; return 0; }
13700 EOF
13701 if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13702   rm -rf conftest*
13703   eval "ac_cv_lib_$ac_lib_var=yes"
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -rf conftest*
13708   eval "ac_cv_lib_$ac_lib_var=no"
13709 fi
13710 rm -f conftest*
13711 xe_check_libs=""
13712
13713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13714   echo "$ac_t""yes" 1>&6
13715   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13716 else
13717   echo "$ac_t""no" 1>&6
13718 fi
13719
13720
13721         done
13722       fi
13723     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13724                                 
13725 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13726 echo "configure:13727: checking for tgoto in -ltermcap" >&5
13727 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13728
13729 xe_check_libs=" -ltermcap "
13730 cat > conftest.$ac_ext <<EOF
13731 #line 13732 "configure"
13732 #include "confdefs.h"
13733 /* Override any gcc2 internal prototype to avoid an error.  */
13734 /* We use char because int might match the return type of a gcc2
13735     builtin and then its argument prototype would still apply.  */
13736 char tgoto();
13737
13738 int main() {
13739 tgoto()
13740 ; return 0; }
13741 EOF
13742 if { (eval echo configure:13743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13743   rm -rf conftest*
13744   eval "ac_cv_lib_$ac_lib_var=yes"
13745 else
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   eval "ac_cv_lib_$ac_lib_var=no"
13750 fi
13751 rm -f conftest*
13752 xe_check_libs=""
13753
13754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13755   echo "$ac_t""yes" 1>&6
13756     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13757     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13758   { test "$extra_verbose" = "yes" && cat << EOF
13759     Defining $ac_tr_lib
13760 EOF
13761 cat >> confdefs.h <<EOF
13762 #define $ac_tr_lib 1
13763 EOF
13764 }
13765
13766   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13767
13768 else
13769   echo "$ac_t""no" 1>&6
13770 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13771    echo "    xemacs will be linked with \"tparam.o\""
13772  fi
13773 fi
13774
13775
13776       else
13777         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13778    echo "    xemacs will be linked with \"tparam.o\""
13779  fi
13780       fi
13781                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13782       if test -n "$libs_termcap"; then
13783         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13784       else
13785         
13786 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13787 echo "configure:13788: checking for tgetent in -lcurses" >&5
13788 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13789
13790 xe_check_libs=" -lcurses "
13791 cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 /* We use char because int might match the return type of a gcc2
13796     builtin and then its argument prototype would still apply.  */
13797 char tgetent();
13798
13799 int main() {
13800 tgetent()
13801 ; return 0; }
13802 EOF
13803 if { (eval echo configure:13804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13804   rm -rf conftest*
13805   eval "ac_cv_lib_$ac_lib_var=yes"
13806 else
13807   echo "configure: failed program was:" >&5
13808   cat conftest.$ac_ext >&5
13809   rm -rf conftest*
13810   eval "ac_cv_lib_$ac_lib_var=no"
13811 fi
13812 rm -f conftest*
13813 xe_check_libs=""
13814
13815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13816   echo "$ac_t""yes" 1>&6
13817   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13818 else
13819   echo "$ac_t""no" 1>&6
13820 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13821 echo "configure:13822: checking for tgetent in -ltermcap" >&5
13822 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13823
13824 xe_check_libs=" -ltermcap "
13825 cat > conftest.$ac_ext <<EOF
13826 #line 13827 "configure"
13827 #include "confdefs.h"
13828 /* Override any gcc2 internal prototype to avoid an error.  */
13829 /* We use char because int might match the return type of a gcc2
13830     builtin and then its argument prototype would still apply.  */
13831 char tgetent();
13832
13833 int main() {
13834 tgetent()
13835 ; return 0; }
13836 EOF
13837 if { (eval echo configure:13838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13838   rm -rf conftest*
13839   eval "ac_cv_lib_$ac_lib_var=yes"
13840 else
13841   echo "configure: failed program was:" >&5
13842   cat conftest.$ac_ext >&5
13843   rm -rf conftest*
13844   eval "ac_cv_lib_$ac_lib_var=no"
13845 fi
13846 rm -f conftest*
13847 xe_check_libs=""
13848
13849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13850   echo "$ac_t""yes" 1>&6
13851   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13852 else
13853   echo "$ac_t""no" 1>&6
13854 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13855    echo "    xemacs will be linked with \"termcap.o\""
13856  fi
13857 fi
13858
13859
13860 fi
13861
13862
13863       fi
13864     fi
13865   fi
13866   { test "$extra_verbose" = "yes" && cat << EOF
13867     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13868 EOF
13869 cat >> confdefs.h <<EOF
13870 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13871 EOF
13872 }
13873
13874   { test "$extra_verbose" = "yes" && cat << EOF
13875     Defining TERM_H_FILE = "${term_h_file-term.h}"
13876 EOF
13877 cat >> confdefs.h <<EOF
13878 #define TERM_H_FILE "${term_h_file-term.h}"
13879 EOF
13880 }
13881
13882
13883     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13884 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13885 echo "configure:13886: checking for gpm.h" >&5
13886
13887 cat > conftest.$ac_ext <<EOF
13888 #line 13889 "configure"
13889 #include "confdefs.h"
13890 #include <gpm.h>
13891 EOF
13892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13893 { (eval echo configure:13894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13895 if test -z "$ac_err"; then
13896   rm -rf conftest*
13897   eval "ac_cv_header_$ac_safe=yes"
13898 else
13899   echo "$ac_err" >&5
13900   echo "configure: failed program was:" >&5
13901   cat conftest.$ac_ext >&5
13902   rm -rf conftest*
13903   eval "ac_cv_header_$ac_safe=no"
13904 fi
13905 rm -f conftest*
13906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13907   echo "$ac_t""yes" 1>&6
13908   :
13909 else
13910   echo "$ac_t""no" 1>&6
13911 with_gpm=no
13912 fi
13913  }
13914   test -z "$with_gpm" && { 
13915 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13916 echo "configure:13917: checking for Gpm_Open in -lgpm" >&5
13917 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13918
13919 xe_check_libs=" -lgpm "
13920 cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923 /* Override any gcc2 internal prototype to avoid an error.  */
13924 /* We use char because int might match the return type of a gcc2
13925     builtin and then its argument prototype would still apply.  */
13926 char Gpm_Open();
13927
13928 int main() {
13929 Gpm_Open()
13930 ; return 0; }
13931 EOF
13932 if { (eval echo configure:13933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13933   rm -rf conftest*
13934   eval "ac_cv_lib_$ac_lib_var=yes"
13935 else
13936   echo "configure: failed program was:" >&5
13937   cat conftest.$ac_ext >&5
13938   rm -rf conftest*
13939   eval "ac_cv_lib_$ac_lib_var=no"
13940 fi
13941 rm -f conftest*
13942 xe_check_libs=""
13943
13944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13945   echo "$ac_t""yes" 1>&6
13946   with_gpm=yes
13947 else
13948   echo "$ac_t""no" 1>&6
13949 with_gpm=no
13950 fi
13951
13952  }
13953   if test "$with_gpm" = "yes"; then
13954     { test "$extra_verbose" = "yes" && cat << \EOF
13955     Defining HAVE_GPM
13956 EOF
13957 cat >> confdefs.h <<\EOF
13958 #define HAVE_GPM 1
13959 EOF
13960 }
13961
13962     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13963    echo "    xemacs will be linked with \"gpmevent.o\""
13964  fi
13965     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13966   fi
13967
13968 else   for feature in ncurses gpm; do
13969     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13970       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13971     fi
13972     eval "with_${feature}=no"
13973   done
13974 fi 
13975 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13976    echo "    xemacs will be linked with \"event-unixoid.o\""
13977  fi
13978
13979
13980 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13981   != "no no no" && echo "checking for database support" 1>&6
13982 echo "configure:13983: checking for database support" >&5
13983
13984 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13985   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13986 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13987 echo "configure:13988: checking for ndbm.h" >&5
13988
13989 cat > conftest.$ac_ext <<EOF
13990 #line 13991 "configure"
13991 #include "confdefs.h"
13992 #include <ndbm.h>
13993 EOF
13994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13995 { (eval echo configure:13996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13997 if test -z "$ac_err"; then
13998   rm -rf conftest*
13999   eval "ac_cv_header_$ac_safe=yes"
14000 else
14001   echo "$ac_err" >&5
14002   echo "configure: failed program was:" >&5
14003   cat conftest.$ac_ext >&5
14004   rm -rf conftest*
14005   eval "ac_cv_header_$ac_safe=no"
14006 fi
14007 rm -f conftest*
14008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14009   echo "$ac_t""yes" 1>&6
14010   :
14011 else
14012   echo "$ac_t""no" 1>&6
14013
14014     test "$with_database_gdbm" = "yes" -o \
14015          "$with_database_dbm"  = "yes" && \
14016       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14017     with_database_gdbm=no with_database_dbm=no
14018 fi
14019
14020 fi
14021
14022 if test "$with_database_gdbm" != "no"; then
14023   
14024 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14025 echo "configure:14026: checking for dbm_open in -lgdbm" >&5
14026 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14027
14028 xe_check_libs=" -lgdbm "
14029 cat > conftest.$ac_ext <<EOF
14030 #line 14031 "configure"
14031 #include "confdefs.h"
14032 /* Override any gcc2 internal prototype to avoid an error.  */
14033 /* We use char because int might match the return type of a gcc2
14034     builtin and then its argument prototype would still apply.  */
14035 char dbm_open();
14036
14037 int main() {
14038 dbm_open()
14039 ; return 0; }
14040 EOF
14041 if { (eval echo configure:14042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14042   rm -rf conftest*
14043   eval "ac_cv_lib_$ac_lib_var=yes"
14044 else
14045   echo "configure: failed program was:" >&5
14046   cat conftest.$ac_ext >&5
14047   rm -rf conftest*
14048   eval "ac_cv_lib_$ac_lib_var=no"
14049 fi
14050 rm -f conftest*
14051 xe_check_libs=""
14052
14053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14054   echo "$ac_t""yes" 1>&6
14055   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14056 else
14057   echo "$ac_t""no" 1>&6
14058 if test "$with_database_gdbm" = "yes"; then
14059      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14060    fi
14061    with_database_gdbm=no
14062 fi
14063
14064
14065 fi
14066
14067 if test "$with_database_dbm" != "no"; then
14068   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14069 echo "configure:14070: checking for dbm_open" >&5
14070
14071 cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 /* System header to define __stub macros and hopefully few prototypes,
14075     which can conflict with char dbm_open(); below.  */
14076 #include <assert.h>
14077 /* Override any gcc2 internal prototype to avoid an error.  */
14078 /* We use char because int might match the return type of a gcc2
14079     builtin and then its argument prototype would still apply.  */
14080 char dbm_open();
14081
14082 int main() {
14083
14084 /* The GNU C library defines this for functions which it implements
14085     to always fail with ENOSYS.  Some functions are actually named
14086     something starting with __ and the normal name is an alias.  */
14087 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14088 choke me
14089 #else
14090 dbm_open();
14091 #endif
14092
14093 ; return 0; }
14094 EOF
14095 if { (eval echo configure:14096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14096   rm -rf conftest*
14097   eval "ac_cv_func_dbm_open=yes"
14098 else
14099   echo "configure: failed program was:" >&5
14100   cat conftest.$ac_ext >&5
14101   rm -rf conftest*
14102   eval "ac_cv_func_dbm_open=no"
14103 fi
14104 rm -f conftest*
14105
14106 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14107   echo "$ac_t""yes" 1>&6
14108   with_database_dbm=yes libdbm=
14109 else
14110   echo "$ac_t""no" 1>&6
14111
14112     
14113 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14114 echo "configure:14115: checking for dbm_open in -ldbm" >&5
14115 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14116
14117 xe_check_libs=" -ldbm "
14118 cat > conftest.$ac_ext <<EOF
14119 #line 14120 "configure"
14120 #include "confdefs.h"
14121 /* Override any gcc2 internal prototype to avoid an error.  */
14122 /* We use char because int might match the return type of a gcc2
14123     builtin and then its argument prototype would still apply.  */
14124 char dbm_open();
14125
14126 int main() {
14127 dbm_open()
14128 ; return 0; }
14129 EOF
14130 if { (eval echo configure:14131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14131   rm -rf conftest*
14132   eval "ac_cv_lib_$ac_lib_var=yes"
14133 else
14134   echo "configure: failed program was:" >&5
14135   cat conftest.$ac_ext >&5
14136   rm -rf conftest*
14137   eval "ac_cv_lib_$ac_lib_var=no"
14138 fi
14139 rm -f conftest*
14140 xe_check_libs=""
14141
14142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14143   echo "$ac_t""yes" 1>&6
14144   with_database_dbm=yes libdbm=-ldbm
14145 else
14146   echo "$ac_t""no" 1>&6
14147 test "$with_database_dbm" = "yes" && \
14148         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14149       with_database_dbm=no
14150 fi
14151
14152
14153 fi
14154
14155 fi
14156
14157 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14158 test "$with_database_gdbm" = "yes" -o \
14159      "$with_database_dbm"  = "yes" && \
14160   { test "$extra_verbose" = "yes" && cat << \EOF
14161     Defining HAVE_DBM
14162 EOF
14163 cat >> confdefs.h <<\EOF
14164 #define HAVE_DBM 1
14165 EOF
14166 }
14167
14168
14169 if test "$with_database_berkdb" != "no"; then
14170   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14171 echo "configure:14172: checking for Berkeley db.h" >&5
14172   for header in "db/db.h" "db.h"; do
14173     case "$opsys" in
14174         *freebsd*)
14175     cat > conftest.$ac_ext <<EOF
14176 #line 14177 "configure"
14177 #include "confdefs.h"
14178
14179 #include <stdlib.h>
14180 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14181 #ifdef HAVE_INTTYPES_H
14182 #define __BIT_TYPES_DEFINED__
14183 #include <inttypes.h>
14184 #endif
14185 #endif
14186 #include <$header>
14187
14188 int main() {
14189
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14193   rm -rf conftest*
14194   db_h_file="$header"; break
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198 fi
14199 rm -f conftest*
14200         ;;
14201         *)
14202     cat > conftest.$ac_ext <<EOF
14203 #line 14204 "configure"
14204 #include "confdefs.h"
14205
14206 #include <stdlib.h>
14207 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14208 #ifdef HAVE_INTTYPES_H
14209 #define __BIT_TYPES_DEFINED__
14210 #include <inttypes.h>
14211 typedef uint8_t  u_int8_t;
14212 typedef uint16_t u_int16_t;
14213 typedef uint32_t u_int32_t;
14214 #ifdef WE_DONT_NEED_QUADS
14215 typedef uint64_t u_int64_t;
14216 #endif
14217 #endif
14218 #endif
14219 #include <$header>
14220
14221 int main() {
14222
14223 ; return 0; }
14224 EOF
14225 if { (eval echo configure:14226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14226   rm -rf conftest*
14227   db_h_file="$header"; break
14228 else
14229   echo "configure: failed program was:" >&5
14230   cat conftest.$ac_ext >&5
14231 fi
14232 rm -f conftest*
14233         ;;
14234         esac
14235   done
14236   if test -z "$db_h_file"
14237   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14238   else echo "$ac_t""$db_h_file" 1>&6
14239   fi
14240
14241   if test "$with_database_berkdb" != "no"; then
14242     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14243 echo "configure:14244: checking for Berkeley DB version" >&5
14244     cat > conftest.$ac_ext <<EOF
14245 #line 14246 "configure"
14246 #include "confdefs.h"
14247 #include <$db_h_file>
14248 #if DB_VERSION_MAJOR > 1
14249 yes
14250 #endif
14251
14252 EOF
14253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14254   egrep "yes" >/dev/null 2>&1; then
14255   rm -rf conftest*
14256   cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 #include <$db_h_file>
14260 #if DB_VERSION_MAJOR > 2
14261 yes
14262 #endif
14263
14264 EOF
14265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14266   egrep "yes" >/dev/null 2>&1; then
14267   rm -rf conftest*
14268   echo "$ac_t""3" 1>&6; dbfunc=db_create
14269 else
14270   rm -rf conftest*
14271   
14272     echo "$ac_t""2" 1>&6; dbfunc=db_open
14273 fi
14274 rm -f conftest*
14275
14276 else
14277   rm -rf conftest*
14278   
14279     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14280 fi
14281 rm -f conftest*
14282
14283     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14284 echo "configure:14285: checking for $dbfunc" >&5
14285
14286 cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 /* System header to define __stub macros and hopefully few prototypes,
14290     which can conflict with char $dbfunc(); below.  */
14291 #include <assert.h>
14292 /* Override any gcc2 internal prototype to avoid an error.  */
14293 /* We use char because int might match the return type of a gcc2
14294     builtin and then its argument prototype would still apply.  */
14295 char $dbfunc();
14296
14297 int main() {
14298
14299 /* The GNU C library defines this for functions which it implements
14300     to always fail with ENOSYS.  Some functions are actually named
14301     something starting with __ and the normal name is an alias.  */
14302 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14303 choke me
14304 #else
14305 $dbfunc();
14306 #endif
14307
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14311   rm -rf conftest*
14312   eval "ac_cv_func_$dbfunc=yes"
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   eval "ac_cv_func_$dbfunc=no"
14318 fi
14319 rm -f conftest*
14320
14321 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14322   echo "$ac_t""yes" 1>&6
14323   with_database_berkdb=yes need_libdb=no
14324 else
14325   echo "$ac_t""no" 1>&6
14326
14327     
14328 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14329 echo "configure:14330: checking for $dbfunc in -ldb" >&5
14330 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14331
14332 xe_check_libs=" -ldb "
14333 cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 /* Override any gcc2 internal prototype to avoid an error.  */
14337 /* We use char because int might match the return type of a gcc2
14338     builtin and then its argument prototype would still apply.  */
14339 char $dbfunc();
14340
14341 int main() {
14342 $dbfunc()
14343 ; return 0; }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14346   rm -rf conftest*
14347   eval "ac_cv_lib_$ac_lib_var=yes"
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   eval "ac_cv_lib_$ac_lib_var=no"
14353 fi
14354 rm -f conftest*
14355 xe_check_libs=""
14356
14357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14358   echo "$ac_t""yes" 1>&6
14359   with_database_berkdb=yes need_libdb=yes
14360 else
14361   echo "$ac_t""no" 1>&6
14362 fi
14363
14364
14365 fi
14366
14367   fi
14368
14369   if test "$with_database_berkdb" = "yes"; then
14370     { test "$extra_verbose" = "yes" && cat << EOF
14371     Defining DB_H_FILE = "$db_h_file"
14372 EOF
14373 cat >> confdefs.h <<EOF
14374 #define DB_H_FILE "$db_h_file"
14375 EOF
14376 }
14377
14378     { test "$extra_verbose" = "yes" && cat << \EOF
14379     Defining HAVE_BERKELEY_DB
14380 EOF
14381 cat >> confdefs.h <<\EOF
14382 #define HAVE_BERKELEY_DB 1
14383 EOF
14384 }
14385
14386     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14387   else with_database_berkdb=no
14388   fi
14389 fi
14390
14391 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14392      != "no no no"; then
14393   { test "$extra_verbose" = "yes" && cat << \EOF
14394     Defining HAVE_DATABASE
14395 EOF
14396 cat >> confdefs.h <<\EOF
14397 #define HAVE_DATABASE 1
14398 EOF
14399 }
14400
14401   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14402    echo "    xemacs will be linked with \"database.o\""
14403  fi
14404 fi
14405
14406 if test "$with_socks" = "yes"; then
14407   
14408 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14409 echo "configure:14410: checking for SOCKSinit in -lsocks" >&5
14410 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14411
14412 xe_check_libs=" -lsocks "
14413 cat > conftest.$ac_ext <<EOF
14414 #line 14415 "configure"
14415 #include "confdefs.h"
14416 /* Override any gcc2 internal prototype to avoid an error.  */
14417 /* We use char because int might match the return type of a gcc2
14418     builtin and then its argument prototype would still apply.  */
14419 char SOCKSinit();
14420
14421 int main() {
14422 SOCKSinit()
14423 ; return 0; }
14424 EOF
14425 if { (eval echo configure:14426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14426   rm -rf conftest*
14427   eval "ac_cv_lib_$ac_lib_var=yes"
14428 else
14429   echo "configure: failed program was:" >&5
14430   cat conftest.$ac_ext >&5
14431   rm -rf conftest*
14432   eval "ac_cv_lib_$ac_lib_var=no"
14433 fi
14434 rm -f conftest*
14435 xe_check_libs=""
14436
14437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14438   echo "$ac_t""yes" 1>&6
14439     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14440     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14441   { test "$extra_verbose" = "yes" && cat << EOF
14442     Defining $ac_tr_lib
14443 EOF
14444 cat >> confdefs.h <<EOF
14445 #define $ac_tr_lib 1
14446 EOF
14447 }
14448
14449   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14450
14451 else
14452   echo "$ac_t""no" 1>&6
14453 fi
14454
14455
14456   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14457     Defining HAVE_SOCKS
14458 EOF
14459 cat >> confdefs.h <<\EOF
14460 #define HAVE_SOCKS 1
14461 EOF
14462 }
14463
14464 fi
14465
14466 if test "$usage_tracking" = "yes"; then
14467   { test "$extra_verbose" = "yes" && cat << \EOF
14468     Defining USAGE_TRACKING
14469 EOF
14470 cat >> confdefs.h <<\EOF
14471 #define USAGE_TRACKING 1
14472 EOF
14473 }
14474
14475   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14476 fi
14477
14478 if test "$with_modules" != "no"; then
14479   echo "checking for module support" 1>&6
14480 echo "configure:14481: checking for module support" >&5
14481
14482     if test "$with_msw" = "yes"; then
14483     have_dl=yes;
14484   else
14485         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14486 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14487 echo "configure:14488: checking for dlfcn.h" >&5
14488
14489 cat > conftest.$ac_ext <<EOF
14490 #line 14491 "configure"
14491 #include "confdefs.h"
14492 #include <dlfcn.h>
14493 EOF
14494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14495 { (eval echo configure:14496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14497 if test -z "$ac_err"; then
14498   rm -rf conftest*
14499   eval "ac_cv_header_$ac_safe=yes"
14500 else
14501   echo "$ac_err" >&5
14502   echo "configure: failed program was:" >&5
14503   cat conftest.$ac_ext >&5
14504   rm -rf conftest*
14505   eval "ac_cv_header_$ac_safe=no"
14506 fi
14507 rm -f conftest*
14508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14509   echo "$ac_t""yes" 1>&6
14510   
14511       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14512 echo "configure:14513: checking for dlopen in -lc" >&5
14513       cat > conftest.$ac_ext <<EOF
14514 #line 14515 "configure"
14515 #include "confdefs.h"
14516 #include <dlfcn.h>
14517 int main() {
14518         dlopen ("", 0);
14519 ; return 0; }
14520 EOF
14521 if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14522   rm -rf conftest*
14523    have_dl=yes 
14524 else
14525   echo "configure: failed program was:" >&5
14526   cat conftest.$ac_ext >&5
14527   rm -rf conftest*
14528   
14529       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14530 echo "configure:14531: checking for dlopen in -ldl" >&5
14531       ac_save_LIBS="$LIBS"
14532       LIBS="-ldl $LIBS"
14533       cat > conftest.$ac_ext <<EOF
14534 #line 14535 "configure"
14535 #include "confdefs.h"
14536 #include <dlfcn.h>
14537 int main() {
14538         dlopen ("", 0);
14539 ; return 0; }
14540 EOF
14541 if { (eval echo configure:14542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14542   rm -rf conftest*
14543    have_dl=yes 
14544 else
14545   echo "configure: failed program was:" >&5
14546   cat conftest.$ac_ext >&5
14547   rm -rf conftest*
14548   LIBS="$ac_save_LIBS"
14549 fi
14550 rm -f conftest*
14551       ac_save_LIBS=
14552 fi
14553 rm -f conftest*
14554 else
14555   echo "$ac_t""no" 1>&6
14556 fi
14557
14558     if test -n "$have_dl"; then
14559       { test "$extra_verbose" = "yes" && cat << \EOF
14560     Defining HAVE_DLOPEN
14561 EOF
14562 cat >> confdefs.h <<\EOF
14563 #define HAVE_DLOPEN 1
14564 EOF
14565 }
14566
14567     else
14568       
14569 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14570 echo "configure:14571: checking for shl_load in -ldld" >&5
14571 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14572
14573 xe_check_libs=" -ldld "
14574 cat > conftest.$ac_ext <<EOF
14575 #line 14576 "configure"
14576 #include "confdefs.h"
14577 /* Override any gcc2 internal prototype to avoid an error.  */
14578 /* We use char because int might match the return type of a gcc2
14579     builtin and then its argument prototype would still apply.  */
14580 char shl_load();
14581
14582 int main() {
14583 shl_load()
14584 ; return 0; }
14585 EOF
14586 if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14587   rm -rf conftest*
14588   eval "ac_cv_lib_$ac_lib_var=yes"
14589 else
14590   echo "configure: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   rm -rf conftest*
14593   eval "ac_cv_lib_$ac_lib_var=no"
14594 fi
14595 rm -f conftest*
14596 xe_check_libs=""
14597
14598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14599   echo "$ac_t""yes" 1>&6
14600   libdl=dld have_dl=yes;
14601         { test "$extra_verbose" = "yes" && cat << \EOF
14602     Defining HAVE_SHL_LOAD
14603 EOF
14604 cat >> confdefs.h <<\EOF
14605 #define HAVE_SHL_LOAD 1
14606 EOF
14607 }
14608
14609 else
14610   echo "$ac_t""no" 1>&6
14611
14612 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14613 echo "configure:14614: checking for dld_init in -ldld" >&5
14614 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14615
14616 xe_check_libs=" -ldld "
14617 cat > conftest.$ac_ext <<EOF
14618 #line 14619 "configure"
14619 #include "confdefs.h"
14620 /* Override any gcc2 internal prototype to avoid an error.  */
14621 /* We use char because int might match the return type of a gcc2
14622     builtin and then its argument prototype would still apply.  */
14623 char dld_init();
14624
14625 int main() {
14626 dld_init()
14627 ; return 0; }
14628 EOF
14629 if { (eval echo configure:14630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14630   rm -rf conftest*
14631   eval "ac_cv_lib_$ac_lib_var=yes"
14632 else
14633   echo "configure: failed program was:" >&5
14634   cat conftest.$ac_ext >&5
14635   rm -rf conftest*
14636   eval "ac_cv_lib_$ac_lib_var=no"
14637 fi
14638 rm -f conftest*
14639 xe_check_libs=""
14640
14641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14642   echo "$ac_t""yes" 1>&6
14643   libdl=dld have_dl=yes;
14644         { test "$extra_verbose" = "yes" && cat << \EOF
14645     Defining HAVE_DLD_INIT
14646 EOF
14647 cat >> confdefs.h <<\EOF
14648 #define HAVE_DLD_INIT 1
14649 EOF
14650 }
14651
14652 else
14653   echo "$ac_t""no" 1>&6
14654 fi
14655
14656
14657 fi
14658
14659
14660     fi
14661   fi 
14662   if test -n "$have_dl"; then
14663         
14664 dll_ld=
14665 dll_ldflags=
14666 dll_cflags=
14667 dll_post=
14668 dll_ldo="-o"
14669 ld_dynamic_link_flags=
14670 xehost=$canonical
14671 xealias=$internal_configuration
14672
14673 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14674 echo "configure:14675: checking how to build dynamic libraries for ${xehost}" >&5
14675 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14676 case "$xehost" in
14677 *-*-linux-gnu*) ;;
14678 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14679 esac
14680
14681 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14682 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14683 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14684
14685 case "$xehost_os" in
14686 aix3*)
14687   # AIX sometimes has problems with the GCC collect2 program.  For some
14688   # reason, if we set the COLLECT_NAMES environment variable, the problems
14689   # vanish in a puff of smoke.
14690   if test "${COLLECT_NAMES+set}" != set; then
14691     COLLECT_NAMES=
14692     export COLLECT_NAMES
14693   fi
14694   ;;
14695 esac
14696
14697 # Now see if the compiler is really GCC.
14698 if test "$GCC" = "yes"; then
14699   XEGCC=yes
14700 else
14701   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14702 echo "configure:14703: checking checking whether we are using GNU C" >&5
14703   cat > conftest.$ac_ext <<EOF
14704 #line 14705 "configure"
14705 #include "confdefs.h"
14706
14707 #ifdef __GNUC__
14708   yes;
14709 #endif
14710
14711 EOF
14712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14713   egrep "yes" >/dev/null 2>&1; then
14714   rm -rf conftest*
14715   XEGCC=yes
14716 else
14717   rm -rf conftest*
14718   XEGCC=no
14719 fi
14720 rm -f conftest*
14721
14722   echo "$ac_t""${XEGCC}" 1>&6
14723 fi
14724
14725 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14726 echo "configure:14727: checking how to produce PIC code" >&5
14727 wl=
14728
14729 can_build_shared=yes
14730 if test "$XEGCC" = yes; then
14731   wl='-Wl,'
14732
14733   case "$xehost_os" in
14734   aix[3-9]* | irix[5-9]* | osf[3-9])
14735     # PIC is the default for these OSes.
14736     ;;
14737
14738   os2*)
14739     # We can build DLLs from non-PIC.
14740     ;;
14741   amigaos*)
14742     # FIXME: we need at least 68020 code to build shared libraries, but
14743     # adding the `-m68020' flag to GCC prevents building anything better,
14744     # like `-m68040'.
14745     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14746     ;;
14747   *cygwin* | *mingw* )
14748     # PIC is the default
14749     ;;
14750   *)
14751     dll_cflags='-fPIC'
14752     ;;
14753   esac
14754 else
14755   # PORTME Check for PIC flags for the system compiler.
14756   case "$xehost_os" in
14757   hpux9* | hpux1[0-9]*)
14758     # Is there a better link_static_flag that works with the bundled CC?
14759     wl='-Wl,'
14760     dll_cflags='+Z'
14761     ;;
14762
14763   irix[5-9]*)
14764     wl='-Wl,'
14765     # PIC (with -KPIC) is the default.
14766     ;;
14767
14768   os2*)
14769     # We can build DLLs from non-PIC.
14770     ;;
14771
14772   osf[3-9]*)
14773     # All OSF/1 code is PIC.
14774     wl='-Wl,'
14775     ;;
14776
14777   aix[3-9]*)
14778     # All AIX code is PIC.
14779     wl='-Wl,'
14780     ;;
14781
14782   sco3.2v5*)
14783     dll_cflags='-belf -Kpic'
14784     wl='-Wl,'
14785     ;;
14786
14787   unixware*)
14788     dll_cflags="-KPIC"
14789     wl="-Wl,"
14790     ;;
14791
14792   sysv4*)
14793     dll_cflags="-KPIC"
14794     wl="-Wl,"
14795     ;;
14796
14797   sysv5*)
14798     dll_cflags="-KPIC"
14799     wl="-Wl,"
14800     ;;
14801
14802   solaris2*)
14803     dll_cflags='-KPIC'
14804     wl='-Wl,'
14805     ;;
14806
14807   sunos4*)
14808     dll_cflags='-PIC'
14809     wl='-Qoption ld '
14810     ;;
14811
14812   uts4*)
14813     dll_cflags='-pic'
14814     ;;
14815
14816   *)
14817     can_build_shared=no
14818     ;;
14819   esac
14820 fi
14821
14822 if test -n "$dll_cflags"; then
14823   echo "$ac_t""${dll_cflags}" 1>&6
14824
14825   # Check to make sure the dll_cflags actually works.
14826   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14827 echo "configure:14828: checking if PIC flag ${dll_cflags} really works" >&5
14828   save_CFLAGS="$CFLAGS"
14829   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14830   cat > conftest.$ac_ext <<EOF
14831 #line 14832 "configure"
14832 #include "confdefs.h"
14833
14834 int main() {
14835 int x=0;
14836 ; return 0; }
14837 EOF
14838 if { (eval echo configure:14839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14839   rm -rf conftest*
14840   
14841     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14842     # reports no error.  So, we need to grep stderr for (Bundled).
14843     if grep '(Bundled)' config.log >/dev/null; then
14844       echo "$ac_t""no" 1>&6
14845       can_build_shared=no
14846       dll_cflags=
14847     else
14848       echo "$ac_t""yes" 1>&6
14849     fi
14850 else
14851   echo "configure: failed program was:" >&5
14852   cat conftest.$ac_ext >&5
14853   rm -rf conftest*
14854   echo "$ac_t""no" 1>&6
14855     can_build_shared=no
14856     dll_cflags=
14857 fi
14858 rm -f conftest*
14859   CFLAGS="$save_CFLAGS"
14860 else
14861   echo "$ac_t""none" 1>&6
14862 fi
14863
14864 if test "$can_build_shared" = "yes"; then
14865 cc_produces_so=no
14866 xldf=
14867 xcldf=
14868 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14869 echo "configure:14870: checking if C compiler can produce shared libraries" >&5
14870 if test "$XEGCC" = yes; then
14871   xcldf="-shared"
14872   xldf="-shared"
14873 else # Not using GCC
14874   case "$xehost_os" in
14875     aix[3-9]*)
14876       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14877       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14878       ;;
14879
14880     freebsd2* | netbsd* | openbsd*)
14881       xldf="-Bshareable"
14882       xcldf="${wl}-Bshareable"
14883       ;;
14884
14885     freebsd3*)
14886       xcldf="-shared"
14887       ;;
14888
14889     hpux*)
14890       xldf="-b +s"
14891       xcldf="${wl}-b ${wl}+s"
14892       ;;
14893
14894     irix[5-9]* | osf[3-9]*)
14895       xcldf="${wl}-shared"
14896       xldf="-shared"
14897       ;;
14898
14899     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14900       xcldf="-G"
14901       xldf="-G"
14902       ;;
14903
14904     sunos4*)
14905       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14906       xldf="-assert pure-text -Bstatic"
14907       ;;
14908   esac
14909 fi # End if if we are using gcc
14910
14911 if test -n "$xcldf"; then
14912   save_LDFLAGS=$LDFLAGS
14913   save_LIBS=$LIBS
14914   save_xe_libs=$xe_libs
14915   LDFLAGS="$xcldf $LDFLAGS"
14916   LIBS=
14917   xe_libs=
14918   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14919   cat > conftest.$ac_ext <<EOF
14920 #line 14921 "configure"
14921 #include "confdefs.h"
14922
14923 int main() {
14924 int x=0;
14925 ; return 0; }
14926 EOF
14927 if { (eval echo configure:14928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14928   rm -rf conftest*
14929   cc_produces_so=yes
14930 else
14931   echo "configure: failed program was:" >&5
14932   cat conftest.$ac_ext >&5
14933   rm -rf conftest*
14934   cc_produces_so=no
14935 fi
14936 rm -f conftest*
14937   LDFLAGS=$save_LDFLAGS
14938   LIBS=$save_LIBS
14939   xe_libs=$save_xe_libs
14940   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14941 else
14942   cc_produces_so=no
14943 fi
14944 echo "$ac_t""${cc_produces_so}" 1>&6
14945
14946 LTLD=$LD
14947 if test -z "$LTLD"; then
14948   ac_prog=ld
14949   if test "$XEGCC" = yes; then
14950     # Check if gcc -print-prog-name=ld gives a path.
14951     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14952 echo "configure:14953: checking for ld used by GCC" >&5
14953     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14954     case "$ac_prog" in
14955     # Accept absolute paths.
14956     /*)
14957       if test -z "$LTLD"; then
14958 #        case "$ac_prog" in
14959 #          *gcc-lib*) LTLD="$CC"
14960 #                     ;;
14961 #          *)
14962          LTLD="$ac_prog"
14963 #                     ;;
14964 #        esac
14965       fi
14966       ;;
14967     "")
14968       # If it fails, then pretend we aren't using GCC.
14969       ac_prog=ld
14970       ;;
14971     *)
14972       # If it is relative, then search for the first ld in PATH.
14973       with_gnu_ld=unknown
14974       ;;
14975     esac
14976   else
14977     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14978 echo "configure:14979: checking for GNU ld" >&5
14979   fi
14980
14981   if test -z "$LTLD"; then
14982     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14983     for ac_dir in $PATH; do
14984       test -z "$ac_dir" && ac_dir=.
14985       if test -f "$ac_dir/$ac_prog"; then
14986         LTLD="$ac_dir/$ac_prog"
14987         # Check to see if the program is GNU ld.  I'd rather use --version,
14988         # but apparently some GNU ld's only accept -v.
14989         # Break only if it was the GNU/non-GNU ld that we prefer.
14990         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14991           xe_gnu_ld=yes
14992         else
14993           xe_gnu_ld=no
14994         fi
14995       fi
14996     done
14997     IFS="$ac_save_ifs"
14998   fi
14999
15000   if test -n "$LTLD"; then
15001     echo "$ac_t""${LTLD}" 1>&6
15002   else
15003     echo "$ac_t""no" 1>&6
15004   fi
15005
15006   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15007     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15008     exit 1
15009   fi
15010 fi
15011
15012 ld_dynamic_link_flags=
15013
15014 # Check to see if it really is or isn't GNU ld.
15015 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15016 echo "configure:15017: checking if the linker is GNU ld" >&5
15017 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15018 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15019   xe_gnu_ld=yes
15020 else
15021   xe_gnu_ld=no
15022 fi
15023 echo "$ac_t""${xe_gnu_ld}" 1>&6
15024
15025 case "$xehost_os" in
15026   amigaos* | sunos4*)
15027     # On these operating systems, we should treat GNU ld like the system ld.
15028     gnu_ld_acts_native=yes
15029     ;;
15030   *)
15031     gnu_ld_acts_native=no
15032     ;;
15033 esac
15034
15035 if test "$cc_produces_so" = "yes"; then
15036   dll_ld=$CC
15037   dll_ldflags=$xcldf
15038   can_build_shared=yes
15039   ld_shlibs=yes
15040 else
15041   # OK - only NOW do we futz about with ld.
15042   # See if the linker supports building shared libraries.
15043   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15044 echo "configure:15045: checking whether the linker supports shared libraries" >&5
15045   dll_ld=$CC
15046   dll_ldflags=$LDFLAGS
15047   ld_shlibs=yes
15048   can_build_shared=yes
15049   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15050     # See if GNU ld supports shared libraries.
15051     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15052       dll_ld=$CC
15053       dll_ldflags="-shared"
15054       ld_shlibs=yes
15055     else
15056       ld_shlibs=no
15057     fi
15058   else
15059     # PORTME fill in a description of your system's linker (not GNU ld)
15060     case "$xehost_os" in
15061     aix3*)
15062       dll_ld=$LTLD
15063       dll_ldflags=$xldf
15064       ;;
15065
15066     aix[4-9]*)
15067       dll_ldflags=$xcldf
15068       ;;
15069
15070     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15071     # support.  Future versions do this automatically, but an explicit c++rt0.o
15072     # doesn't break anything, and helps significantly (at the cost of a little
15073     # extra space).
15074     freebsd2.2*)
15075       dll_ld=$LTLD
15076       dll_ldflags=$xldf
15077       dll_post="/usr/lib/c++rt0.o"
15078       ;;
15079
15080     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15081     freebsd2*)
15082       dll_ld=$LTLD
15083       dll_ldflags="-Bshareable"
15084       ;;
15085
15086     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15087     freebsd3*)
15088       dll_ldflags="-shared"
15089       ;;
15090
15091     hpux*)
15092       dll_ld=$LTLD
15093       dll_ldflags=$xldf
15094       ;;
15095
15096     irix[5-9]*)
15097       dll_ld=$LTLD
15098       dll_ldflags=$xldf
15099       ;;
15100
15101     netbsd*)
15102       # Tested with NetBSD 1.2 ld
15103       dll_ld=$LTLD
15104       dll_ldflags=$xldf
15105       ;;
15106
15107     openbsd*)
15108       dll_ld=$LTLD
15109       dll_ldflags=$xldf
15110       ;;
15111
15112     osf3* | osf4*)
15113       dll_ld=$LTLD
15114       dll_ldflags=$xldf
15115       ;;
15116
15117     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15118     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15119       dll_ld=$LTLD
15120       case "$dll_ld" in
15121         *gcc*) dll_ldflags="-shared"
15122                dll_ld=$CC
15123                ;;
15124         *)     dll_ldflags="-G"
15125                ;;
15126       esac
15127       ;;
15128
15129     sunos4*)
15130       if test "$XEGCC" = yes; then
15131         dll_ld=$CC
15132       else
15133         dll_ld=$LTLD
15134       fi
15135       dll_ldflags=$xldf
15136       ;;
15137
15138     uts4*)
15139       dll_ld=$LTLD
15140       dll_ldflags="-G"
15141       ;;
15142
15143     bsdi*)
15144       dll_ldflags="-r"
15145       dll_ld="shlicc2"
15146       ;;
15147
15148     *)
15149       ld_shlibs=no
15150       can_build_shared=no
15151       ;;
15152     esac
15153   fi
15154   echo "$ac_t""${ld_shlibs}" 1>&6
15155   if test "$ld_shlibs" = "no"; then
15156     can_build_shared=no
15157   fi
15158 fi # End of if cc_produces_so = no
15159
15160
15161 if test "$xe_gnu_ld" = yes; then
15162   if test "$ld_shlibs" = yes; then
15163     ld_dynamic_link_flags="${wl}-export-dynamic"
15164   fi
15165 fi
15166
15167 if test -z "$ld_dynamic_link_flags"; then
15168   case "$xehost_os" in
15169   aix[3-9]*)
15170     ld_dynamic_link_flags=
15171     ;;
15172
15173   freebsd2.2*)
15174     ld_dynamic_link_flags=
15175     ;;
15176
15177   freebsd2*)
15178     ld_dynamic_link_flags=
15179     ;;
15180
15181   freebsd3*)
15182     ld_dynamic_link_flags=
15183     ;;
15184
15185   hpux*)
15186     ld_dynamic_link_flags="${wl}-E"
15187     ;;
15188
15189   irix[5-9]*)
15190     ld_dynamic_link_flags=
15191     ;;
15192
15193   netbsd*)
15194     ld_dynamic_link_flags=
15195     ;;
15196
15197   openbsd*)
15198     ld_dynamic_link_flags=
15199     ;;
15200
15201   osf3* | osf4*)
15202     ld_dynamic_link_flags=
15203     ;;
15204
15205   solaris2* | solaris7*)
15206     ld_dynamic_link_flags=
15207     ;;
15208
15209   sco3.2v5* | unixware* | sysv5* | sysv4*)
15210     ld_dynamic_link_flags="${wl}-Bexport"
15211     ;;
15212
15213   sunos4*)
15214     ld_dynamic_link_flags=
15215     ;;
15216
15217   uts4*)
15218     ld_dynamic_link_flags=
15219     ;;
15220
15221   bsdi*)
15222     ld_dynamic_link_flags=
15223     ;;
15224
15225   esac
15226 fi # End of if -z ld_dynamic_link_flags
15227 fi # End of if test "$can_build_shared" = "yes"
15228
15229
15230
15231
15232
15233
15234
15235
15236   fi
15237
15238   if test "$can_build_shared" = "yes"; then
15239     { test "$extra_verbose" = "yes" && cat << \EOF
15240     Defining HAVE_SHLIB
15241 EOF
15242 cat >> confdefs.h <<\EOF
15243 #define HAVE_SHLIB 1
15244 EOF
15245 }
15246
15247     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15248    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15249  fi
15250     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15251     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15252     for ac_func in dlerror _dlerror
15253 do
15254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15255 echo "configure:15256: checking for $ac_func" >&5
15256
15257 cat > conftest.$ac_ext <<EOF
15258 #line 15259 "configure"
15259 #include "confdefs.h"
15260 /* System header to define __stub macros and hopefully few prototypes,
15261     which can conflict with char $ac_func(); below.  */
15262 #include <assert.h>
15263 /* Override any gcc2 internal prototype to avoid an error.  */
15264 /* We use char because int might match the return type of a gcc2
15265     builtin and then its argument prototype would still apply.  */
15266 char $ac_func();
15267
15268 int main() {
15269
15270 /* The GNU C library defines this for functions which it implements
15271     to always fail with ENOSYS.  Some functions are actually named
15272     something starting with __ and the normal name is an alias.  */
15273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15274 choke me
15275 #else
15276 $ac_func();
15277 #endif
15278
15279 ; return 0; }
15280 EOF
15281 if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15282   rm -rf conftest*
15283   eval "ac_cv_func_$ac_func=yes"
15284 else
15285   echo "configure: failed program was:" >&5
15286   cat conftest.$ac_ext >&5
15287   rm -rf conftest*
15288   eval "ac_cv_func_$ac_func=no"
15289 fi
15290 rm -f conftest*
15291
15292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15293   echo "$ac_t""yes" 1>&6
15294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15295   { test "$extra_verbose" = "yes" && cat << EOF
15296     Defining $ac_tr_func
15297 EOF
15298 cat >> confdefs.h <<EOF
15299 #define $ac_tr_func 1
15300 EOF
15301 }
15302  
15303 else
15304   echo "$ac_t""no" 1>&6
15305 fi
15306 done
15307
15308     with_modules=yes
15309   else
15310     if test "$with_modules" = "yes"; then
15311       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15312     else
15313       echo "configure: warning: "Module support cannot be provided."" 1>&2
15314     fi
15315     with_modules=no
15316   fi
15317 fi
15318
15319 cat > conftest.$ac_ext <<EOF
15320 #line 15321 "configure"
15321 #include "confdefs.h"
15322 int main(int c,char *v[]){return 0;}
15323 EOF
15324 if { (eval echo configure:15325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15325 then
15326   :
15327 else
15328   conftest_rc="$?"
15329   echo "configure: failed program was:" >&5
15330   cat conftest.$ac_ext >&5
15331   rm -fr conftest*
15332   
15333   echo ""
15334   echo "*** PANIC *** configure forgot how to build working executables!"
15335   echo ""
15336   echo "*** This is most commonly due to an unforeseen environment, causing"
15337   echo "*** configure to incorrectly compute the sequence of libraries to link."
15338   echo "*** Please examine the tail of config.log for runtime errors."
15339   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15340   echo "*** Often adding or removing explicit options in the configure"
15341   echo "*** invocation can work around this kind of problem.  If so, please"
15342   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15343   echo "***"
15344   echo "*** Other possible causes are inability to write to the file system"
15345   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15346   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15347   echo "*** necessary.  On other systems, try telling configure where to find"
15348   echo "*** the shared libraries using the --site-runtime-libraries option."
15349   echo "***"
15350   echo "*** Another way to shoot yourself in the foot is to specify"
15351   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15352   echo "*** system.  Don't do that."
15353   exit 1
15354 fi
15355 rm -fr conftest*
15356
15357 if test "$win32_processes" = "yes"; then
15358   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15359    echo "    xemacs will be linked with \"process-nt.o\""
15360  fi
15361 else
15362   { test "$extra_verbose" = "yes" && cat << \EOF
15363     Defining HAVE_UNIX_PROCESSES
15364 EOF
15365 cat >> confdefs.h <<\EOF
15366 #define HAVE_UNIX_PROCESSES 1
15367 EOF
15368 }
15369
15370   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15371    echo "    xemacs will be linked with \"process-unix.o\""
15372  fi
15373 fi
15374
15375
15376
15377 T=""
15378 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15379 CFLAGS="$T"
15380
15381
15382 T=""
15383 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15384 extra_objs="$T"
15385
15386
15387 T=""
15388 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
15389 c_switch_general="$T"
15390
15391
15392 T=""
15393 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
15394 c_switch_window_system="$T"
15395
15396
15397 T=""
15398 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15399 c_switch_all="$T"
15400
15401
15402 T=""
15403 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
15404 ld_switch_general="$T"
15405
15406
15407 T=""
15408 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15409 ld_switch_window_system="$T"
15410
15411
15412 T=""
15413 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15414 ld_switch_all="$T"
15415
15416
15417 T=""
15418 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15419 ld_libs_general="$T"
15420
15421
15422 T=""
15423 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
15424 ld_libs_window_system="$T"
15425
15426
15427 T=""
15428 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15429 ld_libs_all="$T"
15430
15431
15432
15433 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15434 internal_makefile_list="Makefile.in"
15435 SUBDIR_MAKEFILES=''
15436 test -d lock || mkdir lock
15437 for dir in $MAKE_SUBDIR; do
15438   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15439         test -d "$d" || mkdir "$d"; cd "$d"
15440       done ) ;;
15441    * ) test -d "$dir" || mkdir "$dir" ;;
15442   esac
15443   
15444 T=""
15445 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15446 SUBDIR_MAKEFILES="$T"
15447
15448   
15449 T=""
15450 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15451 internal_makefile_list="$T"
15452
15453 done
15454
15455
15456
15457
15458 for dir in src/s src/m; do
15459   if test ! -d "$dir" ; then
15460     echo Making symbolic link to "$srcdir/$dir"
15461     ${LN_S} "$srcdir/$dir" "$dir"
15462   fi
15463 done
15464
15465 if test "$extra_verbose" = "yes"; then
15466   echo ""
15467   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
15468   echo ""
15469 fi
15470
15471
15472 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15473   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15474   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15475 fi
15476
15477 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15478   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15479   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15480 fi
15481
15482 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15483   test "$extra_verbose" = "yes" && echo "creating TAGS"
15484   echo "\f
15485 $srcdir/TAGS,include" > "TAGS"
15486 fi
15487
15488 if test "$__SUNPRO_C" = "yes"; then
15489   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15490   ( echo "# For use with Sun WorkShop's Source browser."
15491     echo "# See sbquery(1) and sbinit(4) for more information"
15492     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15493   ) > .sbinit
15494 fi
15495
15496 rm -f core
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517 PREFIX=$prefix
15518 while true; do
15519   case "$PREFIX" in
15520     *\$* ) eval "PREFIX=$PREFIX" ;;
15521     *) break ;;
15522   esac
15523 done
15524
15525
15526
15527
15528 EXEC_PREFIX=$exec_prefix
15529 while true; do
15530   case "$EXEC_PREFIX" in
15531     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15532     *) break ;;
15533   esac
15534 done
15535
15536
15537
15538
15539 INFODIR=$infodir
15540 while true; do
15541   case "$INFODIR" in
15542     *\$* ) eval "INFODIR=$INFODIR" ;;
15543     *) break ;;
15544   esac
15545 done
15546
15547
15548
15549
15550 INFOPATH=$infopath
15551 while true; do
15552   case "$INFOPATH" in
15553     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15554     *) break ;;
15555   esac
15556 done
15557
15558
15559
15560
15561 PACKAGE_PATH=$package_path
15562 while true; do
15563   case "$PACKAGE_PATH" in
15564     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15565     *) break ;;
15566   esac
15567 done
15568
15569
15570
15571
15572 LISPDIR=$lispdir
15573 while true; do
15574   case "$LISPDIR" in
15575     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15576     *) break ;;
15577   esac
15578 done
15579
15580
15581
15582
15583 MODULEDIR=$moduledir
15584 while true; do
15585   case "$MODULEDIR" in
15586     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15587     *) break ;;
15588   esac
15589 done
15590
15591
15592
15593
15594 SITELISPDIR=$sitelispdir
15595 while true; do
15596   case "$SITELISPDIR" in
15597     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15598     *) break ;;
15599   esac
15600 done
15601
15602
15603
15604
15605 SITEMODULEDIR=$sitemoduledir
15606 while true; do
15607   case "$SITEMODULEDIR" in
15608     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15609     *) break ;;
15610   esac
15611 done
15612
15613
15614
15615
15616 ETCDIR=$etcdir
15617 while true; do
15618   case "$ETCDIR" in
15619     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15620     *) break ;;
15621   esac
15622 done
15623
15624
15625
15626
15627 DOCDIR=$docdir
15628 while true; do
15629   case "$DOCDIR" in
15630     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15631     *) break ;;
15632   esac
15633 done
15634
15635
15636
15637
15638 ARCHLIBDIR=$archlibdir
15639 while true; do
15640   case "$ARCHLIBDIR" in
15641     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15642     *) break ;;
15643   esac
15644 done
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15666
15667
15668
15669
15670
15671
15672
15673 : ${XEMACS_CC:=$CC}
15674
15675
15676 if test "$with_prefix" = "yes"; then
15677   { test "$extra_verbose" = "yes" && cat << \EOF
15678     Defining PREFIX_USER_DEFINED
15679 EOF
15680 cat >> confdefs.h <<\EOF
15681 #define PREFIX_USER_DEFINED 1
15682 EOF
15683 }
15684
15685 fi
15686
15687 if test "$with_site_lisp" = "no"; then
15688   { test "$extra_verbose" = "yes" && cat << \EOF
15689     Defining INHIBIT_SITE_LISP
15690 EOF
15691 cat >> confdefs.h <<\EOF
15692 #define INHIBIT_SITE_LISP 1
15693 EOF
15694 }
15695
15696 fi
15697 if test "$with_site_modules" = "no"; then
15698   { test "$extra_verbose" = "yes" && cat << \EOF
15699     Defining INHIBIT_SITE_MODULES
15700 EOF
15701 cat >> confdefs.h <<\EOF
15702 #define INHIBIT_SITE_MODULES 1
15703 EOF
15704 }
15705
15706 fi
15707
15708
15709 T=""
15710 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15711 ac_configure_args="$T"
15712
15713 { test "$extra_verbose" = "yes" && cat << EOF
15714     Defining EMACS_CONFIGURATION = "$configuration"
15715 EOF
15716 cat >> confdefs.h <<EOF
15717 #define EMACS_CONFIGURATION "$configuration"
15718 EOF
15719 }
15720
15721 { test "$extra_verbose" = "yes" && cat << EOF
15722     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15723 EOF
15724 cat >> confdefs.h <<EOF
15725 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15726 EOF
15727 }
15728
15729
15730
15731 null_string=""
15732 { test "$extra_verbose" = "yes" && cat << EOF
15733     Defining LD_SWITCH_X_SITE = $null_string
15734 EOF
15735 cat >> confdefs.h <<EOF
15736 #define LD_SWITCH_X_SITE $null_string
15737 EOF
15738 }
15739
15740 { test "$extra_verbose" = "yes" && cat << EOF
15741     Defining LD_SWITCH_X_SITE_AUX = $null_string
15742 EOF
15743 cat >> confdefs.h <<EOF
15744 #define LD_SWITCH_X_SITE_AUX $null_string
15745 EOF
15746 }
15747
15748 { test "$extra_verbose" = "yes" && cat << EOF
15749     Defining C_SWITCH_X_SITE = $null_string
15750 EOF
15751 cat >> confdefs.h <<EOF
15752 #define C_SWITCH_X_SITE $null_string
15753 EOF
15754 }
15755
15756 { test "$extra_verbose" = "yes" && cat << EOF
15757     Defining LD_SWITCH_SITE = $null_string
15758 EOF
15759 cat >> confdefs.h <<EOF
15760 #define LD_SWITCH_SITE $null_string
15761 EOF
15762 }
15763
15764 { test "$extra_verbose" = "yes" && cat << EOF
15765     Defining C_SWITCH_SITE = $null_string
15766 EOF
15767 cat >> confdefs.h <<EOF
15768 #define C_SWITCH_SITE $null_string
15769 EOF
15770 }
15771
15772
15773
15774 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15775     Defining GNU_MALLOC
15776 EOF
15777 cat >> confdefs.h <<\EOF
15778 #define GNU_MALLOC 1
15779 EOF
15780 }
15781
15782 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15783     Defining USE_SYSTEM_MALLOC
15784 EOF
15785 cat >> confdefs.h <<\EOF
15786 #define USE_SYSTEM_MALLOC 1
15787 EOF
15788 }
15789
15790 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15791     Defining USE_DEBUG_MALLOC
15792 EOF
15793 cat >> confdefs.h <<\EOF
15794 #define USE_DEBUG_MALLOC 1
15795 EOF
15796 }
15797
15798                                               { test "$extra_verbose" = "yes" && cat << \EOF
15799     Defining USE_SYSTEM_MALLOC
15800 EOF
15801 cat >> confdefs.h <<\EOF
15802 #define USE_SYSTEM_MALLOC 1
15803 EOF
15804 }
15805
15806 fi
15807 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15808     Defining I18N3
15809 EOF
15810 cat >> confdefs.h <<\EOF
15811 #define I18N3 1
15812 EOF
15813 }
15814
15815 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15816     Defining USE_GCC
15817 EOF
15818 cat >> confdefs.h <<\EOF
15819 #define USE_GCC 1
15820 EOF
15821 }
15822
15823 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15824     Defining EXTERNAL_WIDGET
15825 EOF
15826 cat >> confdefs.h <<\EOF
15827 #define EXTERNAL_WIDGET 1
15828 EOF
15829 }
15830
15831 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15832     Defining QUICK_BUILD
15833 EOF
15834 cat >> confdefs.h <<\EOF
15835 #define QUICK_BUILD 1
15836 EOF
15837 }
15838
15839 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15840     Defining PURIFY
15841 EOF
15842 cat >> confdefs.h <<\EOF
15843 #define PURIFY 1
15844 EOF
15845 }
15846
15847 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15848     Defining QUANTIFY
15849 EOF
15850 cat >> confdefs.h <<\EOF
15851 #define QUANTIFY 1
15852 EOF
15853 }
15854
15855 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15856     Defining MAIL_USE_POP
15857 EOF
15858 cat >> confdefs.h <<\EOF
15859 #define MAIL_USE_POP 1
15860 EOF
15861 }
15862
15863 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15864     Defining KERBEROS
15865 EOF
15866 cat >> confdefs.h <<\EOF
15867 #define KERBEROS 1
15868 EOF
15869 }
15870
15871 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15872     Defining HESIOD
15873 EOF
15874 cat >> confdefs.h <<\EOF
15875 #define HESIOD 1
15876 EOF
15877 }
15878
15879 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15880     Defining USE_UNION_TYPE
15881 EOF
15882 cat >> confdefs.h <<\EOF
15883 #define USE_UNION_TYPE 1
15884 EOF
15885 }
15886
15887 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15888     Defining PDUMP
15889 EOF
15890 cat >> confdefs.h <<\EOF
15891 #define PDUMP 1
15892 EOF
15893 }
15894
15895 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15896     Defining IPV6_CANONICALIZE
15897 EOF
15898 cat >> confdefs.h <<\EOF
15899 #define IPV6_CANONICALIZE 1
15900 EOF
15901 }
15902
15903
15904
15905 (
15906 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15907 else
15908   echo "uname -a: `uname -a`"
15909 fi
15910 echo ""
15911 echo "$0 $quoted_arguments"
15912 ) > Installation
15913
15914 if test ! -z ${emacs_beta_version} ; then
15915   if test -z "${emacs_is_beta}" ; then
15916         xemacs_betaname=".${emacs_beta_version}"
15917   else
15918         xemacs_betaname="-b${emacs_beta_version}"
15919   fi
15920 else
15921   xemacs_betaname=""
15922 fi
15923
15924 (
15925 echo "
15926
15927 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15928 "
15929 echo "
15930 Compilation / Installation:"
15931 echo "  Source code location:              $srcdir"
15932 echo "  Installation prefix:               $prefix"
15933 if test -n "$site_includes"; then
15934   echo "  Additional header files:           $site_includes"
15935 fi
15936 if test -n "$site_libraries"; then
15937   echo "  Additional libraries:              $site_libraries"
15938 fi
15939 if test -n "$site_prefixes"; then
15940   echo "  Additional prefixes:               $site_prefixes"
15941 fi
15942 if test -n "$runpath"; then
15943   echo "  Runtime library search path:       $runpath"
15944 fi
15945
15946 if test -n "$opsysfile"
15947 then echo "  Operating system description file: \`$opsysfile'"
15948 else echo "  Not using any operating system description file"
15949 fi
15950 if test -n "$machfile"
15951 then echo "  Machine description file:          \`$machfile'"
15952 else echo "  Not using any machine description file"
15953 fi
15954
15955 echo "  Compiler:                          $CC $CFLAGS"
15956 echo "  Relocating allocator for buffers:  $rel_alloc"
15957 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15958 case "$ld_switch_site" in
15959   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15960     - Consider configuring with --pdump." ;;
15961 esac
15962
15963 echo "
15964 Window System:"
15965 if test "$with_msw" = "yes"; then
15966   echo "  Compiling in support for the Microsoft window system."
15967 fi
15968 if test "$with_x11" = "yes"; then
15969   echo "  Compiling in support for the X window system:"
15970   echo "    - X Windows headers location:                 $x_includes"
15971   echo "    - X Windows libraries location:               $x_libraries"
15972   if test "$with_xauth" != yes; then
15973     echo "    - Xau (X authority) not available."
15974   fi
15975   if test "$with_xmu" != yes; then
15976     echo "    - Xmu library not available; substituting equivalent routines."
15977   fi
15978   if test "$with_wmcommand" != no; then
15979     echo "    - Handling WM_COMMAND properly."
15980   fi
15981 fi
15982 if test "$need_athena" = "yes"; then
15983   echo "  Compiling in support for the Athena widget set:"
15984   echo "    - Athena headers location:                    $athena_h_path"
15985   echo "    - Athena library to link:                     $athena_lib"
15986 fi
15987 case "$with_menubars" in
15988   gtk   ) echo "  Using GTK menubars."   ;;
15989   lucid ) echo "  Using Lucid menubars." ;;
15990   motif ) echo "  Using Motif menubars."
15991           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15992           echo "             We recommend using the Lucid menubar instead."
15993           echo "             Re-run configure with --with-menubars='lucid'." ;;
15994     msw ) echo "  Using MS-Windows menubars." ;;
15995 esac
15996 case "$with_scrollbars" in
15997   gtk    ) echo "  Using GTK scrollbars."        ;;
15998   lucid  ) echo "  Using Lucid scrollbars."      ;;
15999   motif  ) echo "  Using Motif scrollbars."      ;;
16000   athena ) echo "  Using Athena scrollbars."     ;;
16001      msw ) echo "  Using MS-Windows scrollbars." ;;
16002 esac
16003 case "$with_dialogs" in
16004   gtk    ) echo "  Using GTK dialog boxes." ;;
16005   motif  ) echo "  Using Motif dialog boxes."
16006            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16007              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16008              echo "             We recommend using the Athena dialog boxes instead."
16009              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16010              echo "             Read the PROBLEMS file for more information."
16011            fi; fi ;;
16012   athena ) echo "  Using Athena dialog boxes."     ;;
16013      msw ) echo "  Using MS-Windows dialog boxes." ;;
16014 esac
16015 case "$with_widgets" in
16016   gtk    ) echo "  Using GTK native widgets."        ;;
16017   motif  ) echo "  Using Motif native widgets."      ;;
16018   athena ) echo "  Using Athena native widgets."     ;;
16019      msw ) echo "  Using MS-Windows native widgets." ;;
16020 esac
16021 if test "$with_dragndrop" = yes; then
16022   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16023   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16024 fi
16025
16026 echo "
16027 TTY:"
16028 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16029 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16030
16031 echo "
16032 Images:"
16033 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16034 if test "$with_xpm" = yes; then
16035   echo "  Compiling in support for XPM  images."
16036 elif test "$with_x11" = yes; then
16037   echo "  WARNING: -----------------------------------------------------------"
16038   echo "  WARNING: Compiling without XPM image support."
16039   if test "$xpm_problem" != ""; then
16040     echo "  Reason: $xpm_problem"
16041   fi
16042   echo "  WARNING: You should strongly consider installing XPM."
16043   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16044   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16045   echo "  WARNING: -----------------------------------------------------------"
16046 fi
16047 if test "$with_png" = yes; then
16048   echo "  Compiling in support for PNG  images."
16049 elif test "$window_system" != "none"; then
16050   echo "  WARNING: -----------------------------------------------------------"
16051   echo "  WARNING: Compiling without PNG image support."
16052   if test "$png_problem" != ""; then
16053     echo "  Reason: $png_problem"
16054   fi
16055   echo "  WARNING: You should strongly consider installing the PNG libraries."
16056   echo "  WARNING: Otherwise certain images and glyphs may not display."
16057   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16058   echo "  WARNING: -----------------------------------------------------------"
16059 fi
16060 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16061 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16062 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16063
16064 echo "
16065 Sound:"
16066 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16067 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16068 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16069 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16070
16071 echo "
16072 Databases:"
16073 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16074 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16075 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16076 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16077 if test "$with_postgresql" = yes; then
16078   echo "  Compiling in support for PostgreSQL."
16079   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16080   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16081 fi
16082
16083 echo "
16084 Internationalization:"
16085 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16086 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16087 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16088 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16089 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16090 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16091 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16092 if test "$with_wnn" = yes; then
16093   echo "  Compiling in support for the WNN input method on Mule."
16094   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16095 fi
16096 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16097
16098 echo "
16099 Mail:"
16100 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16101 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16102 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16103 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16104
16105 echo "
16106 Other Features:"
16107 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16108 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16109 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16110 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16111 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16112 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16113 if test "$use_union_type" = yes; then
16114   echo "  WARNING: ---------------------------------------------------------"
16115   echo "  Using the union type for Lisp_Objects."
16116   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16117   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16118   echo "  WARNING: ---------------------------------------------------------"
16119 fi
16120 test "$pdump" = yes && echo "  Using the new portable dumper."
16121 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16122 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16123 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16124   != "no no no no no no"; then
16125   echo "  WARNING: ---------------------------------------------------------"
16126   echo "  WARNING: Compiling in support for runtime error checking."
16127   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16128   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16129   echo "  WARNING: ---------------------------------------------------------"
16130 fi
16131 echo ""
16132 ) | tee -a Installation
16133 echo ""
16134
16135
16136 # Remove any trailing slashes in these variables.
16137 test -n "$prefix" &&
16138   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16139 test -n "$exec_prefix" &&
16140   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16141
16142
16143 for file in $internal_makefile_list; do
16144   test "$file" = src/Makefile.in && \
16145     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16146   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16147 done
16148 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16149 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
16150
16151 trap '' 1 2 15
16152
16153 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16154
16155 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16156 # Let make expand exec_prefix.
16157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16158
16159 # Any assignment to VPATH causes Sun make to only execute
16160 # the first set of double-colon rules, so remove it if not needed.
16161 # If there is a colon in the path, we need to keep it.
16162 if test "x$srcdir" = x.; then
16163   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16164 fi
16165
16166 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16167
16168 DEFS=-DHAVE_CONFIG_H
16169
16170 # Without the "./", some shells look in PATH for config.status.
16171 : ${CONFIG_STATUS=./config.status}
16172
16173 echo creating $CONFIG_STATUS
16174 rm -f $CONFIG_STATUS
16175 cat > $CONFIG_STATUS <<EOF
16176 #! /bin/sh
16177 # Generated automatically by configure.
16178 # Run this file to recreate the current configuration.
16179 # This directory was configured as follows,
16180 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16181 #
16182 # $0 $ac_configure_args
16183 #
16184 # Compiler output produced by configure, useful for debugging
16185 # configure, is in ./config.log if it exists.
16186
16187 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16188 for ac_option
16189 do
16190   case "\$ac_option" in
16191   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16192     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16193     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16194   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16195     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16196     exit 0 ;;
16197   -help | --help | --hel | --he | --h)
16198     echo "\$ac_cs_usage"; exit 0 ;;
16199   *) echo "\$ac_cs_usage"; exit 1 ;;
16200   esac
16201 done
16202
16203 ac_given_srcdir=$srcdir
16204 ac_given_INSTALL="$INSTALL"
16205
16206 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16207 EOF
16208 cat >> $CONFIG_STATUS <<EOF
16209
16210 # Protect against being on the right side of a sed subst in config.status.
16211 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16212  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16213 $ac_vpsub
16214 $extrasub
16215 s%@SHELL@%$SHELL%g
16216 s%@CFLAGS@%$CFLAGS%g
16217 s%@CPPFLAGS@%$CPPFLAGS%g
16218 s%@CXXFLAGS@%$CXXFLAGS%g
16219 s%@FFLAGS@%$FFLAGS%g
16220 s%@DEFS@%$DEFS%g
16221 s%@LDFLAGS@%$LDFLAGS%g
16222 s%@LIBS@%$LIBS%g
16223 s%@exec_prefix@%$exec_prefix%g
16224 s%@prefix@%$prefix%g
16225 s%@program_transform_name@%$program_transform_name%g
16226 s%@bindir@%$bindir%g
16227 s%@sbindir@%$sbindir%g
16228 s%@libexecdir@%$libexecdir%g
16229 s%@datadir@%$datadir%g
16230 s%@sysconfdir@%$sysconfdir%g
16231 s%@sharedstatedir@%$sharedstatedir%g
16232 s%@localstatedir@%$localstatedir%g
16233 s%@libdir@%$libdir%g
16234 s%@includedir@%$includedir%g
16235 s%@oldincludedir@%$oldincludedir%g
16236 s%@infodir@%$infodir%g
16237 s%@mandir@%$mandir%g
16238 s%@LN_S@%$LN_S%g
16239 s%@blddir@%$blddir%g
16240 s%@CC@%$CC%g
16241 s%@CPP@%$CPP%g
16242 s%@start_flags@%$start_flags%g
16243 s%@ld_switch_shared@%$ld_switch_shared%g
16244 s%@start_files@%$start_files%g
16245 s%@ld@%$ld%g
16246 s%@lib_gcc@%$lib_gcc%g
16247 s%@RANLIB@%$RANLIB%g
16248 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16249 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16250 s%@INSTALL_DATA@%$INSTALL_DATA%g
16251 s%@YACC@%$YACC%g
16252 s%@SET_MAKE@%$SET_MAKE%g
16253 s%@GTK_CONFIG@%$GTK_CONFIG%g
16254 s%@X_CFLAGS@%$X_CFLAGS%g
16255 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16256 s%@X_LIBS@%$X_LIBS%g
16257 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16258 s%@install_pp@%$install_pp%g
16259 s%@libs_xauth@%$libs_xauth%g
16260 s%@dnd_objs@%$dnd_objs%g
16261 s%@lwlib_objs@%$lwlib_objs%g
16262 s%@ALLOCA@%$ALLOCA%g
16263 s%@have_esd_config@%$have_esd_config%g
16264 s%@dll_ld@%$dll_ld%g
16265 s%@dll_cflags@%$dll_cflags%g
16266 s%@dll_ldflags@%$dll_ldflags%g
16267 s%@dll_post@%$dll_post%g
16268 s%@dll_ldo@%$dll_ldo%g
16269 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16270 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16271 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16272 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16273 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16274 s%@PROGNAME@%$PROGNAME%g
16275 s%@version@%$version%g
16276 s%@configuration@%$configuration%g
16277 s%@canonical@%$canonical%g
16278 s%@inststaticdir@%$inststaticdir%g
16279 s%@instvardir@%$instvardir%g
16280 s%@srcdir@%$srcdir%g
16281 s%@pkgdir@%$pkgdir%g
16282 s%@statedir@%$statedir%g
16283 s%@extra_includes@%$extra_includes%g
16284 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16285 s%@PREFIX@%$PREFIX%g
16286 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16287 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16288 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16289 s%@INFODIR@%$INFODIR%g
16290 s%@infopath@%$infopath%g
16291 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16292 s%@INFOPATH@%$INFOPATH%g
16293 s%@package_path@%$package_path%g
16294 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16295 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16296 s%@lispdir@%$lispdir%g
16297 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16298 s%@LISPDIR@%$LISPDIR%g
16299 s%@moduledir@%$moduledir%g
16300 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16301 s%@MODULEDIR@%$MODULEDIR%g
16302 s%@sitelispdir@%$sitelispdir%g
16303 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16304 s%@SITELISPDIR@%$SITELISPDIR%g
16305 s%@sitemoduledir@%$sitemoduledir%g
16306 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16307 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16308 s%@etcdir@%$etcdir%g
16309 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16310 s%@ETCDIR@%$ETCDIR%g
16311 s%@docdir@%$docdir%g
16312 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16313 s%@DOCDIR@%$DOCDIR%g
16314 s%@archlibdir@%$archlibdir%g
16315 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16316 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16317 s%@bitmapdir@%$bitmapdir%g
16318 s%@extra_objs@%$extra_objs%g
16319 s%@machfile@%$machfile%g
16320 s%@opsysfile@%$opsysfile%g
16321 s%@c_switch_general@%$c_switch_general%g
16322 s%@c_switch_window_system@%$c_switch_window_system%g
16323 s%@c_switch_all@%$c_switch_all%g
16324 s%@ld_switch_general@%$ld_switch_general%g
16325 s%@ld_switch_window_system@%$ld_switch_window_system%g
16326 s%@ld_switch_all@%$ld_switch_all%g
16327 s%@ld_libs_general@%$ld_libs_general%g
16328 s%@ld_libs_window_system@%$ld_libs_window_system%g
16329 s%@ld_libs_all@%$ld_libs_all%g
16330 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16331 s%@native_sound_lib@%$native_sound_lib%g
16332 s%@sound_cflags@%$sound_cflags%g
16333 s%@dynodump_arch@%$dynodump_arch%g
16334 s%@XEMACS_CC@%$XEMACS_CC%g
16335 s%@internal_makefile_list@%$internal_makefile_list%g
16336
16337 CEOF
16338 EOF
16339
16340 cat >> $CONFIG_STATUS <<\EOF
16341
16342 # Split the substitutions into bite-sized pieces for seds with
16343 # small command number limits, like on Digital OSF/1 and HP-UX.
16344 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16345 ac_file=1 # Number of current file.
16346 ac_beg=1 # First line for current file.
16347 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16348 ac_more_lines=:
16349 ac_sed_cmds=""
16350 while $ac_more_lines; do
16351   if test $ac_beg -gt 1; then
16352     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16353   else
16354     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16355   fi
16356   if test ! -s conftest.s$ac_file; then
16357     ac_more_lines=false
16358     rm -f conftest.s$ac_file
16359   else
16360     if test -z "$ac_sed_cmds"; then
16361       ac_sed_cmds="sed -f conftest.s$ac_file"
16362     else
16363       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16364     fi
16365     ac_file=`expr $ac_file + 1`
16366     ac_beg=$ac_end
16367     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16368   fi
16369 done
16370 if test -z "$ac_sed_cmds"; then
16371   ac_sed_cmds=cat
16372 fi
16373 EOF
16374
16375 cat >> $CONFIG_STATUS <<EOF
16376
16377 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16378 EOF
16379 cat >> $CONFIG_STATUS <<\EOF
16380 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16381   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16382   case "$ac_file" in
16383   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16384        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16385   *) ac_file_in="${ac_file}.in" ;;
16386   esac
16387
16388   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16389
16390   # Remove last slash and all that follows it.  Not all systems have dirname.
16391   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16392   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16393     # The file is in a subdirectory.
16394     test ! -d "$ac_dir" && mkdir "$ac_dir"
16395     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16396     # A "../" for each directory in $ac_dir_suffix.
16397     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16398   else
16399     ac_dir_suffix= ac_dots=
16400   fi
16401
16402   case "$ac_given_srcdir" in
16403   .)  srcdir=.
16404       if test -z "$ac_dots"; then top_srcdir=.
16405       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16406   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16407   *) # Relative path.
16408     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16409     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16410   esac
16411
16412   case "$ac_given_INSTALL" in
16413   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16414   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16415   esac
16416
16417   echo creating "$ac_file"
16418   rm -f "$ac_file"
16419   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16420   case "$ac_file" in
16421   *Makefile*) ac_comsub="1i\\
16422 # $configure_input" ;;
16423   *) ac_comsub= ;;
16424   esac
16425
16426   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16427   sed -e "$ac_comsub
16428 s%@configure_input@%$configure_input%g
16429 s%@srcdir@%$srcdir%g
16430 s%@top_srcdir@%$top_srcdir%g
16431 s%@INSTALL@%$INSTALL%g
16432 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16433 fi; done
16434 rm -f conftest.s*
16435
16436 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16437 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16438 #
16439 # ac_d sets the value in "#define NAME VALUE" lines.
16440 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16441 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16442 ac_dC='\3'
16443 ac_dD='%g'
16444 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16445 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16446 ac_uB='\([      ]\)%\1#\2define\3'
16447 ac_uC=' '
16448 ac_uD='\4%g'
16449 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16450 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16451 ac_eB='$%\1#\2define\3'
16452 ac_eC=' '
16453 ac_eD='%g'
16454
16455 if test "${CONFIG_HEADERS+set}" != set; then
16456 EOF
16457 cat >> $CONFIG_STATUS <<EOF
16458   CONFIG_HEADERS="src/config.h lwlib/config.h"
16459 EOF
16460 cat >> $CONFIG_STATUS <<\EOF
16461 fi
16462 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16463   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16464   case "$ac_file" in
16465   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16466        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16467   *) ac_file_in="${ac_file}.in" ;;
16468   esac
16469
16470   echo creating $ac_file
16471
16472   rm -f conftest.frag conftest.in conftest.out
16473   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16474   cat $ac_file_inputs > conftest.in
16475
16476 EOF
16477
16478 # Transform confdefs.h into a sed script conftest.vals that substitutes
16479 # the proper values into config.h.in to produce config.h.  And first:
16480 # Protect against being on the right side of a sed subst in config.status.
16481 # Protect against being in an unquoted here document in config.status.
16482 rm -f conftest.vals
16483 cat > conftest.hdr <<\EOF
16484 s/[\\&%]/\\&/g
16485 s%[\\$`]%\\&%g
16486 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16487 s%ac_d%ac_u%gp
16488 s%ac_u%ac_e%gp
16489 EOF
16490 sed -n -f conftest.hdr confdefs.h > conftest.vals
16491 rm -f conftest.hdr
16492
16493 # This sed command replaces #undef with comments.  This is necessary, for
16494 # example, in the case of _POSIX_SOURCE, which is predefined and required
16495 # on some systems where configure will not decide to define it.
16496 cat >> conftest.vals <<\EOF
16497 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16498 EOF
16499
16500 # Break up conftest.vals because some shells have a limit on
16501 # the size of here documents, and old seds have small limits too.
16502
16503 rm -f conftest.tail
16504 while :
16505 do
16506   ac_lines=`grep -c . conftest.vals`
16507   # grep -c gives empty output for an empty file on some AIX systems.
16508   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16509   # Write a limited-size here document to conftest.frag.
16510   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16511   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16512   echo 'CEOF
16513   sed -f conftest.frag conftest.in > conftest.out
16514   rm -f conftest.in
16515   mv conftest.out conftest.in
16516 ' >> $CONFIG_STATUS
16517   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16518   rm -f conftest.vals
16519   mv conftest.tail conftest.vals
16520 done
16521 rm -f conftest.vals
16522
16523 cat >> $CONFIG_STATUS <<\EOF
16524   rm -f conftest.frag conftest.h
16525   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16526   cat conftest.in >> conftest.h
16527   rm -f conftest.in
16528   if cmp -s $ac_file conftest.h 2>/dev/null; then
16529     echo "$ac_file is unchanged"
16530     rm -f conftest.h
16531   else
16532     # Remove last slash and all that follows it.  Not all systems have dirname.
16533       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16534       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16535       # The file is in a subdirectory.
16536       test ! -d "$ac_dir" && mkdir "$ac_dir"
16537     fi
16538     rm -f $ac_file
16539     mv conftest.h $ac_file
16540   fi
16541 fi; done
16542
16543 EOF
16544 cat >> $CONFIG_STATUS <<EOF
16545 CPP="$CPP"
16546  top_srcdir="$srcdir"
16547  MAKE_SUBDIR="$MAKE_SUBDIR"
16548
16549 EOF
16550 cat >> $CONFIG_STATUS <<\EOF
16551 for dir in . $MAKE_SUBDIR; do
16552   (
16553     cd $dir
16554     rm -f junk.c
16555     < Makefile.in \
16556       sed -e '/^# Generated/d' \
16557           -e 's%/\*\*/#.*%%' \
16558           -e 's/^ *# */#/' \
16559           -e '/^##/d' \
16560           -e '/^#/ {
16561 p
16562 d
16563 }'        \
16564           -e '/./ {
16565 s/\([\"]\)/\\\1/g
16566 s/^/"/
16567 s/$/"/
16568 }'  > junk.c;
16569
16570
16571
16572     echo creating $dir/Makefile
16573 $CPP -I. -I${top_srcdir}/src  junk.c \
16574   | sed -e 's/^\#.*//'          \
16575         -e 's/^[        ][      ]*$//'\
16576         -e 's/^ /       /'              \
16577         -e '/^[ \f]*$/d' \
16578         -e '/^\"/ {
16579         s/\\\([\"]\)/\1/g
16580         s/^[    ]*\"//
16581         s/\"[   ]*$//
16582 }' > Makefile.new
16583     chmod 444 Makefile.new
16584     mv -f Makefile.new Makefile
16585
16586     echo creating $dir/GNUmakefile
16587 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16588   | sed -e 's/^\#.*//'          \
16589         -e 's/^[        ][      ]*$//'\
16590         -e 's/^ /       /'              \
16591         -e '/^[ \f]*$/d' \
16592         -e '/^\"/ {
16593         s/\\\([\"]\)/\1/g
16594         s/^[    ]*\"//
16595         s/\"[   ]*$//
16596 }' > Makefile.new
16597     chmod 444 Makefile.new
16598     mv -f Makefile.new GNUmakefile
16599
16600     rm -f junk.c
16601   )
16602 done
16603
16604 sed < config.status >> lib-src/config.values \
16605   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16606   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16607   -e 's/^\([^ ]*\) $/\1 ""/' \
16608   -e 's/ 1$/ t/'
16609
16610
16611 exit 0
16612 EOF
16613 chmod +x $CONFIG_STATUS
16614 rm -fr confdefs* $ac_clean_files
16615 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1