XEmacs 21.4.6 "Common Lisp".
[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="no"
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_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 )
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             g | gt | gtk )                              val=gtk    ;;
746             ms | msw )                                  val=msw    ;;
747             * ) (echo "$progname: Usage error:"
748 echo " " "The \`--$optname' option must have one of these values:
749   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
750 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
751           esac
752           eval "$opt=\"$val\""
753         ;;
754
755                 "use_minimal_tagbits" | \
756         "use_indexed_lrecord_implementation" | \
757         "run_in_place"  | \
758         "const_is_losing" | \
759         "with_gnu_make" )
760           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
761         ;;
762
763                 * ) (echo "$progname: Usage error:"
764 echo " " "Unrecognized option: $arg"
765 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
766
767       esac
768     ;;
769
770         *-*-*) configuration="$arg" ;;
771
772         *) (echo "$progname: Usage error:"
773 echo " " "Unrecognized argument: $arg"
774 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
775
776   esac
777 done
778
779
780 test -n "$cpp"      && CPP="$cpp"
781 test -n "$cppflags" && CPPFLAGS="$cppflags"
782 test -n "$libs"     && LIBS="$libs"
783 test -n "$ldflags"  && LDFLAGS="$ldflags"
784
785 eval set x "$quoted_arguments"; shift
786
787 test "$extra_verbose" = "yes" && verbose=yes
788
789 test -n "$with_x" && with_x11="$with_x"
790
791 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
792   test "$with_system_malloc" = "default" && with_system_malloc=yes
793 fi
794
795
796
797 if test "$with_cde $with_tooltalk" = "yes no"; then
798   (echo "$progname: Usage error:"
799 echo " " "--with-cde requires --with-tooltalk"
800 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
801 elif test "$with_tooltalk" = "no" ; then with_cde=no
802 elif test "$with_cde" = "yes"; then with_tooltalk=yes
803 fi
804
805
806 case "$srcdir" in
807
808     "" )
809     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
810       if test -f "$dir/src/lisp.h" -a \
811               -f "$dir/lisp/version.el" ; then
812         srcdir="$dir"
813         break
814       fi
815     done
816     if test -z "$srcdir" ; then
817       (echo "$progname: Usage error:"
818 echo " " "Neither the current directory nor its parent seem to
819   contain the XEmacs sources.  If you do not want to build XEmacs in its
820   source tree, you should run \`$progname' in the directory in which
821   you wish to build XEmacs, using the \`--srcdir' option to say where the
822   sources may be found."
823 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
824     fi
825   ;;
826
827     * )
828     if test ! -f "$srcdir/src/lisp.h" -o \
829             ! -f "$srcdir/lisp/version.el" ; then
830       (echo "$progname: Usage error:"
831 echo " " "The directory specified with the \`--srcdir' option,
832   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
833   either run the \`$progname' script at the top of the XEmacs source
834   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
835 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
836     fi
837   ;;
838 esac
839
840 if test -z "$configuration"; then
841     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
842   if test -z "$configuration"; then
843     (echo "$progname: Usage error:"
844 echo " " "XEmacs has not been ported to this host type.
845 Try explicitly specifying the CONFIGURATION when rerunning configure."
846 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
847   fi
848 fi
849
850 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
851 echo "configure:852: checking whether ln -s works" >&5
852
853 rm -f conftestdata
854 if ln -s X conftestdata 2>/dev/null
855 then
856   rm -f conftestdata
857   ac_cv_prog_LN_S="ln -s"
858 else
859   ac_cv_prog_LN_S=ln
860 fi
861 LN_S="$ac_cv_prog_LN_S"
862 if test "$ac_cv_prog_LN_S" = "ln -s"; then
863   echo "$ac_t""yes" 1>&6
864 else
865   echo "$ac_t""no" 1>&6
866 fi
867
868
869 for dir in lisp etc man info tests; do
870   if test ! -d "$dir" ; then
871     echo Making symbolic link to "$srcdir/$dir"
872     ${LN_S} "$srcdir/$dir" "$dir"
873   fi
874 done
875
876
877 absolute_pwd="`pwd`";
878 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
879 then blddir="$PWD"
880 else blddir="$absolute_pwd"; if test -d "/net"; then
881   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
882   blddir=`echo "$blddir" | \
883    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
884 fi
885 fi
886
887
888 case "$srcdir" in
889   /* ) ;;
890   .  ) srcdir="$blddir" ;;
891   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
892   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
893   srcdir=`echo "$srcdir" | \
894    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
895 fi ;;
896 esac
897
898 if test `pwd` != `sh -c cd $srcdir && pwd`  \
899    && test -f "$srcdir/src/config.h"; then
900   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
901    echo "   as a build directory right now; it has been configured in its own"
902    echo "   right.  To configure in another directory as well, you MUST"
903    echo "   use GNU make.  If you do not have GNU make, then you must"
904    echo "   now do \`make distclean' in $srcdir,"
905    echo "   and then run $progname again.") >&2
906   extrasub='/^VPATH[     ]*=/c\
907 vpath %.c $(srcdir)\
908 vpath %.h $(srcdir)\
909 vpath %.y $(srcdir)\
910 vpath %.l $(srcdir)\
911 vpath %.s $(srcdir)\
912 vpath %.in $(srcdir)'
913 fi
914
915 . "$srcdir/version.sh" || exit 1;
916 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
917 : "${extra_verbose=$beta}"
918 version="${emacs_major_version}.${emacs_minor_version}"
919 { test "$extra_verbose" = "yes" && cat << EOF
920     Defining EMACS_MAJOR_VERSION = $emacs_major_version
921 EOF
922 cat >> confdefs.h <<EOF
923 #define EMACS_MAJOR_VERSION $emacs_major_version
924 EOF
925 }
926
927 { test "$extra_verbose" = "yes" && cat << EOF
928     Defining EMACS_MINOR_VERSION = $emacs_minor_version
929 EOF
930 cat >> confdefs.h <<EOF
931 #define EMACS_MINOR_VERSION $emacs_minor_version
932 EOF
933 }
934
935 if test -n "$emacs_beta_version" ; then
936   if test "$beta" = "yes"; then
937         version="${version}-b${emacs_beta_version}"
938         { test "$extra_verbose" = "yes" && cat << EOF
939     Defining EMACS_BETA_VERSION = $emacs_beta_version
940 EOF
941 cat >> confdefs.h <<EOF
942 #define EMACS_BETA_VERSION $emacs_beta_version
943 EOF
944 }
945
946   else
947         version="${version}.${emacs_beta_version}"
948         { test "$extra_verbose" = "yes" && cat << EOF
949     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
950 EOF
951 cat >> confdefs.h <<EOF
952 #define EMACS_PATCH_LEVEL $emacs_beta_version
953 EOF
954 }
955
956   fi
957 fi
958 { test "$extra_verbose" = "yes" && cat << EOF
959     Defining XEMACS_CODENAME = "$xemacs_codename"
960 EOF
961 cat >> confdefs.h <<EOF
962 #define XEMACS_CODENAME "$xemacs_codename"
963 EOF
964 }
965
966 { test "$extra_verbose" = "yes" && cat << EOF
967     Defining EMACS_VERSION = "$version"
968 EOF
969 cat >> confdefs.h <<EOF
970 #define EMACS_VERSION "$version"
971 EOF
972 }
973
974
975 if test "$with_infodock" = "yes"; then
976   if test ! -f ../../ID-INSTALL; then
977     echo "Cannot build InfoDock without InfoDock sources"
978     with_infodock=no
979   fi
980 fi
981
982 if test "$with_infodock" = "yes"; then
983       { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_MAJOR_VERSION $infodock_major_version
988 EOF
989 }
990
991   { test "$extra_verbose" = "yes" && cat << EOF
992     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
993 EOF
994 cat >> confdefs.h <<EOF
995 #define INFODOCK_MINOR_VERSION $infodock_minor_version
996 EOF
997 }
998
999   { test "$extra_verbose" = "yes" && cat << EOF
1000     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1001 EOF
1002 cat >> confdefs.h <<EOF
1003 #define INFODOCK_BUILD_VERSION $infodock_build_version
1004 EOF
1005 }
1006
1007   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1008   PROGNAME=infodock
1009   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1010 else
1011   PROGNAME=xemacs
1012 fi
1013
1014 { test "$extra_verbose" = "yes" && cat << EOF
1015     Defining EMACS_PROGNAME = "$PROGNAME"
1016 EOF
1017 cat >> confdefs.h <<EOF
1018 #define EMACS_PROGNAME "$PROGNAME"
1019 EOF
1020 }
1021
1022
1023 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1024 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_EXTENTS
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_EXTENTS 1
1029 EOF
1030 }
1031
1032 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_TYPECHECK
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_TYPECHECK 1
1037 EOF
1038 }
1039
1040 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_BUFPOS
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_BUFPOS 1
1045 EOF
1046 }
1047
1048 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1049     Defining ERROR_CHECK_GC
1050 EOF
1051 cat >> confdefs.h <<\EOF
1052 #define ERROR_CHECK_GC 1
1053 EOF
1054 }
1055
1056 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1057     Defining ERROR_CHECK_MALLOC
1058 EOF
1059 cat >> confdefs.h <<\EOF
1060 #define ERROR_CHECK_MALLOC 1
1061 EOF
1062 }
1063
1064 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining ERROR_CHECK_BYTE_CODE
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define ERROR_CHECK_BYTE_CODE 1
1069 EOF
1070 }
1071
1072 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining ERROR_CHECK_GLYPHS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define ERROR_CHECK_GLYPHS 1
1077 EOF
1078 }
1079
1080 if test "${debug:=$beta}" = "yes"; then
1081   use_assertions=yes memory_usage_stats=yes
1082   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1083    echo "    xemacs will be linked with \"debug.o\""
1084  fi
1085   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"tests.o\""
1087  fi
1088   { test "$extra_verbose" = "yes" && cat << \EOF
1089     Defining DEBUG_XEMACS
1090 EOF
1091 cat >> confdefs.h <<\EOF
1092 #define DEBUG_XEMACS 1
1093 EOF
1094 }
1095
1096 fi
1097 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1098     Defining USE_ASSERTIONS
1099 EOF
1100 cat >> confdefs.h <<\EOF
1101 #define USE_ASSERTIONS 1
1102 EOF
1103 }
1104
1105 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1106     Defining MEMORY_USAGE_STATS
1107 EOF
1108 cat >> confdefs.h <<\EOF
1109 #define MEMORY_USAGE_STATS 1
1110 EOF
1111 }
1112
1113
1114
1115 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1116 echo "configure:1117: checking "host system type"" >&5
1117 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1118 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1119 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1120 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 echo "$ac_t""$configuration" 1>&6
1122
1123
1124
1125
1126
1127 machine='' opsys=''
1128
1129 case "$canonical" in
1130   sparc-*-*        ) machine=sparc ;;
1131   alpha*-*-*       ) machine=alpha ;;
1132   vax-*-*          ) machine=vax ;;
1133   mips-dec-*       ) machine=pmax ;;
1134   mips-sgi-irix6*  ) machine=iris6d ;;
1135   mips-sgi-*       ) machine=iris4d ;;
1136   mips*-linux      ) machine=mips ;;
1137   romp-ibm-*       ) machine=ibmrt ;;
1138   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1139   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1140   powerpc*-*       ) machine=powerpc ;;
1141   hppa-*-*         ) machine=hp800 ;;
1142   m88k-dg-*        ) machine=aviion ;;
1143   m68*-sony-*      ) machine=news ;;
1144   mips-sony-*      ) machine=news-risc ;;
1145   clipper-*        ) machine=clipper ;;
1146   arm*             ) machine=arm ;;
1147   ns32k-*          ) machine=ns32000 ;;
1148 esac
1149
1150 case "$canonical" in
1151   *-*-linux*    ) opsys=linux ;;
1152   *-*-netbsd*   ) opsys=netbsd ;;
1153   *-*-openbsd*  ) opsys=openbsd ;;
1154   *-*-nextstep* ) opsys=nextstep ;;
1155   *-*-vms       ) opsys=vms ;;
1156
1157     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1158   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1159   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1160   *-dec-osf3*                ) opsys=decosf3-1 ;;
1161   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1162
1163     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1164   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1165   *-*-ultrix* )         opsys=ultrix4-3 ;;
1166
1167     *-*-aix3.1*  ) opsys=aix3-1 ;;
1168   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1169   *-*-aix3*    ) opsys=aix3-2   ;;
1170   *-*-aix4.0*  ) opsys=aix4     ;;
1171   *-*-aix4.1*  ) opsys=aix4-1   ;;
1172   *-*-aix4*    ) opsys=aix4-2   ;;
1173
1174     *-gnu* )                    opsys=gnu    ;;
1175   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1176   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1177   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1178   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1179   *-*-aos*   )                  opsys=bsd4-3 ;;
1180   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1181   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1182   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1183   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1184   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1185   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1186         if test -z "$NON_GNU_CPP" ; then
1187           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1188             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1189           done
1190         fi
1191         opsys=usg5-4-2 ;;
1192     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1193     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1194 esac
1195
1196 case "$canonical" in
1197
1198     *-*-netbsd* )
1199     case "$canonical" in
1200       i[3-9]86-*-netbsd*) machine=intel386 ;;
1201       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1202                                             machine=hp9000s300 ;;
1203       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1204       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1205     esac
1206   ;;
1207
1208     *-*-openbsd* )
1209     case "${canonical}" in
1210       i386-*-openbsd*)          machine=intel386 ;;
1211       m68k-*-openbsd*)          machine=hp9000s300 ;;
1212       mipsel-*-openbsd*)        machine=pmax ;;
1213      esac
1214    ;;
1215
1216     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1217   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1218
1219     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1220   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1221
1222     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1223
1224     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1225
1226     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1227
1228     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1229
1230     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1231
1232     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1233   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1234   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1235
1236   
1237     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1238
1239     *-convex-bsd* | *-convex-convexos* )
1240     machine=convex opsys=bsd4-3
1241     NON_GNU_CPP="cc -E -P"
1242   ;;
1243
1244     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1245
1246     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1247   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1248   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1249   m88k-dg-dgux*                           ) opsys=dgux     ;;
1250
1251     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1252   m88k-motorola-sysv4* )
1253                     machine=delta88k opsys=usg5-4-2
1254   ;;
1255   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1256
1257     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1258   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1259
1260     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1261
1262     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1263   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1264   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1265
1266       m88k-harris-cxux* )
1267         case "`uname -r`" in
1268        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1269        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1270     esac
1271     NON_GNU_CPP="/lib/cpp"
1272   ;;
1273     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1274     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1275
1276     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1277
1278     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1279
1280     *-hp-hpux* )
1281         case "$canonical" in
1282       m68*  ) machine=hp9000s300 ;;
1283       hppa* ) machine=hp800      ;;
1284     esac
1285
1286     case "$canonical" in
1287       *-hp-hpux7*  )  opsys=hpux   ;;
1288       *-hp-hpux8*  )  opsys=hpux8  ;;
1289       *-hp-hpux9*  )  opsys=hpux9  ;;
1290       *-hp-hpux10* )  opsys=hpux10 ;;
1291       *-hp-hpux11* )  opsys=hpux11 ;;
1292       *            )  opsys=hpux   ;;
1293     esac
1294
1295         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1296    echo "    xemacs will be linked with \"strcat.o\""
1297  fi ;; esac
1298
1299     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1300         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1301     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1302
1303     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1304   ;;
1305
1306     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1307   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1308
1309     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1310   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1311   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1312   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1313   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1314   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1315
1316     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1317   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1318
1319     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1320
1321     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1322
1323     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1324
1325     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1326
1327       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1328
1329     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1330
1331     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1332
1333     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1334
1335     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1336
1337         mips-mips-usg* ) machine=mips4 ;;
1338   mips-mips-riscos4 )
1339     machine=mips4
1340     NON_GNU_CC="cc -systype bsd43"
1341     NON_GNU_CPP="cc -systype bsd43 -E"
1342     case "$canonical" in
1343       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1344       mips-mips-riscos5* ) opsys=riscos5 ;;
1345     esac
1346   ;;
1347   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1348   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1349
1350     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1351
1352     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1353
1354     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1355   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1356
1357     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1358
1359     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1360
1361     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1362
1363     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1364
1365     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1366   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1367
1368     mips-siemens-sysv* | mips-sni-sysv*)
1369     machine=mips-siemens opsys=usg5-4
1370     NON_GNU_CC=/usr/ccs/bin/cc
1371     NON_GNU_CPP=/usr/ccs/lib/cpp
1372   ;;
1373
1374     mips-nec-sysv*)
1375     machine=mips-nec
1376     NON_GNU_CC=/usr/ccs/bin/cc
1377     NON_GNU_CPP=/usr/ccs/lib/cpp
1378   ;;
1379
1380       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1381   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1382     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1383   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1384   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1385   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1386   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1387   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1388   mips-sgi-irix*      ) opsys=irix5-0 ;;
1389
1390     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1391   *-sony-news* ) opsys=newsos5 ;;
1392
1393     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1394
1395     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1396         case "$canonical" in
1397       m68*-sunos1* )             machine=sun1     ;;
1398       m68*-sunos2* )             machine=sun2     ;;
1399       m68* )                     machine=sun3     ;;
1400       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1401       i*86-*-* )                 machine=intel386 ;;
1402       rs6000* )                  machine=rs6000   ;;
1403     esac
1404
1405         case "$canonical" in *-sunos5*)
1406       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1407     esac
1408
1409                     case "$canonical" in
1410       *-sunos4* )
1411         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1412         : ;;
1413       *-solaris2* )
1414         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1415         RANLIB=':' ;;
1416     esac
1417
1418     case "$canonical" in
1419       *-solaris*          )
1420         opsys=sol2
1421         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1422         { test "$extra_verbose" = "yes" && cat << EOF
1423     Defining OS_RELEASE = $os_release
1424 EOF
1425 cat >> confdefs.h <<EOF
1426 #define OS_RELEASE $os_release
1427 EOF
1428 }
1429  ;;
1430
1431             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1432       *-sunos4.0*         ) opsys=sunos4-0      ;;
1433       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1434       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1435       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1436       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1437       *-mach*             ) opsys=mach-bsd4-3   ;;
1438       *                   ) opsys=bsd4-2        ;;
1439     esac
1440
1441     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1442
1443         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1444   ;;
1445
1446     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1447
1448     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1449   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1450
1451     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1452
1453     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1454
1455     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1456       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1457
1458     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1459
1460     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1461
1462     vax-dec-* )
1463     case "$canonical" in
1464       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1465       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1466       *-mach* )                         opsys=mach-bsd4-3 ;;
1467     esac
1468   ;;
1469
1470     ns16k-whitechapel-* ) machine=mg1 ;;
1471
1472     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1473
1474     i[3-9]86-*-* )
1475     machine=intel386
1476     case "$canonical" in
1477       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1478       *-isc2.2* )               opsys=isc2-2 ;;
1479       *-isc4.0* )               opsys=isc4-0 ;;
1480       *-isc4.* )                opsys=isc4-1
1481                                 GCC_TEST_OPTIONS=-posix
1482                                 NON_GCC_TEST_OPTIONS=-Xp
1483                                 ;;
1484       *-isc* )                  opsys=isc3-0 ;;
1485       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1486       *-esix* )                 opsys=esix ;;
1487       *-mach* )                 opsys=mach-bsd4-3 ;;
1488       *-xenix* )                opsys=xenix ;;
1489       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1490       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1491       *-bsdi4* )                opsys=bsdos4 ;;
1492       *-bsdi3* )                opsys=bsdos3 ;;
1493       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1494       *-bsdi2* )                opsys=bsdos2 ;;
1495       *-sco3.2v5* )             opsys=sco5 ;;
1496       *-sysv5* )                opsys=sco7 ;;
1497       *-386bsd* )               opsys=386bsd ;;
1498       *-freebsd* )              opsys=freebsd ;;
1499       *-nextstep* )             opsys=nextstep ;;
1500       *-pc-cygwin* )            opsys=cygwin32 ;;
1501       *-pc-mingw* )             opsys=mingw32 ;
1502                                 test -z "$with_tty" && with_tty="no";;
1503           esac
1504   ;;
1505
1506     m68k-*-linux* ) machine=m68k opsys=linux ;;
1507
1508 esac
1509
1510 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1511
1512 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1513
1514 if test -r "${srcdir}/src/m/${machine}.h"; then
1515   machfile="m/${machine}.h"
1516   { test "$extra_verbose" = "yes" && cat << EOF
1517     Defining config_machfile = "$machfile"
1518 EOF
1519 cat >> confdefs.h <<EOF
1520 #define config_machfile "$machfile"
1521 EOF
1522 }
1523
1524 else
1525   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1526   echo "Using configure-time autodetection only."
1527 fi
1528
1529 if test -r "${srcdir}/src/s/${opsys}.h"; then
1530   opsysfile="s/${opsys}.h"
1531   { test "$extra_verbose" = "yes" && cat << EOF
1532     Defining config_opsysfile = "$opsysfile"
1533 EOF
1534 cat >> confdefs.h <<EOF
1535 #define config_opsysfile "$opsysfile"
1536 EOF
1537 }
1538
1539 else
1540   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1541   echo "Using configure-time autodetection only."
1542 fi
1543
1544
1545 if test -z "$dynamic"; then
1546   case "$opsys" in
1547     hpux* | sunos4* ) dynamic=no ;;
1548     *) dynamic=yes ;;
1549   esac
1550 fi
1551 if test "$dynamic" = "yes"; then
1552   case "$opsys" in
1553     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1554     decosf* ) ld_call_shared="-call_shared" ;;
1555   esac
1556 else   case "$opsys" in
1557     sol2 )
1558       echo "Static linking is not supported on Solaris 2."
1559       echo "Rerun configure without specifying --dynamic=no."
1560       exit 1 ;;
1561     linux   ) ld_call_shared="-Bstatic" ;;
1562     decosf* ) ld_call_shared="-non_shared" ;;
1563   esac
1564 fi
1565
1566 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1567
1568 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1569 { test "$extra_verbose" = "yes" && cat << EOF
1570     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1571 EOF
1572 cat >> confdefs.h <<EOF
1573 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1574 EOF
1575 }
1576
1577
1578
1579 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1580 if test "$with_workshop $with_tooltalk" = "yes no"; then
1581   (echo "$progname: Usage error:"
1582 echo " " "--with-workshop requires --with-tooltalk"
1583 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1584 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1585 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1586 fi
1587
1588 if test "$with_workshop" = "yes"; then
1589   { test "$extra_verbose" = "yes" && cat << \EOF
1590     Defining SUNPRO
1591 EOF
1592 cat >> confdefs.h <<\EOF
1593 #define SUNPRO 1
1594 EOF
1595 }
1596
1597   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1598    echo "    xemacs will be linked with \"sunpro.o\""
1599  fi
1600 fi
1601
1602 if test "$with_clash_detection" != "no"; then
1603   { test "$extra_verbose" = "yes" && cat << \EOF
1604     Defining CLASH_DETECTION
1605 EOF
1606 cat >> confdefs.h <<\EOF
1607 #define CLASH_DETECTION 1
1608 EOF
1609 }
1610
1611   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1612    echo "    xemacs will be linked with \"filelock.o\""
1613  fi
1614 fi
1615
1616 test -n "$compiler" && CC="$compiler"
1617 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1618 fi
1619
1620 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1621 if test "${CFLAGS-unset}" != unset
1622   then cflags_specified=yes;
1623   else cflags_specified=no;
1624 fi
1625
1626 xe_save_CFLAGS="$CFLAGS"
1627
1628 # Extract the first word of "gcc", so it can be a program name with args.
1629 set dummy gcc; ac_word=$2
1630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1631 echo "configure:1632: checking for $ac_word" >&5
1632
1633 if test -n "$CC"; then
1634   ac_cv_prog_CC="$CC" # Let the user override the test.
1635 else
1636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1637   ac_dummy="$PATH"
1638   for ac_dir in $ac_dummy; do
1639     test -z "$ac_dir" && ac_dir=.
1640     if test -f $ac_dir/$ac_word; then
1641       ac_cv_prog_CC="gcc"
1642       break
1643     fi
1644   done
1645   IFS="$ac_save_ifs"
1646 fi
1647 CC="$ac_cv_prog_CC"
1648 if test -n "$CC"; then
1649   echo "$ac_t""$CC" 1>&6
1650 else
1651   echo "$ac_t""no" 1>&6
1652 fi
1653
1654 if test -z "$CC"; then
1655   # Extract the first word of "cc", so it can be a program name with args.
1656 set dummy cc; ac_word=$2
1657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1658 echo "configure:1659: checking for $ac_word" >&5
1659
1660 if test -n "$CC"; then
1661   ac_cv_prog_CC="$CC" # Let the user override the test.
1662 else
1663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1664   ac_prog_rejected=no
1665   ac_dummy="$PATH"
1666   for ac_dir in $ac_dummy; do
1667     test -z "$ac_dir" && ac_dir=.
1668     if test -f $ac_dir/$ac_word; then
1669       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1670         ac_prog_rejected=yes
1671         continue
1672       fi
1673       ac_cv_prog_CC="cc"
1674       break
1675     fi
1676   done
1677   IFS="$ac_save_ifs"
1678 if test $ac_prog_rejected = yes; then
1679   # We found a bogon in the path, so make sure we never use it.
1680   set dummy $ac_cv_prog_CC
1681   shift
1682   if test $# -gt 0; then
1683     # We chose a different compiler from the bogus one.
1684     # However, it has the same basename, so the bogon will be chosen
1685     # first if we set CC to just the basename; use the full file name.
1686     shift
1687     set dummy "$ac_dir/$ac_word" "$@"
1688     shift
1689     ac_cv_prog_CC="$@"
1690   fi
1691 fi
1692 fi
1693 CC="$ac_cv_prog_CC"
1694 if test -n "$CC"; then
1695   echo "$ac_t""$CC" 1>&6
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699
1700   if test -z "$CC"; then
1701     case "`uname -s`" in
1702     *win32* | *WIN32*)
1703       # Extract the first word of "cl", so it can be a program name with args.
1704 set dummy cl; ac_word=$2
1705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1706 echo "configure:1707: checking for $ac_word" >&5
1707
1708 if test -n "$CC"; then
1709   ac_cv_prog_CC="$CC" # Let the user override the test.
1710 else
1711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1712   ac_dummy="$PATH"
1713   for ac_dir in $ac_dummy; do
1714     test -z "$ac_dir" && ac_dir=.
1715     if test -f $ac_dir/$ac_word; then
1716       ac_cv_prog_CC="cl"
1717       break
1718     fi
1719   done
1720   IFS="$ac_save_ifs"
1721 fi
1722 CC="$ac_cv_prog_CC"
1723 if test -n "$CC"; then
1724   echo "$ac_t""$CC" 1>&6
1725 else
1726   echo "$ac_t""no" 1>&6
1727 fi
1728  ;;
1729     esac
1730   fi
1731   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1732 fi
1733
1734 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1735 echo "configure:1736: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1736
1737 ac_ext=c
1738 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1739 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1740 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'
1741 ac_cpp='$CPP '"$xe_cppflags"
1742 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1743 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1744 cross_compiling=no
1745
1746 cat > conftest.$ac_ext << EOF
1747
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750
1751 main(){return(0);}
1752 EOF
1753 if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1754   ac_cv_prog_cc_works=yes
1755   # If we can't run a trivial program, we are probably using a cross compiler.
1756   if (./conftest; exit) 2>/dev/null; then
1757     ac_cv_prog_cc_cross=no
1758   else
1759     ac_cv_prog_cc_cross=yes
1760   fi
1761 else
1762   echo "configure: failed program was:" >&5
1763   cat conftest.$ac_ext >&5
1764   ac_cv_prog_cc_works=no
1765 fi
1766 rm -fr conftest*
1767 ac_ext=c
1768 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1769 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1770 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1771 ac_cpp='$CPP '"$xe_cppflags"
1772 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1773 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1774 cross_compiling=no
1775
1776 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1777 if test $ac_cv_prog_cc_works = no; then
1778   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1779 fi
1780 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1781 echo "configure:1782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1782 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1783 cross_compiling=$ac_cv_prog_cc_cross
1784
1785 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1786 echo "configure:1787: checking whether we are using GNU C" >&5
1787
1788 cat > conftest.c <<EOF
1789 #ifdef __GNUC__
1790   yes;
1791 #endif
1792 EOF
1793 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1794   ac_cv_prog_gcc=yes
1795 else
1796   ac_cv_prog_gcc=no
1797 fi
1798
1799 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1800
1801 if test $ac_cv_prog_gcc = yes; then
1802   GCC=yes
1803 else
1804   GCC=
1805 fi
1806
1807 ac_test_CFLAGS="${CFLAGS+set}"
1808 ac_save_CFLAGS="$CFLAGS"
1809 CFLAGS=
1810 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1811 echo "configure:1812: checking whether ${CC-cc} accepts -g" >&5
1812
1813 echo 'void f(){}' > conftest.c
1814 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1815   ac_cv_prog_cc_g=yes
1816 else
1817   ac_cv_prog_cc_g=no
1818 fi
1819 rm -f conftest*
1820
1821
1822 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1823 if test "$ac_test_CFLAGS" = set; then
1824   CFLAGS="$ac_save_CFLAGS"
1825 elif test $ac_cv_prog_cc_g = yes; then
1826   if test "$GCC" = yes; then
1827     CFLAGS="-g -O2"
1828   else
1829     CFLAGS="-g"
1830   fi
1831 else
1832   if test "$GCC" = yes; then
1833     CFLAGS="-O2"
1834   else
1835     CFLAGS=
1836   fi
1837 fi
1838  
1839 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1840   CC=${NON_GNU_CC-cc}
1841   # Extract the first word of "gcc", so it can be a program name with args.
1842 set dummy gcc; ac_word=$2
1843 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1844 echo "configure:1845: checking for $ac_word" >&5
1845
1846 if test -n "$CC"; then
1847   ac_cv_prog_CC="$CC" # Let the user override the test.
1848 else
1849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1850   ac_dummy="$PATH"
1851   for ac_dir in $ac_dummy; do
1852     test -z "$ac_dir" && ac_dir=.
1853     if test -f $ac_dir/$ac_word; then
1854       ac_cv_prog_CC="gcc"
1855       break
1856     fi
1857   done
1858   IFS="$ac_save_ifs"
1859 fi
1860 CC="$ac_cv_prog_CC"
1861 if test -n "$CC"; then
1862   echo "$ac_t""$CC" 1>&6
1863 else
1864   echo "$ac_t""no" 1>&6
1865 fi
1866
1867 if test -z "$CC"; then
1868   # Extract the first word of "cc", so it can be a program name with args.
1869 set dummy cc; ac_word=$2
1870 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1871 echo "configure:1872: checking for $ac_word" >&5
1872
1873 if test -n "$CC"; then
1874   ac_cv_prog_CC="$CC" # Let the user override the test.
1875 else
1876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1877   ac_prog_rejected=no
1878   ac_dummy="$PATH"
1879   for ac_dir in $ac_dummy; do
1880     test -z "$ac_dir" && ac_dir=.
1881     if test -f $ac_dir/$ac_word; then
1882       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1883         ac_prog_rejected=yes
1884         continue
1885       fi
1886       ac_cv_prog_CC="cc"
1887       break
1888     fi
1889   done
1890   IFS="$ac_save_ifs"
1891 if test $ac_prog_rejected = yes; then
1892   # We found a bogon in the path, so make sure we never use it.
1893   set dummy $ac_cv_prog_CC
1894   shift
1895   if test $# -gt 0; then
1896     # We chose a different compiler from the bogus one.
1897     # However, it has the same basename, so the bogon will be chosen
1898     # first if we set CC to just the basename; use the full file name.
1899     shift
1900     set dummy "$ac_dir/$ac_word" "$@"
1901     shift
1902     ac_cv_prog_CC="$@"
1903   fi
1904 fi
1905 fi
1906 CC="$ac_cv_prog_CC"
1907 if test -n "$CC"; then
1908   echo "$ac_t""$CC" 1>&6
1909 else
1910   echo "$ac_t""no" 1>&6
1911 fi
1912
1913   if test -z "$CC"; then
1914     case "`uname -s`" in
1915     *win32* | *WIN32*)
1916       # Extract the first word of "cl", so it can be a program name with args.
1917 set dummy cl; ac_word=$2
1918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1919 echo "configure:1920: checking for $ac_word" >&5
1920
1921 if test -n "$CC"; then
1922   ac_cv_prog_CC="$CC" # Let the user override the test.
1923 else
1924   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1925   ac_dummy="$PATH"
1926   for ac_dir in $ac_dummy; do
1927     test -z "$ac_dir" && ac_dir=.
1928     if test -f $ac_dir/$ac_word; then
1929       ac_cv_prog_CC="cl"
1930       break
1931     fi
1932   done
1933   IFS="$ac_save_ifs"
1934 fi
1935 CC="$ac_cv_prog_CC"
1936 if test -n "$CC"; then
1937   echo "$ac_t""$CC" 1>&6
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941  ;;
1942     esac
1943   fi
1944   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1945 fi
1946
1947 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1948 echo "configure:1949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1949
1950 ac_ext=c
1951 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1952 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1953 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'
1954 ac_cpp='$CPP '"$xe_cppflags"
1955 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1956 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1957 cross_compiling=no
1958
1959 cat > conftest.$ac_ext << EOF
1960
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963
1964 main(){return(0);}
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1967   ac_cv_prog_cc_works=yes
1968   # If we can't run a trivial program, we are probably using a cross compiler.
1969   if (./conftest; exit) 2>/dev/null; then
1970     ac_cv_prog_cc_cross=no
1971   else
1972     ac_cv_prog_cc_cross=yes
1973   fi
1974 else
1975   echo "configure: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   ac_cv_prog_cc_works=no
1978 fi
1979 rm -fr conftest*
1980 ac_ext=c
1981 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1982 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1983 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1984 ac_cpp='$CPP '"$xe_cppflags"
1985 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1986 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1987 cross_compiling=no
1988
1989 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1990 if test $ac_cv_prog_cc_works = no; then
1991   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1992 fi
1993 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1994 echo "configure:1995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1995 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1996 cross_compiling=$ac_cv_prog_cc_cross
1997
1998 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1999 echo "configure:2000: checking whether we are using GNU C" >&5
2000
2001 cat > conftest.c <<EOF
2002 #ifdef __GNUC__
2003   yes;
2004 #endif
2005 EOF
2006 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2007   ac_cv_prog_gcc=yes
2008 else
2009   ac_cv_prog_gcc=no
2010 fi
2011
2012 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2013
2014 if test $ac_cv_prog_gcc = yes; then
2015   GCC=yes
2016 else
2017   GCC=
2018 fi
2019
2020 ac_test_CFLAGS="${CFLAGS+set}"
2021 ac_save_CFLAGS="$CFLAGS"
2022 CFLAGS=
2023 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2024 echo "configure:2025: checking whether ${CC-cc} accepts -g" >&5
2025
2026 echo 'void f(){}' > conftest.c
2027 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2028   ac_cv_prog_cc_g=yes
2029 else
2030   ac_cv_prog_cc_g=no
2031 fi
2032 rm -f conftest*
2033
2034
2035 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2036 if test "$ac_test_CFLAGS" = set; then
2037   CFLAGS="$ac_save_CFLAGS"
2038 elif test $ac_cv_prog_cc_g = yes; then
2039   if test "$GCC" = yes; then
2040     CFLAGS="-g -O2"
2041   else
2042     CFLAGS="-g"
2043   fi
2044 else
2045   if test "$GCC" = yes; then
2046     CFLAGS="-O2"
2047   else
2048     CFLAGS=
2049   fi
2050 fi
2051
2052 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2053   CC=gcc
2054   # Extract the first word of "gcc", so it can be a program name with args.
2055 set dummy gcc; ac_word=$2
2056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2057 echo "configure:2058: checking for $ac_word" >&5
2058
2059 if test -n "$CC"; then
2060   ac_cv_prog_CC="$CC" # Let the user override the test.
2061 else
2062   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2063   ac_dummy="$PATH"
2064   for ac_dir in $ac_dummy; do
2065     test -z "$ac_dir" && ac_dir=.
2066     if test -f $ac_dir/$ac_word; then
2067       ac_cv_prog_CC="gcc"
2068       break
2069     fi
2070   done
2071   IFS="$ac_save_ifs"
2072 fi
2073 CC="$ac_cv_prog_CC"
2074 if test -n "$CC"; then
2075   echo "$ac_t""$CC" 1>&6
2076 else
2077   echo "$ac_t""no" 1>&6
2078 fi
2079
2080 if test -z "$CC"; then
2081   # Extract the first word of "cc", so it can be a program name with args.
2082 set dummy cc; ac_word=$2
2083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_word" >&5
2085
2086 if test -n "$CC"; then
2087   ac_cv_prog_CC="$CC" # Let the user override the test.
2088 else
2089   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2090   ac_prog_rejected=no
2091   ac_dummy="$PATH"
2092   for ac_dir in $ac_dummy; do
2093     test -z "$ac_dir" && ac_dir=.
2094     if test -f $ac_dir/$ac_word; then
2095       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2096         ac_prog_rejected=yes
2097         continue
2098       fi
2099       ac_cv_prog_CC="cc"
2100       break
2101     fi
2102   done
2103   IFS="$ac_save_ifs"
2104 if test $ac_prog_rejected = yes; then
2105   # We found a bogon in the path, so make sure we never use it.
2106   set dummy $ac_cv_prog_CC
2107   shift
2108   if test $# -gt 0; then
2109     # We chose a different compiler from the bogus one.
2110     # However, it has the same basename, so the bogon will be chosen
2111     # first if we set CC to just the basename; use the full file name.
2112     shift
2113     set dummy "$ac_dir/$ac_word" "$@"
2114     shift
2115     ac_cv_prog_CC="$@"
2116   fi
2117 fi
2118 fi
2119 CC="$ac_cv_prog_CC"
2120 if test -n "$CC"; then
2121   echo "$ac_t""$CC" 1>&6
2122 else
2123   echo "$ac_t""no" 1>&6
2124 fi
2125
2126   if test -z "$CC"; then
2127     case "`uname -s`" in
2128     *win32* | *WIN32*)
2129       # Extract the first word of "cl", so it can be a program name with args.
2130 set dummy cl; ac_word=$2
2131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2132 echo "configure:2133: checking for $ac_word" >&5
2133
2134 if test -n "$CC"; then
2135   ac_cv_prog_CC="$CC" # Let the user override the test.
2136 else
2137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2138   ac_dummy="$PATH"
2139   for ac_dir in $ac_dummy; do
2140     test -z "$ac_dir" && ac_dir=.
2141     if test -f $ac_dir/$ac_word; then
2142       ac_cv_prog_CC="cl"
2143       break
2144     fi
2145   done
2146   IFS="$ac_save_ifs"
2147 fi
2148 CC="$ac_cv_prog_CC"
2149 if test -n "$CC"; then
2150   echo "$ac_t""$CC" 1>&6
2151 else
2152   echo "$ac_t""no" 1>&6
2153 fi
2154  ;;
2155     esac
2156   fi
2157   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2158 fi
2159
2160 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2161 echo "configure:2162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2162
2163 ac_ext=c
2164 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2165 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2166 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'
2167 ac_cpp='$CPP '"$xe_cppflags"
2168 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2169 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2170 cross_compiling=no
2171
2172 cat > conftest.$ac_ext << EOF
2173
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176
2177 main(){return(0);}
2178 EOF
2179 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2180   ac_cv_prog_cc_works=yes
2181   # If we can't run a trivial program, we are probably using a cross compiler.
2182   if (./conftest; exit) 2>/dev/null; then
2183     ac_cv_prog_cc_cross=no
2184   else
2185     ac_cv_prog_cc_cross=yes
2186   fi
2187 else
2188   echo "configure: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   ac_cv_prog_cc_works=no
2191 fi
2192 rm -fr conftest*
2193 ac_ext=c
2194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2197 ac_cpp='$CPP '"$xe_cppflags"
2198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2200 cross_compiling=no
2201
2202 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2203 if test $ac_cv_prog_cc_works = no; then
2204   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2205 fi
2206 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2207 echo "configure:2208: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2208 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2209 cross_compiling=$ac_cv_prog_cc_cross
2210
2211 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether we are using GNU C" >&5
2213
2214 cat > conftest.c <<EOF
2215 #ifdef __GNUC__
2216   yes;
2217 #endif
2218 EOF
2219 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2220   ac_cv_prog_gcc=yes
2221 else
2222   ac_cv_prog_gcc=no
2223 fi
2224
2225 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2226
2227 if test $ac_cv_prog_gcc = yes; then
2228   GCC=yes
2229 else
2230   GCC=
2231 fi
2232
2233 ac_test_CFLAGS="${CFLAGS+set}"
2234 ac_save_CFLAGS="$CFLAGS"
2235 CFLAGS=
2236 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2237 echo "configure:2238: checking whether ${CC-cc} accepts -g" >&5
2238
2239 echo 'void f(){}' > conftest.c
2240 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2241   ac_cv_prog_cc_g=yes
2242 else
2243   ac_cv_prog_cc_g=no
2244 fi
2245 rm -f conftest*
2246
2247
2248 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2249 if test "$ac_test_CFLAGS" = set; then
2250   CFLAGS="$ac_save_CFLAGS"
2251 elif test $ac_cv_prog_cc_g = yes; then
2252   if test "$GCC" = yes; then
2253     CFLAGS="-g -O2"
2254   else
2255     CFLAGS="-g"
2256   fi
2257 else
2258   if test "$GCC" = yes; then
2259     CFLAGS="-O2"
2260   else
2261     CFLAGS=
2262   fi
2263 fi
2264
2265 fi
2266 CFLAGS="$xe_save_CFLAGS"
2267
2268
2269 test -n "$CPP" -a -d "$CPP" && CPP=
2270
2271 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2272
2273 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2274 echo "configure:2275: checking how to run the C preprocessor" >&5
2275 # On Suns, sometimes $CPP names a directory.
2276 if test -n "$CPP" && test -d "$CPP"; then
2277   CPP=
2278 fi
2279 if test -z "$CPP"; then
2280
2281   # This must be in double quotes, not single quotes, because CPP may get
2282   # substituted into the Makefile and "${CC-cc}" will confuse make.
2283   CPP="${CC-cc} -E"
2284   # On the NeXT, cc -E runs the code through the compiler's parser,
2285   # not just through cpp.
2286   cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289 #include <assert.h>
2290 Syntax Error
2291 EOF
2292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2293 { (eval echo configure:2294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2295 if test -z "$ac_err"; then
2296   :
2297 else
2298   echo "$ac_err" >&5
2299   echo "configure: failed program was:" >&5
2300   cat conftest.$ac_ext >&5
2301   rm -rf conftest*
2302   CPP="${CC-cc} -E -traditional-cpp"
2303   cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #include <assert.h>
2307 Syntax Error
2308 EOF
2309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2310 { (eval echo configure:2311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2312 if test -z "$ac_err"; then
2313   :
2314 else
2315   echo "$ac_err" >&5
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -rf conftest*
2319   CPP="${CC-cc} -nologo -E"
2320   cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <assert.h>
2324 Syntax Error
2325 EOF
2326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2327 { (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2329 if test -z "$ac_err"; then
2330   :
2331 else
2332   echo "$ac_err" >&5
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   CPP=/lib/cpp
2337 fi
2338 rm -f conftest*
2339 fi
2340 rm -f conftest*
2341 fi
2342 rm -f conftest*
2343   ac_cv_prog_CPP="$CPP"
2344   CPP="$ac_cv_prog_CPP"
2345 else
2346   ac_cv_prog_CPP="$CPP"
2347 fi
2348 echo "$ac_t""$CPP" 1>&6
2349
2350
2351
2352 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2353 echo "configure:2354: checking for AIX" >&5
2354 cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #ifdef _AIX
2358   yes
2359 #endif
2360
2361 EOF
2362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363   egrep "yes" >/dev/null 2>&1; then
2364   rm -rf conftest*
2365   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2366     Defining _ALL_SOURCE
2367 EOF
2368 cat >> confdefs.h <<\EOF
2369 #define _ALL_SOURCE 1
2370 EOF
2371 }
2372
2373 else
2374   rm -rf conftest*
2375   echo "$ac_t""no" 1>&6
2376 fi
2377 rm -f conftest*
2378
2379  
2380
2381 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2382 echo "configure:2383: checking for GNU libc" >&5
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #include <features.h>
2387 int main() {
2388
2389 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2390 #error Not a GNU libc system :-(
2391 ******* ======= ******** &&&&&&&&
2392 #endif
2393
2394 ; return 0; }
2395 EOF
2396 if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2397   rm -rf conftest*
2398   have_glibc=yes
2399 else
2400   echo "configure: failed program was:" >&5
2401   cat conftest.$ac_ext >&5
2402   rm -rf conftest*
2403   have_glibc=no
2404 fi
2405 rm -f conftest*
2406 echo "$ac_t""$have_glibc" 1>&6
2407 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2408     Defining _GNU_SOURCE
2409 EOF
2410 cat >> confdefs.h <<\EOF
2411 #define _GNU_SOURCE 1
2412 EOF
2413 }
2414
2415
2416 case "$opsys" in
2417   sol2)
2418    { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining __EXTENSIONS__
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define __EXTENSIONS__ 1
2423 EOF
2424 }
2425
2426       if test "$os_release" -ge 55; then
2427      { test "$extra_verbose" = "yes" && cat << \EOF
2428     Defining _XOPEN_SOURCE = 500
2429 EOF
2430 cat >> confdefs.h <<\EOF
2431 #define _XOPEN_SOURCE 500
2432 EOF
2433 }
2434
2435      { test "$extra_verbose" = "yes" && cat << \EOF
2436     Defining _XOPEN_SOURCE_EXTENDED
2437 EOF
2438 cat >> confdefs.h <<\EOF
2439 #define _XOPEN_SOURCE_EXTENDED 1
2440 EOF
2441 }
2442
2443    fi ;;
2444   linux)
2445     { test "$extra_verbose" = "yes" && cat << \EOF
2446     Defining _POSIX_C_SOURCE = 199506L
2447 EOF
2448 cat >> confdefs.h <<\EOF
2449 #define _POSIX_C_SOURCE 199506L
2450 EOF
2451 }
2452
2453     { test "$extra_verbose" = "yes" && cat << \EOF
2454     Defining _XOPEN_SOURCE = 500
2455 EOF
2456 cat >> confdefs.h <<\EOF
2457 #define _XOPEN_SOURCE 500
2458 EOF
2459 }
2460
2461     { test "$extra_verbose" = "yes" && cat << \EOF
2462     Defining _XOPEN_SOURCE_EXTENDED
2463 EOF
2464 cat >> confdefs.h <<\EOF
2465 #define _XOPEN_SOURCE_EXTENDED 1
2466 EOF
2467 }
2468
2469     ;;
2470 esac
2471
2472 cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 int main () {
2476 #if defined __SUNPRO_C
2477 return 11;
2478 #elif defined __DECC
2479 return 12;
2480 #elif defined __USLC__ && defined __SCO_VERSION__
2481 return 13;
2482 #else
2483 return 0;
2484 #endif
2485 }
2486 EOF
2487 if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2488 then
2489   :
2490 else
2491   conftest_rc="$?"
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -fr conftest*
2495   case "$conftest_rc" in
2496   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2497   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2498   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2499 esac
2500 fi
2501 rm -fr conftest*
2502
2503
2504
2505
2506 echo "Extracting information from the machine- and system-dependent headers..."
2507
2508 tempcname="conftest.c"
2509
2510
2511
2512 cat > $tempcname < confdefs.h
2513 cat >> $tempcname <<EOF
2514 #define NOT_C_CODE
2515 #define C_SWITCH_SITE
2516 #define C_SWITCH_X_SITE
2517 #define LD_SWITCH_SITE
2518 #define LD_SWITCH_X_SITE
2519 #define LD_SWITCH_X_SITE_AUX
2520 #define OS_RELEASE $os_release
2521
2522 #ifdef config_opsysfile
2523 #include "$srcdir/src/$opsysfile"
2524 #endif
2525
2526 #ifdef config_machfile
2527 #include "$srcdir/src/$machfile"
2528 #endif
2529
2530 #ifndef LIBS_MACHINE
2531 #define LIBS_MACHINE
2532 #endif
2533 configure___ libs_machine=LIBS_MACHINE
2534
2535 #ifndef LIBS_SYSTEM
2536 #define LIBS_SYSTEM
2537 #endif
2538 configure___ libs_system=LIBS_SYSTEM
2539
2540 #ifndef LIBS_TERMCAP
2541 #define LIBS_TERMCAP
2542 #endif
2543 configure___ libs_termcap=LIBS_TERMCAP
2544
2545 #ifndef LIB_STANDARD
2546 #define LIB_STANDARD
2547 #endif
2548 configure___ libs_standard=LIB_STANDARD
2549
2550
2551 #ifndef OBJECTS_MACHINE
2552 #define OBJECTS_MACHINE
2553 #endif
2554 configure___ objects_machine=OBJECTS_MACHINE
2555
2556 #ifndef OBJECTS_SYSTEM
2557 #define OBJECTS_SYSTEM
2558 #endif
2559 configure___ objects_system=OBJECTS_SYSTEM
2560
2561
2562 #ifndef C_SWITCH_MACHINE
2563 #define C_SWITCH_MACHINE
2564 #endif
2565 configure___ c_switch_machine=C_SWITCH_MACHINE
2566
2567 #ifndef C_SWITCH_SYSTEM
2568 #define C_SWITCH_SYSTEM
2569 #endif
2570 configure___ c_switch_system=C_SWITCH_SYSTEM
2571
2572
2573 #ifndef LD_SWITCH_MACHINE
2574 #define LD_SWITCH_MACHINE
2575 #endif
2576 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2577
2578 #ifndef LD_SWITCH_SYSTEM
2579 #define LD_SWITCH_SYSTEM
2580 #endif
2581 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2582
2583
2584 #ifndef UNEXEC
2585 #define UNEXEC "unexec.o"
2586 #endif
2587 configure___ unexec=UNEXEC
2588
2589
2590 #ifndef LD_SWITCH_SHARED
2591 #define LD_SWITCH_SHARED "-c"
2592 #endif
2593 configure___ ld_switch_shared=LD_SWITCH_SHARED
2594
2595
2596 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2597 configure___ ordinary_ld=ORDINARY_LD
2598
2599 #ifdef ORDINARY_LINK
2600 #define LD ORDINARY_LD
2601 #else /* no ORDINARY LINK */
2602 #ifdef COFF_ENCAPSULATE
2603 #define LD "\$(CC) -nostdlib"
2604 #else /* not COFF_ENCAPSULATE */
2605 #ifdef LINKER
2606 #define LD LINKER
2607 #else /* ! defined (LINKER) */
2608 #define LD "ld"
2609 #endif /* ! defined (LINKER) */
2610 #endif /* ! defined (COFF_ENCAPSULATE) */
2611 #endif /* not ORDINARY_LINK */
2612 configure___ ld=LD
2613
2614 #ifndef LIB_GCC
2615 #define LIB_GCC
2616 #endif
2617 configure___ lib_gcc=LIB_GCC
2618
2619 #ifndef LD_TEXT_START_ADDR
2620 #define LD_TEXT_START_ADDR
2621 #endif
2622 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2623
2624
2625 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2626 #ifdef NO_REMAP
2627 #ifdef COFF_ENCAPSULATE
2628 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2629 #else /* ! defined (COFF_ENCAPSULATE) */
2630 #define START_FILES "pre-crt0.o /lib/crt0.o"
2631 #endif /* ! defined (COFF_ENCAPSULATE) */
2632 #else /* ! defined (NO_REMAP) */
2633 #define START_FILES "ecrt0.o"
2634 #endif /* ! defined (NO_REMAP) */
2635 #endif /* no ORDINARY_LINK */
2636 #ifndef START_FILES
2637 #define START_FILES
2638 #endif
2639 configure___ start_files=START_FILES
2640
2641 #ifdef ORDINARY_LINK
2642 configure___ ordinary_link=yes
2643 #else
2644 configure___ ordinary_link=no
2645 #endif
2646
2647 #ifdef SYSTEM_MALLOC
2648 configure___ system_malloc=yes
2649 #else
2650 configure___ system_malloc=no
2651 #endif
2652
2653 #ifdef TERMINFO
2654 configure___ have_terminfo=yes
2655 #else
2656 configure___ have_terminfo=no
2657 #endif
2658
2659 #ifdef MAIL_USE_FLOCK
2660 configure___ mail_use_flock=yes
2661 #else
2662 configure___ mail_use_flock=no
2663 #endif
2664
2665 #ifdef MAIL_USE_LOCKF
2666 configure___ mail_use_lockf=yes
2667 #else
2668 configure___ mail_use_lockf=no
2669 #endif
2670
2671 #ifdef MAIL_USE_LOCKING
2672 configure___ mail_use_locking=yes
2673 #else
2674 configure___ mail_use_locking=no
2675 #endif
2676
2677 #ifdef HAVE_WIN32_PROCESSES
2678 configure___ win32_processes=yes
2679 #else
2680 configure___ win32_processes=no
2681 #endif
2682
2683 EOF
2684
2685 CPP=`eval "echo $CPP $CPPFLAGS"`
2686 eval `$CPP -Isrc $tempcname \
2687         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2688
2689 rm $tempcname
2690
2691 if test "$pdump" = "yes"; then
2692   ordinary_link="yes"
2693   ld="${ordinary_ld}"
2694   start_files=
2695   libs_standard=
2696   unexec=
2697   lib_gcc=
2698 fi
2699
2700 test "$extra_verbose" = "yes" && \
2701   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 ""
2702
2703 case "$opsys" in mingw* | cygwin*)
2704   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2705   cygwin_include=`eval "dirname $cygwin_include"` ;
2706   cygwin_include="-I$cygwin_include/../include" ;
2707   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2708   case "$opsys" in mingw*)
2709     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2710   esac
2711   ;;
2712 esac
2713
2714 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2715
2716
2717 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2718
2719 if test "$__USLC__" = yes; then
2720   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2721 echo "configure:2722: checking for whether the -Kalloca compiler flag is needed" >&5
2722   need_kalloca=no
2723   cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726
2727 int main() {
2728 void *x = alloca(4);
2729 ; return 0; }
2730 EOF
2731 if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2732   rm -rf conftest*
2733   :
2734 else
2735   echo "configure: failed program was:" >&5
2736   cat conftest.$ac_ext >&5
2737   rm -rf conftest*
2738   
2739     xe_save_c_switch_system="$c_switch_system"
2740     c_switch_system="$c_switch_system -Kalloca"
2741     cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744
2745 int main() {
2746 void *x = alloca(4);
2747 ; return 0; }
2748 EOF
2749 if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2750   rm -rf conftest*
2751    need_kalloca=yes 
2752 else
2753   echo "configure: failed program was:" >&5
2754   cat conftest.$ac_ext >&5
2755 fi
2756 rm -f conftest*
2757     c_switch_system="$xe_save_c_switch_system"
2758 fi
2759 rm -f conftest*
2760   echo "$ac_t""$need_kalloca" 1>&6
2761   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
2762 fi
2763
2764 if test "$cflags_specified" = "no"; then
2765       if   test "$GCC" = "yes"; then
2766     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2767         CFLAGS="$CFLAGS -Wsign-compare"
2768                 if test "$xemacs_compiler" != "g++"; then
2769       CFLAGS="$CFLAGS -Wshadow"
2770     fi
2771             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2772               elif test "$__SUNPRO_C" = "yes"; then
2773     case "$opsys" in
2774       sol2    ) CFLAGS="-v -xO4" ;;
2775       sunos4* ) CFLAGS="-xO2";;
2776     esac
2777   elif test "$__DECC" = "yes"; then
2778     CFLAGS="-O3"
2779   elif test "$CC" = "xlc"; then
2780     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2781     else
2782     CFLAGS="-O" ;  fi
2783 fi
2784
2785 if test "$GCC" = "yes"; then
2786 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2787 echo "configure:2788: checking for buggy gcc versions" >&5
2788 GCC_VERSION=`$CC --version`
2789 case `uname -s`:`uname -m`:$GCC_VERSION in
2790                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2791                         case "$CFLAGS" in
2792             *-O2*|*-O3*)
2793                 case "$CFLAGS" in
2794                     *-fno-schedule-insns*) ;;
2795                     *)
2796                         echo "$ac_t""yes" 1>&6
2797                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2798                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2799                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2800                         ;;
2801                 esac
2802                 ;;
2803         esac
2804         ;;
2805                     Linux:alpha:egcs-2.91.*)
2806         echo "$ac_t""yes" 1>&6
2807         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2808         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2809         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2810         ;;
2811     *:i*86*:2.7.2*)
2812         case "$CFLAGS" in
2813             *-O2*|*-O3*)
2814                 case "$GCC_VERSION" in
2815                     2.7.2)
2816                         case "$CFLAGS" in
2817                             *-fno-strength-reduce*) ;;
2818                             *)
2819                                 echo "$ac_t""yes" 1>&6
2820                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2821                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2822                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2823                                 ;;
2824                         esac
2825                         ;;
2826                 esac
2827                 case "$CFLAGS" in
2828                  *-fno-caller-saves*) ;;
2829                  *)
2830                     echo "$ac_t""yes" 1>&6
2831                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2832                     echo "configure: warning: -fno-caller-saves." 1>&2
2833                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2834                     ;;
2835                 esac
2836                 ;;
2837         esac
2838         ;;
2839 esac
2840 echo "$ac_t""no" 1>&6
2841 fi
2842
2843
2844 if test "$GCC" = "yes"; then
2845   set x $ld_switch_system; shift; ld_switch_system=""
2846   while test -n "$1"; do
2847     case $1 in
2848       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2849       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2850       -Xlinker* ) ;;
2851       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2852     esac
2853     shift
2854   done
2855 fi
2856
2857 if test "$GCC" = "yes"; then
2858   set x $ld_switch_machine; shift; ld_switch_machine=""
2859   while test -n "$1"; do
2860     case $1 in
2861       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2862       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2863       -Xlinker* ) ;;
2864       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2865     esac
2866     shift
2867   done
2868 fi
2869
2870 if test "$GCC" = "yes"; then
2871   set x $LDFLAGS; shift; LDFLAGS=""
2872   while test -n "$1"; do
2873     case $1 in
2874       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2875       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2876       -Xlinker* ) ;;
2877       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2878     esac
2879     shift
2880   done
2881 fi
2882
2883 if test "$GCC" = "yes"; then
2884   set x $ld_call_shared; shift; ld_call_shared=""
2885   while test -n "$1"; do
2886     case $1 in
2887       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2888       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2889       -Xlinker* ) ;;
2890       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2891     esac
2892     shift
2893   done
2894 fi
2895
2896 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"$objects_machine\""
2898  fi
2899 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2900    echo "    xemacs will be linked with \"$objects_system\""
2901  fi
2902 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2903    echo "    xemacs will be linked with \"$unexec\""
2904  fi
2905 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2906    echo "    xemacs will be linked with \"dumper.o\""
2907  fi
2908
2909 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2910 echo "configure:2911: checking for dynodump" >&5
2911 if test "$unexec" != "unexsol2.o"; then
2912   echo "$ac_t""no" 1>&6
2913 else
2914   echo "$ac_t""yes" 1>&6
2915   { test "$extra_verbose" = "yes" && cat << \EOF
2916     Defining DYNODUMP
2917 EOF
2918 cat >> confdefs.h <<\EOF
2919 #define DYNODUMP 1
2920 EOF
2921 }
2922
2923   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2924   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2925   case "$machine" in
2926     sparc   ) dynodump_arch=sparc ;;
2927     *86*    ) dynodump_arch=i386  ;;
2928     powerpc ) dynodump_arch=ppc   ;;
2929   esac
2930     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
2931 fi
2932
2933
2934 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2935
2936 if test "$unexec" = "unexaix.o"; then
2937   if   test "$dynamic" = "no"; then
2938   start_flags="-Wl,-bnso,-bnodelcsect"
2939   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2940   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2941     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2942   done
2943   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2944     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2945   done
2946   
2947 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2948 echo "configure:2949: checking for terminateAndUnload in -lC" >&5
2949 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2950
2951 xe_check_libs=" -lC "
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 /* Override any gcc2 internal prototype to avoid an error.  */
2956 /* We use char because int might match the return type of a gcc2
2957     builtin and then its argument prototype would still apply.  */
2958 char terminateAndUnload();
2959
2960 int main() {
2961 terminateAndUnload()
2962 ; return 0; }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2965   rm -rf conftest*
2966   eval "ac_cv_lib_$ac_lib_var=yes"
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -rf conftest*
2971   eval "ac_cv_lib_$ac_lib_var=no"
2972 fi
2973 rm -f conftest*
2974 xe_check_libs=""
2975
2976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2977   echo "$ac_t""yes" 1>&6
2978   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983
2984   fi
2985 elif test -n "$ld_text_start_addr"; then
2986   start_flags="-T $ld_text_start_addr -e __start"
2987 fi
2988
2989
2990
2991
2992 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2993  test -z "$linker" &&  linker='$(CC) -nostdlib'
2994  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2995 fi
2996 test "$GCC" != "yes" && lib_gcc=
2997
2998
2999
3000
3001
3002 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3003 if test -n "$site_libraries"; then
3004   for arg in $site_libraries; do
3005     case "$arg" in
3006      -* ) ;;
3007      * ) test -d "$arg" || \
3008            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3009        arg="-L${arg}" ;;
3010     esac
3011     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3012   done
3013 fi
3014
3015 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3016 if test -n "$site_includes"; then
3017   for arg in $site_includes; do
3018     case "$arg" in
3019       -* ) ;;
3020       * ) test -d "$arg" || \
3021            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3022       arg="-I${arg}" ;;
3023     esac
3024     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3025   done
3026 fi
3027
3028 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3029 if test -n "$site_prefixes"; then
3030   for dir in $site_prefixes; do
3031     lib_dir="${dir}/lib"
3032     inc_dir="${dir}/include"
3033     if test ! -d "$dir"; then
3034       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3035     elif test ! -d "$lib_dir"; then
3036       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3037     else
3038       if test -d "$inc_dir"; then
3039         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
3040       fi
3041       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
3042     fi
3043   done
3044 fi
3045
3046
3047 for dir in "/usr/ccs/lib"; do
3048   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
3049 done
3050
3051 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3052 if test -n "$site_runtime_libraries"; then
3053   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3054   export LD_RUN_PATH
3055 fi
3056
3057
3058
3059
3060
3061 if test -n "$add_runtime_path"; then :;
3062 elif test "$dynamic" = "no"; then add_runtime_path=no
3063 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3064 else case "$opsys" in
3065        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3066        * ) add_runtime_path=no ;;
3067      esac
3068 fi
3069
3070 if test "$add_runtime_path" = "yes"; then
3071       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3072 echo "configure:3073: checking "for runtime libraries flag"" >&5
3073   case "$opsys" in
3074     sol2 ) dash_r="-R" ;;
3075     decosf* | linux* | irix*) dash_r="-rpath " ;;
3076     *)
3077       dash_r=""
3078       for try_dash_r in "-R" "-R " "-rpath "; do
3079         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3080         
3081 if test "$GCC" = "yes"; then
3082   set x $xe_check_libs; shift; xe_check_libs=""
3083   while test -n "$1"; do
3084     case $1 in
3085       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3086       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3087       -Xlinker* ) ;;
3088       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3089     esac
3090     shift
3091   done
3092 fi
3093         cat > conftest.$ac_ext <<EOF
3094 #line 3095 "configure"
3095 #include "confdefs.h"
3096
3097 int main() {
3098
3099 ; return 0; }
3100 EOF
3101 if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3102   rm -rf conftest*
3103   dash_r="$try_dash_r"
3104 else
3105   echo "configure: failed program was:" >&5
3106   cat conftest.$ac_ext >&5
3107 fi
3108 rm -f conftest*
3109         xe_check_libs=""
3110         test -n "$dash_r" && break
3111       done ;;
3112   esac
3113   if test -n "$dash_r";
3114     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3115     else echo "$ac_t""NONE" 1>&6
3116   fi
3117 fi
3118
3119 xe_add_unique_runpath_dir='
3120   xe_add_p=yes
3121   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3122   done
3123   if test "$xe_add_p" = "yes"; then
3124     test -n "$runpath" && runpath="${runpath}:"
3125     runpath="${runpath}${xe_runpath_dir}"
3126     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3127   fi'
3128
3129
3130
3131
3132 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3133     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3134   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3135   
3136         runpath="" runpath_dirs=""
3137   if test -n "$LD_RUN_PATH"; then
3138     runpath="$LD_RUN_PATH"
3139   elif test "$GCC" = "yes"; then
3140         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3141     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3142     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3143     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3144       case "$arg" in P,* | -L* | -R* )
3145         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3146           {
3147 xe_runpath_dir="$dir"
3148   test "$xe_runpath_dir" != "/lib"     -a \
3149         "$xe_runpath_dir" != "/usr/lib" -a \
3150         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3151   eval "$xe_add_unique_runpath_dir"
3152 }
3153         done ;;
3154       esac
3155     done
3156     ld_switch_run="$ld_switch_run_save"
3157     rm -f conftest*
3158   else
3159         for arg in $ld_switch_site $ld_switch_x_site; do
3160       case "$arg" in -L*) {
3161 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3162   test "$xe_runpath_dir" != "/lib"     -a \
3163         "$xe_runpath_dir" != "/usr/lib" -a \
3164         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3165   eval "$xe_add_unique_runpath_dir"
3166 };; esac
3167     done
3168         if test "$opsys $need_motif" = "sol2 yes"; then
3169       xe_runpath_dir="/opt/SUNWdt/lib";
3170       eval "$xe_add_unique_runpath_dir";
3171     fi
3172   fi 
3173   if test -n "$runpath"; then
3174     ld_switch_run="${dash_r}${runpath}"
3175     
3176 if test "$GCC" = "yes"; then
3177   set x $ld_switch_run; shift; ld_switch_run=""
3178   while test -n "$1"; do
3179     case $1 in
3180       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3181       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3182       -Xlinker* ) ;;
3183       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3184     esac
3185     shift
3186   done
3187 fi
3188     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3189   fi
3190 fi
3191
3192
3193
3194 GNU_MALLOC=yes
3195 if test "$with_dlmalloc" != "no"; then
3196         doug_lea_malloc=yes
3197 else
3198         doug_lea_malloc=no
3199 fi
3200 after_morecore_hook_exists=yes
3201 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3202 echo "configure:3203: checking for malloc_set_state" >&5
3203
3204 cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207 /* System header to define __stub macros and hopefully few prototypes,
3208     which can conflict with char malloc_set_state(); below.  */
3209 #include <assert.h>
3210 /* Override any gcc2 internal prototype to avoid an error.  */
3211 /* We use char because int might match the return type of a gcc2
3212     builtin and then its argument prototype would still apply.  */
3213 char malloc_set_state();
3214
3215 int main() {
3216
3217 /* The GNU C library defines this for functions which it implements
3218     to always fail with ENOSYS.  Some functions are actually named
3219     something starting with __ and the normal name is an alias.  */
3220 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3221 choke me
3222 #else
3223 malloc_set_state();
3224 #endif
3225
3226 ; return 0; }
3227 EOF
3228 if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3229   rm -rf conftest*
3230   eval "ac_cv_func_malloc_set_state=yes"
3231 else
3232   echo "configure: failed program was:" >&5
3233   cat conftest.$ac_ext >&5
3234   rm -rf conftest*
3235   eval "ac_cv_func_malloc_set_state=no"
3236 fi
3237 rm -f conftest*
3238
3239 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3240   echo "$ac_t""yes" 1>&6
3241   :
3242 else
3243   echo "$ac_t""no" 1>&6
3244 doug_lea_malloc=no
3245 fi
3246
3247 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3248 echo "configure:3249: checking whether __after_morecore_hook exists" >&5
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 extern void (* __after_morecore_hook)();
3253 int main() {
3254 __after_morecore_hook = 0
3255 ; return 0; }
3256 EOF
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3258   rm -rf conftest*
3259   echo "$ac_t""yes" 1>&6
3260 else
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   echo "$ac_t""no" 1>&6
3265    after_morecore_hook_exists=no
3266 fi
3267 rm -f conftest*
3268 if test "$system_malloc" = "yes" ; then
3269   GNU_MALLOC=no
3270   GNU_MALLOC_reason="
3271     - The GNU allocators don't work with this system configuration."
3272 elif test "$with_system_malloc" = "yes" ; then
3273   GNU_MALLOC=no
3274   GNU_MALLOC_reason="
3275     - User chose not to use GNU allocators."
3276 elif test "$with_debug_malloc" = "yes" ; then
3277   GNU_MALLOC=no
3278   GNU_MALLOC_reason="
3279     - User chose to use Debugging Malloc."
3280 fi
3281
3282 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3283   GNU_MALLOC_reason="
3284     - Using Doug Lea's new malloc from the GNU C Library."
3285   { test "$extra_verbose" = "yes" && cat << \EOF
3286     Defining DOUG_LEA_MALLOC
3287 EOF
3288 cat >> confdefs.h <<\EOF
3289 #define DOUG_LEA_MALLOC 1
3290 EOF
3291 }
3292
3293   if test "$after_morecore_hook_exists" = "no" ; then
3294     GNU_MALLOC_reason="
3295     - Using Doug Lea's new malloc from the Linux C Library."
3296     { test "$extra_verbose" = "yes" && cat << \EOF
3297     Defining _NO_MALLOC_WARNING_
3298 EOF
3299 cat >> confdefs.h <<\EOF
3300 #define _NO_MALLOC_WARNING_ 1
3301 EOF
3302 }
3303
3304   fi
3305 fi
3306
3307
3308
3309
3310 # Extract the first word of "ranlib", so it can be a program name with args.
3311 set dummy ranlib; ac_word=$2
3312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_word" >&5
3314
3315 if test -n "$RANLIB"; then
3316   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3317 else
3318   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3319   ac_dummy="$PATH"
3320   for ac_dir in $ac_dummy; do
3321     test -z "$ac_dir" && ac_dir=.
3322     if test -f $ac_dir/$ac_word; then
3323       ac_cv_prog_RANLIB="ranlib"
3324       break
3325     fi
3326   done
3327   IFS="$ac_save_ifs"
3328   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3329 fi
3330 RANLIB="$ac_cv_prog_RANLIB"
3331 if test -n "$RANLIB"; then
3332   echo "$ac_t""$RANLIB" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337 ac_aux_dir=
3338 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3339   if test -f $ac_dir/install-sh; then
3340     ac_aux_dir=$ac_dir
3341     ac_install_sh="$ac_aux_dir/install-sh -c"
3342     break
3343   elif test -f $ac_dir/install.sh; then
3344     ac_aux_dir=$ac_dir
3345     ac_install_sh="$ac_aux_dir/install.sh -c"
3346     break
3347   fi
3348 done
3349 if test -z "$ac_aux_dir"; then
3350   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3351 fi
3352 ac_config_guess=$ac_aux_dir/config.guess
3353 ac_config_sub=$ac_aux_dir/config.sub
3354 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3355
3356 # Find a good install program.  We prefer a C program (faster),
3357 # so one script is as good as another.  But avoid the broken or
3358 # incompatible versions:
3359 # SysV /etc/install, /usr/sbin/install
3360 # SunOS /usr/etc/install
3361 # IRIX /sbin/install
3362 # AIX /bin/install
3363 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3364 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3365 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3366 # ./install, which can be erroneously created by make from ./install.sh.
3367 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3368 echo "configure:3369: checking for a BSD compatible install" >&5
3369 if test -z "$INSTALL"; then
3370
3371   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3372   for ac_dir in $PATH; do
3373     # Account for people who put trailing slashes in PATH elements.
3374     case "$ac_dir/" in
3375     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3376     *)
3377       # OSF1 and SCO ODT 3.0 have their own names for install.
3378       # Don't use installbsd from OSF since it installs stuff as root
3379       # by default.
3380       for ac_prog in ginstall scoinst install; do
3381         if test -f $ac_dir/$ac_prog; then
3382           if test $ac_prog = install &&
3383             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3384             # AIX install.  It has an incompatible calling convention.
3385             :
3386           else
3387             ac_cv_path_install="$ac_dir/$ac_prog -c"
3388             break 2
3389           fi
3390         fi
3391       done
3392       ;;
3393     esac
3394   done
3395   IFS="$ac_save_IFS"
3396
3397   if test "${ac_cv_path_install+set}" = set; then
3398     INSTALL="$ac_cv_path_install"
3399   else
3400     # As a last resort, use the slow shell script.  We don't cache a
3401     # path for INSTALL within a source directory, because that will
3402     # break other packages using the cache if that directory is
3403     # removed, or if the path is relative.
3404     INSTALL="$ac_install_sh"
3405   fi
3406 fi
3407 echo "$ac_t""$INSTALL" 1>&6
3408
3409 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3410 # It thinks the first close brace ends the variable substitution.
3411 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3412
3413 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3414
3415 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3416
3417 for ac_prog in 'bison -y' byacc
3418 do
3419 # Extract the first word of "$ac_prog", so it can be a program name with args.
3420 set dummy $ac_prog; ac_word=$2
3421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3422 echo "configure:3423: checking for $ac_word" >&5
3423
3424 if test -n "$YACC"; then
3425   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3426 else
3427   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3428   ac_dummy="$PATH"
3429   for ac_dir in $ac_dummy; do
3430     test -z "$ac_dir" && ac_dir=.
3431     if test -f $ac_dir/$ac_word; then
3432       ac_cv_prog_YACC="$ac_prog"
3433       break
3434     fi
3435   done
3436   IFS="$ac_save_ifs"
3437 fi
3438 YACC="$ac_cv_prog_YACC"
3439 if test -n "$YACC"; then
3440   echo "$ac_t""$YACC" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445 test -n "$YACC" && break
3446 done
3447 test -n "$YACC" || YACC="yacc"
3448
3449
3450 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 
3451 do
3452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3454 echo "configure:3455: checking for $ac_hdr" >&5
3455
3456 cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459 #include <$ac_hdr>
3460 EOF
3461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3462 { (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3464 if test -z "$ac_err"; then
3465   rm -rf conftest*
3466   eval "ac_cv_header_$ac_safe=yes"
3467 else
3468   echo "$ac_err" >&5
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -rf conftest*
3472   eval "ac_cv_header_$ac_safe=no"
3473 fi
3474 rm -f conftest*
3475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3476   echo "$ac_t""yes" 1>&6
3477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3478   { test "$extra_verbose" = "yes" && cat << EOF
3479     Defining $ac_tr_hdr
3480 EOF
3481 cat >> confdefs.h <<EOF
3482 #define $ac_tr_hdr 1
3483 EOF
3484 }
3485  
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489 done
3490
3491 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3492 echo "configure:3493: checking for sys/wait.h that is POSIX.1 compatible" >&5
3493
3494 cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <sys/types.h>
3498 #include <sys/wait.h>
3499 #ifndef WEXITSTATUS
3500 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3501 #endif
3502 #ifndef WIFEXITED
3503 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3504 #endif
3505 int main() {
3506 int s;
3507 wait (&s);
3508 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3509 ; return 0; }
3510 EOF
3511 if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3512   rm -rf conftest*
3513   ac_cv_header_sys_wait_h=yes
3514 else
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -rf conftest*
3518   ac_cv_header_sys_wait_h=no
3519 fi
3520 rm -f conftest*
3521
3522 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3523 if test $ac_cv_header_sys_wait_h = yes; then
3524   { test "$extra_verbose" = "yes" && cat << \EOF
3525     Defining HAVE_SYS_WAIT_H
3526 EOF
3527 cat >> confdefs.h <<\EOF
3528 #define HAVE_SYS_WAIT_H 1
3529 EOF
3530 }
3531
3532 fi
3533
3534 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3535 echo "configure:3536: checking for ANSI C header files" >&5
3536
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 #include <stdlib.h>
3541 #include <stdarg.h>
3542 #include <string.h>
3543 #include <float.h>
3544 EOF
3545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3546 { (eval echo configure:3547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3548 if test -z "$ac_err"; then
3549   rm -rf conftest*
3550   ac_cv_header_stdc=yes
3551 else
3552   echo "$ac_err" >&5
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   ac_cv_header_stdc=no
3557 fi
3558 rm -f conftest*
3559
3560 if test $ac_cv_header_stdc = yes; then
3561   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3562 cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565 #include <string.h>
3566 EOF
3567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3568   egrep "memchr" >/dev/null 2>&1; then
3569   :
3570 else
3571   rm -rf conftest*
3572   ac_cv_header_stdc=no
3573 fi
3574 rm -f conftest*
3575
3576 fi
3577
3578 if test $ac_cv_header_stdc = yes; then
3579   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3580 cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <stdlib.h>
3584 EOF
3585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3586   egrep "free" >/dev/null 2>&1; then
3587   :
3588 else
3589   rm -rf conftest*
3590   ac_cv_header_stdc=no
3591 fi
3592 rm -f conftest*
3593
3594 fi
3595
3596 if test $ac_cv_header_stdc = yes; then
3597   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <ctype.h>
3602 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3603 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3604 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3605 int main () { int i; for (i = 0; i < 256; i++)
3606 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3607 exit (0); }
3608
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3611 then
3612   :
3613 else
3614   conftest_rc="$?"
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -fr conftest*
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -fr conftest*
3621 fi
3622
3623 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3624 if test $ac_cv_header_stdc = yes; then
3625   { test "$extra_verbose" = "yes" && cat << \EOF
3626     Defining STDC_HEADERS
3627 EOF
3628 cat >> confdefs.h <<\EOF
3629 #define STDC_HEADERS 1
3630 EOF
3631 }
3632
3633 fi
3634
3635 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3636 echo "configure:3637: checking whether time.h and sys/time.h may both be included" >&5
3637
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <sys/types.h>
3642 #include <sys/time.h>
3643 #include <time.h>
3644 int main() {
3645 struct tm *tp;
3646 ; return 0; }
3647 EOF
3648 if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3649   rm -rf conftest*
3650   ac_cv_header_time=yes
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -rf conftest*
3655   ac_cv_header_time=no
3656 fi
3657 rm -f conftest*
3658
3659 echo "$ac_t""$ac_cv_header_time" 1>&6
3660 if test $ac_cv_header_time = yes; then
3661   { test "$extra_verbose" = "yes" && cat << \EOF
3662     Defining TIME_WITH_SYS_TIME
3663 EOF
3664 cat >> confdefs.h <<\EOF
3665 #define TIME_WITH_SYS_TIME 1
3666 EOF
3667 }
3668
3669 fi
3670
3671 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3672 echo "configure:3673: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3673
3674 cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <sys/types.h>
3678 #include <signal.h>
3679 /* NetBSD declares sys_siglist in unistd.h.  */
3680 #ifdef HAVE_UNISTD_H
3681 #include <unistd.h>
3682 #endif
3683 int main() {
3684 char *msg = *(sys_siglist + 1);
3685 ; return 0; }
3686 EOF
3687 if { (eval echo configure:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3688   rm -rf conftest*
3689   ac_cv_decl_sys_siglist=yes
3690 else
3691   echo "configure: failed program was:" >&5
3692   cat conftest.$ac_ext >&5
3693   rm -rf conftest*
3694   ac_cv_decl_sys_siglist=no
3695 fi
3696 rm -f conftest*
3697
3698 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3699 if test $ac_cv_decl_sys_siglist = yes; then
3700   { test "$extra_verbose" = "yes" && cat << \EOF
3701     Defining SYS_SIGLIST_DECLARED
3702 EOF
3703 cat >> confdefs.h <<\EOF
3704 #define SYS_SIGLIST_DECLARED 1
3705 EOF
3706 }
3707
3708 fi
3709
3710
3711
3712 echo $ac_n "checking for utime""... $ac_c" 1>&6
3713 echo "configure:3714: checking for utime" >&5
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <sys/types.h>
3718 #include <utime.h>
3719 int main() {
3720 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3721 ; return 0; }
3722 EOF
3723 if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3724   rm -rf conftest*
3725   echo "$ac_t""yes" 1>&6
3726    { test "$extra_verbose" = "yes" && cat << \EOF
3727     Defining HAVE_UTIME
3728 EOF
3729 cat >> confdefs.h <<\EOF
3730 #define HAVE_UTIME 1
3731 EOF
3732 }
3733
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -rf conftest*
3738   echo "$ac_t""no" 1>&6
3739       for ac_func in utimes
3740 do
3741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3742 echo "configure:3743: checking for $ac_func" >&5
3743
3744 cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747 /* System header to define __stub macros and hopefully few prototypes,
3748     which can conflict with char $ac_func(); below.  */
3749 #include <assert.h>
3750 /* Override any gcc2 internal prototype to avoid an error.  */
3751 /* We use char because int might match the return type of a gcc2
3752     builtin and then its argument prototype would still apply.  */
3753 char $ac_func();
3754
3755 int main() {
3756
3757 /* The GNU C library defines this for functions which it implements
3758     to always fail with ENOSYS.  Some functions are actually named
3759     something starting with __ and the normal name is an alias.  */
3760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3761 choke me
3762 #else
3763 $ac_func();
3764 #endif
3765
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3769   rm -rf conftest*
3770   eval "ac_cv_func_$ac_func=yes"
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   eval "ac_cv_func_$ac_func=no"
3776 fi
3777 rm -f conftest*
3778
3779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3782   { test "$extra_verbose" = "yes" && cat << EOF
3783     Defining $ac_tr_func
3784 EOF
3785 cat >> confdefs.h <<EOF
3786 #define $ac_tr_func 1
3787 EOF
3788 }
3789  
3790 else
3791   echo "$ac_t""no" 1>&6
3792 fi
3793 done
3794
3795 fi
3796 rm -f conftest*
3797
3798
3799 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3800 echo "configure:3801: checking return type of signal handlers" >&5
3801
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 #include <sys/types.h>
3806 #include <signal.h>
3807 #ifdef signal
3808 #undef signal
3809 #endif
3810 #ifdef __cplusplus
3811 extern "C" void (*signal (int, void (*)(int)))(int);
3812 #else
3813 void (*signal ()) ();
3814 #endif
3815
3816 int main() {
3817 int i;
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   rm -rf conftest*
3822   ac_cv_type_signal=void
3823 else
3824   echo "configure: failed program was:" >&5
3825   cat conftest.$ac_ext >&5
3826   rm -rf conftest*
3827   ac_cv_type_signal=int
3828 fi
3829 rm -f conftest*
3830
3831 echo "$ac_t""$ac_cv_type_signal" 1>&6
3832 { test "$extra_verbose" = "yes" && cat << EOF
3833     Defining RETSIGTYPE = $ac_cv_type_signal
3834 EOF
3835 cat >> confdefs.h <<EOF
3836 #define RETSIGTYPE $ac_cv_type_signal
3837 EOF
3838 }
3839
3840
3841 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3842 echo "configure:3843: checking for size_t" >&5
3843
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 #if STDC_HEADERS
3849 #include <stdlib.h>
3850 #include <stddef.h>
3851 #endif
3852 EOF
3853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3854   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3855   rm -rf conftest*
3856   ac_cv_type_size_t=yes
3857 else
3858   rm -rf conftest*
3859   ac_cv_type_size_t=no
3860 fi
3861 rm -f conftest*
3862
3863 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3864 if test $ac_cv_type_size_t = no; then
3865   { test "$extra_verbose" = "yes" && cat << \EOF
3866     Defining size_t = unsigned
3867 EOF
3868 cat >> confdefs.h <<\EOF
3869 #define size_t unsigned
3870 EOF
3871 }
3872
3873 fi
3874
3875 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3876 echo "configure:3877: checking for pid_t" >&5
3877
3878 cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881 #include <sys/types.h>
3882 #if STDC_HEADERS
3883 #include <stdlib.h>
3884 #include <stddef.h>
3885 #endif
3886 EOF
3887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3888   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3889   rm -rf conftest*
3890   ac_cv_type_pid_t=yes
3891 else
3892   rm -rf conftest*
3893   ac_cv_type_pid_t=no
3894 fi
3895 rm -f conftest*
3896
3897 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3898 if test $ac_cv_type_pid_t = no; then
3899   { test "$extra_verbose" = "yes" && cat << \EOF
3900     Defining pid_t = int
3901 EOF
3902 cat >> confdefs.h <<\EOF
3903 #define pid_t int
3904 EOF
3905 }
3906
3907 fi
3908
3909 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3910 echo "configure:3911: checking for uid_t in sys/types.h" >&5
3911
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <sys/types.h>
3916 EOF
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918   egrep "uid_t" >/dev/null 2>&1; then
3919   rm -rf conftest*
3920   ac_cv_type_uid_t=yes
3921 else
3922   rm -rf conftest*
3923   ac_cv_type_uid_t=no
3924 fi
3925 rm -f conftest*
3926
3927
3928 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3929 if test $ac_cv_type_uid_t = no; then
3930   { test "$extra_verbose" = "yes" && cat << \EOF
3931     Defining uid_t = int
3932 EOF
3933 cat >> confdefs.h <<\EOF
3934 #define uid_t int
3935 EOF
3936 }
3937
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining gid_t = int
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define gid_t int
3943 EOF
3944 }
3945
3946 fi
3947
3948 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3949 echo "configure:3950: checking for mode_t" >&5
3950
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <sys/types.h>
3955 #if STDC_HEADERS
3956 #include <stdlib.h>
3957 #include <stddef.h>
3958 #endif
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_mode_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_mode_t=no
3967 fi
3968 rm -f conftest*
3969
3970 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3971 if test $ac_cv_type_mode_t = no; then
3972   { test "$extra_verbose" = "yes" && cat << \EOF
3973     Defining mode_t = int
3974 EOF
3975 cat >> confdefs.h <<\EOF
3976 #define mode_t int
3977 EOF
3978 }
3979
3980 fi
3981
3982 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3983 echo "configure:3984: checking for off_t" >&5
3984
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <sys/types.h>
3989 #if STDC_HEADERS
3990 #include <stdlib.h>
3991 #include <stddef.h>
3992 #endif
3993 EOF
3994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3995   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3996   rm -rf conftest*
3997   ac_cv_type_off_t=yes
3998 else
3999   rm -rf conftest*
4000   ac_cv_type_off_t=no
4001 fi
4002 rm -f conftest*
4003
4004 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4005 if test $ac_cv_type_off_t = no; then
4006   { test "$extra_verbose" = "yes" && cat << \EOF
4007     Defining off_t = long
4008 EOF
4009 cat >> confdefs.h <<\EOF
4010 #define off_t long
4011 EOF
4012 }
4013
4014 fi
4015
4016 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4017 echo "configure:4018: checking for ssize_t" >&5
4018
4019 cat > conftest.$ac_ext <<EOF
4020 #line 4021 "configure"
4021 #include "confdefs.h"
4022 #include <sys/types.h>
4023 #if STDC_HEADERS
4024 #include <stdlib.h>
4025 #include <stddef.h>
4026 #endif
4027 EOF
4028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4029   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4030   rm -rf conftest*
4031   ac_cv_type_ssize_t=yes
4032 else
4033   rm -rf conftest*
4034   ac_cv_type_ssize_t=no
4035 fi
4036 rm -f conftest*
4037
4038 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4039 if test $ac_cv_type_ssize_t = no; then
4040   { test "$extra_verbose" = "yes" && cat << \EOF
4041     Defining ssize_t = int
4042 EOF
4043 cat >> confdefs.h <<\EOF
4044 #define ssize_t int
4045 EOF
4046 }
4047
4048 fi
4049
4050
4051 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4052 echo "configure:4053: checking for socklen_t" >&5
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <sys/socket.h>
4057 socklen_t x;
4058
4059 int main() {
4060
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   echo "$ac_t""yes" 1>&6
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   
4071 cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074 #include <sys/socket.h>
4075 int accept (int, struct sockaddr *, size_t *);
4076
4077 int main() {
4078
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4082   rm -rf conftest*
4083   
4084 echo "$ac_t""size_t" 1>&6
4085 { test "$extra_verbose" = "yes" && cat << \EOF
4086     Defining socklen_t = size_t
4087 EOF
4088 cat >> confdefs.h <<\EOF
4089 #define socklen_t size_t
4090 EOF
4091 }
4092
4093 else
4094   echo "configure: failed program was:" >&5
4095   cat conftest.$ac_ext >&5
4096   rm -rf conftest*
4097   
4098 echo "$ac_t""int" 1>&6
4099 { test "$extra_verbose" = "yes" && cat << \EOF
4100     Defining socklen_t = int
4101 EOF
4102 cat >> confdefs.h <<\EOF
4103 #define socklen_t int
4104 EOF
4105 }
4106
4107 fi
4108 rm -f conftest*
4109 fi
4110 rm -f conftest*
4111
4112 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4113 echo "configure:4114: checking for struct timeval" >&5
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #ifdef TIME_WITH_SYS_TIME
4118 #include <sys/time.h>
4119 #include <time.h>
4120 #else
4121 #ifdef HAVE_SYS_TIME_H
4122 #include <sys/time.h>
4123 #else
4124 #include <time.h>
4125 #endif
4126 #endif
4127 int main() {
4128 static struct timeval x; x.tv_sec = x.tv_usec;
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   echo "$ac_t""yes" 1>&6
4134   HAVE_TIMEVAL=yes
4135   { test "$extra_verbose" = "yes" && cat << \EOF
4136     Defining HAVE_TIMEVAL
4137 EOF
4138 cat >> confdefs.h <<\EOF
4139 #define HAVE_TIMEVAL 1
4140 EOF
4141 }
4142
4143 else
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   echo "$ac_t""no" 1>&6
4148    HAVE_TIMEVAL=no
4149 fi
4150 rm -f conftest*
4151
4152 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4153 echo "configure:4154: checking whether struct tm is in sys/time.h or time.h" >&5
4154
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <sys/types.h>
4159 #include <time.h>
4160 int main() {
4161 struct tm *tp; tp->tm_sec;
4162 ; return 0; }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4165   rm -rf conftest*
4166   ac_cv_struct_tm=time.h
4167 else
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   ac_cv_struct_tm=sys/time.h
4172 fi
4173 rm -f conftest*
4174
4175 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4176 if test $ac_cv_struct_tm = sys/time.h; then
4177   { test "$extra_verbose" = "yes" && cat << \EOF
4178     Defining TM_IN_SYS_TIME
4179 EOF
4180 cat >> confdefs.h <<\EOF
4181 #define TM_IN_SYS_TIME 1
4182 EOF
4183 }
4184
4185 fi
4186
4187 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4188 echo "configure:4189: checking for tm_zone in struct tm" >&5
4189
4190 cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <sys/types.h>
4194 #include <$ac_cv_struct_tm>
4195 int main() {
4196 struct tm tm; tm.tm_zone;
4197 ; return 0; }
4198 EOF
4199 if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4200   rm -rf conftest*
4201   ac_cv_struct_tm_zone=yes
4202 else
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   ac_cv_struct_tm_zone=no
4207 fi
4208 rm -f conftest*
4209
4210 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4211 if test "$ac_cv_struct_tm_zone" = yes; then
4212   { test "$extra_verbose" = "yes" && cat << \EOF
4213     Defining HAVE_TM_ZONE
4214 EOF
4215 cat >> confdefs.h <<\EOF
4216 #define HAVE_TM_ZONE 1
4217 EOF
4218 }
4219
4220 else
4221   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4222 echo "configure:4223: checking for tzname" >&5
4223
4224 cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <time.h>
4228 #ifndef tzname /* For SGI.  */
4229 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4230 #endif
4231 int main() {
4232 atoi(*tzname);
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4236   rm -rf conftest*
4237   ac_cv_var_tzname=yes
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   ac_cv_var_tzname=no
4243 fi
4244 rm -f conftest*
4245
4246 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4247   if test $ac_cv_var_tzname = yes; then
4248     { test "$extra_verbose" = "yes" && cat << \EOF
4249     Defining HAVE_TZNAME
4250 EOF
4251 cat >> confdefs.h <<\EOF
4252 #define HAVE_TZNAME 1
4253 EOF
4254 }
4255
4256   fi
4257 fi
4258
4259
4260 echo $ac_n "checking for working const""... $ac_c" 1>&6
4261 echo "configure:4262: checking for working const" >&5
4262
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266
4267 int main() {
4268
4269 /* Ultrix mips cc rejects this.  */
4270 typedef int charset[2]; const charset x;
4271 /* SunOS 4.1.1 cc rejects this.  */
4272 char const *const *ccp;
4273 char **p;
4274 /* NEC SVR4.0.2 mips cc rejects this.  */
4275 struct point {int x, y;};
4276 static struct point const zero = {0,0};
4277 /* AIX XL C 1.02.0.0 rejects this.
4278    It does not let you subtract one const X* pointer from another in an arm
4279    of an if-expression whose if-part is not a constant expression */
4280 const char *g = "string";
4281 ccp = &g + (g ? g-g : 0);
4282 /* HPUX 7.0 cc rejects these. */
4283 ++ccp;
4284 p = (char**) ccp;
4285 ccp = (char const *const *) p;
4286 { /* SCO 3.2v4 cc rejects this.  */
4287   char *t;
4288   char const *s = 0 ? (char *) 0 : (char const *) 0;
4289
4290   *t++ = 0;
4291 }
4292 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4293   int x[] = {25, 17};
4294   const int *foo = &x[0];
4295   ++foo;
4296 }
4297 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4298   typedef const int *iptr;
4299   iptr p = 0;
4300   ++p;
4301 }
4302 { /* AIX XL C 1.02.0.0 rejects this saying
4303      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4304   struct s { int j; const int *ap[3]; };
4305   struct s *b; b->j = 5;
4306 }
4307 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4308   const int foo = 10;
4309 }
4310
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4314   rm -rf conftest*
4315   ac_cv_c_const=yes
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   ac_cv_c_const=no
4321 fi
4322 rm -f conftest*
4323
4324 echo "$ac_t""$ac_cv_c_const" 1>&6
4325 if test $ac_cv_c_const = no; then
4326   { test "$extra_verbose" = "yes" && cat << \EOF
4327     Defining const = 
4328 EOF
4329 cat >> confdefs.h <<\EOF
4330 #define const 
4331 EOF
4332 }
4333
4334 fi
4335
4336
4337 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4338 echo "configure:4339: checking whether ${MAKE-make} sets \${MAKE}" >&5
4339 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4340
4341 cat > conftestmake <<\EOF
4342 all:
4343         @echo 'ac_maketemp="${MAKE}"'
4344 EOF
4345 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4346 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4347 if test -n "$ac_maketemp"; then
4348   eval ac_cv_prog_make_${ac_make}_set=yes
4349 else
4350   eval ac_cv_prog_make_${ac_make}_set=no
4351 fi
4352 rm -f conftestmake
4353 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4354   echo "$ac_t""yes" 1>&6
4355   SET_MAKE=
4356 else
4357   echo "$ac_t""no" 1>&6
4358   SET_MAKE="MAKE=${MAKE-make}"
4359 fi
4360
4361
4362 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4363 echo "configure:4364: checking whether byte ordering is bigendian" >&5
4364
4365 ac_cv_c_bigendian=unknown
4366 # See if sys/param.h defines the BYTE_ORDER macro.
4367 cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 #include <sys/types.h>
4371 #include <sys/param.h>
4372 int main() {
4373
4374 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4375  bogus endian macros
4376 #endif
4377 ; return 0; }
4378 EOF
4379 if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4380   rm -rf conftest*
4381   # It does; now see whether it defined to BIG_ENDIAN or not.
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <sys/types.h>
4386 #include <sys/param.h>
4387 int main() {
4388
4389 #if BYTE_ORDER != BIG_ENDIAN
4390  not big endian
4391 #endif
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4395   rm -rf conftest*
4396   ac_cv_c_bigendian=yes
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   ac_cv_c_bigendian=no
4402 fi
4403 rm -f conftest*
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407 fi
4408 rm -f conftest*
4409 if test $ac_cv_c_bigendian = unknown; then
4410 cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 main () {
4414   /* Are we little or big endian?  From Harbison&Steele.  */
4415   union
4416   {
4417     long l;
4418     char c[sizeof (long)];
4419   } u;
4420   u.l = 1;
4421   exit (u.c[sizeof (long) - 1] == 1);
4422 }
4423 EOF
4424 if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4425 then
4426   ac_cv_c_bigendian=no
4427 else
4428   conftest_rc="$?"
4429   echo "configure: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   rm -fr conftest*
4432   ac_cv_c_bigendian=yes
4433 fi
4434 rm -fr conftest*
4435 fi
4436
4437 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4438 if test $ac_cv_c_bigendian = yes; then
4439   { test "$extra_verbose" = "yes" && cat << \EOF
4440     Defining WORDS_BIGENDIAN
4441 EOF
4442 cat >> confdefs.h <<\EOF
4443 #define WORDS_BIGENDIAN 1
4444 EOF
4445 }
4446
4447 fi
4448
4449
4450 echo $ac_n "checking size of short""... $ac_c" 1>&6
4451 echo "configure:4452: checking size of short" >&5
4452
4453 cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456 #include <stdio.h>
4457 #include <sys/types.h>
4458 main()
4459 {
4460   FILE *f=fopen("conftestval", "w");
4461   if (!f) exit(1);
4462   fprintf(f, "%d\n", sizeof(short));
4463   exit(0);
4464 }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4467 then
4468   ac_cv_sizeof_short=`cat conftestval`
4469 else
4470   conftest_rc="$?"
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -fr conftest*
4474   ac_cv_sizeof_short=0
4475 fi
4476 rm -fr conftest*
4477 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4478 { test "$extra_verbose" = "yes" && cat << EOF
4479     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4480 EOF
4481 cat >> confdefs.h <<EOF
4482 #define SIZEOF_SHORT $ac_cv_sizeof_short
4483 EOF
4484 }
4485
4486
4487 if test "$ac_cv_sizeof_short" = 0; then
4488   echo ""
4489   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4490   echo "*** PANIC *** Please examine config.log for compilation errors."
4491   exit 1
4492 fi
4493 echo $ac_n "checking size of int""... $ac_c" 1>&6
4494 echo "configure:4495: checking size of int" >&5
4495
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 #include <stdio.h>
4500 #include <sys/types.h>
4501 main()
4502 {
4503   FILE *f=fopen("conftestval", "w");
4504   if (!f) exit(1);
4505   fprintf(f, "%d\n", sizeof(int));
4506   exit(0);
4507 }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4510 then
4511   ac_cv_sizeof_int=`cat conftestval`
4512 else
4513   conftest_rc="$?"
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -fr conftest*
4517   ac_cv_sizeof_int=0
4518 fi
4519 rm -fr conftest*
4520 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4521 { test "$extra_verbose" = "yes" && cat << EOF
4522     Defining SIZEOF_INT = $ac_cv_sizeof_int
4523 EOF
4524 cat >> confdefs.h <<EOF
4525 #define SIZEOF_INT $ac_cv_sizeof_int
4526 EOF
4527 }
4528
4529
4530 echo $ac_n "checking size of long""... $ac_c" 1>&6
4531 echo "configure:4532: checking size of long" >&5
4532
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536 #include <stdio.h>
4537 #include <sys/types.h>
4538 main()
4539 {
4540   FILE *f=fopen("conftestval", "w");
4541   if (!f) exit(1);
4542   fprintf(f, "%d\n", sizeof(long));
4543   exit(0);
4544 }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4547 then
4548   ac_cv_sizeof_long=`cat conftestval`
4549 else
4550   conftest_rc="$?"
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -fr conftest*
4554   ac_cv_sizeof_long=0
4555 fi
4556 rm -fr conftest*
4557 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4558 { test "$extra_verbose" = "yes" && cat << EOF
4559     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4560 EOF
4561 cat >> confdefs.h <<EOF
4562 #define SIZEOF_LONG $ac_cv_sizeof_long
4563 EOF
4564 }
4565
4566
4567 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4568 echo "configure:4569: checking size of long long" >&5
4569
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <stdio.h>
4574 #include <sys/types.h>
4575 main()
4576 {
4577   FILE *f=fopen("conftestval", "w");
4578   if (!f) exit(1);
4579   fprintf(f, "%d\n", sizeof(long long));
4580   exit(0);
4581 }
4582 EOF
4583 if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4584 then
4585   ac_cv_sizeof_long_long=`cat conftestval`
4586 else
4587   conftest_rc="$?"
4588   echo "configure: failed program was:" >&5
4589   cat conftest.$ac_ext >&5
4590   rm -fr conftest*
4591   ac_cv_sizeof_long_long=0
4592 fi
4593 rm -fr conftest*
4594 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4595 { test "$extra_verbose" = "yes" && cat << EOF
4596     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4597 EOF
4598 cat >> confdefs.h <<EOF
4599 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4600 EOF
4601 }
4602
4603
4604 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4605 echo "configure:4606: checking size of void *" >&5
4606
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 #include <stdio.h>
4611 #include <sys/types.h>
4612 main()
4613 {
4614   FILE *f=fopen("conftestval", "w");
4615   if (!f) exit(1);
4616   fprintf(f, "%d\n", sizeof(void *));
4617   exit(0);
4618 }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4621 then
4622   ac_cv_sizeof_void_p=`cat conftestval`
4623 else
4624   conftest_rc="$?"
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -fr conftest*
4628   ac_cv_sizeof_void_p=0
4629 fi
4630 rm -fr conftest*
4631 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4632 { test "$extra_verbose" = "yes" && cat << EOF
4633     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4634 EOF
4635 cat >> confdefs.h <<EOF
4636 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4637 EOF
4638 }
4639
4640
4641
4642 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4643 echo "configure:4644: checking for long file names" >&5
4644
4645 ac_cv_sys_long_file_names=yes
4646 # Test for long file names in all the places we know might matter:
4647 #      .                the current directory, where building will happen
4648 #      $prefix/lib      where we will be installing things
4649 #      $exec_prefix/lib likewise
4650 # eval it to expand exec_prefix.
4651 #      $TMPDIR          if set, where it might want to write temporary files
4652 # if $TMPDIR is not set:
4653 #      /tmp             where it might want to write temporary files
4654 #      /var/tmp         likewise
4655 #      /usr/tmp         likewise
4656 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4657   ac_tmpdirs="$TMPDIR"
4658 else
4659   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4660 fi
4661 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4662   test -d $ac_dir || continue
4663   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4664   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4665   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4666   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4667   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4668     ac_cv_sys_long_file_names=no
4669     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4670     break
4671   fi
4672   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4673 done
4674
4675 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4676 if test $ac_cv_sys_long_file_names = yes; then
4677   { test "$extra_verbose" = "yes" && cat << \EOF
4678     Defining HAVE_LONG_FILE_NAMES
4679 EOF
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_LONG_FILE_NAMES 1
4682 EOF
4683 }
4684
4685 fi
4686
4687
4688 echo $ac_n "checking for sin""... $ac_c" 1>&6
4689 echo "configure:4690: checking for sin" >&5
4690
4691 cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 /* System header to define __stub macros and hopefully few prototypes,
4695     which can conflict with char sin(); below.  */
4696 #include <assert.h>
4697 /* Override any gcc2 internal prototype to avoid an error.  */
4698 /* We use char because int might match the return type of a gcc2
4699     builtin and then its argument prototype would still apply.  */
4700 char sin();
4701
4702 int main() {
4703
4704 /* The GNU C library defines this for functions which it implements
4705     to always fail with ENOSYS.  Some functions are actually named
4706     something starting with __ and the normal name is an alias.  */
4707 #if defined (__stub_sin) || defined (__stub___sin)
4708 choke me
4709 #else
4710 sin();
4711 #endif
4712
4713 ; return 0; }
4714 EOF
4715 if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4716   rm -rf conftest*
4717   eval "ac_cv_func_sin=yes"
4718 else
4719   echo "configure: failed program was:" >&5
4720   cat conftest.$ac_ext >&5
4721   rm -rf conftest*
4722   eval "ac_cv_func_sin=no"
4723 fi
4724 rm -f conftest*
4725
4726 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4727   echo "$ac_t""yes" 1>&6
4728   :
4729 else
4730   echo "$ac_t""no" 1>&6
4731
4732 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4733 echo "configure:4734: checking for sin in -lm" >&5
4734 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4735
4736 xe_check_libs=" -lm "
4737 cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 /* Override any gcc2 internal prototype to avoid an error.  */
4741 /* We use char because int might match the return type of a gcc2
4742     builtin and then its argument prototype would still apply.  */
4743 char sin();
4744
4745 int main() {
4746 sin()
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   eval "ac_cv_lib_$ac_lib_var=yes"
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_lib_$ac_lib_var=no"
4757 fi
4758 rm -f conftest*
4759 xe_check_libs=""
4760
4761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4764     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4765   { test "$extra_verbose" = "yes" && cat << EOF
4766     Defining $ac_tr_lib
4767 EOF
4768 cat >> confdefs.h <<EOF
4769 #define $ac_tr_lib 1
4770 EOF
4771 }
4772
4773   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4774
4775 else
4776   echo "$ac_t""no" 1>&6
4777 fi
4778
4779
4780 fi
4781
4782
4783 { test "$extra_verbose" = "yes" && cat << \EOF
4784     Defining LISP_FLOAT_TYPE
4785 EOF
4786 cat >> confdefs.h <<\EOF
4787 #define LISP_FLOAT_TYPE 1
4788 EOF
4789 }
4790
4791
4792 cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 #include <math.h>
4796 int main() {
4797 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   { test "$extra_verbose" = "yes" && cat << \EOF
4803     Defining HAVE_INVERSE_HYPERBOLIC
4804 EOF
4805 cat >> confdefs.h <<\EOF
4806 #define HAVE_INVERSE_HYPERBOLIC 1
4807 EOF
4808 }
4809
4810 else
4811   echo "configure: failed program was:" >&5
4812   cat conftest.$ac_ext >&5
4813 fi
4814 rm -f conftest*
4815
4816 echo "checking type of mail spool file locking" 1>&6
4817 echo "configure:4818: checking type of mail spool file locking" >&5
4818 for ac_func in lockf flock
4819 do
4820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4821 echo "configure:4822: checking for $ac_func" >&5
4822
4823 cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 /* System header to define __stub macros and hopefully few prototypes,
4827     which can conflict with char $ac_func(); below.  */
4828 #include <assert.h>
4829 /* Override any gcc2 internal prototype to avoid an error.  */
4830 /* We use char because int might match the return type of a gcc2
4831     builtin and then its argument prototype would still apply.  */
4832 char $ac_func();
4833
4834 int main() {
4835
4836 /* The GNU C library defines this for functions which it implements
4837     to always fail with ENOSYS.  Some functions are actually named
4838     something starting with __ and the normal name is an alias.  */
4839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4840 choke me
4841 #else
4842 $ac_func();
4843 #endif
4844
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848   rm -rf conftest*
4849   eval "ac_cv_func_$ac_func=yes"
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   eval "ac_cv_func_$ac_func=no"
4855 fi
4856 rm -f conftest*
4857
4858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4861   { test "$extra_verbose" = "yes" && cat << EOF
4862     Defining $ac_tr_func
4863 EOF
4864 cat >> confdefs.h <<EOF
4865 #define $ac_tr_func 1
4866 EOF
4867 }
4868  
4869 else
4870   echo "$ac_t""no" 1>&6
4871 fi
4872 done
4873
4874 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4875 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4876 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4877 if   test -z "$mail_locking"; then
4878   case "$opsys" in cygwin* | mingw*)
4879     mail_locking=pop ;;
4880   esac
4881 fi
4882
4883 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4884     Defining MAIL_LOCK_LOCKF
4885 EOF
4886 cat >> confdefs.h <<\EOF
4887 #define MAIL_LOCK_LOCKF 1
4888 EOF
4889 }
4890
4891 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4892     Defining MAIL_LOCK_FLOCK
4893 EOF
4894 cat >> confdefs.h <<\EOF
4895 #define MAIL_LOCK_FLOCK 1
4896 EOF
4897 }
4898
4899 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4900     Defining MAIL_LOCK_LOCKING
4901 EOF
4902 cat >> confdefs.h <<\EOF
4903 #define MAIL_LOCK_LOCKING 1
4904 EOF
4905 }
4906
4907 elif test "$mail_locking" = "pop"; then
4908   with_pop=yes
4909   mail_locking=
4910 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4911     Defining MAIL_LOCK_DOT
4912 EOF
4913 cat >> confdefs.h <<\EOF
4914 #define MAIL_LOCK_DOT 1
4915 EOF
4916 }
4917
4918 fi
4919 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4920   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4921 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4922   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4923 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4924   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4925
4926 case "$opsys" in decosf*)
4927   
4928 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4929 echo "configure:4930: checking for cma_open in -lpthreads" >&5
4930 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4931
4932 xe_check_libs=" -lpthreads "
4933 cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 /* We use char because int might match the return type of a gcc2
4938     builtin and then its argument prototype would still apply.  */
4939 char cma_open();
4940
4941 int main() {
4942 cma_open()
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4946   rm -rf conftest*
4947   eval "ac_cv_lib_$ac_lib_var=yes"
4948 else
4949   echo "configure: failed program was:" >&5
4950   cat conftest.$ac_ext >&5
4951   rm -rf conftest*
4952   eval "ac_cv_lib_$ac_lib_var=no"
4953 fi
4954 rm -f conftest*
4955 xe_check_libs=""
4956
4957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4958   echo "$ac_t""yes" 1>&6
4959     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4961   { test "$extra_verbose" = "yes" && cat << EOF
4962     Defining $ac_tr_lib
4963 EOF
4964 cat >> confdefs.h <<EOF
4965 #define $ac_tr_lib 1
4966 EOF
4967 }
4968
4969   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4970
4971 else
4972   echo "$ac_t""no" 1>&6
4973 fi
4974
4975
4976   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4977     c_switch_site="$c_switch_site -threads" ;;
4978 esac
4979
4980
4981 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4982 echo "configure:4983: checking whether the -xildoff compiler flag is required" >&5
4983 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4984   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4985     then echo "$ac_t""no" 1>&6;
4986     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
4987   fi
4988   else echo "$ac_t""no" 1>&6
4989 fi
4990
4991 if test "$opsys" = "sol2"; then
4992   if test "$os_release" -ge 56; then
4993     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4994 echo "configure:4995: checking for \"-z ignore\" linker flag" >&5
4995     case "`ld -h 2>&1`" in
4996       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4997         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4998       *) echo "$ac_t""no" 1>&6 ;;
4999     esac
5000   fi
5001 fi
5002
5003 if test "$pdump" != "yes"; then
5004   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
5005 echo "configure:5006: checking for \"-z nocombreloc\" linker flag" >&5
5006   case "`ld --help 2>&1`" in
5007     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
5008       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
5009     *) echo "$ac_t""no" 1>&6 ;;
5010   esac
5011 fi
5012
5013
5014 echo "checking "for specified window system"" 1>&6
5015 echo "configure:5016: checking "for specified window system"" >&5
5016
5017
5018 GNOME_CONFIG=no
5019 GTK_CONFIG=no
5020
5021 if test "$with_gnome" != "no"; then
5022    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5023 echo "configure:5024: checking for GNOME configuration script" >&5
5024    for possible in gnome-config
5025    do
5026       possible_version=`${possible} --version 2> /dev/null`
5027       if test "x${possible_version}" != "x"; then
5028               GNOME_CONFIG="${possible}"
5029               with_gnome=yes
5030               with_gtk=yes
5031               break
5032       fi
5033    done
5034    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5035 fi
5036
5037 if test "${GNOME_CONFIG}" != "no"; then
5038       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5039       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5040       { test "$extra_verbose" = "yes" && cat << \EOF
5041     Defining HAVE_GNOME
5042 EOF
5043 cat >> confdefs.h <<\EOF
5044 #define HAVE_GNOME 1
5045 EOF
5046 }
5047
5048       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5049       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5050 fi
5051
5052 if test "$with_gtk" != "no";then
5053    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5054 echo "configure:5055: checking for GTK configuration script" >&5
5055    for possible in gtk12-config gtk14-config gtk-config
5056    do
5057       possible_version=`${possible} --version 2> /dev/null`
5058       if test "x${possible_version}" != "x"; then
5059               GTK_CONFIG="${possible}"
5060       fi
5061       case "${possible_version}" in
5062         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5063         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5064         1.2.*)
5065                 with_gtk=yes
5066                 break
5067                 ;;
5068         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5069       esac
5070    done
5071    echo "$ac_t""${GTK_CONFIG}" 1>&6
5072 fi
5073
5074 if test "${GTK_CONFIG}" != "no"; then
5075       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5076 echo "configure:5077: checking gtk version" >&5
5077       GTK_VERSION=`${GTK_CONFIG} --version`
5078       echo "$ac_t""${GTK_VERSION}" 1>&6
5079
5080       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5081 echo "configure:5082: checking gtk libs" >&5
5082       GTK_LIBS=`${GTK_CONFIG} --libs`
5083       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5084       echo "$ac_t""${GTK_LIBS}" 1>&6
5085
5086       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5087 echo "configure:5088: checking gtk cflags" >&5
5088       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5089       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5090       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5091
5092       
5093 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5094 echo "configure:5095: checking for main in -lgdk_imlib" >&5
5095 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5096
5097 xe_check_libs=" -lgdk_imlib "
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103 main()
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=yes"
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112   rm -rf conftest*
5113   eval "ac_cv_lib_$ac_lib_var=no"
5114 fi
5115 rm -f conftest*
5116 xe_check_libs=""
5117
5118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5119   echo "$ac_t""yes" 1>&6
5120   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5121 else
5122   echo "$ac_t""no" 1>&6
5123 fi
5124
5125
5126       
5127 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5128 echo "configure:5129: checking for Imlib_init in -lImlib" >&5
5129 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5130
5131 xe_check_libs=" -lImlib "
5132 cat > conftest.$ac_ext <<EOF
5133 #line 5134 "configure"
5134 #include "confdefs.h"
5135 /* Override any gcc2 internal prototype to avoid an error.  */
5136 /* We use char because int might match the return type of a gcc2
5137     builtin and then its argument prototype would still apply.  */
5138 char Imlib_init();
5139
5140 int main() {
5141 Imlib_init()
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=yes"
5147 else
5148   echo "configure: failed program was:" >&5
5149   cat conftest.$ac_ext >&5
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=no"
5152 fi
5153 rm -f conftest*
5154 xe_check_libs=""
5155
5156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5157   echo "$ac_t""yes" 1>&6
5158   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5159 else
5160   echo "$ac_t""no" 1>&6
5161 fi
5162
5163
5164       for ac_func in gdk_imlib_init
5165 do
5166 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5167 echo "configure:5168: checking for $ac_func" >&5
5168
5169 cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 /* System header to define __stub macros and hopefully few prototypes,
5173     which can conflict with char $ac_func(); below.  */
5174 #include <assert.h>
5175 /* Override any gcc2 internal prototype to avoid an error.  */
5176 /* We use char because int might match the return type of a gcc2
5177     builtin and then its argument prototype would still apply.  */
5178 char $ac_func();
5179
5180 int main() {
5181
5182 /* The GNU C library defines this for functions which it implements
5183     to always fail with ENOSYS.  Some functions are actually named
5184     something starting with __ and the normal name is an alias.  */
5185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5186 choke me
5187 #else
5188 $ac_func();
5189 #endif
5190
5191 ; return 0; }
5192 EOF
5193 if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5194   rm -rf conftest*
5195   eval "ac_cv_func_$ac_func=yes"
5196 else
5197   echo "configure: failed program was:" >&5
5198   cat conftest.$ac_ext >&5
5199   rm -rf conftest*
5200   eval "ac_cv_func_$ac_func=no"
5201 fi
5202 rm -f conftest*
5203
5204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5205   echo "$ac_t""yes" 1>&6
5206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5207   { test "$extra_verbose" = "yes" && cat << EOF
5208     Defining $ac_tr_func
5209 EOF
5210 cat >> confdefs.h <<EOF
5211 #define $ac_tr_func 1
5212 EOF
5213 }
5214  
5215 else
5216   echo "$ac_t""no" 1>&6
5217 fi
5218 done
5219
5220
5221       { test "$extra_verbose" = "yes" && cat << \EOF
5222     Defining HAVE_XPM
5223 EOF
5224 cat >> confdefs.h <<\EOF
5225 #define HAVE_XPM 1
5226 EOF
5227 }
5228
5229       { test "$extra_verbose" = "yes" && cat << \EOF
5230     Defining HAVE_GTK
5231 EOF
5232 cat >> confdefs.h <<\EOF
5233 #define HAVE_GTK 1
5234 EOF
5235 }
5236
5237       
5238
5239       window_system=gtk
5240       with_gtk=yes
5241       with_x11=no
5242
5243       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5244       test "${with_toolbars}" != no && with_toolbars=gtk
5245       test "${with_menubars}" != "no" && with_menubars=gtk
5246       test "${with_dialogs}" != "no" && with_dialogs=gtk
5247       test "${with_widgets}" != "no" && with_widgets=gtk
5248
5249       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5250    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5251  fi
5252       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5253    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5254  fi
5255       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5256    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5257  fi
5258       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5259    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5260  fi
5261
5262             OLD_CFLAGS="${CFLAGS}"
5263       OLD_CPPFLAGS="${CPPFLAGS}"
5264       OLD_LDFLAGS="${LDFLAGS}"
5265       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5266       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5267       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5268       for ac_hdr in glade/glade.h glade.h
5269 do
5270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5272 echo "configure:5273: checking for $ac_hdr" >&5
5273
5274 cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277 #include <$ac_hdr>
5278 EOF
5279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5280 { (eval echo configure:5281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5282 if test -z "$ac_err"; then
5283   rm -rf conftest*
5284   eval "ac_cv_header_$ac_safe=yes"
5285 else
5286   echo "$ac_err" >&5
5287   echo "configure: failed program was:" >&5
5288   cat conftest.$ac_ext >&5
5289   rm -rf conftest*
5290   eval "ac_cv_header_$ac_safe=no"
5291 fi
5292 rm -f conftest*
5293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5294   echo "$ac_t""yes" 1>&6
5295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5296   { test "$extra_verbose" = "yes" && cat << EOF
5297     Defining $ac_tr_hdr
5298 EOF
5299 cat >> confdefs.h <<EOF
5300 #define $ac_tr_hdr 1
5301 EOF
5302 }
5303  
5304 else
5305   echo "$ac_t""no" 1>&6
5306 fi
5307 done
5308
5309       
5310 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5311 echo "configure:5312: checking for main in -lxml" >&5
5312 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5313
5314 xe_check_libs=" -lxml "
5315 cat > conftest.$ac_ext <<EOF
5316 #line 5317 "configure"
5317 #include "confdefs.h"
5318
5319 int main() {
5320 main()
5321 ; return 0; }
5322 EOF
5323 if { (eval echo configure:5324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5324   rm -rf conftest*
5325   eval "ac_cv_lib_$ac_lib_var=yes"
5326 else
5327   echo "configure: failed program was:" >&5
5328   cat conftest.$ac_ext >&5
5329   rm -rf conftest*
5330   eval "ac_cv_lib_$ac_lib_var=no"
5331 fi
5332 rm -f conftest*
5333 xe_check_libs=""
5334
5335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5336   echo "$ac_t""yes" 1>&6
5337   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5338 else
5339   echo "$ac_t""no" 1>&6
5340 fi
5341
5342
5343       
5344 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5345 echo "configure:5346: checking for main in -lglade" >&5
5346 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5347
5348 xe_check_libs=" -lglade "
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352
5353 int main() {
5354 main()
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=yes"
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=no"
5365 fi
5366 rm -f conftest*
5367 xe_check_libs=""
5368
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5370   echo "$ac_t""yes" 1>&6
5371   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375
5376
5377       
5378 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5379 echo "configure:5380: checking for main in -lglade-gnome" >&5
5380 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5381
5382 xe_check_libs=" -lglade-gnome "
5383 cat > conftest.$ac_ext <<EOF
5384 #line 5385 "configure"
5385 #include "confdefs.h"
5386
5387 int main() {
5388 main()
5389 ; return 0; }
5390 EOF
5391 if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392   rm -rf conftest*
5393   eval "ac_cv_lib_$ac_lib_var=yes"
5394 else
5395   echo "configure: failed program was:" >&5
5396   cat conftest.$ac_ext >&5
5397   rm -rf conftest*
5398   eval "ac_cv_lib_$ac_lib_var=no"
5399 fi
5400 rm -f conftest*
5401 xe_check_libs=""
5402
5403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5404   echo "$ac_t""yes" 1>&6
5405   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5406 else
5407   echo "$ac_t""no" 1>&6
5408 fi
5409
5410
5411       cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 #include <glade/glade-xml.h>
5415 EOF
5416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5417   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5418   rm -rf conftest*
5419   echo "$ac_t""yes" 1>&6
5420                        { test "$extra_verbose" = "yes" && cat << \EOF
5421     Defining LIBGLADE_XML_TXTDOMAIN = 1
5422 EOF
5423 cat >> confdefs.h <<\EOF
5424 #define LIBGLADE_XML_TXTDOMAIN 1
5425 EOF
5426 }
5427
5428 else
5429   rm -rf conftest*
5430   echo "$ac_t""no" 1>&6
5431 fi
5432 rm -f conftest*
5433
5434       CFLAGS="${OLD_CFLAGS}"
5435       CPPFLAGS="${OLD_CPPFLAGS}"
5436       LDFLAGS="${OLD_LDFLAGS}"
5437 fi
5438
5439
5440 if test "$with_x11" != "no"; then
5441     test "$x_includes $x_libraries" != "NONE NONE" && \
5442    window_system=x11 with_x11=yes
5443
5444         
5445       if test "$x_includes $x_libraries" = "NONE NONE" \
5446     -a -n "$OPENWINHOME" \
5447     -a "$OPENWINHOME" != "/usr/openwin" \
5448     -a -d "$OPENWINHOME"; then
5449       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5450       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5451       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5452   fi
5453
5454   if test "$x_includes" = "NONE"; then
5455                     for dir in "/usr/X11" "/usr/X11R6"; do
5456       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5457     done
5458   fi
5459
5460   if test "$x_libraries" = "NONE"; then
5461     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5462       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5463     done
5464   fi
5465
5466   # If we find X, set shell vars x_includes and x_libraries to the
5467 # paths, otherwise set no_x=yes.
5468 # Uses ac_ vars as temps to allow command line to override cache and checks.
5469 # --without-x overrides everything else, but does not touch the cache.
5470 echo $ac_n "checking for X""... $ac_c" 1>&6
5471 echo "configure:5472: checking for X" >&5
5472
5473 # Check whether --with-x or --without-x was given.
5474 if test "${with_x+set}" = set; then
5475   withval="$with_x"
5476   :
5477 fi
5478
5479 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5480 if test "x$with_x" = xno; then
5481   # The user explicitly disabled X.
5482   have_x=disabled
5483 else
5484   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5485     # Both variables are already set.
5486     have_x=yes
5487   else
5488
5489 # One or both of the vars are not set, and there is no cached value.
5490 ac_x_includes=NO ac_x_libraries=NO
5491 rm -fr conftestdir
5492 if mkdir conftestdir; then
5493   cd conftestdir
5494   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5495   cat > Imakefile <<'EOF'
5496 acfindx:
5497         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5498 EOF
5499   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5500     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5501     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5502     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5503     for ac_extension in a so sl; do
5504       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5505         test -f $ac_im_libdir/libX11.$ac_extension; then
5506         ac_im_usrlibdir=$ac_im_libdir; break
5507       fi
5508     done
5509     # Screen out bogus values from the imake configuration.  They are
5510     # bogus both because they are the default anyway, and because
5511     # using them would break gcc on systems where it needs fixed includes.
5512     case "$ac_im_incroot" in
5513         /usr/include) ;;
5514         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5515     esac
5516     case "$ac_im_usrlibdir" in
5517         /usr/lib | /lib) ;;
5518         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5519     esac
5520   fi
5521   cd ..
5522   rm -fr conftestdir
5523 fi
5524
5525 if test "$ac_x_includes" = NO; then
5526   # Guess where to find include files, by looking for this one X11 .h file.
5527   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5528
5529   # First, try using that file with no special directory specified.
5530 cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #include <$x_direct_test_include>
5534 EOF
5535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5536 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5538 if test -z "$ac_err"; then
5539   rm -rf conftest*
5540   # We can compile using X headers with no special include directory.
5541 ac_x_includes=
5542 else
5543   echo "$ac_err" >&5
5544   echo "configure: failed program was:" >&5
5545   cat conftest.$ac_ext >&5
5546   rm -rf conftest*
5547   # Look for the header file in a standard set of common directories.
5548 # Check X11 before X11Rn because it is often a symlink to the current release.
5549   for ac_dir in               \
5550     /usr/X11/include          \
5551     /usr/X11R6/include        \
5552     /usr/X11R5/include        \
5553     /usr/X11R4/include        \
5554                               \
5555     /usr/include/X11          \
5556     /usr/include/X11R6        \
5557     /usr/include/X11R5        \
5558     /usr/include/X11R4        \
5559                               \
5560     /usr/local/X11/include    \
5561     /usr/local/X11R6/include  \
5562     /usr/local/X11R5/include  \
5563     /usr/local/X11R4/include  \
5564                               \
5565     /usr/local/include/X11    \
5566     /usr/local/include/X11R6  \
5567     /usr/local/include/X11R5  \
5568     /usr/local/include/X11R4  \
5569                               \
5570     /usr/X386/include         \
5571     /usr/x386/include         \
5572     /usr/XFree86/include/X11  \
5573                               \
5574     /usr/include              \
5575     /usr/local/include        \
5576     /usr/unsupported/include  \
5577     /usr/athena/include       \
5578     /usr/local/x11r5/include  \
5579     /usr/lpp/Xamples/include  \
5580                               \
5581     /usr/openwin/include      \
5582     /usr/openwin/share/include \
5583     ; \
5584   do
5585     if test -r "$ac_dir/$x_direct_test_include"; then
5586       ac_x_includes=$ac_dir
5587       break
5588     fi
5589   done
5590 fi
5591 rm -f conftest*
5592 fi # $ac_x_includes = NO
5593
5594 if test "$ac_x_libraries" = NO; then
5595   # Check for the libraries.
5596
5597   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5598   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5599
5600   # See if we find them without any special options.
5601   # Don't add to $LIBS permanently.
5602   ac_save_LIBS="$LIBS"
5603   LIBS="-l$x_direct_test_library $LIBS"
5604 cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607
5608 int main() {
5609 ${x_direct_test_function}()
5610 ; return 0; }
5611 EOF
5612 if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5613   rm -rf conftest*
5614   LIBS="$ac_save_LIBS"
5615 # We can link X programs with no special library path.
5616 ac_x_libraries=
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   LIBS="$ac_save_LIBS"
5622 # First see if replacing the include by lib works.
5623 # Check X11 before X11Rn because it is often a symlink to the current release.
5624 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5625     /usr/X11/lib          \
5626     /usr/X11R6/lib        \
5627     /usr/X11R5/lib        \
5628     /usr/X11R4/lib        \
5629                           \
5630     /usr/lib/X11          \
5631     /usr/lib/X11R6        \
5632     /usr/lib/X11R5        \
5633     /usr/lib/X11R4        \
5634                           \
5635     /usr/local/X11/lib    \
5636     /usr/local/X11R6/lib  \
5637     /usr/local/X11R5/lib  \
5638     /usr/local/X11R4/lib  \
5639                           \
5640     /usr/local/lib/X11    \
5641     /usr/local/lib/X11R6  \
5642     /usr/local/lib/X11R5  \
5643     /usr/local/lib/X11R4  \
5644                           \
5645     /usr/X386/lib         \
5646     /usr/x386/lib         \
5647     /usr/XFree86/lib/X11  \
5648                           \
5649     /usr/lib              \
5650     /usr/local/lib        \
5651     /usr/unsupported/lib  \
5652     /usr/athena/lib       \
5653     /usr/local/x11r5/lib  \
5654     /usr/lpp/Xamples/lib  \
5655     /lib/usr/lib/X11      \
5656                           \
5657     /usr/openwin/lib      \
5658     /usr/openwin/share/lib \
5659     ; \
5660 do
5661   for ac_extension in a so sl; do
5662     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5663       ac_x_libraries=$ac_dir
5664       break 2
5665     fi
5666   done
5667 done
5668 fi
5669 rm -f conftest*
5670 fi # $ac_x_libraries = NO
5671
5672 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5673   # Didn't find X anywhere.  Cache the known absence of X.
5674   ac_cv_have_x="have_x=no"
5675 else
5676   # Record where we found X for the cache.
5677   ac_cv_have_x="have_x=yes \
5678                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5679 fi
5680   fi
5681   eval "$ac_cv_have_x"
5682 fi # $with_x != no
5683
5684 if test "$have_x" != yes; then
5685   echo "$ac_t""$have_x" 1>&6
5686   no_x=yes
5687 else
5688   # If each of the values was on the command line, it overrides each guess.
5689   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5690   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5691   # Update the cache value to reflect the command line values.
5692   ac_cv_have_x="have_x=yes \
5693                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5694   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5695 fi
5696
5697 if test "$no_x" = yes; then
5698   # Not all programs may use this symbol, but it does not hurt to define it.
5699   { test "$extra_verbose" = "yes" && cat << \EOF
5700     Defining X_DISPLAY_MISSING
5701 EOF
5702 cat >> confdefs.h <<\EOF
5703 #define X_DISPLAY_MISSING 1
5704 EOF
5705 }
5706
5707   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5708 else
5709   if test -n "$x_includes"; then
5710     X_CFLAGS="$X_CFLAGS -I$x_includes"
5711   fi
5712
5713   # It would also be nice to do this for all -L options, not just this one.
5714   if test -n "$x_libraries"; then
5715     X_LIBS="$X_LIBS -L$x_libraries"
5716     # For Solaris; some versions of Sun CC require a space after -R and
5717     # others require no space.  Words are not sufficient . . . .
5718     case "`(uname -sr) 2>/dev/null`" in
5719     "SunOS 5"*)
5720       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5721 echo "configure:5722: checking whether -R must be followed by a space" >&5
5722       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5723       cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726
5727 int main() {
5728
5729 ; return 0; }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5732   rm -rf conftest*
5733   ac_R_nospace=yes
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -rf conftest*
5738   ac_R_nospace=no
5739 fi
5740 rm -f conftest*
5741       if test $ac_R_nospace = yes; then
5742         echo "$ac_t""no" 1>&6
5743         X_LIBS="$X_LIBS -R$x_libraries"
5744       else
5745         LIBS="$ac_xsave_LIBS -R $x_libraries"
5746         cat > conftest.$ac_ext <<EOF
5747 #line 5748 "configure"
5748 #include "confdefs.h"
5749
5750 int main() {
5751
5752 ; return 0; }
5753 EOF
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755   rm -rf conftest*
5756   ac_R_space=yes
5757 else
5758   echo "configure: failed program was:" >&5
5759   cat conftest.$ac_ext >&5
5760   rm -rf conftest*
5761   ac_R_space=no
5762 fi
5763 rm -f conftest*
5764         if test $ac_R_space = yes; then
5765           echo "$ac_t""yes" 1>&6
5766           X_LIBS="$X_LIBS -R $x_libraries"
5767         else
5768           echo "$ac_t""neither works" 1>&6
5769         fi
5770       fi
5771       LIBS="$ac_xsave_LIBS"
5772     esac
5773   fi
5774
5775   # Check for system-dependent libraries X programs must link with.
5776   # Do this before checking for the system-independent R6 libraries
5777   # (-lICE), since we may need -lsocket or whatever for X linking.
5778
5779   if test "$ISC" = yes; then
5780     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5781   else
5782     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5783     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5784     # the Alpha needs dnet_stub (dnet does not exist).
5785     if test "$with_dnet" = "no" ; then
5786 ac_cv_lib_dnet_dnet_ntoa=no
5787 else
5788
5789 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5790 echo "configure:5791: checking for dnet_ntoa in -ldnet" >&5
5791 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5792
5793 xe_check_libs=" -ldnet "
5794 cat > conftest.$ac_ext <<EOF
5795 #line 5796 "configure"
5796 #include "confdefs.h"
5797 /* Override any gcc2 internal prototype to avoid an error.  */
5798 /* We use char because int might match the return type of a gcc2
5799     builtin and then its argument prototype would still apply.  */
5800 char dnet_ntoa();
5801
5802 int main() {
5803 dnet_ntoa()
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5807   rm -rf conftest*
5808   eval "ac_cv_lib_$ac_lib_var=yes"
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   eval "ac_cv_lib_$ac_lib_var=no"
5814 fi
5815 rm -f conftest*
5816 xe_check_libs=""
5817
5818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5819   echo "$ac_t""yes" 1>&6
5820   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825 fi
5826
5827     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5828       
5829 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5830 echo "configure:5831: checking for dnet_ntoa in -ldnet_stub" >&5
5831 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5832
5833 xe_check_libs=" -ldnet_stub "
5834 cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837 /* Override any gcc2 internal prototype to avoid an error.  */
5838 /* We use char because int might match the return type of a gcc2
5839     builtin and then its argument prototype would still apply.  */
5840 char dnet_ntoa();
5841
5842 int main() {
5843 dnet_ntoa()
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847   rm -rf conftest*
5848   eval "ac_cv_lib_$ac_lib_var=yes"
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   eval "ac_cv_lib_$ac_lib_var=no"
5854 fi
5855 rm -f conftest*
5856 xe_check_libs=""
5857
5858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5859   echo "$ac_t""yes" 1>&6
5860   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5861 else
5862   echo "$ac_t""no" 1>&6
5863 fi
5864
5865
5866     fi
5867
5868     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5869     # to get the SysV transport functions.
5870     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5871     # needs -lnsl.
5872     # The nsl library prevents programs from opening the X display
5873     # on Irix 5.2, according to dickey@clark.net.
5874     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5875 echo "configure:5876: checking for gethostbyname" >&5
5876
5877 cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 /* System header to define __stub macros and hopefully few prototypes,
5881     which can conflict with char gethostbyname(); below.  */
5882 #include <assert.h>
5883 /* Override any gcc2 internal prototype to avoid an error.  */
5884 /* We use char because int might match the return type of a gcc2
5885     builtin and then its argument prototype would still apply.  */
5886 char gethostbyname();
5887
5888 int main() {
5889
5890 /* The GNU C library defines this for functions which it implements
5891     to always fail with ENOSYS.  Some functions are actually named
5892     something starting with __ and the normal name is an alias.  */
5893 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5894 choke me
5895 #else
5896 gethostbyname();
5897 #endif
5898
5899 ; return 0; }
5900 EOF
5901 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5902   rm -rf conftest*
5903   eval "ac_cv_func_gethostbyname=yes"
5904 else
5905   echo "configure: failed program was:" >&5
5906   cat conftest.$ac_ext >&5
5907   rm -rf conftest*
5908   eval "ac_cv_func_gethostbyname=no"
5909 fi
5910 rm -f conftest*
5911
5912 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5913   echo "$ac_t""yes" 1>&6
5914   :
5915 else
5916   echo "$ac_t""no" 1>&6
5917 fi
5918
5919     if test $ac_cv_func_gethostbyname = no; then
5920       
5921 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5922 echo "configure:5923: checking for gethostbyname in -lnsl" >&5
5923 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5924
5925 xe_check_libs=" -lnsl "
5926 cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5929 /* Override any gcc2 internal prototype to avoid an error.  */
5930 /* We use char because int might match the return type of a gcc2
5931     builtin and then its argument prototype would still apply.  */
5932 char gethostbyname();
5933
5934 int main() {
5935 gethostbyname()
5936 ; return 0; }
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5939   rm -rf conftest*
5940   eval "ac_cv_lib_$ac_lib_var=yes"
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   eval "ac_cv_lib_$ac_lib_var=no"
5946 fi
5947 rm -f conftest*
5948 xe_check_libs=""
5949
5950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5951   echo "$ac_t""yes" 1>&6
5952   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5953 else
5954   echo "$ac_t""no" 1>&6
5955 fi
5956
5957
5958     fi
5959
5960     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5961     # socket/setsockopt and other routines are undefined under SCO ODT
5962     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5963     # on later versions), says simon@lia.di.epfl.ch: it contains
5964     # gethostby* variants that don't use the nameserver (or something).
5965     # -lsocket must be given before -lnsl if both are needed.
5966     # We assume that if connect needs -lnsl, so does gethostbyname.
5967     echo $ac_n "checking for connect""... $ac_c" 1>&6
5968 echo "configure:5969: checking for connect" >&5
5969
5970 cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 /* System header to define __stub macros and hopefully few prototypes,
5974     which can conflict with char connect(); below.  */
5975 #include <assert.h>
5976 /* Override any gcc2 internal prototype to avoid an error.  */
5977 /* We use char because int might match the return type of a gcc2
5978     builtin and then its argument prototype would still apply.  */
5979 char connect();
5980
5981 int main() {
5982
5983 /* The GNU C library defines this for functions which it implements
5984     to always fail with ENOSYS.  Some functions are actually named
5985     something starting with __ and the normal name is an alias.  */
5986 #if defined (__stub_connect) || defined (__stub___connect)
5987 choke me
5988 #else
5989 connect();
5990 #endif
5991
5992 ; return 0; }
5993 EOF
5994 if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5995   rm -rf conftest*
5996   eval "ac_cv_func_connect=yes"
5997 else
5998   echo "configure: failed program was:" >&5
5999   cat conftest.$ac_ext >&5
6000   rm -rf conftest*
6001   eval "ac_cv_func_connect=no"
6002 fi
6003 rm -f conftest*
6004
6005 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6006   echo "$ac_t""yes" 1>&6
6007   :
6008 else
6009   echo "$ac_t""no" 1>&6
6010 fi
6011
6012     if test $ac_cv_func_connect = no; then
6013       
6014 xe_msg_checking="for connect in -lsocket"
6015 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6016 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6017 echo "configure:6018: checking "$xe_msg_checking"" >&5
6018 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6019
6020 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6021 cat > conftest.$ac_ext <<EOF
6022 #line 6023 "configure"
6023 #include "confdefs.h"
6024 /* Override any gcc2 internal prototype to avoid an error.  */
6025 /* We use char because int might match the return type of a gcc2
6026     builtin and then its argument prototype would still apply.  */
6027 char connect();
6028
6029 int main() {
6030 connect()
6031 ; return 0; }
6032 EOF
6033 if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6034   rm -rf conftest*
6035   eval "ac_cv_lib_$ac_lib_var=yes"
6036 else
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   eval "ac_cv_lib_$ac_lib_var=no"
6041 fi
6042 rm -f conftest*
6043 xe_check_libs=""
6044
6045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6046   echo "$ac_t""yes" 1>&6
6047   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6048 else
6049   echo "$ac_t""no" 1>&6
6050 fi
6051
6052
6053     fi
6054
6055     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6056     echo $ac_n "checking for remove""... $ac_c" 1>&6
6057 echo "configure:6058: checking for remove" >&5
6058
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062 /* System header to define __stub macros and hopefully few prototypes,
6063     which can conflict with char remove(); below.  */
6064 #include <assert.h>
6065 /* Override any gcc2 internal prototype to avoid an error.  */
6066 /* We use char because int might match the return type of a gcc2
6067     builtin and then its argument prototype would still apply.  */
6068 char remove();
6069
6070 int main() {
6071
6072 /* The GNU C library defines this for functions which it implements
6073     to always fail with ENOSYS.  Some functions are actually named
6074     something starting with __ and the normal name is an alias.  */
6075 #if defined (__stub_remove) || defined (__stub___remove)
6076 choke me
6077 #else
6078 remove();
6079 #endif
6080
6081 ; return 0; }
6082 EOF
6083 if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6084   rm -rf conftest*
6085   eval "ac_cv_func_remove=yes"
6086 else
6087   echo "configure: failed program was:" >&5
6088   cat conftest.$ac_ext >&5
6089   rm -rf conftest*
6090   eval "ac_cv_func_remove=no"
6091 fi
6092 rm -f conftest*
6093
6094 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6095   echo "$ac_t""yes" 1>&6
6096   :
6097 else
6098   echo "$ac_t""no" 1>&6
6099 fi
6100
6101     if test $ac_cv_func_remove = no; then
6102       
6103 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6104 echo "configure:6105: checking for remove in -lposix" >&5
6105 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6106
6107 xe_check_libs=" -lposix "
6108 cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 /* Override any gcc2 internal prototype to avoid an error.  */
6112 /* We use char because int might match the return type of a gcc2
6113     builtin and then its argument prototype would still apply.  */
6114 char remove();
6115
6116 int main() {
6117 remove()
6118 ; return 0; }
6119 EOF
6120 if { (eval echo configure:6121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6121   rm -rf conftest*
6122   eval "ac_cv_lib_$ac_lib_var=yes"
6123 else
6124   echo "configure: failed program was:" >&5
6125   cat conftest.$ac_ext >&5
6126   rm -rf conftest*
6127   eval "ac_cv_lib_$ac_lib_var=no"
6128 fi
6129 rm -f conftest*
6130 xe_check_libs=""
6131
6132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6133   echo "$ac_t""yes" 1>&6
6134   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6135 else
6136   echo "$ac_t""no" 1>&6
6137 fi
6138
6139
6140     fi
6141
6142     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6143     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6144 echo "configure:6145: checking for shmat" >&5
6145
6146 cat > conftest.$ac_ext <<EOF
6147 #line 6148 "configure"
6148 #include "confdefs.h"
6149 /* System header to define __stub macros and hopefully few prototypes,
6150     which can conflict with char shmat(); below.  */
6151 #include <assert.h>
6152 /* Override any gcc2 internal prototype to avoid an error.  */
6153 /* We use char because int might match the return type of a gcc2
6154     builtin and then its argument prototype would still apply.  */
6155 char shmat();
6156
6157 int main() {
6158
6159 /* The GNU C library defines this for functions which it implements
6160     to always fail with ENOSYS.  Some functions are actually named
6161     something starting with __ and the normal name is an alias.  */
6162 #if defined (__stub_shmat) || defined (__stub___shmat)
6163 choke me
6164 #else
6165 shmat();
6166 #endif
6167
6168 ; return 0; }
6169 EOF
6170 if { (eval echo configure:6171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6171   rm -rf conftest*
6172   eval "ac_cv_func_shmat=yes"
6173 else
6174   echo "configure: failed program was:" >&5
6175   cat conftest.$ac_ext >&5
6176   rm -rf conftest*
6177   eval "ac_cv_func_shmat=no"
6178 fi
6179 rm -f conftest*
6180
6181 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6182   echo "$ac_t""yes" 1>&6
6183   :
6184 else
6185   echo "$ac_t""no" 1>&6
6186 fi
6187
6188     if test $ac_cv_func_shmat = no; then
6189       
6190 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6191 echo "configure:6192: checking for shmat in -lipc" >&5
6192 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6193
6194 xe_check_libs=" -lipc "
6195 cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 /* Override any gcc2 internal prototype to avoid an error.  */
6199 /* We use char because int might match the return type of a gcc2
6200     builtin and then its argument prototype would still apply.  */
6201 char shmat();
6202
6203 int main() {
6204 shmat()
6205 ; return 0; }
6206 EOF
6207 if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6208   rm -rf conftest*
6209   eval "ac_cv_lib_$ac_lib_var=yes"
6210 else
6211   echo "configure: failed program was:" >&5
6212   cat conftest.$ac_ext >&5
6213   rm -rf conftest*
6214   eval "ac_cv_lib_$ac_lib_var=no"
6215 fi
6216 rm -f conftest*
6217 xe_check_libs=""
6218
6219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6220   echo "$ac_t""yes" 1>&6
6221   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225
6226
6227     fi
6228   fi
6229
6230   # Check for libraries that X11R6 Xt/Xaw programs need.
6231   ac_save_LDFLAGS="$LDFLAGS"
6232   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6233   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6234   # check for ICE first), but we must link in the order -lSM -lICE or
6235   # we get undefined symbols.  So assume we have SM if we have ICE.
6236   # These have to be linked with before -lX11, unlike the other
6237   # libraries we check for below, so use a different variable.
6238   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6239   
6240 xe_msg_checking="for IceConnectionNumber in -lICE"
6241 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6242 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6243 echo "configure:6244: checking "$xe_msg_checking"" >&5
6244 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6245
6246 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6247 cat > conftest.$ac_ext <<EOF
6248 #line 6249 "configure"
6249 #include "confdefs.h"
6250 /* Override any gcc2 internal prototype to avoid an error.  */
6251 /* We use char because int might match the return type of a gcc2
6252     builtin and then its argument prototype would still apply.  */
6253 char IceConnectionNumber();
6254
6255 int main() {
6256 IceConnectionNumber()
6257 ; return 0; }
6258 EOF
6259 if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6260   rm -rf conftest*
6261   eval "ac_cv_lib_$ac_lib_var=yes"
6262 else
6263   echo "configure: failed program was:" >&5
6264   cat conftest.$ac_ext >&5
6265   rm -rf conftest*
6266   eval "ac_cv_lib_$ac_lib_var=no"
6267 fi
6268 rm -f conftest*
6269 xe_check_libs=""
6270
6271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6272   echo "$ac_t""yes" 1>&6
6273   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6274 else
6275   echo "$ac_t""no" 1>&6
6276 fi
6277
6278
6279   LDFLAGS="$ac_save_LDFLAGS"
6280
6281 fi
6282  # Autoconf claims to find X library and include dirs for us.
6283   if test "$no_x" = "yes"
6284   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6285   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6286   fi
6287 fi
6288
6289
6290 if test "$with_x11" = "yes"; then
6291   { test "$extra_verbose" = "yes" && cat << \EOF
6292     Defining HAVE_X_WINDOWS
6293 EOF
6294 cat >> confdefs.h <<\EOF
6295 #define HAVE_X_WINDOWS 1
6296 EOF
6297 }
6298
6299   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6300   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6301
6302       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6303     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6304     if test -d "$lib_dir" -a -d "$inc_dir"; then
6305       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6306         x_libraries="$lib_dir $x_libraries"
6307         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6308       esac
6309       case "$x_includes" in "$inc_dir"* ) ;; *)
6310         x_includes="$inc_dir $x_includes"
6311         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6312       esac
6313       break;       fi
6314   done
6315
6316     for rel in "X11R6" "X11R5" "X11R4"; do
6317     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6318     if test -d "$lib_dir" -a -d "$inc_dir"; then
6319       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6320         x_libraries="$x_libraries $lib_dir"
6321         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6322       esac
6323       case "$x_includes" in "$inc_dir"* ) ;; *)
6324         x_includes="$x_includes $inc_dir"
6325         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6326       esac
6327       break;     fi
6328   done
6329
6330     case "$opsys" in
6331   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 ;;
6332   esac
6333
6334   ld_switch_x_site="$X_LIBS"
6335
6336   
6337 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6338     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6339   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6340   
6341         runpath="" runpath_dirs=""
6342   if test -n "$LD_RUN_PATH"; then
6343     runpath="$LD_RUN_PATH"
6344   elif test "$GCC" = "yes"; then
6345         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6346     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6347     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6348     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6349       case "$arg" in P,* | -L* | -R* )
6350         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6351           {
6352 xe_runpath_dir="$dir"
6353   test "$xe_runpath_dir" != "/lib"     -a \
6354         "$xe_runpath_dir" != "/usr/lib" -a \
6355         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6356   eval "$xe_add_unique_runpath_dir"
6357 }
6358         done ;;
6359       esac
6360     done
6361     ld_switch_run="$ld_switch_run_save"
6362     rm -f conftest*
6363   else
6364         for arg in $ld_switch_site $ld_switch_x_site; do
6365       case "$arg" in -L*) {
6366 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6367   test "$xe_runpath_dir" != "/lib"     -a \
6368         "$xe_runpath_dir" != "/usr/lib" -a \
6369         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6370   eval "$xe_add_unique_runpath_dir"
6371 };; esac
6372     done
6373         if test "$opsys $need_motif" = "sol2 yes"; then
6374       xe_runpath_dir="/opt/SUNWdt/lib";
6375       eval "$xe_add_unique_runpath_dir";
6376     fi
6377   fi 
6378   if test -n "$runpath"; then
6379     ld_switch_run="${dash_r}${runpath}"
6380     
6381 if test "$GCC" = "yes"; then
6382   set x $ld_switch_run; shift; ld_switch_run=""
6383   while test -n "$1"; do
6384     case $1 in
6385       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6386       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6387       -Xlinker* ) ;;
6388       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6389     esac
6390     shift
6391   done
6392 fi
6393     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6394   fi
6395 fi
6396
6397
6398   if test "$extra_verbose" = "yes"; then
6399     echo; echo "X11 compilation variables:"
6400     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6401     echo
6402   fi
6403
6404             bitmapdirs=
6405   if test "$x_includes" != NONE; then
6406     for i in $x_includes; do
6407       if test -d "$i/bitmaps"; then
6408         bitmapdirs="$i/bitmaps:$bitmapdirs"
6409       fi
6410       if test -d "$i/X11/bitmaps"; then
6411         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6412       fi
6413     done
6414     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6415   fi
6416   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6417     Defining BITMAPDIR = "$bitmapdirs"
6418 EOF
6419 cat >> confdefs.h <<EOF
6420 #define BITMAPDIR "$bitmapdirs"
6421 EOF
6422 }
6423
6424
6425     echo "checking for X defines extracted by xmkmf" 1>&6
6426 echo "configure:6427: checking for X defines extracted by xmkmf" >&5
6427   rm -fr conftestdir
6428   if mkdir conftestdir; then
6429     cd conftestdir
6430     cat > Imakefile <<'EOF'
6431 xetest:
6432         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6433 EOF
6434     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6435       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6436       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6437     fi
6438     cd ..
6439     rm -fr conftestdir
6440     for word in $xmkmf_defines; do
6441       case "$word" in 
6442       -D__STDC__*) ;;
6443       -D* )
6444         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6445         case "$word" in
6446           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6447           *     ) val=1 ;;
6448         esac
6449         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6450           if test "$val" = "1"
6451             then { test "$extra_verbose" = "yes" && cat << EOF
6452     Defining $sym
6453 EOF
6454 cat >> confdefs.h <<EOF
6455 #define $sym 1
6456 EOF
6457 }
6458
6459             else { test "$extra_verbose" = "yes" && cat << EOF
6460     Defining $sym = $val
6461 EOF
6462 cat >> confdefs.h <<EOF
6463 #define $sym $val
6464 EOF
6465 }
6466
6467           fi
6468         fi  ;;
6469       esac
6470     done
6471   fi
6472
6473     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6474 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6475 echo "configure:6476: checking for X11/Intrinsic.h" >&5
6476
6477 cat > conftest.$ac_ext <<EOF
6478 #line 6479 "configure"
6479 #include "confdefs.h"
6480 #include <X11/Intrinsic.h>
6481 EOF
6482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6483 { (eval echo configure:6484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6485 if test -z "$ac_err"; then
6486   rm -rf conftest*
6487   eval "ac_cv_header_$ac_safe=yes"
6488 else
6489   echo "$ac_err" >&5
6490   echo "configure: failed program was:" >&5
6491   cat conftest.$ac_ext >&5
6492   rm -rf conftest*
6493   eval "ac_cv_header_$ac_safe=no"
6494 fi
6495 rm -f conftest*
6496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6497   echo "$ac_t""yes" 1>&6
6498   :
6499 else
6500   echo "$ac_t""no" 1>&6
6501 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6502 fi
6503
6504
6505       
6506 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6507 echo "configure:6508: checking for XOpenDisplay in -lX11" >&5
6508 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6509
6510 xe_check_libs=" -lX11 "
6511 cat > conftest.$ac_ext <<EOF
6512 #line 6513 "configure"
6513 #include "confdefs.h"
6514 /* Override any gcc2 internal prototype to avoid an error.  */
6515 /* We use char because int might match the return type of a gcc2
6516     builtin and then its argument prototype would still apply.  */
6517 char XOpenDisplay();
6518
6519 int main() {
6520 XOpenDisplay()
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6524   rm -rf conftest*
6525   eval "ac_cv_lib_$ac_lib_var=yes"
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   eval "ac_cv_lib_$ac_lib_var=no"
6531 fi
6532 rm -f conftest*
6533 xe_check_libs=""
6534
6535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6536   echo "$ac_t""yes" 1>&6
6537   have_lib_x11=yes
6538 else
6539   echo "$ac_t""no" 1>&6
6540 fi
6541
6542
6543   if test "$have_lib_x11" != "yes"; then
6544     
6545 xe_msg_checking="for XGetFontProperty in -lX11"
6546 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6547 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6548 echo "configure:6549: checking "$xe_msg_checking"" >&5
6549 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6550
6551 xe_check_libs=" -lX11 -b i486-linuxaout"
6552 cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555 /* Override any gcc2 internal prototype to avoid an error.  */
6556 /* We use char because int might match the return type of a gcc2
6557     builtin and then its argument prototype would still apply.  */
6558 char XGetFontProperty();
6559
6560 int main() {
6561 XGetFontProperty()
6562 ; return 0; }
6563 EOF
6564 if { (eval echo configure:6565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6565   rm -rf conftest*
6566   eval "ac_cv_lib_$ac_lib_var=yes"
6567 else
6568   echo "configure: failed program was:" >&5
6569   cat conftest.$ac_ext >&5
6570   rm -rf conftest*
6571   eval "ac_cv_lib_$ac_lib_var=no"
6572 fi
6573 rm -f conftest*
6574 xe_check_libs=""
6575
6576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6577   echo "$ac_t""yes" 1>&6
6578   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6579 else
6580   echo "$ac_t""no" 1>&6
6581 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6582 fi
6583
6584
6585   fi
6586   libs_x="-lX11"
6587   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6588
6589     
6590 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6591 echo "configure:6592: checking for XShapeSelectInput in -lXext" >&5
6592 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6593
6594 xe_check_libs=" -lXext "
6595 cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 /* Override any gcc2 internal prototype to avoid an error.  */
6599 /* We use char because int might match the return type of a gcc2
6600     builtin and then its argument prototype would still apply.  */
6601 char XShapeSelectInput();
6602
6603 int main() {
6604 XShapeSelectInput()
6605 ; return 0; }
6606 EOF
6607 if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6608   rm -rf conftest*
6609   eval "ac_cv_lib_$ac_lib_var=yes"
6610 else
6611   echo "configure: failed program was:" >&5
6612   cat conftest.$ac_ext >&5
6613   rm -rf conftest*
6614   eval "ac_cv_lib_$ac_lib_var=no"
6615 fi
6616 rm -f conftest*
6617 xe_check_libs=""
6618
6619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6620   echo "$ac_t""yes" 1>&6
6621   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6622 else
6623   echo "$ac_t""no" 1>&6
6624 fi
6625
6626
6627
6628     
6629 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6630 echo "configure:6631: checking for XtOpenDisplay in -lXt" >&5
6631 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6632
6633 xe_check_libs=" -lXt "
6634 cat > conftest.$ac_ext <<EOF
6635 #line 6636 "configure"
6636 #include "confdefs.h"
6637 /* Override any gcc2 internal prototype to avoid an error.  */
6638 /* We use char because int might match the return type of a gcc2
6639     builtin and then its argument prototype would still apply.  */
6640 char XtOpenDisplay();
6641
6642 int main() {
6643 XtOpenDisplay()
6644 ; return 0; }
6645 EOF
6646 if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6647   rm -rf conftest*
6648   eval "ac_cv_lib_$ac_lib_var=yes"
6649 else
6650   echo "configure: failed program was:" >&5
6651   cat conftest.$ac_ext >&5
6652   rm -rf conftest*
6653   eval "ac_cv_lib_$ac_lib_var=no"
6654 fi
6655 rm -f conftest*
6656 xe_check_libs=""
6657
6658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6659   echo "$ac_t""yes" 1>&6
6660   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6661 else
6662   echo "$ac_t""no" 1>&6
6663 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6664 fi
6665
6666
6667
6668   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6669 echo "configure:6670: checking the version of X11 being used" >&5
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 #include <X11/Intrinsic.h>
6674     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6675 EOF
6676 if { (eval echo configure:6677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6677 then
6678   ./conftest foobar; x11_release=$?
6679 else
6680   conftest_rc="$?"
6681   echo "configure: failed program was:" >&5
6682   cat conftest.$ac_ext >&5
6683   rm -fr conftest*
6684   x11_release=4
6685 fi
6686 rm -fr conftest*
6687   echo "$ac_t""R${x11_release}" 1>&6
6688   { test "$extra_verbose" = "yes" && cat << EOF
6689     Defining THIS_IS_X11R${x11_release}
6690 EOF
6691 cat >> confdefs.h <<EOF
6692 #define THIS_IS_X11R${x11_release} 1
6693 EOF
6694 }
6695
6696
6697   if test "${x11_release}" = "4"; then
6698     case "$with_widgets" in
6699       "" | "no") with_widgets=no ;;
6700       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6701     esac
6702   fi
6703
6704   for ac_func in XConvertCase
6705 do
6706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6707 echo "configure:6708: checking for $ac_func" >&5
6708
6709 cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* System header to define __stub macros and hopefully few prototypes,
6713     which can conflict with char $ac_func(); below.  */
6714 #include <assert.h>
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char $ac_func();
6719
6720 int main() {
6721
6722 /* The GNU C library defines this for functions which it implements
6723     to always fail with ENOSYS.  Some functions are actually named
6724     something starting with __ and the normal name is an alias.  */
6725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6726 choke me
6727 #else
6728 $ac_func();
6729 #endif
6730
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6734   rm -rf conftest*
6735   eval "ac_cv_func_$ac_func=yes"
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   eval "ac_cv_func_$ac_func=no"
6741 fi
6742 rm -f conftest*
6743
6744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6747   { test "$extra_verbose" = "yes" && cat << EOF
6748     Defining $ac_tr_func
6749 EOF
6750 cat >> confdefs.h <<EOF
6751 #define $ac_tr_func 1
6752 EOF
6753 }
6754  
6755 else
6756   echo "$ac_t""no" 1>&6
6757 fi
6758 done
6759
6760
6761   for ac_hdr in X11/Xlocale.h
6762 do
6763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6765 echo "configure:6766: checking for $ac_hdr" >&5
6766
6767 cat > conftest.$ac_ext <<EOF
6768 #line 6769 "configure"
6769 #include "confdefs.h"
6770 #include <$ac_hdr>
6771 EOF
6772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6773 { (eval echo configure:6774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6775 if test -z "$ac_err"; then
6776   rm -rf conftest*
6777   eval "ac_cv_header_$ac_safe=yes"
6778 else
6779   echo "$ac_err" >&5
6780   echo "configure: failed program was:" >&5
6781   cat conftest.$ac_ext >&5
6782   rm -rf conftest*
6783   eval "ac_cv_header_$ac_safe=no"
6784 fi
6785 rm -f conftest*
6786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6787   echo "$ac_t""yes" 1>&6
6788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6789   { test "$extra_verbose" = "yes" && cat << EOF
6790     Defining $ac_tr_hdr
6791 EOF
6792 cat >> confdefs.h <<EOF
6793 #define $ac_tr_hdr 1
6794 EOF
6795 }
6796  
6797 else
6798   echo "$ac_t""no" 1>&6
6799 fi
6800 done
6801
6802
6803     for ac_func in XRegisterIMInstantiateCallback
6804 do
6805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6806 echo "configure:6807: checking for $ac_func" >&5
6807
6808 cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 /* System header to define __stub macros and hopefully few prototypes,
6812     which can conflict with char $ac_func(); below.  */
6813 #include <assert.h>
6814 /* Override any gcc2 internal prototype to avoid an error.  */
6815 /* We use char because int might match the return type of a gcc2
6816     builtin and then its argument prototype would still apply.  */
6817 char $ac_func();
6818
6819 int main() {
6820
6821 /* The GNU C library defines this for functions which it implements
6822     to always fail with ENOSYS.  Some functions are actually named
6823     something starting with __ and the normal name is an alias.  */
6824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6825 choke me
6826 #else
6827 $ac_func();
6828 #endif
6829
6830 ; return 0; }
6831 EOF
6832 if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6833   rm -rf conftest*
6834   eval "ac_cv_func_$ac_func=yes"
6835 else
6836   echo "configure: failed program was:" >&5
6837   cat conftest.$ac_ext >&5
6838   rm -rf conftest*
6839   eval "ac_cv_func_$ac_func=no"
6840 fi
6841 rm -f conftest*
6842
6843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6844   echo "$ac_t""yes" 1>&6
6845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6846   { test "$extra_verbose" = "yes" && cat << EOF
6847     Defining $ac_tr_func
6848 EOF
6849 cat >> confdefs.h <<EOF
6850 #define $ac_tr_func 1
6851 EOF
6852 }
6853  
6854 else
6855   echo "$ac_t""no" 1>&6
6856 fi
6857 done
6858
6859   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6860 echo "configure:6861: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6861   cat > conftest.$ac_ext <<EOF
6862 #line 6863 "configure"
6863 #include "confdefs.h"
6864
6865 #define NeedFunctionPrototypes 1
6866 #include <X11/Xlib.h>
6867 extern Bool XRegisterIMInstantiateCallback(
6868    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6869
6870 int main() {
6871
6872 ; return 0; }
6873 EOF
6874 if { (eval echo configure:6875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6875   rm -rf conftest*
6876   echo "$ac_t""yes" 1>&6
6877 else
6878   echo "configure: failed program was:" >&5
6879   cat conftest.$ac_ext >&5
6880   rm -rf conftest*
6881   echo "$ac_t""no" 1>&6
6882    { test "$extra_verbose" = "yes" && cat << \EOF
6883     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6884 EOF
6885 cat >> confdefs.h <<\EOF
6886 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6887 EOF
6888 }
6889
6890 fi
6891 rm -f conftest*
6892
6893     test -z "$with_xmu" && { 
6894 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6895 echo "configure:6896: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6896 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6897
6898 xe_check_libs=" -lXmu "
6899 cat > conftest.$ac_ext <<EOF
6900 #line 6901 "configure"
6901 #include "confdefs.h"
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 /* We use char because int might match the return type of a gcc2
6904     builtin and then its argument prototype would still apply.  */
6905 char XmuReadBitmapDataFromFile();
6906
6907 int main() {
6908 XmuReadBitmapDataFromFile()
6909 ; return 0; }
6910 EOF
6911 if { (eval echo configure:6912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6912   rm -rf conftest*
6913   eval "ac_cv_lib_$ac_lib_var=yes"
6914 else
6915   echo "configure: failed program was:" >&5
6916   cat conftest.$ac_ext >&5
6917   rm -rf conftest*
6918   eval "ac_cv_lib_$ac_lib_var=no"
6919 fi
6920 rm -f conftest*
6921 xe_check_libs=""
6922
6923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6924   echo "$ac_t""yes" 1>&6
6925   with_xmu=yes
6926 else
6927   echo "$ac_t""no" 1>&6
6928 with_xmu=no
6929 fi
6930
6931  }
6932   if test "$with_xmu" = "no"; then
6933     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6934    echo "    xemacs will be linked with \"xmu.o\""
6935  fi
6936   else
6937     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6938     { test "$extra_verbose" = "yes" && cat << \EOF
6939     Defining HAVE_XMU
6940 EOF
6941 cat >> confdefs.h <<\EOF
6942 #define HAVE_XMU 1
6943 EOF
6944 }
6945
6946   fi
6947
6948       
6949 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6950 echo "configure:6951: checking for main in -lXbsd" >&5
6951 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6952
6953 xe_check_libs=" -lXbsd "
6954 cat > conftest.$ac_ext <<EOF
6955 #line 6956 "configure"
6956 #include "confdefs.h"
6957
6958 int main() {
6959 main()
6960 ; return 0; }
6961 EOF
6962 if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6963   rm -rf conftest*
6964   eval "ac_cv_lib_$ac_lib_var=yes"
6965 else
6966   echo "configure: failed program was:" >&5
6967   cat conftest.$ac_ext >&5
6968   rm -rf conftest*
6969   eval "ac_cv_lib_$ac_lib_var=no"
6970 fi
6971 rm -f conftest*
6972 xe_check_libs=""
6973
6974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6975   echo "$ac_t""yes" 1>&6
6976   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6977 else
6978   echo "$ac_t""no" 1>&6
6979 fi
6980
6981
6982
6983     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6984         if test "$GCC" = "yes"; then
6985       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6986       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6987     else
6988       case "$CC" in
6989         "xlc" ) CC="xlc_r" ;;
6990         "xlC" ) CC="xlC_r" ;;
6991         "cc"  ) CC="cc_r" ;;
6992       esac
6993     fi
6994   fi
6995
6996 fi 
6997 if test "$with_msw" != "no"; then
6998   echo "checking for MS-Windows" 1>&6
6999 echo "configure:7000: checking for MS-Windows" >&5
7000   
7001 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7002 echo "configure:7003: checking for main in -lgdi32" >&5
7003 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7004
7005 xe_check_libs=" -lgdi32 "
7006 cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009
7010 int main() {
7011 main()
7012 ; return 0; }
7013 EOF
7014 if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7015   rm -rf conftest*
7016   eval "ac_cv_lib_$ac_lib_var=yes"
7017 else
7018   echo "configure: failed program was:" >&5
7019   cat conftest.$ac_ext >&5
7020   rm -rf conftest*
7021   eval "ac_cv_lib_$ac_lib_var=no"
7022 fi
7023 rm -f conftest*
7024 xe_check_libs=""
7025
7026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7027   echo "$ac_t""yes" 1>&6
7028   with_msw=yes
7029 else
7030   echo "$ac_t""no" 1>&6
7031 fi
7032
7033
7034   if test "$with_msw" = "yes"; then
7035     { test "$extra_verbose" = "yes" && cat << \EOF
7036     Defining HAVE_MS_WINDOWS
7037 EOF
7038 cat >> confdefs.h <<\EOF
7039 #define HAVE_MS_WINDOWS 1
7040 EOF
7041 }
7042
7043
7044         if test "$with_netinstall" = "yes"; then
7045       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7046       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7047       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7048     fi
7049
7050     install_pp="$blddir/lib-src/installexe.sh"
7051     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
7052     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7053     if test "$window_system" != x11; then
7054         window_system=msw
7055         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7056             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7057    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7058  fi
7059         test "$with_menubars"   != "no" && with_menubars=msw \
7060             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7061    echo "    xemacs will be linked with \"menubar-msw.o\""
7062  fi
7063         test "$with_toolbars"   != "no" && with_toolbars=msw \
7064             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7065    echo "    xemacs will be linked with \"toolbar-msw.o\""
7066  fi
7067         test "$with_dialogs"   != "no" && with_dialogs=msw \
7068             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7069    echo "    xemacs will be linked with \"dialog-msw.o\""
7070  fi
7071         test "$with_widgets"   != "no" && with_widgets=msw
7072     else
7073         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7074    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7075  fi
7076         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7077    echo "    xemacs will be linked with \"menubar-msw.o\""
7078  fi
7079         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7080    echo "    xemacs will be linked with \"toolbar-msw.o\""
7081  fi
7082         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7083    echo "    xemacs will be linked with \"dialog-msw.o\""
7084  fi
7085     fi
7086         cat > conftest.$ac_ext <<EOF
7087 #line 7088 "configure"
7088 #include "confdefs.h"
7089 #include <fcntl.h>
7090     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7091 EOF
7092 if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7093 then
7094   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7095     Defining HAVE_MSG_SELECT
7096 EOF
7097 cat >> confdefs.h <<\EOF
7098 #define HAVE_MSG_SELECT 1
7099 EOF
7100 }
7101
7102 else
7103   conftest_rc="$?"
7104   echo "configure: failed program was:" >&5
7105   cat conftest.$ac_ext >&5
7106 fi
7107 rm -fr conftest*
7108     with_file_coding=yes
7109     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
7110    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\""
7111  fi
7112   fi
7113 fi
7114
7115
7116
7117 test -z "$window_system" && window_system="none"
7118
7119 if test "$window_system" = "none"; then
7120   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7121   do
7122     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7123        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7124     fi
7125     eval "with_${feature}=no"
7126   done
7127 else
7128   test -z "$with_toolbars" && with_toolbars=yes
7129 fi
7130
7131 if test "$with_msw" != "yes"; then
7132   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7133   do
7134     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7135        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7136     fi
7137     eval "with_${feature}=no"
7138   done
7139 else
7140   :
7141 fi
7142
7143 if test "$with_x11" != "yes"; then
7144             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7145   do
7146     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7147        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7148     fi
7149     eval "with_${feature}=no"
7150   done
7151 fi
7152
7153 if test "$with_x11" = "yes"; then
7154   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7155 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7156 echo "configure:7157: checking for X11/extensions/shape.h" >&5
7157
7158 cat > conftest.$ac_ext <<EOF
7159 #line 7160 "configure"
7160 #include "confdefs.h"
7161 #include <X11/extensions/shape.h>
7162 EOF
7163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7164 { (eval echo configure:7165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7166 if test -z "$ac_err"; then
7167   rm -rf conftest*
7168   eval "ac_cv_header_$ac_safe=yes"
7169 else
7170   echo "$ac_err" >&5
7171   echo "configure: failed program was:" >&5
7172   cat conftest.$ac_ext >&5
7173   rm -rf conftest*
7174   eval "ac_cv_header_$ac_safe=no"
7175 fi
7176 rm -f conftest*
7177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7178   echo "$ac_t""yes" 1>&6
7179   
7180    { test "$extra_verbose" = "yes" && cat << \EOF
7181     Defining HAVE_BALLOON_HELP
7182 EOF
7183 cat >> confdefs.h <<\EOF
7184 #define HAVE_BALLOON_HELP 1
7185 EOF
7186 }
7187
7188    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7189    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7190  fi
7191 else
7192   echo "$ac_t""no" 1>&6
7193 fi
7194
7195 fi
7196
7197 bitmapdir=
7198
7199 case "$window_system" in
7200   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7201   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7202   gtk  )
7203        HAVE_X_WINDOWS=no
7204        test "$with_gnome" = "yes" && echo "  Using GNOME."
7205        test "$with_gnome" = "no" && echo "  Using GTK."
7206        ;;
7207   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7208 esac
7209
7210 case "$x_libraries" in *X11R4* )
7211   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7212   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7213 esac
7214
7215 echo "checking for WM_COMMAND option" 1>&6
7216 echo "configure:7217: checking for WM_COMMAND option" >&5;
7217 if test "$with_wmcommand" != "no"; then
7218   { test "$extra_verbose" = "yes" && cat << \EOF
7219     Defining HAVE_WMCOMMAND
7220 EOF
7221 cat >> confdefs.h <<\EOF
7222 #define HAVE_WMCOMMAND 1
7223 EOF
7224 }
7225
7226 fi
7227
7228 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7229 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7230 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7231 echo "configure:7232: checking for X11/Xauth.h" >&5
7232
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 #include <X11/Xauth.h>
7237 EOF
7238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7239 { (eval echo configure:7240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7241 if test -z "$ac_err"; then
7242   rm -rf conftest*
7243   eval "ac_cv_header_$ac_safe=yes"
7244 else
7245   echo "$ac_err" >&5
7246   echo "configure: failed program was:" >&5
7247   cat conftest.$ac_ext >&5
7248   rm -rf conftest*
7249   eval "ac_cv_header_$ac_safe=no"
7250 fi
7251 rm -f conftest*
7252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7253   echo "$ac_t""yes" 1>&6
7254   :
7255 else
7256   echo "$ac_t""no" 1>&6
7257 with_xauth=no
7258 fi
7259  }
7260 test -z "$with_xauth" && { 
7261 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7262 echo "configure:7263: checking for XauGetAuthByAddr in -lXau" >&5
7263 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7264
7265 xe_check_libs=" -lXau "
7266 cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 /* Override any gcc2 internal prototype to avoid an error.  */
7270 /* We use char because int might match the return type of a gcc2
7271     builtin and then its argument prototype would still apply.  */
7272 char XauGetAuthByAddr();
7273
7274 int main() {
7275 XauGetAuthByAddr()
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   eval "ac_cv_lib_$ac_lib_var=yes"
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   eval "ac_cv_lib_$ac_lib_var=no"
7286 fi
7287 rm -f conftest*
7288 xe_check_libs=""
7289
7290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7291   echo "$ac_t""yes" 1>&6
7292   :
7293 else
7294   echo "$ac_t""no" 1>&6
7295 with_xauth=no
7296 fi
7297
7298  }
7299 test -z "$with_xauth" && with_xauth=yes
7300 if test "$with_xauth" = "yes"; then
7301   { test "$extra_verbose" = "yes" && cat << \EOF
7302     Defining HAVE_XAUTH
7303 EOF
7304 cat >> confdefs.h <<\EOF
7305 #define HAVE_XAUTH 1
7306 EOF
7307 }
7308
7309   
7310 T=""
7311 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
7312 libs_xauth="$T"
7313
7314 fi
7315
7316
7317
7318
7319 if test "$with_tooltalk" != "no" ; then
7320       for dir in "" "Tt/" "desktop/" ; do
7321     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7322 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7323 echo "configure:7324: checking for ${dir}tt_c.h" >&5
7324
7325 cat > conftest.$ac_ext <<EOF
7326 #line 7327 "configure"
7327 #include "confdefs.h"
7328 #include <${dir}tt_c.h>
7329 EOF
7330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7331 { (eval echo configure:7332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7333 if test -z "$ac_err"; then
7334   rm -rf conftest*
7335   eval "ac_cv_header_$ac_safe=yes"
7336 else
7337   echo "$ac_err" >&5
7338   echo "configure: failed program was:" >&5
7339   cat conftest.$ac_ext >&5
7340   rm -rf conftest*
7341   eval "ac_cv_header_$ac_safe=no"
7342 fi
7343 rm -f conftest*
7344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7345   echo "$ac_t""yes" 1>&6
7346   tt_c_h_file="${dir}tt_c.h"; break
7347 else
7348   echo "$ac_t""no" 1>&6
7349 fi
7350
7351   done
7352   if test -z "$tt_c_h_file"; then
7353     if test "$with_tooltalk" = "yes"; then
7354       (echo "$progname: Usage error:"
7355 echo " " "Unable to find required tooltalk header files."
7356 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7357     fi
7358     with_tooltalk=no
7359   fi
7360 fi
7361 if test "$with_tooltalk" != "no" ; then
7362   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7363     
7364 xe_msg_checking="for tt_message_create in -ltt"
7365 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7366 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7367 echo "configure:7368: checking "$xe_msg_checking"" >&5
7368 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7369
7370 xe_check_libs=" -ltt $extra_libs"
7371 cat > conftest.$ac_ext <<EOF
7372 #line 7373 "configure"
7373 #include "confdefs.h"
7374 /* Override any gcc2 internal prototype to avoid an error.  */
7375 /* We use char because int might match the return type of a gcc2
7376     builtin and then its argument prototype would still apply.  */
7377 char tt_message_create();
7378
7379 int main() {
7380 tt_message_create()
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384   rm -rf conftest*
7385   eval "ac_cv_lib_$ac_lib_var=yes"
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   eval "ac_cv_lib_$ac_lib_var=no"
7391 fi
7392 rm -f conftest*
7393 xe_check_libs=""
7394
7395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7396   echo "$ac_t""yes" 1>&6
7397   tt_libs="-ltt $extra_libs"; break
7398 else
7399   echo "$ac_t""no" 1>&6
7400 :
7401 fi
7402
7403
7404   done
7405   if test -z "$tt_libs"; then
7406     if test "$with_tooltalk" = "yes"; then
7407       (echo "$progname: Usage error:"
7408 echo " " "Unable to find required tooltalk libraries."
7409 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7410     fi
7411     with_tooltalk=no
7412   fi
7413 fi
7414 test -z "$with_tooltalk" && with_tooltalk=yes
7415 if test "$with_tooltalk" = "yes"; then
7416   { test "$extra_verbose" = "yes" && cat << \EOF
7417     Defining TOOLTALK
7418 EOF
7419 cat >> confdefs.h <<\EOF
7420 #define TOOLTALK 1
7421 EOF
7422 }
7423
7424   { test "$extra_verbose" = "yes" && cat << EOF
7425     Defining TT_C_H_FILE = "$tt_c_h_file"
7426 EOF
7427 cat >> confdefs.h <<EOF
7428 #define TT_C_H_FILE "$tt_c_h_file"
7429 EOF
7430 }
7431
7432   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7433   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7434    echo "    xemacs will be linked with \"tooltalk.o\""
7435  fi
7436 fi
7437
7438 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7439 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7440 echo "configure:7441: checking for Dt/Dt.h" >&5
7441
7442 cat > conftest.$ac_ext <<EOF
7443 #line 7444 "configure"
7444 #include "confdefs.h"
7445 #include <Dt/Dt.h>
7446 EOF
7447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7448 { (eval echo configure:7449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7450 if test -z "$ac_err"; then
7451   rm -rf conftest*
7452   eval "ac_cv_header_$ac_safe=yes"
7453 else
7454   echo "$ac_err" >&5
7455   echo "configure: failed program was:" >&5
7456   cat conftest.$ac_ext >&5
7457   rm -rf conftest*
7458   eval "ac_cv_header_$ac_safe=no"
7459 fi
7460 rm -f conftest*
7461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7462   echo "$ac_t""yes" 1>&6
7463   :
7464 else
7465   echo "$ac_t""no" 1>&6
7466 with_cde=no
7467 fi
7468  }
7469 test -z "$with_cde" && { 
7470 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7471 echo "configure:7472: checking for DtDndDragStart in -lDtSvc" >&5
7472 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7473
7474 xe_check_libs=" -lDtSvc "
7475 cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 /* Override any gcc2 internal prototype to avoid an error.  */
7479 /* We use char because int might match the return type of a gcc2
7480     builtin and then its argument prototype would still apply.  */
7481 char DtDndDragStart();
7482
7483 int main() {
7484 DtDndDragStart()
7485 ; return 0; }
7486 EOF
7487 if { (eval echo configure:7488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=yes"
7490 else
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=no"
7495 fi
7496 rm -f conftest*
7497 xe_check_libs=""
7498
7499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7500   echo "$ac_t""yes" 1>&6
7501   :
7502 else
7503   echo "$ac_t""no" 1>&6
7504 with_cde=no
7505 fi
7506
7507  }
7508 test -z "$with_cde" && with_cde=yes
7509 if test "$with_dragndrop" = no; then
7510   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7511   with_cde=no
7512 fi
7513 if test "$with_cde" = "yes" ; then
7514   { test "$extra_verbose" = "yes" && cat << \EOF
7515     Defining HAVE_CDE
7516 EOF
7517 cat >> confdefs.h <<\EOF
7518 #define HAVE_CDE 1
7519 EOF
7520 }
7521
7522   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7523   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7524   with_tooltalk=yes # CDE requires Tooltalk
7525   need_motif=yes    # CDE requires Motif
7526 fi
7527
7528 test "$window_system" != "x11" && with_offix=no
7529 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7530   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7531   with_offix=no
7532 fi
7533 if test "$with_dragndrop" = no; then
7534   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7535   with_offix=no
7536 fi
7537 if test "$with_cde" = yes; then
7538   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7539   with_offix=no
7540 fi
7541 test -z "$with_offix" && with_offix=no
7542 if test "$with_offix" = "yes"; then
7543   { test "$extra_verbose" = "yes" && cat << \EOF
7544     Defining HAVE_OFFIX_DND
7545 EOF
7546 cat >> confdefs.h <<\EOF
7547 #define HAVE_OFFIX_DND 1
7548 EOF
7549 }
7550
7551   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7552   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7553 fi
7554 if test "$with_gtk" = "yes"; then
7555    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7556 fi
7557
7558 if test "$with_dragndrop" != "no" ; then
7559   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7560 echo "configure:7561: checking if drag and drop API is needed" >&5
7561   if test -n "$dragndrop_proto" ; then
7562     with_dragndrop=yes
7563     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7564     { test "$extra_verbose" = "yes" && cat << \EOF
7565     Defining HAVE_DRAGNDROP
7566 EOF
7567 cat >> confdefs.h <<\EOF
7568 #define HAVE_DRAGNDROP 1
7569 EOF
7570 }
7571
7572     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7573   else
7574     with_dragndrop=no
7575     echo "$ac_t""no" 1>&6
7576   fi
7577 fi
7578
7579 echo "checking for LDAP" 1>&6
7580 echo "configure:7581: checking for LDAP" >&5
7581 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7582 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7583 echo "configure:7584: checking for ldap.h" >&5
7584
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #include <ldap.h>
7589 EOF
7590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7591 { (eval echo configure:7592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7593 if test -z "$ac_err"; then
7594   rm -rf conftest*
7595   eval "ac_cv_header_$ac_safe=yes"
7596 else
7597   echo "$ac_err" >&5
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_header_$ac_safe=no"
7602 fi
7603 rm -f conftest*
7604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7605   echo "$ac_t""yes" 1>&6
7606   :
7607 else
7608   echo "$ac_t""no" 1>&6
7609 with_ldap=no
7610 fi
7611  }
7612 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7613 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7614 echo "configure:7615: checking for lber.h" >&5
7615
7616 cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 #include <lber.h>
7620 EOF
7621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7622 { (eval echo configure:7623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7624 if test -z "$ac_err"; then
7625   rm -rf conftest*
7626   eval "ac_cv_header_$ac_safe=yes"
7627 else
7628   echo "$ac_err" >&5
7629   echo "configure: failed program was:" >&5
7630   cat conftest.$ac_ext >&5
7631   rm -rf conftest*
7632   eval "ac_cv_header_$ac_safe=no"
7633 fi
7634 rm -f conftest*
7635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7636   echo "$ac_t""yes" 1>&6
7637   :
7638 else
7639   echo "$ac_t""no" 1>&6
7640 with_ldap=no
7641 fi
7642  }
7643 if test "$with_ldap" != "no"; then
7644   
7645 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7646 echo "configure:7647: checking for ldap_search in -lldap" >&5
7647 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7648
7649 xe_check_libs=" -lldap "
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 ldap_search();
7657
7658 int main() {
7659 ldap_search()
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   with_ldap_nolber=yes
7677 else
7678   echo "$ac_t""no" 1>&6
7679 with_ldap_nolber=no
7680 fi
7681
7682
7683   test "$with_ldap_nolber" = "no" && { 
7684 xe_msg_checking="for ldap_open in -lldap"
7685 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7686 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7687 echo "configure:7688: checking "$xe_msg_checking"" >&5
7688 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7689
7690 xe_check_libs=" -lldap -llber"
7691 cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 /* Override any gcc2 internal prototype to avoid an error.  */
7695 /* We use char because int might match the return type of a gcc2
7696     builtin and then its argument prototype would still apply.  */
7697 char ldap_open();
7698
7699 int main() {
7700 ldap_open()
7701 ; return 0; }
7702 EOF
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7704   rm -rf conftest*
7705   eval "ac_cv_lib_$ac_lib_var=yes"
7706 else
7707   echo "configure: failed program was:" >&5
7708   cat conftest.$ac_ext >&5
7709   rm -rf conftest*
7710   eval "ac_cv_lib_$ac_lib_var=no"
7711 fi
7712 rm -f conftest*
7713 xe_check_libs=""
7714
7715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7716   echo "$ac_t""yes" 1>&6
7717   with_ldap_lber=yes
7718 else
7719   echo "$ac_t""no" 1>&6
7720 with_ldap_lber=no
7721 fi
7722
7723  }
7724   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7725 xe_msg_checking="for ldap_open in -lldap"
7726 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7727 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7728 echo "configure:7729: checking "$xe_msg_checking"" >&5
7729 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7730
7731 xe_check_libs=" -lldap -llber -lkrb"
7732 cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735 /* Override any gcc2 internal prototype to avoid an error.  */
7736 /* We use char because int might match the return type of a gcc2
7737     builtin and then its argument prototype would still apply.  */
7738 char ldap_open();
7739
7740 int main() {
7741 ldap_open()
7742 ; return 0; }
7743 EOF
7744 if { (eval echo configure:7745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7745   rm -rf conftest*
7746   eval "ac_cv_lib_$ac_lib_var=yes"
7747 else
7748   echo "configure: failed program was:" >&5
7749   cat conftest.$ac_ext >&5
7750   rm -rf conftest*
7751   eval "ac_cv_lib_$ac_lib_var=no"
7752 fi
7753 rm -f conftest*
7754 xe_check_libs=""
7755
7756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7757   echo "$ac_t""yes" 1>&6
7758   with_ldap_krb=yes
7759 else
7760   echo "$ac_t""no" 1>&6
7761 with_ldap_krb=no
7762 fi
7763
7764  }
7765   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7766 xe_msg_checking="for ldap_open in -lldap"
7767 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7768 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7769 echo "configure:7770: checking "$xe_msg_checking"" >&5
7770 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7771
7772 xe_check_libs=" -lldap -llber -lkrb -ldes"
7773 cat > conftest.$ac_ext <<EOF
7774 #line 7775 "configure"
7775 #include "confdefs.h"
7776 /* Override any gcc2 internal prototype to avoid an error.  */
7777 /* We use char because int might match the return type of a gcc2
7778     builtin and then its argument prototype would still apply.  */
7779 char ldap_open();
7780
7781 int main() {
7782 ldap_open()
7783 ; return 0; }
7784 EOF
7785 if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7786   rm -rf conftest*
7787   eval "ac_cv_lib_$ac_lib_var=yes"
7788 else
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -rf conftest*
7792   eval "ac_cv_lib_$ac_lib_var=no"
7793 fi
7794 rm -f conftest*
7795 xe_check_libs=""
7796
7797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7798   echo "$ac_t""yes" 1>&6
7799   with_ldap_krbdes=yes
7800 else
7801   echo "$ac_t""no" 1>&6
7802 with_ldap_krbdes=no
7803 fi
7804
7805  }
7806   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
7807 fi
7808 if test "$with_ldap" = "yes"; then
7809   { test "$extra_verbose" = "yes" && cat << \EOF
7810     Defining HAVE_LDAP
7811 EOF
7812 cat >> confdefs.h <<\EOF
7813 #define HAVE_LDAP 1
7814 EOF
7815 }
7816
7817   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7818    echo "    xemacs will be linked with \"eldap.o\""
7819  fi
7820   if test "$with_ldap_nolber" = "yes" ; then
7821     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7822   else
7823     if test "$with_ldap_krb" = "yes" ; then
7824       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7825     fi
7826     if test "$with_ldap_krbdes" = "yes" ; then
7827       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7828       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7829     fi
7830     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7831     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7832   fi
7833   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7834 do
7835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7836 echo "configure:7837: checking for $ac_func" >&5
7837
7838 cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* System header to define __stub macros and hopefully few prototypes,
7842     which can conflict with char $ac_func(); below.  */
7843 #include <assert.h>
7844 /* Override any gcc2 internal prototype to avoid an error.  */
7845 /* We use char because int might match the return type of a gcc2
7846     builtin and then its argument prototype would still apply.  */
7847 char $ac_func();
7848
7849 int main() {
7850
7851 /* The GNU C library defines this for functions which it implements
7852     to always fail with ENOSYS.  Some functions are actually named
7853     something starting with __ and the normal name is an alias.  */
7854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7855 choke me
7856 #else
7857 $ac_func();
7858 #endif
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   eval "ac_cv_func_$ac_func=yes"
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   eval "ac_cv_func_$ac_func=no"
7870 fi
7871 rm -f conftest*
7872
7873 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7874   echo "$ac_t""yes" 1>&6
7875     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7876   { test "$extra_verbose" = "yes" && cat << EOF
7877     Defining $ac_tr_func
7878 EOF
7879 cat >> confdefs.h <<EOF
7880 #define $ac_tr_func 1
7881 EOF
7882 }
7883  
7884 else
7885   echo "$ac_t""no" 1>&6
7886 fi
7887 done
7888
7889 fi
7890
7891 if test "$with_postgresql" != "no"; then
7892   echo "checking for PostgreSQL" 1>&6
7893 echo "configure:7894: checking for PostgreSQL" >&5
7894
7895   for header_dir in "" "pgsql/" "postgresql/"; do
7896     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7897 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7898 echo "configure:7899: checking for ${header_dir}libpq-fe.h" >&5
7899
7900 cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 #include <${header_dir}libpq-fe.h>
7904 EOF
7905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7906 { (eval echo configure:7907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7908 if test -z "$ac_err"; then
7909   rm -rf conftest*
7910   eval "ac_cv_header_$ac_safe=yes"
7911 else
7912   echo "$ac_err" >&5
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   eval "ac_cv_header_$ac_safe=no"
7917 fi
7918 rm -f conftest*
7919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7920   echo "$ac_t""yes" 1>&6
7921   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7922 else
7923   echo "$ac_t""no" 1>&6
7924 fi
7925
7926   done
7927
7928   test -n "$libpq_fe_h_file" && { 
7929 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7930 echo "configure:7931: checking for PQconnectdb in -lpq" >&5
7931 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7932
7933 xe_check_libs=" -lpq "
7934 cat > conftest.$ac_ext <<EOF
7935 #line 7936 "configure"
7936 #include "confdefs.h"
7937 /* Override any gcc2 internal prototype to avoid an error.  */
7938 /* We use char because int might match the return type of a gcc2
7939     builtin and then its argument prototype would still apply.  */
7940 char PQconnectdb();
7941
7942 int main() {
7943 PQconnectdb()
7944 ; return 0; }
7945 EOF
7946 if { (eval echo configure:7947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7947   rm -rf conftest*
7948   eval "ac_cv_lib_$ac_lib_var=yes"
7949 else
7950   echo "configure: failed program was:" >&5
7951   cat conftest.$ac_ext >&5
7952   rm -rf conftest*
7953   eval "ac_cv_lib_$ac_lib_var=no"
7954 fi
7955 rm -f conftest*
7956 xe_check_libs=""
7957
7958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7959   echo "$ac_t""yes" 1>&6
7960   have_libpq=yes
7961 else
7962   echo "$ac_t""no" 1>&6
7963 fi
7964
7965  }
7966
7967   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7968     with_postgresql=yes
7969     { test "$extra_verbose" = "yes" && cat << \EOF
7970     Defining HAVE_POSTGRESQL
7971 EOF
7972 cat >> confdefs.h <<\EOF
7973 #define HAVE_POSTGRESQL 1
7974 EOF
7975 }
7976
7977     
7978 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7979 echo "configure:7980: checking for PQconnectStart in -lpq" >&5
7980 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7981
7982 xe_check_libs=" -lpq "
7983 cat > conftest.$ac_ext <<EOF
7984 #line 7985 "configure"
7985 #include "confdefs.h"
7986 /* Override any gcc2 internal prototype to avoid an error.  */
7987 /* We use char because int might match the return type of a gcc2
7988     builtin and then its argument prototype would still apply.  */
7989 char PQconnectStart();
7990
7991 int main() {
7992 PQconnectStart()
7993 ; return 0; }
7994 EOF
7995 if { (eval echo configure:7996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7996   rm -rf conftest*
7997   eval "ac_cv_lib_$ac_lib_var=yes"
7998 else
7999   echo "configure: failed program was:" >&5
8000   cat conftest.$ac_ext >&5
8001   rm -rf conftest*
8002   eval "ac_cv_lib_$ac_lib_var=no"
8003 fi
8004 rm -f conftest*
8005 xe_check_libs=""
8006
8007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8008   echo "$ac_t""yes" 1>&6
8009   with_postgresqlv7=yes;
8010                  { test "$extra_verbose" = "yes" && cat << \EOF
8011     Defining HAVE_POSTGRESQLV7
8012 EOF
8013 cat >> confdefs.h <<\EOF
8014 #define HAVE_POSTGRESQLV7 1
8015 EOF
8016 }
8017
8018 else
8019   echo "$ac_t""no" 1>&6
8020 fi
8021
8022
8023     { test "$extra_verbose" = "yes" && cat << EOF
8024     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8025 EOF
8026 cat >> confdefs.h <<EOF
8027 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8028 EOF
8029 }
8030
8031     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8032     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8033    echo "    xemacs will be linked with \"postgresql.o\""
8034  fi
8035   elif test "$with_postgresql" = "yes"; then
8036     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8037   fi
8038 fi
8039
8040
8041 if test "$window_system" != "none"; then
8042   echo "checking for graphics libraries" 1>&6
8043 echo "configure:8044: checking for graphics libraries" >&5
8044
8045       libpath_xpm=
8046   incpath_xpm=
8047   case "$opsys" in 
8048     cygwin*)
8049       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8050       cygwin_top=`eval "dirname ${cygwin_top}"`;
8051       cygwin_top="${cygwin_top}/..";
8052       case "$window_system" in
8053                 x11)  ;;
8054                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8055              incpath_xpm="-I${cygwin_top}/include/noX"
8056               ;;
8057                 gtk)  ;;
8058                 none) ;;
8059                 *)    ;;
8060       esac
8061       ;;
8062         *) ;;
8063   esac
8064     xpm_problem=""
8065   if test -z "$with_xpm"; then
8066     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8067     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8068     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8069 echo "configure:8070: checking for Xpm - no older than 3.4f" >&5
8070     xe_check_libs=-lXpm
8071     cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 #define XPM_NUMBERS
8075 #include <X11/xpm.h>
8076     int main(int c, char **v) {
8077     return c == 1 ? 0 :
8078       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8079       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8080 EOF
8081 if { (eval echo configure:8082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8082 then
8083   ./conftest dummy_arg; xpm_status=$?;
8084       if test "$xpm_status" = "0"; then
8085         with_xpm=yes;
8086       else
8087         with_xpm=no;
8088         if test "$xpm_status" = "1"; then
8089           xpm_problem="Xpm library version and header file version don't match!"
8090         elif test "$xpm_status" = "2"; then
8091           xpm_problem="Xpm library version is too old!"
8092         else
8093           xpm_problem="Internal xpm detection logic error!"
8094         fi
8095         echo "
8096 *** WARNING *** $xpm_problem
8097   I'm not touching that with a 10-foot pole!
8098   If you really want to use the installed version of Xpm, rerun
8099   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8100     fi
8101 else
8102   conftest_rc="$?"
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -fr conftest*
8106   with_xpm=no
8107 fi
8108 rm -fr conftest*
8109     xe_check_libs=
8110     echo "$ac_t""$with_xpm" 1>&6
8111   fi
8112   if test "$with_xpm" = "yes"; then
8113                 { test "$extra_verbose" = "yes" && cat << \EOF
8114     Defining HAVE_XPM
8115 EOF
8116 cat >> confdefs.h <<\EOF
8117 #define HAVE_XPM 1
8118 EOF
8119 }
8120
8121     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8122     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8123     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8124     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8125 echo "configure:8126: checking for \"FOR_MSW\" xpm" >&5
8126     xe_check_libs=-lXpm
8127     cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130
8131 int main() {
8132 XpmCreatePixmapFromData()
8133 ; return 0; }
8134 EOF
8135 if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8136   rm -rf conftest*
8137   xpm_for_msw=no
8138 else
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   xpm_for_msw=yes
8143 fi
8144 rm -f conftest*
8145     xe_check_libs=
8146     echo "$ac_t""$xpm_for_msw" 1>&6
8147     if test "$xpm_for_msw" = "yes"; then
8148       { test "$extra_verbose" = "yes" && cat << \EOF
8149     Defining FOR_MSW
8150 EOF
8151 cat >> confdefs.h <<\EOF
8152 #define FOR_MSW 1
8153 EOF
8154 }
8155
8156     fi
8157   fi
8158
8159     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8160 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8161 echo "configure:8162: checking for compface.h" >&5
8162
8163 cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 #include <compface.h>
8167 EOF
8168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8169 { (eval echo configure:8170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8171 if test -z "$ac_err"; then
8172   rm -rf conftest*
8173   eval "ac_cv_header_$ac_safe=yes"
8174 else
8175   echo "$ac_err" >&5
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   eval "ac_cv_header_$ac_safe=no"
8180 fi
8181 rm -f conftest*
8182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8183   echo "$ac_t""yes" 1>&6
8184   :
8185 else
8186   echo "$ac_t""no" 1>&6
8187 with_xface=no
8188 fi
8189  }
8190   test -z "$with_xface" && { 
8191 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8192 echo "configure:8193: checking for UnGenFace in -lcompface" >&5
8193 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8194
8195 xe_check_libs=" -lcompface "
8196 cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199 /* Override any gcc2 internal prototype to avoid an error.  */
8200 /* We use char because int might match the return type of a gcc2
8201     builtin and then its argument prototype would still apply.  */
8202 char UnGenFace();
8203
8204 int main() {
8205 UnGenFace()
8206 ; return 0; }
8207 EOF
8208 if { (eval echo configure:8209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8209   rm -rf conftest*
8210   eval "ac_cv_lib_$ac_lib_var=yes"
8211 else
8212   echo "configure: failed program was:" >&5
8213   cat conftest.$ac_ext >&5
8214   rm -rf conftest*
8215   eval "ac_cv_lib_$ac_lib_var=no"
8216 fi
8217 rm -f conftest*
8218 xe_check_libs=""
8219
8220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8221   echo "$ac_t""yes" 1>&6
8222   : 
8223 else
8224   echo "$ac_t""no" 1>&6
8225 with_xface=no
8226 fi
8227
8228  }
8229   test -z "$with_xface" && with_xface=yes
8230   if test "$with_xface" = "yes"; then
8231     { test "$extra_verbose" = "yes" && cat << \EOF
8232     Defining HAVE_XFACE
8233 EOF
8234 cat >> confdefs.h <<\EOF
8235 #define HAVE_XFACE 1
8236 EOF
8237 }
8238
8239     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8240   fi
8241
8242         if test "$with_gif" != "no"; then
8243     with_gif="yes"
8244     { test "$extra_verbose" = "yes" && cat << \EOF
8245     Defining HAVE_GIF
8246 EOF
8247 cat >> confdefs.h <<\EOF
8248 #define HAVE_GIF 1
8249 EOF
8250 }
8251
8252     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8253    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8254  fi
8255   fi
8256
8257       if test "$with_png $with_tiff" != "no no"; then
8258     
8259 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8260 echo "configure:8261: checking for inflate in -lc" >&5
8261 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8262
8263 xe_check_libs=" -lc "
8264 cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* Override any gcc2 internal prototype to avoid an error.  */
8268 /* We use char because int might match the return type of a gcc2
8269     builtin and then its argument prototype would still apply.  */
8270 char inflate();
8271
8272 int main() {
8273 inflate()
8274 ; return 0; }
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8277   rm -rf conftest*
8278   eval "ac_cv_lib_$ac_lib_var=yes"
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -rf conftest*
8283   eval "ac_cv_lib_$ac_lib_var=no"
8284 fi
8285 rm -f conftest*
8286 xe_check_libs=""
8287
8288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8289   echo "$ac_t""yes" 1>&6
8290   :
8291 else
8292   echo "$ac_t""no" 1>&6
8293
8294 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8295 echo "configure:8296: checking for inflate in -lz" >&5
8296 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8297
8298 xe_check_libs=" -lz "
8299 cat > conftest.$ac_ext <<EOF
8300 #line 8301 "configure"
8301 #include "confdefs.h"
8302 /* Override any gcc2 internal prototype to avoid an error.  */
8303 /* We use char because int might match the return type of a gcc2
8304     builtin and then its argument prototype would still apply.  */
8305 char inflate();
8306
8307 int main() {
8308 inflate()
8309 ; return 0; }
8310 EOF
8311 if { (eval echo configure:8312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=yes"
8314 else
8315   echo "configure: failed program was:" >&5
8316   cat conftest.$ac_ext >&5
8317   rm -rf conftest*
8318   eval "ac_cv_lib_$ac_lib_var=no"
8319 fi
8320 rm -f conftest*
8321 xe_check_libs=""
8322
8323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8324   echo "$ac_t""yes" 1>&6
8325   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8326 else
8327   echo "$ac_t""no" 1>&6
8328
8329 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8330 echo "configure:8331: checking for inflate in -lgz" >&5
8331 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8332
8333 xe_check_libs=" -lgz "
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 /* Override any gcc2 internal prototype to avoid an error.  */
8338 /* We use char because int might match the return type of a gcc2
8339     builtin and then its argument prototype would still apply.  */
8340 char inflate();
8341
8342 int main() {
8343 inflate()
8344 ; return 0; }
8345 EOF
8346 if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8347   rm -rf conftest*
8348   eval "ac_cv_lib_$ac_lib_var=yes"
8349 else
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   eval "ac_cv_lib_$ac_lib_var=no"
8354 fi
8355 rm -f conftest*
8356 xe_check_libs=""
8357
8358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8359   echo "$ac_t""yes" 1>&6
8360   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8361 else
8362   echo "$ac_t""no" 1>&6
8363 fi
8364
8365
8366 fi
8367
8368
8369 fi
8370
8371
8372   fi
8373
8374     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8375 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8376 echo "configure:8377: checking for jpeglib.h" >&5
8377
8378 cat > conftest.$ac_ext <<EOF
8379 #line 8380 "configure"
8380 #include "confdefs.h"
8381 #include <jpeglib.h>
8382 EOF
8383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8384 { (eval echo configure:8385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8386 if test -z "$ac_err"; then
8387   rm -rf conftest*
8388   eval "ac_cv_header_$ac_safe=yes"
8389 else
8390   echo "$ac_err" >&5
8391   echo "configure: failed program was:" >&5
8392   cat conftest.$ac_ext >&5
8393   rm -rf conftest*
8394   eval "ac_cv_header_$ac_safe=no"
8395 fi
8396 rm -f conftest*
8397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8398   echo "$ac_t""yes" 1>&6
8399   :
8400 else
8401   echo "$ac_t""no" 1>&6
8402 with_jpeg=no
8403 fi
8404  }
8405   test -z "$with_jpeg" && { 
8406 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8407 echo "configure:8408: checking for jpeg_destroy_decompress in -ljpeg" >&5
8408 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8409
8410 xe_check_libs=" -ljpeg "
8411 cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 /* Override any gcc2 internal prototype to avoid an error.  */
8415 /* We use char because int might match the return type of a gcc2
8416     builtin and then its argument prototype would still apply.  */
8417 char jpeg_destroy_decompress();
8418
8419 int main() {
8420 jpeg_destroy_decompress()
8421 ; return 0; }
8422 EOF
8423 if { (eval echo configure:8424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8424   rm -rf conftest*
8425   eval "ac_cv_lib_$ac_lib_var=yes"
8426 else
8427   echo "configure: failed program was:" >&5
8428   cat conftest.$ac_ext >&5
8429   rm -rf conftest*
8430   eval "ac_cv_lib_$ac_lib_var=no"
8431 fi
8432 rm -f conftest*
8433 xe_check_libs=""
8434
8435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8436   echo "$ac_t""yes" 1>&6
8437   :
8438 else
8439   echo "$ac_t""no" 1>&6
8440 with_jpeg=no
8441 fi
8442
8443  }
8444   test -z "$with_jpeg" && with_jpeg=yes
8445   if test "$with_jpeg" = "yes"; then
8446     { test "$extra_verbose" = "yes" && cat << \EOF
8447     Defining HAVE_JPEG
8448 EOF
8449 cat >> confdefs.h <<\EOF
8450 #define HAVE_JPEG 1
8451 EOF
8452 }
8453
8454     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8455   fi
8456
8457     png_problem=""
8458   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8459 echo "configure:8460: checking for pow" >&5
8460
8461 cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 /* System header to define __stub macros and hopefully few prototypes,
8465     which can conflict with char pow(); below.  */
8466 #include <assert.h>
8467 /* Override any gcc2 internal prototype to avoid an error.  */
8468 /* We use char because int might match the return type of a gcc2
8469     builtin and then its argument prototype would still apply.  */
8470 char pow();
8471
8472 int main() {
8473
8474 /* The GNU C library defines this for functions which it implements
8475     to always fail with ENOSYS.  Some functions are actually named
8476     something starting with __ and the normal name is an alias.  */
8477 #if defined (__stub_pow) || defined (__stub___pow)
8478 choke me
8479 #else
8480 pow();
8481 #endif
8482
8483 ; return 0; }
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8486   rm -rf conftest*
8487   eval "ac_cv_func_pow=yes"
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_func_pow=no"
8493 fi
8494 rm -f conftest*
8495
8496 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8497   echo "$ac_t""yes" 1>&6
8498   :
8499 else
8500   echo "$ac_t""no" 1>&6
8501 with_png=no
8502 fi
8503  }
8504   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8505 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8506 echo "configure:8507: checking for png.h" >&5
8507
8508 cat > conftest.$ac_ext <<EOF
8509 #line 8510 "configure"
8510 #include "confdefs.h"
8511 #include <png.h>
8512 EOF
8513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8514 { (eval echo configure:8515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8516 if test -z "$ac_err"; then
8517   rm -rf conftest*
8518   eval "ac_cv_header_$ac_safe=yes"
8519 else
8520   echo "$ac_err" >&5
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523   rm -rf conftest*
8524   eval "ac_cv_header_$ac_safe=no"
8525 fi
8526 rm -f conftest*
8527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8528   echo "$ac_t""yes" 1>&6
8529   :
8530 else
8531   echo "$ac_t""no" 1>&6
8532 with_png=no
8533 fi
8534  }
8535   test -z "$with_png" && { 
8536 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8537 echo "configure:8538: checking for png_read_image in -lpng" >&5
8538 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8539
8540 xe_check_libs=" -lpng "
8541 cat > conftest.$ac_ext <<EOF
8542 #line 8543 "configure"
8543 #include "confdefs.h"
8544 /* Override any gcc2 internal prototype to avoid an error.  */
8545 /* We use char because int might match the return type of a gcc2
8546     builtin and then its argument prototype would still apply.  */
8547 char png_read_image();
8548
8549 int main() {
8550 png_read_image()
8551 ; return 0; }
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8554   rm -rf conftest*
8555   eval "ac_cv_lib_$ac_lib_var=yes"
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -rf conftest*
8560   eval "ac_cv_lib_$ac_lib_var=no"
8561 fi
8562 rm -f conftest*
8563 xe_check_libs=""
8564
8565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8566   echo "$ac_t""yes" 1>&6
8567   :
8568 else
8569   echo "$ac_t""no" 1>&6
8570 with_png=no
8571 fi
8572
8573  }
8574   if test -z "$with_png"; then
8575     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8576 echo "configure:8577: checking for workable png version information" >&5
8577     xe_check_libs="-lpng -lz"
8578     cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 #include <png.h>
8582     int main(int c, char **v) {
8583     if (c == 1) return 0;
8584     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8585     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8586 EOF
8587 if { (eval echo configure:8588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8588 then
8589   ./conftest dummy_arg; png_status=$?;
8590       if test "$png_status" = "0"; then
8591         with_png=yes;
8592       else
8593         with_png=no;
8594         if test "$png_status" = "1"; then
8595           png_problem="PNG library version and header file don't match!"
8596         elif test "$png_status" = "2"; then
8597           png_problem="PNG library version too old (pre 1.0.2)!"
8598         fi
8599         echo "
8600 *** WARNING *** $png_problem
8601   I'm not touching that with a 10-foot pole!
8602   If you really want to use the installed version of libPNG, rerun
8603   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8604     fi
8605 else
8606   conftest_rc="$?"
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -fr conftest*
8610   with_png=no
8611 fi
8612 rm -fr conftest*
8613     xe_check_libs=
8614     echo "$ac_t""$with_png" 1>&6
8615   fi
8616   if test "$with_png" = "yes"; then
8617     { test "$extra_verbose" = "yes" && cat << \EOF
8618     Defining HAVE_PNG
8619 EOF
8620 cat >> confdefs.h <<\EOF
8621 #define HAVE_PNG 1
8622 EOF
8623 }
8624
8625     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8626   fi
8627
8628     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8629 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8630 echo "configure:8631: checking for tiffio.h" >&5
8631
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 #include <tiffio.h>
8636 EOF
8637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8638 { (eval echo configure:8639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8640 if test -z "$ac_err"; then
8641   rm -rf conftest*
8642   eval "ac_cv_header_$ac_safe=yes"
8643 else
8644   echo "$ac_err" >&5
8645   echo "configure: failed program was:" >&5
8646   cat conftest.$ac_ext >&5
8647   rm -rf conftest*
8648   eval "ac_cv_header_$ac_safe=no"
8649 fi
8650 rm -f conftest*
8651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653   :
8654 else
8655   echo "$ac_t""no" 1>&6
8656 with_tiff=no
8657 fi
8658  }
8659   test -z "$with_tiff" && { 
8660 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8661 echo "configure:8662: checking for TIFFClientOpen in -ltiff" >&5
8662 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8663
8664 xe_check_libs=" -ltiff "
8665 cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 /* Override any gcc2 internal prototype to avoid an error.  */
8669 /* We use char because int might match the return type of a gcc2
8670     builtin and then its argument prototype would still apply.  */
8671 char TIFFClientOpen();
8672
8673 int main() {
8674 TIFFClientOpen()
8675 ; return 0; }
8676 EOF
8677 if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8678   rm -rf conftest*
8679   eval "ac_cv_lib_$ac_lib_var=yes"
8680 else
8681   echo "configure: failed program was:" >&5
8682   cat conftest.$ac_ext >&5
8683   rm -rf conftest*
8684   eval "ac_cv_lib_$ac_lib_var=no"
8685 fi
8686 rm -f conftest*
8687 xe_check_libs=""
8688
8689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8690   echo "$ac_t""yes" 1>&6
8691   :
8692 else
8693   echo "$ac_t""no" 1>&6
8694 with_tiff=no
8695 fi
8696
8697  }
8698   test -z "$with_tiff" && with_tiff=yes
8699   if test "$with_tiff" = "yes"; then
8700     { test "$extra_verbose" = "yes" && cat << \EOF
8701     Defining HAVE_TIFF
8702 EOF
8703 cat >> confdefs.h <<\EOF
8704 #define HAVE_TIFF 1
8705 EOF
8706 }
8707
8708     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8709   fi
8710 fi
8711
8712
8713 if test "$with_gtk" = "yes"; then
8714     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8715 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8716 echo "configure:8717: checking for compface.h" >&5
8717
8718 cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 #include <compface.h>
8722 EOF
8723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8724 { (eval echo configure:8725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8726 if test -z "$ac_err"; then
8727   rm -rf conftest*
8728   eval "ac_cv_header_$ac_safe=yes"
8729 else
8730   echo "$ac_err" >&5
8731   echo "configure: failed program was:" >&5
8732   cat conftest.$ac_ext >&5
8733   rm -rf conftest*
8734   eval "ac_cv_header_$ac_safe=no"
8735 fi
8736 rm -f conftest*
8737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8738   echo "$ac_t""yes" 1>&6
8739   :
8740 else
8741   echo "$ac_t""no" 1>&6
8742 with_xface=no
8743 fi
8744  }
8745   test -z "$with_xface" && { 
8746 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8747 echo "configure:8748: checking for UnGenFace in -lcompface" >&5
8748 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8749
8750 xe_check_libs=" -lcompface "
8751 cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 /* Override any gcc2 internal prototype to avoid an error.  */
8755 /* We use char because int might match the return type of a gcc2
8756     builtin and then its argument prototype would still apply.  */
8757 char UnGenFace();
8758
8759 int main() {
8760 UnGenFace()
8761 ; return 0; }
8762 EOF
8763 if { (eval echo configure:8764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8764   rm -rf conftest*
8765   eval "ac_cv_lib_$ac_lib_var=yes"
8766 else
8767   echo "configure: failed program was:" >&5
8768   cat conftest.$ac_ext >&5
8769   rm -rf conftest*
8770   eval "ac_cv_lib_$ac_lib_var=no"
8771 fi
8772 rm -f conftest*
8773 xe_check_libs=""
8774
8775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8776   echo "$ac_t""yes" 1>&6
8777   : 
8778 else
8779   echo "$ac_t""no" 1>&6
8780 with_xface=no
8781 fi
8782
8783  }
8784   test -z "$with_xface" && with_xface=yes
8785   if test "$with_xface" = "yes"; then
8786     { test "$extra_verbose" = "yes" && cat << \EOF
8787     Defining HAVE_XFACE
8788 EOF
8789 cat >> confdefs.h <<\EOF
8790 #define HAVE_XFACE 1
8791 EOF
8792 }
8793
8794     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8795   fi
8796 fi
8797
8798
8799
8800 if test "$with_x11" = "yes"; then
8801   echo "checking for X11 graphics libraries" 1>&6
8802 echo "configure:8803: checking for X11 graphics libraries" >&5
8803 fi
8804
8805 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8806   echo "checking for the Athena widgets" 1>&6
8807 echo "configure:8808: checking for the Athena widgets" >&5
8808
8809     case "$with_athena" in
8810         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8811     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8812     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8813     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8814     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8815     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8816   esac
8817
8818     if test "$athena_3d" = "no"; then
8819     
8820 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8821 echo "configure:8822: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8822 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8823
8824 xe_check_libs=" -l$athena_variant "
8825 cat > conftest.$ac_ext <<EOF
8826 #line 8827 "configure"
8827 #include "confdefs.h"
8828 /* Override any gcc2 internal prototype to avoid an error.  */
8829 /* We use char because int might match the return type of a gcc2
8830     builtin and then its argument prototype would still apply.  */
8831 char XawScrollbarSetThumb();
8832
8833 int main() {
8834 XawScrollbarSetThumb()
8835 ; return 0; }
8836 EOF
8837 if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8838   rm -rf conftest*
8839   eval "ac_cv_lib_$ac_lib_var=yes"
8840 else
8841   echo "configure: failed program was:" >&5
8842   cat conftest.$ac_ext >&5
8843   rm -rf conftest*
8844   eval "ac_cv_lib_$ac_lib_var=no"
8845 fi
8846 rm -f conftest*
8847 xe_check_libs=""
8848
8849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8850   echo "$ac_t""yes" 1>&6
8851           
8852 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8853 echo "configure:8854: checking for threeDClassRec in -l$athena_variant" >&5
8854 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8855
8856 xe_check_libs=" -l$athena_variant "
8857 cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860 /* Override any gcc2 internal prototype to avoid an error.  */
8861 /* We use char because int might match the return type of a gcc2
8862     builtin and then its argument prototype would still apply.  */
8863 char threeDClassRec();
8864
8865 int main() {
8866 threeDClassRec()
8867 ; return 0; }
8868 EOF
8869 if { (eval echo configure:8870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8870   rm -rf conftest*
8871   eval "ac_cv_lib_$ac_lib_var=yes"
8872 else
8873   echo "configure: failed program was:" >&5
8874   cat conftest.$ac_ext >&5
8875   rm -rf conftest*
8876   eval "ac_cv_lib_$ac_lib_var=no"
8877 fi
8878 rm -f conftest*
8879 xe_check_libs=""
8880
8881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8882   echo "$ac_t""yes" 1>&6
8883   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8884 else
8885   echo "$ac_t""no" 1>&6
8886 athena_lib=$athena_variant
8887 fi
8888
8889
8890       
8891 else
8892   echo "$ac_t""no" 1>&6
8893 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8894 fi
8895
8896
8897   else
8898         
8899 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8900 echo "configure:8901: checking for threeDClassRec in -l$athena_variant" >&5
8901 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8902
8903 xe_check_libs=" -l$athena_variant "
8904 cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 /* Override any gcc2 internal prototype to avoid an error.  */
8908 /* We use char because int might match the return type of a gcc2
8909     builtin and then its argument prototype would still apply.  */
8910 char threeDClassRec();
8911
8912 int main() {
8913 threeDClassRec()
8914 ; return 0; }
8915 EOF
8916 if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8917   rm -rf conftest*
8918   eval "ac_cv_lib_$ac_lib_var=yes"
8919 else
8920   echo "configure: failed program was:" >&5
8921   cat conftest.$ac_ext >&5
8922   rm -rf conftest*
8923   eval "ac_cv_lib_$ac_lib_var=no"
8924 fi
8925 rm -f conftest*
8926 xe_check_libs=""
8927
8928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8929   echo "$ac_t""yes" 1>&6
8930   athena_lib=$athena_variant
8931 else
8932   echo "$ac_t""no" 1>&6
8933 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8934 echo "configure:8935: checking for threeDClassRec in -lXaw" >&5
8935 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8936
8937 xe_check_libs=" -lXaw "
8938 cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 /* Override any gcc2 internal prototype to avoid an error.  */
8942 /* We use char because int might match the return type of a gcc2
8943     builtin and then its argument prototype would still apply.  */
8944 char threeDClassRec();
8945
8946 int main() {
8947 threeDClassRec()
8948 ; return 0; }
8949 EOF
8950 if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8951   rm -rf conftest*
8952   eval "ac_cv_lib_$ac_lib_var=yes"
8953 else
8954   echo "configure: failed program was:" >&5
8955   cat conftest.$ac_ext >&5
8956   rm -rf conftest*
8957   eval "ac_cv_lib_$ac_lib_var=no"
8958 fi
8959 rm -f conftest*
8960 xe_check_libs=""
8961
8962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8963   echo "$ac_t""yes" 1>&6
8964   athena_lib=Xaw;
8965           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8966         
8967 else
8968   echo "$ac_t""no" 1>&6
8969 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8970 fi
8971
8972
8973 fi
8974
8975
8976   fi
8977
8978     if test "$athena_3d" = "no"; then
8979     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8980 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8981 echo "configure:8982: checking for X11/Xaw/ThreeD.h" >&5
8982
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 #include <X11/Xaw/ThreeD.h>
8987 EOF
8988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8989 { (eval echo configure:8990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8991 if test -z "$ac_err"; then
8992   rm -rf conftest*
8993   eval "ac_cv_header_$ac_safe=yes"
8994 else
8995   echo "$ac_err" >&5
8996   echo "configure: failed program was:" >&5
8997   cat conftest.$ac_ext >&5
8998   rm -rf conftest*
8999   eval "ac_cv_header_$ac_safe=no"
9000 fi
9001 rm -f conftest*
9002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9003   echo "$ac_t""yes" 1>&6
9004   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9005 else
9006   echo "$ac_t""no" 1>&6
9007 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9008 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9009 echo "configure:9010: checking for X11/Xaw/XawInit.h" >&5
9010
9011 cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 #include <X11/Xaw/XawInit.h>
9015 EOF
9016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9017 { (eval echo configure:9018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9019 if test -z "$ac_err"; then
9020   rm -rf conftest*
9021   eval "ac_cv_header_$ac_safe=yes"
9022 else
9023   echo "$ac_err" >&5
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   eval "ac_cv_header_$ac_safe=no"
9028 fi
9029 rm -f conftest*
9030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9031   echo "$ac_t""yes" 1>&6
9032   athena_h_path=X11/Xaw
9033 else
9034   echo "$ac_t""no" 1>&6
9035 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9036 fi
9037
9038 fi
9039
9040   else
9041             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9042 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9043 echo "configure:9044: checking for X11/$athena_variant/XawInit.h" >&5
9044
9045 cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 #include <X11/$athena_variant/XawInit.h>
9049 EOF
9050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9051 { (eval echo configure:9052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9053 if test -z "$ac_err"; then
9054   rm -rf conftest*
9055   eval "ac_cv_header_$ac_safe=yes"
9056 else
9057   echo "$ac_err" >&5
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_header_$ac_safe=no"
9062 fi
9063 rm -f conftest*
9064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9065   echo "$ac_t""yes" 1>&6
9066   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9067 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9068 echo "configure:9069: checking for X11/$athena_variant/ThreeD.h" >&5
9069
9070 cat > conftest.$ac_ext <<EOF
9071 #line 9072 "configure"
9072 #include "confdefs.h"
9073 #include <X11/$athena_variant/ThreeD.h>
9074 EOF
9075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9076 { (eval echo configure:9077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9078 if test -z "$ac_err"; then
9079   rm -rf conftest*
9080   eval "ac_cv_header_$ac_safe=yes"
9081 else
9082   echo "$ac_err" >&5
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_header_$ac_safe=no"
9087 fi
9088 rm -f conftest*
9089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9090   echo "$ac_t""yes" 1>&6
9091   athena_h_path=X11/$athena_variant
9092 else
9093   echo "$ac_t""no" 1>&6
9094 fi
9095
9096 else
9097   echo "$ac_t""no" 1>&6
9098 fi
9099
9100
9101         if test -z "$athena_h_path"; then
9102       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9103 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9104 echo "configure:9105: checking for $athena_variant/XawInit.h" >&5
9105
9106 cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 #include <$athena_variant/XawInit.h>
9110 EOF
9111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9112 { (eval echo configure:9113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9114 if test -z "$ac_err"; then
9115   rm -rf conftest*
9116   eval "ac_cv_header_$ac_safe=yes"
9117 else
9118   echo "$ac_err" >&5
9119   echo "configure: failed program was:" >&5
9120   cat conftest.$ac_ext >&5
9121   rm -rf conftest*
9122   eval "ac_cv_header_$ac_safe=no"
9123 fi
9124 rm -f conftest*
9125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9126   echo "$ac_t""yes" 1>&6
9127   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9128 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9129 echo "configure:9130: checking for $athena_variant/ThreeD.h" >&5
9130
9131 cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 #include <$athena_variant/ThreeD.h>
9135 EOF
9136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9137 { (eval echo configure:9138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9139 if test -z "$ac_err"; then
9140   rm -rf conftest*
9141   eval "ac_cv_header_$ac_safe=yes"
9142 else
9143   echo "$ac_err" >&5
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -rf conftest*
9147   eval "ac_cv_header_$ac_safe=no"
9148 fi
9149 rm -f conftest*
9150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9151   echo "$ac_t""yes" 1>&6
9152   athena_h_path=$athena_variant
9153 else
9154   echo "$ac_t""no" 1>&6
9155 fi
9156
9157 else
9158   echo "$ac_t""no" 1>&6
9159 fi
9160
9161     fi
9162
9163         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9164       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9165 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9166 echo "configure:9167: checking for X11/Xaw3d/XawInit.h" >&5
9167
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 #include <X11/Xaw3d/XawInit.h>
9172 EOF
9173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9174 { (eval echo configure:9175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9176 if test -z "$ac_err"; then
9177   rm -rf conftest*
9178   eval "ac_cv_header_$ac_safe=yes"
9179 else
9180   echo "$ac_err" >&5
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   eval "ac_cv_header_$ac_safe=no"
9185 fi
9186 rm -f conftest*
9187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9188   echo "$ac_t""yes" 1>&6
9189   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9190 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9191 echo "configure:9192: checking for X11/Xaw3d/ThreeD.h" >&5
9192
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <X11/Xaw3d/ThreeD.h>
9197 EOF
9198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9199 { (eval echo configure:9200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9201 if test -z "$ac_err"; then
9202   rm -rf conftest*
9203   eval "ac_cv_header_$ac_safe=yes"
9204 else
9205   echo "$ac_err" >&5
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   eval "ac_cv_header_$ac_safe=no"
9210 fi
9211 rm -f conftest*
9212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214   
9215             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9216             athena_h_path=X11/Xaw3d
9217           
9218 else
9219   echo "$ac_t""no" 1>&6
9220 fi
9221
9222 else
9223   echo "$ac_t""no" 1>&6
9224 fi
9225
9226     fi
9227
9228         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9229       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9230 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9231 echo "configure:9232: checking for Xaw3d/XawInit.h" >&5
9232
9233 cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236 #include <Xaw3d/XawInit.h>
9237 EOF
9238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9239 { (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9241 if test -z "$ac_err"; then
9242   rm -rf conftest*
9243   eval "ac_cv_header_$ac_safe=yes"
9244 else
9245   echo "$ac_err" >&5
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_header_$ac_safe=no"
9250 fi
9251 rm -f conftest*
9252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9253   echo "$ac_t""yes" 1>&6
9254   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9255 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9256 echo "configure:9257: checking for Xaw3d/ThreeD.h" >&5
9257
9258 cat > conftest.$ac_ext <<EOF
9259 #line 9260 "configure"
9260 #include "confdefs.h"
9261 #include <Xaw3d/ThreeD.h>
9262 EOF
9263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9264 { (eval echo configure:9265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9266 if test -z "$ac_err"; then
9267   rm -rf conftest*
9268   eval "ac_cv_header_$ac_safe=yes"
9269 else
9270   echo "$ac_err" >&5
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_header_$ac_safe=no"
9275 fi
9276 rm -f conftest*
9277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9278   echo "$ac_t""yes" 1>&6
9279   
9280             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9281             athena_h_path=Xaw3d
9282           
9283 else
9284   echo "$ac_t""no" 1>&6
9285 fi
9286
9287 else
9288   echo "$ac_t""no" 1>&6
9289 fi
9290
9291     fi
9292
9293             if test -z "$athena_h_path"; then
9294       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9295 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9296 echo "configure:9297: checking for X11/Xaw/ThreeD.h" >&5
9297
9298 cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301 #include <X11/Xaw/ThreeD.h>
9302 EOF
9303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9304 { (eval echo configure:9305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9306 if test -z "$ac_err"; then
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=yes"
9309 else
9310   echo "$ac_err" >&5
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -rf conftest*
9314   eval "ac_cv_header_$ac_safe=no"
9315 fi
9316 rm -f conftest*
9317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9318   echo "$ac_t""yes" 1>&6
9319   
9320           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9321           athena_h_path=X11/Xaw
9322         
9323 else
9324   echo "$ac_t""no" 1>&6
9325 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9326 fi
9327
9328     fi
9329   fi
9330
9331     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9332     have_xaw=yes
9333   else
9334     have_xaw=no
9335   fi
9336
9337 else
9338   have_xaw=no
9339 fi 
9340 if test "$with_x11" = "yes"; then
9341     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9342 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9343 echo "configure:9344: checking for Xm/Xm.h" >&5
9344
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 #include <Xm/Xm.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   
9367 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9368 echo "configure:9369: checking for XmStringFree in -lXm" >&5
9369 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9370
9371 xe_check_libs=" -lXm "
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* Override any gcc2 internal prototype to avoid an error.  */
9376 /* We use char because int might match the return type of a gcc2
9377     builtin and then its argument prototype would still apply.  */
9378 char XmStringFree();
9379
9380 int main() {
9381 XmStringFree()
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_lib_$ac_lib_var=no"
9392 fi
9393 rm -f conftest*
9394 xe_check_libs=""
9395
9396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9397   echo "$ac_t""yes" 1>&6
9398   have_motif=yes
9399 else
9400   echo "$ac_t""no" 1>&6
9401 have_motif=no
9402 fi
9403
9404
9405 else
9406   echo "$ac_t""no" 1>&6
9407 have_motif=no
9408 fi
9409
9410
9411   if test "$have_motif" = "yes"; then
9412         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9413 echo "configure:9414: checking for Lesstif" >&5
9414     cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417 #include <Xm/Xm.h>
9418 #ifdef LESSTIF_VERSION
9419 yes
9420 #endif
9421
9422 EOF
9423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9424   egrep "yes" >/dev/null 2>&1; then
9425   rm -rf conftest*
9426   have_lesstif=yes
9427 else
9428   rm -rf conftest*
9429   have_lesstif=no
9430 fi
9431 rm -f conftest*
9432
9433   echo "$ac_t""$have_lesstif" 1>&6
9434   fi
9435
9436 fi 
9437
9438 case "$with_menubars" in "" | "yes" | "athena" )
9439   with_menubars="lucid" ;;
9440 esac
9441 case "$with_dialogs" in "" | "yes" | "lucid" )
9442   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9443   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9444   else with_dialogs=no
9445   fi ;;
9446 esac
9447 case "$with_scrollbars" in "" | "yes" )
9448   with_scrollbars="lucid" ;;
9449 esac
9450 case "$with_widgets" in "" | "yes" | "lucid")
9451   if   test "$have_motif" = "yes"; then with_widgets="motif"
9452   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9453   else with_widgets=no
9454   fi ;;
9455 esac
9456
9457 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9458
9459 case "$all_widgets" in
9460   *athena* )
9461     if test "$have_xaw" != "yes"; then
9462       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9463     fi
9464
9465         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9466
9467         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9468
9469                     { test "$extra_verbose" = "yes" && cat << EOF
9470     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9471 EOF
9472 cat >> confdefs.h <<EOF
9473 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9474 EOF
9475 }
9476
9477     { test "$extra_verbose" = "yes" && cat << EOF
9478     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9479 EOF
9480 cat >> confdefs.h <<EOF
9481 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9482 EOF
9483 }
9484
9485     { test "$extra_verbose" = "yes" && cat << EOF
9486     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9487 EOF
9488 cat >> confdefs.h <<EOF
9489 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9490 EOF
9491 }
9492
9493     { test "$extra_verbose" = "yes" && cat << EOF
9494     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9495 EOF
9496 cat >> confdefs.h <<EOF
9497 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9498 EOF
9499 }
9500
9501     { test "$extra_verbose" = "yes" && cat << EOF
9502     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9503 EOF
9504 cat >> confdefs.h <<EOF
9505 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9506 EOF
9507 }
9508
9509     { test "$extra_verbose" = "yes" && cat << EOF
9510     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9511 EOF
9512 cat >> confdefs.h <<EOF
9513 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9514 EOF
9515 }
9516
9517     { test "$extra_verbose" = "yes" && cat << EOF
9518     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9519 EOF
9520 cat >> confdefs.h <<EOF
9521 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9522 EOF
9523 }
9524
9525     { test "$extra_verbose" = "yes" && cat << EOF
9526     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9527 EOF
9528 cat >> confdefs.h <<EOF
9529 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9530 EOF
9531 }
9532
9533     { test "$extra_verbose" = "yes" && cat << EOF
9534     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9535 EOF
9536 cat >> confdefs.h <<EOF
9537 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9538 EOF
9539 }
9540
9541     { test "$extra_verbose" = "yes" && cat << EOF
9542     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9543 EOF
9544 cat >> confdefs.h <<EOF
9545 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9546 EOF
9547 }
9548
9549
9550     { test "$extra_verbose" = "yes" && cat << \EOF
9551     Defining LWLIB_USES_ATHENA
9552 EOF
9553 cat >> confdefs.h <<\EOF
9554 #define LWLIB_USES_ATHENA 1
9555 EOF
9556 }
9557
9558     { test "$extra_verbose" = "yes" && cat << \EOF
9559     Defining NEED_ATHENA
9560 EOF
9561 cat >> confdefs.h <<\EOF
9562 #define NEED_ATHENA 1
9563 EOF
9564 }
9565
9566     need_athena="yes"
9567
9568     if test "$athena_3d" = "yes"; then
9569       { test "$extra_verbose" = "yes" && cat << \EOF
9570     Defining HAVE_ATHENA_3D
9571 EOF
9572 cat >> confdefs.h <<\EOF
9573 #define HAVE_ATHENA_3D 1
9574 EOF
9575 }
9576
9577     fi
9578   ;;
9579 esac
9580
9581 case "$all_widgets" in *motif* )
9582   { test "$extra_verbose" = "yes" && cat << \EOF
9583     Defining LWLIB_USES_MOTIF
9584 EOF
9585 cat >> confdefs.h <<\EOF
9586 #define LWLIB_USES_MOTIF 1
9587 EOF
9588 }
9589
9590   { test "$extra_verbose" = "yes" && cat << \EOF
9591     Defining NEED_MOTIF
9592 EOF
9593 cat >> confdefs.h <<\EOF
9594 #define NEED_MOTIF 1
9595 EOF
9596 }
9597
9598   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9599   need_motif=yes ;;
9600 esac
9601
9602 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9603 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9604 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9605 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9606         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9607 case "$with_widgets" in athena* )
9608         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;;
9609 esac
9610 case "$all_widgets" in *lucid* )
9611   { test "$extra_verbose" = "yes" && cat << \EOF
9612     Defining NEED_LUCID
9613 EOF
9614 cat >> confdefs.h <<\EOF
9615 #define NEED_LUCID 1
9616 EOF
9617 }
9618
9619   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9620 esac
9621
9622
9623
9624 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9625     Defining LWLIB_SCROLLBARS_ATHENA
9626 EOF
9627 cat >> confdefs.h <<\EOF
9628 #define LWLIB_SCROLLBARS_ATHENA 1
9629 EOF
9630 }
9631
9632 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9633     Defining LWLIB_DIALOGS_ATHENA
9634 EOF
9635 cat >> confdefs.h <<\EOF
9636 #define LWLIB_DIALOGS_ATHENA 1
9637 EOF
9638 }
9639
9640
9641 if test "$athena_3d" = "yes"; then
9642   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9643     Defining LWLIB_SCROLLBARS_ATHENA3D
9644 EOF
9645 cat >> confdefs.h <<\EOF
9646 #define LWLIB_SCROLLBARS_ATHENA3D 1
9647 EOF
9648 }
9649
9650   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9651     Defining LWLIB_DIALOGS_ATHENA3D
9652 EOF
9653 cat >> confdefs.h <<\EOF
9654 #define LWLIB_DIALOGS_ATHENA3D 1
9655 EOF
9656 }
9657
9658 fi
9659
9660 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9661     Defining LWLIB_WIDGETS_ATHENA
9662 EOF
9663 cat >> confdefs.h <<\EOF
9664 #define LWLIB_WIDGETS_ATHENA 1
9665 EOF
9666 }
9667 ;; esac
9668 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9669         { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining LWLIB_TABS_LUCID
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define LWLIB_TABS_LUCID 1
9674 EOF
9675 }
9676
9677
9678 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9679     Defining HAVE_MENUBARS
9680 EOF
9681 cat >> confdefs.h <<\EOF
9682 #define HAVE_MENUBARS 1
9683 EOF
9684 }
9685
9686 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9687     Defining HAVE_SCROLLBARS
9688 EOF
9689 cat >> confdefs.h <<\EOF
9690 #define HAVE_SCROLLBARS 1
9691 EOF
9692 }
9693
9694 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9695     Defining HAVE_DIALOGS
9696 EOF
9697 cat >> confdefs.h <<\EOF
9698 #define HAVE_DIALOGS 1
9699 EOF
9700 }
9701
9702 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9703     Defining HAVE_TOOLBARS
9704 EOF
9705 cat >> confdefs.h <<\EOF
9706 #define HAVE_TOOLBARS 1
9707 EOF
9708 }
9709
9710 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9711     Defining HAVE_WIDGETS
9712 EOF
9713 cat >> confdefs.h <<\EOF
9714 #define HAVE_WIDGETS 1
9715 EOF
9716 }
9717
9718
9719 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9720     Defining LWLIB_MENUBARS_LUCID
9721 EOF
9722 cat >> confdefs.h <<\EOF
9723 #define LWLIB_MENUBARS_LUCID 1
9724 EOF
9725 }
9726
9727 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9728     Defining LWLIB_SCROLLBARS_LUCID
9729 EOF
9730 cat >> confdefs.h <<\EOF
9731 #define LWLIB_SCROLLBARS_LUCID 1
9732 EOF
9733 }
9734
9735
9736 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9737     Defining LWLIB_MENUBARS_MOTIF
9738 EOF
9739 cat >> confdefs.h <<\EOF
9740 #define LWLIB_MENUBARS_MOTIF 1
9741 EOF
9742 }
9743
9744 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9745     Defining LWLIB_SCROLLBARS_MOTIF
9746 EOF
9747 cat >> confdefs.h <<\EOF
9748 #define LWLIB_SCROLLBARS_MOTIF 1
9749 EOF
9750 }
9751
9752 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9753     Defining LWLIB_DIALOGS_MOTIF
9754 EOF
9755 cat >> confdefs.h <<\EOF
9756 #define LWLIB_DIALOGS_MOTIF 1
9757 EOF
9758 }
9759
9760 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9761     Defining LWLIB_WIDGETS_MOTIF
9762 EOF
9763 cat >> confdefs.h <<\EOF
9764 #define LWLIB_WIDGETS_MOTIF 1
9765 EOF
9766 }
9767
9768
9769 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9770    echo "    xemacs will be linked with \"menubar.o\""
9771  fi
9772 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9773    echo "    xemacs will be linked with \"scrollbar.o\""
9774  fi
9775 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9776    echo "    xemacs will be linked with \"dialog.o\""
9777  fi
9778 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9779    echo "    xemacs will be linked with \"toolbar.o\""
9780  fi
9781
9782 if test "$with_gtk" = "yes"; then
9783   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9784    echo "    xemacs will be linked with \"menubar-gtk.o\""
9785  fi
9786   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9787    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9788  fi
9789   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9790    echo "    xemacs will be linked with \"dialog-gtk.o\""
9791  fi
9792   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9793    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9794  fi
9795   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9796    echo "    xemacs will be linked with \"gui-gtk.o\""
9797  fi
9798 fi
9799
9800 if test "$with_x11" = "yes"; then
9801   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9802    echo "    xemacs will be linked with \"menubar-x.o\""
9803  fi
9804   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"scrollbar-x.o\""
9806  fi
9807   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"dialog-x.o\""
9809  fi
9810   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9811    echo "    xemacs will be linked with \"toolbar-x.o\""
9812  fi
9813   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9814    echo "    xemacs will be linked with \"gui-x.o\""
9815  fi
9816 fi
9817
9818
9819 test -z "$with_mule" && with_mule=no
9820 test -z "$with_file_coding" && with_file_coding=no
9821
9822
9823 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9824   { test "$extra_verbose" = "yes" && cat << \EOF
9825     Defining FILE_CODING
9826 EOF
9827 cat >> confdefs.h <<\EOF
9828 #define FILE_CODING 1
9829 EOF
9830 }
9831
9832   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9833    echo "    xemacs will be linked with \"file-coding.o\""
9834  fi
9835 fi
9836
9837 if test "$with_mule" = "yes" ; then
9838   echo "checking for Mule-related features" 1>&6
9839 echo "configure:9840: checking for Mule-related features" >&5
9840   { test "$extra_verbose" = "yes" && cat << \EOF
9841     Defining MULE
9842 EOF
9843 cat >> confdefs.h <<\EOF
9844 #define MULE 1
9845 EOF
9846 }
9847
9848   { test "$extra_verbose" = "yes" && cat << \EOF
9849     Defining FILE_CODING
9850 EOF
9851 cat >> confdefs.h <<\EOF
9852 #define FILE_CODING 1
9853 EOF
9854 }
9855
9856   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9857    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9858  fi
9859
9860     for ac_hdr in libintl.h
9861 do
9862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9864 echo "configure:9865: checking for $ac_hdr" >&5
9865
9866 cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 #include <$ac_hdr>
9870 EOF
9871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9872 { (eval echo configure:9873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9874 if test -z "$ac_err"; then
9875   rm -rf conftest*
9876   eval "ac_cv_header_$ac_safe=yes"
9877 else
9878   echo "$ac_err" >&5
9879   echo "configure: failed program was:" >&5
9880   cat conftest.$ac_ext >&5
9881   rm -rf conftest*
9882   eval "ac_cv_header_$ac_safe=no"
9883 fi
9884 rm -f conftest*
9885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9886   echo "$ac_t""yes" 1>&6
9887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9888   { test "$extra_verbose" = "yes" && cat << EOF
9889     Defining $ac_tr_hdr
9890 EOF
9891 cat >> confdefs.h <<EOF
9892 #define $ac_tr_hdr 1
9893 EOF
9894 }
9895  
9896 else
9897   echo "$ac_t""no" 1>&6
9898 fi
9899 done
9900
9901   
9902 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9903 echo "configure:9904: checking for strerror in -lintl" >&5
9904 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9905
9906 xe_check_libs=" -lintl "
9907 cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char strerror();
9914
9915 int main() {
9916 strerror()
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9920   rm -rf conftest*
9921   eval "ac_cv_lib_$ac_lib_var=yes"
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   eval "ac_cv_lib_$ac_lib_var=no"
9927 fi
9928 rm -f conftest*
9929 xe_check_libs=""
9930
9931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9932   echo "$ac_t""yes" 1>&6
9933     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9934     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9935   { test "$extra_verbose" = "yes" && cat << EOF
9936     Defining $ac_tr_lib
9937 EOF
9938 cat >> confdefs.h <<EOF
9939 #define $ac_tr_lib 1
9940 EOF
9941 }
9942
9943   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9944
9945 else
9946   echo "$ac_t""no" 1>&6
9947 fi
9948
9949
9950
9951   echo "checking for Mule input methods" 1>&6
9952 echo "configure:9953: checking for Mule input methods" >&5
9953         case "$with_xim" in "" | "yes" )
9954     echo "checking for XIM" 1>&6
9955 echo "configure:9956: checking for XIM" >&5
9956     
9957 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9958 echo "configure:9959: checking for XOpenIM in -lX11" >&5
9959 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9960
9961 xe_check_libs=" -lX11 "
9962 cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 /* Override any gcc2 internal prototype to avoid an error.  */
9966 /* We use char because int might match the return type of a gcc2
9967     builtin and then its argument prototype would still apply.  */
9968 char XOpenIM();
9969
9970 int main() {
9971 XOpenIM()
9972 ; return 0; }
9973 EOF
9974 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9975   rm -rf conftest*
9976   eval "ac_cv_lib_$ac_lib_var=yes"
9977 else
9978   echo "configure: failed program was:" >&5
9979   cat conftest.$ac_ext >&5
9980   rm -rf conftest*
9981   eval "ac_cv_lib_$ac_lib_var=no"
9982 fi
9983 rm -f conftest*
9984 xe_check_libs=""
9985
9986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9987   echo "$ac_t""yes" 1>&6
9988   with_xim=xlib
9989 else
9990   echo "$ac_t""no" 1>&6
9991 with_xim=no
9992 fi
9993
9994
9995         if test "$have_motif $have_lesstif" = "yes no"; then
9996       
9997 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9998 echo "configure:9999: checking for XmImMbLookupString in -lXm" >&5
9999 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10000
10001 xe_check_libs=" -lXm "
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 /* We use char because int might match the return type of a gcc2
10007     builtin and then its argument prototype would still apply.  */
10008 char XmImMbLookupString();
10009
10010 int main() {
10011 XmImMbLookupString()
10012 ; return 0; }
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10015   rm -rf conftest*
10016   eval "ac_cv_lib_$ac_lib_var=yes"
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   eval "ac_cv_lib_$ac_lib_var=no"
10022 fi
10023 rm -f conftest*
10024 xe_check_libs=""
10025
10026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10027   echo "$ac_t""yes" 1>&6
10028   with_xim=motif
10029 else
10030   echo "$ac_t""no" 1>&6
10031 fi
10032
10033
10034     fi ;;
10035   esac
10036   if test "$with_xim" != "no"; then
10037     { test "$extra_verbose" = "yes" && cat << \EOF
10038     Defining HAVE_XIM
10039 EOF
10040 cat >> confdefs.h <<\EOF
10041 #define HAVE_XIM 1
10042 EOF
10043 }
10044
10045     if test "$with_xim" = "xlib"; then
10046       { test "$extra_verbose" = "yes" && cat << \EOF
10047     Defining XIM_XLIB
10048 EOF
10049 cat >> confdefs.h <<\EOF
10050 #define XIM_XLIB 1
10051 EOF
10052 }
10053
10054       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10055    echo "    xemacs will be linked with \"input-method-xlib.o\""
10056  fi
10057     fi
10058     if test "$with_xim" = "motif"; then
10059       { test "$extra_verbose" = "yes" && cat << \EOF
10060     Defining XIM_MOTIF
10061 EOF
10062 cat >> confdefs.h <<\EOF
10063 #define XIM_MOTIF 1
10064 EOF
10065 }
10066
10067       need_motif=yes
10068       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10069    echo "    xemacs will be linked with \"input-method-motif.o\""
10070  fi
10071     fi
10072     if test "$with_xim" = "motif"; then
10073       with_xfs=no
10074     fi
10075   fi
10076
10077     if test "$with_xfs" = "yes" ; then
10078     echo "checking for XFontSet" 1>&6
10079 echo "configure:10080: checking for XFontSet" >&5
10080     
10081 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10082 echo "configure:10083: checking for XmbDrawString in -lX11" >&5
10083 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10084
10085 xe_check_libs=" -lX11 "
10086 cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 /* Override any gcc2 internal prototype to avoid an error.  */
10090 /* We use char because int might match the return type of a gcc2
10091     builtin and then its argument prototype would still apply.  */
10092 char XmbDrawString();
10093
10094 int main() {
10095 XmbDrawString()
10096 ; return 0; }
10097 EOF
10098 if { (eval echo configure:10099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10099   rm -rf conftest*
10100   eval "ac_cv_lib_$ac_lib_var=yes"
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -rf conftest*
10105   eval "ac_cv_lib_$ac_lib_var=no"
10106 fi
10107 rm -f conftest*
10108 xe_check_libs=""
10109
10110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10111   echo "$ac_t""yes" 1>&6
10112   :
10113 else
10114   echo "$ac_t""no" 1>&6
10115 with_xfs=no
10116 fi
10117
10118
10119     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10120       { test "$extra_verbose" = "yes" && cat << \EOF
10121     Defining USE_XFONTSET
10122 EOF
10123 cat >> confdefs.h <<\EOF
10124 #define USE_XFONTSET 1
10125 EOF
10126 }
10127
10128       if test "$with_xim" = "no" ; then
10129         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10130    echo "    xemacs will be linked with \"input-method-xlib.o\""
10131  fi
10132       fi
10133     fi
10134   fi 
10135     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10136   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10137 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10138 echo "configure:10139: checking for wnn/jllib.h" >&5
10139
10140 cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143 #include <wnn/jllib.h>
10144 EOF
10145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10146 { (eval echo configure:10147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10148 if test -z "$ac_err"; then
10149   rm -rf conftest*
10150   eval "ac_cv_header_$ac_safe=yes"
10151 else
10152   echo "$ac_err" >&5
10153   echo "configure: failed program was:" >&5
10154   cat conftest.$ac_ext >&5
10155   rm -rf conftest*
10156   eval "ac_cv_header_$ac_safe=no"
10157 fi
10158 rm -f conftest*
10159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10160   echo "$ac_t""yes" 1>&6
10161   :
10162 else
10163   echo "$ac_t""no" 1>&6
10164 with_wnn=no
10165 fi
10166  }
10167     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10168 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10169 echo "configure:10170: checking for wnn/commonhd.h" >&5
10170
10171 cat > conftest.$ac_ext <<EOF
10172 #line 10173 "configure"
10173 #include "confdefs.h"
10174 #include <wnn/commonhd.h>
10175 EOF
10176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10177 { (eval echo configure:10178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10179 if test -z "$ac_err"; then
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=yes"
10182 else
10183   echo "$ac_err" >&5
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_header_$ac_safe=no"
10188 fi
10189 rm -f conftest*
10190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192   :
10193 else
10194   echo "$ac_t""no" 1>&6
10195 with_wnn=no
10196 fi
10197  }
10198     if test "$with_wnn" != "no"; then
10199     for ac_func in crypt
10200 do
10201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10202 echo "configure:10203: checking for $ac_func" >&5
10203
10204 cat > conftest.$ac_ext <<EOF
10205 #line 10206 "configure"
10206 #include "confdefs.h"
10207 /* System header to define __stub macros and hopefully few prototypes,
10208     which can conflict with char $ac_func(); below.  */
10209 #include <assert.h>
10210 /* Override any gcc2 internal prototype to avoid an error.  */
10211 /* We use char because int might match the return type of a gcc2
10212     builtin and then its argument prototype would still apply.  */
10213 char $ac_func();
10214
10215 int main() {
10216
10217 /* The GNU C library defines this for functions which it implements
10218     to always fail with ENOSYS.  Some functions are actually named
10219     something starting with __ and the normal name is an alias.  */
10220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10221 choke me
10222 #else
10223 $ac_func();
10224 #endif
10225
10226 ; return 0; }
10227 EOF
10228 if { (eval echo configure:10229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10229   rm -rf conftest*
10230   eval "ac_cv_func_$ac_func=yes"
10231 else
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -rf conftest*
10235   eval "ac_cv_func_$ac_func=no"
10236 fi
10237 rm -f conftest*
10238
10239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10240   echo "$ac_t""yes" 1>&6
10241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10242   { test "$extra_verbose" = "yes" && cat << EOF
10243     Defining $ac_tr_func
10244 EOF
10245 cat >> confdefs.h <<EOF
10246 #define $ac_tr_func 1
10247 EOF
10248 }
10249  
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253 done
10254
10255     test "$ac_cv_func_crypt" != "yes" && { 
10256 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10257 echo "configure:10258: checking for crypt in -lcrypt" >&5
10258 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10259
10260 xe_check_libs=" -lcrypt "
10261 cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264 /* Override any gcc2 internal prototype to avoid an error.  */
10265 /* We use char because int might match the return type of a gcc2
10266     builtin and then its argument prototype would still apply.  */
10267 char crypt();
10268
10269 int main() {
10270 crypt()
10271 ; return 0; }
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=yes"
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -rf conftest*
10280   eval "ac_cv_lib_$ac_lib_var=no"
10281 fi
10282 rm -f conftest*
10283 xe_check_libs=""
10284
10285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10286   echo "$ac_t""yes" 1>&6
10287     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10288     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10289   { test "$extra_verbose" = "yes" && cat << EOF
10290     Defining $ac_tr_lib
10291 EOF
10292 cat >> confdefs.h <<EOF
10293 #define $ac_tr_lib 1
10294 EOF
10295 }
10296
10297   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10298
10299 else
10300   echo "$ac_t""no" 1>&6
10301 fi
10302
10303  }
10304   fi
10305     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10306     
10307 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10308 echo "configure:10309: checking for jl_dic_list_e in -lwnn" >&5
10309 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10310
10311 xe_check_libs=" -lwnn "
10312 cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 /* We use char because int might match the return type of a gcc2
10317     builtin and then its argument prototype would still apply.  */
10318 char jl_dic_list_e();
10319
10320 int main() {
10321 jl_dic_list_e()
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   eval "ac_cv_lib_$ac_lib_var=yes"
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_lib_$ac_lib_var=no"
10332 fi
10333 rm -f conftest*
10334 xe_check_libs=""
10335
10336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10337   echo "$ac_t""yes" 1>&6
10338   libwnn=wnn
10339 else
10340   echo "$ac_t""no" 1>&6
10341 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10342 echo "configure:10343: checking for jl_dic_list_e in -lwnn4" >&5
10343 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10344
10345 xe_check_libs=" -lwnn4 "
10346 cat > conftest.$ac_ext <<EOF
10347 #line 10348 "configure"
10348 #include "confdefs.h"
10349 /* Override any gcc2 internal prototype to avoid an error.  */
10350 /* We use char because int might match the return type of a gcc2
10351     builtin and then its argument prototype would still apply.  */
10352 char jl_dic_list_e();
10353
10354 int main() {
10355 jl_dic_list_e()
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10359   rm -rf conftest*
10360   eval "ac_cv_lib_$ac_lib_var=yes"
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_lib_$ac_lib_var=no"
10366 fi
10367 rm -f conftest*
10368 xe_check_libs=""
10369
10370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10371   echo "$ac_t""yes" 1>&6
10372   libwnn=wnn4
10373 else
10374   echo "$ac_t""no" 1>&6
10375 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10376 echo "configure:10377: checking for jl_dic_list_e in -lwnn6" >&5
10377 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10378
10379 xe_check_libs=" -lwnn6 "
10380 cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 /* Override any gcc2 internal prototype to avoid an error.  */
10384 /* We use char because int might match the return type of a gcc2
10385     builtin and then its argument prototype would still apply.  */
10386 char jl_dic_list_e();
10387
10388 int main() {
10389 jl_dic_list_e()
10390 ; return 0; }
10391 EOF
10392 if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=yes"
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   eval "ac_cv_lib_$ac_lib_var=no"
10400 fi
10401 rm -f conftest*
10402 xe_check_libs=""
10403
10404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10405   echo "$ac_t""yes" 1>&6
10406   libwnn=wnn6
10407 else
10408   echo "$ac_t""no" 1>&6
10409 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10410 echo "configure:10411: checking for dic_list_e in -lwnn6_fromsrc" >&5
10411 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10412
10413 xe_check_libs=" -lwnn6_fromsrc "
10414 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417 /* Override any gcc2 internal prototype to avoid an error.  */
10418 /* We use char because int might match the return type of a gcc2
10419     builtin and then its argument prototype would still apply.  */
10420 char dic_list_e();
10421
10422 int main() {
10423 dic_list_e()
10424 ; return 0; }
10425 EOF
10426 if { (eval echo configure:10427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=yes"
10429 else
10430   echo "configure: failed program was:" >&5
10431   cat conftest.$ac_ext >&5
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=no"
10434 fi
10435 rm -f conftest*
10436 xe_check_libs=""
10437
10438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10439   echo "$ac_t""yes" 1>&6
10440   libwnn=wnn6_fromsrc
10441 else
10442   echo "$ac_t""no" 1>&6
10443 with_wnn=no
10444 fi
10445
10446
10447 fi
10448
10449
10450 fi
10451
10452
10453 fi
10454
10455
10456   fi
10457   test -z "$with_wnn" && with_wnn=yes
10458   if test "$with_wnn" = "yes"; then
10459     { test "$extra_verbose" = "yes" && cat << \EOF
10460     Defining HAVE_WNN
10461 EOF
10462 cat >> confdefs.h <<\EOF
10463 #define HAVE_WNN 1
10464 EOF
10465 }
10466
10467     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10468     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10469    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10470  fi
10471     if test "$with_wnn6" != "no"; then
10472       
10473 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10474 echo "configure:10475: checking for jl_fi_dic_list in -l$libwnn" >&5
10475 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10476
10477 xe_check_libs=" -l$libwnn "
10478 cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481 /* Override any gcc2 internal prototype to avoid an error.  */
10482 /* We use char because int might match the return type of a gcc2
10483     builtin and then its argument prototype would still apply.  */
10484 char jl_fi_dic_list();
10485
10486 int main() {
10487 jl_fi_dic_list()
10488 ; return 0; }
10489 EOF
10490 if { (eval echo configure:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10491   rm -rf conftest*
10492   eval "ac_cv_lib_$ac_lib_var=yes"
10493 else
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -rf conftest*
10497   eval "ac_cv_lib_$ac_lib_var=no"
10498 fi
10499 rm -f conftest*
10500 xe_check_libs=""
10501
10502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10503   echo "$ac_t""yes" 1>&6
10504   with_wnn6=yes
10505 else
10506   echo "$ac_t""no" 1>&6
10507 fi
10508
10509
10510       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10511     Defining WNN6
10512 EOF
10513 cat >> confdefs.h <<\EOF
10514 #define WNN6 1
10515 EOF
10516 }
10517
10518     fi
10519   fi
10520
10521     canna_includes_found=no
10522   if test "$with_canna" != "no"; then
10523     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10524 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10525 echo "configure:10526: checking for canna/jrkanji.h" >&5
10526
10527 cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530 #include <canna/jrkanji.h>
10531 EOF
10532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10533 { (eval echo configure:10534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10535 if test -z "$ac_err"; then
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=yes"
10538 else
10539   echo "$ac_err" >&5
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -rf conftest*
10543   eval "ac_cv_header_$ac_safe=no"
10544 fi
10545 rm -f conftest*
10546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10547   echo "$ac_t""yes" 1>&6
10548   canna_includes_found=yes
10549 else
10550   echo "$ac_t""no" 1>&6
10551 fi
10552
10553   fi
10554   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10555       -d "/usr/local/canna/include"; then
10556     save_c_switch_site="$c_switch_site"
10557     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10558     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10559 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10560 echo "configure:10561: checking for canna/jrkanji.h" >&5
10561
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 #include <canna/jrkanji.h>
10566 EOF
10567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10568 { (eval echo configure:10569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10570 if test -z "$ac_err"; then
10571   rm -rf conftest*
10572   eval "ac_cv_header_$ac_safe=yes"
10573 else
10574   echo "$ac_err" >&5
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   eval "ac_cv_header_$ac_safe=no"
10579 fi
10580 rm -f conftest*
10581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10582   echo "$ac_t""yes" 1>&6
10583   canna_includes_found=yes
10584 else
10585   echo "$ac_t""no" 1>&6
10586 fi
10587
10588     if test "$canna_includes_found" != "yes"; then
10589       c_switch_site="$save_c_switch_site"
10590       with_canna="no"
10591     fi
10592   fi
10593
10594   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10595 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10596 echo "configure:10597: checking for canna/RK.h" >&5
10597
10598 cat > conftest.$ac_ext <<EOF
10599 #line 10600 "configure"
10600 #include "confdefs.h"
10601 #include <canna/RK.h>
10602 EOF
10603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10604 { (eval echo configure:10605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10606 if test -z "$ac_err"; then
10607   rm -rf conftest*
10608   eval "ac_cv_header_$ac_safe=yes"
10609 else
10610   echo "$ac_err" >&5
10611   echo "configure: failed program was:" >&5
10612   cat conftest.$ac_ext >&5
10613   rm -rf conftest*
10614   eval "ac_cv_header_$ac_safe=no"
10615 fi
10616 rm -f conftest*
10617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10618   echo "$ac_t""yes" 1>&6
10619   :
10620 else
10621   echo "$ac_t""no" 1>&6
10622 with_canna=no
10623 fi
10624  }
10625   test -z "$with_canna" && { 
10626 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10627 echo "configure:10628: checking for RkBgnBun in -lRKC" >&5
10628 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10629
10630 xe_check_libs=" -lRKC "
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634 /* Override any gcc2 internal prototype to avoid an error.  */
10635 /* We use char because int might match the return type of a gcc2
10636     builtin and then its argument prototype would still apply.  */
10637 char RkBgnBun();
10638
10639 int main() {
10640 RkBgnBun()
10641 ; return 0; }
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10644   rm -rf conftest*
10645   eval "ac_cv_lib_$ac_lib_var=yes"
10646 else
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -rf conftest*
10650   eval "ac_cv_lib_$ac_lib_var=no"
10651 fi
10652 rm -f conftest*
10653 xe_check_libs=""
10654
10655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10656   echo "$ac_t""yes" 1>&6
10657   :
10658 else
10659   echo "$ac_t""no" 1>&6
10660 with_canna=no
10661 fi
10662
10663  }
10664   test -z "$with_canna" && { 
10665 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10666 echo "configure:10667: checking for jrKanjiControl in -lcanna" >&5
10667 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10668
10669 xe_check_libs=" -lcanna "
10670 cat > conftest.$ac_ext <<EOF
10671 #line 10672 "configure"
10672 #include "confdefs.h"
10673 /* Override any gcc2 internal prototype to avoid an error.  */
10674 /* We use char because int might match the return type of a gcc2
10675     builtin and then its argument prototype would still apply.  */
10676 char jrKanjiControl();
10677
10678 int main() {
10679 jrKanjiControl()
10680 ; return 0; }
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=yes"
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -rf conftest*
10689   eval "ac_cv_lib_$ac_lib_var=no"
10690 fi
10691 rm -f conftest*
10692 xe_check_libs=""
10693
10694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10695   echo "$ac_t""yes" 1>&6
10696   :
10697 else
10698   echo "$ac_t""no" 1>&6
10699 with_canna=no
10700 fi
10701
10702  }
10703   test -z "$with_canna" && with_canna=yes
10704   if test "$with_canna" = "yes"; then
10705     { test "$extra_verbose" = "yes" && cat << \EOF
10706     Defining HAVE_CANNA
10707 EOF
10708 cat >> confdefs.h <<\EOF
10709 #define HAVE_CANNA 1
10710 EOF
10711 }
10712
10713     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10714     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10715    echo "    xemacs will be linked with \"mule-canna.o\""
10716  fi
10717   fi
10718
10719 else   for feature in xim canna wnn; do
10720     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10721       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10722     fi
10723     eval "with_${feature}=no"
10724   done
10725 fi 
10726
10727 if test "$need_motif" = "yes" ; then
10728   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10729     
10730 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10731 echo "configure:10732: checking for layout_object_getvalue in -li18n" >&5
10732 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10733
10734 xe_check_libs=" -li18n "
10735 cat > conftest.$ac_ext <<EOF
10736 #line 10737 "configure"
10737 #include "confdefs.h"
10738 /* Override any gcc2 internal prototype to avoid an error.  */
10739 /* We use char because int might match the return type of a gcc2
10740     builtin and then its argument prototype would still apply.  */
10741 char layout_object_getvalue();
10742
10743 int main() {
10744 layout_object_getvalue()
10745 ; return 0; }
10746 EOF
10747 if { (eval echo configure:10748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10748   rm -rf conftest*
10749   eval "ac_cv_lib_$ac_lib_var=yes"
10750 else
10751   echo "configure: failed program was:" >&5
10752   cat conftest.$ac_ext >&5
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=no"
10755 fi
10756 rm -f conftest*
10757 xe_check_libs=""
10758
10759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10760   echo "$ac_t""yes" 1>&6
10761   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10762 else
10763   echo "$ac_t""no" 1>&6
10764 fi
10765
10766
10767   
10768 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10769     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10770   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10771   
10772         runpath="" runpath_dirs=""
10773   if test -n "$LD_RUN_PATH"; then
10774     runpath="$LD_RUN_PATH"
10775   elif test "$GCC" = "yes"; then
10776         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10777     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10778     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10779     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10780       case "$arg" in P,* | -L* | -R* )
10781         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10782           {
10783 xe_runpath_dir="$dir"
10784   test "$xe_runpath_dir" != "/lib"     -a \
10785         "$xe_runpath_dir" != "/usr/lib" -a \
10786         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10787   eval "$xe_add_unique_runpath_dir"
10788 }
10789         done ;;
10790       esac
10791     done
10792     ld_switch_run="$ld_switch_run_save"
10793     rm -f conftest*
10794   else
10795         for arg in $ld_switch_site $ld_switch_x_site; do
10796       case "$arg" in -L*) {
10797 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10798   test "$xe_runpath_dir" != "/lib"     -a \
10799         "$xe_runpath_dir" != "/usr/lib" -a \
10800         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10801   eval "$xe_add_unique_runpath_dir"
10802 };; esac
10803     done
10804         if test "$opsys $need_motif" = "sol2 yes"; then
10805       xe_runpath_dir="/opt/SUNWdt/lib";
10806       eval "$xe_add_unique_runpath_dir";
10807     fi
10808   fi 
10809   if test -n "$runpath"; then
10810     ld_switch_run="${dash_r}${runpath}"
10811     
10812 if test "$GCC" = "yes"; then
10813   set x $ld_switch_run; shift; ld_switch_run=""
10814   while test -n "$1"; do
10815     case $1 in
10816       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10817       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10818       -Xlinker* ) ;;
10819       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10820     esac
10821     shift
10822   done
10823 fi
10824     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10825   fi
10826 fi
10827
10828 fi
10829
10830 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
10831 do
10832 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10833 echo "configure:10834: checking for $ac_func" >&5
10834
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 /* System header to define __stub macros and hopefully few prototypes,
10839     which can conflict with char $ac_func(); below.  */
10840 #include <assert.h>
10841 /* Override any gcc2 internal prototype to avoid an error.  */
10842 /* We use char because int might match the return type of a gcc2
10843     builtin and then its argument prototype would still apply.  */
10844 char $ac_func();
10845
10846 int main() {
10847
10848 /* The GNU C library defines this for functions which it implements
10849     to always fail with ENOSYS.  Some functions are actually named
10850     something starting with __ and the normal name is an alias.  */
10851 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10852 choke me
10853 #else
10854 $ac_func();
10855 #endif
10856
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_func_$ac_func=yes"
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   eval "ac_cv_func_$ac_func=no"
10867 fi
10868 rm -f conftest*
10869
10870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10871   echo "$ac_t""yes" 1>&6
10872     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10873   { test "$extra_verbose" = "yes" && cat << EOF
10874     Defining $ac_tr_func
10875 EOF
10876 cat >> confdefs.h <<EOF
10877 #define $ac_tr_func 1
10878 EOF
10879 }
10880  
10881 else
10882   echo "$ac_t""no" 1>&6
10883 fi
10884 done
10885
10886
10887
10888 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10889 do
10890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10891 echo "configure:10892: checking for $ac_func" >&5
10892
10893 cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 /* System header to define __stub macros and hopefully few prototypes,
10897     which can conflict with char $ac_func(); below.  */
10898 #include <assert.h>
10899 /* Override any gcc2 internal prototype to avoid an error.  */
10900 /* We use char because int might match the return type of a gcc2
10901     builtin and then its argument prototype would still apply.  */
10902 char $ac_func();
10903
10904 int main() {
10905
10906 /* The GNU C library defines this for functions which it implements
10907     to always fail with ENOSYS.  Some functions are actually named
10908     something starting with __ and the normal name is an alias.  */
10909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10910 choke me
10911 #else
10912 $ac_func();
10913 #endif
10914
10915 ; return 0; }
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10918   rm -rf conftest*
10919   eval "ac_cv_func_$ac_func=yes"
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -rf conftest*
10924   eval "ac_cv_func_$ac_func=no"
10925 fi
10926 rm -f conftest*
10927
10928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10929   echo "$ac_t""yes" 1>&6
10930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10931   { test "$extra_verbose" = "yes" && cat << EOF
10932     Defining $ac_tr_func
10933 EOF
10934 cat >> confdefs.h <<EOF
10935 #define $ac_tr_func 1
10936 EOF
10937 }
10938  
10939 else
10940   echo "$ac_t""no" 1>&6
10941 fi
10942 done
10943
10944
10945 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10946 echo "configure:10947: checking for openpty" >&5
10947
10948 cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 /* System header to define __stub macros and hopefully few prototypes,
10952     which can conflict with char openpty(); below.  */
10953 #include <assert.h>
10954 /* Override any gcc2 internal prototype to avoid an error.  */
10955 /* We use char because int might match the return type of a gcc2
10956     builtin and then its argument prototype would still apply.  */
10957 char openpty();
10958
10959 int main() {
10960
10961 /* The GNU C library defines this for functions which it implements
10962     to always fail with ENOSYS.  Some functions are actually named
10963     something starting with __ and the normal name is an alias.  */
10964 #if defined (__stub_openpty) || defined (__stub___openpty)
10965 choke me
10966 #else
10967 openpty();
10968 #endif
10969
10970 ; return 0; }
10971 EOF
10972 if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10973   rm -rf conftest*
10974   eval "ac_cv_func_openpty=yes"
10975 else
10976   echo "configure: failed program was:" >&5
10977   cat conftest.$ac_ext >&5
10978   rm -rf conftest*
10979   eval "ac_cv_func_openpty=no"
10980 fi
10981 rm -f conftest*
10982
10983 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10984   echo "$ac_t""yes" 1>&6
10985   have_openpty=yes
10986 else
10987   echo "$ac_t""no" 1>&6
10988
10989   
10990 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10991 echo "configure:10992: checking for openpty in -lutil" >&5
10992 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10993
10994 xe_check_libs=" -lutil "
10995 cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 /* Override any gcc2 internal prototype to avoid an error.  */
10999 /* We use char because int might match the return type of a gcc2
11000     builtin and then its argument prototype would still apply.  */
11001 char openpty();
11002
11003 int main() {
11004 openpty()
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=yes"
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=no"
11015 fi
11016 rm -f conftest*
11017 xe_check_libs=""
11018
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11020   echo "$ac_t""yes" 1>&6
11021   have_openpty=yes need_libutil=yes
11022 else
11023   echo "$ac_t""no" 1>&6
11024 fi
11025
11026
11027 fi
11028
11029 if test "$have_openpty" = "yes"; then
11030   { test "$extra_verbose" = "yes" && cat << \EOF
11031     Defining HAVE_OPENPTY
11032 EOF
11033 cat >> confdefs.h <<\EOF
11034 #define HAVE_OPENPTY 1
11035 EOF
11036 }
11037
11038   for ac_hdr in pty.h libutil.h util.h
11039 do
11040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11042 echo "configure:11043: checking for $ac_hdr" >&5
11043
11044 cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047 #include <$ac_hdr>
11048 EOF
11049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11050 { (eval echo configure:11051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11052 if test -z "$ac_err"; then
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=yes"
11055 else
11056   echo "$ac_err" >&5
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=no"
11061 fi
11062 rm -f conftest*
11063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11064   echo "$ac_t""yes" 1>&6
11065     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11066   { test "$extra_verbose" = "yes" && cat << EOF
11067     Defining $ac_tr_hdr
11068 EOF
11069 cat >> confdefs.h <<EOF
11070 #define $ac_tr_hdr 1
11071 EOF
11072 }
11073  break
11074 else
11075   echo "$ac_t""no" 1>&6
11076 fi
11077 done
11078
11079   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11080 fi
11081
11082 for ac_hdr in stropts.h
11083 do
11084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11086 echo "configure:11087: checking for $ac_hdr" >&5
11087
11088 cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 #include <$ac_hdr>
11092 EOF
11093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11094 { (eval echo configure:11095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11096 if test -z "$ac_err"; then
11097   rm -rf conftest*
11098   eval "ac_cv_header_$ac_safe=yes"
11099 else
11100   echo "$ac_err" >&5
11101   echo "configure: failed program was:" >&5
11102   cat conftest.$ac_ext >&5
11103   rm -rf conftest*
11104   eval "ac_cv_header_$ac_safe=no"
11105 fi
11106 rm -f conftest*
11107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11108   echo "$ac_t""yes" 1>&6
11109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11110   { test "$extra_verbose" = "yes" && cat << EOF
11111     Defining $ac_tr_hdr
11112 EOF
11113 cat >> confdefs.h <<EOF
11114 #define $ac_tr_hdr 1
11115 EOF
11116 }
11117  
11118 else
11119   echo "$ac_t""no" 1>&6
11120 fi
11121 done
11122
11123 if test "$ac_cv_header_stropts_h" = "yes"; then
11124   for ac_func in isastream
11125 do
11126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11127 echo "configure:11128: checking for $ac_func" >&5
11128
11129 cat > conftest.$ac_ext <<EOF
11130 #line 11131 "configure"
11131 #include "confdefs.h"
11132 /* System header to define __stub macros and hopefully few prototypes,
11133     which can conflict with char $ac_func(); below.  */
11134 #include <assert.h>
11135 /* Override any gcc2 internal prototype to avoid an error.  */
11136 /* We use char because int might match the return type of a gcc2
11137     builtin and then its argument prototype would still apply.  */
11138 char $ac_func();
11139
11140 int main() {
11141
11142 /* The GNU C library defines this for functions which it implements
11143     to always fail with ENOSYS.  Some functions are actually named
11144     something starting with __ and the normal name is an alias.  */
11145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11146 choke me
11147 #else
11148 $ac_func();
11149 #endif
11150
11151 ; return 0; }
11152 EOF
11153 if { (eval echo configure:11154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11154   rm -rf conftest*
11155   eval "ac_cv_func_$ac_func=yes"
11156 else
11157   echo "configure: failed program was:" >&5
11158   cat conftest.$ac_ext >&5
11159   rm -rf conftest*
11160   eval "ac_cv_func_$ac_func=no"
11161 fi
11162 rm -f conftest*
11163
11164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11165   echo "$ac_t""yes" 1>&6
11166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11167   { test "$extra_verbose" = "yes" && cat << EOF
11168     Defining $ac_tr_func
11169 EOF
11170 cat >> confdefs.h <<EOF
11171 #define $ac_tr_func 1
11172 EOF
11173 }
11174  
11175 else
11176   echo "$ac_t""no" 1>&6
11177 fi
11178 done
11179
11180   for ac_hdr in strtio.h
11181 do
11182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11184 echo "configure:11185: checking for $ac_hdr" >&5
11185
11186 cat > conftest.$ac_ext <<EOF
11187 #line 11188 "configure"
11188 #include "confdefs.h"
11189 #include <$ac_hdr>
11190 EOF
11191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11192 { (eval echo configure:11193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11194 if test -z "$ac_err"; then
11195   rm -rf conftest*
11196   eval "ac_cv_header_$ac_safe=yes"
11197 else
11198   echo "$ac_err" >&5
11199   echo "configure: failed program was:" >&5
11200   cat conftest.$ac_ext >&5
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=no"
11203 fi
11204 rm -f conftest*
11205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11206   echo "$ac_t""yes" 1>&6
11207     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11208   { test "$extra_verbose" = "yes" && cat << EOF
11209     Defining $ac_tr_hdr
11210 EOF
11211 cat >> confdefs.h <<EOF
11212 #define $ac_tr_hdr 1
11213 EOF
11214 }
11215  
11216 else
11217   echo "$ac_t""no" 1>&6
11218 fi
11219 done
11220  fi
11221
11222 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11223    echo "    xemacs will be linked with \"realpath.o\""
11224  fi
11225
11226 for ac_func in getloadavg
11227 do
11228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_func" >&5
11230
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 /* System header to define __stub macros and hopefully few prototypes,
11235     which can conflict with char $ac_func(); below.  */
11236 #include <assert.h>
11237 /* Override any gcc2 internal prototype to avoid an error.  */
11238 /* We use char because int might match the return type of a gcc2
11239     builtin and then its argument prototype would still apply.  */
11240 char $ac_func();
11241
11242 int main() {
11243
11244 /* The GNU C library defines this for functions which it implements
11245     to always fail with ENOSYS.  Some functions are actually named
11246     something starting with __ and the normal name is an alias.  */
11247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11248 choke me
11249 #else
11250 $ac_func();
11251 #endif
11252
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_func_$ac_func=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_func_$ac_func=no"
11263 fi
11264 rm -f conftest*
11265
11266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11267   echo "$ac_t""yes" 1>&6
11268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11269   { test "$extra_verbose" = "yes" && cat << EOF
11270     Defining $ac_tr_func
11271 EOF
11272 cat >> confdefs.h <<EOF
11273 #define $ac_tr_func 1
11274 EOF
11275 }
11276  
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280 done
11281
11282
11283 if test "$ac_cv_func_getloadavg" = "yes"; then
11284         for ac_hdr in sys/loadavg.h
11285 do
11286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11288 echo "configure:11289: checking for $ac_hdr" >&5
11289
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 #include <$ac_hdr>
11294 EOF
11295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11296 { (eval echo configure:11297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11298 if test -z "$ac_err"; then
11299   rm -rf conftest*
11300   eval "ac_cv_header_$ac_safe=yes"
11301 else
11302   echo "$ac_err" >&5
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   eval "ac_cv_header_$ac_safe=no"
11307 fi
11308 rm -f conftest*
11309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11310   echo "$ac_t""yes" 1>&6
11311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11312   { test "$extra_verbose" = "yes" && cat << EOF
11313     Defining $ac_tr_hdr
11314 EOF
11315 cat >> confdefs.h <<EOF
11316 #define $ac_tr_hdr 1
11317 EOF
11318 }
11319  
11320 else
11321   echo "$ac_t""no" 1>&6
11322 fi
11323 done
11324
11325 else
11326     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11327    echo "    xemacs will be linked with \"getloadavg.o\""
11328  fi
11329
11330     
11331 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11332 echo "configure:11333: checking for kstat_open in -lkstat" >&5
11333 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11334
11335 xe_check_libs=" -lkstat "
11336 cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 /* Override any gcc2 internal prototype to avoid an error.  */
11340 /* We use char because int might match the return type of a gcc2
11341     builtin and then its argument prototype would still apply.  */
11342 char kstat_open();
11343
11344 int main() {
11345 kstat_open()
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   eval "ac_cv_lib_$ac_lib_var=yes"
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=no"
11356 fi
11357 rm -f conftest*
11358 xe_check_libs=""
11359
11360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11361   echo "$ac_t""yes" 1>&6
11362     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11363     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11364   { test "$extra_verbose" = "yes" && cat << EOF
11365     Defining $ac_tr_lib
11366 EOF
11367 cat >> confdefs.h <<EOF
11368 #define $ac_tr_lib 1
11369 EOF
11370 }
11371
11372   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11373
11374 else
11375   echo "$ac_t""no" 1>&6
11376 fi
11377
11378
11379   for ac_hdr in kstat.h
11380 do
11381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11383 echo "configure:11384: checking for $ac_hdr" >&5
11384
11385 cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 #include <$ac_hdr>
11389 EOF
11390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11391 { (eval echo configure:11392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11393 if test -z "$ac_err"; then
11394   rm -rf conftest*
11395   eval "ac_cv_header_$ac_safe=yes"
11396 else
11397   echo "$ac_err" >&5
11398   echo "configure: failed program was:" >&5
11399   cat conftest.$ac_ext >&5
11400   rm -rf conftest*
11401   eval "ac_cv_header_$ac_safe=no"
11402 fi
11403 rm -f conftest*
11404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11405   echo "$ac_t""yes" 1>&6
11406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11407   { test "$extra_verbose" = "yes" && cat << EOF
11408     Defining $ac_tr_hdr
11409 EOF
11410 cat >> confdefs.h <<EOF
11411 #define $ac_tr_hdr 1
11412 EOF
11413 }
11414  
11415 else
11416   echo "$ac_t""no" 1>&6
11417 fi
11418 done
11419
11420
11421     
11422 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11423 echo "configure:11424: checking for kvm_read in -lkvm" >&5
11424 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11425
11426 xe_check_libs=" -lkvm "
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 /* We use char because int might match the return type of a gcc2
11432     builtin and then its argument prototype would still apply.  */
11433 char kvm_read();
11434
11435 int main() {
11436 kvm_read()
11437 ; return 0; }
11438 EOF
11439 if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11440   rm -rf conftest*
11441   eval "ac_cv_lib_$ac_lib_var=yes"
11442 else
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -rf conftest*
11446   eval "ac_cv_lib_$ac_lib_var=no"
11447 fi
11448 rm -f conftest*
11449 xe_check_libs=""
11450
11451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11452   echo "$ac_t""yes" 1>&6
11453     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11454     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11455   { test "$extra_verbose" = "yes" && cat << EOF
11456     Defining $ac_tr_lib
11457 EOF
11458 cat >> confdefs.h <<EOF
11459 #define $ac_tr_lib 1
11460 EOF
11461 }
11462
11463   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11464
11465 else
11466   echo "$ac_t""no" 1>&6
11467 fi
11468
11469
11470 fi
11471
11472 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11473 echo "configure:11474: checking whether netdb declares h_errno" >&5
11474 cat > conftest.$ac_ext <<EOF
11475 #line 11476 "configure"
11476 #include "confdefs.h"
11477 #include <netdb.h>
11478 int main() {
11479 return h_errno;
11480 ; return 0; }
11481 EOF
11482 if { (eval echo configure:11483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11483   rm -rf conftest*
11484   echo "$ac_t""yes" 1>&6
11485    { test "$extra_verbose" = "yes" && cat << \EOF
11486     Defining HAVE_H_ERRNO
11487 EOF
11488 cat >> confdefs.h <<\EOF
11489 #define HAVE_H_ERRNO 1
11490 EOF
11491 }
11492
11493 else
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -rf conftest*
11497   echo "$ac_t""no" 1>&6
11498 fi
11499 rm -f conftest*
11500
11501 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11502 echo "configure:11503: checking for sigsetjmp" >&5
11503 cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 #include <setjmp.h>
11507 int main() {
11508 sigjmp_buf bar; sigsetjmp (bar, 0);
11509 ; return 0; }
11510 EOF
11511 if { (eval echo configure:11512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11512   rm -rf conftest*
11513   echo "$ac_t""yes" 1>&6
11514    { test "$extra_verbose" = "yes" && cat << \EOF
11515     Defining HAVE_SIGSETJMP
11516 EOF
11517 cat >> confdefs.h <<\EOF
11518 #define HAVE_SIGSETJMP 1
11519 EOF
11520 }
11521
11522 else
11523   echo "configure: failed program was:" >&5
11524   cat conftest.$ac_ext >&5
11525   rm -rf conftest*
11526   echo "$ac_t""no" 1>&6
11527 fi
11528 rm -f conftest*
11529
11530 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11531 echo "configure:11532: checking whether localtime caches TZ" >&5
11532
11533 if test "$ac_cv_func_tzset" = "yes"; then
11534 cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537 #include <time.h>
11538 #if STDC_HEADERS
11539 # include <stdlib.h>
11540 #endif
11541 extern char **environ;
11542 unset_TZ ()
11543 {
11544   char **from, **to;
11545   for (to = from = environ; (*to = *from); from++)
11546     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11547       to++;
11548 }
11549 char TZ_GMT0[] = "TZ=GMT0";
11550 char TZ_PST8[] = "TZ=PST8";
11551 main()
11552 {
11553   time_t now = time ((time_t *) 0);
11554   int hour_GMT0, hour_unset;
11555   if (putenv (TZ_GMT0) != 0)
11556     exit (1);
11557   hour_GMT0 = localtime (&now)->tm_hour;
11558   unset_TZ ();
11559   hour_unset = localtime (&now)->tm_hour;
11560   if (putenv (TZ_PST8) != 0)
11561     exit (1);
11562   if (localtime (&now)->tm_hour == hour_GMT0)
11563     exit (1);
11564   unset_TZ ();
11565   if (localtime (&now)->tm_hour != hour_unset)
11566     exit (1);
11567   exit (0);
11568 }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11571 then
11572   emacs_cv_localtime_cache=no
11573 else
11574   conftest_rc="$?"
11575   echo "configure: failed program was:" >&5
11576   cat conftest.$ac_ext >&5
11577   rm -fr conftest*
11578   emacs_cv_localtime_cache=yes
11579 fi
11580 rm -fr conftest*
11581 else
11582         # If we lack tzset, report that localtime does not cache TZ,
11583         # since we can't invalidate the cache if we don't have tzset.
11584         emacs_cv_localtime_cache=no
11585 fi
11586 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11587 if test $emacs_cv_localtime_cache = yes; then
11588   { test "$extra_verbose" = "yes" && cat << \EOF
11589     Defining LOCALTIME_CACHE
11590 EOF
11591 cat >> confdefs.h <<\EOF
11592 #define LOCALTIME_CACHE 1
11593 EOF
11594 }
11595
11596 fi
11597
11598 if test "$HAVE_TIMEVAL" = "yes"; then
11599 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11600 echo "configure:11601: checking whether gettimeofday accepts one or two arguments" >&5
11601 cat > conftest.$ac_ext <<EOF
11602 #line 11603 "configure"
11603 #include "confdefs.h"
11604
11605 #ifdef TIME_WITH_SYS_TIME
11606 #include <sys/time.h>
11607 #include <time.h>
11608 #else
11609 #ifdef HAVE_SYS_TIME_H
11610 #include <sys/time.h>
11611 #else
11612 #include <time.h>
11613 #endif
11614 #endif
11615   
11616 int main() {
11617
11618   struct timeval time;
11619   gettimeofday (&time, 0);
11620
11621 ; return 0; }
11622 EOF
11623 if { (eval echo configure:11624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11624   rm -rf conftest*
11625   echo "$ac_t""two" 1>&6
11626 else
11627   echo "configure: failed program was:" >&5
11628   cat conftest.$ac_ext >&5
11629   rm -rf conftest*
11630   echo "$ac_t""one" 1>&6
11631    { test "$extra_verbose" = "yes" && cat << \EOF
11632     Defining GETTIMEOFDAY_ONE_ARGUMENT
11633 EOF
11634 cat >> confdefs.h <<\EOF
11635 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11636 EOF
11637 }
11638
11639 fi
11640 rm -f conftest*
11641 fi
11642
11643
11644 echo $ac_n "checking for inline""... $ac_c" 1>&6
11645 echo "configure:11646: checking for inline" >&5
11646
11647 ac_cv_c_inline=no
11648 for ac_kw in inline __inline__ __inline; do
11649   cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652
11653 int main() {
11654 } $ac_kw foo() {
11655 ; return 0; }
11656 EOF
11657 if { (eval echo configure:11658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11658   rm -rf conftest*
11659   ac_cv_c_inline=$ac_kw; break
11660 else
11661   echo "configure: failed program was:" >&5
11662   cat conftest.$ac_ext >&5
11663 fi
11664 rm -f conftest*
11665 done
11666
11667
11668 echo "$ac_t""$ac_cv_c_inline" 1>&6
11669 case "$ac_cv_c_inline" in
11670   inline | yes) ;;
11671   no) { test "$extra_verbose" = "yes" && cat << \EOF
11672     Defining inline = 
11673 EOF
11674 cat >> confdefs.h <<\EOF
11675 #define inline 
11676 EOF
11677 }
11678  ;;
11679   *)  { test "$extra_verbose" = "yes" && cat << EOF
11680     Defining inline = $ac_cv_c_inline
11681 EOF
11682 cat >> confdefs.h <<EOF
11683 #define inline $ac_cv_c_inline
11684 EOF
11685 }
11686  ;;
11687 esac
11688
11689 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11690    echo "    xemacs will be linked with \"inline.o\""
11691  fi
11692
11693
11694 if test "$__DECC" != "yes"; then
11695   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11696 # for constant arguments.  Useless!
11697 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11698 echo "configure:11699: checking for working alloca.h" >&5
11699
11700 cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 #include <alloca.h>
11704 int main() {
11705 char *p = alloca(2 * sizeof(int));
11706 ; return 0; }
11707 EOF
11708 if { (eval echo configure:11709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11709   rm -rf conftest*
11710   ac_cv_header_alloca_h=yes
11711 else
11712   echo "configure: failed program was:" >&5
11713   cat conftest.$ac_ext >&5
11714   rm -rf conftest*
11715   ac_cv_header_alloca_h=no
11716 fi
11717 rm -f conftest*
11718
11719 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11720 if test $ac_cv_header_alloca_h = yes; then
11721   { test "$extra_verbose" = "yes" && cat << \EOF
11722     Defining HAVE_ALLOCA_H
11723 EOF
11724 cat >> confdefs.h <<\EOF
11725 #define HAVE_ALLOCA_H 1
11726 EOF
11727 }
11728
11729 fi
11730
11731 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11732 echo "configure:11733: checking for alloca" >&5
11733
11734 cat > conftest.$ac_ext <<EOF
11735 #line 11736 "configure"
11736 #include "confdefs.h"
11737
11738 #ifdef __GNUC__
11739 # define alloca __builtin_alloca
11740 #else
11741 # ifdef _MSC_VER
11742 #  include <malloc.h>
11743 #  define alloca _alloca
11744 # else
11745 #  if HAVE_ALLOCA_H
11746 #   include <alloca.h>
11747 #  else
11748 #   ifdef _AIX
11749  #pragma alloca
11750 #   else
11751 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11752 char *alloca ();
11753 #    endif
11754 #   endif
11755 #  endif
11756 # endif
11757 #endif
11758
11759 int main() {
11760 char *p = (char *) alloca(1);
11761 ; return 0; }
11762 EOF
11763 if { (eval echo configure:11764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11764   rm -rf conftest*
11765   ac_cv_func_alloca_works=yes
11766 else
11767   echo "configure: failed program was:" >&5
11768   cat conftest.$ac_ext >&5
11769   rm -rf conftest*
11770   ac_cv_func_alloca_works=no
11771 fi
11772 rm -f conftest*
11773
11774 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11775 if test $ac_cv_func_alloca_works = yes; then
11776   { test "$extra_verbose" = "yes" && cat << \EOF
11777     Defining HAVE_ALLOCA
11778 EOF
11779 cat >> confdefs.h <<\EOF
11780 #define HAVE_ALLOCA 1
11781 EOF
11782 }
11783
11784 fi
11785
11786 if test $ac_cv_func_alloca_works = no; then
11787   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11788   # that cause trouble.  Some versions do not even contain alloca or
11789   # contain a buggy version.  If you still want to use their alloca,
11790   # use ar to extract alloca.o from them instead of compiling alloca.c.
11791   ALLOCA=alloca.${ac_objext}
11792   { test "$extra_verbose" = "yes" && cat << \EOF
11793     Defining C_ALLOCA
11794 EOF
11795 cat >> confdefs.h <<\EOF
11796 #define C_ALLOCA 1
11797 EOF
11798 }
11799
11800
11801 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11802 echo "configure:11803: checking whether alloca needs Cray hooks" >&5
11803
11804 cat > conftest.$ac_ext <<EOF
11805 #line 11806 "configure"
11806 #include "confdefs.h"
11807 #if defined(CRAY) && ! defined(CRAY2)
11808 webecray
11809 #else
11810 wenotbecray
11811 #endif
11812
11813 EOF
11814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11815   egrep "webecray" >/dev/null 2>&1; then
11816   rm -rf conftest*
11817   ac_cv_os_cray=yes
11818 else
11819   rm -rf conftest*
11820   ac_cv_os_cray=no
11821 fi
11822 rm -f conftest*
11823
11824
11825 echo "$ac_t""$ac_cv_os_cray" 1>&6
11826 if test $ac_cv_os_cray = yes; then
11827 for ac_func in _getb67 GETB67 getb67; do
11828   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11829 echo "configure:11830: checking for $ac_func" >&5
11830
11831 cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834 /* System header to define __stub macros and hopefully few prototypes,
11835     which can conflict with char $ac_func(); below.  */
11836 #include <assert.h>
11837 /* Override any gcc2 internal prototype to avoid an error.  */
11838 /* We use char because int might match the return type of a gcc2
11839     builtin and then its argument prototype would still apply.  */
11840 char $ac_func();
11841
11842 int main() {
11843
11844 /* The GNU C library defines this for functions which it implements
11845     to always fail with ENOSYS.  Some functions are actually named
11846     something starting with __ and the normal name is an alias.  */
11847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11848 choke me
11849 #else
11850 $ac_func();
11851 #endif
11852
11853 ; return 0; }
11854 EOF
11855 if { (eval echo configure:11856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11856   rm -rf conftest*
11857   eval "ac_cv_func_$ac_func=yes"
11858 else
11859   echo "configure: failed program was:" >&5
11860   cat conftest.$ac_ext >&5
11861   rm -rf conftest*
11862   eval "ac_cv_func_$ac_func=no"
11863 fi
11864 rm -f conftest*
11865
11866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11867   echo "$ac_t""yes" 1>&6
11868   { test "$extra_verbose" = "yes" && cat << EOF
11869     Defining CRAY_STACKSEG_END = $ac_func
11870 EOF
11871 cat >> confdefs.h <<EOF
11872 #define CRAY_STACKSEG_END $ac_func
11873 EOF
11874 }
11875
11876   break
11877 else
11878   echo "$ac_t""no" 1>&6
11879 fi
11880
11881 done
11882 fi
11883
11884 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11885 echo "configure:11886: checking stack direction for C alloca" >&5
11886
11887 cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890 find_stack_direction ()
11891 {
11892   static char *addr = 0;
11893   auto char dummy;
11894   if (addr == 0)
11895     {
11896       addr = &dummy;
11897       return find_stack_direction ();
11898     }
11899   else
11900     return (&dummy > addr) ? 1 : -1;
11901 }
11902 main ()
11903 {
11904   exit (find_stack_direction() < 0);
11905 }
11906 EOF
11907 if { (eval echo configure:11908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11908 then
11909   ac_cv_c_stack_direction=1
11910 else
11911   conftest_rc="$?"
11912   echo "configure: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   rm -fr conftest*
11915   ac_cv_c_stack_direction=-1
11916 fi
11917 rm -fr conftest*
11918
11919 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11920 { test "$extra_verbose" = "yes" && cat << EOF
11921     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11922 EOF
11923 cat >> confdefs.h <<EOF
11924 #define STACK_DIRECTION $ac_cv_c_stack_direction
11925 EOF
11926 }
11927
11928 fi
11929
11930   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11931    echo "    xemacs will be linked with \"$ALLOCA\""
11932  fi
11933 fi
11934
11935 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11936 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11937 echo "configure:11938: checking for vfork.h" >&5
11938
11939 cat > conftest.$ac_ext <<EOF
11940 #line 11941 "configure"
11941 #include "confdefs.h"
11942 #include <vfork.h>
11943 EOF
11944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11945 { (eval echo configure:11946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11947 if test -z "$ac_err"; then
11948   rm -rf conftest*
11949   eval "ac_cv_header_$ac_safe=yes"
11950 else
11951   echo "$ac_err" >&5
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -rf conftest*
11955   eval "ac_cv_header_$ac_safe=no"
11956 fi
11957 rm -f conftest*
11958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11959   echo "$ac_t""yes" 1>&6
11960   { test "$extra_verbose" = "yes" && cat << \EOF
11961     Defining HAVE_VFORK_H
11962 EOF
11963 cat >> confdefs.h <<\EOF
11964 #define HAVE_VFORK_H 1
11965 EOF
11966 }
11967
11968 else
11969   echo "$ac_t""no" 1>&6
11970 fi
11971
11972 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11973 echo "configure:11974: checking for working vfork" >&5
11974
11975 cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978 /* Thanks to Paul Eggert for this test.  */
11979 #include <stdio.h>
11980 #include <sys/types.h>
11981 #include <sys/stat.h>
11982 #ifdef HAVE_UNISTD_H
11983 #include <unistd.h>
11984 #endif
11985 #ifdef HAVE_VFORK_H
11986 #include <vfork.h>
11987 #endif
11988 /* On some sparc systems, changes by the child to local and incoming
11989    argument registers are propagated back to the parent.
11990    The compiler is told about this with #include <vfork.h>,
11991    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11992    Test for this by using a static variable whose address
11993    is put into a register that is clobbered by the vfork.  */
11994 static
11995 #ifdef __cplusplus
11996 sparc_address_test (int arg)
11997 #else
11998 sparc_address_test (arg) int arg;
11999 #endif
12000 {
12001   static pid_t child;
12002   if (!child) {
12003     child = vfork ();
12004     if (child < 0) {
12005       perror ("vfork");
12006       _exit(2);
12007     }
12008     if (!child) {
12009       arg = getpid();
12010       write(-1, "", 0);
12011       _exit (arg);
12012     }
12013   }
12014 }
12015 main() {
12016   pid_t parent = getpid ();
12017   pid_t child;
12018
12019   sparc_address_test ();
12020
12021   child = vfork ();
12022
12023   if (child == 0) {
12024     /* Here is another test for sparc vfork register problems.
12025        This test uses lots of local variables, at least
12026        as many local variables as main has allocated so far
12027        including compiler temporaries.  4 locals are enough for
12028        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12029        A buggy compiler should reuse the register of parent
12030        for one of the local variables, since it will think that
12031        parent can't possibly be used any more in this routine.
12032        Assigning to the local variable will thus munge parent
12033        in the parent process.  */
12034     pid_t
12035       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12036       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12037     /* Convince the compiler that p..p7 are live; otherwise, it might
12038        use the same hardware register for all 8 local variables.  */
12039     if (p != p1 || p != p2 || p != p3 || p != p4
12040         || p != p5 || p != p6 || p != p7)
12041       _exit(1);
12042
12043     /* On some systems (e.g. IRIX 3.3),
12044        vfork doesn't separate parent from child file descriptors.
12045        If the child closes a descriptor before it execs or exits,
12046        this munges the parent's descriptor as well.
12047        Test for this by closing stdout in the child.  */
12048     _exit(close(fileno(stdout)) != 0);
12049   } else {
12050     int status;
12051     struct stat st;
12052
12053     while (wait(&status) != child)
12054       ;
12055     exit(
12056          /* Was there some problem with vforking?  */
12057          child < 0
12058
12059          /* Did the child fail?  (This shouldn't happen.)  */
12060          || status
12061
12062          /* Did the vfork/compiler bug occur?  */
12063          || parent != getpid()
12064
12065          /* Did the file descriptor bug occur?  */
12066          || fstat(fileno(stdout), &st) != 0
12067          );
12068   }
12069 }
12070 EOF
12071 if { (eval echo configure:12072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12072 then
12073   ac_cv_func_vfork_works=yes
12074 else
12075   conftest_rc="$?"
12076   echo "configure: failed program was:" >&5
12077   cat conftest.$ac_ext >&5
12078   rm -fr conftest*
12079   ac_cv_func_vfork_works=no
12080 fi
12081 rm -fr conftest*
12082
12083 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12084 if test $ac_cv_func_vfork_works = no; then
12085   { test "$extra_verbose" = "yes" && cat << \EOF
12086     Defining vfork = fork
12087 EOF
12088 cat >> confdefs.h <<\EOF
12089 #define vfork fork
12090 EOF
12091 }
12092
12093 fi
12094
12095
12096 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12097 echo "configure:12098: checking for working strcoll" >&5
12098
12099 cat > conftest.$ac_ext <<EOF
12100 #line 12101 "configure"
12101 #include "confdefs.h"
12102 #include <string.h>
12103 main ()
12104 {
12105   exit (strcoll ("abc", "def") >= 0 ||
12106         strcoll ("ABC", "DEF") >= 0 ||
12107         strcoll ("123", "456") >= 0);
12108 }
12109 EOF
12110 if { (eval echo configure:12111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12111 then
12112   ac_cv_func_strcoll_works=yes
12113 else
12114   conftest_rc="$?"
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -fr conftest*
12118   ac_cv_func_strcoll_works=no
12119 fi
12120 rm -fr conftest*
12121
12122 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12123 if test $ac_cv_func_strcoll_works = yes; then
12124   { test "$extra_verbose" = "yes" && cat << \EOF
12125     Defining HAVE_STRCOLL
12126 EOF
12127 cat >> confdefs.h <<\EOF
12128 #define HAVE_STRCOLL 1
12129 EOF
12130 }
12131
12132 fi
12133
12134
12135 for ac_func in getpgrp
12136 do
12137 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12138 echo "configure:12139: checking for $ac_func" >&5
12139
12140 cat > conftest.$ac_ext <<EOF
12141 #line 12142 "configure"
12142 #include "confdefs.h"
12143 /* System header to define __stub macros and hopefully few prototypes,
12144     which can conflict with char $ac_func(); below.  */
12145 #include <assert.h>
12146 /* Override any gcc2 internal prototype to avoid an error.  */
12147 /* We use char because int might match the return type of a gcc2
12148     builtin and then its argument prototype would still apply.  */
12149 char $ac_func();
12150
12151 int main() {
12152
12153 /* The GNU C library defines this for functions which it implements
12154     to always fail with ENOSYS.  Some functions are actually named
12155     something starting with __ and the normal name is an alias.  */
12156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12157 choke me
12158 #else
12159 $ac_func();
12160 #endif
12161
12162 ; return 0; }
12163 EOF
12164 if { (eval echo configure:12165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12165   rm -rf conftest*
12166   eval "ac_cv_func_$ac_func=yes"
12167 else
12168   echo "configure: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   rm -rf conftest*
12171   eval "ac_cv_func_$ac_func=no"
12172 fi
12173 rm -f conftest*
12174
12175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12176   echo "$ac_t""yes" 1>&6
12177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12178   { test "$extra_verbose" = "yes" && cat << EOF
12179     Defining $ac_tr_func
12180 EOF
12181 cat >> confdefs.h <<EOF
12182 #define $ac_tr_func 1
12183 EOF
12184 }
12185  
12186 else
12187   echo "$ac_t""no" 1>&6
12188 fi
12189 done
12190
12191 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12192 echo "configure:12193: checking whether getpgrp takes no argument" >&5
12193
12194 cat > conftest.$ac_ext <<EOF
12195 #line 12196 "configure"
12196 #include "confdefs.h"
12197
12198 /*
12199  * If this system has a BSD-style getpgrp(),
12200  * which takes a pid argument, exit unsuccessfully.
12201  *
12202  * Snarfed from Chet Ramey's bash pgrp.c test program
12203  */
12204 #include <stdio.h>
12205 #include <sys/types.h>
12206
12207 int     pid;
12208 int     pg1, pg2, pg3, pg4;
12209 int     ng, np, s, child;
12210
12211 main()
12212 {
12213         pid = getpid();
12214         pg1 = getpgrp(0);
12215         pg2 = getpgrp();
12216         pg3 = getpgrp(pid);
12217         pg4 = getpgrp(1);
12218
12219         /*
12220          * If all of these values are the same, it's pretty sure that
12221          * we're on a system that ignores getpgrp's first argument.
12222          */
12223         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12224                 exit(0);
12225
12226         child = fork();
12227         if (child < 0)
12228                 exit(1);
12229         else if (child == 0) {
12230                 np = getpid();
12231                 /*
12232                  * If this is Sys V, this will not work; pgrp will be
12233                  * set to np because setpgrp just changes a pgrp to be
12234                  * the same as the pid.
12235                  */
12236                 setpgrp(np, pg1);
12237                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12238                 if (ng == pg1) {
12239                         exit(1);
12240                 } else {
12241                         exit(0);
12242                 }
12243         } else {
12244                 wait(&s);
12245                 exit(s>>8);
12246         }
12247 }
12248
12249 EOF
12250 if { (eval echo configure:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12251 then
12252   ac_cv_func_getpgrp_void=yes
12253 else
12254   conftest_rc="$?"
12255   echo "configure: failed program was:" >&5
12256   cat conftest.$ac_ext >&5
12257   rm -fr conftest*
12258   ac_cv_func_getpgrp_void=no
12259 fi
12260 rm -fr conftest*
12261
12262
12263 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12264 if test $ac_cv_func_getpgrp_void = yes; then
12265   { test "$extra_verbose" = "yes" && cat << \EOF
12266     Defining GETPGRP_VOID
12267 EOF
12268 cat >> confdefs.h <<\EOF
12269 #define GETPGRP_VOID 1
12270 EOF
12271 }
12272
12273 fi
12274
12275
12276 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12277 echo "configure:12278: checking for working mmap" >&5
12278 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12279 cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282 #include <stdio.h>
12283 #include <unistd.h>
12284 #include <fcntl.h>
12285 #include <sys/mman.h>
12286
12287 #ifndef MAP_VARIABLE
12288 #define MAP_VARIABLE 0
12289 #endif
12290
12291 #ifndef MAP_FAILED
12292 #define MAP_FAILED -1
12293 #endif
12294
12295 int main (int argc, char *argv[])
12296 {
12297   int fd = -1;
12298   caddr_t p;
12299 #ifndef MAP_ANONYMOUS
12300   fd = open ("/dev/zero", O_RDWR);
12301   if (fd < 0)
12302     return 1;
12303 #define MAP_ANONYMOUS 0
12304 #endif
12305   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12306            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12307            fd, 0) != (void *) MAP_FAILED)
12308     return 0;
12309   perror ("conftest: mmap failed");
12310   return 1;
12311 }
12312 EOF
12313 if { (eval echo configure:12314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12314 then
12315   have_mmap=yes
12316 else
12317   conftest_rc="$?"
12318   echo "configure: failed program was:" >&5
12319   cat conftest.$ac_ext >&5
12320   rm -fr conftest*
12321   have_mmap=no
12322 fi
12323 rm -fr conftest* ;;
12324 esac
12325 echo "$ac_t""$have_mmap" 1>&6
12326 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12327     Defining HAVE_MMAP
12328 EOF
12329 cat >> confdefs.h <<\EOF
12330 #define HAVE_MMAP 1
12331 EOF
12332 }
12333
12334
12335 case "$opsys" in cygwin*) 
12336         test "$rel_alloc" = "default" && rel_alloc=no ;;
12337 esac
12338 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12339 if test "$rel_alloc $have_mmap" = "default yes"; then
12340   if test "$doug_lea_malloc" = "yes"; then
12341         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12342 echo "configure:12343: checking for M_MMAP_THRESHOLD" >&5
12343     cat > conftest.$ac_ext <<EOF
12344 #line 12345 "configure"
12345 #include "confdefs.h"
12346 #include <malloc.h>
12347 int main() {
12348
12349 #ifndef M_MMAP_THRESHOLD
12350 #error No M_MMAP_THRESHOLD :-(
12351 !@+$%^&*_)(_ - unlikely to compile...
12352 #endif
12353
12354 ; return 0; }
12355 EOF
12356 if { (eval echo configure:12357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12357   rm -rf conftest*
12358   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12359 else
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   rm -rf conftest*
12363   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12364 fi
12365 rm -f conftest*
12366   else
12367     rel_alloc=yes
12368   fi
12369 fi
12370 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12371     Defining REL_ALLOC
12372 EOF
12373 cat >> confdefs.h <<\EOF
12374 #define REL_ALLOC 1
12375 EOF
12376 }
12377
12378
12379 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12380 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12381 echo "configure:12382: checking for termios.h" >&5
12382
12383 cat > conftest.$ac_ext <<EOF
12384 #line 12385 "configure"
12385 #include "confdefs.h"
12386 #include <termios.h>
12387 EOF
12388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12389 { (eval echo configure:12390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12391 if test -z "$ac_err"; then
12392   rm -rf conftest*
12393   eval "ac_cv_header_$ac_safe=yes"
12394 else
12395   echo "$ac_err" >&5
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   eval "ac_cv_header_$ac_safe=no"
12400 fi
12401 rm -f conftest*
12402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12403   echo "$ac_t""yes" 1>&6
12404   { test "$extra_verbose" = "yes" && cat << \EOF
12405     Defining HAVE_TERMIOS
12406 EOF
12407 cat >> confdefs.h <<\EOF
12408 #define HAVE_TERMIOS 1
12409 EOF
12410 }
12411
12412   { test "$extra_verbose" = "yes" && cat << \EOF
12413     Defining SIGNALS_VIA_CHARACTERS
12414 EOF
12415 cat >> confdefs.h <<\EOF
12416 #define SIGNALS_VIA_CHARACTERS 1
12417 EOF
12418 }
12419
12420   { test "$extra_verbose" = "yes" && cat << \EOF
12421     Defining NO_TERMIO
12422 EOF
12423 cat >> confdefs.h <<\EOF
12424 #define NO_TERMIO 1
12425 EOF
12426 }
12427
12428 else
12429   echo "$ac_t""no" 1>&6
12430 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12431 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12432 echo "configure:12433: checking for termio.h" >&5
12433
12434 cat > conftest.$ac_ext <<EOF
12435 #line 12436 "configure"
12436 #include "confdefs.h"
12437 #include <termio.h>
12438 EOF
12439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12440 { (eval echo configure:12441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12442 if test -z "$ac_err"; then
12443   rm -rf conftest*
12444   eval "ac_cv_header_$ac_safe=yes"
12445 else
12446   echo "$ac_err" >&5
12447   echo "configure: failed program was:" >&5
12448   cat conftest.$ac_ext >&5
12449   rm -rf conftest*
12450   eval "ac_cv_header_$ac_safe=no"
12451 fi
12452 rm -f conftest*
12453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12454   echo "$ac_t""yes" 1>&6
12455   { test "$extra_verbose" = "yes" && cat << \EOF
12456     Defining HAVE_TERMIO
12457 EOF
12458 cat >> confdefs.h <<\EOF
12459 #define HAVE_TERMIO 1
12460 EOF
12461 }
12462
12463 else
12464   echo "$ac_t""no" 1>&6
12465 fi
12466
12467 fi
12468
12469
12470
12471 echo $ac_n "checking for socket""... $ac_c" 1>&6
12472 echo "configure:12473: checking for socket" >&5
12473
12474 cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* System header to define __stub macros and hopefully few prototypes,
12478     which can conflict with char socket(); below.  */
12479 #include <assert.h>
12480 /* Override any gcc2 internal prototype to avoid an error.  */
12481 /* We use char because int might match the return type of a gcc2
12482     builtin and then its argument prototype would still apply.  */
12483 char socket();
12484
12485 int main() {
12486
12487 /* The GNU C library defines this for functions which it implements
12488     to always fail with ENOSYS.  Some functions are actually named
12489     something starting with __ and the normal name is an alias.  */
12490 #if defined (__stub_socket) || defined (__stub___socket)
12491 choke me
12492 #else
12493 socket();
12494 #endif
12495
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12499   rm -rf conftest*
12500   eval "ac_cv_func_socket=yes"
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   eval "ac_cv_func_socket=no"
12506 fi
12507 rm -f conftest*
12508
12509 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12510   echo "$ac_t""yes" 1>&6
12511   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12512 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12513 echo "configure:12514: checking for netinet/in.h" >&5
12514
12515 cat > conftest.$ac_ext <<EOF
12516 #line 12517 "configure"
12517 #include "confdefs.h"
12518 #include <netinet/in.h>
12519 EOF
12520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12521 { (eval echo configure:12522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12523 if test -z "$ac_err"; then
12524   rm -rf conftest*
12525   eval "ac_cv_header_$ac_safe=yes"
12526 else
12527   echo "$ac_err" >&5
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   eval "ac_cv_header_$ac_safe=no"
12532 fi
12533 rm -f conftest*
12534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12535   echo "$ac_t""yes" 1>&6
12536   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12537 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12538 echo "configure:12539: checking for arpa/inet.h" >&5
12539
12540 cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543 #include <arpa/inet.h>
12544 EOF
12545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12546 { (eval echo configure:12547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12548 if test -z "$ac_err"; then
12549   rm -rf conftest*
12550   eval "ac_cv_header_$ac_safe=yes"
12551 else
12552   echo "$ac_err" >&5
12553   echo "configure: failed program was:" >&5
12554   cat conftest.$ac_ext >&5
12555   rm -rf conftest*
12556   eval "ac_cv_header_$ac_safe=no"
12557 fi
12558 rm -f conftest*
12559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12560   echo "$ac_t""yes" 1>&6
12561   
12562   { test "$extra_verbose" = "yes" && cat << \EOF
12563     Defining HAVE_SOCKETS
12564 EOF
12565 cat >> confdefs.h <<\EOF
12566 #define HAVE_SOCKETS 1
12567 EOF
12568 }
12569
12570       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12571 echo "configure:12572: checking "for sun_len member in struct sockaddr_un"" >&5
12572       cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575
12576 #include <sys/types.h>
12577 #include <sys/socket.h>
12578 #include <sys/un.h>
12579       
12580 int main() {
12581 static struct sockaddr_un x; x.sun_len = 1;
12582 ; return 0; }
12583 EOF
12584 if { (eval echo configure:12585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12585   rm -rf conftest*
12586   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12587     Defining HAVE_SOCKADDR_SUN_LEN
12588 EOF
12589 cat >> confdefs.h <<\EOF
12590 #define HAVE_SOCKADDR_SUN_LEN 1
12591 EOF
12592 }
12593
12594 else
12595   echo "configure: failed program was:" >&5
12596   cat conftest.$ac_ext >&5
12597   rm -rf conftest*
12598   echo "$ac_t""no" 1>&6
12599 fi
12600 rm -f conftest*
12601       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12602 echo "configure:12603: checking "for ip_mreq struct in netinet/in.h"" >&5
12603       cat > conftest.$ac_ext <<EOF
12604 #line 12605 "configure"
12605 #include "confdefs.h"
12606
12607 #include <sys/types.h>
12608 #include <netinet/in.h>
12609       
12610 int main() {
12611 static struct ip_mreq x;
12612 ; return 0; }
12613 EOF
12614 if { (eval echo configure:12615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12615   rm -rf conftest*
12616   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12617     Defining HAVE_MULTICAST
12618 EOF
12619 cat >> confdefs.h <<\EOF
12620 #define HAVE_MULTICAST 1
12621 EOF
12622 }
12623
12624 else
12625   echo "configure: failed program was:" >&5
12626   cat conftest.$ac_ext >&5
12627   rm -rf conftest*
12628   echo "$ac_t""no" 1>&6
12629 fi
12630 rm -f conftest*
12631 else
12632   echo "$ac_t""no" 1>&6
12633 fi
12634
12635 else
12636   echo "$ac_t""no" 1>&6
12637 fi
12638
12639 else
12640   echo "$ac_t""no" 1>&6
12641 fi
12642
12643
12644 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12645 echo "configure:12646: checking for msgget" >&5
12646
12647 cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12650 /* System header to define __stub macros and hopefully few prototypes,
12651     which can conflict with char msgget(); below.  */
12652 #include <assert.h>
12653 /* Override any gcc2 internal prototype to avoid an error.  */
12654 /* We use char because int might match the return type of a gcc2
12655     builtin and then its argument prototype would still apply.  */
12656 char msgget();
12657
12658 int main() {
12659
12660 /* The GNU C library defines this for functions which it implements
12661     to always fail with ENOSYS.  Some functions are actually named
12662     something starting with __ and the normal name is an alias.  */
12663 #if defined (__stub_msgget) || defined (__stub___msgget)
12664 choke me
12665 #else
12666 msgget();
12667 #endif
12668
12669 ; return 0; }
12670 EOF
12671 if { (eval echo configure:12672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12672   rm -rf conftest*
12673   eval "ac_cv_func_msgget=yes"
12674 else
12675   echo "configure: failed program was:" >&5
12676   cat conftest.$ac_ext >&5
12677   rm -rf conftest*
12678   eval "ac_cv_func_msgget=no"
12679 fi
12680 rm -f conftest*
12681
12682 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12685 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12686 echo "configure:12687: checking for sys/ipc.h" >&5
12687
12688 cat > conftest.$ac_ext <<EOF
12689 #line 12690 "configure"
12690 #include "confdefs.h"
12691 #include <sys/ipc.h>
12692 EOF
12693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12694 { (eval echo configure:12695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12696 if test -z "$ac_err"; then
12697   rm -rf conftest*
12698   eval "ac_cv_header_$ac_safe=yes"
12699 else
12700   echo "$ac_err" >&5
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703   rm -rf conftest*
12704   eval "ac_cv_header_$ac_safe=no"
12705 fi
12706 rm -f conftest*
12707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12708   echo "$ac_t""yes" 1>&6
12709   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12710 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12711 echo "configure:12712: checking for sys/msg.h" >&5
12712
12713 cat > conftest.$ac_ext <<EOF
12714 #line 12715 "configure"
12715 #include "confdefs.h"
12716 #include <sys/msg.h>
12717 EOF
12718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12719 { (eval echo configure:12720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12721 if test -z "$ac_err"; then
12722   rm -rf conftest*
12723   eval "ac_cv_header_$ac_safe=yes"
12724 else
12725   echo "$ac_err" >&5
12726   echo "configure: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   rm -rf conftest*
12729   eval "ac_cv_header_$ac_safe=no"
12730 fi
12731 rm -f conftest*
12732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12733   echo "$ac_t""yes" 1>&6
12734   { test "$extra_verbose" = "yes" && cat << \EOF
12735     Defining HAVE_SYSVIPC
12736 EOF
12737 cat >> confdefs.h <<\EOF
12738 #define HAVE_SYSVIPC 1
12739 EOF
12740 }
12741
12742 else
12743   echo "$ac_t""no" 1>&6
12744 fi
12745
12746 else
12747   echo "$ac_t""no" 1>&6
12748 fi
12749
12750 else
12751   echo "$ac_t""no" 1>&6
12752 fi
12753
12754
12755 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12756 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12757 echo "configure:12758: checking for dirent.h" >&5
12758
12759 cat > conftest.$ac_ext <<EOF
12760 #line 12761 "configure"
12761 #include "confdefs.h"
12762 #include <dirent.h>
12763 EOF
12764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12765 { (eval echo configure:12766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12767 if test -z "$ac_err"; then
12768   rm -rf conftest*
12769   eval "ac_cv_header_$ac_safe=yes"
12770 else
12771   echo "$ac_err" >&5
12772   echo "configure: failed program was:" >&5
12773   cat conftest.$ac_ext >&5
12774   rm -rf conftest*
12775   eval "ac_cv_header_$ac_safe=no"
12776 fi
12777 rm -f conftest*
12778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12779   echo "$ac_t""yes" 1>&6
12780   { test "$extra_verbose" = "yes" && cat << \EOF
12781     Defining SYSV_SYSTEM_DIR
12782 EOF
12783 cat >> confdefs.h <<\EOF
12784 #define SYSV_SYSTEM_DIR 1
12785 EOF
12786 }
12787
12788 else
12789   echo "$ac_t""no" 1>&6
12790 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12791 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12792 echo "configure:12793: checking for sys/dir.h" >&5
12793
12794 cat > conftest.$ac_ext <<EOF
12795 #line 12796 "configure"
12796 #include "confdefs.h"
12797 #include <sys/dir.h>
12798 EOF
12799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12800 { (eval echo configure:12801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12802 if test -z "$ac_err"; then
12803   rm -rf conftest*
12804   eval "ac_cv_header_$ac_safe=yes"
12805 else
12806   echo "$ac_err" >&5
12807   echo "configure: failed program was:" >&5
12808   cat conftest.$ac_ext >&5
12809   rm -rf conftest*
12810   eval "ac_cv_header_$ac_safe=no"
12811 fi
12812 rm -f conftest*
12813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12814   echo "$ac_t""yes" 1>&6
12815   :
12816 else
12817   echo "$ac_t""no" 1>&6
12818 { test "$extra_verbose" = "yes" && cat << \EOF
12819     Defining NONSYSTEM_DIR_LIBRARY
12820 EOF
12821 cat >> confdefs.h <<\EOF
12822 #define NONSYSTEM_DIR_LIBRARY 1
12823 EOF
12824 }
12825
12826 fi
12827
12828 fi
12829
12830
12831 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12832 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12833 echo "configure:12834: checking for nlist.h" >&5
12834
12835 cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 #include <nlist.h>
12839 EOF
12840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12841 { (eval echo configure:12842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12843 if test -z "$ac_err"; then
12844   rm -rf conftest*
12845   eval "ac_cv_header_$ac_safe=yes"
12846 else
12847   echo "$ac_err" >&5
12848   echo "configure: failed program was:" >&5
12849   cat conftest.$ac_ext >&5
12850   rm -rf conftest*
12851   eval "ac_cv_header_$ac_safe=no"
12852 fi
12853 rm -f conftest*
12854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12855   echo "$ac_t""yes" 1>&6
12856   { test "$extra_verbose" = "yes" && cat << \EOF
12857     Defining NLIST_STRUCT
12858 EOF
12859 cat >> confdefs.h <<\EOF
12860 #define NLIST_STRUCT 1
12861 EOF
12862 }
12863
12864 else
12865   echo "$ac_t""no" 1>&6
12866 fi
12867
12868
12869
12870 echo "checking "for sound support"" 1>&6
12871 echo "configure:12872: checking "for sound support"" >&5
12872 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12873
12874 if test "$with_native_sound" != "no"; then
12875     if test -n "$native_sound_lib"; then
12876     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12877 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12878 echo "configure:12879: checking for multimedia/audio_device.h" >&5
12879
12880 cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 #include <multimedia/audio_device.h>
12884 EOF
12885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12886 { (eval echo configure:12887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12888 if test -z "$ac_err"; then
12889   rm -rf conftest*
12890   eval "ac_cv_header_$ac_safe=yes"
12891 else
12892   echo "$ac_err" >&5
12893   echo "configure: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   rm -rf conftest*
12896   eval "ac_cv_header_$ac_safe=no"
12897 fi
12898 rm -f conftest*
12899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12900   echo "$ac_t""yes" 1>&6
12901   sound_found=yes sound_cflags=""
12902       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12903    echo "    xemacs will be linked with \"sunplay.o\""
12904  fi
12905 else
12906   echo "$ac_t""no" 1>&6
12907 fi
12908
12909   fi
12910
12911     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12912     sound_found=yes
12913     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12914    echo "    xemacs will be linked with \"sunplay.o\""
12915  fi
12916     if test -d "/usr/demo/SOUND/include"
12917       then sound_cflags="-I/usr/demo/SOUND/include"
12918       else sound_cflags="-I/usr/demo/SOUND"
12919     fi
12920     if test -z "$native_sound_lib" ; then
12921       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12922         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12923         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12924       fi
12925     fi
12926   fi
12927
12928     if test -z "$sound_found"; then
12929     case "$canonical" in
12930     *-sgi-* )
12931       if test -z "$native_sound_lib"; then
12932         
12933 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12934 echo "configure:12935: checking for ALopenport in -laudio" >&5
12935 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12936
12937 xe_check_libs=" -laudio "
12938 cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* Override any gcc2 internal prototype to avoid an error.  */
12942 /* We use char because int might match the return type of a gcc2
12943     builtin and then its argument prototype would still apply.  */
12944 char ALopenport();
12945
12946 int main() {
12947 ALopenport()
12948 ; return 0; }
12949 EOF
12950 if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12951   rm -rf conftest*
12952   eval "ac_cv_lib_$ac_lib_var=yes"
12953 else
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -rf conftest*
12957   eval "ac_cv_lib_$ac_lib_var=no"
12958 fi
12959 rm -f conftest*
12960 xe_check_libs=""
12961
12962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12963   echo "$ac_t""yes" 1>&6
12964   native_sound_lib="-laudio"
12965 else
12966   echo "$ac_t""no" 1>&6
12967 fi
12968
12969
12970       fi
12971       if test -n "$native_sound_lib"; then
12972         sound_found=yes sound_cflags=""
12973         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12974    echo "    xemacs will be linked with \"sgiplay.o\""
12975  fi
12976       fi ;;
12977     hppa*-hp-hpux* )
12978       if test -z "$native_sound_lib"; then
12979         
12980 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12981 echo "configure:12982: checking for AOpenAudio in -lAlib" >&5
12982 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12983
12984 xe_check_libs=" -lAlib "
12985 cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988 /* Override any gcc2 internal prototype to avoid an error.  */
12989 /* We use char because int might match the return type of a gcc2
12990     builtin and then its argument prototype would still apply.  */
12991 char AOpenAudio();
12992
12993 int main() {
12994 AOpenAudio()
12995 ; return 0; }
12996 EOF
12997 if { (eval echo configure:12998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12998   rm -rf conftest*
12999   eval "ac_cv_lib_$ac_lib_var=yes"
13000 else
13001   echo "configure: failed program was:" >&5
13002   cat conftest.$ac_ext >&5
13003   rm -rf conftest*
13004   eval "ac_cv_lib_$ac_lib_var=no"
13005 fi
13006 rm -f conftest*
13007 xe_check_libs=""
13008
13009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13010   echo "$ac_t""yes" 1>&6
13011   native_sound_lib="-lAlib"
13012 else
13013   echo "$ac_t""no" 1>&6
13014 fi
13015
13016
13017       fi
13018       if test -n "$native_sound_lib"; then
13019         sound_found=yes
13020         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13021    echo "    xemacs will be linked with \"hpplay.o\""
13022  fi
13023         if test "$GCC" = "yes" # Kludge city
13024           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13025           else sound_cflags="+e -I/usr/audio/examples"
13026         fi
13027       fi ;;
13028     esac
13029   fi
13030
13031     if test -z "$sound_found"; then
13032     if test "$with_msw" = "yes"; then
13033     sound_found=yes
13034     native_sound_lib=
13035     fi
13036   fi
13037
13038     if test -z "$sound_found"; then
13039     for dir in "machine" "sys" "linux"; do
13040       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13041 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13042 echo "configure:13043: checking for ${dir}/soundcard.h" >&5
13043
13044 cat > conftest.$ac_ext <<EOF
13045 #line 13046 "configure"
13046 #include "confdefs.h"
13047 #include <${dir}/soundcard.h>
13048 EOF
13049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13050 { (eval echo configure:13051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13052 if test -z "$ac_err"; then
13053   rm -rf conftest*
13054   eval "ac_cv_header_$ac_safe=yes"
13055 else
13056   echo "$ac_err" >&5
13057   echo "configure: failed program was:" >&5
13058   cat conftest.$ac_ext >&5
13059   rm -rf conftest*
13060   eval "ac_cv_header_$ac_safe=no"
13061 fi
13062 rm -f conftest*
13063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13064   echo "$ac_t""yes" 1>&6
13065   sound_found=yes
13066        need_miscplay=yes
13067         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13068    echo "    xemacs will be linked with \"linuxplay.o\""
13069  fi
13070         { test "$extra_verbose" = "yes" && cat << EOF
13071     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13072 EOF
13073 cat >> confdefs.h <<EOF
13074 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13075 EOF
13076 }
13077
13078         break
13079 else
13080   echo "$ac_t""no" 1>&6
13081 fi
13082
13083     done
13084   fi
13085
13086   test "$sound_found" = "yes" && with_native_sound=yes
13087 fi
13088
13089 if test "$with_native_sound" = "yes"; then
13090   { test "$extra_verbose" = "yes" && cat << \EOF
13091     Defining HAVE_NATIVE_SOUND
13092 EOF
13093 cat >> confdefs.h <<\EOF
13094 #define HAVE_NATIVE_SOUND 1
13095 EOF
13096 }
13097
13098   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13099 fi
13100
13101 if test "$with_nas_sound" != "no"; then
13102   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13103 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13104 echo "configure:13105: checking for audio/audiolib.h" >&5
13105
13106 cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 #include <audio/audiolib.h>
13110 EOF
13111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13112 { (eval echo configure:13113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13114 if test -z "$ac_err"; then
13115   rm -rf conftest*
13116   eval "ac_cv_header_$ac_safe=yes"
13117 else
13118   echo "$ac_err" >&5
13119   echo "configure: failed program was:" >&5
13120   cat conftest.$ac_ext >&5
13121   rm -rf conftest*
13122   eval "ac_cv_header_$ac_safe=no"
13123 fi
13124 rm -f conftest*
13125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13126   echo "$ac_t""yes" 1>&6
13127   
13128     
13129 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13130 echo "configure:13131: checking for AuOpenServer in -laudio" >&5
13131 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13132
13133 xe_check_libs=" -laudio "
13134 cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 /* Override any gcc2 internal prototype to avoid an error.  */
13138 /* We use char because int might match the return type of a gcc2
13139     builtin and then its argument prototype would still apply.  */
13140 char AuOpenServer();
13141
13142 int main() {
13143 AuOpenServer()
13144 ; return 0; }
13145 EOF
13146 if { (eval echo configure:13147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13147   rm -rf conftest*
13148   eval "ac_cv_lib_$ac_lib_var=yes"
13149 else
13150   echo "configure: failed program was:" >&5
13151   cat conftest.$ac_ext >&5
13152   rm -rf conftest*
13153   eval "ac_cv_lib_$ac_lib_var=no"
13154 fi
13155 rm -f conftest*
13156 xe_check_libs=""
13157
13158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13159   echo "$ac_t""yes" 1>&6
13160   have_nas_sound=yes
13161 else
13162   echo "$ac_t""no" 1>&6
13163 fi
13164
13165
13166 else
13167   echo "$ac_t""no" 1>&6
13168 fi
13169
13170   if test "$have_nas_sound" = "yes"; then
13171     with_nas_sound=yes
13172     { test "$extra_verbose" = "yes" && cat << \EOF
13173     Defining HAVE_NAS_SOUND
13174 EOF
13175 cat >> confdefs.h <<\EOF
13176 #define HAVE_NAS_SOUND 1
13177 EOF
13178 }
13179
13180     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13181    echo "    xemacs will be linked with \"nas.o\""
13182  fi
13183     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13184             cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 #include <audio/Xtutil.h>
13188 EOF
13189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13190   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13191   :
13192 else
13193   rm -rf conftest*
13194   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13195     Defining NAS_NO_ERROR_JUMP
13196 EOF
13197 cat >> confdefs.h <<\EOF
13198 #define NAS_NO_ERROR_JUMP 1
13199 EOF
13200 }
13201
13202 fi
13203 rm -f conftest*
13204
13205   else
13206     test "$with_nas_sound" = "yes" && \
13207       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13208     with_nas_sound=no
13209   fi
13210 fi
13211
13212 if test "$with_esd_sound" != "no"; then
13213   # Extract the first word of "esd-config", so it can be a program name with args.
13214 set dummy esd-config; ac_word=$2
13215 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13216 echo "configure:13217: checking for $ac_word" >&5
13217
13218 if test -n "$have_esd_config"; then
13219   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13220 else
13221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13222   ac_dummy="$PATH"
13223   for ac_dir in $ac_dummy; do
13224     test -z "$ac_dir" && ac_dir=.
13225     if test -f $ac_dir/$ac_word; then
13226       ac_cv_prog_have_esd_config="yes"
13227       break
13228     fi
13229   done
13230   IFS="$ac_save_ifs"
13231   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13232 fi
13233 have_esd_config="$ac_cv_prog_have_esd_config"
13234 if test -n "$have_esd_config"; then
13235   echo "$ac_t""$have_esd_config" 1>&6
13236 else
13237   echo "$ac_t""no" 1>&6
13238 fi
13239
13240   if test "$have_esd_config" = "yes"; then
13241     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13242     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
13243     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13244     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13245 echo "configure:13246: checking for esd_play_stream" >&5
13246
13247 cat > conftest.$ac_ext <<EOF
13248 #line 13249 "configure"
13249 #include "confdefs.h"
13250 /* System header to define __stub macros and hopefully few prototypes,
13251     which can conflict with char esd_play_stream(); below.  */
13252 #include <assert.h>
13253 /* Override any gcc2 internal prototype to avoid an error.  */
13254 /* We use char because int might match the return type of a gcc2
13255     builtin and then its argument prototype would still apply.  */
13256 char esd_play_stream();
13257
13258 int main() {
13259
13260 /* The GNU C library defines this for functions which it implements
13261     to always fail with ENOSYS.  Some functions are actually named
13262     something starting with __ and the normal name is an alias.  */
13263 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13264 choke me
13265 #else
13266 esd_play_stream();
13267 #endif
13268
13269 ; return 0; }
13270 EOF
13271 if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13272   rm -rf conftest*
13273   eval "ac_cv_func_esd_play_stream=yes"
13274 else
13275   echo "configure: failed program was:" >&5
13276   cat conftest.$ac_ext >&5
13277   rm -rf conftest*
13278   eval "ac_cv_func_esd_play_stream=no"
13279 fi
13280 rm -f conftest*
13281
13282 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13283   echo "$ac_t""yes" 1>&6
13284   have_esd_sound=yes
13285 else
13286   echo "$ac_t""no" 1>&6
13287 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13288 fi
13289
13290   fi
13291
13292   if test "$have_esd_sound" = "yes"; then
13293     with_esd_sound=yes
13294     need_miscplay=yes
13295     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13296    echo "    xemacs will be linked with \"esd.o\""
13297  fi
13298     { test "$extra_verbose" = "yes" && cat << \EOF
13299     Defining HAVE_ESD_SOUND
13300 EOF
13301 cat >> confdefs.h <<\EOF
13302 #define HAVE_ESD_SOUND 1
13303 EOF
13304 }
13305
13306   else
13307     test "$with_esd_sound" = "yes" && \
13308       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13309     with_esd_sound=no
13310   fi
13311 fi
13312
13313 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13314    echo "    xemacs will be linked with \"miscplay.o\""
13315  fi
13316
13317
13318 test -z "$with_tty" && with_tty=yes
13319
13320 if test "$with_tty" = "yes"  ; then
13321   echo "checking for TTY-related features" 1>&6
13322 echo "configure:13323: checking for TTY-related features" >&5
13323   { test "$extra_verbose" = "yes" && cat << \EOF
13324     Defining HAVE_TTY
13325 EOF
13326 cat >> confdefs.h <<\EOF
13327 #define HAVE_TTY 1
13328 EOF
13329 }
13330
13331   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
13332    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\""
13333  fi
13334
13335     if test -z "$with_ncurses"; then
13336     
13337 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13338 echo "configure:13339: checking for tgetent in -lncurses" >&5
13339 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13340
13341 xe_check_libs=" -lncurses "
13342 cat > conftest.$ac_ext <<EOF
13343 #line 13344 "configure"
13344 #include "confdefs.h"
13345 /* Override any gcc2 internal prototype to avoid an error.  */
13346 /* We use char because int might match the return type of a gcc2
13347     builtin and then its argument prototype would still apply.  */
13348 char tgetent();
13349
13350 int main() {
13351 tgetent()
13352 ; return 0; }
13353 EOF
13354 if { (eval echo configure:13355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13355   rm -rf conftest*
13356   eval "ac_cv_lib_$ac_lib_var=yes"
13357 else
13358   echo "configure: failed program was:" >&5
13359   cat conftest.$ac_ext >&5
13360   rm -rf conftest*
13361   eval "ac_cv_lib_$ac_lib_var=no"
13362 fi
13363 rm -f conftest*
13364 xe_check_libs=""
13365
13366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13367   echo "$ac_t""yes" 1>&6
13368   with_ncurses=yes
13369 else
13370   echo "$ac_t""no" 1>&6
13371 with_ncurses=no
13372 fi
13373
13374
13375   fi
13376   if test "$with_ncurses" = "yes"; then
13377     { test "$extra_verbose" = "yes" && cat << \EOF
13378     Defining HAVE_NCURSES
13379 EOF
13380 cat >> confdefs.h <<\EOF
13381 #define HAVE_NCURSES 1
13382 EOF
13383 }
13384
13385     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13386 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13387 echo "configure:13388: checking for ncurses/curses.h" >&5
13388
13389 cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 #include <ncurses/curses.h>
13393 EOF
13394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13395 { (eval echo configure:13396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13397 if test -z "$ac_err"; then
13398   rm -rf conftest*
13399   eval "ac_cv_header_$ac_safe=yes"
13400 else
13401   echo "$ac_err" >&5
13402   echo "configure: failed program was:" >&5
13403   cat conftest.$ac_ext >&5
13404   rm -rf conftest*
13405   eval "ac_cv_header_$ac_safe=no"
13406 fi
13407 rm -f conftest*
13408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13409   echo "$ac_t""yes" 1>&6
13410   curses_h_file=ncurses/curses.h
13411 else
13412   echo "$ac_t""no" 1>&6
13413 fi
13414
13415     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13416 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13417 echo "configure:13418: checking for ncurses/term.h" >&5
13418
13419 cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 #include <ncurses/term.h>
13423 EOF
13424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13425 { (eval echo configure:13426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13427 if test -z "$ac_err"; then
13428   rm -rf conftest*
13429   eval "ac_cv_header_$ac_safe=yes"
13430 else
13431   echo "$ac_err" >&5
13432   echo "configure: failed program was:" >&5
13433   cat conftest.$ac_ext >&5
13434   rm -rf conftest*
13435   eval "ac_cv_header_$ac_safe=no"
13436 fi
13437 rm -f conftest*
13438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13439   echo "$ac_t""yes" 1>&6
13440   term_h_file=ncurses/term.h
13441 else
13442   echo "$ac_t""no" 1>&6
13443 fi
13444
13445     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13446    echo "    xemacs will be linked with \"terminfo.o\""
13447  fi
13448     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13449
13450     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13451                         save_c_switch_site="$c_switch_site"
13452       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13453       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13454 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13455 echo "configure:13456: checking for ncurses/curses.h" >&5
13456
13457 cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460 #include <ncurses/curses.h>
13461 EOF
13462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13463 { (eval echo configure:13464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13465 if test -z "$ac_err"; then
13466   rm -rf conftest*
13467   eval "ac_cv_header_$ac_safe=yes"
13468 else
13469   echo "$ac_err" >&5
13470   echo "configure: failed program was:" >&5
13471   cat conftest.$ac_ext >&5
13472   rm -rf conftest*
13473   eval "ac_cv_header_$ac_safe=no"
13474 fi
13475 rm -f conftest*
13476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13477   echo "$ac_t""yes" 1>&6
13478   curses_h_file=ncurses/curses.h
13479 else
13480   echo "$ac_t""no" 1>&6
13481 fi
13482
13483       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13484         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13485         else c_switch_site="$save_c_switch_site"
13486       fi
13487     fi
13488   else         if test "$have_terminfo" = "yes"; then
13489       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13490    echo "    xemacs will be linked with \"terminfo.o\""
13491  fi
13492       if test -n "$libs_termcap"; then
13493         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13494       else
13495         for lib in curses termlib termcap; do
13496           
13497 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13498 echo "configure:13499: checking for tgetent in -l$lib" >&5
13499 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13500
13501 xe_check_libs=" -l$lib "
13502 cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 /* Override any gcc2 internal prototype to avoid an error.  */
13506 /* We use char because int might match the return type of a gcc2
13507     builtin and then its argument prototype would still apply.  */
13508 char tgetent();
13509
13510 int main() {
13511 tgetent()
13512 ; return 0; }
13513 EOF
13514 if { (eval echo configure:13515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13515   rm -rf conftest*
13516   eval "ac_cv_lib_$ac_lib_var=yes"
13517 else
13518   echo "configure: failed program was:" >&5
13519   cat conftest.$ac_ext >&5
13520   rm -rf conftest*
13521   eval "ac_cv_lib_$ac_lib_var=no"
13522 fi
13523 rm -f conftest*
13524 xe_check_libs=""
13525
13526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13527   echo "$ac_t""yes" 1>&6
13528   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13529 else
13530   echo "$ac_t""no" 1>&6
13531 fi
13532
13533
13534         done
13535       fi
13536     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13537    echo "    xemacs will be linked with \"tparam.o\""
13538  fi
13539                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13540       if test -n "$libs_termcap"; then
13541         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13542       else
13543         
13544 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13545 echo "configure:13546: checking for tgetent in -lcurses" >&5
13546 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13547
13548 xe_check_libs=" -lcurses "
13549 cat > conftest.$ac_ext <<EOF
13550 #line 13551 "configure"
13551 #include "confdefs.h"
13552 /* Override any gcc2 internal prototype to avoid an error.  */
13553 /* We use char because int might match the return type of a gcc2
13554     builtin and then its argument prototype would still apply.  */
13555 char tgetent();
13556
13557 int main() {
13558 tgetent()
13559 ; return 0; }
13560 EOF
13561 if { (eval echo configure:13562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13562   rm -rf conftest*
13563   eval "ac_cv_lib_$ac_lib_var=yes"
13564 else
13565   echo "configure: failed program was:" >&5
13566   cat conftest.$ac_ext >&5
13567   rm -rf conftest*
13568   eval "ac_cv_lib_$ac_lib_var=no"
13569 fi
13570 rm -f conftest*
13571 xe_check_libs=""
13572
13573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13574   echo "$ac_t""yes" 1>&6
13575   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13576 else
13577   echo "$ac_t""no" 1>&6
13578 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13579 echo "configure:13580: checking for tgetent in -ltermcap" >&5
13580 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13581
13582 xe_check_libs=" -ltermcap "
13583 cat > conftest.$ac_ext <<EOF
13584 #line 13585 "configure"
13585 #include "confdefs.h"
13586 /* Override any gcc2 internal prototype to avoid an error.  */
13587 /* We use char because int might match the return type of a gcc2
13588     builtin and then its argument prototype would still apply.  */
13589 char tgetent();
13590
13591 int main() {
13592 tgetent()
13593 ; return 0; }
13594 EOF
13595 if { (eval echo configure:13596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13596   rm -rf conftest*
13597   eval "ac_cv_lib_$ac_lib_var=yes"
13598 else
13599   echo "configure: failed program was:" >&5
13600   cat conftest.$ac_ext >&5
13601   rm -rf conftest*
13602   eval "ac_cv_lib_$ac_lib_var=no"
13603 fi
13604 rm -f conftest*
13605 xe_check_libs=""
13606
13607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13608   echo "$ac_t""yes" 1>&6
13609   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13610 else
13611   echo "$ac_t""no" 1>&6
13612 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13613    echo "    xemacs will be linked with \"termcap.o\""
13614  fi
13615 fi
13616
13617
13618 fi
13619
13620
13621       fi
13622     fi
13623   fi
13624   { test "$extra_verbose" = "yes" && cat << EOF
13625     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13626 EOF
13627 cat >> confdefs.h <<EOF
13628 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13629 EOF
13630 }
13631
13632   { test "$extra_verbose" = "yes" && cat << EOF
13633     Defining TERM_H_FILE = "${term_h_file-term.h}"
13634 EOF
13635 cat >> confdefs.h <<EOF
13636 #define TERM_H_FILE "${term_h_file-term.h}"
13637 EOF
13638 }
13639
13640
13641     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13642 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13643 echo "configure:13644: checking for gpm.h" >&5
13644
13645 cat > conftest.$ac_ext <<EOF
13646 #line 13647 "configure"
13647 #include "confdefs.h"
13648 #include <gpm.h>
13649 EOF
13650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13651 { (eval echo configure:13652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13653 if test -z "$ac_err"; then
13654   rm -rf conftest*
13655   eval "ac_cv_header_$ac_safe=yes"
13656 else
13657   echo "$ac_err" >&5
13658   echo "configure: failed program was:" >&5
13659   cat conftest.$ac_ext >&5
13660   rm -rf conftest*
13661   eval "ac_cv_header_$ac_safe=no"
13662 fi
13663 rm -f conftest*
13664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13665   echo "$ac_t""yes" 1>&6
13666   :
13667 else
13668   echo "$ac_t""no" 1>&6
13669 with_gpm=no
13670 fi
13671  }
13672   test -z "$with_gpm" && { 
13673 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13674 echo "configure:13675: checking for Gpm_Open in -lgpm" >&5
13675 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13676
13677 xe_check_libs=" -lgpm "
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* Override any gcc2 internal prototype to avoid an error.  */
13682 /* We use char because int might match the return type of a gcc2
13683     builtin and then its argument prototype would still apply.  */
13684 char Gpm_Open();
13685
13686 int main() {
13687 Gpm_Open()
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=yes"
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=no"
13698 fi
13699 rm -f conftest*
13700 xe_check_libs=""
13701
13702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13703   echo "$ac_t""yes" 1>&6
13704   with_gpm=yes
13705 else
13706   echo "$ac_t""no" 1>&6
13707 with_gpm=no
13708 fi
13709
13710  }
13711   if test "$with_gpm" = "yes"; then
13712     { test "$extra_verbose" = "yes" && cat << \EOF
13713     Defining HAVE_GPM
13714 EOF
13715 cat >> confdefs.h <<\EOF
13716 #define HAVE_GPM 1
13717 EOF
13718 }
13719
13720     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13721    echo "    xemacs will be linked with \"gpmevent.o\""
13722  fi
13723     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13724   fi
13725
13726 else   for feature in ncurses gpm; do
13727     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13728       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13729     fi
13730     eval "with_${feature}=no"
13731   done
13732 fi 
13733 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
13734    echo "    xemacs will be linked with \"event-unixoid.o\""
13735  fi
13736
13737
13738 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13739   != "no no no" && echo "checking for database support" 1>&6
13740 echo "configure:13741: checking for database support" >&5
13741
13742 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13743   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13744 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13745 echo "configure:13746: checking for ndbm.h" >&5
13746
13747 cat > conftest.$ac_ext <<EOF
13748 #line 13749 "configure"
13749 #include "confdefs.h"
13750 #include <ndbm.h>
13751 EOF
13752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13753 { (eval echo configure:13754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13755 if test -z "$ac_err"; then
13756   rm -rf conftest*
13757   eval "ac_cv_header_$ac_safe=yes"
13758 else
13759   echo "$ac_err" >&5
13760   echo "configure: failed program was:" >&5
13761   cat conftest.$ac_ext >&5
13762   rm -rf conftest*
13763   eval "ac_cv_header_$ac_safe=no"
13764 fi
13765 rm -f conftest*
13766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13767   echo "$ac_t""yes" 1>&6
13768   :
13769 else
13770   echo "$ac_t""no" 1>&6
13771
13772     test "$with_database_gdbm" = "yes" -o \
13773          "$with_database_dbm"  = "yes" && \
13774       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13775     with_database_gdbm=no with_database_dbm=no
13776 fi
13777
13778 fi
13779
13780 if test "$with_database_gdbm" != "no"; then
13781   
13782 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13783 echo "configure:13784: checking for dbm_open in -lgdbm" >&5
13784 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13785
13786 xe_check_libs=" -lgdbm "
13787 cat > conftest.$ac_ext <<EOF
13788 #line 13789 "configure"
13789 #include "confdefs.h"
13790 /* Override any gcc2 internal prototype to avoid an error.  */
13791 /* We use char because int might match the return type of a gcc2
13792     builtin and then its argument prototype would still apply.  */
13793 char dbm_open();
13794
13795 int main() {
13796 dbm_open()
13797 ; return 0; }
13798 EOF
13799 if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13800   rm -rf conftest*
13801   eval "ac_cv_lib_$ac_lib_var=yes"
13802 else
13803   echo "configure: failed program was:" >&5
13804   cat conftest.$ac_ext >&5
13805   rm -rf conftest*
13806   eval "ac_cv_lib_$ac_lib_var=no"
13807 fi
13808 rm -f conftest*
13809 xe_check_libs=""
13810
13811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13812   echo "$ac_t""yes" 1>&6
13813   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13814 else
13815   echo "$ac_t""no" 1>&6
13816 if test "$with_database_gdbm" = "yes"; then
13817      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13818    fi
13819    with_database_gdbm=no
13820 fi
13821
13822
13823 fi
13824
13825 if test "$with_database_dbm" != "no"; then
13826   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13827 echo "configure:13828: checking for dbm_open" >&5
13828
13829 cat > conftest.$ac_ext <<EOF
13830 #line 13831 "configure"
13831 #include "confdefs.h"
13832 /* System header to define __stub macros and hopefully few prototypes,
13833     which can conflict with char dbm_open(); below.  */
13834 #include <assert.h>
13835 /* Override any gcc2 internal prototype to avoid an error.  */
13836 /* We use char because int might match the return type of a gcc2
13837     builtin and then its argument prototype would still apply.  */
13838 char dbm_open();
13839
13840 int main() {
13841
13842 /* The GNU C library defines this for functions which it implements
13843     to always fail with ENOSYS.  Some functions are actually named
13844     something starting with __ and the normal name is an alias.  */
13845 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13846 choke me
13847 #else
13848 dbm_open();
13849 #endif
13850
13851 ; return 0; }
13852 EOF
13853 if { (eval echo configure:13854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13854   rm -rf conftest*
13855   eval "ac_cv_func_dbm_open=yes"
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859   rm -rf conftest*
13860   eval "ac_cv_func_dbm_open=no"
13861 fi
13862 rm -f conftest*
13863
13864 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13865   echo "$ac_t""yes" 1>&6
13866   with_database_dbm=yes libdbm=
13867 else
13868   echo "$ac_t""no" 1>&6
13869
13870     
13871 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13872 echo "configure:13873: checking for dbm_open in -ldbm" >&5
13873 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13874
13875 xe_check_libs=" -ldbm "
13876 cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 /* Override any gcc2 internal prototype to avoid an error.  */
13880 /* We use char because int might match the return type of a gcc2
13881     builtin and then its argument prototype would still apply.  */
13882 char dbm_open();
13883
13884 int main() {
13885 dbm_open()
13886 ; return 0; }
13887 EOF
13888 if { (eval echo configure:13889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13889   rm -rf conftest*
13890   eval "ac_cv_lib_$ac_lib_var=yes"
13891 else
13892   echo "configure: failed program was:" >&5
13893   cat conftest.$ac_ext >&5
13894   rm -rf conftest*
13895   eval "ac_cv_lib_$ac_lib_var=no"
13896 fi
13897 rm -f conftest*
13898 xe_check_libs=""
13899
13900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13901   echo "$ac_t""yes" 1>&6
13902   with_database_dbm=yes libdbm=-ldbm
13903 else
13904   echo "$ac_t""no" 1>&6
13905 test "$with_database_dbm" = "yes" && \
13906         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13907       with_database_dbm=no
13908 fi
13909
13910
13911 fi
13912
13913 fi
13914
13915 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13916 test "$with_database_gdbm" = "yes" -o \
13917      "$with_database_dbm"  = "yes" && \
13918   { test "$extra_verbose" = "yes" && cat << \EOF
13919     Defining HAVE_DBM
13920 EOF
13921 cat >> confdefs.h <<\EOF
13922 #define HAVE_DBM 1
13923 EOF
13924 }
13925
13926
13927 if test "$with_database_berkdb" != "no"; then
13928   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13929 echo "configure:13930: checking for Berkeley db.h" >&5
13930   for header in "db/db.h" "db.h"; do
13931     cat > conftest.$ac_ext <<EOF
13932 #line 13933 "configure"
13933 #include "confdefs.h"
13934
13935 #include <stdlib.h>
13936 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13937 #ifdef HAVE_INTTYPES_H
13938 #define __BIT_TYPES_DEFINED__
13939 #include <inttypes.h>
13940 typedef uint8_t  u_int8_t;
13941 typedef uint16_t u_int16_t;
13942 typedef uint32_t u_int32_t;
13943 #ifdef WE_DONT_NEED_QUADS
13944 typedef uint64_t u_int64_t;
13945 #endif
13946 #endif
13947 #endif
13948 #include <$header>
13949
13950 int main() {
13951
13952 ; return 0; }
13953 EOF
13954 if { (eval echo configure:13955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13955   rm -rf conftest*
13956   db_h_file="$header"; break
13957 else
13958   echo "configure: failed program was:" >&5
13959   cat conftest.$ac_ext >&5
13960 fi
13961 rm -f conftest*
13962   done
13963   if test -z "$db_h_file"
13964   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13965   else echo "$ac_t""$db_h_file" 1>&6
13966   fi
13967
13968   if test "$with_database_berkdb" != "no"; then
13969     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13970 echo "configure:13971: checking for Berkeley DB version" >&5
13971     cat > conftest.$ac_ext <<EOF
13972 #line 13973 "configure"
13973 #include "confdefs.h"
13974 #include <$db_h_file>
13975 #if DB_VERSION_MAJOR > 1
13976 yes
13977 #endif
13978
13979 EOF
13980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13981   egrep "yes" >/dev/null 2>&1; then
13982   rm -rf conftest*
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 #include <$db_h_file>
13987 #if DB_VERSION_MAJOR > 2
13988 yes
13989 #endif
13990
13991 EOF
13992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13993   egrep "yes" >/dev/null 2>&1; then
13994   rm -rf conftest*
13995   echo "$ac_t""3" 1>&6; dbfunc=db_create
13996 else
13997   rm -rf conftest*
13998   
13999     echo "$ac_t""2" 1>&6; dbfunc=db_open
14000 fi
14001 rm -f conftest*
14002
14003 else
14004   rm -rf conftest*
14005   
14006     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14007 fi
14008 rm -f conftest*
14009
14010     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14011 echo "configure:14012: checking for $dbfunc" >&5
14012
14013 cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 /* System header to define __stub macros and hopefully few prototypes,
14017     which can conflict with char $dbfunc(); below.  */
14018 #include <assert.h>
14019 /* Override any gcc2 internal prototype to avoid an error.  */
14020 /* We use char because int might match the return type of a gcc2
14021     builtin and then its argument prototype would still apply.  */
14022 char $dbfunc();
14023
14024 int main() {
14025
14026 /* The GNU C library defines this for functions which it implements
14027     to always fail with ENOSYS.  Some functions are actually named
14028     something starting with __ and the normal name is an alias.  */
14029 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14030 choke me
14031 #else
14032 $dbfunc();
14033 #endif
14034
14035 ; return 0; }
14036 EOF
14037 if { (eval echo configure:14038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14038   rm -rf conftest*
14039   eval "ac_cv_func_$dbfunc=yes"
14040 else
14041   echo "configure: failed program was:" >&5
14042   cat conftest.$ac_ext >&5
14043   rm -rf conftest*
14044   eval "ac_cv_func_$dbfunc=no"
14045 fi
14046 rm -f conftest*
14047
14048 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14049   echo "$ac_t""yes" 1>&6
14050   with_database_berkdb=yes need_libdb=no
14051 else
14052   echo "$ac_t""no" 1>&6
14053
14054     
14055 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14056 echo "configure:14057: checking for $dbfunc in -ldb" >&5
14057 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14058
14059 xe_check_libs=" -ldb "
14060 cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 /* Override any gcc2 internal prototype to avoid an error.  */
14064 /* We use char because int might match the return type of a gcc2
14065     builtin and then its argument prototype would still apply.  */
14066 char $dbfunc();
14067
14068 int main() {
14069 $dbfunc()
14070 ; return 0; }
14071 EOF
14072 if { (eval echo configure:14073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14073   rm -rf conftest*
14074   eval "ac_cv_lib_$ac_lib_var=yes"
14075 else
14076   echo "configure: failed program was:" >&5
14077   cat conftest.$ac_ext >&5
14078   rm -rf conftest*
14079   eval "ac_cv_lib_$ac_lib_var=no"
14080 fi
14081 rm -f conftest*
14082 xe_check_libs=""
14083
14084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14085   echo "$ac_t""yes" 1>&6
14086   with_database_berkdb=yes need_libdb=yes
14087 else
14088   echo "$ac_t""no" 1>&6
14089 fi
14090
14091
14092 fi
14093
14094   fi
14095
14096   if test "$with_database_berkdb" = "yes"; then
14097     { test "$extra_verbose" = "yes" && cat << EOF
14098     Defining DB_H_FILE = "$db_h_file"
14099 EOF
14100 cat >> confdefs.h <<EOF
14101 #define DB_H_FILE "$db_h_file"
14102 EOF
14103 }
14104
14105     { test "$extra_verbose" = "yes" && cat << \EOF
14106     Defining HAVE_BERKELEY_DB
14107 EOF
14108 cat >> confdefs.h <<\EOF
14109 #define HAVE_BERKELEY_DB 1
14110 EOF
14111 }
14112
14113     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14114   else with_database_berkdb=no
14115   fi
14116 fi
14117
14118 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14119      != "no no no"; then
14120   { test "$extra_verbose" = "yes" && cat << \EOF
14121     Defining HAVE_DATABASE
14122 EOF
14123 cat >> confdefs.h <<\EOF
14124 #define HAVE_DATABASE 1
14125 EOF
14126 }
14127
14128   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14129    echo "    xemacs will be linked with \"database.o\""
14130  fi
14131 fi
14132
14133 if test "$with_socks" = "yes"; then
14134   
14135 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14136 echo "configure:14137: checking for SOCKSinit in -lsocks" >&5
14137 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14138
14139 xe_check_libs=" -lsocks "
14140 cat > conftest.$ac_ext <<EOF
14141 #line 14142 "configure"
14142 #include "confdefs.h"
14143 /* Override any gcc2 internal prototype to avoid an error.  */
14144 /* We use char because int might match the return type of a gcc2
14145     builtin and then its argument prototype would still apply.  */
14146 char SOCKSinit();
14147
14148 int main() {
14149 SOCKSinit()
14150 ; return 0; }
14151 EOF
14152 if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14153   rm -rf conftest*
14154   eval "ac_cv_lib_$ac_lib_var=yes"
14155 else
14156   echo "configure: failed program was:" >&5
14157   cat conftest.$ac_ext >&5
14158   rm -rf conftest*
14159   eval "ac_cv_lib_$ac_lib_var=no"
14160 fi
14161 rm -f conftest*
14162 xe_check_libs=""
14163
14164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14165   echo "$ac_t""yes" 1>&6
14166     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14168   { test "$extra_verbose" = "yes" && cat << EOF
14169     Defining $ac_tr_lib
14170 EOF
14171 cat >> confdefs.h <<EOF
14172 #define $ac_tr_lib 1
14173 EOF
14174 }
14175
14176   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14177
14178 else
14179   echo "$ac_t""no" 1>&6
14180 fi
14181
14182
14183   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14184     Defining HAVE_SOCKS
14185 EOF
14186 cat >> confdefs.h <<\EOF
14187 #define HAVE_SOCKS 1
14188 EOF
14189 }
14190
14191 fi
14192
14193 if test "$usage_tracking" = "yes"; then
14194   { test "$extra_verbose" = "yes" && cat << \EOF
14195     Defining USAGE_TRACKING
14196 EOF
14197 cat >> confdefs.h <<\EOF
14198 #define USAGE_TRACKING 1
14199 EOF
14200 }
14201
14202   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14203 fi
14204
14205 if test "$with_modules" != "no"; then
14206   echo "checking for module support" 1>&6
14207 echo "configure:14208: checking for module support" >&5
14208
14209     if test "$with_msw" = "yes"; then
14210     have_dl=yes;
14211   else
14212         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14213 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14214 echo "configure:14215: checking for dlfcn.h" >&5
14215
14216 cat > conftest.$ac_ext <<EOF
14217 #line 14218 "configure"
14218 #include "confdefs.h"
14219 #include <dlfcn.h>
14220 EOF
14221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14222 { (eval echo configure:14223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14224 if test -z "$ac_err"; then
14225   rm -rf conftest*
14226   eval "ac_cv_header_$ac_safe=yes"
14227 else
14228   echo "$ac_err" >&5
14229   echo "configure: failed program was:" >&5
14230   cat conftest.$ac_ext >&5
14231   rm -rf conftest*
14232   eval "ac_cv_header_$ac_safe=no"
14233 fi
14234 rm -f conftest*
14235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14236   echo "$ac_t""yes" 1>&6
14237   
14238       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14239 echo "configure:14240: checking for dlopen in -lc" >&5
14240       cat > conftest.$ac_ext <<EOF
14241 #line 14242 "configure"
14242 #include "confdefs.h"
14243 #include <dlfcn.h>
14244 int main() {
14245         dlopen ("", 0);
14246 ; return 0; }
14247 EOF
14248 if { (eval echo configure:14249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14249   rm -rf conftest*
14250    have_dl=yes 
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   
14256       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14257 echo "configure:14258: checking for dlopen in -ldl" >&5
14258       ac_save_LIBS="$LIBS"
14259       LIBS="-ldl $LIBS"
14260       cat > conftest.$ac_ext <<EOF
14261 #line 14262 "configure"
14262 #include "confdefs.h"
14263 #include <dlfcn.h>
14264 int main() {
14265         dlopen ("", 0);
14266 ; return 0; }
14267 EOF
14268 if { (eval echo configure:14269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14269   rm -rf conftest*
14270    have_dl=yes 
14271 else
14272   echo "configure: failed program was:" >&5
14273   cat conftest.$ac_ext >&5
14274   rm -rf conftest*
14275   LIBS="$ac_save_LIBS"
14276 fi
14277 rm -f conftest*
14278       ac_save_LIBS=
14279 fi
14280 rm -f conftest*
14281 else
14282   echo "$ac_t""no" 1>&6
14283 fi
14284
14285     if test -n "$have_dl"; then
14286       { test "$extra_verbose" = "yes" && cat << \EOF
14287     Defining HAVE_DLOPEN
14288 EOF
14289 cat >> confdefs.h <<\EOF
14290 #define HAVE_DLOPEN 1
14291 EOF
14292 }
14293
14294     else
14295       
14296 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14297 echo "configure:14298: checking for shl_load in -ldld" >&5
14298 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14299
14300 xe_check_libs=" -ldld "
14301 cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304 /* Override any gcc2 internal prototype to avoid an error.  */
14305 /* We use char because int might match the return type of a gcc2
14306     builtin and then its argument prototype would still apply.  */
14307 char shl_load();
14308
14309 int main() {
14310 shl_load()
14311 ; return 0; }
14312 EOF
14313 if { (eval echo configure:14314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14314   rm -rf conftest*
14315   eval "ac_cv_lib_$ac_lib_var=yes"
14316 else
14317   echo "configure: failed program was:" >&5
14318   cat conftest.$ac_ext >&5
14319   rm -rf conftest*
14320   eval "ac_cv_lib_$ac_lib_var=no"
14321 fi
14322 rm -f conftest*
14323 xe_check_libs=""
14324
14325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14326   echo "$ac_t""yes" 1>&6
14327   libdl=dld have_dl=yes;
14328         { test "$extra_verbose" = "yes" && cat << \EOF
14329     Defining HAVE_SHL_LOAD
14330 EOF
14331 cat >> confdefs.h <<\EOF
14332 #define HAVE_SHL_LOAD 1
14333 EOF
14334 }
14335
14336 else
14337   echo "$ac_t""no" 1>&6
14338
14339 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14340 echo "configure:14341: checking for dld_init in -ldld" >&5
14341 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14342
14343 xe_check_libs=" -ldld "
14344 cat > conftest.$ac_ext <<EOF
14345 #line 14346 "configure"
14346 #include "confdefs.h"
14347 /* Override any gcc2 internal prototype to avoid an error.  */
14348 /* We use char because int might match the return type of a gcc2
14349     builtin and then its argument prototype would still apply.  */
14350 char dld_init();
14351
14352 int main() {
14353 dld_init()
14354 ; return 0; }
14355 EOF
14356 if { (eval echo configure:14357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14357   rm -rf conftest*
14358   eval "ac_cv_lib_$ac_lib_var=yes"
14359 else
14360   echo "configure: failed program was:" >&5
14361   cat conftest.$ac_ext >&5
14362   rm -rf conftest*
14363   eval "ac_cv_lib_$ac_lib_var=no"
14364 fi
14365 rm -f conftest*
14366 xe_check_libs=""
14367
14368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14369   echo "$ac_t""yes" 1>&6
14370   libdl=dld have_dl=yes;
14371         { test "$extra_verbose" = "yes" && cat << \EOF
14372     Defining HAVE_DLD_INIT
14373 EOF
14374 cat >> confdefs.h <<\EOF
14375 #define HAVE_DLD_INIT 1
14376 EOF
14377 }
14378
14379 else
14380   echo "$ac_t""no" 1>&6
14381 fi
14382
14383
14384 fi
14385
14386
14387     fi
14388   fi 
14389   if test -n "$have_dl"; then
14390         
14391 dll_ld=
14392 dll_ldflags=
14393 dll_cflags=
14394 dll_post=
14395 dll_ldo="-o"
14396 ld_dynamic_link_flags=
14397 xehost=$canonical
14398 xealias=$internal_configuration
14399
14400 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14401 echo "configure:14402: checking how to build dynamic libraries for ${xehost}" >&5
14402 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14403 case "$xehost" in
14404 *-*-linux-gnu*) ;;
14405 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14406 esac
14407
14408 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14409 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14410 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14411
14412 case "$xehost_os" in
14413 aix3*)
14414   # AIX sometimes has problems with the GCC collect2 program.  For some
14415   # reason, if we set the COLLECT_NAMES environment variable, the problems
14416   # vanish in a puff of smoke.
14417   if test "${COLLECT_NAMES+set}" != set; then
14418     COLLECT_NAMES=
14419     export COLLECT_NAMES
14420   fi
14421   ;;
14422 esac
14423
14424 # Now see if the compiler is really GCC.
14425 if test "$GCC" = "yes"; then
14426   XEGCC=yes
14427 else
14428   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14429 echo "configure:14430: checking checking whether we are using GNU C" >&5
14430   cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433
14434 #ifdef __GNUC__
14435   yes;
14436 #endif
14437
14438 EOF
14439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14440   egrep "yes" >/dev/null 2>&1; then
14441   rm -rf conftest*
14442   XEGCC=yes
14443 else
14444   rm -rf conftest*
14445   XEGCC=no
14446 fi
14447 rm -f conftest*
14448
14449   echo "$ac_t""${XEGCC}" 1>&6
14450 fi
14451
14452 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14453 echo "configure:14454: checking how to produce PIC code" >&5
14454 wl=
14455
14456 can_build_shared=yes
14457 if test "$XEGCC" = yes; then
14458   wl='-Wl,'
14459
14460   case "$xehost_os" in
14461   aix[3-9]* | irix[5-9]* | osf[3-9])
14462     # PIC is the default for these OSes.
14463     ;;
14464
14465   os2*)
14466     # We can build DLLs from non-PIC.
14467     ;;
14468   amigaos*)
14469     # FIXME: we need at least 68020 code to build shared libraries, but
14470     # adding the `-m68020' flag to GCC prevents building anything better,
14471     # like `-m68040'.
14472     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14473     ;;
14474   *cygwin* | *mingw* )
14475     # PIC is the default
14476     ;;
14477   *)
14478     dll_cflags='-fPIC'
14479     ;;
14480   esac
14481 else
14482   # PORTME Check for PIC flags for the system compiler.
14483   case "$xehost_os" in
14484   hpux9* | hpux1[0-9]*)
14485     # Is there a better link_static_flag that works with the bundled CC?
14486     wl='-Wl,'
14487     dll_cflags='+Z'
14488     ;;
14489
14490   irix[5-9]*)
14491     wl='-Wl,'
14492     # PIC (with -KPIC) is the default.
14493     ;;
14494
14495   os2*)
14496     # We can build DLLs from non-PIC.
14497     ;;
14498
14499   osf[3-9]*)
14500     # All OSF/1 code is PIC.
14501     wl='-Wl,'
14502     ;;
14503
14504   aix[3-9]*)
14505     # All AIX code is PIC.
14506     wl='-Wl,'
14507     ;;
14508
14509   sco3.2v5*)
14510     dll_cflags='-belf -Kpic'
14511     wl='-Wl,'
14512     ;;
14513
14514   unixware*)
14515     dll_cflags="-KPIC"
14516     wl="-Wl,"
14517     ;;
14518
14519   sysv4*)
14520     dll_cflags="-KPIC"
14521     wl="-Wl,"
14522     ;;
14523
14524   sysv5*)
14525     dll_cflags="-KPIC"
14526     wl="-Wl,"
14527     ;;
14528
14529   solaris2*)
14530     dll_cflags='-KPIC'
14531     wl='-Wl,'
14532     ;;
14533
14534   sunos4*)
14535     dll_cflags='-PIC'
14536     wl='-Qoption ld '
14537     ;;
14538
14539   uts4*)
14540     dll_cflags='-pic'
14541     ;;
14542
14543   *)
14544     can_build_shared=no
14545     ;;
14546   esac
14547 fi
14548
14549 if test -n "$dll_cflags"; then
14550   echo "$ac_t""${dll_cflags}" 1>&6
14551
14552   # Check to make sure the dll_cflags actually works.
14553   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14554 echo "configure:14555: checking if PIC flag ${dll_cflags} really works" >&5
14555   save_CFLAGS="$CFLAGS"
14556   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14557   cat > conftest.$ac_ext <<EOF
14558 #line 14559 "configure"
14559 #include "confdefs.h"
14560
14561 int main() {
14562 int x=0;
14563 ; return 0; }
14564 EOF
14565 if { (eval echo configure:14566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14566   rm -rf conftest*
14567   
14568     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14569     # reports no error.  So, we need to grep stderr for (Bundled).
14570     if grep '(Bundled)' config.log >/dev/null; then
14571       echo "$ac_t""no" 1>&6
14572       can_build_shared=no
14573       dll_cflags=
14574     else
14575       echo "$ac_t""yes" 1>&6
14576     fi
14577 else
14578   echo "configure: failed program was:" >&5
14579   cat conftest.$ac_ext >&5
14580   rm -rf conftest*
14581   echo "$ac_t""no" 1>&6
14582     can_build_shared=no
14583     dll_cflags=
14584 fi
14585 rm -f conftest*
14586   CFLAGS="$save_CFLAGS"
14587 else
14588   echo "$ac_t""none" 1>&6
14589 fi
14590
14591 if test "$can_build_shared" = "yes"; then
14592 cc_produces_so=no
14593 xldf=
14594 xcldf=
14595 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14596 echo "configure:14597: checking if C compiler can produce shared libraries" >&5
14597 if test "$XEGCC" = yes; then
14598   xcldf="-shared"
14599   xldf="-shared"
14600 else # Not using GCC
14601   case "$xehost_os" in
14602     aix[3-9]*)
14603       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14604       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14605       ;;
14606
14607     freebsd2* | netbsd* | openbsd*)
14608       xldf="-Bshareable"
14609       xcldf="${wl}-Bshareable"
14610       ;;
14611
14612     freebsd3*)
14613       xcldf="-shared"
14614       ;;
14615
14616     hpux*)
14617       xldf="-b +s"
14618       xcldf="${wl}-b ${wl}+s"
14619       ;;
14620
14621     irix[5-9]* | osf[3-9]*)
14622       xcldf="${wl}-shared"
14623       xldf="-shared"
14624       ;;
14625
14626     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14627       xcldf="-G"
14628       xldf="-G"
14629       ;;
14630
14631     sunos4*)
14632       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14633       xldf="-assert pure-text -Bstatic"
14634       ;;
14635   esac
14636 fi # End if if we are using gcc
14637
14638 if test -n "$xcldf"; then
14639   save_LDFLAGS=$LDFLAGS
14640   save_LIBS=$LIBS
14641   save_xe_libs=$xe_libs
14642   LDFLAGS="$xcldf $LDFLAGS"
14643   LIBS=
14644   xe_libs=
14645   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14646   cat > conftest.$ac_ext <<EOF
14647 #line 14648 "configure"
14648 #include "confdefs.h"
14649
14650 int main() {
14651 int x=0;
14652 ; return 0; }
14653 EOF
14654 if { (eval echo configure:14655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14655   rm -rf conftest*
14656   cc_produces_so=yes
14657 else
14658   echo "configure: failed program was:" >&5
14659   cat conftest.$ac_ext >&5
14660   rm -rf conftest*
14661   cc_produces_so=no
14662 fi
14663 rm -f conftest*
14664   LDFLAGS=$save_LDFLAGS
14665   LIBS=$save_LIBS
14666   xe_libs=$save_xe_libs
14667   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14668 else
14669   cc_produces_so=no
14670 fi
14671 echo "$ac_t""${cc_produces_so}" 1>&6
14672
14673 LTLD=$LD
14674 if test -z "$LTLD"; then
14675   ac_prog=ld
14676   if test "$XEGCC" = yes; then
14677     # Check if gcc -print-prog-name=ld gives a path.
14678     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14679 echo "configure:14680: checking for ld used by GCC" >&5
14680     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14681     case "$ac_prog" in
14682     # Accept absolute paths.
14683     /*)
14684       if test -z "$LTLD"; then
14685 #        case "$ac_prog" in
14686 #          *gcc-lib*) LTLD="$CC"
14687 #                     ;;
14688 #          *)
14689          LTLD="$ac_prog"
14690 #                     ;;
14691 #        esac
14692       fi
14693       ;;
14694     "")
14695       # If it fails, then pretend we aren't using GCC.
14696       ac_prog=ld
14697       ;;
14698     *)
14699       # If it is relative, then search for the first ld in PATH.
14700       with_gnu_ld=unknown
14701       ;;
14702     esac
14703   else
14704     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14705 echo "configure:14706: checking for GNU ld" >&5
14706   fi
14707
14708   if test -z "$LTLD"; then
14709     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14710     for ac_dir in $PATH; do
14711       test -z "$ac_dir" && ac_dir=.
14712       if test -f "$ac_dir/$ac_prog"; then
14713         LTLD="$ac_dir/$ac_prog"
14714         # Check to see if the program is GNU ld.  I'd rather use --version,
14715         # but apparently some GNU ld's only accept -v.
14716         # Break only if it was the GNU/non-GNU ld that we prefer.
14717         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14718           xe_gnu_ld=yes
14719         else
14720           xe_gnu_ld=no
14721         fi
14722       fi
14723     done
14724     IFS="$ac_save_ifs"
14725   fi
14726
14727   if test -n "$LTLD"; then
14728     echo "$ac_t""${LTLD}" 1>&6
14729   else
14730     echo "$ac_t""no" 1>&6
14731   fi
14732
14733   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14734     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14735     exit 1
14736   fi
14737 fi
14738
14739 ld_dynamic_link_flags=
14740
14741 # Check to see if it really is or isn't GNU ld.
14742 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14743 echo "configure:14744: checking if the linker is GNU ld" >&5
14744 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14745 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14746   xe_gnu_ld=yes
14747 else
14748   xe_gnu_ld=no
14749 fi
14750 echo "$ac_t""${xe_gnu_ld}" 1>&6
14751
14752 case "$xehost_os" in
14753   amigaos* | sunos4*)
14754     # On these operating systems, we should treat GNU ld like the system ld.
14755     gnu_ld_acts_native=yes
14756     ;;
14757   *)
14758     gnu_ld_acts_native=no
14759     ;;
14760 esac
14761
14762 if test "$cc_produces_so" = "yes"; then
14763   dll_ld=$CC
14764   dll_ldflags=$xcldf
14765   can_build_shared=yes
14766   ld_shlibs=yes
14767 else
14768   # OK - only NOW do we futz about with ld.
14769   # See if the linker supports building shared libraries.
14770   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14771 echo "configure:14772: checking whether the linker supports shared libraries" >&5
14772   dll_ld=$CC
14773   dll_ldflags=$LDFLAGS
14774   ld_shlibs=yes
14775   can_build_shared=yes
14776   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14777     # See if GNU ld supports shared libraries.
14778     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14779       dll_ld=$CC
14780       dll_ldflags="-shared"
14781       ld_shlibs=yes
14782     else
14783       ld_shlibs=no
14784     fi
14785   else
14786     # PORTME fill in a description of your system's linker (not GNU ld)
14787     case "$xehost_os" in
14788     aix3*)
14789       dll_ld=$LTLD
14790       dll_ldflags=$xldf
14791       ;;
14792
14793     aix[4-9]*)
14794       dll_ldflags=$xcldf
14795       ;;
14796
14797     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14798     # support.  Future versions do this automatically, but an explicit c++rt0.o
14799     # doesn't break anything, and helps significantly (at the cost of a little
14800     # extra space).
14801     freebsd2.2*)
14802       dll_ld=$LTLD
14803       dll_ldflags=$xldf
14804       dll_post="/usr/lib/c++rt0.o"
14805       ;;
14806
14807     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14808     freebsd2*)
14809       dll_ld=$LTLD
14810       dll_ldflags="-Bshareable"
14811       ;;
14812
14813     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14814     freebsd3*)
14815       dll_ldflags="-shared"
14816       ;;
14817
14818     hpux*)
14819       dll_ld=$LTLD
14820       dll_ldflags=$xldf
14821       ;;
14822
14823     irix[5-9]*)
14824       dll_ld=$LTLD
14825       dll_ldflags=$xldf
14826       ;;
14827
14828     netbsd*)
14829       # Tested with NetBSD 1.2 ld
14830       dll_ld=$LTLD
14831       dll_ldflags=$xldf
14832       ;;
14833
14834     openbsd*)
14835       dll_ld=$LTLD
14836       dll_ldflags=$xldf
14837       ;;
14838
14839     osf3* | osf4*)
14840       dll_ld=$LTLD
14841       dll_ldflags=$xldf
14842       ;;
14843
14844     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14845     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14846       dll_ld=$LTLD
14847       case "$dll_ld" in
14848         *gcc*) dll_ldflags="-shared"
14849                dll_ld=$CC
14850                ;;
14851         *)     dll_ldflags="-G"
14852                ;;
14853       esac
14854       ;;
14855
14856     sunos4*)
14857       if test "$XEGCC" = yes; then
14858         dll_ld=$CC
14859       else
14860         dll_ld=$LTLD
14861       fi
14862       dll_ldflags=$xldf
14863       ;;
14864
14865     uts4*)
14866       dll_ld=$LTLD
14867       dll_ldflags="-G"
14868       ;;
14869
14870     bsdi*)
14871       dll_ldflags="-r"
14872       dll_ld="shlicc2"
14873       ;;
14874
14875     *)
14876       ld_shlibs=no
14877       can_build_shared=no
14878       ;;
14879     esac
14880   fi
14881   echo "$ac_t""${ld_shlibs}" 1>&6
14882   if test "$ld_shlibs" = "no"; then
14883     can_build_shared=no
14884   fi
14885 fi # End of if cc_produces_so = no
14886
14887
14888 if test "$xe_gnu_ld" = yes; then
14889   if test "$ld_shlibs" = yes; then
14890     ld_dynamic_link_flags="${wl}-export-dynamic"
14891   fi
14892 fi
14893
14894 if test -z "$ld_dynamic_link_flags"; then
14895   case "$xehost_os" in
14896   aix[3-9]*)
14897     ld_dynamic_link_flags=
14898     ;;
14899
14900   freebsd2.2*)
14901     ld_dynamic_link_flags=
14902     ;;
14903
14904   freebsd2*)
14905     ld_dynamic_link_flags=
14906     ;;
14907
14908   freebsd3*)
14909     ld_dynamic_link_flags=
14910     ;;
14911
14912   hpux*)
14913     ld_dynamic_link_flags="${wl}-E"
14914     ;;
14915
14916   irix[5-9]*)
14917     ld_dynamic_link_flags=
14918     ;;
14919
14920   netbsd*)
14921     ld_dynamic_link_flags=
14922     ;;
14923
14924   openbsd*)
14925     ld_dynamic_link_flags=
14926     ;;
14927
14928   osf3* | osf4*)
14929     ld_dynamic_link_flags=
14930     ;;
14931
14932   solaris2* | solaris7*)
14933     ld_dynamic_link_flags=
14934     ;;
14935
14936   sco3.2v5* | unixware* | sysv5* | sysv4*)
14937     ld_dynamic_link_flags="${wl}-Bexport"
14938     ;;
14939
14940   sunos4*)
14941     ld_dynamic_link_flags=
14942     ;;
14943
14944   uts4*)
14945     ld_dynamic_link_flags=
14946     ;;
14947
14948   bsdi*)
14949     ld_dynamic_link_flags=
14950     ;;
14951
14952   esac
14953 fi # End of if -z ld_dynamic_link_flags
14954 fi # End of if test "$can_build_shared" = "yes"
14955
14956
14957
14958
14959
14960
14961
14962
14963   fi
14964
14965   if test "$can_build_shared" = "yes"; then
14966     { test "$extra_verbose" = "yes" && cat << \EOF
14967     Defining HAVE_SHLIB
14968 EOF
14969 cat >> confdefs.h <<\EOF
14970 #define HAVE_SHLIB 1
14971 EOF
14972 }
14973
14974     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14975    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14976  fi
14977     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14978     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14979     for ac_func in dlerror _dlerror
14980 do
14981 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14982 echo "configure:14983: checking for $ac_func" >&5
14983
14984 cat > conftest.$ac_ext <<EOF
14985 #line 14986 "configure"
14986 #include "confdefs.h"
14987 /* System header to define __stub macros and hopefully few prototypes,
14988     which can conflict with char $ac_func(); below.  */
14989 #include <assert.h>
14990 /* Override any gcc2 internal prototype to avoid an error.  */
14991 /* We use char because int might match the return type of a gcc2
14992     builtin and then its argument prototype would still apply.  */
14993 char $ac_func();
14994
14995 int main() {
14996
14997 /* The GNU C library defines this for functions which it implements
14998     to always fail with ENOSYS.  Some functions are actually named
14999     something starting with __ and the normal name is an alias.  */
15000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15001 choke me
15002 #else
15003 $ac_func();
15004 #endif
15005
15006 ; return 0; }
15007 EOF
15008 if { (eval echo configure:15009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15009   rm -rf conftest*
15010   eval "ac_cv_func_$ac_func=yes"
15011 else
15012   echo "configure: failed program was:" >&5
15013   cat conftest.$ac_ext >&5
15014   rm -rf conftest*
15015   eval "ac_cv_func_$ac_func=no"
15016 fi
15017 rm -f conftest*
15018
15019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15020   echo "$ac_t""yes" 1>&6
15021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15022   { test "$extra_verbose" = "yes" && cat << EOF
15023     Defining $ac_tr_func
15024 EOF
15025 cat >> confdefs.h <<EOF
15026 #define $ac_tr_func 1
15027 EOF
15028 }
15029  
15030 else
15031   echo "$ac_t""no" 1>&6
15032 fi
15033 done
15034
15035     with_modules=yes
15036   else
15037     if test "$with_modules" = "yes"; then
15038       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15039     else
15040       echo "configure: warning: "Module support cannot be provided."" 1>&2
15041     fi
15042     with_modules=no
15043   fi
15044 fi
15045
15046 cat > conftest.$ac_ext <<EOF
15047 #line 15048 "configure"
15048 #include "confdefs.h"
15049 int main(int c,char *v[]){return 0;}
15050 EOF
15051 if { (eval echo configure:15052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15052 then
15053   :
15054 else
15055   conftest_rc="$?"
15056   echo "configure: failed program was:" >&5
15057   cat conftest.$ac_ext >&5
15058   rm -fr conftest*
15059   
15060   echo ""
15061   echo "*** PANIC *** The C compiler can no longer build working executables."
15062   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15063   echo "*** PANIC *** The most likely reason for this problem is that configure"
15064   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15065   echo "*** PANIC *** found at run time."
15066   echo "*** PANIC ***"
15067   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15068   echo "*** PANIC *** On other systems, try telling configure where to find the"
15069   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15070   echo "*** PANIC ***"
15071   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15072   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15073   echo "*** PANIC *** on your system.  Don't do that."
15074   exit 1
15075 fi
15076 rm -fr conftest*
15077
15078 if test "$win32_processes" = "yes"; then
15079   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15080    echo "    xemacs will be linked with \"process-nt.o\""
15081  fi
15082 else
15083   { test "$extra_verbose" = "yes" && cat << \EOF
15084     Defining HAVE_UNIX_PROCESSES
15085 EOF
15086 cat >> confdefs.h <<\EOF
15087 #define HAVE_UNIX_PROCESSES 1
15088 EOF
15089 }
15090
15091   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15092    echo "    xemacs will be linked with \"process-unix.o\""
15093  fi
15094 fi
15095
15096
15097
15098 T=""
15099 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15100 CFLAGS="$T"
15101
15102
15103 T=""
15104 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15105 extra_objs="$T"
15106
15107
15108 T=""
15109 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
15110 c_switch_general="$T"
15111
15112
15113 T=""
15114 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
15115 c_switch_window_system="$T"
15116
15117
15118 T=""
15119 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15120 c_switch_all="$T"
15121
15122
15123 T=""
15124 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
15125 ld_switch_general="$T"
15126
15127
15128 T=""
15129 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15130 ld_switch_window_system="$T"
15131
15132
15133 T=""
15134 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15135 ld_switch_all="$T"
15136
15137
15138 T=""
15139 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15140 ld_libs_general="$T"
15141
15142
15143 T=""
15144 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
15145 ld_libs_window_system="$T"
15146
15147
15148 T=""
15149 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15150 ld_libs_all="$T"
15151
15152
15153
15154 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15155 internal_makefile_list="Makefile.in"
15156 SUBDIR_MAKEFILES=''
15157 test -d lock || mkdir lock
15158 for dir in $MAKE_SUBDIR; do
15159   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15160         test -d "$d" || mkdir "$d"; cd "$d"
15161       done ) ;;
15162    * ) test -d "$dir" || mkdir "$dir" ;;
15163   esac
15164   
15165 T=""
15166 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15167 SUBDIR_MAKEFILES="$T"
15168
15169   
15170 T=""
15171 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15172 internal_makefile_list="$T"
15173
15174 done
15175
15176
15177
15178
15179 for dir in src/s src/m; do
15180   if test ! -d "$dir" ; then
15181     echo Making symbolic link to "$srcdir/$dir"
15182     ${LN_S} "$srcdir/$dir" "$dir"
15183   fi
15184 done
15185
15186 if test "$extra_verbose" = "yes"; then
15187   echo ""
15188   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
15189   echo ""
15190 fi
15191
15192
15193 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15194   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15195   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15196 fi
15197
15198 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15199   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15200   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15201 fi
15202
15203 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15204   test "$extra_verbose" = "yes" && echo "creating TAGS"
15205   echo "\f
15206 $srcdir/TAGS,include" > "TAGS"
15207 fi
15208
15209 if test "$__SUNPRO_C" = "yes"; then
15210   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15211   ( echo "# For use with Sun WorkShop's Source browser."
15212     echo "# See sbquery(1) and sbinit(4) for more information"
15213     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15214   ) > .sbinit
15215 fi
15216
15217 rm -f core
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238 PREFIX=$prefix
15239 while true; do
15240   case "$PREFIX" in
15241     *\$* ) eval "PREFIX=$PREFIX" ;;
15242     *) break ;;
15243   esac
15244 done
15245
15246
15247
15248
15249 EXEC_PREFIX=$exec_prefix
15250 while true; do
15251   case "$EXEC_PREFIX" in
15252     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15253     *) break ;;
15254   esac
15255 done
15256
15257
15258
15259
15260 INFODIR=$infodir
15261 while true; do
15262   case "$INFODIR" in
15263     *\$* ) eval "INFODIR=$INFODIR" ;;
15264     *) break ;;
15265   esac
15266 done
15267
15268
15269
15270
15271 INFOPATH=$infopath
15272 while true; do
15273   case "$INFOPATH" in
15274     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15275     *) break ;;
15276   esac
15277 done
15278
15279
15280
15281
15282 PACKAGE_PATH=$package_path
15283 while true; do
15284   case "$PACKAGE_PATH" in
15285     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15286     *) break ;;
15287   esac
15288 done
15289
15290
15291
15292
15293 LISPDIR=$lispdir
15294 while true; do
15295   case "$LISPDIR" in
15296     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15297     *) break ;;
15298   esac
15299 done
15300
15301
15302
15303
15304 MODULEDIR=$moduledir
15305 while true; do
15306   case "$MODULEDIR" in
15307     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15308     *) break ;;
15309   esac
15310 done
15311
15312
15313
15314
15315 SITELISPDIR=$sitelispdir
15316 while true; do
15317   case "$SITELISPDIR" in
15318     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15319     *) break ;;
15320   esac
15321 done
15322
15323
15324
15325
15326 SITEMODULEDIR=$sitemoduledir
15327 while true; do
15328   case "$SITEMODULEDIR" in
15329     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15330     *) break ;;
15331   esac
15332 done
15333
15334
15335
15336
15337 ETCDIR=$etcdir
15338 while true; do
15339   case "$ETCDIR" in
15340     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15341     *) break ;;
15342   esac
15343 done
15344
15345
15346
15347
15348 DOCDIR=$docdir
15349 while true; do
15350   case "$DOCDIR" in
15351     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15352     *) break ;;
15353   esac
15354 done
15355
15356
15357
15358
15359 ARCHLIBDIR=$archlibdir
15360 while true; do
15361   case "$ARCHLIBDIR" in
15362     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15363     *) break ;;
15364   esac
15365 done
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15387
15388
15389
15390
15391
15392
15393
15394 : ${XEMACS_CC:=$CC}
15395
15396
15397 if test "$with_prefix" = "yes"; then
15398   { test "$extra_verbose" = "yes" && cat << \EOF
15399     Defining PREFIX_USER_DEFINED
15400 EOF
15401 cat >> confdefs.h <<\EOF
15402 #define PREFIX_USER_DEFINED 1
15403 EOF
15404 }
15405
15406 fi
15407
15408 if test "$with_site_lisp" = "no"; then
15409   { test "$extra_verbose" = "yes" && cat << \EOF
15410     Defining INHIBIT_SITE_LISP
15411 EOF
15412 cat >> confdefs.h <<\EOF
15413 #define INHIBIT_SITE_LISP 1
15414 EOF
15415 }
15416
15417 fi
15418 if test "$with_site_modules" = "no"; then
15419   { test "$extra_verbose" = "yes" && cat << \EOF
15420     Defining INHIBIT_SITE_MODULES
15421 EOF
15422 cat >> confdefs.h <<\EOF
15423 #define INHIBIT_SITE_MODULES 1
15424 EOF
15425 }
15426
15427 fi
15428
15429
15430 T=""
15431 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15432 ac_configure_args="$T"
15433
15434 { test "$extra_verbose" = "yes" && cat << EOF
15435     Defining EMACS_CONFIGURATION = "$configuration"
15436 EOF
15437 cat >> confdefs.h <<EOF
15438 #define EMACS_CONFIGURATION "$configuration"
15439 EOF
15440 }
15441
15442 { test "$extra_verbose" = "yes" && cat << EOF
15443     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15444 EOF
15445 cat >> confdefs.h <<EOF
15446 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15447 EOF
15448 }
15449
15450
15451
15452 null_string=""
15453 { test "$extra_verbose" = "yes" && cat << EOF
15454     Defining LD_SWITCH_X_SITE = $null_string
15455 EOF
15456 cat >> confdefs.h <<EOF
15457 #define LD_SWITCH_X_SITE $null_string
15458 EOF
15459 }
15460
15461 { test "$extra_verbose" = "yes" && cat << EOF
15462     Defining LD_SWITCH_X_SITE_AUX = $null_string
15463 EOF
15464 cat >> confdefs.h <<EOF
15465 #define LD_SWITCH_X_SITE_AUX $null_string
15466 EOF
15467 }
15468
15469 { test "$extra_verbose" = "yes" && cat << EOF
15470     Defining C_SWITCH_X_SITE = $null_string
15471 EOF
15472 cat >> confdefs.h <<EOF
15473 #define C_SWITCH_X_SITE $null_string
15474 EOF
15475 }
15476
15477 { test "$extra_verbose" = "yes" && cat << EOF
15478     Defining LD_SWITCH_SITE = $null_string
15479 EOF
15480 cat >> confdefs.h <<EOF
15481 #define LD_SWITCH_SITE $null_string
15482 EOF
15483 }
15484
15485 { test "$extra_verbose" = "yes" && cat << EOF
15486     Defining C_SWITCH_SITE = $null_string
15487 EOF
15488 cat >> confdefs.h <<EOF
15489 #define C_SWITCH_SITE $null_string
15490 EOF
15491 }
15492
15493
15494
15495 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15496     Defining GNU_MALLOC
15497 EOF
15498 cat >> confdefs.h <<\EOF
15499 #define GNU_MALLOC 1
15500 EOF
15501 }
15502
15503 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15504     Defining USE_SYSTEM_MALLOC
15505 EOF
15506 cat >> confdefs.h <<\EOF
15507 #define USE_SYSTEM_MALLOC 1
15508 EOF
15509 }
15510
15511 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15512     Defining USE_DEBUG_MALLOC
15513 EOF
15514 cat >> confdefs.h <<\EOF
15515 #define USE_DEBUG_MALLOC 1
15516 EOF
15517 }
15518
15519                                               { test "$extra_verbose" = "yes" && cat << \EOF
15520     Defining USE_SYSTEM_MALLOC
15521 EOF
15522 cat >> confdefs.h <<\EOF
15523 #define USE_SYSTEM_MALLOC 1
15524 EOF
15525 }
15526
15527 fi
15528 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15529     Defining I18N3
15530 EOF
15531 cat >> confdefs.h <<\EOF
15532 #define I18N3 1
15533 EOF
15534 }
15535
15536 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15537     Defining USE_GCC
15538 EOF
15539 cat >> confdefs.h <<\EOF
15540 #define USE_GCC 1
15541 EOF
15542 }
15543
15544 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15545     Defining EXTERNAL_WIDGET
15546 EOF
15547 cat >> confdefs.h <<\EOF
15548 #define EXTERNAL_WIDGET 1
15549 EOF
15550 }
15551
15552 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15553     Defining QUICK_BUILD
15554 EOF
15555 cat >> confdefs.h <<\EOF
15556 #define QUICK_BUILD 1
15557 EOF
15558 }
15559
15560 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15561     Defining PURIFY
15562 EOF
15563 cat >> confdefs.h <<\EOF
15564 #define PURIFY 1
15565 EOF
15566 }
15567
15568 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15569     Defining QUANTIFY
15570 EOF
15571 cat >> confdefs.h <<\EOF
15572 #define QUANTIFY 1
15573 EOF
15574 }
15575
15576 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15577     Defining MAIL_USE_POP
15578 EOF
15579 cat >> confdefs.h <<\EOF
15580 #define MAIL_USE_POP 1
15581 EOF
15582 }
15583
15584 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15585     Defining KERBEROS
15586 EOF
15587 cat >> confdefs.h <<\EOF
15588 #define KERBEROS 1
15589 EOF
15590 }
15591
15592 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15593     Defining HESIOD
15594 EOF
15595 cat >> confdefs.h <<\EOF
15596 #define HESIOD 1
15597 EOF
15598 }
15599
15600 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15601     Defining USE_UNION_TYPE
15602 EOF
15603 cat >> confdefs.h <<\EOF
15604 #define USE_UNION_TYPE 1
15605 EOF
15606 }
15607
15608 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15609     Defining PDUMP
15610 EOF
15611 cat >> confdefs.h <<\EOF
15612 #define PDUMP 1
15613 EOF
15614 }
15615
15616 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15617     Defining IPV6_CANONICALIZE
15618 EOF
15619 cat >> confdefs.h <<\EOF
15620 #define IPV6_CANONICALIZE 1
15621 EOF
15622 }
15623
15624
15625
15626 (
15627 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15628 else
15629   echo "uname -a: `uname -a`"
15630 fi
15631 echo ""
15632 echo "$0 $quoted_arguments"
15633 ) > Installation
15634
15635 if test ! -z ${emacs_beta_version} ; then
15636   if test -z "${emacs_is_beta}" ; then
15637         xemacs_betaname=".${emacs_beta_version}"
15638   else
15639         xemacs_betaname="-b${emacs_beta_version}"
15640   fi
15641 else
15642   xemacs_betaname=""
15643 fi
15644
15645 (
15646 echo "
15647
15648 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15649 "
15650 echo "
15651 Compilation / Installation:"
15652 echo "  Source code location:              $srcdir"
15653 echo "  Installation prefix:               $prefix"
15654 if test -n "$site_includes"; then
15655   echo "  Additional header files:           $site_includes"
15656 fi
15657 if test -n "$site_libraries"; then
15658   echo "  Additional libraries:              $site_libraries"
15659 fi
15660 if test -n "$site_prefixes"; then
15661   echo "  Additional prefixes:               $site_prefixes"
15662 fi
15663 if test -n "$runpath"; then
15664   echo "  Runtime library search path:       $runpath"
15665 fi
15666
15667 if test -n "$opsysfile"
15668 then echo "  Operating system description file: \`$opsysfile'"
15669 else echo "  Not using any operating system description file"
15670 fi
15671 if test -n "$machfile"
15672 then echo "  Machine description file:          \`$machfile'"
15673 else echo "  Not using any machine description file"
15674 fi
15675
15676 echo "  Compiler:                          $CC $CFLAGS"
15677 echo "  Relocating allocator for buffers:  $rel_alloc"
15678 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15679 case "$ld_switch_site" in
15680   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15681     - Consider configuring with --pdump." ;;
15682 esac
15683
15684 echo "
15685 Window System:"
15686 if test "$with_msw" = "yes"; then
15687   echo "  Compiling in support for the Microsoft window system."
15688 fi
15689 if test "$with_x11" = "yes"; then
15690   echo "  Compiling in support for the X window system:"
15691   echo "    - X Windows headers location:                 $x_includes"
15692   echo "    - X Windows libraries location:               $x_libraries"
15693   if test "$with_xauth" != yes; then
15694     echo "    - Xau (X authority) not available."
15695   fi
15696   if test "$with_xmu" != yes; then
15697     echo "    - Xmu library not available; substituting equivalent routines."
15698   fi
15699   if test "$with_wmcommand" != no; then
15700     echo "    - Handling WM_COMMAND properly."
15701   fi
15702 fi
15703 if test "$need_athena" = "yes"; then
15704   echo "  Compiling in support for the Athena widget set:"
15705   echo "    - Athena headers location:                    $athena_h_path"
15706   echo "    - Athena library to link:                     $athena_lib"
15707 fi
15708 case "$with_menubars" in
15709   gtk   ) echo "  Using GTK menubars."   ;;
15710   lucid ) echo "  Using Lucid menubars." ;;
15711   motif ) echo "  Using Motif menubars."
15712           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15713           echo "             We recommend using the Lucid menubar instead."
15714           echo "             Re-run configure with --with-menubars='lucid'." ;;
15715     msw ) echo "  Using MS-Windows menubars." ;;
15716 esac
15717 case "$with_scrollbars" in
15718   gtk    ) echo "  Using GTK scrollbars."        ;;
15719   lucid  ) echo "  Using Lucid scrollbars."      ;;
15720   motif  ) echo "  Using Motif scrollbars."      ;;
15721   athena ) echo "  Using Athena scrollbars."     ;;
15722      msw ) echo "  Using MS-Windows scrollbars." ;;
15723 esac
15724 case "$with_dialogs" in
15725   gtk    ) echo "  Using GTK dialog boxes." ;;
15726   motif  ) echo "  Using Motif dialog boxes."
15727            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15728              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15729              echo "             We recommend using the Athena dialog boxes instead."
15730              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15731              echo "             Read the PROBLEMS file for more information."
15732            fi; fi ;;
15733   athena ) echo "  Using Athena dialog boxes."     ;;
15734      msw ) echo "  Using MS-Windows dialog boxes." ;;
15735 esac
15736 case "$with_widgets" in
15737   gtk    ) echo "  Using GTK native widgets."        ;;
15738   motif  ) echo "  Using Motif native widgets."      ;;
15739   athena ) echo "  Using Athena native widgets."     ;;
15740      msw ) echo "  Using MS-Windows native widgets." ;;
15741 esac
15742 if test "$with_dragndrop" = yes; then
15743   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15744   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15745 fi
15746
15747 echo "
15748 TTY:"
15749 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15750 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15751
15752 echo "
15753 Images:"
15754 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15755 if test "$with_xpm" = yes; then
15756   echo "  Compiling in support for XPM  images."
15757 elif test "$with_x11" = yes; then
15758   echo "  WARNING: -----------------------------------------------------------"
15759   echo "  WARNING: Compiling without XPM image support."
15760   if test "$xpm_problem" != ""; then
15761     echo "  Reason: $xpm_problem"
15762   fi
15763   echo "  WARNING: You should strongly consider installing XPM."
15764   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15765   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15766   echo "  WARNING: -----------------------------------------------------------"
15767 fi
15768 if test "$with_png" = yes; then
15769   echo "  Compiling in support for PNG  images."
15770 elif test "$window_system" != "none"; then
15771   echo "  WARNING: -----------------------------------------------------------"
15772   echo "  WARNING: Compiling without PNG image support."
15773   if test "$png_problem" != ""; then
15774     echo "  Reason: $png_problem"
15775   fi
15776   echo "  WARNING: You should strongly consider installing the PNG libraries."
15777   echo "  WARNING: Otherwise certain images and glyphs may not display."
15778   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15779   echo "  WARNING: -----------------------------------------------------------"
15780 fi
15781 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15782 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15783 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15784
15785 echo "
15786 Sound:"
15787 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15788 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15789 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15790 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15791
15792 echo "
15793 Databases:"
15794 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15795 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15796 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15797 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15798 if test "$with_postgresql" = yes; then
15799   echo "  Compiling in support for PostgreSQL."
15800   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15801   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15802 fi
15803
15804 echo "
15805 Internationalization:"
15806 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15807 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15808 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15809 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15810 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15811 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15812 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15813 if test "$with_wnn" = yes; then
15814   echo "  Compiling in support for the WNN input method on Mule."
15815   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15816 fi
15817 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15818
15819 echo "
15820 Mail:"
15821 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15822 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15823 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15824 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15825
15826 echo "
15827 Other Features:"
15828 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15829 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15830 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15831 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15832 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15833 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15834 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15835 test "$pdump" = yes && echo "  Using the new portable dumper."
15836 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15837 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15838 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15839   != "no no no no no no"; then
15840   echo "  WARNING: ---------------------------------------------------------"
15841   echo "  WARNING: Compiling in support for runtime error checking."
15842   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15843   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15844   echo "  WARNING: ---------------------------------------------------------"
15845 fi
15846 echo ""
15847 ) | tee -a Installation
15848 echo ""
15849
15850
15851 # Remove any trailing slashes in these variables.
15852 test -n "$prefix" &&
15853   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15854 test -n "$exec_prefix" &&
15855   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15856
15857
15858 for file in $internal_makefile_list; do
15859   test "$file" = src/Makefile.in && \
15860     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15861   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15862 done
15863 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15864 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
15865
15866 trap '' 1 2 15
15867
15868 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15869
15870 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15871 # Let make expand exec_prefix.
15872 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15873
15874 # Any assignment to VPATH causes Sun make to only execute
15875 # the first set of double-colon rules, so remove it if not needed.
15876 # If there is a colon in the path, we need to keep it.
15877 if test "x$srcdir" = x.; then
15878   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15879 fi
15880
15881 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15882
15883 DEFS=-DHAVE_CONFIG_H
15884
15885 # Without the "./", some shells look in PATH for config.status.
15886 : ${CONFIG_STATUS=./config.status}
15887
15888 echo creating $CONFIG_STATUS
15889 rm -f $CONFIG_STATUS
15890 cat > $CONFIG_STATUS <<EOF
15891 #! /bin/sh
15892 # Generated automatically by configure.
15893 # Run this file to recreate the current configuration.
15894 # This directory was configured as follows,
15895 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15896 #
15897 # $0 $ac_configure_args
15898 #
15899 # Compiler output produced by configure, useful for debugging
15900 # configure, is in ./config.log if it exists.
15901
15902 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15903 for ac_option
15904 do
15905   case "\$ac_option" in
15906   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15907     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15908     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15909   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15910     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15911     exit 0 ;;
15912   -help | --help | --hel | --he | --h)
15913     echo "\$ac_cs_usage"; exit 0 ;;
15914   *) echo "\$ac_cs_usage"; exit 1 ;;
15915   esac
15916 done
15917
15918 ac_given_srcdir=$srcdir
15919 ac_given_INSTALL="$INSTALL"
15920
15921 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15922 EOF
15923 cat >> $CONFIG_STATUS <<EOF
15924
15925 # Protect against being on the right side of a sed subst in config.status.
15926 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15927  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15928 $ac_vpsub
15929 $extrasub
15930 s%@SHELL@%$SHELL%g
15931 s%@CFLAGS@%$CFLAGS%g
15932 s%@CPPFLAGS@%$CPPFLAGS%g
15933 s%@CXXFLAGS@%$CXXFLAGS%g
15934 s%@FFLAGS@%$FFLAGS%g
15935 s%@DEFS@%$DEFS%g
15936 s%@LDFLAGS@%$LDFLAGS%g
15937 s%@LIBS@%$LIBS%g
15938 s%@exec_prefix@%$exec_prefix%g
15939 s%@prefix@%$prefix%g
15940 s%@program_transform_name@%$program_transform_name%g
15941 s%@bindir@%$bindir%g
15942 s%@sbindir@%$sbindir%g
15943 s%@libexecdir@%$libexecdir%g
15944 s%@datadir@%$datadir%g
15945 s%@sysconfdir@%$sysconfdir%g
15946 s%@sharedstatedir@%$sharedstatedir%g
15947 s%@localstatedir@%$localstatedir%g
15948 s%@libdir@%$libdir%g
15949 s%@includedir@%$includedir%g
15950 s%@oldincludedir@%$oldincludedir%g
15951 s%@infodir@%$infodir%g
15952 s%@mandir@%$mandir%g
15953 s%@LN_S@%$LN_S%g
15954 s%@blddir@%$blddir%g
15955 s%@CC@%$CC%g
15956 s%@CPP@%$CPP%g
15957 s%@start_flags@%$start_flags%g
15958 s%@ld_switch_shared@%$ld_switch_shared%g
15959 s%@start_files@%$start_files%g
15960 s%@ld@%$ld%g
15961 s%@lib_gcc@%$lib_gcc%g
15962 s%@RANLIB@%$RANLIB%g
15963 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15964 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15965 s%@INSTALL_DATA@%$INSTALL_DATA%g
15966 s%@YACC@%$YACC%g
15967 s%@SET_MAKE@%$SET_MAKE%g
15968 s%@GTK_CONFIG@%$GTK_CONFIG%g
15969 s%@X_CFLAGS@%$X_CFLAGS%g
15970 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15971 s%@X_LIBS@%$X_LIBS%g
15972 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15973 s%@install_pp@%$install_pp%g
15974 s%@libs_xauth@%$libs_xauth%g
15975 s%@dnd_objs@%$dnd_objs%g
15976 s%@lwlib_objs@%$lwlib_objs%g
15977 s%@ALLOCA@%$ALLOCA%g
15978 s%@have_esd_config@%$have_esd_config%g
15979 s%@dll_ld@%$dll_ld%g
15980 s%@dll_cflags@%$dll_cflags%g
15981 s%@dll_ldflags@%$dll_ldflags%g
15982 s%@dll_post@%$dll_post%g
15983 s%@dll_ldo@%$dll_ldo%g
15984 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15985 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15986 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15987 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15988 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15989 s%@PROGNAME@%$PROGNAME%g
15990 s%@version@%$version%g
15991 s%@configuration@%$configuration%g
15992 s%@canonical@%$canonical%g
15993 s%@inststaticdir@%$inststaticdir%g
15994 s%@instvardir@%$instvardir%g
15995 s%@srcdir@%$srcdir%g
15996 s%@pkgdir@%$pkgdir%g
15997 s%@statedir@%$statedir%g
15998 s%@extra_includes@%$extra_includes%g
15999 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16000 s%@PREFIX@%$PREFIX%g
16001 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16002 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16003 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16004 s%@INFODIR@%$INFODIR%g
16005 s%@infopath@%$infopath%g
16006 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16007 s%@INFOPATH@%$INFOPATH%g
16008 s%@package_path@%$package_path%g
16009 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16010 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16011 s%@lispdir@%$lispdir%g
16012 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16013 s%@LISPDIR@%$LISPDIR%g
16014 s%@moduledir@%$moduledir%g
16015 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16016 s%@MODULEDIR@%$MODULEDIR%g
16017 s%@sitelispdir@%$sitelispdir%g
16018 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16019 s%@SITELISPDIR@%$SITELISPDIR%g
16020 s%@sitemoduledir@%$sitemoduledir%g
16021 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16022 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16023 s%@etcdir@%$etcdir%g
16024 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16025 s%@ETCDIR@%$ETCDIR%g
16026 s%@docdir@%$docdir%g
16027 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16028 s%@DOCDIR@%$DOCDIR%g
16029 s%@archlibdir@%$archlibdir%g
16030 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16031 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16032 s%@bitmapdir@%$bitmapdir%g
16033 s%@extra_objs@%$extra_objs%g
16034 s%@machfile@%$machfile%g
16035 s%@opsysfile@%$opsysfile%g
16036 s%@c_switch_general@%$c_switch_general%g
16037 s%@c_switch_window_system@%$c_switch_window_system%g
16038 s%@c_switch_all@%$c_switch_all%g
16039 s%@ld_switch_general@%$ld_switch_general%g
16040 s%@ld_switch_window_system@%$ld_switch_window_system%g
16041 s%@ld_switch_all@%$ld_switch_all%g
16042 s%@ld_libs_general@%$ld_libs_general%g
16043 s%@ld_libs_window_system@%$ld_libs_window_system%g
16044 s%@ld_libs_all@%$ld_libs_all%g
16045 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16046 s%@native_sound_lib@%$native_sound_lib%g
16047 s%@sound_cflags@%$sound_cflags%g
16048 s%@dynodump_arch@%$dynodump_arch%g
16049 s%@XEMACS_CC@%$XEMACS_CC%g
16050 s%@internal_makefile_list@%$internal_makefile_list%g
16051
16052 CEOF
16053 EOF
16054
16055 cat >> $CONFIG_STATUS <<\EOF
16056
16057 # Split the substitutions into bite-sized pieces for seds with
16058 # small command number limits, like on Digital OSF/1 and HP-UX.
16059 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16060 ac_file=1 # Number of current file.
16061 ac_beg=1 # First line for current file.
16062 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16063 ac_more_lines=:
16064 ac_sed_cmds=""
16065 while $ac_more_lines; do
16066   if test $ac_beg -gt 1; then
16067     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16068   else
16069     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16070   fi
16071   if test ! -s conftest.s$ac_file; then
16072     ac_more_lines=false
16073     rm -f conftest.s$ac_file
16074   else
16075     if test -z "$ac_sed_cmds"; then
16076       ac_sed_cmds="sed -f conftest.s$ac_file"
16077     else
16078       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16079     fi
16080     ac_file=`expr $ac_file + 1`
16081     ac_beg=$ac_end
16082     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16083   fi
16084 done
16085 if test -z "$ac_sed_cmds"; then
16086   ac_sed_cmds=cat
16087 fi
16088 EOF
16089
16090 cat >> $CONFIG_STATUS <<EOF
16091
16092 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16093 EOF
16094 cat >> $CONFIG_STATUS <<\EOF
16095 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16096   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16097   case "$ac_file" in
16098   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16099        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16100   *) ac_file_in="${ac_file}.in" ;;
16101   esac
16102
16103   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16104
16105   # Remove last slash and all that follows it.  Not all systems have dirname.
16106   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16107   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16108     # The file is in a subdirectory.
16109     test ! -d "$ac_dir" && mkdir "$ac_dir"
16110     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16111     # A "../" for each directory in $ac_dir_suffix.
16112     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16113   else
16114     ac_dir_suffix= ac_dots=
16115   fi
16116
16117   case "$ac_given_srcdir" in
16118   .)  srcdir=.
16119       if test -z "$ac_dots"; then top_srcdir=.
16120       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16121   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16122   *) # Relative path.
16123     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16124     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16125   esac
16126
16127   case "$ac_given_INSTALL" in
16128   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16129   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16130   esac
16131
16132   echo creating "$ac_file"
16133   rm -f "$ac_file"
16134   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16135   case "$ac_file" in
16136   *Makefile*) ac_comsub="1i\\
16137 # $configure_input" ;;
16138   *) ac_comsub= ;;
16139   esac
16140
16141   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16142   sed -e "$ac_comsub
16143 s%@configure_input@%$configure_input%g
16144 s%@srcdir@%$srcdir%g
16145 s%@top_srcdir@%$top_srcdir%g
16146 s%@INSTALL@%$INSTALL%g
16147 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16148 fi; done
16149 rm -f conftest.s*
16150
16151 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16152 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16153 #
16154 # ac_d sets the value in "#define NAME VALUE" lines.
16155 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16156 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16157 ac_dC='\3'
16158 ac_dD='%g'
16159 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16160 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16161 ac_uB='\([      ]\)%\1#\2define\3'
16162 ac_uC=' '
16163 ac_uD='\4%g'
16164 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16165 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16166 ac_eB='$%\1#\2define\3'
16167 ac_eC=' '
16168 ac_eD='%g'
16169
16170 if test "${CONFIG_HEADERS+set}" != set; then
16171 EOF
16172 cat >> $CONFIG_STATUS <<EOF
16173   CONFIG_HEADERS="src/config.h lwlib/config.h"
16174 EOF
16175 cat >> $CONFIG_STATUS <<\EOF
16176 fi
16177 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16178   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16179   case "$ac_file" in
16180   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16181        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16182   *) ac_file_in="${ac_file}.in" ;;
16183   esac
16184
16185   echo creating $ac_file
16186
16187   rm -f conftest.frag conftest.in conftest.out
16188   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16189   cat $ac_file_inputs > conftest.in
16190
16191 EOF
16192
16193 # Transform confdefs.h into a sed script conftest.vals that substitutes
16194 # the proper values into config.h.in to produce config.h.  And first:
16195 # Protect against being on the right side of a sed subst in config.status.
16196 # Protect against being in an unquoted here document in config.status.
16197 rm -f conftest.vals
16198 cat > conftest.hdr <<\EOF
16199 s/[\\&%]/\\&/g
16200 s%[\\$`]%\\&%g
16201 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16202 s%ac_d%ac_u%gp
16203 s%ac_u%ac_e%gp
16204 EOF
16205 sed -n -f conftest.hdr confdefs.h > conftest.vals
16206 rm -f conftest.hdr
16207
16208 # This sed command replaces #undef with comments.  This is necessary, for
16209 # example, in the case of _POSIX_SOURCE, which is predefined and required
16210 # on some systems where configure will not decide to define it.
16211 cat >> conftest.vals <<\EOF
16212 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16213 EOF
16214
16215 # Break up conftest.vals because some shells have a limit on
16216 # the size of here documents, and old seds have small limits too.
16217
16218 rm -f conftest.tail
16219 while :
16220 do
16221   ac_lines=`grep -c . conftest.vals`
16222   # grep -c gives empty output for an empty file on some AIX systems.
16223   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16224   # Write a limited-size here document to conftest.frag.
16225   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16226   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16227   echo 'CEOF
16228   sed -f conftest.frag conftest.in > conftest.out
16229   rm -f conftest.in
16230   mv conftest.out conftest.in
16231 ' >> $CONFIG_STATUS
16232   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16233   rm -f conftest.vals
16234   mv conftest.tail conftest.vals
16235 done
16236 rm -f conftest.vals
16237
16238 cat >> $CONFIG_STATUS <<\EOF
16239   rm -f conftest.frag conftest.h
16240   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16241   cat conftest.in >> conftest.h
16242   rm -f conftest.in
16243   if cmp -s $ac_file conftest.h 2>/dev/null; then
16244     echo "$ac_file is unchanged"
16245     rm -f conftest.h
16246   else
16247     # Remove last slash and all that follows it.  Not all systems have dirname.
16248       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16249       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16250       # The file is in a subdirectory.
16251       test ! -d "$ac_dir" && mkdir "$ac_dir"
16252     fi
16253     rm -f $ac_file
16254     mv conftest.h $ac_file
16255   fi
16256 fi; done
16257
16258 EOF
16259 cat >> $CONFIG_STATUS <<EOF
16260 CPP="$CPP"
16261  top_srcdir="$srcdir"
16262  MAKE_SUBDIR="$MAKE_SUBDIR"
16263
16264 EOF
16265 cat >> $CONFIG_STATUS <<\EOF
16266 for dir in . $MAKE_SUBDIR; do
16267   (
16268     cd $dir
16269     rm -f junk.c
16270     < Makefile.in \
16271       sed -e '/^# Generated/d' \
16272           -e 's%/\*\*/#.*%%' \
16273           -e 's/^ *# */#/' \
16274           -e '/^##/d' \
16275           -e '/^#/ {
16276 p
16277 d
16278 }'        \
16279           -e '/./ {
16280 s/\([\"]\)/\\\1/g
16281 s/^/"/
16282 s/$/"/
16283 }'  > junk.c;
16284
16285
16286
16287     echo creating $dir/Makefile
16288 $CPP -I. -I${top_srcdir}/src  junk.c \
16289   | sed -e 's/^\#.*//'          \
16290         -e 's/^[        ][      ]*$//'\
16291         -e 's/^ /       /'              \
16292         -e '/^[ \f]*$/d' \
16293         -e '/^\"/ {
16294         s/\\\([\"]\)/\1/g
16295         s/^[    ]*\"//
16296         s/\"[   ]*$//
16297 }' > Makefile.new
16298     chmod 444 Makefile.new
16299     mv -f Makefile.new Makefile
16300
16301     echo creating $dir/GNUmakefile
16302 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16303   | sed -e 's/^\#.*//'          \
16304         -e 's/^[        ][      ]*$//'\
16305         -e 's/^ /       /'              \
16306         -e '/^[ \f]*$/d' \
16307         -e '/^\"/ {
16308         s/\\\([\"]\)/\1/g
16309         s/^[    ]*\"//
16310         s/\"[   ]*$//
16311 }' > Makefile.new
16312     chmod 444 Makefile.new
16313     mv -f Makefile.new GNUmakefile
16314
16315     rm -f junk.c
16316   )
16317 done
16318
16319 sed < config.status >> lib-src/config.values \
16320   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16321   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16322   -e 's/^\([^ ]*\) $/\1 ""/' \
16323   -e 's/ 1$/ t/'
16324
16325
16326 exit 0
16327 EOF
16328 chmod +x $CONFIG_STATUS
16329 rm -fr confdefs* $ac_clean_files
16330 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1