Sync with r21-4-0-utf-2000-0_19-new-case.
[chise/xemacs-chise.git] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 native_sound_lib=''
251 with_gtk='no'
252 with_gnome='no'
253 use_assertions="yes"
254 with_toolbars=""
255 with_tty=""
256 use_union_type="no"
257 with_dnet=""
258 pdump="no"
259 with_dragndrop="no"
260
261
262
263
264 arguments="$@"
265
266 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
267 quoted_arguments=
268 for i in "$@"; do
269    case "$i" in
270    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
271    | --no-cr | --no-c) ;;
272    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
274    *)
275    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
276    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
277    esac
278 done
279
280 while test $# != 0; do
281   arg="$1"; shift
282   case "$arg" in
283     --no-create|--no-recursion) ;;
284         -* )
285             case "$arg" in
286         -*=*)
287           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
288           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
289           valomitted=no
290         ;;
291                                                                           -*)
292                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
293           val="yes" valomitted=yes
294         ;;
295       esac
296
297             optname="$opt"
298       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
299
300             case "${valomitted}-${opt}" in yes-without_* )
301         opt=`echo $opt | sed 's/without/with/'`
302         valomitted="no" val="no" ;;
303       esac
304
305             case "$opt" in
306
307         with_site_lisp  | \
308         with_prefix     | \
309         with_site_modules | \
310         with_x          | \
311         with_x11        | \
312         with_gtk        | \
313         with_gnome      | \
314         with_msw        | \
315         with_gcc        | \
316         dynamic         | \
317         with_ncurses    | \
318         with_dnet       | \
319         with_socks      | \
320         with_dragndrop  | \
321         with_cde        | \
322         with_offix      | \
323         with_gpm        | \
324         with_xpm        | \
325         with_xface      | \
326         with_gif        | \
327         with_jpeg       | \
328         with_png        | \
329         with_tiff       | \
330         with_wmcommand  | \
331         with_xmu        | \
332         with_purify     | \
333         with_quantify   | \
334         with_toolbars   | \
335         with_tty        | \
336         with_xfs        | \
337         with_i18n3      | \
338         with_mule       | \
339         with_utf_2000   | \
340         with_text_coding| \
341         with_file_coding| \
342         with_canna      | \
343         with_wnn        | \
344         with_wnn6       | \
345         with_workshop   | \
346         with_sparcworks | \
347         with_tooltalk   | \
348         with_ldap       | \
349         with_postgresql | \
350         with_pop        | \
351         with_kerberos   | \
352         with_hesiod     | \
353         with_dnet       | \
354         with_infodock   | \
355         with_netinstall   | \
356         external_widget | \
357         verbose         | \
358         extra_verbose   | \
359         usage_tracking  | \
360         use_union_type  | \
361         pdump           | \
362         debug           | \
363         use_assertions  | \
364         memory_usage_stats | \
365         with_clash_detection | \
366         with_modules | \
367         quick_build )
368                   case "$val" in
369             y | ye | yes )      val=yes ;;
370             n | no )            val=no  ;;
371             * ) (echo "$progname: Usage error:"
372 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
373 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
374           esac
375           eval "$opt=\"$val\"" ;;
376
377
378                         srcdir          | \
379         compiler        | \
380         cflags          | \
381         cpp             | \
382         cppflags        | \
383         libs            | \
384         ldflags         | \
385         cache_file      | \
386         native_sound_lib| \
387         site_lisp       | \
388         x_includes      | \
389         x_libraries     | \
390         site_includes   | \
391         site_libraries  | \
392         site_prefixes   | \
393         site_runtime_libraries )
394                   if test "$valomitted" = "yes" ; then
395                     if test "$#" = 0 ; then
396               (echo "$progname: Usage error:"
397 echo " " "The \`--$optname' option requires a value."
398 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
399             fi
400             val="$1"; shift
401           fi
402           eval "$opt=\"$val\""
403         ;;
404
405                 rel_alloc | \
406         with_dlmalloc | \
407         with_debug_malloc  | use_debug_malloc | \
408         with_system_malloc | use_system_malloc )
409           case "$val" in
410             y | ye | yes )      val=yes ;;
411             n | no )            val=no  ;;
412             d | de | def | defa | defau | defaul | default ) val=default ;;
413             * ) (echo "$progname: Usage error:"
414 echo " " "The \`--$optname' option requires one of these values:
415   \`yes', \`no', or \`default'."
416 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
417           esac
418           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
419           eval "$opt=\"$val\""
420         ;;
421
422                 "with_database" )
423           with_database_berkdb=no
424           with_database_dbm=no
425           with_database_gdbm=no
426           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
427             case "$x" in
428               no ) ;;
429               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
430               d | db | dbm )                               with_database_dbm=yes    ;;
431               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
432               * ) (echo "$progname: Usage error:"
433 echo " " "The \`--$optname' option value
434   must be either \`no' or a comma-separated list
435   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
436 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
437             esac
438           done
439           if test "$with_database_dbm"  = "yes" -a \
440                   "$with_database_gdbm" = "yes"; then
441           (echo "$progname: Usage error:"
442 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
443   with the \`--$optname' option."
444 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
445           fi
446         ;;
447
448                 "with_sound" )
449                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
450             case "$x" in
451                       n | no | non | none ) new_sdefault=no ;;
452               a | al | all | both ) new_sdefault=yes ;;
453
454               native )       with_native_sound=yes ;;
455               nonative )     with_native_sound=no ;;
456
457               nas )          with_nas_sound=yes ;;
458               nonas )        with_nas_sound=no ;;
459
460               esd )          with_esd_sound=yes ;;
461               noesd )        with_esd_sound=no ;;
462
463               * ) bogus_sound=yes ;;
464             esac
465             if test "$bogus_sound" -o \
466                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
467                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
468                 (echo "$progname: Usage error:"
469 echo " " "Valid types for the \`--$optname' option are:
470   $types.
471 The default is to autodetect all sound support."
472 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
473             elif test -n "$new_sdefault" ; then
474                 with_native_sound=$new_sdefault
475                 with_nas_sound=$new_sdefault
476                 with_esd_sound=$new_sdefault
477                 new_sdefault=   # reset this
478             fi
479             sound_notfirst=true
480           done
481         ;;
482
483                         "with_athena" )
484           case "$val" in
485             xa | xaw )                    val=xaw    ;;
486             3 | 3d | xaw3d )              val=3d     ;;
487                         ne | nex | next | naxtaw)     val=next   ;;
488                         9 | 95 | xaw95 )              val=95     ;;
489             xp | xpm | xawxpm )           val=xpm    ;;
490             * ) (echo "$progname: Usage error:"
491 echo " " "The \`--$optname' option must have one of these values:
492   \`xaw', \`3d', \`next', \`95', or \`xpm'."
493 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
494           esac
495           eval "$opt=\"$val\""
496         ;;
497
498                 "with_xim" )
499           case "$val" in
500             y | ye | yes )                val=yes   ;;
501             n | no | non | none )         val=no    ;;
502             x | xl | xli | xlib )         val=xlib  ;;
503             m | mo | mot | moti | motif ) val=motif ;;
504             * ) (echo "$progname: Usage error:"
505 echo " " "The \`--$optname' option must have one of these values:
506   \`motif', \`xlib', \`yes', or \`no'."
507 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
508           esac
509           eval "$opt=\"$val\""
510         ;;
511
512                 "mail_locking" )
513           case "$val" in
514             lockf )     val=lockf ;;
515             flock )     val=flock ;;
516             file | dot ) val=file  ;;
517             locking )   val=locking  ;;
518             * ) (echo "$progname: Usage error:"
519 echo " " "The \`--$optname' option must have one of these values:
520   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
521 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
522           esac
523           eval "$opt=\"$val\""
524         ;;
525
526                 "error_checking" )
527                           
528           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
529             case "$x" in
530                       n | no | non | none ) new_default=no ;;
531               a | al | all )        new_default=yes ;;
532
533               extents )       error_check_extents=yes ;;
534               noextents )     error_check_extents=no ;;
535
536               typecheck )     error_check_typecheck=yes ;;
537               notypecheck )   error_check_typecheck=no ;;
538
539               bufpos )        error_check_bufpos=yes ;;
540               nobufpos )      error_check_bufpos=no ;;
541
542               gc )            error_check_gc=yes ;;
543               nogc )          error_check_gc=no ;;
544
545               malloc )        error_check_malloc=yes ;;
546               nomalloc )      error_check_malloc=no ;;
547
548               byte_code )     error_check_byte_code=yes ;;
549               nobyte_code )   error_check_byte_code=no ;;
550
551               glyphs )     error_check_glyphs=yes ;;
552               noglyphs )   error_check_glyphs=no ;;
553
554               * ) bogus_error_check=yes ;;
555             esac
556             if test "$bogus_error_check" -o \
557                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
558                 if test "$error_check_default" = yes ; then
559                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
560                 else
561                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
562                 fi
563                 (echo "$progname: Usage error:"
564 echo " " "Valid types for the \`--$optname' option are:
565   $types."
566 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
567             elif test -n "$new_default" ; then
568                 error_check_extents=$new_default
569                 error_check_typecheck=$new_default
570                 error_check_bufpos=$new_default
571                 error_check_gc=$new_default
572                 error_check_malloc=$new_default
573                 error_check_byte_code=$new_default
574                 error_check_glyphs=$new_default
575                 new_default=    # reset this
576             fi
577             echeck_notfirst=true
578           done
579         ;;
580
581                                 
582                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
583         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
584         archlibdir | docdir | package_path )
585                    if test "$valomitted" = "yes"; then
586              if test "$#" = 0; then
587                  (echo "$progname: Usage error:"
588 echo " " "The \`--$optname' option requires a value."
589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
590              fi
591              val="$1"; shift
592            fi
593            eval "$opt=\"$val\""
594
595                            case "$opt" in
596                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining EXEC_PREFIX_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define EXEC_PREFIX_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining LISPDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define LISPDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining SITELISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define SITELISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining MODULEDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define MODULEDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining ETCDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define ETCDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining INFODIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define INFODIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFOPATH_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFOPATH_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining PACKAGE_PATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define PACKAGE_PATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              datadir )
661                 { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining INFODIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define INFODIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining LISPDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define LISPDIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining MODULEDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define MODULEDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining ETCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define ETCDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining DOCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define DOCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining ARCHLIBDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define ARCHLIBDIR_USER_DEFINED 1
706 EOF
707 }
708  ;;
709              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining DOCDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define DOCDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining ARCHLIBDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define ARCHLIBDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725            esac
726         ;;
727
728                 "no_create" ) ;;
729
730                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
731
732                 "with_menubars"   | \
733         "with_scrollbars" | \
734         "with_dialogs"    | \
735         "with_widgets" )
736           case "$val" in
737             l | lu | luc | luci | lucid )               val=lucid  ;;
738             m | mo | mot | moti | motif )               val=motif  ;;
739             a | at | ath | athe | athen | athena )      val=athena ;;
740             n | no | non | none )                       val=no     ;;
741             y | ye | yes )                              val=yes    ;;
742             g | gt | gtk )                              val=gtk    ;;
743             m | ms | msw )                              val=msw    ;;
744             * ) (echo "$progname: Usage error:"
745 echo " " "The \`--$optname' option must have one of these values:
746   \`gtk\', \`lucid', \`motif', \`athena', \`yes', or \`no'."
747 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
748           esac
749           eval "$opt=\"$val\""
750         ;;
751
752                 "use_minimal_tagbits" | \
753         "use_indexed_lrecord_implementation" | \
754         "run_in_place"  | \
755         "const_is_losing" | \
756         "with_gnu_make" )
757           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
758         ;;
759
760                 * ) (echo "$progname: Usage error:"
761 echo " " "Unrecognized option: $arg"
762 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
763
764       esac
765     ;;
766
767         *-*-*) configuration="$arg" ;;
768
769         *) (echo "$progname: Usage error:"
770 echo " " "Unrecognized argument: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773   esac
774 done
775
776
777 test -n "$cpp"      && CPP="$cpp"
778 test -n "$cppflags" && CPPFLAGS="$cppflags"
779 test -n "$libs"     && LIBS="$libs"
780 test -n "$ldflags"  && LDFLAGS="$ldflags"
781
782 eval set x "$quoted_arguments"; shift
783
784 test "$extra_verbose" = "yes" && verbose=yes
785
786 test -n "$with_x" && with_x11="$with_x"
787
788 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
789   test "$with_system_malloc" = "default" && with_system_malloc=yes
790 fi
791
792
793
794 if test "$with_cde $with_tooltalk" = "yes no"; then
795   (echo "$progname: Usage error:"
796 echo " " "--with-cde requires --with-tooltalk"
797 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
798 elif test "$with_tooltalk" = "no" ; then with_cde=no
799 elif test "$with_cde" = "yes"; then with_tooltalk=yes
800 fi
801
802
803 case "$srcdir" in
804
805     "" )
806     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
807       if test -f "$dir/src/lisp.h" -a \
808               -f "$dir/lisp/version.el" ; then
809         srcdir="$dir"
810         break
811       fi
812     done
813     if test -z "$srcdir" ; then
814       (echo "$progname: Usage error:"
815 echo " " "Neither the current directory nor its parent seem to
816   contain the XEmacs sources.  If you do not want to build XEmacs in its
817   source tree, you should run \`$progname' in the directory in which
818   you wish to build XEmacs, using the \`--srcdir' option to say where the
819   sources may be found."
820 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
821     fi
822   ;;
823
824     * )
825     if test ! -f "$srcdir/src/lisp.h" -o \
826             ! -f "$srcdir/lisp/version.el" ; then
827       (echo "$progname: Usage error:"
828 echo " " "The directory specified with the \`--srcdir' option,
829   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
830   either run the \`$progname' script at the top of the XEmacs source
831   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833     fi
834   ;;
835 esac
836
837 if test -z "$configuration"; then
838     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
839   if test -z "$configuration"; then
840     (echo "$progname: Usage error:"
841 echo " " "XEmacs has not been ported to this host type.
842 Try explicitly specifying the CONFIGURATION when rerunning configure."
843 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
844   fi
845 fi
846
847 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
848 echo "configure:849: checking whether ln -s works" >&5
849
850 rm -f conftestdata
851 if ln -s X conftestdata 2>/dev/null
852 then
853   rm -f conftestdata
854   ac_cv_prog_LN_S="ln -s"
855 else
856   ac_cv_prog_LN_S=ln
857 fi
858 LN_S="$ac_cv_prog_LN_S"
859 if test "$ac_cv_prog_LN_S" = "ln -s"; then
860   echo "$ac_t""yes" 1>&6
861 else
862   echo "$ac_t""no" 1>&6
863 fi
864
865
866 for dir in lisp etc man info tests; do
867   if test ! -d "$dir" ; then
868     echo Making symbolic link to "$srcdir/$dir"
869     ${LN_S} "$srcdir/$dir" "$dir"
870   fi
871 done
872
873
874 absolute_pwd="`pwd`";
875 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
876 then blddir="$PWD"
877 else blddir="$absolute_pwd"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   blddir=`echo "$blddir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi
882 fi
883
884
885 case "$srcdir" in
886   /* ) ;;
887   .  ) srcdir="$blddir" ;;
888   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
889   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
890   srcdir=`echo "$srcdir" | \
891    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
892 fi ;;
893 esac
894
895 if test `pwd` != `sh -c cd $srcdir && pwd`  \
896    && test -f "$srcdir/src/config.h"; then
897   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
898    echo "   as a build directory right now; it has been configured in its own"
899    echo "   right.  To configure in another directory as well, you MUST"
900    echo "   use GNU make.  If you do not have GNU make, then you must"
901    echo "   now do \`make distclean' in $srcdir,"
902    echo "   and then run $progname again.") >&2
903   extrasub='/^VPATH[     ]*=/c\
904 vpath %.c $(srcdir)\
905 vpath %.h $(srcdir)\
906 vpath %.y $(srcdir)\
907 vpath %.l $(srcdir)\
908 vpath %.s $(srcdir)\
909 vpath %.in $(srcdir)'
910 fi
911
912 . "$srcdir/version.sh" || exit 1;
913 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
914 : "${extra_verbose=$beta}"
915 version="${emacs_major_version}.${emacs_minor_version}"
916 { test "$extra_verbose" = "yes" && cat << EOF
917     Defining EMACS_MAJOR_VERSION = $emacs_major_version
918 EOF
919 cat >> confdefs.h <<EOF
920 #define EMACS_MAJOR_VERSION $emacs_major_version
921 EOF
922 }
923
924 { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_MINOR_VERSION = $emacs_minor_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_MINOR_VERSION $emacs_minor_version
929 EOF
930 }
931
932 if test -n "$emacs_beta_version" ; then
933   if test "$beta" = "yes"; then
934         version="${version}-b${emacs_beta_version}"
935         { test "$extra_verbose" = "yes" && cat << EOF
936     Defining EMACS_BETA_VERSION = $emacs_beta_version
937 EOF
938 cat >> confdefs.h <<EOF
939 #define EMACS_BETA_VERSION $emacs_beta_version
940 EOF
941 }
942
943   else
944         version="${version}.${emacs_beta_version}"
945         { test "$extra_verbose" = "yes" && cat << EOF
946     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define EMACS_PATCH_LEVEL $emacs_beta_version
950 EOF
951 }
952
953   fi
954 fi
955 { test "$extra_verbose" = "yes" && cat << EOF
956     Defining XEMACS_CODENAME = "$xemacs_codename"
957 EOF
958 cat >> confdefs.h <<EOF
959 #define XEMACS_CODENAME "$xemacs_codename"
960 EOF
961 }
962
963 { test "$extra_verbose" = "yes" && cat << EOF
964     Defining EMACS_VERSION = "$version"
965 EOF
966 cat >> confdefs.h <<EOF
967 #define EMACS_VERSION "$version"
968 EOF
969 }
970
971
972 if test "$with_infodock" = "yes"; then
973   if test ! -f ../../ID-INSTALL; then
974     echo "Cannot build InfoDock without InfoDock sources"
975     with_infodock=no
976   fi
977 fi
978
979 if test "$with_infodock" = "yes"; then
980       { test "$extra_verbose" = "yes" && cat << EOF
981     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
982 EOF
983 cat >> confdefs.h <<EOF
984 #define INFODOCK_MAJOR_VERSION $infodock_major_version
985 EOF
986 }
987
988   { test "$extra_verbose" = "yes" && cat << EOF
989     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
990 EOF
991 cat >> confdefs.h <<EOF
992 #define INFODOCK_MINOR_VERSION $infodock_minor_version
993 EOF
994 }
995
996   { test "$extra_verbose" = "yes" && cat << EOF
997     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
998 EOF
999 cat >> confdefs.h <<EOF
1000 #define INFODOCK_BUILD_VERSION $infodock_build_version
1001 EOF
1002 }
1003
1004   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1005   PROGNAME=infodock
1006   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1007 else
1008   PROGNAME=xemacs
1009 fi
1010
1011 { test "$extra_verbose" = "yes" && cat << EOF
1012     Defining EMACS_PROGNAME = "$PROGNAME"
1013 EOF
1014 cat >> confdefs.h <<EOF
1015 #define EMACS_PROGNAME "$PROGNAME"
1016 EOF
1017 }
1018
1019
1020 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1021 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1022     Defining ERROR_CHECK_EXTENTS
1023 EOF
1024 cat >> confdefs.h <<\EOF
1025 #define ERROR_CHECK_EXTENTS 1
1026 EOF
1027 }
1028
1029 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1030     Defining ERROR_CHECK_TYPECHECK
1031 EOF
1032 cat >> confdefs.h <<\EOF
1033 #define ERROR_CHECK_TYPECHECK 1
1034 EOF
1035 }
1036
1037 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1038     Defining ERROR_CHECK_BUFPOS
1039 EOF
1040 cat >> confdefs.h <<\EOF
1041 #define ERROR_CHECK_BUFPOS 1
1042 EOF
1043 }
1044
1045 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining ERROR_CHECK_GC
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define ERROR_CHECK_GC 1
1050 EOF
1051 }
1052
1053 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining ERROR_CHECK_MALLOC
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define ERROR_CHECK_MALLOC 1
1058 EOF
1059 }
1060
1061 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1062     Defining ERROR_CHECK_BYTE_CODE
1063 EOF
1064 cat >> confdefs.h <<\EOF
1065 #define ERROR_CHECK_BYTE_CODE 1
1066 EOF
1067 }
1068
1069 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1070     Defining ERROR_CHECK_GLYPHS
1071 EOF
1072 cat >> confdefs.h <<\EOF
1073 #define ERROR_CHECK_GLYPHS 1
1074 EOF
1075 }
1076
1077 if test "${debug:=$beta}" = "yes"; then
1078   use_assertions=yes memory_usage_stats=yes
1079   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1080    echo "    xemacs will be linked with \"debug.o\""
1081  fi
1082   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1083    echo "    xemacs will be linked with \"tests.o\""
1084  fi
1085   { test "$extra_verbose" = "yes" && cat << \EOF
1086     Defining DEBUG_XEMACS
1087 EOF
1088 cat >> confdefs.h <<\EOF
1089 #define DEBUG_XEMACS 1
1090 EOF
1091 }
1092
1093 fi
1094 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining USE_ASSERTIONS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define USE_ASSERTIONS 1
1099 EOF
1100 }
1101
1102 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1103     Defining MEMORY_USAGE_STATS
1104 EOF
1105 cat >> confdefs.h <<\EOF
1106 #define MEMORY_USAGE_STATS 1
1107 EOF
1108 }
1109
1110
1111
1112 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1113 echo "configure:1114: checking "host system type"" >&5
1114 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1115 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1116 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1117 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1118 echo "$ac_t""$configuration" 1>&6
1119
1120
1121
1122
1123
1124 machine='' opsys=''
1125
1126 case "$canonical" in
1127   sparc-*-*        ) machine=sparc ;;
1128   alpha*-*-*       ) machine=alpha ;;
1129   vax-*-*          ) machine=vax ;;
1130   mips-dec-*       ) machine=pmax ;;
1131   mips-sgi-irix6*  ) machine=iris6d ;;
1132   mips-sgi-*       ) machine=iris4d ;;
1133   mips*-linux      ) machine=mips ;;
1134   romp-ibm-*       ) machine=ibmrt ;;
1135   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1136   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1137   powerpc*-*       ) machine=powerpc ;;
1138   hppa-*-*         ) machine=hp800 ;;
1139   m88k-dg-*        ) machine=aviion ;;
1140   m68*-sony-*      ) machine=news ;;
1141   mips-sony-*      ) machine=news-risc ;;
1142   clipper-*        ) machine=clipper ;;
1143   arm*             ) machine=arm ;;
1144   ns32k-*          ) machine=ns32000 ;;
1145 esac
1146
1147 case "$canonical" in
1148   *-*-linux*    ) opsys=linux ;;
1149   *-*-netbsd*   ) opsys=netbsd ;;
1150   *-*-openbsd*  ) opsys=openbsd ;;
1151   *-*-nextstep* ) opsys=nextstep ;;
1152   *-*-vms       ) opsys=vms ;;
1153
1154     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1155   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1156   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1157   *-dec-osf3*                ) opsys=decosf3-1 ;;
1158   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1159
1160     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1161   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1162   *-*-ultrix* )         opsys=ultrix4-3 ;;
1163
1164     *-*-aix3.1*  ) opsys=aix3-1 ;;
1165   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1166   *-*-aix3*    ) opsys=aix3-2   ;;
1167   *-*-aix4.0*  ) opsys=aix4     ;;
1168   *-*-aix4.1*  ) opsys=aix4-1   ;;
1169   *-*-aix4*    ) opsys=aix4-2   ;;
1170
1171     *-gnu* )                    opsys=gnu    ;;
1172   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1173   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1174   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1175   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1176   *-*-aos*   )                  opsys=bsd4-3 ;;
1177   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1178   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1179   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1180   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1181   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1182   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1183         if test -z "$NON_GNU_CPP" ; then
1184           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1185             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1186           done
1187         fi
1188         opsys=usg5-4-2 ;;
1189     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1190     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1191 esac
1192
1193 case "$canonical" in
1194
1195     *-*-netbsd* )
1196     case "$canonical" in
1197       i[3-9]86-*-netbsd*) machine=intel386 ;;
1198       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1199                                             machine=hp9000s300 ;;
1200       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1201       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1202     esac
1203   ;;
1204
1205     *-*-openbsd* )
1206     case "${canonical}" in
1207       i386-*-openbsd*)          machine=intel386 ;;
1208       m68k-*-openbsd*)          machine=hp9000s300 ;;
1209       mipsel-*-openbsd*)        machine=pmax ;;
1210      esac
1211    ;;
1212
1213     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1214   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1215
1216     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1217   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1218
1219     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1220
1221     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1222
1223     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1224
1225     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1226
1227     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1228
1229     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1230   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1231   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1232
1233   
1234     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1235
1236     *-convex-bsd* | *-convex-convexos* )
1237     machine=convex opsys=bsd4-3
1238     NON_GNU_CPP="cc -E -P"
1239   ;;
1240
1241     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1242
1243     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1244   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1245   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1246   m88k-dg-dgux*                           ) opsys=dgux     ;;
1247
1248     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1249   m88k-motorola-sysv4* )
1250                     machine=delta88k opsys=usg5-4-2
1251   ;;
1252   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1253
1254     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1255   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1256
1257     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1258
1259     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1260   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1261   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1262
1263       m88k-harris-cxux* )
1264         case "`uname -r`" in
1265        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1266        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1267     esac
1268     NON_GNU_CPP="/lib/cpp"
1269   ;;
1270     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1271     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1272
1273     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1274
1275     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1276
1277     *-hp-hpux* )
1278         case "$canonical" in
1279       m68*  ) machine=hp9000s300 ;;
1280       hppa* ) machine=hp800      ;;
1281     esac
1282
1283     case "$canonical" in
1284       *-hp-hpux7*  )  opsys=hpux   ;;
1285       *-hp-hpux8*  )  opsys=hpux8  ;;
1286       *-hp-hpux9*  )  opsys=hpux9  ;;
1287       *-hp-hpux10* )  opsys=hpux10 ;;
1288       *-hp-hpux11* )  opsys=hpux11 ;;
1289       *            )  opsys=hpux   ;;
1290     esac
1291
1292         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1293    echo "    xemacs will be linked with \"strcat.o\""
1294  fi ;; esac
1295
1296     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1297         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1298     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1299
1300     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1301   ;;
1302
1303     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1304   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1305
1306     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1307   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1308   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1309   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1310   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1311   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1312
1313     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1314   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1315
1316     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1317
1318     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1319
1320     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1321
1322     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1323
1324       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1325
1326     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1327
1328     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1329
1330     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1331
1332     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1333
1334         mips-mips-usg* ) machine=mips4 ;;
1335   mips-mips-riscos4 )
1336     machine=mips4
1337     NON_GNU_CC="cc -systype bsd43"
1338     NON_GNU_CPP="cc -systype bsd43 -E"
1339     case "$canonical" in
1340       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1341       mips-mips-riscos5* ) opsys=riscos5 ;;
1342     esac
1343   ;;
1344   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1345   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1346
1347     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1348
1349     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1350
1351     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1352   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1353
1354     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1355
1356     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1357
1358     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1359
1360     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1361
1362     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1363   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1364
1365     mips-siemens-sysv* | mips-sni-sysv*)
1366     machine=mips-siemens opsys=usg5-4
1367     NON_GNU_CC=/usr/ccs/bin/cc
1368     NON_GNU_CPP=/usr/ccs/lib/cpp
1369   ;;
1370
1371     mips-nec-sysv*)
1372     machine=mips-nec
1373     NON_GNU_CC=/usr/ccs/bin/cc
1374     NON_GNU_CPP=/usr/ccs/lib/cpp
1375   ;;
1376
1377       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1378   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1379     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1380   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1381   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1382   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1383   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1384   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1385   mips-sgi-irix*      ) opsys=irix5-0 ;;
1386
1387     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1388   *-sony-news* ) opsys=newsos5 ;;
1389
1390     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1391
1392     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1393         case "$canonical" in
1394       m68*-sunos1* )             machine=sun1     ;;
1395       m68*-sunos2* )             machine=sun2     ;;
1396       m68* )                     machine=sun3     ;;
1397       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1398       i*86-*-* )                 machine=intel386 ;;
1399       rs6000* )                  machine=rs6000   ;;
1400     esac
1401
1402         case "$canonical" in *-sunos5*)
1403       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1404     esac
1405
1406                     case "$canonical" in
1407       *-sunos4* )
1408         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1409         : ;;
1410       *-solaris2* )
1411         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1412         RANLIB=':' ;;
1413     esac
1414
1415     case "$canonical" in
1416       *-solaris*          )
1417         opsys=sol2
1418         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1419         { test "$extra_verbose" = "yes" && cat << EOF
1420     Defining OS_RELEASE = $os_release
1421 EOF
1422 cat >> confdefs.h <<EOF
1423 #define OS_RELEASE $os_release
1424 EOF
1425 }
1426  ;;
1427
1428             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1429       *-sunos4.0*         ) opsys=sunos4-0      ;;
1430       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1431       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1432       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1433       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1434       *-mach*             ) opsys=mach-bsd4-3   ;;
1435       *                   ) opsys=bsd4-2        ;;
1436     esac
1437
1438     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1439
1440         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1441   ;;
1442
1443     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1444
1445     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1446   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1447
1448     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1449
1450     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1451
1452     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1453       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1454
1455     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1456
1457     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1458
1459     vax-dec-* )
1460     case "$canonical" in
1461       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1462       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1463       *-mach* )                         opsys=mach-bsd4-3 ;;
1464     esac
1465   ;;
1466
1467     ns16k-whitechapel-* ) machine=mg1 ;;
1468
1469     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1470
1471     i[3-9]86-*-* )
1472     machine=intel386
1473     case "$canonical" in
1474       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1475       *-isc2.2* )               opsys=isc2-2 ;;
1476       *-isc4.0* )               opsys=isc4-0 ;;
1477       *-isc4.* )                opsys=isc4-1
1478                                 GCC_TEST_OPTIONS=-posix
1479                                 NON_GCC_TEST_OPTIONS=-Xp
1480                                 ;;
1481       *-isc* )                  opsys=isc3-0 ;;
1482       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1483       *-esix* )                 opsys=esix ;;
1484       *-mach* )                 opsys=mach-bsd4-3 ;;
1485       *-xenix* )                opsys=xenix ;;
1486       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1487       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1488       *-bsdi4* )                opsys=bsdos4 ;;
1489       *-bsdi3* )                opsys=bsdos3 ;;
1490       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1491       *-bsdi2* )                opsys=bsdos2 ;;
1492       *-sco3.2v5* )             opsys=sco5 ;;
1493       *-sysv5* )                opsys=sco7 ;;
1494       *-386bsd* )               opsys=386bsd ;;
1495       *-freebsd* )              opsys=freebsd ;;
1496       *-nextstep* )             opsys=nextstep ;;
1497       *-pc-cygwin* )            opsys=cygwin32 ;;
1498       *-pc-mingw* )             opsys=mingw32 ;
1499                                 test -z "$with_tty" && with_tty="no";;
1500           esac
1501   ;;
1502
1503     m68k-*-linux* ) machine=m68k opsys=linux ;;
1504
1505 esac
1506
1507 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1508 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1509
1510 if test -r "${srcdir}/src/m/${machine}.h"; then
1511   machfile="m/${machine}.h"
1512   { test "$extra_verbose" = "yes" && cat << EOF
1513     Defining config_machfile = "$machfile"
1514 EOF
1515 cat >> confdefs.h <<EOF
1516 #define config_machfile "$machfile"
1517 EOF
1518 }
1519
1520 else
1521   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1522   echo "Using configure-time autodetection only."
1523 fi
1524
1525 if test -r "${srcdir}/src/s/${opsys}.h"; then
1526   opsysfile="s/${opsys}.h"
1527   { test "$extra_verbose" = "yes" && cat << EOF
1528     Defining config_opsysfile = "$opsysfile"
1529 EOF
1530 cat >> confdefs.h <<EOF
1531 #define config_opsysfile "$opsysfile"
1532 EOF
1533 }
1534
1535 else
1536   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1537   echo "Using configure-time autodetection only."
1538 fi
1539
1540
1541 if test -z "$dynamic"; then
1542   case "$opsys" in
1543     hpux* | sunos4* ) dynamic=no ;;
1544     *) dynamic=yes ;;
1545   esac
1546 fi
1547 if test "$dynamic" = "yes"; then
1548   case "$opsys" in
1549     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1550     decosf* ) ld_call_shared="-call_shared" ;;
1551   esac
1552 else   case "$opsys" in
1553     sol2 )
1554       echo "Static linking is not supported on Solaris 2."
1555       echo "Rerun configure without specifying --dynamic=no."
1556       exit 1 ;;
1557     linux   ) ld_call_shared="-Bstatic" ;;
1558     decosf* ) ld_call_shared="-non_shared" ;;
1559   esac
1560 fi
1561
1562 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1563
1564 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1565 { test "$extra_verbose" = "yes" && cat << EOF
1566     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1567 EOF
1568 cat >> confdefs.h <<EOF
1569 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1570 EOF
1571 }
1572
1573
1574
1575 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1576 if test "$with_workshop $with_tooltalk" = "yes no"; then
1577   (echo "$progname: Usage error:"
1578 echo " " "--with-workshop requires --with-tooltalk"
1579 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1580 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1581 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1582 fi
1583
1584 if test "$with_workshop" = "yes"; then
1585   { test "$extra_verbose" = "yes" && cat << \EOF
1586     Defining SUNPRO
1587 EOF
1588 cat >> confdefs.h <<\EOF
1589 #define SUNPRO 1
1590 EOF
1591 }
1592
1593   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1594    echo "    xemacs will be linked with \"sunpro.o\""
1595  fi
1596 fi
1597
1598 if test "$with_clash_detection" != "no"; then
1599   { test "$extra_verbose" = "yes" && cat << \EOF
1600     Defining CLASH_DETECTION
1601 EOF
1602 cat >> confdefs.h <<\EOF
1603 #define CLASH_DETECTION 1
1604 EOF
1605 }
1606
1607   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1608    echo "    xemacs will be linked with \"filelock.o\""
1609  fi
1610 fi
1611
1612 test -n "$compiler" && CC="$compiler"
1613 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1614 fi
1615
1616 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1617 if test "${CFLAGS-unset}" != unset
1618   then cflags_specified=yes;
1619   else cflags_specified=no;
1620 fi
1621
1622 xe_save_CFLAGS="$CFLAGS"
1623
1624 # Extract the first word of "gcc", so it can be a program name with args.
1625 set dummy gcc; ac_word=$2
1626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1627 echo "configure:1628: checking for $ac_word" >&5
1628
1629 if test -n "$CC"; then
1630   ac_cv_prog_CC="$CC" # Let the user override the test.
1631 else
1632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1633   ac_dummy="$PATH"
1634   for ac_dir in $ac_dummy; do
1635     test -z "$ac_dir" && ac_dir=.
1636     if test -f $ac_dir/$ac_word; then
1637       ac_cv_prog_CC="gcc"
1638       break
1639     fi
1640   done
1641   IFS="$ac_save_ifs"
1642 fi
1643 CC="$ac_cv_prog_CC"
1644 if test -n "$CC"; then
1645   echo "$ac_t""$CC" 1>&6
1646 else
1647   echo "$ac_t""no" 1>&6
1648 fi
1649
1650 if test -z "$CC"; then
1651   # Extract the first word of "cc", so it can be a program name with args.
1652 set dummy cc; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655
1656 if test -n "$CC"; then
1657   ac_cv_prog_CC="$CC" # Let the user override the test.
1658 else
1659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1660   ac_prog_rejected=no
1661   ac_dummy="$PATH"
1662   for ac_dir in $ac_dummy; do
1663     test -z "$ac_dir" && ac_dir=.
1664     if test -f $ac_dir/$ac_word; then
1665       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1666         ac_prog_rejected=yes
1667         continue
1668       fi
1669       ac_cv_prog_CC="cc"
1670       break
1671     fi
1672   done
1673   IFS="$ac_save_ifs"
1674 if test $ac_prog_rejected = yes; then
1675   # We found a bogon in the path, so make sure we never use it.
1676   set dummy $ac_cv_prog_CC
1677   shift
1678   if test $# -gt 0; then
1679     # We chose a different compiler from the bogus one.
1680     # However, it has the same basename, so the bogon will be chosen
1681     # first if we set CC to just the basename; use the full file name.
1682     shift
1683     set dummy "$ac_dir/$ac_word" "$@"
1684     shift
1685     ac_cv_prog_CC="$@"
1686   fi
1687 fi
1688 fi
1689 CC="$ac_cv_prog_CC"
1690 if test -n "$CC"; then
1691   echo "$ac_t""$CC" 1>&6
1692 else
1693   echo "$ac_t""no" 1>&6
1694 fi
1695
1696   if test -z "$CC"; then
1697     case "`uname -s`" in
1698     *win32* | *WIN32*)
1699       # Extract the first word of "cl", so it can be a program name with args.
1700 set dummy cl; ac_word=$2
1701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1702 echo "configure:1703: checking for $ac_word" >&5
1703
1704 if test -n "$CC"; then
1705   ac_cv_prog_CC="$CC" # Let the user override the test.
1706 else
1707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1708   ac_dummy="$PATH"
1709   for ac_dir in $ac_dummy; do
1710     test -z "$ac_dir" && ac_dir=.
1711     if test -f $ac_dir/$ac_word; then
1712       ac_cv_prog_CC="cl"
1713       break
1714     fi
1715   done
1716   IFS="$ac_save_ifs"
1717 fi
1718 CC="$ac_cv_prog_CC"
1719 if test -n "$CC"; then
1720   echo "$ac_t""$CC" 1>&6
1721 else
1722   echo "$ac_t""no" 1>&6
1723 fi
1724  ;;
1725     esac
1726   fi
1727   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1728 fi
1729
1730 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1731 echo "configure:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1732
1733 ac_ext=c
1734 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1735 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1736 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'
1737 ac_cpp='$CPP '"$xe_cppflags"
1738 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1739 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1740 cross_compiling=no
1741
1742 cat > conftest.$ac_ext << EOF
1743
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746
1747 main(){return(0);}
1748 EOF
1749 if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1750   ac_cv_prog_cc_works=yes
1751   # If we can't run a trivial program, we are probably using a cross compiler.
1752   if (./conftest; exit) 2>/dev/null; then
1753     ac_cv_prog_cc_cross=no
1754   else
1755     ac_cv_prog_cc_cross=yes
1756   fi
1757 else
1758   echo "configure: failed program was:" >&5
1759   cat conftest.$ac_ext >&5
1760   ac_cv_prog_cc_works=no
1761 fi
1762 rm -fr conftest*
1763 ac_ext=c
1764 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1765 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1766 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'
1767 ac_cpp='$CPP '"$xe_cppflags"
1768 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1769 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1770 cross_compiling=no
1771
1772 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1773 if test $ac_cv_prog_cc_works = no; then
1774   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1775 fi
1776 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1777 echo "configure:1778: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1778 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1779 cross_compiling=$ac_cv_prog_cc_cross
1780
1781 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1782 echo "configure:1783: checking whether we are using GNU C" >&5
1783
1784 cat > conftest.c <<EOF
1785 #ifdef __GNUC__
1786   yes;
1787 #endif
1788 EOF
1789 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1790   ac_cv_prog_gcc=yes
1791 else
1792   ac_cv_prog_gcc=no
1793 fi
1794
1795 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1796
1797 if test $ac_cv_prog_gcc = yes; then
1798   GCC=yes
1799 else
1800   GCC=
1801 fi
1802
1803 ac_test_CFLAGS="${CFLAGS+set}"
1804 ac_save_CFLAGS="$CFLAGS"
1805 CFLAGS=
1806 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1807 echo "configure:1808: checking whether ${CC-cc} accepts -g" >&5
1808
1809 echo 'void f(){}' > conftest.c
1810 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1811   ac_cv_prog_cc_g=yes
1812 else
1813   ac_cv_prog_cc_g=no
1814 fi
1815 rm -f conftest*
1816
1817
1818 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1819 if test "$ac_test_CFLAGS" = set; then
1820   CFLAGS="$ac_save_CFLAGS"
1821 elif test $ac_cv_prog_cc_g = yes; then
1822   if test "$GCC" = yes; then
1823     CFLAGS="-g -O2"
1824   else
1825     CFLAGS="-g"
1826   fi
1827 else
1828   if test "$GCC" = yes; then
1829     CFLAGS="-O2"
1830   else
1831     CFLAGS=
1832   fi
1833 fi
1834  
1835 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1836   CC=${NON_GNU_CC-cc}
1837   # Extract the first word of "gcc", so it can be a program name with args.
1838 set dummy gcc; ac_word=$2
1839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1840 echo "configure:1841: checking for $ac_word" >&5
1841
1842 if test -n "$CC"; then
1843   ac_cv_prog_CC="$CC" # Let the user override the test.
1844 else
1845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1846   ac_dummy="$PATH"
1847   for ac_dir in $ac_dummy; do
1848     test -z "$ac_dir" && ac_dir=.
1849     if test -f $ac_dir/$ac_word; then
1850       ac_cv_prog_CC="gcc"
1851       break
1852     fi
1853   done
1854   IFS="$ac_save_ifs"
1855 fi
1856 CC="$ac_cv_prog_CC"
1857 if test -n "$CC"; then
1858   echo "$ac_t""$CC" 1>&6
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862
1863 if test -z "$CC"; then
1864   # Extract the first word of "cc", so it can be a program name with args.
1865 set dummy cc; ac_word=$2
1866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1867 echo "configure:1868: checking for $ac_word" >&5
1868
1869 if test -n "$CC"; then
1870   ac_cv_prog_CC="$CC" # Let the user override the test.
1871 else
1872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1873   ac_prog_rejected=no
1874   ac_dummy="$PATH"
1875   for ac_dir in $ac_dummy; do
1876     test -z "$ac_dir" && ac_dir=.
1877     if test -f $ac_dir/$ac_word; then
1878       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1879         ac_prog_rejected=yes
1880         continue
1881       fi
1882       ac_cv_prog_CC="cc"
1883       break
1884     fi
1885   done
1886   IFS="$ac_save_ifs"
1887 if test $ac_prog_rejected = yes; then
1888   # We found a bogon in the path, so make sure we never use it.
1889   set dummy $ac_cv_prog_CC
1890   shift
1891   if test $# -gt 0; then
1892     # We chose a different compiler from the bogus one.
1893     # However, it has the same basename, so the bogon will be chosen
1894     # first if we set CC to just the basename; use the full file name.
1895     shift
1896     set dummy "$ac_dir/$ac_word" "$@"
1897     shift
1898     ac_cv_prog_CC="$@"
1899   fi
1900 fi
1901 fi
1902 CC="$ac_cv_prog_CC"
1903 if test -n "$CC"; then
1904   echo "$ac_t""$CC" 1>&6
1905 else
1906   echo "$ac_t""no" 1>&6
1907 fi
1908
1909   if test -z "$CC"; then
1910     case "`uname -s`" in
1911     *win32* | *WIN32*)
1912       # Extract the first word of "cl", so it can be a program name with args.
1913 set dummy cl; ac_word=$2
1914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1915 echo "configure:1916: checking for $ac_word" >&5
1916
1917 if test -n "$CC"; then
1918   ac_cv_prog_CC="$CC" # Let the user override the test.
1919 else
1920   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1921   ac_dummy="$PATH"
1922   for ac_dir in $ac_dummy; do
1923     test -z "$ac_dir" && ac_dir=.
1924     if test -f $ac_dir/$ac_word; then
1925       ac_cv_prog_CC="cl"
1926       break
1927     fi
1928   done
1929   IFS="$ac_save_ifs"
1930 fi
1931 CC="$ac_cv_prog_CC"
1932 if test -n "$CC"; then
1933   echo "$ac_t""$CC" 1>&6
1934 else
1935   echo "$ac_t""no" 1>&6
1936 fi
1937  ;;
1938     esac
1939   fi
1940   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1941 fi
1942
1943 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1944 echo "configure:1945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1945
1946 ac_ext=c
1947 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1948 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1949 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'
1950 ac_cpp='$CPP '"$xe_cppflags"
1951 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1952 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1953 cross_compiling=no
1954
1955 cat > conftest.$ac_ext << EOF
1956
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959
1960 main(){return(0);}
1961 EOF
1962 if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1963   ac_cv_prog_cc_works=yes
1964   # If we can't run a trivial program, we are probably using a cross compiler.
1965   if (./conftest; exit) 2>/dev/null; then
1966     ac_cv_prog_cc_cross=no
1967   else
1968     ac_cv_prog_cc_cross=yes
1969   fi
1970 else
1971   echo "configure: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   ac_cv_prog_cc_works=no
1974 fi
1975 rm -fr conftest*
1976 ac_ext=c
1977 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1978 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1979 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'
1980 ac_cpp='$CPP '"$xe_cppflags"
1981 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1982 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1983 cross_compiling=no
1984
1985 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1986 if test $ac_cv_prog_cc_works = no; then
1987   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1988 fi
1989 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1990 echo "configure:1991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1991 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1992 cross_compiling=$ac_cv_prog_cc_cross
1993
1994 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether we are using GNU C" >&5
1996
1997 cat > conftest.c <<EOF
1998 #ifdef __GNUC__
1999   yes;
2000 #endif
2001 EOF
2002 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2003   ac_cv_prog_gcc=yes
2004 else
2005   ac_cv_prog_gcc=no
2006 fi
2007
2008 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2009
2010 if test $ac_cv_prog_gcc = yes; then
2011   GCC=yes
2012 else
2013   GCC=
2014 fi
2015
2016 ac_test_CFLAGS="${CFLAGS+set}"
2017 ac_save_CFLAGS="$CFLAGS"
2018 CFLAGS=
2019 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether ${CC-cc} accepts -g" >&5
2021
2022 echo 'void f(){}' > conftest.c
2023 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2024   ac_cv_prog_cc_g=yes
2025 else
2026   ac_cv_prog_cc_g=no
2027 fi
2028 rm -f conftest*
2029
2030
2031 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2032 if test "$ac_test_CFLAGS" = set; then
2033   CFLAGS="$ac_save_CFLAGS"
2034 elif test $ac_cv_prog_cc_g = yes; then
2035   if test "$GCC" = yes; then
2036     CFLAGS="-g -O2"
2037   else
2038     CFLAGS="-g"
2039   fi
2040 else
2041   if test "$GCC" = yes; then
2042     CFLAGS="-O2"
2043   else
2044     CFLAGS=
2045   fi
2046 fi
2047
2048 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2049   CC=gcc
2050   # Extract the first word of "gcc", so it can be a program name with args.
2051 set dummy gcc; ac_word=$2
2052 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2053 echo "configure:2054: checking for $ac_word" >&5
2054
2055 if test -n "$CC"; then
2056   ac_cv_prog_CC="$CC" # Let the user override the test.
2057 else
2058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2059   ac_dummy="$PATH"
2060   for ac_dir in $ac_dummy; do
2061     test -z "$ac_dir" && ac_dir=.
2062     if test -f $ac_dir/$ac_word; then
2063       ac_cv_prog_CC="gcc"
2064       break
2065     fi
2066   done
2067   IFS="$ac_save_ifs"
2068 fi
2069 CC="$ac_cv_prog_CC"
2070 if test -n "$CC"; then
2071   echo "$ac_t""$CC" 1>&6
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075
2076 if test -z "$CC"; then
2077   # Extract the first word of "cc", so it can be a program name with args.
2078 set dummy cc; ac_word=$2
2079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_word" >&5
2081
2082 if test -n "$CC"; then
2083   ac_cv_prog_CC="$CC" # Let the user override the test.
2084 else
2085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2086   ac_prog_rejected=no
2087   ac_dummy="$PATH"
2088   for ac_dir in $ac_dummy; do
2089     test -z "$ac_dir" && ac_dir=.
2090     if test -f $ac_dir/$ac_word; then
2091       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2092         ac_prog_rejected=yes
2093         continue
2094       fi
2095       ac_cv_prog_CC="cc"
2096       break
2097     fi
2098   done
2099   IFS="$ac_save_ifs"
2100 if test $ac_prog_rejected = yes; then
2101   # We found a bogon in the path, so make sure we never use it.
2102   set dummy $ac_cv_prog_CC
2103   shift
2104   if test $# -gt 0; then
2105     # We chose a different compiler from the bogus one.
2106     # However, it has the same basename, so the bogon will be chosen
2107     # first if we set CC to just the basename; use the full file name.
2108     shift
2109     set dummy "$ac_dir/$ac_word" "$@"
2110     shift
2111     ac_cv_prog_CC="$@"
2112   fi
2113 fi
2114 fi
2115 CC="$ac_cv_prog_CC"
2116 if test -n "$CC"; then
2117   echo "$ac_t""$CC" 1>&6
2118 else
2119   echo "$ac_t""no" 1>&6
2120 fi
2121
2122   if test -z "$CC"; then
2123     case "`uname -s`" in
2124     *win32* | *WIN32*)
2125       # Extract the first word of "cl", so it can be a program name with args.
2126 set dummy cl; ac_word=$2
2127 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2128 echo "configure:2129: checking for $ac_word" >&5
2129
2130 if test -n "$CC"; then
2131   ac_cv_prog_CC="$CC" # Let the user override the test.
2132 else
2133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2134   ac_dummy="$PATH"
2135   for ac_dir in $ac_dummy; do
2136     test -z "$ac_dir" && ac_dir=.
2137     if test -f $ac_dir/$ac_word; then
2138       ac_cv_prog_CC="cl"
2139       break
2140     fi
2141   done
2142   IFS="$ac_save_ifs"
2143 fi
2144 CC="$ac_cv_prog_CC"
2145 if test -n "$CC"; then
2146   echo "$ac_t""$CC" 1>&6
2147 else
2148   echo "$ac_t""no" 1>&6
2149 fi
2150  ;;
2151     esac
2152   fi
2153   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2154 fi
2155
2156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2157 echo "configure:2158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2158
2159 ac_ext=c
2160 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2161 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2162 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'
2163 ac_cpp='$CPP '"$xe_cppflags"
2164 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2165 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2166 cross_compiling=no
2167
2168 cat > conftest.$ac_ext << EOF
2169
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172
2173 main(){return(0);}
2174 EOF
2175 if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2176   ac_cv_prog_cc_works=yes
2177   # If we can't run a trivial program, we are probably using a cross compiler.
2178   if (./conftest; exit) 2>/dev/null; then
2179     ac_cv_prog_cc_cross=no
2180   else
2181     ac_cv_prog_cc_cross=yes
2182   fi
2183 else
2184   echo "configure: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   ac_cv_prog_cc_works=no
2187 fi
2188 rm -fr conftest*
2189 ac_ext=c
2190 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2191 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2192 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'
2193 ac_cpp='$CPP '"$xe_cppflags"
2194 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2195 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2196 cross_compiling=no
2197
2198 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2199 if test $ac_cv_prog_cc_works = no; then
2200   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2201 fi
2202 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2203 echo "configure:2204: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2204 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2205 cross_compiling=$ac_cv_prog_cc_cross
2206
2207 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2208 echo "configure:2209: checking whether we are using GNU C" >&5
2209
2210 cat > conftest.c <<EOF
2211 #ifdef __GNUC__
2212   yes;
2213 #endif
2214 EOF
2215 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2216   ac_cv_prog_gcc=yes
2217 else
2218   ac_cv_prog_gcc=no
2219 fi
2220
2221 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2222
2223 if test $ac_cv_prog_gcc = yes; then
2224   GCC=yes
2225 else
2226   GCC=
2227 fi
2228
2229 ac_test_CFLAGS="${CFLAGS+set}"
2230 ac_save_CFLAGS="$CFLAGS"
2231 CFLAGS=
2232 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2233 echo "configure:2234: checking whether ${CC-cc} accepts -g" >&5
2234
2235 echo 'void f(){}' > conftest.c
2236 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2237   ac_cv_prog_cc_g=yes
2238 else
2239   ac_cv_prog_cc_g=no
2240 fi
2241 rm -f conftest*
2242
2243
2244 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2245 if test "$ac_test_CFLAGS" = set; then
2246   CFLAGS="$ac_save_CFLAGS"
2247 elif test $ac_cv_prog_cc_g = yes; then
2248   if test "$GCC" = yes; then
2249     CFLAGS="-g -O2"
2250   else
2251     CFLAGS="-g"
2252   fi
2253 else
2254   if test "$GCC" = yes; then
2255     CFLAGS="-O2"
2256   else
2257     CFLAGS=
2258   fi
2259 fi
2260
2261 fi
2262 CFLAGS="$xe_save_CFLAGS"
2263
2264
2265 test -n "$CPP" -a -d "$CPP" && CPP=
2266
2267 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2268
2269 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2270 echo "configure:2271: checking how to run the C preprocessor" >&5
2271 # On Suns, sometimes $CPP names a directory.
2272 if test -n "$CPP" && test -d "$CPP"; then
2273   CPP=
2274 fi
2275 if test -z "$CPP"; then
2276
2277   # This must be in double quotes, not single quotes, because CPP may get
2278   # substituted into the Makefile and "${CC-cc}" will confuse make.
2279   CPP="${CC-cc} -E"
2280   # On the NeXT, cc -E runs the code through the compiler's parser,
2281   # not just through cpp.
2282   cat > conftest.$ac_ext <<EOF
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 #include <assert.h>
2286 Syntax Error
2287 EOF
2288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2289 { (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2291 if test -z "$ac_err"; then
2292   :
2293 else
2294   echo "$ac_err" >&5
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   CPP="${CC-cc} -E -traditional-cpp"
2299   cat > conftest.$ac_ext <<EOF
2300 #line 2301 "configure"
2301 #include "confdefs.h"
2302 #include <assert.h>
2303 Syntax Error
2304 EOF
2305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2306 { (eval echo configure:2307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2308 if test -z "$ac_err"; then
2309   :
2310 else
2311   echo "$ac_err" >&5
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -rf conftest*
2315   CPP="${CC-cc} -nologo -E"
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <assert.h>
2320 Syntax Error
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   :
2327 else
2328   echo "$ac_err" >&5
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   CPP=/lib/cpp
2333 fi
2334 rm -f conftest*
2335 fi
2336 rm -f conftest*
2337 fi
2338 rm -f conftest*
2339   ac_cv_prog_CPP="$CPP"
2340   CPP="$ac_cv_prog_CPP"
2341 else
2342   ac_cv_prog_CPP="$CPP"
2343 fi
2344 echo "$ac_t""$CPP" 1>&6
2345
2346
2347
2348 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2349 echo "configure:2350: checking for AIX" >&5
2350 cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #ifdef _AIX
2354   yes
2355 #endif
2356
2357 EOF
2358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2359   egrep "yes" >/dev/null 2>&1; then
2360   rm -rf conftest*
2361   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2362     Defining _ALL_SOURCE
2363 EOF
2364 cat >> confdefs.h <<\EOF
2365 #define _ALL_SOURCE 1
2366 EOF
2367 }
2368
2369 else
2370   rm -rf conftest*
2371   echo "$ac_t""no" 1>&6
2372 fi
2373 rm -f conftest*
2374
2375  
2376
2377 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2378 echo "configure:2379: checking for GNU libc" >&5
2379 cat > conftest.$ac_ext <<EOF
2380 #line 2381 "configure"
2381 #include "confdefs.h"
2382 #include <features.h>
2383 int main() {
2384
2385 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2386 #error Not a GNU libc system :-(
2387 ******* ======= ******** &&&&&&&&
2388 #endif
2389
2390 ; return 0; }
2391 EOF
2392 if { (eval echo configure:2393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2393   rm -rf conftest*
2394   have_glibc=yes
2395 else
2396   echo "configure: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   rm -rf conftest*
2399   have_glibc=no
2400 fi
2401 rm -f conftest*
2402 echo "$ac_t""$have_glibc" 1>&6
2403 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2404     Defining _GNU_SOURCE
2405 EOF
2406 cat >> confdefs.h <<\EOF
2407 #define _GNU_SOURCE 1
2408 EOF
2409 }
2410
2411
2412 case "$opsys" in
2413   sol2)
2414    { test "$extra_verbose" = "yes" && cat << \EOF
2415     Defining __EXTENSIONS__
2416 EOF
2417 cat >> confdefs.h <<\EOF
2418 #define __EXTENSIONS__ 1
2419 EOF
2420 }
2421
2422       if test "$os_release" -ge 55; then
2423      { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining _XOPEN_SOURCE = 500
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define _XOPEN_SOURCE 500
2428 EOF
2429 }
2430
2431      { test "$extra_verbose" = "yes" && cat << \EOF
2432     Defining _XOPEN_SOURCE_EXTENDED
2433 EOF
2434 cat >> confdefs.h <<\EOF
2435 #define _XOPEN_SOURCE_EXTENDED 1
2436 EOF
2437 }
2438
2439    fi ;;
2440   linux)
2441     { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _POSIX_C_SOURCE = 199506L
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _POSIX_C_SOURCE 199506L
2446 EOF
2447 }
2448
2449     { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE = 500
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE 500
2454 EOF
2455 }
2456
2457     { test "$extra_verbose" = "yes" && cat << \EOF
2458     Defining _XOPEN_SOURCE_EXTENDED
2459 EOF
2460 cat >> confdefs.h <<\EOF
2461 #define _XOPEN_SOURCE_EXTENDED 1
2462 EOF
2463 }
2464
2465     ;;
2466 esac
2467
2468 cat > conftest.$ac_ext <<EOF
2469 #line 2470 "configure"
2470 #include "confdefs.h"
2471 int main () {
2472 #if defined __SUNPRO_C
2473 return 11;
2474 #elif defined __DECC
2475 return 12;
2476 #elif defined __USLC__ && defined __SCO_VERSION__
2477 return 13;
2478 #else
2479 return 0;
2480 #endif
2481 }
2482 EOF
2483 if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2484 then
2485   :
2486 else
2487   conftest_rc="$?"
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -fr conftest*
2491   case "$conftest_rc" in
2492   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2493   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2494   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2495 esac
2496 fi
2497 rm -fr conftest*
2498
2499
2500
2501
2502 echo "Extracting information from the machine- and system-dependent headers..."
2503
2504 tempcname="conftest.c"
2505
2506
2507
2508 cat > $tempcname < confdefs.h
2509 cat >> $tempcname <<EOF
2510 #define NOT_C_CODE
2511 #define C_SWITCH_SITE
2512 #define C_SWITCH_X_SITE
2513 #define LD_SWITCH_SITE
2514 #define LD_SWITCH_X_SITE
2515 #define LD_SWITCH_X_SITE_AUX
2516 #define OS_RELEASE $os_release
2517
2518 #ifdef config_opsysfile
2519 #include "$srcdir/src/$opsysfile"
2520 #endif
2521
2522 #ifdef config_machfile
2523 #include "$srcdir/src/$machfile"
2524 #endif
2525
2526 #ifndef LIBS_MACHINE
2527 #define LIBS_MACHINE
2528 #endif
2529 configure___ libs_machine=LIBS_MACHINE
2530
2531 #ifndef LIBS_SYSTEM
2532 #define LIBS_SYSTEM
2533 #endif
2534 configure___ libs_system=LIBS_SYSTEM
2535
2536 #ifndef LIBS_TERMCAP
2537 #define LIBS_TERMCAP
2538 #endif
2539 configure___ libs_termcap=LIBS_TERMCAP
2540
2541 #ifndef LIB_STANDARD
2542 #define LIB_STANDARD
2543 #endif
2544 configure___ libs_standard=LIB_STANDARD
2545
2546
2547 #ifndef OBJECTS_MACHINE
2548 #define OBJECTS_MACHINE
2549 #endif
2550 configure___ objects_machine=OBJECTS_MACHINE
2551
2552 #ifndef OBJECTS_SYSTEM
2553 #define OBJECTS_SYSTEM
2554 #endif
2555 configure___ objects_system=OBJECTS_SYSTEM
2556
2557
2558 #ifndef C_SWITCH_MACHINE
2559 #define C_SWITCH_MACHINE
2560 #endif
2561 configure___ c_switch_machine=C_SWITCH_MACHINE
2562
2563 #ifndef C_SWITCH_SYSTEM
2564 #define C_SWITCH_SYSTEM
2565 #endif
2566 configure___ c_switch_system=C_SWITCH_SYSTEM
2567
2568
2569 #ifndef LD_SWITCH_MACHINE
2570 #define LD_SWITCH_MACHINE
2571 #endif
2572 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2573
2574 #ifndef LD_SWITCH_SYSTEM
2575 #define LD_SWITCH_SYSTEM
2576 #endif
2577 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2578
2579
2580 #ifndef UNEXEC
2581 #define UNEXEC "unexec.o"
2582 #endif
2583 configure___ unexec=UNEXEC
2584
2585
2586 #ifndef LD_SWITCH_SHARED
2587 #define LD_SWITCH_SHARED "-c"
2588 #endif
2589 configure___ ld_switch_shared=LD_SWITCH_SHARED
2590
2591
2592 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2593 configure___ ordinary_ld=ORDINARY_LD
2594
2595 #ifdef ORDINARY_LINK
2596 #define LD ORDINARY_LD
2597 #else /* no ORDINARY LINK */
2598 #ifdef COFF_ENCAPSULATE
2599 #define LD "\$(CC) -nostdlib"
2600 #else /* not COFF_ENCAPSULATE */
2601 #ifdef LINKER
2602 #define LD LINKER
2603 #else /* ! defined (LINKER) */
2604 #define LD "ld"
2605 #endif /* ! defined (LINKER) */
2606 #endif /* ! defined (COFF_ENCAPSULATE) */
2607 #endif /* not ORDINARY_LINK */
2608 configure___ ld=LD
2609
2610 #ifndef LIB_GCC
2611 #define LIB_GCC
2612 #endif
2613 configure___ lib_gcc=LIB_GCC
2614
2615 #ifndef LD_TEXT_START_ADDR
2616 #define LD_TEXT_START_ADDR
2617 #endif
2618 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2619
2620
2621 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2622 #ifdef NO_REMAP
2623 #ifdef COFF_ENCAPSULATE
2624 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2625 #else /* ! defined (COFF_ENCAPSULATE) */
2626 #define START_FILES "pre-crt0.o /lib/crt0.o"
2627 #endif /* ! defined (COFF_ENCAPSULATE) */
2628 #else /* ! defined (NO_REMAP) */
2629 #define START_FILES "ecrt0.o"
2630 #endif /* ! defined (NO_REMAP) */
2631 #endif /* no ORDINARY_LINK */
2632 #ifndef START_FILES
2633 #define START_FILES
2634 #endif
2635 configure___ start_files=START_FILES
2636
2637 #ifdef ORDINARY_LINK
2638 configure___ ordinary_link=yes
2639 #else
2640 configure___ ordinary_link=no
2641 #endif
2642
2643 #ifdef SYSTEM_MALLOC
2644 configure___ system_malloc=yes
2645 #else
2646 configure___ system_malloc=no
2647 #endif
2648
2649 #ifdef TERMINFO
2650 configure___ have_terminfo=yes
2651 #else
2652 configure___ have_terminfo=no
2653 #endif
2654
2655 #ifdef MAIL_USE_FLOCK
2656 configure___ mail_use_flock=yes
2657 #else
2658 configure___ mail_use_flock=no
2659 #endif
2660
2661 #ifdef MAIL_USE_LOCKF
2662 configure___ mail_use_lockf=yes
2663 #else
2664 configure___ mail_use_lockf=no
2665 #endif
2666
2667 #ifdef MAIL_USE_LOCKING
2668 configure___ mail_use_locking=yes
2669 #else
2670 configure___ mail_use_locking=no
2671 #endif
2672
2673 #ifdef HAVE_WIN32_PROCESSES
2674 configure___ win32_processes=yes
2675 #else
2676 configure___ win32_processes=no
2677 #endif
2678
2679 EOF
2680
2681 CPP=`eval "echo $CPP $CPPFLAGS"`
2682 eval `$CPP -Isrc $tempcname \
2683         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2684
2685 rm $tempcname
2686
2687 if test "$pdump" = "yes"; then
2688   ordinary_link="yes"
2689   ld="${ordinary_ld}"
2690   start_files=
2691   libs_standard=
2692   unexec=
2693   lib_gcc=
2694 fi
2695
2696 test "$extra_verbose" = "yes" && \
2697   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 ""
2698
2699 case "$opsys" in mingw* | cygwin*)
2700   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2701   cygwin_include=`eval "dirname $cygwin_include"` ;
2702   cygwin_include="-I$cygwin_include/../include" ;
2703   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2704   case "$opsys" in mingw*)
2705     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2706   esac
2707   ;;
2708 esac
2709
2710 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2711
2712
2713 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2714
2715 if test "$__USLC__" = yes; then
2716   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2717 echo "configure:2718: checking for whether the -Kalloca compiler flag is needed" >&5
2718   need_kalloca=no
2719   cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722
2723 int main() {
2724 void *x = alloca(4);
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2728   rm -rf conftest*
2729   :
2730 else
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733   rm -rf conftest*
2734   
2735     xe_save_c_switch_system="$c_switch_system"
2736     c_switch_system="$c_switch_system -Kalloca"
2737     cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740
2741 int main() {
2742 void *x = alloca(4);
2743 ; return 0; }
2744 EOF
2745 if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2746   rm -rf conftest*
2747    need_kalloca=yes 
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751 fi
2752 rm -f conftest*
2753     c_switch_system="$xe_save_c_switch_system"
2754 fi
2755 rm -f conftest*
2756   echo "$ac_t""$need_kalloca" 1>&6
2757   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
2758 fi
2759
2760 if test "$cflags_specified" = "no"; then
2761       if   test "$GCC" = "yes"; then
2762     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2763         CFLAGS="$CFLAGS -Wsign-compare"
2764             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2765               elif test "$__SUNPRO_C" = "yes"; then
2766     case "$opsys" in
2767       sol2    ) CFLAGS="-v -xO4" ;;
2768       sunos4* ) CFLAGS="-xO2";;
2769     esac
2770   elif test "$__DECC" = "yes"; then
2771     CFLAGS="-O3"
2772   elif test "$CC" = "xlc"; then
2773     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2774     else
2775     CFLAGS="-O" ;  fi
2776 fi
2777
2778 if test "$GCC" = "yes"; then
2779 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2780 echo "configure:2781: checking for buggy gcc versions" >&5
2781 GCC_VERSION=`$CC --version`
2782 case `uname -s`:`uname -m`:$GCC_VERSION in
2783                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2784                         case "$CFLAGS" in
2785             *-O2*|*-O3*)
2786                 case "$CFLAGS" in
2787                     *-fno-schedule-insns*) ;;
2788                     *)
2789                         echo "$ac_t""yes" 1>&6
2790                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2791                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2792                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2793                         ;;
2794                 esac
2795                 ;;
2796         esac
2797         ;;
2798                     Linux:alpha:egcs-2.91.*)
2799         echo "$ac_t""yes" 1>&6
2800         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2801         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2802         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2803         ;;
2804     *:i*86*:2.7.2*)
2805         case "$CFLAGS" in
2806             *-O2*|*-O3*)
2807                 case "$GCC_VERSION" in
2808                     2.7.2)
2809                         case "$CFLAGS" in
2810                             *-fno-strength-reduce*) ;;
2811                             *)
2812                                 echo "$ac_t""yes" 1>&6
2813                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2814                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2815                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2816                                 ;;
2817                         esac
2818                         ;;
2819                 esac
2820                 case "$CFLAGS" in
2821                  *-fno-caller-saves*) ;;
2822                  *)
2823                     echo "$ac_t""yes" 1>&6
2824                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2825                     echo "configure: warning: -fno-caller-saves." 1>&2
2826                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2827                     ;;
2828                 esac
2829                 ;;
2830         esac
2831         ;;
2832 esac
2833 echo "$ac_t""no" 1>&6
2834 fi
2835
2836
2837 if test "$GCC" = "yes"; then
2838   set x $ld_switch_system; shift; ld_switch_system=""
2839   while test -n "$1"; do
2840     case $1 in
2841       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2842       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2843       -Xlinker* ) ;;
2844       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2845     esac
2846     shift
2847   done
2848 fi
2849
2850 if test "$GCC" = "yes"; then
2851   set x $ld_switch_machine; shift; ld_switch_machine=""
2852   while test -n "$1"; do
2853     case $1 in
2854       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2855       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2856       -Xlinker* ) ;;
2857       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2858     esac
2859     shift
2860   done
2861 fi
2862
2863 if test "$GCC" = "yes"; then
2864   set x $LDFLAGS; shift; LDFLAGS=""
2865   while test -n "$1"; do
2866     case $1 in
2867       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2868       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2869       -Xlinker* ) ;;
2870       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2871     esac
2872     shift
2873   done
2874 fi
2875
2876 if test "$GCC" = "yes"; then
2877   set x $ld_call_shared; shift; ld_call_shared=""
2878   while test -n "$1"; do
2879     case $1 in
2880       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2881       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2882       -Xlinker* ) ;;
2883       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2884     esac
2885     shift
2886   done
2887 fi
2888
2889 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2890    echo "    xemacs will be linked with \"$objects_machine\""
2891  fi
2892 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2893    echo "    xemacs will be linked with \"$objects_system\""
2894  fi
2895 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2896    echo "    xemacs will be linked with \"$unexec\""
2897  fi
2898 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2899    echo "    xemacs will be linked with \"dumper.o\""
2900  fi
2901
2902 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2903 echo "configure:2904: checking for dynodump" >&5
2904 if test "$unexec" != "unexsol2.o"; then
2905   echo "$ac_t""no" 1>&6
2906 else
2907   echo "$ac_t""yes" 1>&6
2908   { test "$extra_verbose" = "yes" && cat << \EOF
2909     Defining DYNODUMP
2910 EOF
2911 cat >> confdefs.h <<\EOF
2912 #define DYNODUMP 1
2913 EOF
2914 }
2915
2916   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2917   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2918   case "$machine" in
2919     sparc   ) dynodump_arch=sparc ;;
2920     *86*    ) dynodump_arch=i386  ;;
2921     powerpc ) dynodump_arch=ppc   ;;
2922   esac
2923     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
2924 fi
2925
2926
2927 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2928
2929 if test "$unexec" = "unexaix.o"; then
2930   if   test "$dynamic" = "no"; then
2931   start_flags="-Wl,-bnso,-bnodelcsect"
2932   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2933   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2934     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2935   done
2936   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2937     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2938   done
2939   
2940 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2941 echo "configure:2942: checking for terminateAndUnload in -lC" >&5
2942 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2943
2944 xe_check_libs=" -lC "
2945 cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 /* Override any gcc2 internal prototype to avoid an error.  */
2949 /* We use char because int might match the return type of a gcc2
2950     builtin and then its argument prototype would still apply.  */
2951 char terminateAndUnload();
2952
2953 int main() {
2954 terminateAndUnload()
2955 ; return 0; }
2956 EOF
2957 if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2958   rm -rf conftest*
2959   eval "ac_cv_lib_$ac_lib_var=yes"
2960 else
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   eval "ac_cv_lib_$ac_lib_var=no"
2965 fi
2966 rm -f conftest*
2967 xe_check_libs=""
2968
2969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2970   echo "$ac_t""yes" 1>&6
2971   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975
2976
2977   fi
2978 elif test -n "$ld_text_start_addr"; then
2979   start_flags="-T $ld_text_start_addr -e __start"
2980 fi
2981
2982
2983
2984
2985 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2986  test -z "$linker" &&  linker='$(CC) -nostdlib'
2987  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2988 fi
2989 test "$GCC" != "yes" && lib_gcc=
2990
2991
2992
2993
2994
2995 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2996 if test -n "$site_libraries"; then
2997   for arg in $site_libraries; do
2998     case "$arg" in
2999      -* ) ;;
3000      * ) test -d "$arg" || \
3001            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3002        arg="-L${arg}" ;;
3003     esac
3004     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3005   done
3006 fi
3007
3008 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3009 if test -n "$site_includes"; then
3010   for arg in $site_includes; do
3011     case "$arg" in
3012       -* ) ;;
3013       * ) test -d "$arg" || \
3014            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3015       arg="-I${arg}" ;;
3016     esac
3017     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3018   done
3019 fi
3020
3021 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3022 if test -n "$site_prefixes"; then
3023   for dir in $site_prefixes; do
3024     lib_dir="${dir}/lib"
3025     inc_dir="${dir}/include"
3026     if test ! -d "$dir"; then
3027       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3028     elif test ! -d "$lib_dir"; then
3029       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3030     else
3031       if test -d "$inc_dir"; then
3032         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
3033       fi
3034       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
3035     fi
3036   done
3037 fi
3038
3039
3040 for dir in "/usr/ccs/lib"; do
3041   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
3042 done
3043
3044 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3045 if test -n "$site_runtime_libraries"; then
3046   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3047   export LD_RUN_PATH
3048 fi
3049
3050
3051
3052
3053
3054 if test -n "$add_runtime_path"; then :;
3055 elif test "$dynamic" = "no"; then add_runtime_path=no
3056 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3057 else case "$opsys" in
3058        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3059        * ) add_runtime_path=no ;;
3060      esac
3061 fi
3062
3063 if test "$add_runtime_path" = "yes"; then
3064       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3065 echo "configure:3066: checking "for runtime libraries flag"" >&5
3066   case "$opsys" in
3067     sol2 ) dash_r="-R" ;;
3068     decosf* | linux* | irix*) dash_r="-rpath " ;;
3069     *)
3070       dash_r=""
3071       for try_dash_r in "-R" "-R " "-rpath "; do
3072         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3073         
3074 if test "$GCC" = "yes"; then
3075   set x $xe_check_libs; shift; xe_check_libs=""
3076   while test -n "$1"; do
3077     case $1 in
3078       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3079       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3080       -Xlinker* ) ;;
3081       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3082     esac
3083     shift
3084   done
3085 fi
3086         cat > conftest.$ac_ext <<EOF
3087 #line 3088 "configure"
3088 #include "confdefs.h"
3089
3090 int main() {
3091
3092 ; return 0; }
3093 EOF
3094 if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3095   rm -rf conftest*
3096   dash_r="$try_dash_r"
3097 else
3098   echo "configure: failed program was:" >&5
3099   cat conftest.$ac_ext >&5
3100 fi
3101 rm -f conftest*
3102         xe_check_libs=""
3103         test -n "$dash_r" && break
3104       done ;;
3105   esac
3106   if test -n "$dash_r";
3107     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3108     else echo "$ac_t""NONE" 1>&6
3109   fi
3110 fi
3111
3112 xe_add_unique_runpath_dir='
3113   xe_add_p=yes
3114   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3115   done
3116   if test "$xe_add_p" = "yes"; then
3117     test -n "$runpath" && runpath="${runpath}:"
3118     runpath="${runpath}${xe_runpath_dir}"
3119     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3120   fi'
3121
3122
3123
3124
3125 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3126     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3127   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3128   
3129         runpath="" runpath_dirs=""
3130   if test -n "$LD_RUN_PATH"; then
3131     runpath="$LD_RUN_PATH"
3132   elif test "$GCC" = "yes"; then
3133         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3134     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3135     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3136     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3137       case "$arg" in P,* | -L* | -R* )
3138         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3139           {
3140 xe_runpath_dir="$dir"
3141   test "$xe_runpath_dir" != "/lib"     -a \
3142         "$xe_runpath_dir" != "/usr/lib" -a \
3143         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3144   eval "$xe_add_unique_runpath_dir"
3145 }
3146         done ;;
3147       esac
3148     done
3149     ld_switch_run="$ld_switch_run_save"
3150     rm -f conftest*
3151   else
3152         for arg in $ld_switch_site $ld_switch_x_site; do
3153       case "$arg" in -L*) {
3154 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3155   test "$xe_runpath_dir" != "/lib"     -a \
3156         "$xe_runpath_dir" != "/usr/lib" -a \
3157         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3158   eval "$xe_add_unique_runpath_dir"
3159 };; esac
3160     done
3161         if test "$opsys $need_motif" = "sol2 yes"; then
3162       xe_runpath_dir="/opt/SUNWdt/lib";
3163       eval "$xe_add_unique_runpath_dir";
3164     fi
3165   fi 
3166   if test -n "$runpath"; then
3167     ld_switch_run="${dash_r}${runpath}"
3168     
3169 if test "$GCC" = "yes"; then
3170   set x $ld_switch_run; shift; ld_switch_run=""
3171   while test -n "$1"; do
3172     case $1 in
3173       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3174       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3175       -Xlinker* ) ;;
3176       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3177     esac
3178     shift
3179   done
3180 fi
3181     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3182   fi
3183 fi
3184
3185
3186
3187 GNU_MALLOC=yes
3188 if test "$with_dlmalloc" != "no"; then
3189         doug_lea_malloc=yes
3190 else
3191         doug_lea_malloc=no
3192 fi
3193 after_morecore_hook_exists=yes
3194 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3195 echo "configure:3196: checking for malloc_set_state" >&5
3196
3197 cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 /* System header to define __stub macros and hopefully few prototypes,
3201     which can conflict with char malloc_set_state(); below.  */
3202 #include <assert.h>
3203 /* Override any gcc2 internal prototype to avoid an error.  */
3204 /* We use char because int might match the return type of a gcc2
3205     builtin and then its argument prototype would still apply.  */
3206 char malloc_set_state();
3207
3208 int main() {
3209
3210 /* The GNU C library defines this for functions which it implements
3211     to always fail with ENOSYS.  Some functions are actually named
3212     something starting with __ and the normal name is an alias.  */
3213 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3214 choke me
3215 #else
3216 malloc_set_state();
3217 #endif
3218
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3222   rm -rf conftest*
3223   eval "ac_cv_func_malloc_set_state=yes"
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   eval "ac_cv_func_malloc_set_state=no"
3229 fi
3230 rm -f conftest*
3231
3232 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3233   echo "$ac_t""yes" 1>&6
3234   :
3235 else
3236   echo "$ac_t""no" 1>&6
3237 doug_lea_malloc=no
3238 fi
3239
3240 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3241 echo "configure:3242: checking whether __after_morecore_hook exists" >&5
3242 cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245 extern void (* __after_morecore_hook)();
3246 int main() {
3247 __after_morecore_hook = 0
3248 ; return 0; }
3249 EOF
3250 if { (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3251   rm -rf conftest*
3252   echo "$ac_t""yes" 1>&6
3253 else
3254   echo "configure: failed program was:" >&5
3255   cat conftest.$ac_ext >&5
3256   rm -rf conftest*
3257   echo "$ac_t""no" 1>&6
3258    after_morecore_hook_exists=no
3259 fi
3260 rm -f conftest*
3261 if test "$system_malloc" = "yes" ; then
3262   GNU_MALLOC=no
3263   GNU_MALLOC_reason="
3264     - The GNU allocators don't work with this system configuration."
3265 elif test "$with_system_malloc" = "yes" ; then
3266   GNU_MALLOC=no
3267   GNU_MALLOC_reason="
3268     - User chose not to use GNU allocators."
3269 elif test "$with_debug_malloc" = "yes" ; then
3270   GNU_MALLOC=no
3271   GNU_MALLOC_reason="
3272     - User chose to use Debugging Malloc."
3273 fi
3274
3275 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3276   GNU_MALLOC_reason="
3277     - Using Doug Lea's new malloc from the GNU C Library."
3278   { test "$extra_verbose" = "yes" && cat << \EOF
3279     Defining DOUG_LEA_MALLOC
3280 EOF
3281 cat >> confdefs.h <<\EOF
3282 #define DOUG_LEA_MALLOC 1
3283 EOF
3284 }
3285
3286   if test "$after_morecore_hook_exists" = "no" ; then
3287     GNU_MALLOC_reason="
3288     - Using Doug Lea's new malloc from the Linux C Library."
3289     { test "$extra_verbose" = "yes" && cat << \EOF
3290     Defining _NO_MALLOC_WARNING_
3291 EOF
3292 cat >> confdefs.h <<\EOF
3293 #define _NO_MALLOC_WARNING_ 1
3294 EOF
3295 }
3296
3297   fi
3298 fi
3299
3300
3301
3302
3303 # Extract the first word of "ranlib", so it can be a program name with args.
3304 set dummy ranlib; ac_word=$2
3305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3306 echo "configure:3307: checking for $ac_word" >&5
3307
3308 if test -n "$RANLIB"; then
3309   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3310 else
3311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3312   ac_dummy="$PATH"
3313   for ac_dir in $ac_dummy; do
3314     test -z "$ac_dir" && ac_dir=.
3315     if test -f $ac_dir/$ac_word; then
3316       ac_cv_prog_RANLIB="ranlib"
3317       break
3318     fi
3319   done
3320   IFS="$ac_save_ifs"
3321   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3322 fi
3323 RANLIB="$ac_cv_prog_RANLIB"
3324 if test -n "$RANLIB"; then
3325   echo "$ac_t""$RANLIB" 1>&6
3326 else
3327   echo "$ac_t""no" 1>&6
3328 fi
3329
3330 ac_aux_dir=
3331 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3332   if test -f $ac_dir/install-sh; then
3333     ac_aux_dir=$ac_dir
3334     ac_install_sh="$ac_aux_dir/install-sh -c"
3335     break
3336   elif test -f $ac_dir/install.sh; then
3337     ac_aux_dir=$ac_dir
3338     ac_install_sh="$ac_aux_dir/install.sh -c"
3339     break
3340   fi
3341 done
3342 if test -z "$ac_aux_dir"; then
3343   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3344 fi
3345 ac_config_guess=$ac_aux_dir/config.guess
3346 ac_config_sub=$ac_aux_dir/config.sub
3347 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3348
3349 # Find a good install program.  We prefer a C program (faster),
3350 # so one script is as good as another.  But avoid the broken or
3351 # incompatible versions:
3352 # SysV /etc/install, /usr/sbin/install
3353 # SunOS /usr/etc/install
3354 # IRIX /sbin/install
3355 # AIX /bin/install
3356 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3357 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3358 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3359 # ./install, which can be erroneously created by make from ./install.sh.
3360 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3361 echo "configure:3362: checking for a BSD compatible install" >&5
3362 if test -z "$INSTALL"; then
3363
3364   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3365   for ac_dir in $PATH; do
3366     # Account for people who put trailing slashes in PATH elements.
3367     case "$ac_dir/" in
3368     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3369     *)
3370       # OSF1 and SCO ODT 3.0 have their own names for install.
3371       # Don't use installbsd from OSF since it installs stuff as root
3372       # by default.
3373       for ac_prog in ginstall scoinst install; do
3374         if test -f $ac_dir/$ac_prog; then
3375           if test $ac_prog = install &&
3376             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3377             # AIX install.  It has an incompatible calling convention.
3378             :
3379           else
3380             ac_cv_path_install="$ac_dir/$ac_prog -c"
3381             break 2
3382           fi
3383         fi
3384       done
3385       ;;
3386     esac
3387   done
3388   IFS="$ac_save_IFS"
3389
3390   if test "${ac_cv_path_install+set}" = set; then
3391     INSTALL="$ac_cv_path_install"
3392   else
3393     # As a last resort, use the slow shell script.  We don't cache a
3394     # path for INSTALL within a source directory, because that will
3395     # break other packages using the cache if that directory is
3396     # removed, or if the path is relative.
3397     INSTALL="$ac_install_sh"
3398   fi
3399 fi
3400 echo "$ac_t""$INSTALL" 1>&6
3401
3402 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3403 # It thinks the first close brace ends the variable substitution.
3404 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3405
3406 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3407
3408 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3409
3410 for ac_prog in 'bison -y' byacc
3411 do
3412 # Extract the first word of "$ac_prog", so it can be a program name with args.
3413 set dummy $ac_prog; ac_word=$2
3414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3415 echo "configure:3416: checking for $ac_word" >&5
3416
3417 if test -n "$YACC"; then
3418   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3419 else
3420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3421   ac_dummy="$PATH"
3422   for ac_dir in $ac_dummy; do
3423     test -z "$ac_dir" && ac_dir=.
3424     if test -f $ac_dir/$ac_word; then
3425       ac_cv_prog_YACC="$ac_prog"
3426       break
3427     fi
3428   done
3429   IFS="$ac_save_ifs"
3430 fi
3431 YACC="$ac_cv_prog_YACC"
3432 if test -n "$YACC"; then
3433   echo "$ac_t""$YACC" 1>&6
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437
3438 test -n "$YACC" && break
3439 done
3440 test -n "$YACC" || YACC="yacc"
3441
3442
3443 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 
3444 do
3445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3447 echo "configure:3448: checking for $ac_hdr" >&5
3448
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 #include <$ac_hdr>
3453 EOF
3454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3455 { (eval echo configure:3456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3457 if test -z "$ac_err"; then
3458   rm -rf conftest*
3459   eval "ac_cv_header_$ac_safe=yes"
3460 else
3461   echo "$ac_err" >&5
3462   echo "configure: failed program was:" >&5
3463   cat conftest.$ac_ext >&5
3464   rm -rf conftest*
3465   eval "ac_cv_header_$ac_safe=no"
3466 fi
3467 rm -f conftest*
3468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3469   echo "$ac_t""yes" 1>&6
3470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3471   { test "$extra_verbose" = "yes" && cat << EOF
3472     Defining $ac_tr_hdr
3473 EOF
3474 cat >> confdefs.h <<EOF
3475 #define $ac_tr_hdr 1
3476 EOF
3477 }
3478  
3479 else
3480   echo "$ac_t""no" 1>&6
3481 fi
3482 done
3483
3484 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3485 echo "configure:3486: checking for sys/wait.h that is POSIX.1 compatible" >&5
3486
3487 cat > conftest.$ac_ext <<EOF
3488 #line 3489 "configure"
3489 #include "confdefs.h"
3490 #include <sys/types.h>
3491 #include <sys/wait.h>
3492 #ifndef WEXITSTATUS
3493 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3494 #endif
3495 #ifndef WIFEXITED
3496 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3497 #endif
3498 int main() {
3499 int s;
3500 wait (&s);
3501 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3502 ; return 0; }
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3505   rm -rf conftest*
3506   ac_cv_header_sys_wait_h=yes
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   ac_cv_header_sys_wait_h=no
3512 fi
3513 rm -f conftest*
3514
3515 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3516 if test $ac_cv_header_sys_wait_h = yes; then
3517   { test "$extra_verbose" = "yes" && cat << \EOF
3518     Defining HAVE_SYS_WAIT_H
3519 EOF
3520 cat >> confdefs.h <<\EOF
3521 #define HAVE_SYS_WAIT_H 1
3522 EOF
3523 }
3524
3525 fi
3526
3527 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3528 echo "configure:3529: checking for ANSI C header files" >&5
3529
3530 cat > conftest.$ac_ext <<EOF
3531 #line 3532 "configure"
3532 #include "confdefs.h"
3533 #include <stdlib.h>
3534 #include <stdarg.h>
3535 #include <string.h>
3536 #include <float.h>
3537 EOF
3538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3539 { (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3541 if test -z "$ac_err"; then
3542   rm -rf conftest*
3543   ac_cv_header_stdc=yes
3544 else
3545   echo "$ac_err" >&5
3546   echo "configure: failed program was:" >&5
3547   cat conftest.$ac_ext >&5
3548   rm -rf conftest*
3549   ac_cv_header_stdc=no
3550 fi
3551 rm -f conftest*
3552
3553 if test $ac_cv_header_stdc = yes; then
3554   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <string.h>
3559 EOF
3560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3561   egrep "memchr" >/dev/null 2>&1; then
3562   :
3563 else
3564   rm -rf conftest*
3565   ac_cv_header_stdc=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570
3571 if test $ac_cv_header_stdc = yes; then
3572   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3573 cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <stdlib.h>
3577 EOF
3578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3579   egrep "free" >/dev/null 2>&1; then
3580   :
3581 else
3582   rm -rf conftest*
3583   ac_cv_header_stdc=no
3584 fi
3585 rm -f conftest*
3586
3587 fi
3588
3589 if test $ac_cv_header_stdc = yes; then
3590   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3591 cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 #include <ctype.h>
3595 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3596 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3597 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3598 int main () { int i; for (i = 0; i < 256; i++)
3599 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3600 exit (0); }
3601
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3604 then
3605   :
3606 else
3607   conftest_rc="$?"
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -fr conftest*
3611   ac_cv_header_stdc=no
3612 fi
3613 rm -fr conftest*
3614 fi
3615
3616 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3617 if test $ac_cv_header_stdc = yes; then
3618   { test "$extra_verbose" = "yes" && cat << \EOF
3619     Defining STDC_HEADERS
3620 EOF
3621 cat >> confdefs.h <<\EOF
3622 #define STDC_HEADERS 1
3623 EOF
3624 }
3625
3626 fi
3627
3628 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3629 echo "configure:3630: checking whether time.h and sys/time.h may both be included" >&5
3630
3631 cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 #include <sys/types.h>
3635 #include <sys/time.h>
3636 #include <time.h>
3637 int main() {
3638 struct tm *tp;
3639 ; return 0; }
3640 EOF
3641 if { (eval echo configure:3642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3642   rm -rf conftest*
3643   ac_cv_header_time=yes
3644 else
3645   echo "configure: failed program was:" >&5
3646   cat conftest.$ac_ext >&5
3647   rm -rf conftest*
3648   ac_cv_header_time=no
3649 fi
3650 rm -f conftest*
3651
3652 echo "$ac_t""$ac_cv_header_time" 1>&6
3653 if test $ac_cv_header_time = yes; then
3654   { test "$extra_verbose" = "yes" && cat << \EOF
3655     Defining TIME_WITH_SYS_TIME
3656 EOF
3657 cat >> confdefs.h <<\EOF
3658 #define TIME_WITH_SYS_TIME 1
3659 EOF
3660 }
3661
3662 fi
3663
3664 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3665 echo "configure:3666: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3666
3667 cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670 #include <sys/types.h>
3671 #include <signal.h>
3672 /* NetBSD declares sys_siglist in unistd.h.  */
3673 #ifdef HAVE_UNISTD_H
3674 #include <unistd.h>
3675 #endif
3676 int main() {
3677 char *msg = *(sys_siglist + 1);
3678 ; return 0; }
3679 EOF
3680 if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3681   rm -rf conftest*
3682   ac_cv_decl_sys_siglist=yes
3683 else
3684   echo "configure: failed program was:" >&5
3685   cat conftest.$ac_ext >&5
3686   rm -rf conftest*
3687   ac_cv_decl_sys_siglist=no
3688 fi
3689 rm -f conftest*
3690
3691 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3692 if test $ac_cv_decl_sys_siglist = yes; then
3693   { test "$extra_verbose" = "yes" && cat << \EOF
3694     Defining SYS_SIGLIST_DECLARED
3695 EOF
3696 cat >> confdefs.h <<\EOF
3697 #define SYS_SIGLIST_DECLARED 1
3698 EOF
3699 }
3700
3701 fi
3702
3703
3704
3705 echo $ac_n "checking for utime""... $ac_c" 1>&6
3706 echo "configure:3707: checking for utime" >&5
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 #include <sys/types.h>
3711 #include <utime.h>
3712 int main() {
3713 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   echo "$ac_t""yes" 1>&6
3719    { test "$extra_verbose" = "yes" && cat << \EOF
3720     Defining HAVE_UTIME
3721 EOF
3722 cat >> confdefs.h <<\EOF
3723 #define HAVE_UTIME 1
3724 EOF
3725 }
3726
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   echo "$ac_t""no" 1>&6
3732       for ac_func in utimes
3733 do
3734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3735 echo "configure:3736: checking for $ac_func" >&5
3736
3737 cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740 /* System header to define __stub macros and hopefully few prototypes,
3741     which can conflict with char $ac_func(); below.  */
3742 #include <assert.h>
3743 /* Override any gcc2 internal prototype to avoid an error.  */
3744 /* We use char because int might match the return type of a gcc2
3745     builtin and then its argument prototype would still apply.  */
3746 char $ac_func();
3747
3748 int main() {
3749
3750 /* The GNU C library defines this for functions which it implements
3751     to always fail with ENOSYS.  Some functions are actually named
3752     something starting with __ and the normal name is an alias.  */
3753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3754 choke me
3755 #else
3756 $ac_func();
3757 #endif
3758
3759 ; return 0; }
3760 EOF
3761 if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3762   rm -rf conftest*
3763   eval "ac_cv_func_$ac_func=yes"
3764 else
3765   echo "configure: failed program was:" >&5
3766   cat conftest.$ac_ext >&5
3767   rm -rf conftest*
3768   eval "ac_cv_func_$ac_func=no"
3769 fi
3770 rm -f conftest*
3771
3772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3773   echo "$ac_t""yes" 1>&6
3774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3775   { test "$extra_verbose" = "yes" && cat << EOF
3776     Defining $ac_tr_func
3777 EOF
3778 cat >> confdefs.h <<EOF
3779 #define $ac_tr_func 1
3780 EOF
3781 }
3782  
3783 else
3784   echo "$ac_t""no" 1>&6
3785 fi
3786 done
3787
3788 fi
3789 rm -f conftest*
3790
3791
3792 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3793 echo "configure:3794: checking return type of signal handlers" >&5
3794
3795 cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #include <sys/types.h>
3799 #include <signal.h>
3800 #ifdef signal
3801 #undef signal
3802 #endif
3803 #ifdef __cplusplus
3804 extern "C" void (*signal (int, void (*)(int)))(int);
3805 #else
3806 void (*signal ()) ();
3807 #endif
3808
3809 int main() {
3810 int i;
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3814   rm -rf conftest*
3815   ac_cv_type_signal=void
3816 else
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819   rm -rf conftest*
3820   ac_cv_type_signal=int
3821 fi
3822 rm -f conftest*
3823
3824 echo "$ac_t""$ac_cv_type_signal" 1>&6
3825 { test "$extra_verbose" = "yes" && cat << EOF
3826     Defining RETSIGTYPE = $ac_cv_type_signal
3827 EOF
3828 cat >> confdefs.h <<EOF
3829 #define RETSIGTYPE $ac_cv_type_signal
3830 EOF
3831 }
3832
3833
3834 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3835 echo "configure:3836: checking for size_t" >&5
3836
3837 cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840 #include <sys/types.h>
3841 #if STDC_HEADERS
3842 #include <stdlib.h>
3843 #include <stddef.h>
3844 #endif
3845 EOF
3846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3847   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3848   rm -rf conftest*
3849   ac_cv_type_size_t=yes
3850 else
3851   rm -rf conftest*
3852   ac_cv_type_size_t=no
3853 fi
3854 rm -f conftest*
3855
3856 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3857 if test $ac_cv_type_size_t = no; then
3858   { test "$extra_verbose" = "yes" && cat << \EOF
3859     Defining size_t = unsigned
3860 EOF
3861 cat >> confdefs.h <<\EOF
3862 #define size_t unsigned
3863 EOF
3864 }
3865
3866 fi
3867
3868 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3869 echo "configure:3870: checking for pid_t" >&5
3870
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <sys/types.h>
3875 #if STDC_HEADERS
3876 #include <stdlib.h>
3877 #include <stddef.h>
3878 #endif
3879 EOF
3880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3881   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3882   rm -rf conftest*
3883   ac_cv_type_pid_t=yes
3884 else
3885   rm -rf conftest*
3886   ac_cv_type_pid_t=no
3887 fi
3888 rm -f conftest*
3889
3890 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3891 if test $ac_cv_type_pid_t = no; then
3892   { test "$extra_verbose" = "yes" && cat << \EOF
3893     Defining pid_t = int
3894 EOF
3895 cat >> confdefs.h <<\EOF
3896 #define pid_t int
3897 EOF
3898 }
3899
3900 fi
3901
3902 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3903 echo "configure:3904: checking for uid_t in sys/types.h" >&5
3904
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 #include <sys/types.h>
3909 EOF
3910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3911   egrep "uid_t" >/dev/null 2>&1; then
3912   rm -rf conftest*
3913   ac_cv_type_uid_t=yes
3914 else
3915   rm -rf conftest*
3916   ac_cv_type_uid_t=no
3917 fi
3918 rm -f conftest*
3919
3920
3921 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3922 if test $ac_cv_type_uid_t = no; then
3923   { test "$extra_verbose" = "yes" && cat << \EOF
3924     Defining uid_t = int
3925 EOF
3926 cat >> confdefs.h <<\EOF
3927 #define uid_t int
3928 EOF
3929 }
3930
3931   { test "$extra_verbose" = "yes" && cat << \EOF
3932     Defining gid_t = int
3933 EOF
3934 cat >> confdefs.h <<\EOF
3935 #define gid_t int
3936 EOF
3937 }
3938
3939 fi
3940
3941 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3942 echo "configure:3943: checking for mode_t" >&5
3943
3944 cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 #include <sys/types.h>
3948 #if STDC_HEADERS
3949 #include <stdlib.h>
3950 #include <stddef.h>
3951 #endif
3952 EOF
3953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3954   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3955   rm -rf conftest*
3956   ac_cv_type_mode_t=yes
3957 else
3958   rm -rf conftest*
3959   ac_cv_type_mode_t=no
3960 fi
3961 rm -f conftest*
3962
3963 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3964 if test $ac_cv_type_mode_t = no; then
3965   { test "$extra_verbose" = "yes" && cat << \EOF
3966     Defining mode_t = int
3967 EOF
3968 cat >> confdefs.h <<\EOF
3969 #define mode_t int
3970 EOF
3971 }
3972
3973 fi
3974
3975 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3976 echo "configure:3977: checking for off_t" >&5
3977
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 #include <sys/types.h>
3982 #if STDC_HEADERS
3983 #include <stdlib.h>
3984 #include <stddef.h>
3985 #endif
3986 EOF
3987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3988   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3989   rm -rf conftest*
3990   ac_cv_type_off_t=yes
3991 else
3992   rm -rf conftest*
3993   ac_cv_type_off_t=no
3994 fi
3995 rm -f conftest*
3996
3997 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3998 if test $ac_cv_type_off_t = no; then
3999   { test "$extra_verbose" = "yes" && cat << \EOF
4000     Defining off_t = long
4001 EOF
4002 cat >> confdefs.h <<\EOF
4003 #define off_t long
4004 EOF
4005 }
4006
4007 fi
4008
4009 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4010 echo "configure:4011: checking for ssize_t" >&5
4011
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <sys/types.h>
4016 #if STDC_HEADERS
4017 #include <stdlib.h>
4018 #include <stddef.h>
4019 #endif
4020 EOF
4021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4022   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4023   rm -rf conftest*
4024   ac_cv_type_ssize_t=yes
4025 else
4026   rm -rf conftest*
4027   ac_cv_type_ssize_t=no
4028 fi
4029 rm -f conftest*
4030
4031 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4032 if test $ac_cv_type_ssize_t = no; then
4033   { test "$extra_verbose" = "yes" && cat << \EOF
4034     Defining ssize_t = int
4035 EOF
4036 cat >> confdefs.h <<\EOF
4037 #define ssize_t int
4038 EOF
4039 }
4040
4041 fi
4042
4043
4044 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4045 echo "configure:4046: checking for socklen_t" >&5
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <sys/socket.h>
4050 socklen_t x;
4051
4052 int main() {
4053
4054 ; return 0; }
4055 EOF
4056 if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4057   rm -rf conftest*
4058   echo "$ac_t""yes" 1>&6
4059 else
4060   echo "configure: failed program was:" >&5
4061   cat conftest.$ac_ext >&5
4062   rm -rf conftest*
4063   
4064 cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <sys/socket.h>
4068 int accept (int, struct sockaddr *, size_t *);
4069
4070 int main() {
4071
4072 ; return 0; }
4073 EOF
4074 if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4075   rm -rf conftest*
4076   
4077 echo "$ac_t""size_t" 1>&6
4078 { test "$extra_verbose" = "yes" && cat << \EOF
4079     Defining socklen_t = size_t
4080 EOF
4081 cat >> confdefs.h <<\EOF
4082 #define socklen_t size_t
4083 EOF
4084 }
4085
4086 else
4087   echo "configure: failed program was:" >&5
4088   cat conftest.$ac_ext >&5
4089   rm -rf conftest*
4090   
4091 echo "$ac_t""int" 1>&6
4092 { test "$extra_verbose" = "yes" && cat << \EOF
4093     Defining socklen_t = int
4094 EOF
4095 cat >> confdefs.h <<\EOF
4096 #define socklen_t int
4097 EOF
4098 }
4099
4100 fi
4101 rm -f conftest*
4102 fi
4103 rm -f conftest*
4104
4105 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4106 echo "configure:4107: checking for struct timeval" >&5
4107 cat > conftest.$ac_ext <<EOF
4108 #line 4109 "configure"
4109 #include "confdefs.h"
4110 #ifdef TIME_WITH_SYS_TIME
4111 #include <sys/time.h>
4112 #include <time.h>
4113 #else
4114 #ifdef HAVE_SYS_TIME_H
4115 #include <sys/time.h>
4116 #else
4117 #include <time.h>
4118 #endif
4119 #endif
4120 int main() {
4121 static struct timeval x; x.tv_sec = x.tv_usec;
4122 ; return 0; }
4123 EOF
4124 if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4125   rm -rf conftest*
4126   echo "$ac_t""yes" 1>&6
4127   HAVE_TIMEVAL=yes
4128   { test "$extra_verbose" = "yes" && cat << \EOF
4129     Defining HAVE_TIMEVAL
4130 EOF
4131 cat >> confdefs.h <<\EOF
4132 #define HAVE_TIMEVAL 1
4133 EOF
4134 }
4135
4136 else
4137   echo "configure: failed program was:" >&5
4138   cat conftest.$ac_ext >&5
4139   rm -rf conftest*
4140   echo "$ac_t""no" 1>&6
4141    HAVE_TIMEVAL=no
4142 fi
4143 rm -f conftest*
4144
4145 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4146 echo "configure:4147: checking whether struct tm is in sys/time.h or time.h" >&5
4147
4148 cat > conftest.$ac_ext <<EOF
4149 #line 4150 "configure"
4150 #include "confdefs.h"
4151 #include <sys/types.h>
4152 #include <time.h>
4153 int main() {
4154 struct tm *tp; tp->tm_sec;
4155 ; return 0; }
4156 EOF
4157 if { (eval echo configure:4158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4158   rm -rf conftest*
4159   ac_cv_struct_tm=time.h
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   ac_cv_struct_tm=sys/time.h
4165 fi
4166 rm -f conftest*
4167
4168 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4169 if test $ac_cv_struct_tm = sys/time.h; then
4170   { test "$extra_verbose" = "yes" && cat << \EOF
4171     Defining TM_IN_SYS_TIME
4172 EOF
4173 cat >> confdefs.h <<\EOF
4174 #define TM_IN_SYS_TIME 1
4175 EOF
4176 }
4177
4178 fi
4179
4180 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4181 echo "configure:4182: checking for tm_zone in struct tm" >&5
4182
4183 cat > conftest.$ac_ext <<EOF
4184 #line 4185 "configure"
4185 #include "confdefs.h"
4186 #include <sys/types.h>
4187 #include <$ac_cv_struct_tm>
4188 int main() {
4189 struct tm tm; tm.tm_zone;
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193   rm -rf conftest*
4194   ac_cv_struct_tm_zone=yes
4195 else
4196   echo "configure: failed program was:" >&5
4197   cat conftest.$ac_ext >&5
4198   rm -rf conftest*
4199   ac_cv_struct_tm_zone=no
4200 fi
4201 rm -f conftest*
4202
4203 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4204 if test "$ac_cv_struct_tm_zone" = yes; then
4205   { test "$extra_verbose" = "yes" && cat << \EOF
4206     Defining HAVE_TM_ZONE
4207 EOF
4208 cat >> confdefs.h <<\EOF
4209 #define HAVE_TM_ZONE 1
4210 EOF
4211 }
4212
4213 else
4214   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4215 echo "configure:4216: checking for tzname" >&5
4216
4217 cat > conftest.$ac_ext <<EOF
4218 #line 4219 "configure"
4219 #include "confdefs.h"
4220 #include <time.h>
4221 #ifndef tzname /* For SGI.  */
4222 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4223 #endif
4224 int main() {
4225 atoi(*tzname);
4226 ; return 0; }
4227 EOF
4228 if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4229   rm -rf conftest*
4230   ac_cv_var_tzname=yes
4231 else
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   ac_cv_var_tzname=no
4236 fi
4237 rm -f conftest*
4238
4239 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4240   if test $ac_cv_var_tzname = yes; then
4241     { test "$extra_verbose" = "yes" && cat << \EOF
4242     Defining HAVE_TZNAME
4243 EOF
4244 cat >> confdefs.h <<\EOF
4245 #define HAVE_TZNAME 1
4246 EOF
4247 }
4248
4249   fi
4250 fi
4251
4252
4253 echo $ac_n "checking for working const""... $ac_c" 1>&6
4254 echo "configure:4255: checking for working const" >&5
4255
4256 cat > conftest.$ac_ext <<EOF
4257 #line 4258 "configure"
4258 #include "confdefs.h"
4259
4260 int main() {
4261
4262 /* Ultrix mips cc rejects this.  */
4263 typedef int charset[2]; const charset x;
4264 /* SunOS 4.1.1 cc rejects this.  */
4265 char const *const *ccp;
4266 char **p;
4267 /* NEC SVR4.0.2 mips cc rejects this.  */
4268 struct point {int x, y;};
4269 static struct point const zero = {0,0};
4270 /* AIX XL C 1.02.0.0 rejects this.
4271    It does not let you subtract one const X* pointer from another in an arm
4272    of an if-expression whose if-part is not a constant expression */
4273 const char *g = "string";
4274 ccp = &g + (g ? g-g : 0);
4275 /* HPUX 7.0 cc rejects these. */
4276 ++ccp;
4277 p = (char**) ccp;
4278 ccp = (char const *const *) p;
4279 { /* SCO 3.2v4 cc rejects this.  */
4280   char *t;
4281   char const *s = 0 ? (char *) 0 : (char const *) 0;
4282
4283   *t++ = 0;
4284 }
4285 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4286   int x[] = {25, 17};
4287   const int *foo = &x[0];
4288   ++foo;
4289 }
4290 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4291   typedef const int *iptr;
4292   iptr p = 0;
4293   ++p;
4294 }
4295 { /* AIX XL C 1.02.0.0 rejects this saying
4296      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4297   struct s { int j; const int *ap[3]; };
4298   struct s *b; b->j = 5;
4299 }
4300 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4301   const int foo = 10;
4302 }
4303
4304 ; return 0; }
4305 EOF
4306 if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4307   rm -rf conftest*
4308   ac_cv_c_const=yes
4309 else
4310   echo "configure: failed program was:" >&5
4311   cat conftest.$ac_ext >&5
4312   rm -rf conftest*
4313   ac_cv_c_const=no
4314 fi
4315 rm -f conftest*
4316
4317 echo "$ac_t""$ac_cv_c_const" 1>&6
4318 if test $ac_cv_c_const = no; then
4319   { test "$extra_verbose" = "yes" && cat << \EOF
4320     Defining const = 
4321 EOF
4322 cat >> confdefs.h <<\EOF
4323 #define const 
4324 EOF
4325 }
4326
4327 fi
4328
4329
4330 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4331 echo "configure:4332: checking whether ${MAKE-make} sets \${MAKE}" >&5
4332 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4333
4334 cat > conftestmake <<\EOF
4335 all:
4336         @echo 'ac_maketemp="${MAKE}"'
4337 EOF
4338 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4339 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4340 if test -n "$ac_maketemp"; then
4341   eval ac_cv_prog_make_${ac_make}_set=yes
4342 else
4343   eval ac_cv_prog_make_${ac_make}_set=no
4344 fi
4345 rm -f conftestmake
4346 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4347   echo "$ac_t""yes" 1>&6
4348   SET_MAKE=
4349 else
4350   echo "$ac_t""no" 1>&6
4351   SET_MAKE="MAKE=${MAKE-make}"
4352 fi
4353
4354
4355 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4356 echo "configure:4357: checking whether byte ordering is bigendian" >&5
4357
4358 ac_cv_c_bigendian=unknown
4359 # See if sys/param.h defines the BYTE_ORDER macro.
4360 cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <sys/types.h>
4364 #include <sys/param.h>
4365 int main() {
4366
4367 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4368  bogus endian macros
4369 #endif
4370 ; return 0; }
4371 EOF
4372 if { (eval echo configure:4373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4373   rm -rf conftest*
4374   # It does; now see whether it defined to BIG_ENDIAN or not.
4375 cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <sys/types.h>
4379 #include <sys/param.h>
4380 int main() {
4381
4382 #if BYTE_ORDER != BIG_ENDIAN
4383  not big endian
4384 #endif
4385 ; return 0; }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4388   rm -rf conftest*
4389   ac_cv_c_bigendian=yes
4390 else
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -rf conftest*
4394   ac_cv_c_bigendian=no
4395 fi
4396 rm -f conftest*
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400 fi
4401 rm -f conftest*
4402 if test $ac_cv_c_bigendian = unknown; then
4403 cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 main () {
4407   /* Are we little or big endian?  From Harbison&Steele.  */
4408   union
4409   {
4410     long l;
4411     char c[sizeof (long)];
4412   } u;
4413   u.l = 1;
4414   exit (u.c[sizeof (long) - 1] == 1);
4415 }
4416 EOF
4417 if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4418 then
4419   ac_cv_c_bigendian=no
4420 else
4421   conftest_rc="$?"
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -fr conftest*
4425   ac_cv_c_bigendian=yes
4426 fi
4427 rm -fr conftest*
4428 fi
4429
4430 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4431 if test $ac_cv_c_bigendian = yes; then
4432   { test "$extra_verbose" = "yes" && cat << \EOF
4433     Defining WORDS_BIGENDIAN
4434 EOF
4435 cat >> confdefs.h <<\EOF
4436 #define WORDS_BIGENDIAN 1
4437 EOF
4438 }
4439
4440 fi
4441
4442
4443 echo $ac_n "checking size of short""... $ac_c" 1>&6
4444 echo "configure:4445: checking size of short" >&5
4445
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449 #include <stdio.h>
4450 #include <sys/types.h>
4451 main()
4452 {
4453   FILE *f=fopen("conftestval", "w");
4454   if (!f) exit(1);
4455   fprintf(f, "%d\n", sizeof(short));
4456   exit(0);
4457 }
4458 EOF
4459 if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4460 then
4461   ac_cv_sizeof_short=`cat conftestval`
4462 else
4463   conftest_rc="$?"
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466   rm -fr conftest*
4467   ac_cv_sizeof_short=0
4468 fi
4469 rm -fr conftest*
4470 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4471 { test "$extra_verbose" = "yes" && cat << EOF
4472     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4473 EOF
4474 cat >> confdefs.h <<EOF
4475 #define SIZEOF_SHORT $ac_cv_sizeof_short
4476 EOF
4477 }
4478
4479
4480 if test "$ac_cv_sizeof_short" = 0; then
4481   echo ""
4482   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4483   echo "*** PANIC *** Please examine config.log for compilation errors."
4484   exit 1
4485 fi
4486 echo $ac_n "checking size of int""... $ac_c" 1>&6
4487 echo "configure:4488: checking size of int" >&5
4488
4489 cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <stdio.h>
4493 #include <sys/types.h>
4494 main()
4495 {
4496   FILE *f=fopen("conftestval", "w");
4497   if (!f) exit(1);
4498   fprintf(f, "%d\n", sizeof(int));
4499   exit(0);
4500 }
4501 EOF
4502 if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4503 then
4504   ac_cv_sizeof_int=`cat conftestval`
4505 else
4506   conftest_rc="$?"
4507   echo "configure: failed program was:" >&5
4508   cat conftest.$ac_ext >&5
4509   rm -fr conftest*
4510   ac_cv_sizeof_int=0
4511 fi
4512 rm -fr conftest*
4513 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4514 { test "$extra_verbose" = "yes" && cat << EOF
4515     Defining SIZEOF_INT = $ac_cv_sizeof_int
4516 EOF
4517 cat >> confdefs.h <<EOF
4518 #define SIZEOF_INT $ac_cv_sizeof_int
4519 EOF
4520 }
4521
4522
4523 echo $ac_n "checking size of long""... $ac_c" 1>&6
4524 echo "configure:4525: checking size of long" >&5
4525
4526 cat > conftest.$ac_ext <<EOF
4527 #line 4528 "configure"
4528 #include "confdefs.h"
4529 #include <stdio.h>
4530 #include <sys/types.h>
4531 main()
4532 {
4533   FILE *f=fopen("conftestval", "w");
4534   if (!f) exit(1);
4535   fprintf(f, "%d\n", sizeof(long));
4536   exit(0);
4537 }
4538 EOF
4539 if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4540 then
4541   ac_cv_sizeof_long=`cat conftestval`
4542 else
4543   conftest_rc="$?"
4544   echo "configure: failed program was:" >&5
4545   cat conftest.$ac_ext >&5
4546   rm -fr conftest*
4547   ac_cv_sizeof_long=0
4548 fi
4549 rm -fr conftest*
4550 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4551 { test "$extra_verbose" = "yes" && cat << EOF
4552     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4553 EOF
4554 cat >> confdefs.h <<EOF
4555 #define SIZEOF_LONG $ac_cv_sizeof_long
4556 EOF
4557 }
4558
4559
4560 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4561 echo "configure:4562: checking size of long long" >&5
4562
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #include <stdio.h>
4567 #include <sys/types.h>
4568 main()
4569 {
4570   FILE *f=fopen("conftestval", "w");
4571   if (!f) exit(1);
4572   fprintf(f, "%d\n", sizeof(long long));
4573   exit(0);
4574 }
4575 EOF
4576 if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4577 then
4578   ac_cv_sizeof_long_long=`cat conftestval`
4579 else
4580   conftest_rc="$?"
4581   echo "configure: failed program was:" >&5
4582   cat conftest.$ac_ext >&5
4583   rm -fr conftest*
4584   ac_cv_sizeof_long_long=0
4585 fi
4586 rm -fr conftest*
4587 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4588 { test "$extra_verbose" = "yes" && cat << EOF
4589     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4590 EOF
4591 cat >> confdefs.h <<EOF
4592 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4593 EOF
4594 }
4595
4596
4597 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4598 echo "configure:4599: checking size of void *" >&5
4599
4600 cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4603 #include <stdio.h>
4604 #include <sys/types.h>
4605 main()
4606 {
4607   FILE *f=fopen("conftestval", "w");
4608   if (!f) exit(1);
4609   fprintf(f, "%d\n", sizeof(void *));
4610   exit(0);
4611 }
4612 EOF
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4614 then
4615   ac_cv_sizeof_void_p=`cat conftestval`
4616 else
4617   conftest_rc="$?"
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -fr conftest*
4621   ac_cv_sizeof_void_p=0
4622 fi
4623 rm -fr conftest*
4624 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4625 { test "$extra_verbose" = "yes" && cat << EOF
4626     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4627 EOF
4628 cat >> confdefs.h <<EOF
4629 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4630 EOF
4631 }
4632
4633
4634
4635 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4636 echo "configure:4637: checking for long file names" >&5
4637
4638 ac_cv_sys_long_file_names=yes
4639 # Test for long file names in all the places we know might matter:
4640 #      .                the current directory, where building will happen
4641 #      $prefix/lib      where we will be installing things
4642 #      $exec_prefix/lib likewise
4643 # eval it to expand exec_prefix.
4644 #      $TMPDIR          if set, where it might want to write temporary files
4645 # if $TMPDIR is not set:
4646 #      /tmp             where it might want to write temporary files
4647 #      /var/tmp         likewise
4648 #      /usr/tmp         likewise
4649 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4650   ac_tmpdirs="$TMPDIR"
4651 else
4652   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4653 fi
4654 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4655   test -d $ac_dir || continue
4656   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4657   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4658   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4659   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4660   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4661     ac_cv_sys_long_file_names=no
4662     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4663     break
4664   fi
4665   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4666 done
4667
4668 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4669 if test $ac_cv_sys_long_file_names = yes; then
4670   { test "$extra_verbose" = "yes" && cat << \EOF
4671     Defining HAVE_LONG_FILE_NAMES
4672 EOF
4673 cat >> confdefs.h <<\EOF
4674 #define HAVE_LONG_FILE_NAMES 1
4675 EOF
4676 }
4677
4678 fi
4679
4680
4681 echo $ac_n "checking for sin""... $ac_c" 1>&6
4682 echo "configure:4683: checking for sin" >&5
4683
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 /* System header to define __stub macros and hopefully few prototypes,
4688     which can conflict with char sin(); below.  */
4689 #include <assert.h>
4690 /* Override any gcc2 internal prototype to avoid an error.  */
4691 /* We use char because int might match the return type of a gcc2
4692     builtin and then its argument prototype would still apply.  */
4693 char sin();
4694
4695 int main() {
4696
4697 /* The GNU C library defines this for functions which it implements
4698     to always fail with ENOSYS.  Some functions are actually named
4699     something starting with __ and the normal name is an alias.  */
4700 #if defined (__stub_sin) || defined (__stub___sin)
4701 choke me
4702 #else
4703 sin();
4704 #endif
4705
4706 ; return 0; }
4707 EOF
4708 if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4709   rm -rf conftest*
4710   eval "ac_cv_func_sin=yes"
4711 else
4712   echo "configure: failed program was:" >&5
4713   cat conftest.$ac_ext >&5
4714   rm -rf conftest*
4715   eval "ac_cv_func_sin=no"
4716 fi
4717 rm -f conftest*
4718
4719 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4720   echo "$ac_t""yes" 1>&6
4721   :
4722 else
4723   echo "$ac_t""no" 1>&6
4724
4725 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4726 echo "configure:4727: checking for sin in -lm" >&5
4727 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4728
4729 xe_check_libs=" -lm "
4730 cat > conftest.$ac_ext <<EOF
4731 #line 4732 "configure"
4732 #include "confdefs.h"
4733 /* Override any gcc2 internal prototype to avoid an error.  */
4734 /* We use char because int might match the return type of a gcc2
4735     builtin and then its argument prototype would still apply.  */
4736 char sin();
4737
4738 int main() {
4739 sin()
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   eval "ac_cv_lib_$ac_lib_var=yes"
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   eval "ac_cv_lib_$ac_lib_var=no"
4750 fi
4751 rm -f conftest*
4752 xe_check_libs=""
4753
4754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4755   echo "$ac_t""yes" 1>&6
4756     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4757     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4758   { test "$extra_verbose" = "yes" && cat << EOF
4759     Defining $ac_tr_lib
4760 EOF
4761 cat >> confdefs.h <<EOF
4762 #define $ac_tr_lib 1
4763 EOF
4764 }
4765
4766   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4767
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772
4773 fi
4774
4775
4776 { test "$extra_verbose" = "yes" && cat << \EOF
4777     Defining LISP_FLOAT_TYPE
4778 EOF
4779 cat >> confdefs.h <<\EOF
4780 #define LISP_FLOAT_TYPE 1
4781 EOF
4782 }
4783
4784
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <math.h>
4789 int main() {
4790 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4791 ; return 0; }
4792 EOF
4793 if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4794   rm -rf conftest*
4795   { test "$extra_verbose" = "yes" && cat << \EOF
4796     Defining HAVE_INVERSE_HYPERBOLIC
4797 EOF
4798 cat >> confdefs.h <<\EOF
4799 #define HAVE_INVERSE_HYPERBOLIC 1
4800 EOF
4801 }
4802
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806 fi
4807 rm -f conftest*
4808
4809 echo "checking type of mail spool file locking" 1>&6
4810 echo "configure:4811: checking type of mail spool file locking" >&5
4811 for ac_func in lockf flock
4812 do
4813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4814 echo "configure:4815: checking for $ac_func" >&5
4815
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819 /* System header to define __stub macros and hopefully few prototypes,
4820     which can conflict with char $ac_func(); below.  */
4821 #include <assert.h>
4822 /* Override any gcc2 internal prototype to avoid an error.  */
4823 /* We use char because int might match the return type of a gcc2
4824     builtin and then its argument prototype would still apply.  */
4825 char $ac_func();
4826
4827 int main() {
4828
4829 /* The GNU C library defines this for functions which it implements
4830     to always fail with ENOSYS.  Some functions are actually named
4831     something starting with __ and the normal name is an alias.  */
4832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4833 choke me
4834 #else
4835 $ac_func();
4836 #endif
4837
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_func_$ac_func=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_func_$ac_func=no"
4848 fi
4849 rm -f conftest*
4850
4851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4852   echo "$ac_t""yes" 1>&6
4853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4854   { test "$extra_verbose" = "yes" && cat << EOF
4855     Defining $ac_tr_func
4856 EOF
4857 cat >> confdefs.h <<EOF
4858 #define $ac_tr_func 1
4859 EOF
4860 }
4861  
4862 else
4863   echo "$ac_t""no" 1>&6
4864 fi
4865 done
4866
4867 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4868 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4869 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4870 if   test -z "$mail_locking"; then
4871   case "$opsys" in cygwin* | mingw*)
4872     mail_locking=pop ;;
4873   esac
4874 fi
4875
4876 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4877     Defining MAIL_LOCK_LOCKF
4878 EOF
4879 cat >> confdefs.h <<\EOF
4880 #define MAIL_LOCK_LOCKF 1
4881 EOF
4882 }
4883
4884 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4885     Defining MAIL_LOCK_FLOCK
4886 EOF
4887 cat >> confdefs.h <<\EOF
4888 #define MAIL_LOCK_FLOCK 1
4889 EOF
4890 }
4891
4892 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4893     Defining MAIL_LOCK_LOCKING
4894 EOF
4895 cat >> confdefs.h <<\EOF
4896 #define MAIL_LOCK_LOCKING 1
4897 EOF
4898 }
4899
4900 elif test "$mail_locking" = "pop"; then
4901   with_pop=yes
4902   mail_locking=
4903 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4904     Defining MAIL_LOCK_DOT
4905 EOF
4906 cat >> confdefs.h <<\EOF
4907 #define MAIL_LOCK_DOT 1
4908 EOF
4909 }
4910
4911 fi
4912 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4913   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4914 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4915   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4916 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4917   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4918
4919 case "$opsys" in decosf*)
4920   
4921 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4922 echo "configure:4923: checking for cma_open in -lpthreads" >&5
4923 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4924
4925 xe_check_libs=" -lpthreads "
4926 cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929 /* Override any gcc2 internal prototype to avoid an error.  */
4930 /* We use char because int might match the return type of a gcc2
4931     builtin and then its argument prototype would still apply.  */
4932 char cma_open();
4933
4934 int main() {
4935 cma_open()
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4939   rm -rf conftest*
4940   eval "ac_cv_lib_$ac_lib_var=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=no"
4946 fi
4947 rm -f conftest*
4948 xe_check_libs=""
4949
4950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4951   echo "$ac_t""yes" 1>&6
4952     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4953     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4954   { test "$extra_verbose" = "yes" && cat << EOF
4955     Defining $ac_tr_lib
4956 EOF
4957 cat >> confdefs.h <<EOF
4958 #define $ac_tr_lib 1
4959 EOF
4960 }
4961
4962   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4963
4964 else
4965   echo "$ac_t""no" 1>&6
4966 fi
4967
4968
4969   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4970     c_switch_site="$c_switch_site -threads" ;;
4971 esac
4972
4973 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4974 echo "configure:4975: checking whether the -xildoff compiler flag is required" >&5
4975 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4976   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4977     then echo "$ac_t""no" 1>&6;
4978     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
4979   fi
4980   else echo "$ac_t""no" 1>&6
4981 fi
4982
4983 if test "$opsys" = "sol2"; then
4984   if test "$os_release" -ge 56; then
4985     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4986 echo "configure:4987: checking for \"-z ignore\" linker flag" >&5
4987     case "`ld -h 2>&1`" in
4988       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4989         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4990       *) echo "$ac_t""no" 1>&6 ;;
4991     esac
4992   fi
4993 fi
4994
4995
4996 echo "checking "for specified window system"" 1>&6
4997 echo "configure:4998: checking "for specified window system"" >&5
4998
4999
5000 GNOME_CONFIG=no
5001 GTK_CONFIG=no
5002
5003 if test "$with_gnome" != "no"; then
5004    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5005 echo "configure:5006: checking for GNOME configuration script" >&5
5006    for possible in gnome-config
5007    do
5008       possible_version=`${possible} --version 2> /dev/null`
5009       if test "x${possible_version}" != "x"; then
5010               GNOME_CONFIG="${possible}"
5011               with_gnome=yes
5012               with_gtk=yes
5013               break
5014       fi
5015    done
5016    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5017 fi
5018
5019 if test "${GNOME_CONFIG}" != "no"; then
5020       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5021       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5022       { test "$extra_verbose" = "yes" && cat << \EOF
5023     Defining HAVE_GNOME
5024 EOF
5025 cat >> confdefs.h <<\EOF
5026 #define HAVE_GNOME 1
5027 EOF
5028 }
5029
5030       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5031       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5032 fi
5033
5034 if test "$with_gtk" != "no";then
5035    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5036 echo "configure:5037: checking for GTK configuration script" >&5
5037    for possible in gtk12-config gtk14-config gtk-config
5038    do
5039       possible_version=`${possible} --version 2> /dev/null`
5040       if test "x${possible_version}" != "x"; then
5041               GTK_CONFIG="${possible}"
5042       fi
5043       case "${possible_version}" in
5044         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5045         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5046         1.2.*)
5047                 with_gtk=yes
5048                 break
5049                 ;;
5050         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5051       esac
5052    done
5053    echo "$ac_t""${GTK_CONFIG}" 1>&6
5054 fi
5055
5056 if test "${GTK_CONFIG}" != "no"; then
5057       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5058 echo "configure:5059: checking gtk version" >&5
5059       GTK_VERSION=`${GTK_CONFIG} --version`
5060       echo "$ac_t""${GTK_VERSION}" 1>&6
5061
5062       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5063 echo "configure:5064: checking gtk libs" >&5
5064       GTK_LIBS=`${GTK_CONFIG} --libs`
5065       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5066       echo "$ac_t""${GTK_LIBS}" 1>&6
5067
5068       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5069 echo "configure:5070: checking gtk cflags" >&5
5070       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5071       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5072       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5073
5074       
5075 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5076 echo "configure:5077: checking for main in -lgdk_imlib" >&5
5077 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5078
5079 xe_check_libs=" -lgdk_imlib "
5080 cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083
5084 int main() {
5085 main()
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5089   rm -rf conftest*
5090   eval "ac_cv_lib_$ac_lib_var=yes"
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=no"
5096 fi
5097 rm -f conftest*
5098 xe_check_libs=""
5099
5100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5101   echo "$ac_t""yes" 1>&6
5102   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5103 else
5104   echo "$ac_t""no" 1>&6
5105 fi
5106
5107
5108       
5109 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5110 echo "configure:5111: checking for Imlib_init in -lImlib" >&5
5111 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5112
5113 xe_check_libs=" -lImlib "
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 /* Override any gcc2 internal prototype to avoid an error.  */
5118 /* We use char because int might match the return type of a gcc2
5119     builtin and then its argument prototype would still apply.  */
5120 char Imlib_init();
5121
5122 int main() {
5123 Imlib_init()
5124 ; return 0; }
5125 EOF
5126 if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5127   rm -rf conftest*
5128   eval "ac_cv_lib_$ac_lib_var=yes"
5129 else
5130   echo "configure: failed program was:" >&5
5131   cat conftest.$ac_ext >&5
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=no"
5134 fi
5135 rm -f conftest*
5136 xe_check_libs=""
5137
5138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5139   echo "$ac_t""yes" 1>&6
5140   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5141 else
5142   echo "$ac_t""no" 1>&6
5143 fi
5144
5145
5146       for ac_func in gdk_imlib_init
5147 do
5148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5149 echo "configure:5150: checking for $ac_func" >&5
5150
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 /* System header to define __stub macros and hopefully few prototypes,
5155     which can conflict with char $ac_func(); below.  */
5156 #include <assert.h>
5157 /* Override any gcc2 internal prototype to avoid an error.  */
5158 /* We use char because int might match the return type of a gcc2
5159     builtin and then its argument prototype would still apply.  */
5160 char $ac_func();
5161
5162 int main() {
5163
5164 /* The GNU C library defines this for functions which it implements
5165     to always fail with ENOSYS.  Some functions are actually named
5166     something starting with __ and the normal name is an alias.  */
5167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5168 choke me
5169 #else
5170 $ac_func();
5171 #endif
5172
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   eval "ac_cv_func_$ac_func=yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   eval "ac_cv_func_$ac_func=no"
5183 fi
5184 rm -f conftest*
5185
5186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5187   echo "$ac_t""yes" 1>&6
5188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5189   { test "$extra_verbose" = "yes" && cat << EOF
5190     Defining $ac_tr_func
5191 EOF
5192 cat >> confdefs.h <<EOF
5193 #define $ac_tr_func 1
5194 EOF
5195 }
5196  
5197 else
5198   echo "$ac_t""no" 1>&6
5199 fi
5200 done
5201
5202
5203       { test "$extra_verbose" = "yes" && cat << \EOF
5204     Defining HAVE_XPM
5205 EOF
5206 cat >> confdefs.h <<\EOF
5207 #define HAVE_XPM 1
5208 EOF
5209 }
5210
5211       { test "$extra_verbose" = "yes" && cat << \EOF
5212     Defining HAVE_GTK
5213 EOF
5214 cat >> confdefs.h <<\EOF
5215 #define HAVE_GTK 1
5216 EOF
5217 }
5218
5219       
5220
5221       window_system=gtk
5222       with_gtk=yes
5223       with_x11=no
5224
5225       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5226       test "${with_toolbars}" != no && with_toolbars=gtk
5227       test "${with_menubars}" != "no" && with_menubars=gtk
5228       test "${with_dialogs}" != "no" && with_dialogs=gtk
5229       test "${with_widgets}" != "no" && with_widgets=gtk
5230
5231       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5232    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5233  fi
5234       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5235    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5236  fi
5237       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5238    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5239  fi
5240       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5241    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5242  fi
5243
5244             OLD_CFLAGS="${CFLAGS}"
5245       OLD_LDFLAGS="${LDFLAGS}"
5246       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5247       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5248       for ac_hdr in glade/glade.h glade.h
5249 do
5250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5252 echo "configure:5253: checking for $ac_hdr" >&5
5253
5254 cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257 #include <$ac_hdr>
5258 EOF
5259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5260 { (eval echo configure:5261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5262 if test -z "$ac_err"; then
5263   rm -rf conftest*
5264   eval "ac_cv_header_$ac_safe=yes"
5265 else
5266   echo "$ac_err" >&5
5267   echo "configure: failed program was:" >&5
5268   cat conftest.$ac_ext >&5
5269   rm -rf conftest*
5270   eval "ac_cv_header_$ac_safe=no"
5271 fi
5272 rm -f conftest*
5273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5274   echo "$ac_t""yes" 1>&6
5275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5276   { test "$extra_verbose" = "yes" && cat << EOF
5277     Defining $ac_tr_hdr
5278 EOF
5279 cat >> confdefs.h <<EOF
5280 #define $ac_tr_hdr 1
5281 EOF
5282 }
5283  
5284 else
5285   echo "$ac_t""no" 1>&6
5286 fi
5287 done
5288
5289       
5290 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5291 echo "configure:5292: checking for main in -lxml" >&5
5292 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5293
5294 xe_check_libs=" -lxml "
5295 cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298
5299 int main() {
5300 main()
5301 ; return 0; }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5304   rm -rf conftest*
5305   eval "ac_cv_lib_$ac_lib_var=yes"
5306 else
5307   echo "configure: failed program was:" >&5
5308   cat conftest.$ac_ext >&5
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=no"
5311 fi
5312 rm -f conftest*
5313 xe_check_libs=""
5314
5315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5316   echo "$ac_t""yes" 1>&6
5317   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5318 else
5319   echo "$ac_t""no" 1>&6
5320 fi
5321
5322
5323       
5324 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5325 echo "configure:5326: checking for main in -lglade" >&5
5326 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5327
5328 xe_check_libs=" -lglade "
5329 cat > conftest.$ac_ext <<EOF
5330 #line 5331 "configure"
5331 #include "confdefs.h"
5332
5333 int main() {
5334 main()
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=yes"
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   eval "ac_cv_lib_$ac_lib_var=no"
5345 fi
5346 rm -f conftest*
5347 xe_check_libs=""
5348
5349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5350   echo "$ac_t""yes" 1>&6
5351   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5352 else
5353   echo "$ac_t""no" 1>&6
5354 fi
5355
5356
5357       
5358 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5359 echo "configure:5360: checking for main in -lglade-gnome" >&5
5360 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5361
5362 xe_check_libs=" -lglade-gnome "
5363 cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366
5367 int main() {
5368 main()
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5372   rm -rf conftest*
5373   eval "ac_cv_lib_$ac_lib_var=yes"
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=no"
5379 fi
5380 rm -f conftest*
5381 xe_check_libs=""
5382
5383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5384   echo "$ac_t""yes" 1>&6
5385   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5386 else
5387   echo "$ac_t""no" 1>&6
5388 fi
5389
5390
5391       cat > conftest.$ac_ext <<EOF
5392 #line 5393 "configure"
5393 #include "confdefs.h"
5394 #include <glade/glade-xml.h>
5395 EOF
5396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5397   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5398   rm -rf conftest*
5399   echo "$ac_t""yes" 1>&6
5400                        { test "$extra_verbose" = "yes" && cat << \EOF
5401     Defining LIBGLADE_XML_TXTDOMAIN = 1
5402 EOF
5403 cat >> confdefs.h <<\EOF
5404 #define LIBGLADE_XML_TXTDOMAIN 1
5405 EOF
5406 }
5407
5408 else
5409   rm -rf conftest*
5410   echo "$ac_t""no" 1>&6
5411 fi
5412 rm -f conftest*
5413
5414       CFLAGS="${OLD_CFLAGS}"
5415       LDFLAGS="${OLD_LDFLAGS}"
5416 fi
5417
5418
5419 if test "$with_x11" != "no"; then
5420     test "$x_includes $x_libraries" != "NONE NONE" && \
5421    window_system=x11 with_x11=yes
5422
5423         
5424       if test "$x_includes $x_libraries" = "NONE NONE" \
5425     -a -n "$OPENWINHOME" \
5426     -a "$OPENWINHOME" != "/usr/openwin" \
5427     -a -d "$OPENWINHOME"; then
5428       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5429       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5430       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5431   fi
5432
5433   if test "$x_includes" = "NONE"; then
5434                     for dir in "/usr/X11" "/usr/X11R6"; do
5435       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5436     done
5437   fi
5438
5439   if test "$x_libraries" = "NONE"; then
5440     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5441       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5442     done
5443   fi
5444
5445   # If we find X, set shell vars x_includes and x_libraries to the
5446 # paths, otherwise set no_x=yes.
5447 # Uses ac_ vars as temps to allow command line to override cache and checks.
5448 # --without-x overrides everything else, but does not touch the cache.
5449 echo $ac_n "checking for X""... $ac_c" 1>&6
5450 echo "configure:5451: checking for X" >&5
5451
5452 # Check whether --with-x or --without-x was given.
5453 if test "${with_x+set}" = set; then
5454   withval="$with_x"
5455   :
5456 fi
5457
5458 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5459 if test "x$with_x" = xno; then
5460   # The user explicitly disabled X.
5461   have_x=disabled
5462 else
5463   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5464     # Both variables are already set.
5465     have_x=yes
5466   else
5467
5468 # One or both of the vars are not set, and there is no cached value.
5469 ac_x_includes=NO ac_x_libraries=NO
5470 rm -fr conftestdir
5471 if mkdir conftestdir; then
5472   cd conftestdir
5473   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5474   cat > Imakefile <<'EOF'
5475 acfindx:
5476         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5477 EOF
5478   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5479     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5480     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5481     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5482     for ac_extension in a so sl; do
5483       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5484         test -f $ac_im_libdir/libX11.$ac_extension; then
5485         ac_im_usrlibdir=$ac_im_libdir; break
5486       fi
5487     done
5488     # Screen out bogus values from the imake configuration.  They are
5489     # bogus both because they are the default anyway, and because
5490     # using them would break gcc on systems where it needs fixed includes.
5491     case "$ac_im_incroot" in
5492         /usr/include) ;;
5493         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5494     esac
5495     case "$ac_im_usrlibdir" in
5496         /usr/lib | /lib) ;;
5497         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5498     esac
5499   fi
5500   cd ..
5501   rm -fr conftestdir
5502 fi
5503
5504 if test "$ac_x_includes" = NO; then
5505   # Guess where to find include files, by looking for this one X11 .h file.
5506   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5507
5508   # First, try using that file with no special directory specified.
5509 cat > conftest.$ac_ext <<EOF
5510 #line 5511 "configure"
5511 #include "confdefs.h"
5512 #include <$x_direct_test_include>
5513 EOF
5514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5515 { (eval echo configure:5516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5517 if test -z "$ac_err"; then
5518   rm -rf conftest*
5519   # We can compile using X headers with no special include directory.
5520 ac_x_includes=
5521 else
5522   echo "$ac_err" >&5
5523   echo "configure: failed program was:" >&5
5524   cat conftest.$ac_ext >&5
5525   rm -rf conftest*
5526   # Look for the header file in a standard set of common directories.
5527 # Check X11 before X11Rn because it is often a symlink to the current release.
5528   for ac_dir in               \
5529     /usr/X11/include          \
5530     /usr/X11R6/include        \
5531     /usr/X11R5/include        \
5532     /usr/X11R4/include        \
5533                               \
5534     /usr/include/X11          \
5535     /usr/include/X11R6        \
5536     /usr/include/X11R5        \
5537     /usr/include/X11R4        \
5538                               \
5539     /usr/local/X11/include    \
5540     /usr/local/X11R6/include  \
5541     /usr/local/X11R5/include  \
5542     /usr/local/X11R4/include  \
5543                               \
5544     /usr/local/include/X11    \
5545     /usr/local/include/X11R6  \
5546     /usr/local/include/X11R5  \
5547     /usr/local/include/X11R4  \
5548                               \
5549     /usr/X386/include         \
5550     /usr/x386/include         \
5551     /usr/XFree86/include/X11  \
5552                               \
5553     /usr/include              \
5554     /usr/local/include        \
5555     /usr/unsupported/include  \
5556     /usr/athena/include       \
5557     /usr/local/x11r5/include  \
5558     /usr/lpp/Xamples/include  \
5559                               \
5560     /usr/openwin/include      \
5561     /usr/openwin/share/include \
5562     ; \
5563   do
5564     if test -r "$ac_dir/$x_direct_test_include"; then
5565       ac_x_includes=$ac_dir
5566       break
5567     fi
5568   done
5569 fi
5570 rm -f conftest*
5571 fi # $ac_x_includes = NO
5572
5573 if test "$ac_x_libraries" = NO; then
5574   # Check for the libraries.
5575
5576   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5577   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5578
5579   # See if we find them without any special options.
5580   # Don't add to $LIBS permanently.
5581   ac_save_LIBS="$LIBS"
5582   LIBS="-l$x_direct_test_library $LIBS"
5583 cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586
5587 int main() {
5588 ${x_direct_test_function}()
5589 ; return 0; }
5590 EOF
5591 if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5592   rm -rf conftest*
5593   LIBS="$ac_save_LIBS"
5594 # We can link X programs with no special library path.
5595 ac_x_libraries=
5596 else
5597   echo "configure: failed program was:" >&5
5598   cat conftest.$ac_ext >&5
5599   rm -rf conftest*
5600   LIBS="$ac_save_LIBS"
5601 # First see if replacing the include by lib works.
5602 # Check X11 before X11Rn because it is often a symlink to the current release.
5603 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5604     /usr/X11/lib          \
5605     /usr/X11R6/lib        \
5606     /usr/X11R5/lib        \
5607     /usr/X11R4/lib        \
5608                           \
5609     /usr/lib/X11          \
5610     /usr/lib/X11R6        \
5611     /usr/lib/X11R5        \
5612     /usr/lib/X11R4        \
5613                           \
5614     /usr/local/X11/lib    \
5615     /usr/local/X11R6/lib  \
5616     /usr/local/X11R5/lib  \
5617     /usr/local/X11R4/lib  \
5618                           \
5619     /usr/local/lib/X11    \
5620     /usr/local/lib/X11R6  \
5621     /usr/local/lib/X11R5  \
5622     /usr/local/lib/X11R4  \
5623                           \
5624     /usr/X386/lib         \
5625     /usr/x386/lib         \
5626     /usr/XFree86/lib/X11  \
5627                           \
5628     /usr/lib              \
5629     /usr/local/lib        \
5630     /usr/unsupported/lib  \
5631     /usr/athena/lib       \
5632     /usr/local/x11r5/lib  \
5633     /usr/lpp/Xamples/lib  \
5634     /lib/usr/lib/X11      \
5635                           \
5636     /usr/openwin/lib      \
5637     /usr/openwin/share/lib \
5638     ; \
5639 do
5640   for ac_extension in a so sl; do
5641     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5642       ac_x_libraries=$ac_dir
5643       break 2
5644     fi
5645   done
5646 done
5647 fi
5648 rm -f conftest*
5649 fi # $ac_x_libraries = NO
5650
5651 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5652   # Didn't find X anywhere.  Cache the known absence of X.
5653   ac_cv_have_x="have_x=no"
5654 else
5655   # Record where we found X for the cache.
5656   ac_cv_have_x="have_x=yes \
5657                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5658 fi
5659   fi
5660   eval "$ac_cv_have_x"
5661 fi # $with_x != no
5662
5663 if test "$have_x" != yes; then
5664   echo "$ac_t""$have_x" 1>&6
5665   no_x=yes
5666 else
5667   # If each of the values was on the command line, it overrides each guess.
5668   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5669   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5670   # Update the cache value to reflect the command line values.
5671   ac_cv_have_x="have_x=yes \
5672                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5673   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5674 fi
5675
5676 if test "$no_x" = yes; then
5677   # Not all programs may use this symbol, but it does not hurt to define it.
5678   { test "$extra_verbose" = "yes" && cat << \EOF
5679     Defining X_DISPLAY_MISSING
5680 EOF
5681 cat >> confdefs.h <<\EOF
5682 #define X_DISPLAY_MISSING 1
5683 EOF
5684 }
5685
5686   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5687 else
5688   if test -n "$x_includes"; then
5689     X_CFLAGS="$X_CFLAGS -I$x_includes"
5690   fi
5691
5692   # It would also be nice to do this for all -L options, not just this one.
5693   if test -n "$x_libraries"; then
5694     X_LIBS="$X_LIBS -L$x_libraries"
5695     # For Solaris; some versions of Sun CC require a space after -R and
5696     # others require no space.  Words are not sufficient . . . .
5697     case "`(uname -sr) 2>/dev/null`" in
5698     "SunOS 5"*)
5699       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5700 echo "configure:5701: checking whether -R must be followed by a space" >&5
5701       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5702       cat > conftest.$ac_ext <<EOF
5703 #line 5704 "configure"
5704 #include "confdefs.h"
5705
5706 int main() {
5707
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5711   rm -rf conftest*
5712   ac_R_nospace=yes
5713 else
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716   rm -rf conftest*
5717   ac_R_nospace=no
5718 fi
5719 rm -f conftest*
5720       if test $ac_R_nospace = yes; then
5721         echo "$ac_t""no" 1>&6
5722         X_LIBS="$X_LIBS -R$x_libraries"
5723       else
5724         LIBS="$ac_xsave_LIBS -R $x_libraries"
5725         cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728
5729 int main() {
5730
5731 ; return 0; }
5732 EOF
5733 if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5734   rm -rf conftest*
5735   ac_R_space=yes
5736 else
5737   echo "configure: failed program was:" >&5
5738   cat conftest.$ac_ext >&5
5739   rm -rf conftest*
5740   ac_R_space=no
5741 fi
5742 rm -f conftest*
5743         if test $ac_R_space = yes; then
5744           echo "$ac_t""yes" 1>&6
5745           X_LIBS="$X_LIBS -R $x_libraries"
5746         else
5747           echo "$ac_t""neither works" 1>&6
5748         fi
5749       fi
5750       LIBS="$ac_xsave_LIBS"
5751     esac
5752   fi
5753
5754   # Check for system-dependent libraries X programs must link with.
5755   # Do this before checking for the system-independent R6 libraries
5756   # (-lICE), since we may need -lsocket or whatever for X linking.
5757
5758   if test "$ISC" = yes; then
5759     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5760   else
5761     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5762     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5763     # the Alpha needs dnet_stub (dnet does not exist).
5764     if test "$with_dnet" = "no" ; then
5765 ac_cv_lib_dnet_dnet_ntoa=no
5766 else
5767
5768 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5769 echo "configure:5770: checking for dnet_ntoa in -ldnet" >&5
5770 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5771
5772 xe_check_libs=" -ldnet "
5773 cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776 /* Override any gcc2 internal prototype to avoid an error.  */
5777 /* We use char because int might match the return type of a gcc2
5778     builtin and then its argument prototype would still apply.  */
5779 char dnet_ntoa();
5780
5781 int main() {
5782 dnet_ntoa()
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5786   rm -rf conftest*
5787   eval "ac_cv_lib_$ac_lib_var=yes"
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -rf conftest*
5792   eval "ac_cv_lib_$ac_lib_var=no"
5793 fi
5794 rm -f conftest*
5795 xe_check_libs=""
5796
5797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5798   echo "$ac_t""yes" 1>&6
5799   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5800 else
5801   echo "$ac_t""no" 1>&6
5802 fi
5803
5804 fi
5805
5806     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5807       
5808 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5809 echo "configure:5810: checking for dnet_ntoa in -ldnet_stub" >&5
5810 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5811
5812 xe_check_libs=" -ldnet_stub "
5813 cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816 /* Override any gcc2 internal prototype to avoid an error.  */
5817 /* We use char because int might match the return type of a gcc2
5818     builtin and then its argument prototype would still apply.  */
5819 char dnet_ntoa();
5820
5821 int main() {
5822 dnet_ntoa()
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=yes"
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_lib_$ac_lib_var=no"
5833 fi
5834 rm -f conftest*
5835 xe_check_libs=""
5836
5837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5838   echo "$ac_t""yes" 1>&6
5839   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5840 else
5841   echo "$ac_t""no" 1>&6
5842 fi
5843
5844
5845     fi
5846
5847     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5848     # to get the SysV transport functions.
5849     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5850     # needs -lnsl.
5851     # The nsl library prevents programs from opening the X display
5852     # on Irix 5.2, according to dickey@clark.net.
5853     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5854 echo "configure:5855: checking for gethostbyname" >&5
5855
5856 cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 /* System header to define __stub macros and hopefully few prototypes,
5860     which can conflict with char gethostbyname(); below.  */
5861 #include <assert.h>
5862 /* Override any gcc2 internal prototype to avoid an error.  */
5863 /* We use char because int might match the return type of a gcc2
5864     builtin and then its argument prototype would still apply.  */
5865 char gethostbyname();
5866
5867 int main() {
5868
5869 /* The GNU C library defines this for functions which it implements
5870     to always fail with ENOSYS.  Some functions are actually named
5871     something starting with __ and the normal name is an alias.  */
5872 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5873 choke me
5874 #else
5875 gethostbyname();
5876 #endif
5877
5878 ; return 0; }
5879 EOF
5880 if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5881   rm -rf conftest*
5882   eval "ac_cv_func_gethostbyname=yes"
5883 else
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_func_gethostbyname=no"
5888 fi
5889 rm -f conftest*
5890
5891 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5892   echo "$ac_t""yes" 1>&6
5893   :
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897
5898     if test $ac_cv_func_gethostbyname = no; then
5899       
5900 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5901 echo "configure:5902: checking for gethostbyname in -lnsl" >&5
5902 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5903
5904 xe_check_libs=" -lnsl "
5905 cat > conftest.$ac_ext <<EOF
5906 #line 5907 "configure"
5907 #include "confdefs.h"
5908 /* Override any gcc2 internal prototype to avoid an error.  */
5909 /* We use char because int might match the return type of a gcc2
5910     builtin and then its argument prototype would still apply.  */
5911 char gethostbyname();
5912
5913 int main() {
5914 gethostbyname()
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5918   rm -rf conftest*
5919   eval "ac_cv_lib_$ac_lib_var=yes"
5920 else
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923   rm -rf conftest*
5924   eval "ac_cv_lib_$ac_lib_var=no"
5925 fi
5926 rm -f conftest*
5927 xe_check_libs=""
5928
5929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5930   echo "$ac_t""yes" 1>&6
5931   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5932 else
5933   echo "$ac_t""no" 1>&6
5934 fi
5935
5936
5937     fi
5938
5939     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5940     # socket/setsockopt and other routines are undefined under SCO ODT
5941     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5942     # on later versions), says simon@lia.di.epfl.ch: it contains
5943     # gethostby* variants that don't use the nameserver (or something).
5944     # -lsocket must be given before -lnsl if both are needed.
5945     # We assume that if connect needs -lnsl, so does gethostbyname.
5946     echo $ac_n "checking for connect""... $ac_c" 1>&6
5947 echo "configure:5948: checking for connect" >&5
5948
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952 /* System header to define __stub macros and hopefully few prototypes,
5953     which can conflict with char connect(); below.  */
5954 #include <assert.h>
5955 /* Override any gcc2 internal prototype to avoid an error.  */
5956 /* We use char because int might match the return type of a gcc2
5957     builtin and then its argument prototype would still apply.  */
5958 char connect();
5959
5960 int main() {
5961
5962 /* The GNU C library defines this for functions which it implements
5963     to always fail with ENOSYS.  Some functions are actually named
5964     something starting with __ and the normal name is an alias.  */
5965 #if defined (__stub_connect) || defined (__stub___connect)
5966 choke me
5967 #else
5968 connect();
5969 #endif
5970
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_func_connect=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_func_connect=no"
5981 fi
5982 rm -f conftest*
5983
5984 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5985   echo "$ac_t""yes" 1>&6
5986   :
5987 else
5988   echo "$ac_t""no" 1>&6
5989 fi
5990
5991     if test $ac_cv_func_connect = no; then
5992       
5993 xe_msg_checking="for connect in -lsocket"
5994 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5995 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5996 echo "configure:5997: checking "$xe_msg_checking"" >&5
5997 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5998
5999 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6000 cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 /* Override any gcc2 internal prototype to avoid an error.  */
6004 /* We use char because int might match the return type of a gcc2
6005     builtin and then its argument prototype would still apply.  */
6006 char connect();
6007
6008 int main() {
6009 connect()
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6013   rm -rf conftest*
6014   eval "ac_cv_lib_$ac_lib_var=yes"
6015 else
6016   echo "configure: failed program was:" >&5
6017   cat conftest.$ac_ext >&5
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=no"
6020 fi
6021 rm -f conftest*
6022 xe_check_libs=""
6023
6024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6025   echo "$ac_t""yes" 1>&6
6026   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6027 else
6028   echo "$ac_t""no" 1>&6
6029 fi
6030
6031
6032     fi
6033
6034     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6035     echo $ac_n "checking for remove""... $ac_c" 1>&6
6036 echo "configure:6037: checking for remove" >&5
6037
6038 cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041 /* System header to define __stub macros and hopefully few prototypes,
6042     which can conflict with char remove(); below.  */
6043 #include <assert.h>
6044 /* Override any gcc2 internal prototype to avoid an error.  */
6045 /* We use char because int might match the return type of a gcc2
6046     builtin and then its argument prototype would still apply.  */
6047 char remove();
6048
6049 int main() {
6050
6051 /* The GNU C library defines this for functions which it implements
6052     to always fail with ENOSYS.  Some functions are actually named
6053     something starting with __ and the normal name is an alias.  */
6054 #if defined (__stub_remove) || defined (__stub___remove)
6055 choke me
6056 #else
6057 remove();
6058 #endif
6059
6060 ; return 0; }
6061 EOF
6062 if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6063   rm -rf conftest*
6064   eval "ac_cv_func_remove=yes"
6065 else
6066   echo "configure: failed program was:" >&5
6067   cat conftest.$ac_ext >&5
6068   rm -rf conftest*
6069   eval "ac_cv_func_remove=no"
6070 fi
6071 rm -f conftest*
6072
6073 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6074   echo "$ac_t""yes" 1>&6
6075   :
6076 else
6077   echo "$ac_t""no" 1>&6
6078 fi
6079
6080     if test $ac_cv_func_remove = no; then
6081       
6082 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6083 echo "configure:6084: checking for remove in -lposix" >&5
6084 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6085
6086 xe_check_libs=" -lposix "
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 /* Override any gcc2 internal prototype to avoid an error.  */
6091 /* We use char because int might match the return type of a gcc2
6092     builtin and then its argument prototype would still apply.  */
6093 char remove();
6094
6095 int main() {
6096 remove()
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   eval "ac_cv_lib_$ac_lib_var=yes"
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   eval "ac_cv_lib_$ac_lib_var=no"
6107 fi
6108 rm -f conftest*
6109 xe_check_libs=""
6110
6111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6112   echo "$ac_t""yes" 1>&6
6113   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6114 else
6115   echo "$ac_t""no" 1>&6
6116 fi
6117
6118
6119     fi
6120
6121     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6122     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6123 echo "configure:6124: checking for shmat" >&5
6124
6125 cat > conftest.$ac_ext <<EOF
6126 #line 6127 "configure"
6127 #include "confdefs.h"
6128 /* System header to define __stub macros and hopefully few prototypes,
6129     which can conflict with char shmat(); below.  */
6130 #include <assert.h>
6131 /* Override any gcc2 internal prototype to avoid an error.  */
6132 /* We use char because int might match the return type of a gcc2
6133     builtin and then its argument prototype would still apply.  */
6134 char shmat();
6135
6136 int main() {
6137
6138 /* The GNU C library defines this for functions which it implements
6139     to always fail with ENOSYS.  Some functions are actually named
6140     something starting with __ and the normal name is an alias.  */
6141 #if defined (__stub_shmat) || defined (__stub___shmat)
6142 choke me
6143 #else
6144 shmat();
6145 #endif
6146
6147 ; return 0; }
6148 EOF
6149 if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6150   rm -rf conftest*
6151   eval "ac_cv_func_shmat=yes"
6152 else
6153   echo "configure: failed program was:" >&5
6154   cat conftest.$ac_ext >&5
6155   rm -rf conftest*
6156   eval "ac_cv_func_shmat=no"
6157 fi
6158 rm -f conftest*
6159
6160 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6161   echo "$ac_t""yes" 1>&6
6162   :
6163 else
6164   echo "$ac_t""no" 1>&6
6165 fi
6166
6167     if test $ac_cv_func_shmat = no; then
6168       
6169 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6170 echo "configure:6171: checking for shmat in -lipc" >&5
6171 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6172
6173 xe_check_libs=" -lipc "
6174 cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177 /* Override any gcc2 internal prototype to avoid an error.  */
6178 /* We use char because int might match the return type of a gcc2
6179     builtin and then its argument prototype would still apply.  */
6180 char shmat();
6181
6182 int main() {
6183 shmat()
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6187   rm -rf conftest*
6188   eval "ac_cv_lib_$ac_lib_var=yes"
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_lib_$ac_lib_var=no"
6194 fi
6195 rm -f conftest*
6196 xe_check_libs=""
6197
6198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6199   echo "$ac_t""yes" 1>&6
6200   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6201 else
6202   echo "$ac_t""no" 1>&6
6203 fi
6204
6205
6206     fi
6207   fi
6208
6209   # Check for libraries that X11R6 Xt/Xaw programs need.
6210   ac_save_LDFLAGS="$LDFLAGS"
6211   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6212   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6213   # check for ICE first), but we must link in the order -lSM -lICE or
6214   # we get undefined symbols.  So assume we have SM if we have ICE.
6215   # These have to be linked with before -lX11, unlike the other
6216   # libraries we check for below, so use a different variable.
6217   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6218   
6219 xe_msg_checking="for IceConnectionNumber in -lICE"
6220 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6221 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6222 echo "configure:6223: checking "$xe_msg_checking"" >&5
6223 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6224
6225 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6226 cat > conftest.$ac_ext <<EOF
6227 #line 6228 "configure"
6228 #include "confdefs.h"
6229 /* Override any gcc2 internal prototype to avoid an error.  */
6230 /* We use char because int might match the return type of a gcc2
6231     builtin and then its argument prototype would still apply.  */
6232 char IceConnectionNumber();
6233
6234 int main() {
6235 IceConnectionNumber()
6236 ; return 0; }
6237 EOF
6238 if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=yes"
6241 else
6242   echo "configure: failed program was:" >&5
6243   cat conftest.$ac_ext >&5
6244   rm -rf conftest*
6245   eval "ac_cv_lib_$ac_lib_var=no"
6246 fi
6247 rm -f conftest*
6248 xe_check_libs=""
6249
6250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6251   echo "$ac_t""yes" 1>&6
6252   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6253 else
6254   echo "$ac_t""no" 1>&6
6255 fi
6256
6257
6258   LDFLAGS="$ac_save_LDFLAGS"
6259
6260 fi
6261  # Autoconf claims to find X library and include dirs for us.
6262   if test "$no_x" = "yes"
6263   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6264   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6265   fi
6266 fi
6267
6268
6269 if test "$with_x11" = "yes"; then
6270   { test "$extra_verbose" = "yes" && cat << \EOF
6271     Defining HAVE_X_WINDOWS
6272 EOF
6273 cat >> confdefs.h <<\EOF
6274 #define HAVE_X_WINDOWS 1
6275 EOF
6276 }
6277
6278   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6279   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6280
6281       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6282     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6283     if test -d "$lib_dir" -a -d "$inc_dir"; then
6284       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6285         x_libraries="$lib_dir $x_libraries"
6286         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6287       esac
6288       case "$x_includes" in "$inc_dir"* ) ;; *)
6289         x_includes="$inc_dir $x_includes"
6290         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6291       esac
6292       break;       fi
6293   done
6294
6295     for rel in "X11R6" "X11R5" "X11R4"; do
6296     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6297     if test -d "$lib_dir" -a -d "$inc_dir"; then
6298       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6299         x_libraries="$x_libraries $lib_dir"
6300         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6301       esac
6302       case "$x_includes" in "$inc_dir"* ) ;; *)
6303         x_includes="$x_includes $inc_dir"
6304         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6305       esac
6306       break;     fi
6307   done
6308
6309     case "$opsys" in
6310   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 ;;
6311   esac
6312
6313   ld_switch_x_site="$X_LIBS"
6314
6315   
6316 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6317     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6318   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6319   
6320         runpath="" runpath_dirs=""
6321   if test -n "$LD_RUN_PATH"; then
6322     runpath="$LD_RUN_PATH"
6323   elif test "$GCC" = "yes"; then
6324         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6325     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6326     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6327     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6328       case "$arg" in P,* | -L* | -R* )
6329         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6330           {
6331 xe_runpath_dir="$dir"
6332   test "$xe_runpath_dir" != "/lib"     -a \
6333         "$xe_runpath_dir" != "/usr/lib" -a \
6334         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6335   eval "$xe_add_unique_runpath_dir"
6336 }
6337         done ;;
6338       esac
6339     done
6340     ld_switch_run="$ld_switch_run_save"
6341     rm -f conftest*
6342   else
6343         for arg in $ld_switch_site $ld_switch_x_site; do
6344       case "$arg" in -L*) {
6345 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6346   test "$xe_runpath_dir" != "/lib"     -a \
6347         "$xe_runpath_dir" != "/usr/lib" -a \
6348         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6349   eval "$xe_add_unique_runpath_dir"
6350 };; esac
6351     done
6352         if test "$opsys $need_motif" = "sol2 yes"; then
6353       xe_runpath_dir="/opt/SUNWdt/lib";
6354       eval "$xe_add_unique_runpath_dir";
6355     fi
6356   fi 
6357   if test -n "$runpath"; then
6358     ld_switch_run="${dash_r}${runpath}"
6359     
6360 if test "$GCC" = "yes"; then
6361   set x $ld_switch_run; shift; ld_switch_run=""
6362   while test -n "$1"; do
6363     case $1 in
6364       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6365       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6366       -Xlinker* ) ;;
6367       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6368     esac
6369     shift
6370   done
6371 fi
6372     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6373   fi
6374 fi
6375
6376
6377   if test "$extra_verbose" = "yes"; then
6378     echo; echo "X11 compilation variables:"
6379     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6380     echo
6381   fi
6382
6383             bitmapdirs=
6384   if test "$x_includes" != NONE; then
6385     for i in $x_includes; do
6386       if test -d "$i/bitmaps"; then
6387         bitmapdirs="$i/bitmaps:$bitmapdirs"
6388       fi
6389       if test -d "$i/X11/bitmaps"; then
6390         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6391       fi
6392     done
6393     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6394   fi
6395   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6396     Defining BITMAPDIR = "$bitmapdirs"
6397 EOF
6398 cat >> confdefs.h <<EOF
6399 #define BITMAPDIR "$bitmapdirs"
6400 EOF
6401 }
6402
6403
6404     echo "checking for X defines extracted by xmkmf" 1>&6
6405 echo "configure:6406: checking for X defines extracted by xmkmf" >&5
6406   rm -fr conftestdir
6407   if mkdir conftestdir; then
6408     cd conftestdir
6409     cat > Imakefile <<'EOF'
6410 xetest:
6411         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6412 EOF
6413     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6414       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6415       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6416     fi
6417     cd ..
6418     rm -fr conftestdir
6419     for word in $xmkmf_defines; do
6420       case "$word" in 
6421       -D__STDC__*) ;;
6422       -D* )
6423         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6424         case "$word" in
6425           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6426           *     ) val=1 ;;
6427         esac
6428         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6429           if test "$val" = "1"
6430             then { test "$extra_verbose" = "yes" && cat << EOF
6431     Defining $sym
6432 EOF
6433 cat >> confdefs.h <<EOF
6434 #define $sym 1
6435 EOF
6436 }
6437
6438             else { test "$extra_verbose" = "yes" && cat << EOF
6439     Defining $sym = $val
6440 EOF
6441 cat >> confdefs.h <<EOF
6442 #define $sym $val
6443 EOF
6444 }
6445
6446           fi
6447         fi  ;;
6448       esac
6449     done
6450   fi
6451
6452     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6453 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6454 echo "configure:6455: checking for X11/Intrinsic.h" >&5
6455
6456 cat > conftest.$ac_ext <<EOF
6457 #line 6458 "configure"
6458 #include "confdefs.h"
6459 #include <X11/Intrinsic.h>
6460 EOF
6461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6462 { (eval echo configure:6463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6464 if test -z "$ac_err"; then
6465   rm -rf conftest*
6466   eval "ac_cv_header_$ac_safe=yes"
6467 else
6468   echo "$ac_err" >&5
6469   echo "configure: failed program was:" >&5
6470   cat conftest.$ac_ext >&5
6471   rm -rf conftest*
6472   eval "ac_cv_header_$ac_safe=no"
6473 fi
6474 rm -f conftest*
6475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6476   echo "$ac_t""yes" 1>&6
6477   :
6478 else
6479   echo "$ac_t""no" 1>&6
6480 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6481 fi
6482
6483
6484       
6485 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6486 echo "configure:6487: checking for XOpenDisplay in -lX11" >&5
6487 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6488
6489 xe_check_libs=" -lX11 "
6490 cat > conftest.$ac_ext <<EOF
6491 #line 6492 "configure"
6492 #include "confdefs.h"
6493 /* Override any gcc2 internal prototype to avoid an error.  */
6494 /* We use char because int might match the return type of a gcc2
6495     builtin and then its argument prototype would still apply.  */
6496 char XOpenDisplay();
6497
6498 int main() {
6499 XOpenDisplay()
6500 ; return 0; }
6501 EOF
6502 if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6503   rm -rf conftest*
6504   eval "ac_cv_lib_$ac_lib_var=yes"
6505 else
6506   echo "configure: failed program was:" >&5
6507   cat conftest.$ac_ext >&5
6508   rm -rf conftest*
6509   eval "ac_cv_lib_$ac_lib_var=no"
6510 fi
6511 rm -f conftest*
6512 xe_check_libs=""
6513
6514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6515   echo "$ac_t""yes" 1>&6
6516   have_lib_x11=yes
6517 else
6518   echo "$ac_t""no" 1>&6
6519 fi
6520
6521
6522   if test "$have_lib_x11" != "yes"; then
6523     
6524 xe_msg_checking="for XGetFontProperty in -lX11"
6525 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6526 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6527 echo "configure:6528: checking "$xe_msg_checking"" >&5
6528 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6529
6530 xe_check_libs=" -lX11 -b i486-linuxaout"
6531 cat > conftest.$ac_ext <<EOF
6532 #line 6533 "configure"
6533 #include "confdefs.h"
6534 /* Override any gcc2 internal prototype to avoid an error.  */
6535 /* We use char because int might match the return type of a gcc2
6536     builtin and then its argument prototype would still apply.  */
6537 char XGetFontProperty();
6538
6539 int main() {
6540 XGetFontProperty()
6541 ; return 0; }
6542 EOF
6543 if { (eval echo configure:6544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6544   rm -rf conftest*
6545   eval "ac_cv_lib_$ac_lib_var=yes"
6546 else
6547   echo "configure: failed program was:" >&5
6548   cat conftest.$ac_ext >&5
6549   rm -rf conftest*
6550   eval "ac_cv_lib_$ac_lib_var=no"
6551 fi
6552 rm -f conftest*
6553 xe_check_libs=""
6554
6555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6556   echo "$ac_t""yes" 1>&6
6557   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6558 else
6559   echo "$ac_t""no" 1>&6
6560 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6561 fi
6562
6563
6564   fi
6565   libs_x="-lX11"
6566   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6567
6568     
6569 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6570 echo "configure:6571: checking for XShapeSelectInput in -lXext" >&5
6571 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6572
6573 xe_check_libs=" -lXext "
6574 cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 /* Override any gcc2 internal prototype to avoid an error.  */
6578 /* We use char because int might match the return type of a gcc2
6579     builtin and then its argument prototype would still apply.  */
6580 char XShapeSelectInput();
6581
6582 int main() {
6583 XShapeSelectInput()
6584 ; return 0; }
6585 EOF
6586 if { (eval echo configure:6587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6587   rm -rf conftest*
6588   eval "ac_cv_lib_$ac_lib_var=yes"
6589 else
6590   echo "configure: failed program was:" >&5
6591   cat conftest.$ac_ext >&5
6592   rm -rf conftest*
6593   eval "ac_cv_lib_$ac_lib_var=no"
6594 fi
6595 rm -f conftest*
6596 xe_check_libs=""
6597
6598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6599   echo "$ac_t""yes" 1>&6
6600   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6601 else
6602   echo "$ac_t""no" 1>&6
6603 fi
6604
6605
6606
6607     
6608 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6609 echo "configure:6610: checking for XtOpenDisplay in -lXt" >&5
6610 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6611
6612 xe_check_libs=" -lXt "
6613 cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 /* Override any gcc2 internal prototype to avoid an error.  */
6617 /* We use char because int might match the return type of a gcc2
6618     builtin and then its argument prototype would still apply.  */
6619 char XtOpenDisplay();
6620
6621 int main() {
6622 XtOpenDisplay()
6623 ; return 0; }
6624 EOF
6625 if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6626   rm -rf conftest*
6627   eval "ac_cv_lib_$ac_lib_var=yes"
6628 else
6629   echo "configure: failed program was:" >&5
6630   cat conftest.$ac_ext >&5
6631   rm -rf conftest*
6632   eval "ac_cv_lib_$ac_lib_var=no"
6633 fi
6634 rm -f conftest*
6635 xe_check_libs=""
6636
6637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6638   echo "$ac_t""yes" 1>&6
6639   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6640 else
6641   echo "$ac_t""no" 1>&6
6642 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6643 fi
6644
6645
6646
6647   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6648 echo "configure:6649: checking the version of X11 being used" >&5
6649   cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 #include <X11/Intrinsic.h>
6653     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6654 EOF
6655 if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6656 then
6657   ./conftest foobar; x11_release=$?
6658 else
6659   conftest_rc="$?"
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662   rm -fr conftest*
6663   x11_release=4
6664 fi
6665 rm -fr conftest*
6666   echo "$ac_t""R${x11_release}" 1>&6
6667   { test "$extra_verbose" = "yes" && cat << EOF
6668     Defining THIS_IS_X11R${x11_release}
6669 EOF
6670 cat >> confdefs.h <<EOF
6671 #define THIS_IS_X11R${x11_release} 1
6672 EOF
6673 }
6674
6675
6676   if test "${x11_release}" = "4"; then
6677     case "$with_widgets" in
6678       "" | "no") with_widgets=no ;;
6679       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6680     esac
6681   fi
6682
6683   for ac_func in XConvertCase
6684 do
6685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6686 echo "configure:6687: checking for $ac_func" >&5
6687
6688 cat > conftest.$ac_ext <<EOF
6689 #line 6690 "configure"
6690 #include "confdefs.h"
6691 /* System header to define __stub macros and hopefully few prototypes,
6692     which can conflict with char $ac_func(); below.  */
6693 #include <assert.h>
6694 /* Override any gcc2 internal prototype to avoid an error.  */
6695 /* We use char because int might match the return type of a gcc2
6696     builtin and then its argument prototype would still apply.  */
6697 char $ac_func();
6698
6699 int main() {
6700
6701 /* The GNU C library defines this for functions which it implements
6702     to always fail with ENOSYS.  Some functions are actually named
6703     something starting with __ and the normal name is an alias.  */
6704 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6705 choke me
6706 #else
6707 $ac_func();
6708 #endif
6709
6710 ; return 0; }
6711 EOF
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6713   rm -rf conftest*
6714   eval "ac_cv_func_$ac_func=yes"
6715 else
6716   echo "configure: failed program was:" >&5
6717   cat conftest.$ac_ext >&5
6718   rm -rf conftest*
6719   eval "ac_cv_func_$ac_func=no"
6720 fi
6721 rm -f conftest*
6722
6723 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6724   echo "$ac_t""yes" 1>&6
6725     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6726   { test "$extra_verbose" = "yes" && cat << EOF
6727     Defining $ac_tr_func
6728 EOF
6729 cat >> confdefs.h <<EOF
6730 #define $ac_tr_func 1
6731 EOF
6732 }
6733  
6734 else
6735   echo "$ac_t""no" 1>&6
6736 fi
6737 done
6738
6739
6740   for ac_hdr in X11/Xlocale.h
6741 do
6742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6744 echo "configure:6745: checking for $ac_hdr" >&5
6745
6746 cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 #include <$ac_hdr>
6750 EOF
6751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6752 { (eval echo configure:6753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6754 if test -z "$ac_err"; then
6755   rm -rf conftest*
6756   eval "ac_cv_header_$ac_safe=yes"
6757 else
6758   echo "$ac_err" >&5
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_header_$ac_safe=no"
6763 fi
6764 rm -f conftest*
6765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6766   echo "$ac_t""yes" 1>&6
6767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6768   { test "$extra_verbose" = "yes" && cat << EOF
6769     Defining $ac_tr_hdr
6770 EOF
6771 cat >> confdefs.h <<EOF
6772 #define $ac_tr_hdr 1
6773 EOF
6774 }
6775  
6776 else
6777   echo "$ac_t""no" 1>&6
6778 fi
6779 done
6780
6781
6782     for ac_func in XRegisterIMInstantiateCallback
6783 do
6784 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6785 echo "configure:6786: checking for $ac_func" >&5
6786
6787 cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 /* System header to define __stub macros and hopefully few prototypes,
6791     which can conflict with char $ac_func(); below.  */
6792 #include <assert.h>
6793 /* Override any gcc2 internal prototype to avoid an error.  */
6794 /* We use char because int might match the return type of a gcc2
6795     builtin and then its argument prototype would still apply.  */
6796 char $ac_func();
6797
6798 int main() {
6799
6800 /* The GNU C library defines this for functions which it implements
6801     to always fail with ENOSYS.  Some functions are actually named
6802     something starting with __ and the normal name is an alias.  */
6803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6804 choke me
6805 #else
6806 $ac_func();
6807 #endif
6808
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_func_$ac_func=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_func_$ac_func=no"
6819 fi
6820 rm -f conftest*
6821
6822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6825   { test "$extra_verbose" = "yes" && cat << EOF
6826     Defining $ac_tr_func
6827 EOF
6828 cat >> confdefs.h <<EOF
6829 #define $ac_tr_func 1
6830 EOF
6831 }
6832  
6833 else
6834   echo "$ac_t""no" 1>&6
6835 fi
6836 done
6837
6838   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6839 echo "configure:6840: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6840   cat > conftest.$ac_ext <<EOF
6841 #line 6842 "configure"
6842 #include "confdefs.h"
6843
6844 #define NeedFunctionPrototypes 1
6845 #include <X11/Xlib.h>
6846 extern Bool XRegisterIMInstantiateCallback(
6847    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6848
6849 int main() {
6850
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6854   rm -rf conftest*
6855   echo "$ac_t""yes" 1>&6
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   echo "$ac_t""no" 1>&6
6861    { test "$extra_verbose" = "yes" && cat << \EOF
6862     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6863 EOF
6864 cat >> confdefs.h <<\EOF
6865 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6866 EOF
6867 }
6868
6869 fi
6870 rm -f conftest*
6871
6872     test -z "$with_xmu" && { 
6873 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6874 echo "configure:6875: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6875 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6876
6877 xe_check_libs=" -lXmu "
6878 cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 /* Override any gcc2 internal prototype to avoid an error.  */
6882 /* We use char because int might match the return type of a gcc2
6883     builtin and then its argument prototype would still apply.  */
6884 char XmuReadBitmapDataFromFile();
6885
6886 int main() {
6887 XmuReadBitmapDataFromFile()
6888 ; return 0; }
6889 EOF
6890 if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=yes"
6893 else
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   eval "ac_cv_lib_$ac_lib_var=no"
6898 fi
6899 rm -f conftest*
6900 xe_check_libs=""
6901
6902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6903   echo "$ac_t""yes" 1>&6
6904   with_xmu=yes
6905 else
6906   echo "$ac_t""no" 1>&6
6907 with_xmu=no
6908 fi
6909
6910  }
6911   if test "$with_xmu" = "no"; then
6912     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6913    echo "    xemacs will be linked with \"xmu.o\""
6914  fi
6915   else
6916     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6917     { test "$extra_verbose" = "yes" && cat << \EOF
6918     Defining HAVE_XMU
6919 EOF
6920 cat >> confdefs.h <<\EOF
6921 #define HAVE_XMU 1
6922 EOF
6923 }
6924
6925   fi
6926
6927       
6928 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6929 echo "configure:6930: checking for main in -lXbsd" >&5
6930 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6931
6932 xe_check_libs=" -lXbsd "
6933 cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936
6937 int main() {
6938 main()
6939 ; return 0; }
6940 EOF
6941 if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6942   rm -rf conftest*
6943   eval "ac_cv_lib_$ac_lib_var=yes"
6944 else
6945   echo "configure: failed program was:" >&5
6946   cat conftest.$ac_ext >&5
6947   rm -rf conftest*
6948   eval "ac_cv_lib_$ac_lib_var=no"
6949 fi
6950 rm -f conftest*
6951 xe_check_libs=""
6952
6953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6954   echo "$ac_t""yes" 1>&6
6955   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6956 else
6957   echo "$ac_t""no" 1>&6
6958 fi
6959
6960
6961
6962     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6963         if test "$GCC" = "yes"; then
6964       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6965       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6966     else
6967       case "$CC" in
6968         "xlc" ) CC="xlc_r" ;;
6969         "xlC" ) CC="xlC_r" ;;
6970         "cc"  ) CC="cc_r" ;;
6971       esac
6972     fi
6973   fi
6974
6975 fi 
6976 if test "$with_msw" != "no"; then
6977   echo "checking for MS-Windows" 1>&6
6978 echo "configure:6979: checking for MS-Windows" >&5
6979   
6980 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6981 echo "configure:6982: checking for main in -lgdi32" >&5
6982 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6983
6984 xe_check_libs=" -lgdi32 "
6985 cat > conftest.$ac_ext <<EOF
6986 #line 6987 "configure"
6987 #include "confdefs.h"
6988
6989 int main() {
6990 main()
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_lib_$ac_lib_var=no"
7001 fi
7002 rm -f conftest*
7003 xe_check_libs=""
7004
7005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7006   echo "$ac_t""yes" 1>&6
7007   with_msw=yes
7008 else
7009   echo "$ac_t""no" 1>&6
7010 fi
7011
7012
7013   if test "$with_msw" = "yes"; then
7014     { test "$extra_verbose" = "yes" && cat << \EOF
7015     Defining HAVE_MS_WINDOWS
7016 EOF
7017 cat >> confdefs.h <<\EOF
7018 #define HAVE_MS_WINDOWS 1
7019 EOF
7020 }
7021
7022
7023         if test "$with_netinstall" = "yes"; then
7024       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7025       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7026       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7027     fi
7028
7029     install_pp="$blddir/lib-src/installexe.sh"
7030     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
7031     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7032     if test "$window_system" != x11; then
7033         window_system=msw
7034         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7035             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7036    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7037  fi
7038         test "$with_menubars"   != "no" && with_menubars=msw \
7039             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7040    echo "    xemacs will be linked with \"menubar-msw.o\""
7041  fi
7042         test "$with_toolbars"   != "no" && with_toolbars=msw \
7043             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7044    echo "    xemacs will be linked with \"toolbar-msw.o\""
7045  fi
7046         test "$with_dialogs"   != "no" && with_dialogs=msw \
7047             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7048    echo "    xemacs will be linked with \"dialog-msw.o\""
7049  fi
7050         test "$with_widgets"   != "no" && with_widgets=msw
7051     else
7052         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7053    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7054  fi
7055         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7056    echo "    xemacs will be linked with \"menubar-msw.o\""
7057  fi
7058         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7059    echo "    xemacs will be linked with \"toolbar-msw.o\""
7060  fi
7061         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7062    echo "    xemacs will be linked with \"dialog-msw.o\""
7063  fi
7064     fi
7065         cat > conftest.$ac_ext <<EOF
7066 #line 7067 "configure"
7067 #include "confdefs.h"
7068 #include <fcntl.h>
7069     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7072 then
7073   { test "$extra_verbose" = "yes" && cat << \EOF
7074     Defining HAVE_MSG_SELECT
7075 EOF
7076 cat >> confdefs.h <<\EOF
7077 #define HAVE_MSG_SELECT 1
7078 EOF
7079 }
7080
7081 else
7082   conftest_rc="$?"
7083   echo "configure: failed program was:" >&5
7084   cat conftest.$ac_ext >&5
7085 fi
7086 rm -fr conftest*
7087     with_file_coding=yes
7088     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
7089    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\""
7090  fi
7091   fi
7092 fi
7093
7094
7095
7096 test -z "$window_system" && window_system="none"
7097
7098 if test "$window_system" = "none"; then
7099   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7100   do
7101     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7102        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7103     fi
7104     eval "with_${feature}=no"
7105   done
7106 else
7107   test -z "$with_toolbars" && with_toolbars=yes
7108 fi
7109
7110 if test "$with_msw" != "yes"; then
7111   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7112   do
7113     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7114        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7115     fi
7116     eval "with_${feature}=no"
7117   done
7118 else
7119   :
7120 fi
7121
7122 if test "$with_x11" != "yes"; then
7123             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7124   do
7125     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7126        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7127     fi
7128     eval "with_${feature}=no"
7129   done
7130 fi
7131
7132 if test "$with_x11" = "yes"; then
7133   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7134 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7135 echo "configure:7136: checking for X11/extensions/shape.h" >&5
7136
7137 cat > conftest.$ac_ext <<EOF
7138 #line 7139 "configure"
7139 #include "confdefs.h"
7140 #include <X11/extensions/shape.h>
7141 EOF
7142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7143 { (eval echo configure:7144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7145 if test -z "$ac_err"; then
7146   rm -rf conftest*
7147   eval "ac_cv_header_$ac_safe=yes"
7148 else
7149   echo "$ac_err" >&5
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -rf conftest*
7153   eval "ac_cv_header_$ac_safe=no"
7154 fi
7155 rm -f conftest*
7156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7157   echo "$ac_t""yes" 1>&6
7158   
7159    { test "$extra_verbose" = "yes" && cat << \EOF
7160     Defining HAVE_BALLOON_HELP
7161 EOF
7162 cat >> confdefs.h <<\EOF
7163 #define HAVE_BALLOON_HELP 1
7164 EOF
7165 }
7166
7167    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7168    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7169  fi
7170 else
7171   echo "$ac_t""no" 1>&6
7172 fi
7173
7174 fi
7175
7176 bitmapdir=
7177
7178 case "$window_system" in
7179   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7180   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7181   gtk  )
7182        HAVE_X_WINDOWS=no
7183        test "$with_gnome" = "yes" && echo "  Using GNOME."
7184        test "$with_gnome" = "no" && echo "  Using GTK."
7185        ;;
7186   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7187 esac
7188
7189 case "$x_libraries" in *X11R4* )
7190   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7191   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7192 esac
7193
7194 echo "checking for WM_COMMAND option" 1>&6
7195 echo "configure:7196: checking for WM_COMMAND option" >&5;
7196 if test "$with_wmcommand" != "no"; then
7197   { test "$extra_verbose" = "yes" && cat << \EOF
7198     Defining HAVE_WMCOMMAND
7199 EOF
7200 cat >> confdefs.h <<\EOF
7201 #define HAVE_WMCOMMAND 1
7202 EOF
7203 }
7204
7205 fi
7206
7207 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7208 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7209 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7210 echo "configure:7211: checking for X11/Xauth.h" >&5
7211
7212 cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 #include <X11/Xauth.h>
7216 EOF
7217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7218 { (eval echo configure:7219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7220 if test -z "$ac_err"; then
7221   rm -rf conftest*
7222   eval "ac_cv_header_$ac_safe=yes"
7223 else
7224   echo "$ac_err" >&5
7225   echo "configure: failed program was:" >&5
7226   cat conftest.$ac_ext >&5
7227   rm -rf conftest*
7228   eval "ac_cv_header_$ac_safe=no"
7229 fi
7230 rm -f conftest*
7231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7232   echo "$ac_t""yes" 1>&6
7233   :
7234 else
7235   echo "$ac_t""no" 1>&6
7236 with_xauth=no
7237 fi
7238  }
7239 test -z "$with_xauth" && { 
7240 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7241 echo "configure:7242: checking for XauGetAuthByAddr in -lXau" >&5
7242 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7243
7244 xe_check_libs=" -lXau "
7245 cat > conftest.$ac_ext <<EOF
7246 #line 7247 "configure"
7247 #include "confdefs.h"
7248 /* Override any gcc2 internal prototype to avoid an error.  */
7249 /* We use char because int might match the return type of a gcc2
7250     builtin and then its argument prototype would still apply.  */
7251 char XauGetAuthByAddr();
7252
7253 int main() {
7254 XauGetAuthByAddr()
7255 ; return 0; }
7256 EOF
7257 if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7258   rm -rf conftest*
7259   eval "ac_cv_lib_$ac_lib_var=yes"
7260 else
7261   echo "configure: failed program was:" >&5
7262   cat conftest.$ac_ext >&5
7263   rm -rf conftest*
7264   eval "ac_cv_lib_$ac_lib_var=no"
7265 fi
7266 rm -f conftest*
7267 xe_check_libs=""
7268
7269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7270   echo "$ac_t""yes" 1>&6
7271   :
7272 else
7273   echo "$ac_t""no" 1>&6
7274 with_xauth=no
7275 fi
7276
7277  }
7278 test -z "$with_xauth" && with_xauth=yes
7279 if test "$with_xauth" = "yes"; then
7280   { test "$extra_verbose" = "yes" && cat << \EOF
7281     Defining HAVE_XAUTH
7282 EOF
7283 cat >> confdefs.h <<\EOF
7284 #define HAVE_XAUTH 1
7285 EOF
7286 }
7287
7288   
7289 T=""
7290 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
7291 libs_xauth="$T"
7292
7293 fi
7294
7295
7296
7297
7298 if test "$with_tooltalk" != "no" ; then
7299       for dir in "" "Tt/" "desktop/" ; do
7300     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7301 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7302 echo "configure:7303: checking for ${dir}tt_c.h" >&5
7303
7304 cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307 #include <${dir}tt_c.h>
7308 EOF
7309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7310 { (eval echo configure:7311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7312 if test -z "$ac_err"; then
7313   rm -rf conftest*
7314   eval "ac_cv_header_$ac_safe=yes"
7315 else
7316   echo "$ac_err" >&5
7317   echo "configure: failed program was:" >&5
7318   cat conftest.$ac_ext >&5
7319   rm -rf conftest*
7320   eval "ac_cv_header_$ac_safe=no"
7321 fi
7322 rm -f conftest*
7323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7324   echo "$ac_t""yes" 1>&6
7325   tt_c_h_file="${dir}tt_c.h"; break
7326 else
7327   echo "$ac_t""no" 1>&6
7328 fi
7329
7330   done
7331   if test -z "$tt_c_h_file"; then
7332     if test "$with_tooltalk" = "yes"; then
7333       (echo "$progname: Usage error:"
7334 echo " " "Unable to find required tooltalk header files."
7335 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7336     fi
7337     with_tooltalk=no
7338   fi
7339 fi
7340 if test "$with_tooltalk" != "no" ; then
7341   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7342     
7343 xe_msg_checking="for tt_message_create in -ltt"
7344 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7345 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7346 echo "configure:7347: checking "$xe_msg_checking"" >&5
7347 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7348
7349 xe_check_libs=" -ltt $extra_libs"
7350 cat > conftest.$ac_ext <<EOF
7351 #line 7352 "configure"
7352 #include "confdefs.h"
7353 /* Override any gcc2 internal prototype to avoid an error.  */
7354 /* We use char because int might match the return type of a gcc2
7355     builtin and then its argument prototype would still apply.  */
7356 char tt_message_create();
7357
7358 int main() {
7359 tt_message_create()
7360 ; return 0; }
7361 EOF
7362 if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7363   rm -rf conftest*
7364   eval "ac_cv_lib_$ac_lib_var=yes"
7365 else
7366   echo "configure: failed program was:" >&5
7367   cat conftest.$ac_ext >&5
7368   rm -rf conftest*
7369   eval "ac_cv_lib_$ac_lib_var=no"
7370 fi
7371 rm -f conftest*
7372 xe_check_libs=""
7373
7374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7375   echo "$ac_t""yes" 1>&6
7376   tt_libs="-ltt $extra_libs"; break
7377 else
7378   echo "$ac_t""no" 1>&6
7379 :
7380 fi
7381
7382
7383   done
7384   if test -z "$tt_libs"; then
7385     if test "$with_tooltalk" = "yes"; then
7386       (echo "$progname: Usage error:"
7387 echo " " "Unable to find required tooltalk libraries."
7388 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7389     fi
7390     with_tooltalk=no
7391   fi
7392 fi
7393 test -z "$with_tooltalk" && with_tooltalk=yes
7394 if test "$with_tooltalk" = "yes"; then
7395   { test "$extra_verbose" = "yes" && cat << \EOF
7396     Defining TOOLTALK
7397 EOF
7398 cat >> confdefs.h <<\EOF
7399 #define TOOLTALK 1
7400 EOF
7401 }
7402
7403   { test "$extra_verbose" = "yes" && cat << EOF
7404     Defining TT_C_H_FILE = "$tt_c_h_file"
7405 EOF
7406 cat >> confdefs.h <<EOF
7407 #define TT_C_H_FILE "$tt_c_h_file"
7408 EOF
7409 }
7410
7411   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7412   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7413    echo "    xemacs will be linked with \"tooltalk.o\""
7414  fi
7415 fi
7416
7417 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7418 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7419 echo "configure:7420: checking for Dt/Dt.h" >&5
7420
7421 cat > conftest.$ac_ext <<EOF
7422 #line 7423 "configure"
7423 #include "confdefs.h"
7424 #include <Dt/Dt.h>
7425 EOF
7426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7427 { (eval echo configure:7428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7429 if test -z "$ac_err"; then
7430   rm -rf conftest*
7431   eval "ac_cv_header_$ac_safe=yes"
7432 else
7433   echo "$ac_err" >&5
7434   echo "configure: failed program was:" >&5
7435   cat conftest.$ac_ext >&5
7436   rm -rf conftest*
7437   eval "ac_cv_header_$ac_safe=no"
7438 fi
7439 rm -f conftest*
7440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7441   echo "$ac_t""yes" 1>&6
7442   :
7443 else
7444   echo "$ac_t""no" 1>&6
7445 with_cde=no
7446 fi
7447  }
7448 test -z "$with_cde" && { 
7449 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7450 echo "configure:7451: checking for DtDndDragStart in -lDtSvc" >&5
7451 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7452
7453 xe_check_libs=" -lDtSvc "
7454 cat > conftest.$ac_ext <<EOF
7455 #line 7456 "configure"
7456 #include "confdefs.h"
7457 /* Override any gcc2 internal prototype to avoid an error.  */
7458 /* We use char because int might match the return type of a gcc2
7459     builtin and then its argument prototype would still apply.  */
7460 char DtDndDragStart();
7461
7462 int main() {
7463 DtDndDragStart()
7464 ; return 0; }
7465 EOF
7466 if { (eval echo configure:7467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=yes"
7469 else
7470   echo "configure: failed program was:" >&5
7471   cat conftest.$ac_ext >&5
7472   rm -rf conftest*
7473   eval "ac_cv_lib_$ac_lib_var=no"
7474 fi
7475 rm -f conftest*
7476 xe_check_libs=""
7477
7478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7479   echo "$ac_t""yes" 1>&6
7480   :
7481 else
7482   echo "$ac_t""no" 1>&6
7483 with_cde=no
7484 fi
7485
7486  }
7487 test -z "$with_cde" && with_cde=yes
7488 if test "$with_dragndrop" = no; then
7489   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7490   with_cde=no
7491 fi
7492 if test "$with_cde" = "yes" ; then
7493   { test "$extra_verbose" = "yes" && cat << \EOF
7494     Defining HAVE_CDE
7495 EOF
7496 cat >> confdefs.h <<\EOF
7497 #define HAVE_CDE 1
7498 EOF
7499 }
7500
7501   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7502   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7503   with_tooltalk=yes # CDE requires Tooltalk
7504   need_motif=yes    # CDE requires Motif
7505 fi
7506
7507 test "$window_system" != "x11" && with_offix=no
7508 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7509   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7510   with_offix=no
7511 fi
7512 if test "$with_dragndrop" = no; then
7513   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7514   with_offix=no
7515 fi
7516 if test "$with_cde" = yes; then
7517   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7518   with_offix=no
7519 fi
7520 test -z "$with_offix" && with_offix=no
7521 if test "$with_offix" = "yes"; then
7522   { test "$extra_verbose" = "yes" && cat << \EOF
7523     Defining HAVE_OFFIX_DND
7524 EOF
7525 cat >> confdefs.h <<\EOF
7526 #define HAVE_OFFIX_DND 1
7527 EOF
7528 }
7529
7530   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7531   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7532 fi
7533 if test "$with_gtk" = "yes"; then
7534    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7535 fi
7536
7537 if test "$with_dragndrop" != "no" ; then
7538   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7539 echo "configure:7540: checking if drag and drop API is needed" >&5
7540   if test -n "$dragndrop_proto" ; then
7541     with_dragndrop=yes
7542     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7543     { test "$extra_verbose" = "yes" && cat << \EOF
7544     Defining HAVE_DRAGNDROP
7545 EOF
7546 cat >> confdefs.h <<\EOF
7547 #define HAVE_DRAGNDROP 1
7548 EOF
7549 }
7550
7551     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7552   else
7553     with_dragndrop=no
7554     echo "$ac_t""no" 1>&6
7555   fi
7556 fi
7557
7558 echo "checking for LDAP" 1>&6
7559 echo "configure:7560: checking for LDAP" >&5
7560 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7561 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7562 echo "configure:7563: checking for ldap.h" >&5
7563
7564 cat > conftest.$ac_ext <<EOF
7565 #line 7566 "configure"
7566 #include "confdefs.h"
7567 #include <ldap.h>
7568 EOF
7569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7570 { (eval echo configure:7571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7572 if test -z "$ac_err"; then
7573   rm -rf conftest*
7574   eval "ac_cv_header_$ac_safe=yes"
7575 else
7576   echo "$ac_err" >&5
7577   echo "configure: failed program was:" >&5
7578   cat conftest.$ac_ext >&5
7579   rm -rf conftest*
7580   eval "ac_cv_header_$ac_safe=no"
7581 fi
7582 rm -f conftest*
7583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7584   echo "$ac_t""yes" 1>&6
7585   :
7586 else
7587   echo "$ac_t""no" 1>&6
7588 with_ldap=no
7589 fi
7590  }
7591 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7592 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7593 echo "configure:7594: checking for lber.h" >&5
7594
7595 cat > conftest.$ac_ext <<EOF
7596 #line 7597 "configure"
7597 #include "confdefs.h"
7598 #include <lber.h>
7599 EOF
7600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7601 { (eval echo configure:7602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7603 if test -z "$ac_err"; then
7604   rm -rf conftest*
7605   eval "ac_cv_header_$ac_safe=yes"
7606 else
7607   echo "$ac_err" >&5
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   eval "ac_cv_header_$ac_safe=no"
7612 fi
7613 rm -f conftest*
7614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7615   echo "$ac_t""yes" 1>&6
7616   :
7617 else
7618   echo "$ac_t""no" 1>&6
7619 with_ldap=no
7620 fi
7621  }
7622 if test "$with_ldap" != "no"; then
7623   
7624 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7625 echo "configure:7626: checking for ldap_search in -lldap" >&5
7626 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7627
7628 xe_check_libs=" -lldap "
7629 cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 /* Override any gcc2 internal prototype to avoid an error.  */
7633 /* We use char because int might match the return type of a gcc2
7634     builtin and then its argument prototype would still apply.  */
7635 char ldap_search();
7636
7637 int main() {
7638 ldap_search()
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_lib_$ac_lib_var=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_lib_$ac_lib_var=no"
7649 fi
7650 rm -f conftest*
7651 xe_check_libs=""
7652
7653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7654   echo "$ac_t""yes" 1>&6
7655   with_ldap_nolber=yes
7656 else
7657   echo "$ac_t""no" 1>&6
7658 with_ldap_nolber=no
7659 fi
7660
7661
7662   test "$with_ldap_nolber" = "no" && { 
7663 xe_msg_checking="for ldap_open in -lldap"
7664 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7665 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7666 echo "configure:7667: checking "$xe_msg_checking"" >&5
7667 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7668
7669 xe_check_libs=" -lldap -llber"
7670 cat > conftest.$ac_ext <<EOF
7671 #line 7672 "configure"
7672 #include "confdefs.h"
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 /* We use char because int might match the return type of a gcc2
7675     builtin and then its argument prototype would still apply.  */
7676 char ldap_open();
7677
7678 int main() {
7679 ldap_open()
7680 ; return 0; }
7681 EOF
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7683   rm -rf conftest*
7684   eval "ac_cv_lib_$ac_lib_var=yes"
7685 else
7686   echo "configure: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   rm -rf conftest*
7689   eval "ac_cv_lib_$ac_lib_var=no"
7690 fi
7691 rm -f conftest*
7692 xe_check_libs=""
7693
7694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7695   echo "$ac_t""yes" 1>&6
7696   with_ldap_lber=yes
7697 else
7698   echo "$ac_t""no" 1>&6
7699 with_ldap_lber=no
7700 fi
7701
7702  }
7703   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7704 xe_msg_checking="for ldap_open in -lldap"
7705 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7706 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7707 echo "configure:7708: checking "$xe_msg_checking"" >&5
7708 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7709
7710 xe_check_libs=" -lldap -llber -lkrb"
7711 cat > conftest.$ac_ext <<EOF
7712 #line 7713 "configure"
7713 #include "confdefs.h"
7714 /* Override any gcc2 internal prototype to avoid an error.  */
7715 /* We use char because int might match the return type of a gcc2
7716     builtin and then its argument prototype would still apply.  */
7717 char ldap_open();
7718
7719 int main() {
7720 ldap_open()
7721 ; return 0; }
7722 EOF
7723 if { (eval echo configure:7724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7724   rm -rf conftest*
7725   eval "ac_cv_lib_$ac_lib_var=yes"
7726 else
7727   echo "configure: failed program was:" >&5
7728   cat conftest.$ac_ext >&5
7729   rm -rf conftest*
7730   eval "ac_cv_lib_$ac_lib_var=no"
7731 fi
7732 rm -f conftest*
7733 xe_check_libs=""
7734
7735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7736   echo "$ac_t""yes" 1>&6
7737   with_ldap_krb=yes
7738 else
7739   echo "$ac_t""no" 1>&6
7740 with_ldap_krb=no
7741 fi
7742
7743  }
7744   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7745 xe_msg_checking="for ldap_open in -lldap"
7746 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7747 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7748 echo "configure:7749: checking "$xe_msg_checking"" >&5
7749 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7750
7751 xe_check_libs=" -lldap -llber -lkrb -ldes"
7752 cat > conftest.$ac_ext <<EOF
7753 #line 7754 "configure"
7754 #include "confdefs.h"
7755 /* Override any gcc2 internal prototype to avoid an error.  */
7756 /* We use char because int might match the return type of a gcc2
7757     builtin and then its argument prototype would still apply.  */
7758 char ldap_open();
7759
7760 int main() {
7761 ldap_open()
7762 ; return 0; }
7763 EOF
7764 if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7765   rm -rf conftest*
7766   eval "ac_cv_lib_$ac_lib_var=yes"
7767 else
7768   echo "configure: failed program was:" >&5
7769   cat conftest.$ac_ext >&5
7770   rm -rf conftest*
7771   eval "ac_cv_lib_$ac_lib_var=no"
7772 fi
7773 rm -f conftest*
7774 xe_check_libs=""
7775
7776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7777   echo "$ac_t""yes" 1>&6
7778   with_ldap_krbdes=yes
7779 else
7780   echo "$ac_t""no" 1>&6
7781 with_ldap_krbdes=no
7782 fi
7783
7784  }
7785   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
7786 fi
7787 if test "$with_ldap" = "yes"; then
7788   { test "$extra_verbose" = "yes" && cat << \EOF
7789     Defining HAVE_LDAP
7790 EOF
7791 cat >> confdefs.h <<\EOF
7792 #define HAVE_LDAP 1
7793 EOF
7794 }
7795
7796   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7797    echo "    xemacs will be linked with \"eldap.o\""
7798  fi
7799   if test "$with_ldap_nolber" = "yes" ; then
7800     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7801   else
7802     if test "$with_ldap_krb" = "yes" ; then
7803       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7804     fi
7805     if test "$with_ldap_krbdes" = "yes" ; then
7806       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7807       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7808     fi
7809     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7810     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7811   fi
7812   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7813 do
7814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7815 echo "configure:7816: checking for $ac_func" >&5
7816
7817 cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 /* System header to define __stub macros and hopefully few prototypes,
7821     which can conflict with char $ac_func(); below.  */
7822 #include <assert.h>
7823 /* Override any gcc2 internal prototype to avoid an error.  */
7824 /* We use char because int might match the return type of a gcc2
7825     builtin and then its argument prototype would still apply.  */
7826 char $ac_func();
7827
7828 int main() {
7829
7830 /* The GNU C library defines this for functions which it implements
7831     to always fail with ENOSYS.  Some functions are actually named
7832     something starting with __ and the normal name is an alias.  */
7833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7834 choke me
7835 #else
7836 $ac_func();
7837 #endif
7838
7839 ; return 0; }
7840 EOF
7841 if { (eval echo configure:7842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7842   rm -rf conftest*
7843   eval "ac_cv_func_$ac_func=yes"
7844 else
7845   echo "configure: failed program was:" >&5
7846   cat conftest.$ac_ext >&5
7847   rm -rf conftest*
7848   eval "ac_cv_func_$ac_func=no"
7849 fi
7850 rm -f conftest*
7851
7852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7853   echo "$ac_t""yes" 1>&6
7854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7855   { test "$extra_verbose" = "yes" && cat << EOF
7856     Defining $ac_tr_func
7857 EOF
7858 cat >> confdefs.h <<EOF
7859 #define $ac_tr_func 1
7860 EOF
7861 }
7862  
7863 else
7864   echo "$ac_t""no" 1>&6
7865 fi
7866 done
7867
7868 fi
7869
7870 if test "$with_postgresql" != "no"; then
7871   echo "checking for PostgreSQL" 1>&6
7872 echo "configure:7873: checking for PostgreSQL" >&5
7873
7874   for header_dir in "" "pgsql/" "postgresql/"; do
7875     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7876 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7877 echo "configure:7878: checking for ${header_dir}libpq-fe.h" >&5
7878
7879 cat > conftest.$ac_ext <<EOF
7880 #line 7881 "configure"
7881 #include "confdefs.h"
7882 #include <${header_dir}libpq-fe.h>
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   rm -rf conftest*
7889   eval "ac_cv_header_$ac_safe=yes"
7890 else
7891   echo "$ac_err" >&5
7892   echo "configure: failed program was:" >&5
7893   cat conftest.$ac_ext >&5
7894   rm -rf conftest*
7895   eval "ac_cv_header_$ac_safe=no"
7896 fi
7897 rm -f conftest*
7898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7899   echo "$ac_t""yes" 1>&6
7900   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7901 else
7902   echo "$ac_t""no" 1>&6
7903 fi
7904
7905   done
7906
7907   test -n "$libpq_fe_h_file" && { 
7908 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7909 echo "configure:7910: checking for PQconnectdb in -lpq" >&5
7910 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7911
7912 xe_check_libs=" -lpq "
7913 cat > conftest.$ac_ext <<EOF
7914 #line 7915 "configure"
7915 #include "confdefs.h"
7916 /* Override any gcc2 internal prototype to avoid an error.  */
7917 /* We use char because int might match the return type of a gcc2
7918     builtin and then its argument prototype would still apply.  */
7919 char PQconnectdb();
7920
7921 int main() {
7922 PQconnectdb()
7923 ; return 0; }
7924 EOF
7925 if { (eval echo configure:7926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7926   rm -rf conftest*
7927   eval "ac_cv_lib_$ac_lib_var=yes"
7928 else
7929   echo "configure: failed program was:" >&5
7930   cat conftest.$ac_ext >&5
7931   rm -rf conftest*
7932   eval "ac_cv_lib_$ac_lib_var=no"
7933 fi
7934 rm -f conftest*
7935 xe_check_libs=""
7936
7937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7938   echo "$ac_t""yes" 1>&6
7939   have_libpq=yes
7940 else
7941   echo "$ac_t""no" 1>&6
7942 fi
7943
7944  }
7945
7946   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7947     with_postgresql=yes
7948     { test "$extra_verbose" = "yes" && cat << \EOF
7949     Defining HAVE_POSTGRESQL
7950 EOF
7951 cat >> confdefs.h <<\EOF
7952 #define HAVE_POSTGRESQL 1
7953 EOF
7954 }
7955
7956     
7957 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7958 echo "configure:7959: checking for PQconnectStart in -lpq" >&5
7959 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7960
7961 xe_check_libs=" -lpq "
7962 cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 /* Override any gcc2 internal prototype to avoid an error.  */
7966 /* We use char because int might match the return type of a gcc2
7967     builtin and then its argument prototype would still apply.  */
7968 char PQconnectStart();
7969
7970 int main() {
7971 PQconnectStart()
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7975   rm -rf conftest*
7976   eval "ac_cv_lib_$ac_lib_var=yes"
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   eval "ac_cv_lib_$ac_lib_var=no"
7982 fi
7983 rm -f conftest*
7984 xe_check_libs=""
7985
7986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7987   echo "$ac_t""yes" 1>&6
7988   with_postgresqlv7=yes;
7989                  { test "$extra_verbose" = "yes" && cat << \EOF
7990     Defining HAVE_POSTGRESQLV7
7991 EOF
7992 cat >> confdefs.h <<\EOF
7993 #define HAVE_POSTGRESQLV7 1
7994 EOF
7995 }
7996
7997 else
7998   echo "$ac_t""no" 1>&6
7999 fi
8000
8001
8002     { test "$extra_verbose" = "yes" && cat << EOF
8003     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8004 EOF
8005 cat >> confdefs.h <<EOF
8006 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8007 EOF
8008 }
8009
8010     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8011     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8012    echo "    xemacs will be linked with \"postgresql.o\""
8013  fi
8014   elif test "$with_postgresql" = "yes"; then
8015     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8016   fi
8017 fi
8018
8019
8020 if test "$window_system" != "none"; then
8021   echo "checking for graphics libraries" 1>&6
8022 echo "configure:8023: checking for graphics libraries" >&5
8023
8024     xpm_problem=""
8025   if test -z "$with_xpm"; then
8026     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8027 echo "configure:8028: checking for Xpm - no older than 3.4f" >&5
8028     xe_check_libs=-lXpm
8029     cat > conftest.$ac_ext <<EOF
8030 #line 8031 "configure"
8031 #include "confdefs.h"
8032 #define XPM_NUMBERS
8033 #include <X11/xpm.h>
8034     int main(int c, char **v) {
8035     return c == 1 ? 0 :
8036       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8037       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8038 EOF
8039 if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8040 then
8041   ./conftest dummy_arg; xpm_status=$?;
8042       if test "$xpm_status" = "0"; then
8043         with_xpm=yes;
8044       else
8045         with_xpm=no;
8046         if test "$xpm_status" = "1"; then
8047           xpm_problem="Xpm library version and header file version don't match!"
8048         elif test "$xpm_status" = "2"; then
8049           xpm_problem="Xpm library version is too old!"
8050         else
8051           xpm_problem="Internal xpm detection logic error!"
8052         fi
8053         echo "
8054 *** WARNING *** $xpm_problem
8055   I'm not touching that with a 10-foot pole!
8056   If you really want to use the installed version of Xpm, rerun
8057   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8058     fi
8059 else
8060   conftest_rc="$?"
8061   echo "configure: failed program was:" >&5
8062   cat conftest.$ac_ext >&5
8063   rm -fr conftest*
8064   with_xpm=no
8065 fi
8066 rm -fr conftest*
8067     xe_check_libs=
8068     echo "$ac_t""$with_xpm" 1>&6
8069   fi
8070   if test "$with_xpm" = "yes"; then
8071                 { test "$extra_verbose" = "yes" && cat << \EOF
8072     Defining HAVE_XPM
8073 EOF
8074 cat >> confdefs.h <<\EOF
8075 #define HAVE_XPM 1
8076 EOF
8077 }
8078
8079     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8080     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8081 echo "configure:8082: checking for \"FOR_MSW\" xpm" >&5
8082     xe_check_libs=-lXpm
8083     cat > conftest.$ac_ext <<EOF
8084 #line 8085 "configure"
8085 #include "confdefs.h"
8086
8087 int main() {
8088 XpmCreatePixmapFromData()
8089 ; return 0; }
8090 EOF
8091 if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8092   rm -rf conftest*
8093   xpm_for_msw=no
8094 else
8095   echo "configure: failed program was:" >&5
8096   cat conftest.$ac_ext >&5
8097   rm -rf conftest*
8098   xpm_for_msw=yes
8099 fi
8100 rm -f conftest*
8101     xe_check_libs=
8102     echo "$ac_t""$xpm_for_msw" 1>&6
8103     if test "$xpm_for_msw" = "yes"; then
8104       { test "$extra_verbose" = "yes" && cat << \EOF
8105     Defining FOR_MSW
8106 EOF
8107 cat >> confdefs.h <<\EOF
8108 #define FOR_MSW 1
8109 EOF
8110 }
8111
8112     fi
8113   fi
8114
8115     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8116 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8117 echo "configure:8118: checking for compface.h" >&5
8118
8119 cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 #include <compface.h>
8123 EOF
8124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8125 { (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8127 if test -z "$ac_err"; then
8128   rm -rf conftest*
8129   eval "ac_cv_header_$ac_safe=yes"
8130 else
8131   echo "$ac_err" >&5
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   eval "ac_cv_header_$ac_safe=no"
8136 fi
8137 rm -f conftest*
8138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8139   echo "$ac_t""yes" 1>&6
8140   :
8141 else
8142   echo "$ac_t""no" 1>&6
8143 with_xface=no
8144 fi
8145  }
8146   test -z "$with_xface" && { 
8147 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8148 echo "configure:8149: checking for UnGenFace in -lcompface" >&5
8149 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8150
8151 xe_check_libs=" -lcompface "
8152 cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 /* Override any gcc2 internal prototype to avoid an error.  */
8156 /* We use char because int might match the return type of a gcc2
8157     builtin and then its argument prototype would still apply.  */
8158 char UnGenFace();
8159
8160 int main() {
8161 UnGenFace()
8162 ; return 0; }
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8165   rm -rf conftest*
8166   eval "ac_cv_lib_$ac_lib_var=yes"
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   eval "ac_cv_lib_$ac_lib_var=no"
8172 fi
8173 rm -f conftest*
8174 xe_check_libs=""
8175
8176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8177   echo "$ac_t""yes" 1>&6
8178   : 
8179 else
8180   echo "$ac_t""no" 1>&6
8181 with_xface=no
8182 fi
8183
8184  }
8185   test -z "$with_xface" && with_xface=yes
8186   if test "$with_xface" = "yes"; then
8187     { test "$extra_verbose" = "yes" && cat << \EOF
8188     Defining HAVE_XFACE
8189 EOF
8190 cat >> confdefs.h <<\EOF
8191 #define HAVE_XFACE 1
8192 EOF
8193 }
8194
8195     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8196   fi
8197
8198         if test "$with_gif" != "no"; then
8199     with_gif="yes"
8200     { test "$extra_verbose" = "yes" && cat << \EOF
8201     Defining HAVE_GIF
8202 EOF
8203 cat >> confdefs.h <<\EOF
8204 #define HAVE_GIF 1
8205 EOF
8206 }
8207
8208     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8209    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8210  fi
8211   fi
8212
8213       if test "$with_png $with_tiff" != "no no"; then
8214     
8215 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8216 echo "configure:8217: checking for inflate in -lc" >&5
8217 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8218
8219 xe_check_libs=" -lc "
8220 cat > conftest.$ac_ext <<EOF
8221 #line 8222 "configure"
8222 #include "confdefs.h"
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 /* We use char because int might match the return type of a gcc2
8225     builtin and then its argument prototype would still apply.  */
8226 char inflate();
8227
8228 int main() {
8229 inflate()
8230 ; return 0; }
8231 EOF
8232 if { (eval echo configure:8233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8233   rm -rf conftest*
8234   eval "ac_cv_lib_$ac_lib_var=yes"
8235 else
8236   echo "configure: failed program was:" >&5
8237   cat conftest.$ac_ext >&5
8238   rm -rf conftest*
8239   eval "ac_cv_lib_$ac_lib_var=no"
8240 fi
8241 rm -f conftest*
8242 xe_check_libs=""
8243
8244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8245   echo "$ac_t""yes" 1>&6
8246   :
8247 else
8248   echo "$ac_t""no" 1>&6
8249
8250 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8251 echo "configure:8252: checking for inflate in -lz" >&5
8252 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8253
8254 xe_check_libs=" -lz "
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* Override any gcc2 internal prototype to avoid an error.  */
8259 /* We use char because int might match the return type of a gcc2
8260     builtin and then its argument prototype would still apply.  */
8261 char inflate();
8262
8263 int main() {
8264 inflate()
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=no"
8275 fi
8276 rm -f conftest*
8277 xe_check_libs=""
8278
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8280   echo "$ac_t""yes" 1>&6
8281   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8282 else
8283   echo "$ac_t""no" 1>&6
8284
8285 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8286 echo "configure:8287: checking for inflate in -lgz" >&5
8287 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8288
8289 xe_check_libs=" -lgz "
8290 cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* Override any gcc2 internal prototype to avoid an error.  */
8294 /* We use char because int might match the return type of a gcc2
8295     builtin and then its argument prototype would still apply.  */
8296 char inflate();
8297
8298 int main() {
8299 inflate()
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=no"
8310 fi
8311 rm -f conftest*
8312 xe_check_libs=""
8313
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8315   echo "$ac_t""yes" 1>&6
8316   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8317 else
8318   echo "$ac_t""no" 1>&6
8319 fi
8320
8321
8322 fi
8323
8324
8325 fi
8326
8327
8328   fi
8329
8330     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8331 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8332 echo "configure:8333: checking for jpeglib.h" >&5
8333
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <jpeglib.h>
8338 EOF
8339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8340 { (eval echo configure:8341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8342 if test -z "$ac_err"; then
8343   rm -rf conftest*
8344   eval "ac_cv_header_$ac_safe=yes"
8345 else
8346   echo "$ac_err" >&5
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -rf conftest*
8350   eval "ac_cv_header_$ac_safe=no"
8351 fi
8352 rm -f conftest*
8353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8354   echo "$ac_t""yes" 1>&6
8355   :
8356 else
8357   echo "$ac_t""no" 1>&6
8358 with_jpeg=no
8359 fi
8360  }
8361   test -z "$with_jpeg" && { 
8362 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8363 echo "configure:8364: checking for jpeg_destroy_decompress in -ljpeg" >&5
8364 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8365
8366 xe_check_libs=" -ljpeg "
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char jpeg_destroy_decompress();
8374
8375 int main() {
8376 jpeg_destroy_decompress()
8377 ; return 0; }
8378 EOF
8379 if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8380   rm -rf conftest*
8381   eval "ac_cv_lib_$ac_lib_var=yes"
8382 else
8383   echo "configure: failed program was:" >&5
8384   cat conftest.$ac_ext >&5
8385   rm -rf conftest*
8386   eval "ac_cv_lib_$ac_lib_var=no"
8387 fi
8388 rm -f conftest*
8389 xe_check_libs=""
8390
8391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8392   echo "$ac_t""yes" 1>&6
8393   :
8394 else
8395   echo "$ac_t""no" 1>&6
8396 with_jpeg=no
8397 fi
8398
8399  }
8400   test -z "$with_jpeg" && with_jpeg=yes
8401   if test "$with_jpeg" = "yes"; then
8402     { test "$extra_verbose" = "yes" && cat << \EOF
8403     Defining HAVE_JPEG
8404 EOF
8405 cat >> confdefs.h <<\EOF
8406 #define HAVE_JPEG 1
8407 EOF
8408 }
8409
8410     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8411   fi
8412
8413     png_problem=""
8414   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8415 echo "configure:8416: checking for pow" >&5
8416
8417 cat > conftest.$ac_ext <<EOF
8418 #line 8419 "configure"
8419 #include "confdefs.h"
8420 /* System header to define __stub macros and hopefully few prototypes,
8421     which can conflict with char pow(); below.  */
8422 #include <assert.h>
8423 /* Override any gcc2 internal prototype to avoid an error.  */
8424 /* We use char because int might match the return type of a gcc2
8425     builtin and then its argument prototype would still apply.  */
8426 char pow();
8427
8428 int main() {
8429
8430 /* The GNU C library defines this for functions which it implements
8431     to always fail with ENOSYS.  Some functions are actually named
8432     something starting with __ and the normal name is an alias.  */
8433 #if defined (__stub_pow) || defined (__stub___pow)
8434 choke me
8435 #else
8436 pow();
8437 #endif
8438
8439 ; return 0; }
8440 EOF
8441 if { (eval echo configure:8442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8442   rm -rf conftest*
8443   eval "ac_cv_func_pow=yes"
8444 else
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -rf conftest*
8448   eval "ac_cv_func_pow=no"
8449 fi
8450 rm -f conftest*
8451
8452 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8453   echo "$ac_t""yes" 1>&6
8454   :
8455 else
8456   echo "$ac_t""no" 1>&6
8457 with_png=no
8458 fi
8459  }
8460   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8461 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8462 echo "configure:8463: checking for png.h" >&5
8463
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 #include <png.h>
8468 EOF
8469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8470 { (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8472 if test -z "$ac_err"; then
8473   rm -rf conftest*
8474   eval "ac_cv_header_$ac_safe=yes"
8475 else
8476   echo "$ac_err" >&5
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   eval "ac_cv_header_$ac_safe=no"
8481 fi
8482 rm -f conftest*
8483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8484   echo "$ac_t""yes" 1>&6
8485   :
8486 else
8487   echo "$ac_t""no" 1>&6
8488 with_png=no
8489 fi
8490  }
8491   test -z "$with_png" && { 
8492 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8493 echo "configure:8494: checking for png_read_image in -lpng" >&5
8494 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8495
8496 xe_check_libs=" -lpng "
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* Override any gcc2 internal prototype to avoid an error.  */
8501 /* We use char because int might match the return type of a gcc2
8502     builtin and then its argument prototype would still apply.  */
8503 char png_read_image();
8504
8505 int main() {
8506 png_read_image()
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   eval "ac_cv_lib_$ac_lib_var=yes"
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_lib_$ac_lib_var=no"
8517 fi
8518 rm -f conftest*
8519 xe_check_libs=""
8520
8521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8522   echo "$ac_t""yes" 1>&6
8523   :
8524 else
8525   echo "$ac_t""no" 1>&6
8526 with_png=no
8527 fi
8528
8529  }
8530   if test -z "$with_png"; then
8531     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8532 echo "configure:8533: checking for workable png version information" >&5
8533     xe_check_libs="-lpng -lz"
8534     cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <png.h>
8538     int main(int c, char **v) {
8539     if (c == 1) return 0;
8540     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8541     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8544 then
8545   ./conftest dummy_arg; png_status=$?;
8546       if test "$png_status" = "0"; then
8547         with_png=yes;
8548       else
8549         with_png=no;
8550         if test "$png_status" = "1"; then
8551           png_problem="PNG library version and header file don't match!"
8552         elif test "$png_status" = "2"; then
8553           png_problem="PNG library version too old (pre 1.0.2)!"
8554         fi
8555         echo "
8556 *** WARNING *** $png_problem
8557   I'm not touching that with a 10-foot pole!
8558   If you really want to use the installed version of libPNG, rerun
8559   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8560     fi
8561 else
8562   conftest_rc="$?"
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   with_png=no
8567 fi
8568 rm -fr conftest*
8569     xe_check_libs=
8570     echo "$ac_t""$with_png" 1>&6
8571   fi
8572   if test "$with_png" = "yes"; then
8573     { test "$extra_verbose" = "yes" && cat << \EOF
8574     Defining HAVE_PNG
8575 EOF
8576 cat >> confdefs.h <<\EOF
8577 #define HAVE_PNG 1
8578 EOF
8579 }
8580
8581     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8582   fi
8583
8584     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8585 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8586 echo "configure:8587: checking for tiffio.h" >&5
8587
8588 cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <tiffio.h>
8592 EOF
8593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8594 { (eval echo configure:8595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8596 if test -z "$ac_err"; then
8597   rm -rf conftest*
8598   eval "ac_cv_header_$ac_safe=yes"
8599 else
8600   echo "$ac_err" >&5
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_header_$ac_safe=no"
8605 fi
8606 rm -f conftest*
8607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8608   echo "$ac_t""yes" 1>&6
8609   :
8610 else
8611   echo "$ac_t""no" 1>&6
8612 with_tiff=no
8613 fi
8614  }
8615   test -z "$with_tiff" && { 
8616 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8617 echo "configure:8618: checking for TIFFClientOpen in -ltiff" >&5
8618 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8619
8620 xe_check_libs=" -ltiff "
8621 cat > conftest.$ac_ext <<EOF
8622 #line 8623 "configure"
8623 #include "confdefs.h"
8624 /* Override any gcc2 internal prototype to avoid an error.  */
8625 /* We use char because int might match the return type of a gcc2
8626     builtin and then its argument prototype would still apply.  */
8627 char TIFFClientOpen();
8628
8629 int main() {
8630 TIFFClientOpen()
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8634   rm -rf conftest*
8635   eval "ac_cv_lib_$ac_lib_var=yes"
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=no"
8641 fi
8642 rm -f conftest*
8643 xe_check_libs=""
8644
8645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8646   echo "$ac_t""yes" 1>&6
8647   :
8648 else
8649   echo "$ac_t""no" 1>&6
8650 with_tiff=no
8651 fi
8652
8653  }
8654   test -z "$with_tiff" && with_tiff=yes
8655   if test "$with_tiff" = "yes"; then
8656     { test "$extra_verbose" = "yes" && cat << \EOF
8657     Defining HAVE_TIFF
8658 EOF
8659 cat >> confdefs.h <<\EOF
8660 #define HAVE_TIFF 1
8661 EOF
8662 }
8663
8664     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8665   fi
8666 fi
8667
8668
8669 if test "$with_gtk" = "yes"; then
8670     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8671 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8672 echo "configure:8673: checking for compface.h" >&5
8673
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 #include <compface.h>
8678 EOF
8679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8680 { (eval echo configure:8681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8682 if test -z "$ac_err"; then
8683   rm -rf conftest*
8684   eval "ac_cv_header_$ac_safe=yes"
8685 else
8686   echo "$ac_err" >&5
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   eval "ac_cv_header_$ac_safe=no"
8691 fi
8692 rm -f conftest*
8693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8694   echo "$ac_t""yes" 1>&6
8695   :
8696 else
8697   echo "$ac_t""no" 1>&6
8698 with_xface=no
8699 fi
8700  }
8701   test -z "$with_xface" && { 
8702 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8703 echo "configure:8704: checking for UnGenFace in -lcompface" >&5
8704 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8705
8706 xe_check_libs=" -lcompface "
8707 cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 /* Override any gcc2 internal prototype to avoid an error.  */
8711 /* We use char because int might match the return type of a gcc2
8712     builtin and then its argument prototype would still apply.  */
8713 char UnGenFace();
8714
8715 int main() {
8716 UnGenFace()
8717 ; return 0; }
8718 EOF
8719 if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8720   rm -rf conftest*
8721   eval "ac_cv_lib_$ac_lib_var=yes"
8722 else
8723   echo "configure: failed program was:" >&5
8724   cat conftest.$ac_ext >&5
8725   rm -rf conftest*
8726   eval "ac_cv_lib_$ac_lib_var=no"
8727 fi
8728 rm -f conftest*
8729 xe_check_libs=""
8730
8731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8732   echo "$ac_t""yes" 1>&6
8733   : 
8734 else
8735   echo "$ac_t""no" 1>&6
8736 with_xface=no
8737 fi
8738
8739  }
8740   test -z "$with_xface" && with_xface=yes
8741   if test "$with_xface" = "yes"; then
8742     { test "$extra_verbose" = "yes" && cat << \EOF
8743     Defining HAVE_XFACE
8744 EOF
8745 cat >> confdefs.h <<\EOF
8746 #define HAVE_XFACE 1
8747 EOF
8748 }
8749
8750     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8751   fi
8752 fi
8753
8754
8755
8756 if test "$with_x11" = "yes"; then
8757
8758   echo "checking for X11 graphics libraries" 1>&6
8759 echo "configure:8760: checking for X11 graphics libraries" >&5
8760
8761   echo "checking for the Athena widgets" 1>&6
8762 echo "configure:8763: checking for the Athena widgets" >&5
8763
8764     case "$with_athena" in
8765         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8766     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8767     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8768     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8769     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8770     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8771   esac
8772
8773     if test "$athena_3d" = "no"; then
8774     
8775 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8776 echo "configure:8777: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8777 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8778
8779 xe_check_libs=" -l$athena_variant "
8780 cat > conftest.$ac_ext <<EOF
8781 #line 8782 "configure"
8782 #include "confdefs.h"
8783 /* Override any gcc2 internal prototype to avoid an error.  */
8784 /* We use char because int might match the return type of a gcc2
8785     builtin and then its argument prototype would still apply.  */
8786 char XawScrollbarSetThumb();
8787
8788 int main() {
8789 XawScrollbarSetThumb()
8790 ; return 0; }
8791 EOF
8792 if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8793   rm -rf conftest*
8794   eval "ac_cv_lib_$ac_lib_var=yes"
8795 else
8796   echo "configure: failed program was:" >&5
8797   cat conftest.$ac_ext >&5
8798   rm -rf conftest*
8799   eval "ac_cv_lib_$ac_lib_var=no"
8800 fi
8801 rm -f conftest*
8802 xe_check_libs=""
8803
8804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8805   echo "$ac_t""yes" 1>&6
8806           
8807 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8808 echo "configure:8809: checking for threeDClassRec in -l$athena_variant" >&5
8809 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8810
8811 xe_check_libs=" -l$athena_variant "
8812 cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 /* Override any gcc2 internal prototype to avoid an error.  */
8816 /* We use char because int might match the return type of a gcc2
8817     builtin and then its argument prototype would still apply.  */
8818 char threeDClassRec();
8819
8820 int main() {
8821 threeDClassRec()
8822 ; return 0; }
8823 EOF
8824 if { (eval echo configure:8825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8825   rm -rf conftest*
8826   eval "ac_cv_lib_$ac_lib_var=yes"
8827 else
8828   echo "configure: failed program was:" >&5
8829   cat conftest.$ac_ext >&5
8830   rm -rf conftest*
8831   eval "ac_cv_lib_$ac_lib_var=no"
8832 fi
8833 rm -f conftest*
8834 xe_check_libs=""
8835
8836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8837   echo "$ac_t""yes" 1>&6
8838   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8839 else
8840   echo "$ac_t""no" 1>&6
8841 athena_lib=$athena_variant
8842 fi
8843
8844
8845       
8846 else
8847   echo "$ac_t""no" 1>&6
8848 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8849 fi
8850
8851
8852   else
8853         
8854 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8855 echo "configure:8856: checking for threeDClassRec in -l$athena_variant" >&5
8856 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8857
8858 xe_check_libs=" -l$athena_variant "
8859 cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 /* Override any gcc2 internal prototype to avoid an error.  */
8863 /* We use char because int might match the return type of a gcc2
8864     builtin and then its argument prototype would still apply.  */
8865 char threeDClassRec();
8866
8867 int main() {
8868 threeDClassRec()
8869 ; return 0; }
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8872   rm -rf conftest*
8873   eval "ac_cv_lib_$ac_lib_var=yes"
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -rf conftest*
8878   eval "ac_cv_lib_$ac_lib_var=no"
8879 fi
8880 rm -f conftest*
8881 xe_check_libs=""
8882
8883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8884   echo "$ac_t""yes" 1>&6
8885   athena_lib=$athena_variant
8886 else
8887   echo "$ac_t""no" 1>&6
8888 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8889 echo "configure:8890: checking for threeDClassRec in -lXaw" >&5
8890 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8891
8892 xe_check_libs=" -lXaw "
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* Override any gcc2 internal prototype to avoid an error.  */
8897 /* We use char because int might match the return type of a gcc2
8898     builtin and then its argument prototype would still apply.  */
8899 char threeDClassRec();
8900
8901 int main() {
8902 threeDClassRec()
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=yes"
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=no"
8913 fi
8914 rm -f conftest*
8915 xe_check_libs=""
8916
8917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8918   echo "$ac_t""yes" 1>&6
8919   athena_lib=Xaw;
8920           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8921         
8922 else
8923   echo "$ac_t""no" 1>&6
8924 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8925 fi
8926
8927
8928 fi
8929
8930
8931   fi
8932
8933     if test "$athena_3d" = "no"; then
8934     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8935 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8936 echo "configure:8937: checking for X11/Xaw/ThreeD.h" >&5
8937
8938 cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 #include <X11/Xaw/ThreeD.h>
8942 EOF
8943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8944 { (eval echo configure:8945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8946 if test -z "$ac_err"; then
8947   rm -rf conftest*
8948   eval "ac_cv_header_$ac_safe=yes"
8949 else
8950   echo "$ac_err" >&5
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_header_$ac_safe=no"
8955 fi
8956 rm -f conftest*
8957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8958   echo "$ac_t""yes" 1>&6
8959   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8960 else
8961   echo "$ac_t""no" 1>&6
8962 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8963 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8964 echo "configure:8965: checking for X11/Xaw/XawInit.h" >&5
8965
8966 cat > conftest.$ac_ext <<EOF
8967 #line 8968 "configure"
8968 #include "confdefs.h"
8969 #include <X11/Xaw/XawInit.h>
8970 EOF
8971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8972 { (eval echo configure:8973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8974 if test -z "$ac_err"; then
8975   rm -rf conftest*
8976   eval "ac_cv_header_$ac_safe=yes"
8977 else
8978   echo "$ac_err" >&5
8979   echo "configure: failed program was:" >&5
8980   cat conftest.$ac_ext >&5
8981   rm -rf conftest*
8982   eval "ac_cv_header_$ac_safe=no"
8983 fi
8984 rm -f conftest*
8985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8986   echo "$ac_t""yes" 1>&6
8987   athena_h_path=X11/Xaw
8988 else
8989   echo "$ac_t""no" 1>&6
8990 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8991 fi
8992
8993 fi
8994
8995   else
8996             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8997 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8998 echo "configure:8999: checking for X11/$athena_variant/XawInit.h" >&5
8999
9000 cat > conftest.$ac_ext <<EOF
9001 #line 9002 "configure"
9002 #include "confdefs.h"
9003 #include <X11/$athena_variant/XawInit.h>
9004 EOF
9005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9006 { (eval echo configure:9007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9008 if test -z "$ac_err"; then
9009   rm -rf conftest*
9010   eval "ac_cv_header_$ac_safe=yes"
9011 else
9012   echo "$ac_err" >&5
9013   echo "configure: failed program was:" >&5
9014   cat conftest.$ac_ext >&5
9015   rm -rf conftest*
9016   eval "ac_cv_header_$ac_safe=no"
9017 fi
9018 rm -f conftest*
9019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9020   echo "$ac_t""yes" 1>&6
9021   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9022 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9023 echo "configure:9024: checking for X11/$athena_variant/ThreeD.h" >&5
9024
9025 cat > conftest.$ac_ext <<EOF
9026 #line 9027 "configure"
9027 #include "confdefs.h"
9028 #include <X11/$athena_variant/ThreeD.h>
9029 EOF
9030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9031 { (eval echo configure:9032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9033 if test -z "$ac_err"; then
9034   rm -rf conftest*
9035   eval "ac_cv_header_$ac_safe=yes"
9036 else
9037   echo "$ac_err" >&5
9038   echo "configure: failed program was:" >&5
9039   cat conftest.$ac_ext >&5
9040   rm -rf conftest*
9041   eval "ac_cv_header_$ac_safe=no"
9042 fi
9043 rm -f conftest*
9044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9045   echo "$ac_t""yes" 1>&6
9046   athena_h_path=X11/$athena_variant
9047 else
9048   echo "$ac_t""no" 1>&6
9049 fi
9050
9051 else
9052   echo "$ac_t""no" 1>&6
9053 fi
9054
9055
9056         if test -z "$athena_h_path"; then
9057       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9058 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9059 echo "configure:9060: checking for $athena_variant/XawInit.h" >&5
9060
9061 cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 #include <$athena_variant/XawInit.h>
9065 EOF
9066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9067 { (eval echo configure:9068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9069 if test -z "$ac_err"; then
9070   rm -rf conftest*
9071   eval "ac_cv_header_$ac_safe=yes"
9072 else
9073   echo "$ac_err" >&5
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   eval "ac_cv_header_$ac_safe=no"
9078 fi
9079 rm -f conftest*
9080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9081   echo "$ac_t""yes" 1>&6
9082   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9083 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9084 echo "configure:9085: checking for $athena_variant/ThreeD.h" >&5
9085
9086 cat > conftest.$ac_ext <<EOF
9087 #line 9088 "configure"
9088 #include "confdefs.h"
9089 #include <$athena_variant/ThreeD.h>
9090 EOF
9091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9092 { (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9094 if test -z "$ac_err"; then
9095   rm -rf conftest*
9096   eval "ac_cv_header_$ac_safe=yes"
9097 else
9098   echo "$ac_err" >&5
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   eval "ac_cv_header_$ac_safe=no"
9103 fi
9104 rm -f conftest*
9105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9106   echo "$ac_t""yes" 1>&6
9107   athena_h_path=$athena_variant
9108 else
9109   echo "$ac_t""no" 1>&6
9110 fi
9111
9112 else
9113   echo "$ac_t""no" 1>&6
9114 fi
9115
9116     fi
9117
9118         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9119       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9120 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9121 echo "configure:9122: checking for X11/Xaw3d/XawInit.h" >&5
9122
9123 cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9126 #include <X11/Xaw3d/XawInit.h>
9127 EOF
9128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9129 { (eval echo configure:9130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9131 if test -z "$ac_err"; then
9132   rm -rf conftest*
9133   eval "ac_cv_header_$ac_safe=yes"
9134 else
9135   echo "$ac_err" >&5
9136   echo "configure: failed program was:" >&5
9137   cat conftest.$ac_ext >&5
9138   rm -rf conftest*
9139   eval "ac_cv_header_$ac_safe=no"
9140 fi
9141 rm -f conftest*
9142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9143   echo "$ac_t""yes" 1>&6
9144   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9145 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9146 echo "configure:9147: checking for X11/Xaw3d/ThreeD.h" >&5
9147
9148 cat > conftest.$ac_ext <<EOF
9149 #line 9150 "configure"
9150 #include "confdefs.h"
9151 #include <X11/Xaw3d/ThreeD.h>
9152 EOF
9153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9154 { (eval echo configure:9155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9156 if test -z "$ac_err"; then
9157   rm -rf conftest*
9158   eval "ac_cv_header_$ac_safe=yes"
9159 else
9160   echo "$ac_err" >&5
9161   echo "configure: failed program was:" >&5
9162   cat conftest.$ac_ext >&5
9163   rm -rf conftest*
9164   eval "ac_cv_header_$ac_safe=no"
9165 fi
9166 rm -f conftest*
9167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9168   echo "$ac_t""yes" 1>&6
9169   
9170             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9171             athena_h_path=X11/Xaw3d
9172           
9173 else
9174   echo "$ac_t""no" 1>&6
9175 fi
9176
9177 else
9178   echo "$ac_t""no" 1>&6
9179 fi
9180
9181     fi
9182
9183         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9184       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9185 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9186 echo "configure:9187: checking for Xaw3d/XawInit.h" >&5
9187
9188 cat > conftest.$ac_ext <<EOF
9189 #line 9190 "configure"
9190 #include "confdefs.h"
9191 #include <Xaw3d/XawInit.h>
9192 EOF
9193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9194 { (eval echo configure:9195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9196 if test -z "$ac_err"; then
9197   rm -rf conftest*
9198   eval "ac_cv_header_$ac_safe=yes"
9199 else
9200   echo "$ac_err" >&5
9201   echo "configure: failed program was:" >&5
9202   cat conftest.$ac_ext >&5
9203   rm -rf conftest*
9204   eval "ac_cv_header_$ac_safe=no"
9205 fi
9206 rm -f conftest*
9207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9208   echo "$ac_t""yes" 1>&6
9209   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9210 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9211 echo "configure:9212: checking for Xaw3d/ThreeD.h" >&5
9212
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 #include <Xaw3d/ThreeD.h>
9217 EOF
9218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9219 { (eval echo configure:9220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9221 if test -z "$ac_err"; then
9222   rm -rf conftest*
9223   eval "ac_cv_header_$ac_safe=yes"
9224 else
9225   echo "$ac_err" >&5
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -rf conftest*
9229   eval "ac_cv_header_$ac_safe=no"
9230 fi
9231 rm -f conftest*
9232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9233   echo "$ac_t""yes" 1>&6
9234   
9235             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9236             athena_h_path=Xaw3d
9237           
9238 else
9239   echo "$ac_t""no" 1>&6
9240 fi
9241
9242 else
9243   echo "$ac_t""no" 1>&6
9244 fi
9245
9246     fi
9247
9248             if test -z "$athena_h_path"; then
9249       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9250 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9251 echo "configure:9252: checking for X11/Xaw/ThreeD.h" >&5
9252
9253 cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 #include <X11/Xaw/ThreeD.h>
9257 EOF
9258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9259 { (eval echo configure:9260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9261 if test -z "$ac_err"; then
9262   rm -rf conftest*
9263   eval "ac_cv_header_$ac_safe=yes"
9264 else
9265   echo "$ac_err" >&5
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268   rm -rf conftest*
9269   eval "ac_cv_header_$ac_safe=no"
9270 fi
9271 rm -f conftest*
9272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9273   echo "$ac_t""yes" 1>&6
9274   
9275           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9276           athena_h_path=X11/Xaw
9277         
9278 else
9279   echo "$ac_t""no" 1>&6
9280 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9281 fi
9282
9283     fi
9284   fi
9285
9286     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9287     have_xaw=yes
9288   else
9289     have_xaw=no
9290   fi
9291
9292     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9293 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9294 echo "configure:9295: checking for Xm/Xm.h" >&5
9295
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <Xm/Xm.h>
9300 EOF
9301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9302 { (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9304 if test -z "$ac_err"; then
9305   rm -rf conftest*
9306   eval "ac_cv_header_$ac_safe=yes"
9307 else
9308   echo "$ac_err" >&5
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=no"
9313 fi
9314 rm -f conftest*
9315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317   
9318 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9319 echo "configure:9320: checking for XmStringFree in -lXm" >&5
9320 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9321
9322 xe_check_libs=" -lXm "
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 /* We use char because int might match the return type of a gcc2
9328     builtin and then its argument prototype would still apply.  */
9329 char XmStringFree();
9330
9331 int main() {
9332 XmStringFree()
9333 ; return 0; }
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=yes"
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=no"
9343 fi
9344 rm -f conftest*
9345 xe_check_libs=""
9346
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9348   echo "$ac_t""yes" 1>&6
9349   have_motif=yes
9350 else
9351   echo "$ac_t""no" 1>&6
9352 have_motif=no
9353 fi
9354
9355
9356 else
9357   echo "$ac_t""no" 1>&6
9358 have_motif=no
9359 fi
9360
9361
9362   if test "$have_motif" = "yes"; then
9363         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9364 echo "configure:9365: checking for Lesstif" >&5
9365     cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 #include <Xm/Xm.h>
9369 #ifdef LESSTIF_VERSION
9370 yes
9371 #endif
9372
9373 EOF
9374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9375   egrep "yes" >/dev/null 2>&1; then
9376   rm -rf conftest*
9377   have_lesstif=yes
9378 else
9379   rm -rf conftest*
9380   have_lesstif=no
9381 fi
9382 rm -f conftest*
9383
9384   echo "$ac_t""$have_lesstif" 1>&6
9385   fi
9386
9387 fi 
9388
9389 case "$with_menubars" in "" | "yes" | "athena" )
9390   with_menubars="lucid" ;;
9391 esac
9392 case "$with_dialogs" in "" | "yes" | "lucid" )
9393   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9394   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9395   else with_dialogs=no
9396   fi ;;
9397 esac
9398 case "$with_scrollbars" in "" | "yes" )
9399   with_scrollbars="lucid" ;;
9400 esac
9401 case "$with_widgets" in "" | "yes" | "lucid")
9402   if   test "$have_motif" = "yes"; then with_widgets="motif"
9403   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9404   else with_widgets=no
9405   fi ;;
9406 esac
9407
9408 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9409
9410 case "$all_widgets" in
9411   *athena* )
9412     if test "$have_xaw" != "yes"; then
9413       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9414     fi
9415
9416         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9417
9418         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9419
9420                     { test "$extra_verbose" = "yes" && cat << EOF
9421     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9422 EOF
9423 cat >> confdefs.h <<EOF
9424 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9425 EOF
9426 }
9427
9428     { test "$extra_verbose" = "yes" && cat << EOF
9429     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9430 EOF
9431 cat >> confdefs.h <<EOF
9432 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9433 EOF
9434 }
9435
9436     { test "$extra_verbose" = "yes" && cat << EOF
9437     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9438 EOF
9439 cat >> confdefs.h <<EOF
9440 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9441 EOF
9442 }
9443
9444     { test "$extra_verbose" = "yes" && cat << EOF
9445     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9446 EOF
9447 cat >> confdefs.h <<EOF
9448 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9449 EOF
9450 }
9451
9452     { test "$extra_verbose" = "yes" && cat << EOF
9453     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9454 EOF
9455 cat >> confdefs.h <<EOF
9456 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9457 EOF
9458 }
9459
9460     { test "$extra_verbose" = "yes" && cat << EOF
9461     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9462 EOF
9463 cat >> confdefs.h <<EOF
9464 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9465 EOF
9466 }
9467
9468     { test "$extra_verbose" = "yes" && cat << EOF
9469     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9470 EOF
9471 cat >> confdefs.h <<EOF
9472 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9473 EOF
9474 }
9475
9476     { test "$extra_verbose" = "yes" && cat << EOF
9477     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9478 EOF
9479 cat >> confdefs.h <<EOF
9480 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9481 EOF
9482 }
9483
9484     { test "$extra_verbose" = "yes" && cat << EOF
9485     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9486 EOF
9487 cat >> confdefs.h <<EOF
9488 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9489 EOF
9490 }
9491
9492     { test "$extra_verbose" = "yes" && cat << EOF
9493     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9494 EOF
9495 cat >> confdefs.h <<EOF
9496 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9497 EOF
9498 }
9499
9500
9501     { test "$extra_verbose" = "yes" && cat << \EOF
9502     Defining LWLIB_USES_ATHENA
9503 EOF
9504 cat >> confdefs.h <<\EOF
9505 #define LWLIB_USES_ATHENA 1
9506 EOF
9507 }
9508
9509     { test "$extra_verbose" = "yes" && cat << \EOF
9510     Defining NEED_ATHENA
9511 EOF
9512 cat >> confdefs.h <<\EOF
9513 #define NEED_ATHENA 1
9514 EOF
9515 }
9516
9517     need_athena="yes"
9518
9519     if test "$athena_3d" = "yes"; then
9520       { test "$extra_verbose" = "yes" && cat << \EOF
9521     Defining HAVE_ATHENA_3D
9522 EOF
9523 cat >> confdefs.h <<\EOF
9524 #define HAVE_ATHENA_3D 1
9525 EOF
9526 }
9527
9528     fi
9529   ;;
9530 esac
9531
9532 case "$all_widgets" in *motif* )
9533   { test "$extra_verbose" = "yes" && cat << \EOF
9534     Defining LWLIB_USES_MOTIF
9535 EOF
9536 cat >> confdefs.h <<\EOF
9537 #define LWLIB_USES_MOTIF 1
9538 EOF
9539 }
9540
9541   { test "$extra_verbose" = "yes" && cat << \EOF
9542     Defining NEED_MOTIF
9543 EOF
9544 cat >> confdefs.h <<\EOF
9545 #define NEED_MOTIF 1
9546 EOF
9547 }
9548
9549   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9550   need_motif=yes ;;
9551 esac
9552
9553 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9554 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9555 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9556 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9557         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9558 case "$with_widgets" in athena* )
9559         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;;
9560 esac
9561 case "$all_widgets" in *lucid* )
9562   { test "$extra_verbose" = "yes" && cat << \EOF
9563     Defining NEED_LUCID
9564 EOF
9565 cat >> confdefs.h <<\EOF
9566 #define NEED_LUCID 1
9567 EOF
9568 }
9569
9570   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9571 esac
9572
9573
9574
9575 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9576     Defining LWLIB_SCROLLBARS_ATHENA
9577 EOF
9578 cat >> confdefs.h <<\EOF
9579 #define LWLIB_SCROLLBARS_ATHENA 1
9580 EOF
9581 }
9582
9583 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9584     Defining LWLIB_DIALOGS_ATHENA
9585 EOF
9586 cat >> confdefs.h <<\EOF
9587 #define LWLIB_DIALOGS_ATHENA 1
9588 EOF
9589 }
9590
9591
9592 if test "$athena_3d" = "yes"; then
9593   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9594     Defining LWLIB_SCROLLBARS_ATHENA3D
9595 EOF
9596 cat >> confdefs.h <<\EOF
9597 #define LWLIB_SCROLLBARS_ATHENA3D 1
9598 EOF
9599 }
9600
9601   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9602     Defining LWLIB_DIALOGS_ATHENA3D
9603 EOF
9604 cat >> confdefs.h <<\EOF
9605 #define LWLIB_DIALOGS_ATHENA3D 1
9606 EOF
9607 }
9608
9609 fi
9610
9611 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9612     Defining LWLIB_WIDGETS_ATHENA
9613 EOF
9614 cat >> confdefs.h <<\EOF
9615 #define LWLIB_WIDGETS_ATHENA 1
9616 EOF
9617 }
9618 ;; esac
9619 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9620         { test "$extra_verbose" = "yes" && cat << \EOF
9621     Defining LWLIB_TABS_LUCID
9622 EOF
9623 cat >> confdefs.h <<\EOF
9624 #define LWLIB_TABS_LUCID 1
9625 EOF
9626 }
9627
9628
9629 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9630     Defining HAVE_MENUBARS
9631 EOF
9632 cat >> confdefs.h <<\EOF
9633 #define HAVE_MENUBARS 1
9634 EOF
9635 }
9636
9637 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9638     Defining HAVE_SCROLLBARS
9639 EOF
9640 cat >> confdefs.h <<\EOF
9641 #define HAVE_SCROLLBARS 1
9642 EOF
9643 }
9644
9645 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9646     Defining HAVE_DIALOGS
9647 EOF
9648 cat >> confdefs.h <<\EOF
9649 #define HAVE_DIALOGS 1
9650 EOF
9651 }
9652
9653 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9654     Defining HAVE_TOOLBARS
9655 EOF
9656 cat >> confdefs.h <<\EOF
9657 #define HAVE_TOOLBARS 1
9658 EOF
9659 }
9660
9661 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9662     Defining HAVE_WIDGETS
9663 EOF
9664 cat >> confdefs.h <<\EOF
9665 #define HAVE_WIDGETS 1
9666 EOF
9667 }
9668
9669
9670 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9671     Defining LWLIB_MENUBARS_LUCID
9672 EOF
9673 cat >> confdefs.h <<\EOF
9674 #define LWLIB_MENUBARS_LUCID 1
9675 EOF
9676 }
9677
9678 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9679     Defining LWLIB_SCROLLBARS_LUCID
9680 EOF
9681 cat >> confdefs.h <<\EOF
9682 #define LWLIB_SCROLLBARS_LUCID 1
9683 EOF
9684 }
9685
9686
9687 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9688     Defining LWLIB_MENUBARS_MOTIF
9689 EOF
9690 cat >> confdefs.h <<\EOF
9691 #define LWLIB_MENUBARS_MOTIF 1
9692 EOF
9693 }
9694
9695 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9696     Defining LWLIB_SCROLLBARS_MOTIF
9697 EOF
9698 cat >> confdefs.h <<\EOF
9699 #define LWLIB_SCROLLBARS_MOTIF 1
9700 EOF
9701 }
9702
9703 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9704     Defining LWLIB_DIALOGS_MOTIF
9705 EOF
9706 cat >> confdefs.h <<\EOF
9707 #define LWLIB_DIALOGS_MOTIF 1
9708 EOF
9709 }
9710
9711 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9712     Defining LWLIB_WIDGETS_MOTIF
9713 EOF
9714 cat >> confdefs.h <<\EOF
9715 #define LWLIB_WIDGETS_MOTIF 1
9716 EOF
9717 }
9718
9719
9720 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9721    echo "    xemacs will be linked with \"menubar.o\""
9722  fi
9723 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9724    echo "    xemacs will be linked with \"scrollbar.o\""
9725  fi
9726 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9727    echo "    xemacs will be linked with \"dialog.o\""
9728  fi
9729 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9730    echo "    xemacs will be linked with \"toolbar.o\""
9731  fi
9732
9733 if test "$with_gtk" = "yes"; then
9734   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9735    echo "    xemacs will be linked with \"menubar-gtk.o\""
9736  fi
9737   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9738    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9739  fi
9740   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9741    echo "    xemacs will be linked with \"dialog-gtk.o\""
9742  fi
9743   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9744    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9745  fi
9746   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9747    echo "    xemacs will be linked with \"gui-gtk.o\""
9748  fi
9749 fi
9750
9751 if test "$with_x11" = "yes"; then
9752   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9753    echo "    xemacs will be linked with \"menubar-x.o\""
9754  fi
9755   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9756    echo "    xemacs will be linked with \"scrollbar-x.o\""
9757  fi
9758   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9759    echo "    xemacs will be linked with \"dialog-x.o\""
9760  fi
9761   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9762    echo "    xemacs will be linked with \"toolbar-x.o\""
9763  fi
9764   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9765    echo "    xemacs will be linked with \"gui-x.o\""
9766  fi
9767 fi
9768
9769
9770 test -z "$with_mule" && with_mule=no
9771 test -z "$with_file_coding" && with_file_coding=no
9772
9773
9774 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9775   { test "$extra_verbose" = "yes" && cat << \EOF
9776     Defining FILE_CODING
9777 EOF
9778 cat >> confdefs.h <<\EOF
9779 #define FILE_CODING 1
9780 EOF
9781 }
9782
9783   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9784    echo "    xemacs will be linked with \"file-coding.o\""
9785  fi
9786 fi
9787
9788 if test "$with_mule" = "yes" ; then
9789   echo "checking for Mule-related features" 1>&6
9790 echo "configure:9791: checking for Mule-related features" >&5
9791   { test "$extra_verbose" = "yes" && cat << \EOF
9792     Defining MULE
9793 EOF
9794 cat >> confdefs.h <<\EOF
9795 #define MULE 1
9796 EOF
9797 }
9798
9799   { test "$extra_verbose" = "yes" && cat << \EOF
9800     Defining FILE_CODING
9801 EOF
9802 cat >> confdefs.h <<\EOF
9803 #define FILE_CODING 1
9804 EOF
9805 }
9806
9807   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9809  fi
9810   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9811     { test "$extra_verbose" = "yes" && cat << \EOF
9812     Defining TEXT_CODING
9813 EOF
9814 cat >> confdefs.h <<\EOF
9815 #define TEXT_CODING 1
9816 EOF
9817 }
9818
9819     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9820    echo "    xemacs will be linked with \"text-coding.o\""
9821  fi
9822   else
9823     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9824    echo "    xemacs will be linked with \"file-coding.o\""
9825  fi
9826   fi
9827     for ac_hdr in libintl.h
9828 do
9829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9831 echo "configure:9832: checking for $ac_hdr" >&5
9832
9833 cat > conftest.$ac_ext <<EOF
9834 #line 9835 "configure"
9835 #include "confdefs.h"
9836 #include <$ac_hdr>
9837 EOF
9838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9839 { (eval echo configure:9840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9841 if test -z "$ac_err"; then
9842   rm -rf conftest*
9843   eval "ac_cv_header_$ac_safe=yes"
9844 else
9845   echo "$ac_err" >&5
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_header_$ac_safe=no"
9850 fi
9851 rm -f conftest*
9852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9853   echo "$ac_t""yes" 1>&6
9854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9855   { test "$extra_verbose" = "yes" && cat << EOF
9856     Defining $ac_tr_hdr
9857 EOF
9858 cat >> confdefs.h <<EOF
9859 #define $ac_tr_hdr 1
9860 EOF
9861 }
9862  
9863 else
9864   echo "$ac_t""no" 1>&6
9865 fi
9866 done
9867
9868   
9869 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9870 echo "configure:9871: checking for strerror in -lintl" >&5
9871 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9872
9873 xe_check_libs=" -lintl "
9874 cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 /* Override any gcc2 internal prototype to avoid an error.  */
9878 /* We use char because int might match the return type of a gcc2
9879     builtin and then its argument prototype would still apply.  */
9880 char strerror();
9881
9882 int main() {
9883 strerror()
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9887   rm -rf conftest*
9888   eval "ac_cv_lib_$ac_lib_var=yes"
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   eval "ac_cv_lib_$ac_lib_var=no"
9894 fi
9895 rm -f conftest*
9896 xe_check_libs=""
9897
9898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9899   echo "$ac_t""yes" 1>&6
9900     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9902   { test "$extra_verbose" = "yes" && cat << EOF
9903     Defining $ac_tr_lib
9904 EOF
9905 cat >> confdefs.h <<EOF
9906 #define $ac_tr_lib 1
9907 EOF
9908 }
9909
9910   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9911
9912 else
9913   echo "$ac_t""no" 1>&6
9914 fi
9915
9916
9917
9918   if test "$with_utf_2000" = "yes" ; then
9919     { test "$extra_verbose" = "yes" && cat << \EOF
9920     Defining CHAR_IS_UCS4
9921 EOF
9922 cat >> confdefs.h <<\EOF
9923 #define CHAR_IS_UCS4 1
9924 EOF
9925 }
9926
9927     { test "$extra_verbose" = "yes" && cat << \EOF
9928     Defining UTF2000
9929 EOF
9930 cat >> confdefs.h <<\EOF
9931 #define UTF2000 1
9932 EOF
9933 }
9934
9935   fi
9936
9937   echo "checking for Mule input methods" 1>&6
9938 echo "configure:9939: checking for Mule input methods" >&5
9939         case "$with_xim" in "" | "yes" )
9940     echo "checking for XIM" 1>&6
9941 echo "configure:9942: checking for XIM" >&5
9942     
9943 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9944 echo "configure:9945: checking for XOpenIM in -lX11" >&5
9945 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9946
9947 xe_check_libs=" -lX11 "
9948 cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 /* We use char because int might match the return type of a gcc2
9953     builtin and then its argument prototype would still apply.  */
9954 char XOpenIM();
9955
9956 int main() {
9957 XOpenIM()
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   eval "ac_cv_lib_$ac_lib_var=yes"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   eval "ac_cv_lib_$ac_lib_var=no"
9968 fi
9969 rm -f conftest*
9970 xe_check_libs=""
9971
9972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9973   echo "$ac_t""yes" 1>&6
9974   with_xim=xlib
9975 else
9976   echo "$ac_t""no" 1>&6
9977 with_xim=no
9978 fi
9979
9980
9981         if test "$have_motif $have_lesstif" = "yes no"; then
9982       
9983 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9984 echo "configure:9985: checking for XmImMbLookupString in -lXm" >&5
9985 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9986
9987 xe_check_libs=" -lXm "
9988 cat > conftest.$ac_ext <<EOF
9989 #line 9990 "configure"
9990 #include "confdefs.h"
9991 /* Override any gcc2 internal prototype to avoid an error.  */
9992 /* We use char because int might match the return type of a gcc2
9993     builtin and then its argument prototype would still apply.  */
9994 char XmImMbLookupString();
9995
9996 int main() {
9997 XmImMbLookupString()
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10001   rm -rf conftest*
10002   eval "ac_cv_lib_$ac_lib_var=yes"
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   eval "ac_cv_lib_$ac_lib_var=no"
10008 fi
10009 rm -f conftest*
10010 xe_check_libs=""
10011
10012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10013   echo "$ac_t""yes" 1>&6
10014   with_xim=motif
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018
10019
10020     fi ;;
10021   esac
10022   if test "$with_xim" != "no"; then
10023     { test "$extra_verbose" = "yes" && cat << \EOF
10024     Defining HAVE_XIM
10025 EOF
10026 cat >> confdefs.h <<\EOF
10027 #define HAVE_XIM 1
10028 EOF
10029 }
10030
10031     if test "$with_xim" = "xlib"; then
10032       { test "$extra_verbose" = "yes" && cat << \EOF
10033     Defining XIM_XLIB
10034 EOF
10035 cat >> confdefs.h <<\EOF
10036 #define XIM_XLIB 1
10037 EOF
10038 }
10039
10040       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10041    echo "    xemacs will be linked with \"input-method-xlib.o\""
10042  fi
10043     fi
10044     if test "$with_xim" = "motif"; then
10045       { test "$extra_verbose" = "yes" && cat << \EOF
10046     Defining XIM_MOTIF
10047 EOF
10048 cat >> confdefs.h <<\EOF
10049 #define XIM_MOTIF 1
10050 EOF
10051 }
10052
10053       need_motif=yes
10054       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10055    echo "    xemacs will be linked with \"input-method-motif.o\""
10056  fi
10057     fi
10058     if test "$with_xim" = "motif"; then
10059       with_xfs=no
10060     fi
10061   fi
10062
10063     if test "$with_xfs" = "yes" ; then
10064     echo "checking for XFontSet" 1>&6
10065 echo "configure:10066: checking for XFontSet" >&5
10066     
10067 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10068 echo "configure:10069: checking for XmbDrawString in -lX11" >&5
10069 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10070
10071 xe_check_libs=" -lX11 "
10072 cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 /* Override any gcc2 internal prototype to avoid an error.  */
10076 /* We use char because int might match the return type of a gcc2
10077     builtin and then its argument prototype would still apply.  */
10078 char XmbDrawString();
10079
10080 int main() {
10081 XmbDrawString()
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10085   rm -rf conftest*
10086   eval "ac_cv_lib_$ac_lib_var=yes"
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_lib_$ac_lib_var=no"
10092 fi
10093 rm -f conftest*
10094 xe_check_libs=""
10095
10096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10097   echo "$ac_t""yes" 1>&6
10098   :
10099 else
10100   echo "$ac_t""no" 1>&6
10101 with_xfs=no
10102 fi
10103
10104
10105     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10106       { test "$extra_verbose" = "yes" && cat << \EOF
10107     Defining USE_XFONTSET
10108 EOF
10109 cat >> confdefs.h <<\EOF
10110 #define USE_XFONTSET 1
10111 EOF
10112 }
10113
10114       if test "$with_xim" = "no" ; then
10115         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10116    echo "    xemacs will be linked with \"input-method-xlib.o\""
10117  fi
10118       fi
10119     fi
10120   fi 
10121     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10122   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10123 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10124 echo "configure:10125: checking for wnn/jllib.h" >&5
10125
10126 cat > conftest.$ac_ext <<EOF
10127 #line 10128 "configure"
10128 #include "confdefs.h"
10129 #include <wnn/jllib.h>
10130 EOF
10131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10132 { (eval echo configure:10133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10134 if test -z "$ac_err"; then
10135   rm -rf conftest*
10136   eval "ac_cv_header_$ac_safe=yes"
10137 else
10138   echo "$ac_err" >&5
10139   echo "configure: failed program was:" >&5
10140   cat conftest.$ac_ext >&5
10141   rm -rf conftest*
10142   eval "ac_cv_header_$ac_safe=no"
10143 fi
10144 rm -f conftest*
10145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10146   echo "$ac_t""yes" 1>&6
10147   :
10148 else
10149   echo "$ac_t""no" 1>&6
10150 with_wnn=no
10151 fi
10152  }
10153     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10154 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10155 echo "configure:10156: checking for wnn/commonhd.h" >&5
10156
10157 cat > conftest.$ac_ext <<EOF
10158 #line 10159 "configure"
10159 #include "confdefs.h"
10160 #include <wnn/commonhd.h>
10161 EOF
10162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10163 { (eval echo configure:10164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10165 if test -z "$ac_err"; then
10166   rm -rf conftest*
10167   eval "ac_cv_header_$ac_safe=yes"
10168 else
10169   echo "$ac_err" >&5
10170   echo "configure: failed program was:" >&5
10171   cat conftest.$ac_ext >&5
10172   rm -rf conftest*
10173   eval "ac_cv_header_$ac_safe=no"
10174 fi
10175 rm -f conftest*
10176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10177   echo "$ac_t""yes" 1>&6
10178   :
10179 else
10180   echo "$ac_t""no" 1>&6
10181 with_wnn=no
10182 fi
10183  }
10184     if test "$with_wnn" != "no"; then
10185     for ac_func in crypt
10186 do
10187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10188 echo "configure:10189: checking for $ac_func" >&5
10189
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 /* System header to define __stub macros and hopefully few prototypes,
10194     which can conflict with char $ac_func(); below.  */
10195 #include <assert.h>
10196 /* Override any gcc2 internal prototype to avoid an error.  */
10197 /* We use char because int might match the return type of a gcc2
10198     builtin and then its argument prototype would still apply.  */
10199 char $ac_func();
10200
10201 int main() {
10202
10203 /* The GNU C library defines this for functions which it implements
10204     to always fail with ENOSYS.  Some functions are actually named
10205     something starting with __ and the normal name is an alias.  */
10206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10207 choke me
10208 #else
10209 $ac_func();
10210 #endif
10211
10212 ; return 0; }
10213 EOF
10214 if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10215   rm -rf conftest*
10216   eval "ac_cv_func_$ac_func=yes"
10217 else
10218   echo "configure: failed program was:" >&5
10219   cat conftest.$ac_ext >&5
10220   rm -rf conftest*
10221   eval "ac_cv_func_$ac_func=no"
10222 fi
10223 rm -f conftest*
10224
10225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10228   { test "$extra_verbose" = "yes" && cat << EOF
10229     Defining $ac_tr_func
10230 EOF
10231 cat >> confdefs.h <<EOF
10232 #define $ac_tr_func 1
10233 EOF
10234 }
10235  
10236 else
10237   echo "$ac_t""no" 1>&6
10238 fi
10239 done
10240
10241     test "$ac_cv_func_crypt" != "yes" && { 
10242 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10243 echo "configure:10244: checking for crypt in -lcrypt" >&5
10244 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10245
10246 xe_check_libs=" -lcrypt "
10247 cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 /* Override any gcc2 internal prototype to avoid an error.  */
10251 /* We use char because int might match the return type of a gcc2
10252     builtin and then its argument prototype would still apply.  */
10253 char crypt();
10254
10255 int main() {
10256 crypt()
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10260   rm -rf conftest*
10261   eval "ac_cv_lib_$ac_lib_var=yes"
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   eval "ac_cv_lib_$ac_lib_var=no"
10267 fi
10268 rm -f conftest*
10269 xe_check_libs=""
10270
10271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10272   echo "$ac_t""yes" 1>&6
10273     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10275   { test "$extra_verbose" = "yes" && cat << EOF
10276     Defining $ac_tr_lib
10277 EOF
10278 cat >> confdefs.h <<EOF
10279 #define $ac_tr_lib 1
10280 EOF
10281 }
10282
10283   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10284
10285 else
10286   echo "$ac_t""no" 1>&6
10287 fi
10288
10289  }
10290   fi
10291     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10292     
10293 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10294 echo "configure:10295: checking for jl_dic_list_e in -lwnn" >&5
10295 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10296
10297 xe_check_libs=" -lwnn "
10298 cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* Override any gcc2 internal prototype to avoid an error.  */
10302 /* We use char because int might match the return type of a gcc2
10303     builtin and then its argument prototype would still apply.  */
10304 char jl_dic_list_e();
10305
10306 int main() {
10307 jl_dic_list_e()
10308 ; return 0; }
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10311   rm -rf conftest*
10312   eval "ac_cv_lib_$ac_lib_var=yes"
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -rf conftest*
10317   eval "ac_cv_lib_$ac_lib_var=no"
10318 fi
10319 rm -f conftest*
10320 xe_check_libs=""
10321
10322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10323   echo "$ac_t""yes" 1>&6
10324   libwnn=wnn
10325 else
10326   echo "$ac_t""no" 1>&6
10327 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10328 echo "configure:10329: checking for jl_dic_list_e in -lwnn4" >&5
10329 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10330
10331 xe_check_libs=" -lwnn4 "
10332 cat > conftest.$ac_ext <<EOF
10333 #line 10334 "configure"
10334 #include "confdefs.h"
10335 /* Override any gcc2 internal prototype to avoid an error.  */
10336 /* We use char because int might match the return type of a gcc2
10337     builtin and then its argument prototype would still apply.  */
10338 char jl_dic_list_e();
10339
10340 int main() {
10341 jl_dic_list_e()
10342 ; return 0; }
10343 EOF
10344 if { (eval echo configure:10345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10345   rm -rf conftest*
10346   eval "ac_cv_lib_$ac_lib_var=yes"
10347 else
10348   echo "configure: failed program was:" >&5
10349   cat conftest.$ac_ext >&5
10350   rm -rf conftest*
10351   eval "ac_cv_lib_$ac_lib_var=no"
10352 fi
10353 rm -f conftest*
10354 xe_check_libs=""
10355
10356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10357   echo "$ac_t""yes" 1>&6
10358   libwnn=wnn4
10359 else
10360   echo "$ac_t""no" 1>&6
10361 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10362 echo "configure:10363: checking for jl_dic_list_e in -lwnn6" >&5
10363 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10364
10365 xe_check_libs=" -lwnn6 "
10366 cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 /* Override any gcc2 internal prototype to avoid an error.  */
10370 /* We use char because int might match the return type of a gcc2
10371     builtin and then its argument prototype would still apply.  */
10372 char jl_dic_list_e();
10373
10374 int main() {
10375 jl_dic_list_e()
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10379   rm -rf conftest*
10380   eval "ac_cv_lib_$ac_lib_var=yes"
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   eval "ac_cv_lib_$ac_lib_var=no"
10386 fi
10387 rm -f conftest*
10388 xe_check_libs=""
10389
10390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10391   echo "$ac_t""yes" 1>&6
10392   libwnn=wnn6
10393 else
10394   echo "$ac_t""no" 1>&6
10395 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10396 echo "configure:10397: checking for dic_list_e in -lwnn6_fromsrc" >&5
10397 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10398
10399 xe_check_libs=" -lwnn6_fromsrc "
10400 cat > conftest.$ac_ext <<EOF
10401 #line 10402 "configure"
10402 #include "confdefs.h"
10403 /* Override any gcc2 internal prototype to avoid an error.  */
10404 /* We use char because int might match the return type of a gcc2
10405     builtin and then its argument prototype would still apply.  */
10406 char dic_list_e();
10407
10408 int main() {
10409 dic_list_e()
10410 ; return 0; }
10411 EOF
10412 if { (eval echo configure:10413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10413   rm -rf conftest*
10414   eval "ac_cv_lib_$ac_lib_var=yes"
10415 else
10416   echo "configure: failed program was:" >&5
10417   cat conftest.$ac_ext >&5
10418   rm -rf conftest*
10419   eval "ac_cv_lib_$ac_lib_var=no"
10420 fi
10421 rm -f conftest*
10422 xe_check_libs=""
10423
10424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10425   echo "$ac_t""yes" 1>&6
10426   libwnn=wnn6_fromsrc
10427 else
10428   echo "$ac_t""no" 1>&6
10429 with_wnn=no
10430 fi
10431
10432
10433 fi
10434
10435
10436 fi
10437
10438
10439 fi
10440
10441
10442   fi
10443   test -z "$with_wnn" && with_wnn=yes
10444   if test "$with_wnn" = "yes"; then
10445     { test "$extra_verbose" = "yes" && cat << \EOF
10446     Defining HAVE_WNN
10447 EOF
10448 cat >> confdefs.h <<\EOF
10449 #define HAVE_WNN 1
10450 EOF
10451 }
10452
10453     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10454     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10455    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10456  fi
10457     if test "$with_wnn6" != "no"; then
10458       
10459 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10460 echo "configure:10461: checking for jl_fi_dic_list in -l$libwnn" >&5
10461 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10462
10463 xe_check_libs=" -l$libwnn "
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 /* We use char because int might match the return type of a gcc2
10469     builtin and then its argument prototype would still apply.  */
10470 char jl_fi_dic_list();
10471
10472 int main() {
10473 jl_fi_dic_list()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 xe_check_libs=""
10487
10488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10489   echo "$ac_t""yes" 1>&6
10490   with_wnn6=yes
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494
10495
10496       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10497     Defining WNN6
10498 EOF
10499 cat >> confdefs.h <<\EOF
10500 #define WNN6 1
10501 EOF
10502 }
10503
10504     fi
10505   fi
10506
10507     canna_includes_found=no
10508   if test "$with_canna" != "no"; then
10509     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10510 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10511 echo "configure:10512: checking for canna/jrkanji.h" >&5
10512
10513 cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516 #include <canna/jrkanji.h>
10517 EOF
10518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10519 { (eval echo configure:10520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10521 if test -z "$ac_err"; then
10522   rm -rf conftest*
10523   eval "ac_cv_header_$ac_safe=yes"
10524 else
10525   echo "$ac_err" >&5
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=no"
10530 fi
10531 rm -f conftest*
10532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534   canna_includes_found=yes
10535 else
10536   echo "$ac_t""no" 1>&6
10537 fi
10538
10539   fi
10540   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10541       -d "/usr/local/canna/include"; then
10542     save_c_switch_site="$c_switch_site"
10543     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10544     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10545 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10546 echo "configure:10547: checking for canna/jrkanji.h" >&5
10547
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551 #include <canna/jrkanji.h>
10552 EOF
10553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10554 { (eval echo configure:10555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10556 if test -z "$ac_err"; then
10557   rm -rf conftest*
10558   eval "ac_cv_header_$ac_safe=yes"
10559 else
10560   echo "$ac_err" >&5
10561   echo "configure: failed program was:" >&5
10562   cat conftest.$ac_ext >&5
10563   rm -rf conftest*
10564   eval "ac_cv_header_$ac_safe=no"
10565 fi
10566 rm -f conftest*
10567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569   canna_includes_found=yes
10570 else
10571   echo "$ac_t""no" 1>&6
10572 fi
10573
10574     if test "$canna_includes_found" != "yes"; then
10575       c_switch_site="$save_c_switch_site"
10576       with_canna="no"
10577     fi
10578   fi
10579
10580   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10581 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10582 echo "configure:10583: checking for canna/RK.h" >&5
10583
10584 cat > conftest.$ac_ext <<EOF
10585 #line 10586 "configure"
10586 #include "confdefs.h"
10587 #include <canna/RK.h>
10588 EOF
10589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10590 { (eval echo configure:10591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10592 if test -z "$ac_err"; then
10593   rm -rf conftest*
10594   eval "ac_cv_header_$ac_safe=yes"
10595 else
10596   echo "$ac_err" >&5
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_header_$ac_safe=no"
10601 fi
10602 rm -f conftest*
10603 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10604   echo "$ac_t""yes" 1>&6
10605   :
10606 else
10607   echo "$ac_t""no" 1>&6
10608 with_canna=no
10609 fi
10610  }
10611   test -z "$with_canna" && { 
10612 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10613 echo "configure:10614: checking for RkBgnBun in -lRKC" >&5
10614 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10615
10616 xe_check_libs=" -lRKC "
10617 cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620 /* Override any gcc2 internal prototype to avoid an error.  */
10621 /* We use char because int might match the return type of a gcc2
10622     builtin and then its argument prototype would still apply.  */
10623 char RkBgnBun();
10624
10625 int main() {
10626 RkBgnBun()
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_lib_$ac_lib_var=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_lib_$ac_lib_var=no"
10637 fi
10638 rm -f conftest*
10639 xe_check_libs=""
10640
10641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10642   echo "$ac_t""yes" 1>&6
10643   :
10644 else
10645   echo "$ac_t""no" 1>&6
10646 with_canna=no
10647 fi
10648
10649  }
10650   test -z "$with_canna" && { 
10651 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10652 echo "configure:10653: checking for jrKanjiControl in -lcanna" >&5
10653 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10654
10655 xe_check_libs=" -lcanna "
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* Override any gcc2 internal prototype to avoid an error.  */
10660 /* We use char because int might match the return type of a gcc2
10661     builtin and then its argument prototype would still apply.  */
10662 char jrKanjiControl();
10663
10664 int main() {
10665 jrKanjiControl()
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=no"
10676 fi
10677 rm -f conftest*
10678 xe_check_libs=""
10679
10680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10681   echo "$ac_t""yes" 1>&6
10682   :
10683 else
10684   echo "$ac_t""no" 1>&6
10685 with_canna=no
10686 fi
10687
10688  }
10689   test -z "$with_canna" && with_canna=yes
10690   if test "$with_canna" = "yes"; then
10691     { test "$extra_verbose" = "yes" && cat << \EOF
10692     Defining HAVE_CANNA
10693 EOF
10694 cat >> confdefs.h <<\EOF
10695 #define HAVE_CANNA 1
10696 EOF
10697 }
10698
10699     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10700     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10701    echo "    xemacs will be linked with \"mule-canna.o\""
10702  fi
10703   fi
10704
10705 else   for feature in xim canna wnn; do
10706     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10707       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10708     fi
10709     eval "with_${feature}=no"
10710   done
10711 fi 
10712
10713 if test "$need_motif" = "yes" ; then
10714   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10715     
10716 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10717 echo "configure:10718: checking for layout_object_getvalue in -li18n" >&5
10718 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10719
10720 xe_check_libs=" -li18n "
10721 cat > conftest.$ac_ext <<EOF
10722 #line 10723 "configure"
10723 #include "confdefs.h"
10724 /* Override any gcc2 internal prototype to avoid an error.  */
10725 /* We use char because int might match the return type of a gcc2
10726     builtin and then its argument prototype would still apply.  */
10727 char layout_object_getvalue();
10728
10729 int main() {
10730 layout_object_getvalue()
10731 ; return 0; }
10732 EOF
10733 if { (eval echo configure:10734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10734   rm -rf conftest*
10735   eval "ac_cv_lib_$ac_lib_var=yes"
10736 else
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_lib_$ac_lib_var=no"
10741 fi
10742 rm -f conftest*
10743 xe_check_libs=""
10744
10745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10746   echo "$ac_t""yes" 1>&6
10747   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10748 else
10749   echo "$ac_t""no" 1>&6
10750 fi
10751
10752
10753   
10754 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10755     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10756   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10757   
10758         runpath="" runpath_dirs=""
10759   if test -n "$LD_RUN_PATH"; then
10760     runpath="$LD_RUN_PATH"
10761   elif test "$GCC" = "yes"; then
10762         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10763     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10764     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10765     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10766       case "$arg" in P,* | -L* | -R* )
10767         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10768           {
10769 xe_runpath_dir="$dir"
10770   test "$xe_runpath_dir" != "/lib"     -a \
10771         "$xe_runpath_dir" != "/usr/lib" -a \
10772         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10773   eval "$xe_add_unique_runpath_dir"
10774 }
10775         done ;;
10776       esac
10777     done
10778     ld_switch_run="$ld_switch_run_save"
10779     rm -f conftest*
10780   else
10781         for arg in $ld_switch_site $ld_switch_x_site; do
10782       case "$arg" in -L*) {
10783 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
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 };; esac
10789     done
10790         if test "$opsys $need_motif" = "sol2 yes"; then
10791       xe_runpath_dir="/opt/SUNWdt/lib";
10792       eval "$xe_add_unique_runpath_dir";
10793     fi
10794   fi 
10795   if test -n "$runpath"; then
10796     ld_switch_run="${dash_r}${runpath}"
10797     
10798 if test "$GCC" = "yes"; then
10799   set x $ld_switch_run; shift; ld_switch_run=""
10800   while test -n "$1"; do
10801     case $1 in
10802       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10803       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10804       -Xlinker* ) ;;
10805       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10806     esac
10807     shift
10808   done
10809 fi
10810     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10811   fi
10812 fi
10813
10814 fi
10815
10816 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
10817 do
10818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10819 echo "configure:10820: checking for $ac_func" >&5
10820
10821 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 /* System header to define __stub macros and hopefully few prototypes,
10825     which can conflict with char $ac_func(); below.  */
10826 #include <assert.h>
10827 /* Override any gcc2 internal prototype to avoid an error.  */
10828 /* We use char because int might match the return type of a gcc2
10829     builtin and then its argument prototype would still apply.  */
10830 char $ac_func();
10831
10832 int main() {
10833
10834 /* The GNU C library defines this for functions which it implements
10835     to always fail with ENOSYS.  Some functions are actually named
10836     something starting with __ and the normal name is an alias.  */
10837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10838 choke me
10839 #else
10840 $ac_func();
10841 #endif
10842
10843 ; return 0; }
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10846   rm -rf conftest*
10847   eval "ac_cv_func_$ac_func=yes"
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -rf conftest*
10852   eval "ac_cv_func_$ac_func=no"
10853 fi
10854 rm -f conftest*
10855
10856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10857   echo "$ac_t""yes" 1>&6
10858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10859   { test "$extra_verbose" = "yes" && cat << EOF
10860     Defining $ac_tr_func
10861 EOF
10862 cat >> confdefs.h <<EOF
10863 #define $ac_tr_func 1
10864 EOF
10865 }
10866  
10867 else
10868   echo "$ac_t""no" 1>&6
10869 fi
10870 done
10871
10872
10873
10874 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10875 do
10876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10877 echo "configure:10878: checking for $ac_func" >&5
10878
10879 cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 /* System header to define __stub macros and hopefully few prototypes,
10883     which can conflict with char $ac_func(); below.  */
10884 #include <assert.h>
10885 /* Override any gcc2 internal prototype to avoid an error.  */
10886 /* We use char because int might match the return type of a gcc2
10887     builtin and then its argument prototype would still apply.  */
10888 char $ac_func();
10889
10890 int main() {
10891
10892 /* The GNU C library defines this for functions which it implements
10893     to always fail with ENOSYS.  Some functions are actually named
10894     something starting with __ and the normal name is an alias.  */
10895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10896 choke me
10897 #else
10898 $ac_func();
10899 #endif
10900
10901 ; return 0; }
10902 EOF
10903 if { (eval echo configure:10904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10904   rm -rf conftest*
10905   eval "ac_cv_func_$ac_func=yes"
10906 else
10907   echo "configure: failed program was:" >&5
10908   cat conftest.$ac_ext >&5
10909   rm -rf conftest*
10910   eval "ac_cv_func_$ac_func=no"
10911 fi
10912 rm -f conftest*
10913
10914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10917   { test "$extra_verbose" = "yes" && cat << EOF
10918     Defining $ac_tr_func
10919 EOF
10920 cat >> confdefs.h <<EOF
10921 #define $ac_tr_func 1
10922 EOF
10923 }
10924  
10925 else
10926   echo "$ac_t""no" 1>&6
10927 fi
10928 done
10929
10930
10931 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10932 echo "configure:10933: checking for openpty" >&5
10933
10934 cat > conftest.$ac_ext <<EOF
10935 #line 10936 "configure"
10936 #include "confdefs.h"
10937 /* System header to define __stub macros and hopefully few prototypes,
10938     which can conflict with char openpty(); below.  */
10939 #include <assert.h>
10940 /* Override any gcc2 internal prototype to avoid an error.  */
10941 /* We use char because int might match the return type of a gcc2
10942     builtin and then its argument prototype would still apply.  */
10943 char openpty();
10944
10945 int main() {
10946
10947 /* The GNU C library defines this for functions which it implements
10948     to always fail with ENOSYS.  Some functions are actually named
10949     something starting with __ and the normal name is an alias.  */
10950 #if defined (__stub_openpty) || defined (__stub___openpty)
10951 choke me
10952 #else
10953 openpty();
10954 #endif
10955
10956 ; return 0; }
10957 EOF
10958 if { (eval echo configure:10959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10959   rm -rf conftest*
10960   eval "ac_cv_func_openpty=yes"
10961 else
10962   echo "configure: failed program was:" >&5
10963   cat conftest.$ac_ext >&5
10964   rm -rf conftest*
10965   eval "ac_cv_func_openpty=no"
10966 fi
10967 rm -f conftest*
10968
10969 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10970   echo "$ac_t""yes" 1>&6
10971   have_openpty=yes
10972 else
10973   echo "$ac_t""no" 1>&6
10974
10975   
10976 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10977 echo "configure:10978: checking for openpty in -lutil" >&5
10978 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10979
10980 xe_check_libs=" -lutil "
10981 cat > conftest.$ac_ext <<EOF
10982 #line 10983 "configure"
10983 #include "confdefs.h"
10984 /* Override any gcc2 internal prototype to avoid an error.  */
10985 /* We use char because int might match the return type of a gcc2
10986     builtin and then its argument prototype would still apply.  */
10987 char openpty();
10988
10989 int main() {
10990 openpty()
10991 ; return 0; }
10992 EOF
10993 if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10994   rm -rf conftest*
10995   eval "ac_cv_lib_$ac_lib_var=yes"
10996 else
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_lib_$ac_lib_var=no"
11001 fi
11002 rm -f conftest*
11003 xe_check_libs=""
11004
11005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11006   echo "$ac_t""yes" 1>&6
11007   have_openpty=yes need_libutil=yes
11008 else
11009   echo "$ac_t""no" 1>&6
11010 fi
11011
11012
11013 fi
11014
11015 if test "$have_openpty" = "yes"; then
11016   { test "$extra_verbose" = "yes" && cat << \EOF
11017     Defining HAVE_OPENPTY
11018 EOF
11019 cat >> confdefs.h <<\EOF
11020 #define HAVE_OPENPTY 1
11021 EOF
11022 }
11023
11024   for ac_hdr in pty.h libutil.h util.h
11025 do
11026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11028 echo "configure:11029: checking for $ac_hdr" >&5
11029
11030 cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033 #include <$ac_hdr>
11034 EOF
11035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11036 { (eval echo configure:11037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11038 if test -z "$ac_err"; then
11039   rm -rf conftest*
11040   eval "ac_cv_header_$ac_safe=yes"
11041 else
11042   echo "$ac_err" >&5
11043   echo "configure: failed program was:" >&5
11044   cat conftest.$ac_ext >&5
11045   rm -rf conftest*
11046   eval "ac_cv_header_$ac_safe=no"
11047 fi
11048 rm -f conftest*
11049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11050   echo "$ac_t""yes" 1>&6
11051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11052   { test "$extra_verbose" = "yes" && cat << EOF
11053     Defining $ac_tr_hdr
11054 EOF
11055 cat >> confdefs.h <<EOF
11056 #define $ac_tr_hdr 1
11057 EOF
11058 }
11059  break
11060 else
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 done
11064
11065   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11066 fi
11067
11068 for ac_hdr in stropts.h
11069 do
11070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11072 echo "configure:11073: checking for $ac_hdr" >&5
11073
11074 cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077 #include <$ac_hdr>
11078 EOF
11079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11080 { (eval echo configure:11081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11082 if test -z "$ac_err"; then
11083   rm -rf conftest*
11084   eval "ac_cv_header_$ac_safe=yes"
11085 else
11086   echo "$ac_err" >&5
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_header_$ac_safe=no"
11091 fi
11092 rm -f conftest*
11093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11094   echo "$ac_t""yes" 1>&6
11095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11096   { test "$extra_verbose" = "yes" && cat << EOF
11097     Defining $ac_tr_hdr
11098 EOF
11099 cat >> confdefs.h <<EOF
11100 #define $ac_tr_hdr 1
11101 EOF
11102 }
11103  
11104 else
11105   echo "$ac_t""no" 1>&6
11106 fi
11107 done
11108
11109 if test "$ac_cv_header_stropts_h" = "yes"; then
11110   for ac_func in isastream
11111 do
11112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11113 echo "configure:11114: checking for $ac_func" >&5
11114
11115 cat > conftest.$ac_ext <<EOF
11116 #line 11117 "configure"
11117 #include "confdefs.h"
11118 /* System header to define __stub macros and hopefully few prototypes,
11119     which can conflict with char $ac_func(); below.  */
11120 #include <assert.h>
11121 /* Override any gcc2 internal prototype to avoid an error.  */
11122 /* We use char because int might match the return type of a gcc2
11123     builtin and then its argument prototype would still apply.  */
11124 char $ac_func();
11125
11126 int main() {
11127
11128 /* The GNU C library defines this for functions which it implements
11129     to always fail with ENOSYS.  Some functions are actually named
11130     something starting with __ and the normal name is an alias.  */
11131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11132 choke me
11133 #else
11134 $ac_func();
11135 #endif
11136
11137 ; return 0; }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11140   rm -rf conftest*
11141   eval "ac_cv_func_$ac_func=yes"
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   eval "ac_cv_func_$ac_func=no"
11147 fi
11148 rm -f conftest*
11149
11150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11151   echo "$ac_t""yes" 1>&6
11152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11153   { test "$extra_verbose" = "yes" && cat << EOF
11154     Defining $ac_tr_func
11155 EOF
11156 cat >> confdefs.h <<EOF
11157 #define $ac_tr_func 1
11158 EOF
11159 }
11160  
11161 else
11162   echo "$ac_t""no" 1>&6
11163 fi
11164 done
11165
11166   for ac_hdr in strtio.h
11167 do
11168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11170 echo "configure:11171: checking for $ac_hdr" >&5
11171
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 #include <$ac_hdr>
11176 EOF
11177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11178 { (eval echo configure:11179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11180 if test -z "$ac_err"; then
11181   rm -rf conftest*
11182   eval "ac_cv_header_$ac_safe=yes"
11183 else
11184   echo "$ac_err" >&5
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   eval "ac_cv_header_$ac_safe=no"
11189 fi
11190 rm -f conftest*
11191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11192   echo "$ac_t""yes" 1>&6
11193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11194   { test "$extra_verbose" = "yes" && cat << EOF
11195     Defining $ac_tr_hdr
11196 EOF
11197 cat >> confdefs.h <<EOF
11198 #define $ac_tr_hdr 1
11199 EOF
11200 }
11201  
11202 else
11203   echo "$ac_t""no" 1>&6
11204 fi
11205 done
11206  fi
11207
11208 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11209    echo "    xemacs will be linked with \"realpath.o\""
11210  fi
11211
11212 for ac_func in getloadavg
11213 do
11214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11215 echo "configure:11216: checking for $ac_func" >&5
11216
11217 cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 /* System header to define __stub macros and hopefully few prototypes,
11221     which can conflict with char $ac_func(); below.  */
11222 #include <assert.h>
11223 /* Override any gcc2 internal prototype to avoid an error.  */
11224 /* We use char because int might match the return type of a gcc2
11225     builtin and then its argument prototype would still apply.  */
11226 char $ac_func();
11227
11228 int main() {
11229
11230 /* The GNU C library defines this for functions which it implements
11231     to always fail with ENOSYS.  Some functions are actually named
11232     something starting with __ and the normal name is an alias.  */
11233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11234 choke me
11235 #else
11236 $ac_func();
11237 #endif
11238
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11242   rm -rf conftest*
11243   eval "ac_cv_func_$ac_func=yes"
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_func_$ac_func=no"
11249 fi
11250 rm -f conftest*
11251
11252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11253   echo "$ac_t""yes" 1>&6
11254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11255   { test "$extra_verbose" = "yes" && cat << EOF
11256     Defining $ac_tr_func
11257 EOF
11258 cat >> confdefs.h <<EOF
11259 #define $ac_tr_func 1
11260 EOF
11261 }
11262  
11263 else
11264   echo "$ac_t""no" 1>&6
11265 fi
11266 done
11267
11268
11269 if test "$ac_cv_func_getloadavg" = "yes"; then
11270         for ac_hdr in sys/loadavg.h
11271 do
11272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_hdr" >&5
11275
11276 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 #include <$ac_hdr>
11280 EOF
11281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11282 { (eval echo configure:11283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11284 if test -z "$ac_err"; then
11285   rm -rf conftest*
11286   eval "ac_cv_header_$ac_safe=yes"
11287 else
11288   echo "$ac_err" >&5
11289   echo "configure: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   rm -rf conftest*
11292   eval "ac_cv_header_$ac_safe=no"
11293 fi
11294 rm -f conftest*
11295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11296   echo "$ac_t""yes" 1>&6
11297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11298   { test "$extra_verbose" = "yes" && cat << EOF
11299     Defining $ac_tr_hdr
11300 EOF
11301 cat >> confdefs.h <<EOF
11302 #define $ac_tr_hdr 1
11303 EOF
11304 }
11305  
11306 else
11307   echo "$ac_t""no" 1>&6
11308 fi
11309 done
11310
11311 else
11312     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11313    echo "    xemacs will be linked with \"getloadavg.o\""
11314  fi
11315
11316     
11317 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11318 echo "configure:11319: checking for kstat_open in -lkstat" >&5
11319 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11320
11321 xe_check_libs=" -lkstat "
11322 cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325 /* Override any gcc2 internal prototype to avoid an error.  */
11326 /* We use char because int might match the return type of a gcc2
11327     builtin and then its argument prototype would still apply.  */
11328 char kstat_open();
11329
11330 int main() {
11331 kstat_open()
11332 ; return 0; }
11333 EOF
11334 if { (eval echo configure:11335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11335   rm -rf conftest*
11336   eval "ac_cv_lib_$ac_lib_var=yes"
11337 else
11338   echo "configure: failed program was:" >&5
11339   cat conftest.$ac_ext >&5
11340   rm -rf conftest*
11341   eval "ac_cv_lib_$ac_lib_var=no"
11342 fi
11343 rm -f conftest*
11344 xe_check_libs=""
11345
11346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11347   echo "$ac_t""yes" 1>&6
11348     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11349     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11350   { test "$extra_verbose" = "yes" && cat << EOF
11351     Defining $ac_tr_lib
11352 EOF
11353 cat >> confdefs.h <<EOF
11354 #define $ac_tr_lib 1
11355 EOF
11356 }
11357
11358   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11359
11360 else
11361   echo "$ac_t""no" 1>&6
11362 fi
11363
11364
11365   for ac_hdr in kstat.h
11366 do
11367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11369 echo "configure:11370: checking for $ac_hdr" >&5
11370
11371 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include <$ac_hdr>
11375 EOF
11376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11377 { (eval echo configure:11378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11379 if test -z "$ac_err"; then
11380   rm -rf conftest*
11381   eval "ac_cv_header_$ac_safe=yes"
11382 else
11383   echo "$ac_err" >&5
11384   echo "configure: failed program was:" >&5
11385   cat conftest.$ac_ext >&5
11386   rm -rf conftest*
11387   eval "ac_cv_header_$ac_safe=no"
11388 fi
11389 rm -f conftest*
11390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11391   echo "$ac_t""yes" 1>&6
11392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11393   { test "$extra_verbose" = "yes" && cat << EOF
11394     Defining $ac_tr_hdr
11395 EOF
11396 cat >> confdefs.h <<EOF
11397 #define $ac_tr_hdr 1
11398 EOF
11399 }
11400  
11401 else
11402   echo "$ac_t""no" 1>&6
11403 fi
11404 done
11405
11406
11407     
11408 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11409 echo "configure:11410: checking for kvm_read in -lkvm" >&5
11410 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11411
11412 xe_check_libs=" -lkvm "
11413 cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 /* Override any gcc2 internal prototype to avoid an error.  */
11417 /* We use char because int might match the return type of a gcc2
11418     builtin and then its argument prototype would still apply.  */
11419 char kvm_read();
11420
11421 int main() {
11422 kvm_read()
11423 ; return 0; }
11424 EOF
11425 if { (eval echo configure:11426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11426   rm -rf conftest*
11427   eval "ac_cv_lib_$ac_lib_var=yes"
11428 else
11429   echo "configure: failed program was:" >&5
11430   cat conftest.$ac_ext >&5
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=no"
11433 fi
11434 rm -f conftest*
11435 xe_check_libs=""
11436
11437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11438   echo "$ac_t""yes" 1>&6
11439     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11440     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11441   { test "$extra_verbose" = "yes" && cat << EOF
11442     Defining $ac_tr_lib
11443 EOF
11444 cat >> confdefs.h <<EOF
11445 #define $ac_tr_lib 1
11446 EOF
11447 }
11448
11449   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11450
11451 else
11452   echo "$ac_t""no" 1>&6
11453 fi
11454
11455
11456 fi
11457
11458 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11459 echo "configure:11460: checking whether netdb declares h_errno" >&5
11460 cat > conftest.$ac_ext <<EOF
11461 #line 11462 "configure"
11462 #include "confdefs.h"
11463 #include <netdb.h>
11464 int main() {
11465 return h_errno;
11466 ; return 0; }
11467 EOF
11468 if { (eval echo configure:11469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11469   rm -rf conftest*
11470   echo "$ac_t""yes" 1>&6
11471    { test "$extra_verbose" = "yes" && cat << \EOF
11472     Defining HAVE_H_ERRNO
11473 EOF
11474 cat >> confdefs.h <<\EOF
11475 #define HAVE_H_ERRNO 1
11476 EOF
11477 }
11478
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   echo "$ac_t""no" 1>&6
11484 fi
11485 rm -f conftest*
11486
11487 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11488 echo "configure:11489: checking for sigsetjmp" >&5
11489 cat > conftest.$ac_ext <<EOF
11490 #line 11491 "configure"
11491 #include "confdefs.h"
11492 #include <setjmp.h>
11493 int main() {
11494 sigjmp_buf bar; sigsetjmp (bar, 0);
11495 ; return 0; }
11496 EOF
11497 if { (eval echo configure:11498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11498   rm -rf conftest*
11499   echo "$ac_t""yes" 1>&6
11500    { test "$extra_verbose" = "yes" && cat << \EOF
11501     Defining HAVE_SIGSETJMP
11502 EOF
11503 cat >> confdefs.h <<\EOF
11504 #define HAVE_SIGSETJMP 1
11505 EOF
11506 }
11507
11508 else
11509   echo "configure: failed program was:" >&5
11510   cat conftest.$ac_ext >&5
11511   rm -rf conftest*
11512   echo "$ac_t""no" 1>&6
11513 fi
11514 rm -f conftest*
11515
11516 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11517 echo "configure:11518: checking whether localtime caches TZ" >&5
11518
11519 if test "$ac_cv_func_tzset" = "yes"; then
11520 cat > conftest.$ac_ext <<EOF
11521 #line 11522 "configure"
11522 #include "confdefs.h"
11523 #include <time.h>
11524 #if STDC_HEADERS
11525 # include <stdlib.h>
11526 #endif
11527 extern char **environ;
11528 unset_TZ ()
11529 {
11530   char **from, **to;
11531   for (to = from = environ; (*to = *from); from++)
11532     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11533       to++;
11534 }
11535 char TZ_GMT0[] = "TZ=GMT0";
11536 char TZ_PST8[] = "TZ=PST8";
11537 main()
11538 {
11539   time_t now = time ((time_t *) 0);
11540   int hour_GMT0, hour_unset;
11541   if (putenv (TZ_GMT0) != 0)
11542     exit (1);
11543   hour_GMT0 = localtime (&now)->tm_hour;
11544   unset_TZ ();
11545   hour_unset = localtime (&now)->tm_hour;
11546   if (putenv (TZ_PST8) != 0)
11547     exit (1);
11548   if (localtime (&now)->tm_hour == hour_GMT0)
11549     exit (1);
11550   unset_TZ ();
11551   if (localtime (&now)->tm_hour != hour_unset)
11552     exit (1);
11553   exit (0);
11554 }
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11557 then
11558   emacs_cv_localtime_cache=no
11559 else
11560   conftest_rc="$?"
11561   echo "configure: failed program was:" >&5
11562   cat conftest.$ac_ext >&5
11563   rm -fr conftest*
11564   emacs_cv_localtime_cache=yes
11565 fi
11566 rm -fr conftest*
11567 else
11568         # If we lack tzset, report that localtime does not cache TZ,
11569         # since we can't invalidate the cache if we don't have tzset.
11570         emacs_cv_localtime_cache=no
11571 fi
11572 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11573 if test $emacs_cv_localtime_cache = yes; then
11574   { test "$extra_verbose" = "yes" && cat << \EOF
11575     Defining LOCALTIME_CACHE
11576 EOF
11577 cat >> confdefs.h <<\EOF
11578 #define LOCALTIME_CACHE 1
11579 EOF
11580 }
11581
11582 fi
11583
11584 if test "$HAVE_TIMEVAL" = "yes"; then
11585 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11586 echo "configure:11587: checking whether gettimeofday accepts one or two arguments" >&5
11587 cat > conftest.$ac_ext <<EOF
11588 #line 11589 "configure"
11589 #include "confdefs.h"
11590
11591 #ifdef TIME_WITH_SYS_TIME
11592 #include <sys/time.h>
11593 #include <time.h>
11594 #else
11595 #ifdef HAVE_SYS_TIME_H
11596 #include <sys/time.h>
11597 #else
11598 #include <time.h>
11599 #endif
11600 #endif
11601   
11602 int main() {
11603
11604   struct timeval time;
11605   gettimeofday (&time, 0);
11606
11607 ; return 0; }
11608 EOF
11609 if { (eval echo configure:11610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11610   rm -rf conftest*
11611   echo "$ac_t""two" 1>&6
11612 else
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -rf conftest*
11616   echo "$ac_t""one" 1>&6
11617    { test "$extra_verbose" = "yes" && cat << \EOF
11618     Defining GETTIMEOFDAY_ONE_ARGUMENT
11619 EOF
11620 cat >> confdefs.h <<\EOF
11621 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11622 EOF
11623 }
11624
11625 fi
11626 rm -f conftest*
11627 fi
11628
11629
11630 echo $ac_n "checking for inline""... $ac_c" 1>&6
11631 echo "configure:11632: checking for inline" >&5
11632
11633 ac_cv_c_inline=no
11634 for ac_kw in inline __inline__ __inline; do
11635   cat > conftest.$ac_ext <<EOF
11636 #line 11637 "configure"
11637 #include "confdefs.h"
11638
11639 int main() {
11640 } $ac_kw foo() {
11641 ; return 0; }
11642 EOF
11643 if { (eval echo configure:11644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11644   rm -rf conftest*
11645   ac_cv_c_inline=$ac_kw; break
11646 else
11647   echo "configure: failed program was:" >&5
11648   cat conftest.$ac_ext >&5
11649 fi
11650 rm -f conftest*
11651 done
11652
11653
11654 echo "$ac_t""$ac_cv_c_inline" 1>&6
11655 case "$ac_cv_c_inline" in
11656   inline | yes) ;;
11657   no) { test "$extra_verbose" = "yes" && cat << \EOF
11658     Defining inline = 
11659 EOF
11660 cat >> confdefs.h <<\EOF
11661 #define inline 
11662 EOF
11663 }
11664  ;;
11665   *)  { test "$extra_verbose" = "yes" && cat << EOF
11666     Defining inline = $ac_cv_c_inline
11667 EOF
11668 cat >> confdefs.h <<EOF
11669 #define inline $ac_cv_c_inline
11670 EOF
11671 }
11672  ;;
11673 esac
11674
11675 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11676    echo "    xemacs will be linked with \"inline.o\""
11677  fi
11678
11679
11680 if test "$__DECC" != "yes"; then
11681   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11682 # for constant arguments.  Useless!
11683 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11684 echo "configure:11685: checking for working alloca.h" >&5
11685
11686 cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689 #include <alloca.h>
11690 int main() {
11691 char *p = alloca(2 * sizeof(int));
11692 ; return 0; }
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11695   rm -rf conftest*
11696   ac_cv_header_alloca_h=yes
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -rf conftest*
11701   ac_cv_header_alloca_h=no
11702 fi
11703 rm -f conftest*
11704
11705 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11706 if test $ac_cv_header_alloca_h = yes; then
11707   { test "$extra_verbose" = "yes" && cat << \EOF
11708     Defining HAVE_ALLOCA_H
11709 EOF
11710 cat >> confdefs.h <<\EOF
11711 #define HAVE_ALLOCA_H 1
11712 EOF
11713 }
11714
11715 fi
11716
11717 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11718 echo "configure:11719: checking for alloca" >&5
11719
11720 cat > conftest.$ac_ext <<EOF
11721 #line 11722 "configure"
11722 #include "confdefs.h"
11723
11724 #ifdef __GNUC__
11725 # define alloca __builtin_alloca
11726 #else
11727 # ifdef _MSC_VER
11728 #  include <malloc.h>
11729 #  define alloca _alloca
11730 # else
11731 #  if HAVE_ALLOCA_H
11732 #   include <alloca.h>
11733 #  else
11734 #   ifdef _AIX
11735  #pragma alloca
11736 #   else
11737 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11738 char *alloca ();
11739 #    endif
11740 #   endif
11741 #  endif
11742 # endif
11743 #endif
11744
11745 int main() {
11746 char *p = (char *) alloca(1);
11747 ; return 0; }
11748 EOF
11749 if { (eval echo configure:11750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11750   rm -rf conftest*
11751   ac_cv_func_alloca_works=yes
11752 else
11753   echo "configure: failed program was:" >&5
11754   cat conftest.$ac_ext >&5
11755   rm -rf conftest*
11756   ac_cv_func_alloca_works=no
11757 fi
11758 rm -f conftest*
11759
11760 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11761 if test $ac_cv_func_alloca_works = yes; then
11762   { test "$extra_verbose" = "yes" && cat << \EOF
11763     Defining HAVE_ALLOCA
11764 EOF
11765 cat >> confdefs.h <<\EOF
11766 #define HAVE_ALLOCA 1
11767 EOF
11768 }
11769
11770 fi
11771
11772 if test $ac_cv_func_alloca_works = no; then
11773   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11774   # that cause trouble.  Some versions do not even contain alloca or
11775   # contain a buggy version.  If you still want to use their alloca,
11776   # use ar to extract alloca.o from them instead of compiling alloca.c.
11777   ALLOCA=alloca.${ac_objext}
11778   { test "$extra_verbose" = "yes" && cat << \EOF
11779     Defining C_ALLOCA
11780 EOF
11781 cat >> confdefs.h <<\EOF
11782 #define C_ALLOCA 1
11783 EOF
11784 }
11785
11786
11787 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11788 echo "configure:11789: checking whether alloca needs Cray hooks" >&5
11789
11790 cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 #if defined(CRAY) && ! defined(CRAY2)
11794 webecray
11795 #else
11796 wenotbecray
11797 #endif
11798
11799 EOF
11800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11801   egrep "webecray" >/dev/null 2>&1; then
11802   rm -rf conftest*
11803   ac_cv_os_cray=yes
11804 else
11805   rm -rf conftest*
11806   ac_cv_os_cray=no
11807 fi
11808 rm -f conftest*
11809
11810
11811 echo "$ac_t""$ac_cv_os_cray" 1>&6
11812 if test $ac_cv_os_cray = yes; then
11813 for ac_func in _getb67 GETB67 getb67; do
11814   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11815 echo "configure:11816: checking for $ac_func" >&5
11816
11817 cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 /* System header to define __stub macros and hopefully few prototypes,
11821     which can conflict with char $ac_func(); below.  */
11822 #include <assert.h>
11823 /* Override any gcc2 internal prototype to avoid an error.  */
11824 /* We use char because int might match the return type of a gcc2
11825     builtin and then its argument prototype would still apply.  */
11826 char $ac_func();
11827
11828 int main() {
11829
11830 /* The GNU C library defines this for functions which it implements
11831     to always fail with ENOSYS.  Some functions are actually named
11832     something starting with __ and the normal name is an alias.  */
11833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11834 choke me
11835 #else
11836 $ac_func();
11837 #endif
11838
11839 ; return 0; }
11840 EOF
11841 if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11842   rm -rf conftest*
11843   eval "ac_cv_func_$ac_func=yes"
11844 else
11845   echo "configure: failed program was:" >&5
11846   cat conftest.$ac_ext >&5
11847   rm -rf conftest*
11848   eval "ac_cv_func_$ac_func=no"
11849 fi
11850 rm -f conftest*
11851
11852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11853   echo "$ac_t""yes" 1>&6
11854   { test "$extra_verbose" = "yes" && cat << EOF
11855     Defining CRAY_STACKSEG_END = $ac_func
11856 EOF
11857 cat >> confdefs.h <<EOF
11858 #define CRAY_STACKSEG_END $ac_func
11859 EOF
11860 }
11861
11862   break
11863 else
11864   echo "$ac_t""no" 1>&6
11865 fi
11866
11867 done
11868 fi
11869
11870 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11871 echo "configure:11872: checking stack direction for C alloca" >&5
11872
11873 cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876 find_stack_direction ()
11877 {
11878   static char *addr = 0;
11879   auto char dummy;
11880   if (addr == 0)
11881     {
11882       addr = &dummy;
11883       return find_stack_direction ();
11884     }
11885   else
11886     return (&dummy > addr) ? 1 : -1;
11887 }
11888 main ()
11889 {
11890   exit (find_stack_direction() < 0);
11891 }
11892 EOF
11893 if { (eval echo configure:11894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11894 then
11895   ac_cv_c_stack_direction=1
11896 else
11897   conftest_rc="$?"
11898   echo "configure: failed program was:" >&5
11899   cat conftest.$ac_ext >&5
11900   rm -fr conftest*
11901   ac_cv_c_stack_direction=-1
11902 fi
11903 rm -fr conftest*
11904
11905 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11906 { test "$extra_verbose" = "yes" && cat << EOF
11907     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11908 EOF
11909 cat >> confdefs.h <<EOF
11910 #define STACK_DIRECTION $ac_cv_c_stack_direction
11911 EOF
11912 }
11913
11914 fi
11915
11916   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11917    echo "    xemacs will be linked with \"$ALLOCA\""
11918  fi
11919 fi
11920
11921 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11922 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11923 echo "configure:11924: checking for vfork.h" >&5
11924
11925 cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 #include <vfork.h>
11929 EOF
11930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11931 { (eval echo configure:11932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11933 if test -z "$ac_err"; then
11934   rm -rf conftest*
11935   eval "ac_cv_header_$ac_safe=yes"
11936 else
11937   echo "$ac_err" >&5
11938   echo "configure: failed program was:" >&5
11939   cat conftest.$ac_ext >&5
11940   rm -rf conftest*
11941   eval "ac_cv_header_$ac_safe=no"
11942 fi
11943 rm -f conftest*
11944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11945   echo "$ac_t""yes" 1>&6
11946   { test "$extra_verbose" = "yes" && cat << \EOF
11947     Defining HAVE_VFORK_H
11948 EOF
11949 cat >> confdefs.h <<\EOF
11950 #define HAVE_VFORK_H 1
11951 EOF
11952 }
11953
11954 else
11955   echo "$ac_t""no" 1>&6
11956 fi
11957
11958 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11959 echo "configure:11960: checking for working vfork" >&5
11960
11961 cat > conftest.$ac_ext <<EOF
11962 #line 11963 "configure"
11963 #include "confdefs.h"
11964 /* Thanks to Paul Eggert for this test.  */
11965 #include <stdio.h>
11966 #include <sys/types.h>
11967 #include <sys/stat.h>
11968 #ifdef HAVE_UNISTD_H
11969 #include <unistd.h>
11970 #endif
11971 #ifdef HAVE_VFORK_H
11972 #include <vfork.h>
11973 #endif
11974 /* On some sparc systems, changes by the child to local and incoming
11975    argument registers are propagated back to the parent.
11976    The compiler is told about this with #include <vfork.h>,
11977    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11978    Test for this by using a static variable whose address
11979    is put into a register that is clobbered by the vfork.  */
11980 static
11981 #ifdef __cplusplus
11982 sparc_address_test (int arg)
11983 #else
11984 sparc_address_test (arg) int arg;
11985 #endif
11986 {
11987   static pid_t child;
11988   if (!child) {
11989     child = vfork ();
11990     if (child < 0) {
11991       perror ("vfork");
11992       _exit(2);
11993     }
11994     if (!child) {
11995       arg = getpid();
11996       write(-1, "", 0);
11997       _exit (arg);
11998     }
11999   }
12000 }
12001 main() {
12002   pid_t parent = getpid ();
12003   pid_t child;
12004
12005   sparc_address_test ();
12006
12007   child = vfork ();
12008
12009   if (child == 0) {
12010     /* Here is another test for sparc vfork register problems.
12011        This test uses lots of local variables, at least
12012        as many local variables as main has allocated so far
12013        including compiler temporaries.  4 locals are enough for
12014        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12015        A buggy compiler should reuse the register of parent
12016        for one of the local variables, since it will think that
12017        parent can't possibly be used any more in this routine.
12018        Assigning to the local variable will thus munge parent
12019        in the parent process.  */
12020     pid_t
12021       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12022       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12023     /* Convince the compiler that p..p7 are live; otherwise, it might
12024        use the same hardware register for all 8 local variables.  */
12025     if (p != p1 || p != p2 || p != p3 || p != p4
12026         || p != p5 || p != p6 || p != p7)
12027       _exit(1);
12028
12029     /* On some systems (e.g. IRIX 3.3),
12030        vfork doesn't separate parent from child file descriptors.
12031        If the child closes a descriptor before it execs or exits,
12032        this munges the parent's descriptor as well.
12033        Test for this by closing stdout in the child.  */
12034     _exit(close(fileno(stdout)) != 0);
12035   } else {
12036     int status;
12037     struct stat st;
12038
12039     while (wait(&status) != child)
12040       ;
12041     exit(
12042          /* Was there some problem with vforking?  */
12043          child < 0
12044
12045          /* Did the child fail?  (This shouldn't happen.)  */
12046          || status
12047
12048          /* Did the vfork/compiler bug occur?  */
12049          || parent != getpid()
12050
12051          /* Did the file descriptor bug occur?  */
12052          || fstat(fileno(stdout), &st) != 0
12053          );
12054   }
12055 }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12058 then
12059   ac_cv_func_vfork_works=yes
12060 else
12061   conftest_rc="$?"
12062   echo "configure: failed program was:" >&5
12063   cat conftest.$ac_ext >&5
12064   rm -fr conftest*
12065   ac_cv_func_vfork_works=no
12066 fi
12067 rm -fr conftest*
12068
12069 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12070 if test $ac_cv_func_vfork_works = no; then
12071   { test "$extra_verbose" = "yes" && cat << \EOF
12072     Defining vfork = fork
12073 EOF
12074 cat >> confdefs.h <<\EOF
12075 #define vfork fork
12076 EOF
12077 }
12078
12079 fi
12080
12081
12082 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12083 echo "configure:12084: checking for working strcoll" >&5
12084
12085 cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 #include <string.h>
12089 main ()
12090 {
12091   exit (strcoll ("abc", "def") >= 0 ||
12092         strcoll ("ABC", "DEF") >= 0 ||
12093         strcoll ("123", "456") >= 0);
12094 }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12097 then
12098   ac_cv_func_strcoll_works=yes
12099 else
12100   conftest_rc="$?"
12101   echo "configure: failed program was:" >&5
12102   cat conftest.$ac_ext >&5
12103   rm -fr conftest*
12104   ac_cv_func_strcoll_works=no
12105 fi
12106 rm -fr conftest*
12107
12108 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12109 if test $ac_cv_func_strcoll_works = yes; then
12110   { test "$extra_verbose" = "yes" && cat << \EOF
12111     Defining HAVE_STRCOLL
12112 EOF
12113 cat >> confdefs.h <<\EOF
12114 #define HAVE_STRCOLL 1
12115 EOF
12116 }
12117
12118 fi
12119
12120
12121 for ac_func in getpgrp
12122 do
12123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12124 echo "configure:12125: checking for $ac_func" >&5
12125
12126 cat > conftest.$ac_ext <<EOF
12127 #line 12128 "configure"
12128 #include "confdefs.h"
12129 /* System header to define __stub macros and hopefully few prototypes,
12130     which can conflict with char $ac_func(); below.  */
12131 #include <assert.h>
12132 /* Override any gcc2 internal prototype to avoid an error.  */
12133 /* We use char because int might match the return type of a gcc2
12134     builtin and then its argument prototype would still apply.  */
12135 char $ac_func();
12136
12137 int main() {
12138
12139 /* The GNU C library defines this for functions which it implements
12140     to always fail with ENOSYS.  Some functions are actually named
12141     something starting with __ and the normal name is an alias.  */
12142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12143 choke me
12144 #else
12145 $ac_func();
12146 #endif
12147
12148 ; return 0; }
12149 EOF
12150 if { (eval echo configure:12151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12151   rm -rf conftest*
12152   eval "ac_cv_func_$ac_func=yes"
12153 else
12154   echo "configure: failed program was:" >&5
12155   cat conftest.$ac_ext >&5
12156   rm -rf conftest*
12157   eval "ac_cv_func_$ac_func=no"
12158 fi
12159 rm -f conftest*
12160
12161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12162   echo "$ac_t""yes" 1>&6
12163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12164   { test "$extra_verbose" = "yes" && cat << EOF
12165     Defining $ac_tr_func
12166 EOF
12167 cat >> confdefs.h <<EOF
12168 #define $ac_tr_func 1
12169 EOF
12170 }
12171  
12172 else
12173   echo "$ac_t""no" 1>&6
12174 fi
12175 done
12176
12177 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12178 echo "configure:12179: checking whether getpgrp takes no argument" >&5
12179
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183
12184 /*
12185  * If this system has a BSD-style getpgrp(),
12186  * which takes a pid argument, exit unsuccessfully.
12187  *
12188  * Snarfed from Chet Ramey's bash pgrp.c test program
12189  */
12190 #include <stdio.h>
12191 #include <sys/types.h>
12192
12193 int     pid;
12194 int     pg1, pg2, pg3, pg4;
12195 int     ng, np, s, child;
12196
12197 main()
12198 {
12199         pid = getpid();
12200         pg1 = getpgrp(0);
12201         pg2 = getpgrp();
12202         pg3 = getpgrp(pid);
12203         pg4 = getpgrp(1);
12204
12205         /*
12206          * If all of these values are the same, it's pretty sure that
12207          * we're on a system that ignores getpgrp's first argument.
12208          */
12209         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12210                 exit(0);
12211
12212         child = fork();
12213         if (child < 0)
12214                 exit(1);
12215         else if (child == 0) {
12216                 np = getpid();
12217                 /*
12218                  * If this is Sys V, this will not work; pgrp will be
12219                  * set to np because setpgrp just changes a pgrp to be
12220                  * the same as the pid.
12221                  */
12222                 setpgrp(np, pg1);
12223                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12224                 if (ng == pg1) {
12225                         exit(1);
12226                 } else {
12227                         exit(0);
12228                 }
12229         } else {
12230                 wait(&s);
12231                 exit(s>>8);
12232         }
12233 }
12234
12235 EOF
12236 if { (eval echo configure:12237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12237 then
12238   ac_cv_func_getpgrp_void=yes
12239 else
12240   conftest_rc="$?"
12241   echo "configure: failed program was:" >&5
12242   cat conftest.$ac_ext >&5
12243   rm -fr conftest*
12244   ac_cv_func_getpgrp_void=no
12245 fi
12246 rm -fr conftest*
12247
12248
12249 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12250 if test $ac_cv_func_getpgrp_void = yes; then
12251   { test "$extra_verbose" = "yes" && cat << \EOF
12252     Defining GETPGRP_VOID
12253 EOF
12254 cat >> confdefs.h <<\EOF
12255 #define GETPGRP_VOID 1
12256 EOF
12257 }
12258
12259 fi
12260
12261
12262 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12263 echo "configure:12264: checking for working mmap" >&5
12264 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12265 cat > conftest.$ac_ext <<EOF
12266 #line 12267 "configure"
12267 #include "confdefs.h"
12268 #include <stdio.h>
12269 #include <unistd.h>
12270 #include <fcntl.h>
12271 #include <sys/mman.h>
12272
12273 #ifndef MAP_VARIABLE
12274 #define MAP_VARIABLE 0
12275 #endif
12276
12277 #ifndef MAP_FAILED
12278 #define MAP_FAILED -1
12279 #endif
12280
12281 int main (int argc, char *argv[])
12282 {
12283   int fd = -1;
12284   caddr_t p;
12285 #ifndef MAP_ANONYMOUS
12286   fd = open ("/dev/zero", O_RDWR);
12287   if (fd < 0)
12288     return 1;
12289 #define MAP_ANONYMOUS 0
12290 #endif
12291   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12292            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12293            fd, 0) != (void *) MAP_FAILED)
12294     return 0;
12295   perror ("conftest: mmap failed");
12296   return 1;
12297 }
12298 EOF
12299 if { (eval echo configure:12300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12300 then
12301   have_mmap=yes
12302 else
12303   conftest_rc="$?"
12304   echo "configure: failed program was:" >&5
12305   cat conftest.$ac_ext >&5
12306   rm -fr conftest*
12307   have_mmap=no
12308 fi
12309 rm -fr conftest* ;;
12310 esac
12311 echo "$ac_t""$have_mmap" 1>&6
12312 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12313     Defining HAVE_MMAP
12314 EOF
12315 cat >> confdefs.h <<\EOF
12316 #define HAVE_MMAP 1
12317 EOF
12318 }
12319
12320
12321 case "$opsys" in cygwin*) 
12322         test "$rel_alloc" = "default" && rel_alloc=no ;;
12323 esac
12324 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12325 if test "$rel_alloc $have_mmap" = "default yes"; then
12326   if test "$doug_lea_malloc" = "yes"; then
12327         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12328 echo "configure:12329: checking for M_MMAP_THRESHOLD" >&5
12329     cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 #include <malloc.h>
12333 int main() {
12334
12335 #ifndef M_MMAP_THRESHOLD
12336 #error No M_MMAP_THRESHOLD :-(
12337 !@+$%^&*_)(_ - unlikely to compile...
12338 #endif
12339
12340 ; return 0; }
12341 EOF
12342 if { (eval echo configure:12343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12343   rm -rf conftest*
12344   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12345 else
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -rf conftest*
12349   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12350 fi
12351 rm -f conftest*
12352   else
12353     rel_alloc=yes
12354   fi
12355 fi
12356 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12357     Defining REL_ALLOC
12358 EOF
12359 cat >> confdefs.h <<\EOF
12360 #define REL_ALLOC 1
12361 EOF
12362 }
12363
12364
12365 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12366 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12367 echo "configure:12368: checking for termios.h" >&5
12368
12369 cat > conftest.$ac_ext <<EOF
12370 #line 12371 "configure"
12371 #include "confdefs.h"
12372 #include <termios.h>
12373 EOF
12374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12375 { (eval echo configure:12376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12377 if test -z "$ac_err"; then
12378   rm -rf conftest*
12379   eval "ac_cv_header_$ac_safe=yes"
12380 else
12381   echo "$ac_err" >&5
12382   echo "configure: failed program was:" >&5
12383   cat conftest.$ac_ext >&5
12384   rm -rf conftest*
12385   eval "ac_cv_header_$ac_safe=no"
12386 fi
12387 rm -f conftest*
12388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12389   echo "$ac_t""yes" 1>&6
12390   { test "$extra_verbose" = "yes" && cat << \EOF
12391     Defining HAVE_TERMIOS
12392 EOF
12393 cat >> confdefs.h <<\EOF
12394 #define HAVE_TERMIOS 1
12395 EOF
12396 }
12397
12398   { test "$extra_verbose" = "yes" && cat << \EOF
12399     Defining SIGNALS_VIA_CHARACTERS
12400 EOF
12401 cat >> confdefs.h <<\EOF
12402 #define SIGNALS_VIA_CHARACTERS 1
12403 EOF
12404 }
12405
12406   { test "$extra_verbose" = "yes" && cat << \EOF
12407     Defining NO_TERMIO
12408 EOF
12409 cat >> confdefs.h <<\EOF
12410 #define NO_TERMIO 1
12411 EOF
12412 }
12413
12414 else
12415   echo "$ac_t""no" 1>&6
12416 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12417 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12418 echo "configure:12419: checking for termio.h" >&5
12419
12420 cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423 #include <termio.h>
12424 EOF
12425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12426 { (eval echo configure:12427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12428 if test -z "$ac_err"; then
12429   rm -rf conftest*
12430   eval "ac_cv_header_$ac_safe=yes"
12431 else
12432   echo "$ac_err" >&5
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   eval "ac_cv_header_$ac_safe=no"
12437 fi
12438 rm -f conftest*
12439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12440   echo "$ac_t""yes" 1>&6
12441   { test "$extra_verbose" = "yes" && cat << \EOF
12442     Defining HAVE_TERMIO
12443 EOF
12444 cat >> confdefs.h <<\EOF
12445 #define HAVE_TERMIO 1
12446 EOF
12447 }
12448
12449 else
12450   echo "$ac_t""no" 1>&6
12451 fi
12452
12453 fi
12454
12455
12456
12457 echo $ac_n "checking for socket""... $ac_c" 1>&6
12458 echo "configure:12459: checking for socket" >&5
12459
12460 cat > conftest.$ac_ext <<EOF
12461 #line 12462 "configure"
12462 #include "confdefs.h"
12463 /* System header to define __stub macros and hopefully few prototypes,
12464     which can conflict with char socket(); below.  */
12465 #include <assert.h>
12466 /* Override any gcc2 internal prototype to avoid an error.  */
12467 /* We use char because int might match the return type of a gcc2
12468     builtin and then its argument prototype would still apply.  */
12469 char socket();
12470
12471 int main() {
12472
12473 /* The GNU C library defines this for functions which it implements
12474     to always fail with ENOSYS.  Some functions are actually named
12475     something starting with __ and the normal name is an alias.  */
12476 #if defined (__stub_socket) || defined (__stub___socket)
12477 choke me
12478 #else
12479 socket();
12480 #endif
12481
12482 ; return 0; }
12483 EOF
12484 if { (eval echo configure:12485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12485   rm -rf conftest*
12486   eval "ac_cv_func_socket=yes"
12487 else
12488   echo "configure: failed program was:" >&5
12489   cat conftest.$ac_ext >&5
12490   rm -rf conftest*
12491   eval "ac_cv_func_socket=no"
12492 fi
12493 rm -f conftest*
12494
12495 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12496   echo "$ac_t""yes" 1>&6
12497   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12498 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12499 echo "configure:12500: checking for netinet/in.h" >&5
12500
12501 cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504 #include <netinet/in.h>
12505 EOF
12506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12507 { (eval echo configure:12508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12509 if test -z "$ac_err"; then
12510   rm -rf conftest*
12511   eval "ac_cv_header_$ac_safe=yes"
12512 else
12513   echo "$ac_err" >&5
12514   echo "configure: failed program was:" >&5
12515   cat conftest.$ac_ext >&5
12516   rm -rf conftest*
12517   eval "ac_cv_header_$ac_safe=no"
12518 fi
12519 rm -f conftest*
12520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12521   echo "$ac_t""yes" 1>&6
12522   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12523 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12524 echo "configure:12525: checking for arpa/inet.h" >&5
12525
12526 cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 #include <arpa/inet.h>
12530 EOF
12531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12532 { (eval echo configure:12533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12534 if test -z "$ac_err"; then
12535   rm -rf conftest*
12536   eval "ac_cv_header_$ac_safe=yes"
12537 else
12538   echo "$ac_err" >&5
12539   echo "configure: failed program was:" >&5
12540   cat conftest.$ac_ext >&5
12541   rm -rf conftest*
12542   eval "ac_cv_header_$ac_safe=no"
12543 fi
12544 rm -f conftest*
12545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12546   echo "$ac_t""yes" 1>&6
12547   
12548   { test "$extra_verbose" = "yes" && cat << \EOF
12549     Defining HAVE_SOCKETS
12550 EOF
12551 cat >> confdefs.h <<\EOF
12552 #define HAVE_SOCKETS 1
12553 EOF
12554 }
12555
12556       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12557 echo "configure:12558: checking "for sun_len member in struct sockaddr_un"" >&5
12558       cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561
12562 #include <sys/types.h>
12563 #include <sys/socket.h>
12564 #include <sys/un.h>
12565       
12566 int main() {
12567 static struct sockaddr_un x; x.sun_len = 1;
12568 ; return 0; }
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12571   rm -rf conftest*
12572   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12573     Defining HAVE_SOCKADDR_SUN_LEN
12574 EOF
12575 cat >> confdefs.h <<\EOF
12576 #define HAVE_SOCKADDR_SUN_LEN 1
12577 EOF
12578 }
12579
12580 else
12581   echo "configure: failed program was:" >&5
12582   cat conftest.$ac_ext >&5
12583   rm -rf conftest*
12584   echo "$ac_t""no" 1>&6
12585 fi
12586 rm -f conftest*
12587       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12588 echo "configure:12589: checking "for ip_mreq struct in netinet/in.h"" >&5
12589       cat > conftest.$ac_ext <<EOF
12590 #line 12591 "configure"
12591 #include "confdefs.h"
12592
12593 #include <sys/types.h>
12594 #include <netinet/in.h>
12595       
12596 int main() {
12597 static struct ip_mreq x;
12598 ; return 0; }
12599 EOF
12600 if { (eval echo configure:12601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12601   rm -rf conftest*
12602   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12603     Defining HAVE_MULTICAST
12604 EOF
12605 cat >> confdefs.h <<\EOF
12606 #define HAVE_MULTICAST 1
12607 EOF
12608 }
12609
12610 else
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -rf conftest*
12614   echo "$ac_t""no" 1>&6
12615 fi
12616 rm -f conftest*
12617 else
12618   echo "$ac_t""no" 1>&6
12619 fi
12620
12621 else
12622   echo "$ac_t""no" 1>&6
12623 fi
12624
12625 else
12626   echo "$ac_t""no" 1>&6
12627 fi
12628
12629
12630 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12631 echo "configure:12632: checking for msgget" >&5
12632
12633 cat > conftest.$ac_ext <<EOF
12634 #line 12635 "configure"
12635 #include "confdefs.h"
12636 /* System header to define __stub macros and hopefully few prototypes,
12637     which can conflict with char msgget(); below.  */
12638 #include <assert.h>
12639 /* Override any gcc2 internal prototype to avoid an error.  */
12640 /* We use char because int might match the return type of a gcc2
12641     builtin and then its argument prototype would still apply.  */
12642 char msgget();
12643
12644 int main() {
12645
12646 /* The GNU C library defines this for functions which it implements
12647     to always fail with ENOSYS.  Some functions are actually named
12648     something starting with __ and the normal name is an alias.  */
12649 #if defined (__stub_msgget) || defined (__stub___msgget)
12650 choke me
12651 #else
12652 msgget();
12653 #endif
12654
12655 ; return 0; }
12656 EOF
12657 if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12658   rm -rf conftest*
12659   eval "ac_cv_func_msgget=yes"
12660 else
12661   echo "configure: failed program was:" >&5
12662   cat conftest.$ac_ext >&5
12663   rm -rf conftest*
12664   eval "ac_cv_func_msgget=no"
12665 fi
12666 rm -f conftest*
12667
12668 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12669   echo "$ac_t""yes" 1>&6
12670   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12671 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12672 echo "configure:12673: checking for sys/ipc.h" >&5
12673
12674 cat > conftest.$ac_ext <<EOF
12675 #line 12676 "configure"
12676 #include "confdefs.h"
12677 #include <sys/ipc.h>
12678 EOF
12679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12680 { (eval echo configure:12681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12682 if test -z "$ac_err"; then
12683   rm -rf conftest*
12684   eval "ac_cv_header_$ac_safe=yes"
12685 else
12686   echo "$ac_err" >&5
12687   echo "configure: failed program was:" >&5
12688   cat conftest.$ac_ext >&5
12689   rm -rf conftest*
12690   eval "ac_cv_header_$ac_safe=no"
12691 fi
12692 rm -f conftest*
12693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12694   echo "$ac_t""yes" 1>&6
12695   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12696 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12697 echo "configure:12698: checking for sys/msg.h" >&5
12698
12699 cat > conftest.$ac_ext <<EOF
12700 #line 12701 "configure"
12701 #include "confdefs.h"
12702 #include <sys/msg.h>
12703 EOF
12704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12705 { (eval echo configure:12706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12707 if test -z "$ac_err"; then
12708   rm -rf conftest*
12709   eval "ac_cv_header_$ac_safe=yes"
12710 else
12711   echo "$ac_err" >&5
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -rf conftest*
12715   eval "ac_cv_header_$ac_safe=no"
12716 fi
12717 rm -f conftest*
12718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12719   echo "$ac_t""yes" 1>&6
12720   { test "$extra_verbose" = "yes" && cat << \EOF
12721     Defining HAVE_SYSVIPC
12722 EOF
12723 cat >> confdefs.h <<\EOF
12724 #define HAVE_SYSVIPC 1
12725 EOF
12726 }
12727
12728 else
12729   echo "$ac_t""no" 1>&6
12730 fi
12731
12732 else
12733   echo "$ac_t""no" 1>&6
12734 fi
12735
12736 else
12737   echo "$ac_t""no" 1>&6
12738 fi
12739
12740
12741 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12742 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12743 echo "configure:12744: checking for dirent.h" >&5
12744
12745 cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748 #include <dirent.h>
12749 EOF
12750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12751 { (eval echo configure:12752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12753 if test -z "$ac_err"; then
12754   rm -rf conftest*
12755   eval "ac_cv_header_$ac_safe=yes"
12756 else
12757   echo "$ac_err" >&5
12758   echo "configure: failed program was:" >&5
12759   cat conftest.$ac_ext >&5
12760   rm -rf conftest*
12761   eval "ac_cv_header_$ac_safe=no"
12762 fi
12763 rm -f conftest*
12764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12765   echo "$ac_t""yes" 1>&6
12766   { test "$extra_verbose" = "yes" && cat << \EOF
12767     Defining SYSV_SYSTEM_DIR
12768 EOF
12769 cat >> confdefs.h <<\EOF
12770 #define SYSV_SYSTEM_DIR 1
12771 EOF
12772 }
12773
12774 else
12775   echo "$ac_t""no" 1>&6
12776 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12777 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12778 echo "configure:12779: checking for sys/dir.h" >&5
12779
12780 cat > conftest.$ac_ext <<EOF
12781 #line 12782 "configure"
12782 #include "confdefs.h"
12783 #include <sys/dir.h>
12784 EOF
12785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12786 { (eval echo configure:12787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12788 if test -z "$ac_err"; then
12789   rm -rf conftest*
12790   eval "ac_cv_header_$ac_safe=yes"
12791 else
12792   echo "$ac_err" >&5
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -rf conftest*
12796   eval "ac_cv_header_$ac_safe=no"
12797 fi
12798 rm -f conftest*
12799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12800   echo "$ac_t""yes" 1>&6
12801   :
12802 else
12803   echo "$ac_t""no" 1>&6
12804 { test "$extra_verbose" = "yes" && cat << \EOF
12805     Defining NONSYSTEM_DIR_LIBRARY
12806 EOF
12807 cat >> confdefs.h <<\EOF
12808 #define NONSYSTEM_DIR_LIBRARY 1
12809 EOF
12810 }
12811
12812 fi
12813
12814 fi
12815
12816
12817 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12818 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12819 echo "configure:12820: checking for nlist.h" >&5
12820
12821 cat > conftest.$ac_ext <<EOF
12822 #line 12823 "configure"
12823 #include "confdefs.h"
12824 #include <nlist.h>
12825 EOF
12826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12827 { (eval echo configure:12828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12829 if test -z "$ac_err"; then
12830   rm -rf conftest*
12831   eval "ac_cv_header_$ac_safe=yes"
12832 else
12833   echo "$ac_err" >&5
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -rf conftest*
12837   eval "ac_cv_header_$ac_safe=no"
12838 fi
12839 rm -f conftest*
12840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12841   echo "$ac_t""yes" 1>&6
12842   { test "$extra_verbose" = "yes" && cat << \EOF
12843     Defining NLIST_STRUCT
12844 EOF
12845 cat >> confdefs.h <<\EOF
12846 #define NLIST_STRUCT 1
12847 EOF
12848 }
12849
12850 else
12851   echo "$ac_t""no" 1>&6
12852 fi
12853
12854
12855
12856 echo "checking "for sound support"" 1>&6
12857 echo "configure:12858: checking "for sound support"" >&5
12858 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12859
12860 if test "$with_native_sound" != "no"; then
12861     if test -n "$native_sound_lib"; then
12862     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12863 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12864 echo "configure:12865: checking for multimedia/audio_device.h" >&5
12865
12866 cat > conftest.$ac_ext <<EOF
12867 #line 12868 "configure"
12868 #include "confdefs.h"
12869 #include <multimedia/audio_device.h>
12870 EOF
12871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12872 { (eval echo configure:12873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12874 if test -z "$ac_err"; then
12875   rm -rf conftest*
12876   eval "ac_cv_header_$ac_safe=yes"
12877 else
12878   echo "$ac_err" >&5
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   eval "ac_cv_header_$ac_safe=no"
12883 fi
12884 rm -f conftest*
12885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12886   echo "$ac_t""yes" 1>&6
12887   sound_found=yes sound_cflags=""
12888       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12889    echo "    xemacs will be linked with \"sunplay.o\""
12890  fi
12891 else
12892   echo "$ac_t""no" 1>&6
12893 fi
12894
12895   fi
12896
12897     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12898     sound_found=yes
12899     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12900    echo "    xemacs will be linked with \"sunplay.o\""
12901  fi
12902     if test -d "/usr/demo/SOUND/include"
12903       then sound_cflags="-I/usr/demo/SOUND/include"
12904       else sound_cflags="-I/usr/demo/SOUND"
12905     fi
12906     if test -z "$native_sound_lib" ; then
12907       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12908         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12909         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12910       fi
12911     fi
12912   fi
12913
12914     if test -z "$sound_found"; then
12915     case "$canonical" in
12916     *-sgi-* )
12917       if test -z "$native_sound_lib"; then
12918         
12919 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12920 echo "configure:12921: checking for ALopenport in -laudio" >&5
12921 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12922
12923 xe_check_libs=" -laudio "
12924 cat > conftest.$ac_ext <<EOF
12925 #line 12926 "configure"
12926 #include "confdefs.h"
12927 /* Override any gcc2 internal prototype to avoid an error.  */
12928 /* We use char because int might match the return type of a gcc2
12929     builtin and then its argument prototype would still apply.  */
12930 char ALopenport();
12931
12932 int main() {
12933 ALopenport()
12934 ; return 0; }
12935 EOF
12936 if { (eval echo configure:12937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12937   rm -rf conftest*
12938   eval "ac_cv_lib_$ac_lib_var=yes"
12939 else
12940   echo "configure: failed program was:" >&5
12941   cat conftest.$ac_ext >&5
12942   rm -rf conftest*
12943   eval "ac_cv_lib_$ac_lib_var=no"
12944 fi
12945 rm -f conftest*
12946 xe_check_libs=""
12947
12948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12949   echo "$ac_t""yes" 1>&6
12950   native_sound_lib="-laudio"
12951 else
12952   echo "$ac_t""no" 1>&6
12953 fi
12954
12955
12956       fi
12957       if test -n "$native_sound_lib"; then
12958         sound_found=yes sound_cflags=""
12959         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12960    echo "    xemacs will be linked with \"sgiplay.o\""
12961  fi
12962       fi ;;
12963     hppa*-hp-hpux* )
12964       if test -z "$native_sound_lib"; then
12965         
12966 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12967 echo "configure:12968: checking for AOpenAudio in -lAlib" >&5
12968 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12969
12970 xe_check_libs=" -lAlib "
12971 cat > conftest.$ac_ext <<EOF
12972 #line 12973 "configure"
12973 #include "confdefs.h"
12974 /* Override any gcc2 internal prototype to avoid an error.  */
12975 /* We use char because int might match the return type of a gcc2
12976     builtin and then its argument prototype would still apply.  */
12977 char AOpenAudio();
12978
12979 int main() {
12980 AOpenAudio()
12981 ; return 0; }
12982 EOF
12983 if { (eval echo configure:12984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12984   rm -rf conftest*
12985   eval "ac_cv_lib_$ac_lib_var=yes"
12986 else
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -rf conftest*
12990   eval "ac_cv_lib_$ac_lib_var=no"
12991 fi
12992 rm -f conftest*
12993 xe_check_libs=""
12994
12995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12996   echo "$ac_t""yes" 1>&6
12997   native_sound_lib="-lAlib"
12998 else
12999   echo "$ac_t""no" 1>&6
13000 fi
13001
13002
13003       fi
13004       if test -n "$native_sound_lib"; then
13005         sound_found=yes
13006         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13007    echo "    xemacs will be linked with \"hpplay.o\""
13008  fi
13009         if test "$GCC" = "yes" # Kludge city
13010           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13011           else sound_cflags="+e -I/usr/audio/examples"
13012         fi
13013       fi ;;
13014     esac
13015   fi
13016
13017     if test -z "$sound_found"; then
13018     for dir in "machine" "sys" "linux"; do
13019       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13020 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13021 echo "configure:13022: checking for ${dir}/soundcard.h" >&5
13022
13023 cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 #include <${dir}/soundcard.h>
13027 EOF
13028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13029 { (eval echo configure:13030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13031 if test -z "$ac_err"; then
13032   rm -rf conftest*
13033   eval "ac_cv_header_$ac_safe=yes"
13034 else
13035   echo "$ac_err" >&5
13036   echo "configure: failed program was:" >&5
13037   cat conftest.$ac_ext >&5
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=no"
13040 fi
13041 rm -f conftest*
13042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13043   echo "$ac_t""yes" 1>&6
13044   sound_found=yes
13045        need_miscplay=yes
13046         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13047    echo "    xemacs will be linked with \"linuxplay.o\""
13048  fi
13049         { test "$extra_verbose" = "yes" && cat << EOF
13050     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13051 EOF
13052 cat >> confdefs.h <<EOF
13053 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13054 EOF
13055 }
13056
13057         break
13058 else
13059   echo "$ac_t""no" 1>&6
13060 fi
13061
13062     done
13063   fi
13064
13065     if test -z "$sound_found"; then
13066     if test "$with_msw" = "yes"; then
13067     sound_found=yes
13068     native_sound_lib=
13069     fi
13070   fi
13071
13072   test "$sound_found" = "yes" && with_native_sound=yes
13073 fi
13074
13075 if test "$with_native_sound" = "yes"; then
13076   { test "$extra_verbose" = "yes" && cat << \EOF
13077     Defining HAVE_NATIVE_SOUND
13078 EOF
13079 cat >> confdefs.h <<\EOF
13080 #define HAVE_NATIVE_SOUND 1
13081 EOF
13082 }
13083
13084   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13085 fi
13086
13087 if test "$with_nas_sound" != "no"; then
13088   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13089 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13090 echo "configure:13091: checking for audio/audiolib.h" >&5
13091
13092 cat > conftest.$ac_ext <<EOF
13093 #line 13094 "configure"
13094 #include "confdefs.h"
13095 #include <audio/audiolib.h>
13096 EOF
13097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13098 { (eval echo configure:13099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13100 if test -z "$ac_err"; then
13101   rm -rf conftest*
13102   eval "ac_cv_header_$ac_safe=yes"
13103 else
13104   echo "$ac_err" >&5
13105   echo "configure: failed program was:" >&5
13106   cat conftest.$ac_ext >&5
13107   rm -rf conftest*
13108   eval "ac_cv_header_$ac_safe=no"
13109 fi
13110 rm -f conftest*
13111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13112   echo "$ac_t""yes" 1>&6
13113   
13114     
13115 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13116 echo "configure:13117: checking for AuOpenServer in -laudio" >&5
13117 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13118
13119 xe_check_libs=" -laudio "
13120 cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 /* Override any gcc2 internal prototype to avoid an error.  */
13124 /* We use char because int might match the return type of a gcc2
13125     builtin and then its argument prototype would still apply.  */
13126 char AuOpenServer();
13127
13128 int main() {
13129 AuOpenServer()
13130 ; return 0; }
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13133   rm -rf conftest*
13134   eval "ac_cv_lib_$ac_lib_var=yes"
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -rf conftest*
13139   eval "ac_cv_lib_$ac_lib_var=no"
13140 fi
13141 rm -f conftest*
13142 xe_check_libs=""
13143
13144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13145   echo "$ac_t""yes" 1>&6
13146   have_nas_sound=yes
13147 else
13148   echo "$ac_t""no" 1>&6
13149 fi
13150
13151
13152 else
13153   echo "$ac_t""no" 1>&6
13154 fi
13155
13156   if test "$have_nas_sound" = "yes"; then
13157     with_nas_sound=yes
13158     { test "$extra_verbose" = "yes" && cat << \EOF
13159     Defining HAVE_NAS_SOUND
13160 EOF
13161 cat >> confdefs.h <<\EOF
13162 #define HAVE_NAS_SOUND 1
13163 EOF
13164 }
13165
13166     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13167    echo "    xemacs will be linked with \"nas.o\""
13168  fi
13169     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13170             cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173 #include <audio/Xtutil.h>
13174 EOF
13175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13176   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13177   :
13178 else
13179   rm -rf conftest*
13180   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13181     Defining NAS_NO_ERROR_JUMP
13182 EOF
13183 cat >> confdefs.h <<\EOF
13184 #define NAS_NO_ERROR_JUMP 1
13185 EOF
13186 }
13187
13188 fi
13189 rm -f conftest*
13190
13191   else
13192     test "$with_nas_sound" = "yes" && \
13193       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13194     with_nas_sound=no
13195   fi
13196 fi
13197
13198 if test "$with_esd_sound" != "no"; then
13199   # Extract the first word of "esd-config", so it can be a program name with args.
13200 set dummy esd-config; ac_word=$2
13201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13202 echo "configure:13203: checking for $ac_word" >&5
13203
13204 if test -n "$have_esd_config"; then
13205   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13206 else
13207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13208   ac_dummy="$PATH"
13209   for ac_dir in $ac_dummy; do
13210     test -z "$ac_dir" && ac_dir=.
13211     if test -f $ac_dir/$ac_word; then
13212       ac_cv_prog_have_esd_config="yes"
13213       break
13214     fi
13215   done
13216   IFS="$ac_save_ifs"
13217   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13218 fi
13219 have_esd_config="$ac_cv_prog_have_esd_config"
13220 if test -n "$have_esd_config"; then
13221   echo "$ac_t""$have_esd_config" 1>&6
13222 else
13223   echo "$ac_t""no" 1>&6
13224 fi
13225
13226   if test "$have_esd_config" = "yes"; then
13227     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13228     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
13229     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13230     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13231 echo "configure:13232: checking for esd_play_stream" >&5
13232
13233 cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 /* System header to define __stub macros and hopefully few prototypes,
13237     which can conflict with char esd_play_stream(); below.  */
13238 #include <assert.h>
13239 /* Override any gcc2 internal prototype to avoid an error.  */
13240 /* We use char because int might match the return type of a gcc2
13241     builtin and then its argument prototype would still apply.  */
13242 char esd_play_stream();
13243
13244 int main() {
13245
13246 /* The GNU C library defines this for functions which it implements
13247     to always fail with ENOSYS.  Some functions are actually named
13248     something starting with __ and the normal name is an alias.  */
13249 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13250 choke me
13251 #else
13252 esd_play_stream();
13253 #endif
13254
13255 ; return 0; }
13256 EOF
13257 if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13258   rm -rf conftest*
13259   eval "ac_cv_func_esd_play_stream=yes"
13260 else
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_func_esd_play_stream=no"
13265 fi
13266 rm -f conftest*
13267
13268 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13269   echo "$ac_t""yes" 1>&6
13270   have_esd_sound=yes
13271 else
13272   echo "$ac_t""no" 1>&6
13273 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13274 fi
13275
13276   fi
13277
13278   if test "$have_esd_sound" = "yes"; then
13279     with_esd_sound=yes
13280     need_miscplay=yes
13281     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13282    echo "    xemacs will be linked with \"esd.o\""
13283  fi
13284     { test "$extra_verbose" = "yes" && cat << \EOF
13285     Defining HAVE_ESD_SOUND
13286 EOF
13287 cat >> confdefs.h <<\EOF
13288 #define HAVE_ESD_SOUND 1
13289 EOF
13290 }
13291
13292   else
13293     test "$with_esd_sound" = "yes" && \
13294       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13295     with_esd_sound=no
13296   fi
13297 fi
13298
13299 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13300    echo "    xemacs will be linked with \"miscplay.o\""
13301  fi
13302
13303
13304 test -z "$with_tty" && with_tty=yes
13305
13306 if test "$with_tty" = "yes"  ; then
13307   echo "checking for TTY-related features" 1>&6
13308 echo "configure:13309: checking for TTY-related features" >&5
13309   { test "$extra_verbose" = "yes" && cat << \EOF
13310     Defining HAVE_TTY
13311 EOF
13312 cat >> confdefs.h <<\EOF
13313 #define HAVE_TTY 1
13314 EOF
13315 }
13316
13317   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
13318    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\""
13319  fi
13320
13321     if test -z "$with_ncurses"; then
13322     
13323 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13324 echo "configure:13325: checking for tgetent in -lncurses" >&5
13325 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13326
13327 xe_check_libs=" -lncurses "
13328 cat > conftest.$ac_ext <<EOF
13329 #line 13330 "configure"
13330 #include "confdefs.h"
13331 /* Override any gcc2 internal prototype to avoid an error.  */
13332 /* We use char because int might match the return type of a gcc2
13333     builtin and then its argument prototype would still apply.  */
13334 char tgetent();
13335
13336 int main() {
13337 tgetent()
13338 ; return 0; }
13339 EOF
13340 if { (eval echo configure:13341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13341   rm -rf conftest*
13342   eval "ac_cv_lib_$ac_lib_var=yes"
13343 else
13344   echo "configure: failed program was:" >&5
13345   cat conftest.$ac_ext >&5
13346   rm -rf conftest*
13347   eval "ac_cv_lib_$ac_lib_var=no"
13348 fi
13349 rm -f conftest*
13350 xe_check_libs=""
13351
13352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13353   echo "$ac_t""yes" 1>&6
13354   with_ncurses=yes
13355 else
13356   echo "$ac_t""no" 1>&6
13357 with_ncurses=no
13358 fi
13359
13360
13361   fi
13362   if test "$with_ncurses" = "yes"; then
13363     { test "$extra_verbose" = "yes" && cat << \EOF
13364     Defining HAVE_NCURSES
13365 EOF
13366 cat >> confdefs.h <<\EOF
13367 #define HAVE_NCURSES 1
13368 EOF
13369 }
13370
13371     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13372 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13373 echo "configure:13374: checking for ncurses/curses.h" >&5
13374
13375 cat > conftest.$ac_ext <<EOF
13376 #line 13377 "configure"
13377 #include "confdefs.h"
13378 #include <ncurses/curses.h>
13379 EOF
13380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13381 { (eval echo configure:13382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13383 if test -z "$ac_err"; then
13384   rm -rf conftest*
13385   eval "ac_cv_header_$ac_safe=yes"
13386 else
13387   echo "$ac_err" >&5
13388   echo "configure: failed program was:" >&5
13389   cat conftest.$ac_ext >&5
13390   rm -rf conftest*
13391   eval "ac_cv_header_$ac_safe=no"
13392 fi
13393 rm -f conftest*
13394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13395   echo "$ac_t""yes" 1>&6
13396   curses_h_file=ncurses/curses.h
13397 else
13398   echo "$ac_t""no" 1>&6
13399 fi
13400
13401     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13402 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13403 echo "configure:13404: checking for ncurses/term.h" >&5
13404
13405 cat > conftest.$ac_ext <<EOF
13406 #line 13407 "configure"
13407 #include "confdefs.h"
13408 #include <ncurses/term.h>
13409 EOF
13410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13411 { (eval echo configure:13412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13413 if test -z "$ac_err"; then
13414   rm -rf conftest*
13415   eval "ac_cv_header_$ac_safe=yes"
13416 else
13417   echo "$ac_err" >&5
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   eval "ac_cv_header_$ac_safe=no"
13422 fi
13423 rm -f conftest*
13424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13425   echo "$ac_t""yes" 1>&6
13426   term_h_file=ncurses/term.h
13427 else
13428   echo "$ac_t""no" 1>&6
13429 fi
13430
13431     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13432    echo "    xemacs will be linked with \"terminfo.o\""
13433  fi
13434     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13435
13436     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13437                         save_c_switch_site="$c_switch_site"
13438       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13439       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13440 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13441 echo "configure:13442: checking for ncurses/curses.h" >&5
13442
13443 cat > conftest.$ac_ext <<EOF
13444 #line 13445 "configure"
13445 #include "confdefs.h"
13446 #include <ncurses/curses.h>
13447 EOF
13448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13449 { (eval echo configure:13450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13451 if test -z "$ac_err"; then
13452   rm -rf conftest*
13453   eval "ac_cv_header_$ac_safe=yes"
13454 else
13455   echo "$ac_err" >&5
13456   echo "configure: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   rm -rf conftest*
13459   eval "ac_cv_header_$ac_safe=no"
13460 fi
13461 rm -f conftest*
13462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13463   echo "$ac_t""yes" 1>&6
13464   curses_h_file=ncurses/curses.h
13465 else
13466   echo "$ac_t""no" 1>&6
13467 fi
13468
13469       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13470         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13471         else c_switch_site="$save_c_switch_site"
13472       fi
13473     fi
13474   else         if test "$have_terminfo" = "yes"; then
13475       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13476    echo "    xemacs will be linked with \"terminfo.o\""
13477  fi
13478       if test -n "$libs_termcap"; then
13479         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13480       else
13481         for lib in curses termlib termcap; do
13482           
13483 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13484 echo "configure:13485: checking for tgetent in -l$lib" >&5
13485 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13486
13487 xe_check_libs=" -l$lib "
13488 cat > conftest.$ac_ext <<EOF
13489 #line 13490 "configure"
13490 #include "confdefs.h"
13491 /* Override any gcc2 internal prototype to avoid an error.  */
13492 /* We use char because int might match the return type of a gcc2
13493     builtin and then its argument prototype would still apply.  */
13494 char tgetent();
13495
13496 int main() {
13497 tgetent()
13498 ; return 0; }
13499 EOF
13500 if { (eval echo configure:13501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13501   rm -rf conftest*
13502   eval "ac_cv_lib_$ac_lib_var=yes"
13503 else
13504   echo "configure: failed program was:" >&5
13505   cat conftest.$ac_ext >&5
13506   rm -rf conftest*
13507   eval "ac_cv_lib_$ac_lib_var=no"
13508 fi
13509 rm -f conftest*
13510 xe_check_libs=""
13511
13512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13513   echo "$ac_t""yes" 1>&6
13514   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13515 else
13516   echo "$ac_t""no" 1>&6
13517 fi
13518
13519
13520         done
13521       fi
13522     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13523    echo "    xemacs will be linked with \"tparam.o\""
13524  fi
13525                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13526       if test -n "$libs_termcap"; then
13527         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13528       else
13529         
13530 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13531 echo "configure:13532: checking for tgetent in -lcurses" >&5
13532 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13533
13534 xe_check_libs=" -lcurses "
13535 cat > conftest.$ac_ext <<EOF
13536 #line 13537 "configure"
13537 #include "confdefs.h"
13538 /* Override any gcc2 internal prototype to avoid an error.  */
13539 /* We use char because int might match the return type of a gcc2
13540     builtin and then its argument prototype would still apply.  */
13541 char tgetent();
13542
13543 int main() {
13544 tgetent()
13545 ; return 0; }
13546 EOF
13547 if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13548   rm -rf conftest*
13549   eval "ac_cv_lib_$ac_lib_var=yes"
13550 else
13551   echo "configure: failed program was:" >&5
13552   cat conftest.$ac_ext >&5
13553   rm -rf conftest*
13554   eval "ac_cv_lib_$ac_lib_var=no"
13555 fi
13556 rm -f conftest*
13557 xe_check_libs=""
13558
13559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13560   echo "$ac_t""yes" 1>&6
13561   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13562 else
13563   echo "$ac_t""no" 1>&6
13564 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13565 echo "configure:13566: checking for tgetent in -ltermcap" >&5
13566 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13567
13568 xe_check_libs=" -ltermcap "
13569 cat > conftest.$ac_ext <<EOF
13570 #line 13571 "configure"
13571 #include "confdefs.h"
13572 /* Override any gcc2 internal prototype to avoid an error.  */
13573 /* We use char because int might match the return type of a gcc2
13574     builtin and then its argument prototype would still apply.  */
13575 char tgetent();
13576
13577 int main() {
13578 tgetent()
13579 ; return 0; }
13580 EOF
13581 if { (eval echo configure:13582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13582   rm -rf conftest*
13583   eval "ac_cv_lib_$ac_lib_var=yes"
13584 else
13585   echo "configure: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   rm -rf conftest*
13588   eval "ac_cv_lib_$ac_lib_var=no"
13589 fi
13590 rm -f conftest*
13591 xe_check_libs=""
13592
13593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13594   echo "$ac_t""yes" 1>&6
13595   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13596 else
13597   echo "$ac_t""no" 1>&6
13598 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13599    echo "    xemacs will be linked with \"termcap.o\""
13600  fi
13601 fi
13602
13603
13604 fi
13605
13606
13607       fi
13608     fi
13609   fi
13610   { test "$extra_verbose" = "yes" && cat << EOF
13611     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13612 EOF
13613 cat >> confdefs.h <<EOF
13614 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13615 EOF
13616 }
13617
13618   { test "$extra_verbose" = "yes" && cat << EOF
13619     Defining TERM_H_FILE = "${term_h_file-term.h}"
13620 EOF
13621 cat >> confdefs.h <<EOF
13622 #define TERM_H_FILE "${term_h_file-term.h}"
13623 EOF
13624 }
13625
13626
13627     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13628 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13629 echo "configure:13630: checking for gpm.h" >&5
13630
13631 cat > conftest.$ac_ext <<EOF
13632 #line 13633 "configure"
13633 #include "confdefs.h"
13634 #include <gpm.h>
13635 EOF
13636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13637 { (eval echo configure:13638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13639 if test -z "$ac_err"; then
13640   rm -rf conftest*
13641   eval "ac_cv_header_$ac_safe=yes"
13642 else
13643   echo "$ac_err" >&5
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   eval "ac_cv_header_$ac_safe=no"
13648 fi
13649 rm -f conftest*
13650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13651   echo "$ac_t""yes" 1>&6
13652   :
13653 else
13654   echo "$ac_t""no" 1>&6
13655 with_gpm=no
13656 fi
13657  }
13658   test -z "$with_gpm" && { 
13659 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13660 echo "configure:13661: checking for Gpm_Open in -lgpm" >&5
13661 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13662
13663 xe_check_libs=" -lgpm "
13664 cat > conftest.$ac_ext <<EOF
13665 #line 13666 "configure"
13666 #include "confdefs.h"
13667 /* Override any gcc2 internal prototype to avoid an error.  */
13668 /* We use char because int might match the return type of a gcc2
13669     builtin and then its argument prototype would still apply.  */
13670 char Gpm_Open();
13671
13672 int main() {
13673 Gpm_Open()
13674 ; return 0; }
13675 EOF
13676 if { (eval echo configure:13677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13677   rm -rf conftest*
13678   eval "ac_cv_lib_$ac_lib_var=yes"
13679 else
13680   echo "configure: failed program was:" >&5
13681   cat conftest.$ac_ext >&5
13682   rm -rf conftest*
13683   eval "ac_cv_lib_$ac_lib_var=no"
13684 fi
13685 rm -f conftest*
13686 xe_check_libs=""
13687
13688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13689   echo "$ac_t""yes" 1>&6
13690   with_gpm=yes
13691 else
13692   echo "$ac_t""no" 1>&6
13693 with_gpm=no
13694 fi
13695
13696  }
13697   if test "$with_gpm" = "yes"; then
13698     { test "$extra_verbose" = "yes" && cat << \EOF
13699     Defining HAVE_GPM
13700 EOF
13701 cat >> confdefs.h <<\EOF
13702 #define HAVE_GPM 1
13703 EOF
13704 }
13705
13706     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13707    echo "    xemacs will be linked with \"gpmevent.o\""
13708  fi
13709     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13710   fi
13711
13712 else   for feature in ncurses gpm; do
13713     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13714       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13715     fi
13716     eval "with_${feature}=no"
13717   done
13718 fi 
13719 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13720    echo "    xemacs will be linked with \"event-unixoid.o\""
13721  fi
13722
13723
13724 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13725   != "no no no" && echo "checking for database support" 1>&6
13726 echo "configure:13727: checking for database support" >&5
13727
13728 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13729   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13730 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13731 echo "configure:13732: checking for ndbm.h" >&5
13732
13733 cat > conftest.$ac_ext <<EOF
13734 #line 13735 "configure"
13735 #include "confdefs.h"
13736 #include <ndbm.h>
13737 EOF
13738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13739 { (eval echo configure:13740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13741 if test -z "$ac_err"; then
13742   rm -rf conftest*
13743   eval "ac_cv_header_$ac_safe=yes"
13744 else
13745   echo "$ac_err" >&5
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   eval "ac_cv_header_$ac_safe=no"
13750 fi
13751 rm -f conftest*
13752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13753   echo "$ac_t""yes" 1>&6
13754   :
13755 else
13756   echo "$ac_t""no" 1>&6
13757
13758     test "$with_database_gdbm" = "yes" -o \
13759          "$with_database_dbm"  = "yes" && \
13760       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13761     with_database_gdbm=no with_database_dbm=no
13762 fi
13763
13764 fi
13765
13766 if test "$with_database_gdbm" != "no"; then
13767   
13768 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13769 echo "configure:13770: checking for dbm_open in -lgdbm" >&5
13770 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13771
13772 xe_check_libs=" -lgdbm "
13773 cat > conftest.$ac_ext <<EOF
13774 #line 13775 "configure"
13775 #include "confdefs.h"
13776 /* Override any gcc2 internal prototype to avoid an error.  */
13777 /* We use char because int might match the return type of a gcc2
13778     builtin and then its argument prototype would still apply.  */
13779 char dbm_open();
13780
13781 int main() {
13782 dbm_open()
13783 ; return 0; }
13784 EOF
13785 if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13786   rm -rf conftest*
13787   eval "ac_cv_lib_$ac_lib_var=yes"
13788 else
13789   echo "configure: failed program was:" >&5
13790   cat conftest.$ac_ext >&5
13791   rm -rf conftest*
13792   eval "ac_cv_lib_$ac_lib_var=no"
13793 fi
13794 rm -f conftest*
13795 xe_check_libs=""
13796
13797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13798   echo "$ac_t""yes" 1>&6
13799   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13800 else
13801   echo "$ac_t""no" 1>&6
13802 if test "$with_database_gdbm" = "yes"; then
13803      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13804    fi
13805    with_database_gdbm=no
13806 fi
13807
13808
13809 fi
13810
13811 if test "$with_database_dbm" != "no"; then
13812   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13813 echo "configure:13814: checking for dbm_open" >&5
13814
13815 cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 /* System header to define __stub macros and hopefully few prototypes,
13819     which can conflict with char dbm_open(); below.  */
13820 #include <assert.h>
13821 /* Override any gcc2 internal prototype to avoid an error.  */
13822 /* We use char because int might match the return type of a gcc2
13823     builtin and then its argument prototype would still apply.  */
13824 char dbm_open();
13825
13826 int main() {
13827
13828 /* The GNU C library defines this for functions which it implements
13829     to always fail with ENOSYS.  Some functions are actually named
13830     something starting with __ and the normal name is an alias.  */
13831 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13832 choke me
13833 #else
13834 dbm_open();
13835 #endif
13836
13837 ; return 0; }
13838 EOF
13839 if { (eval echo configure:13840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13840   rm -rf conftest*
13841   eval "ac_cv_func_dbm_open=yes"
13842 else
13843   echo "configure: failed program was:" >&5
13844   cat conftest.$ac_ext >&5
13845   rm -rf conftest*
13846   eval "ac_cv_func_dbm_open=no"
13847 fi
13848 rm -f conftest*
13849
13850 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13851   echo "$ac_t""yes" 1>&6
13852   with_database_dbm=yes libdbm=
13853 else
13854   echo "$ac_t""no" 1>&6
13855
13856     
13857 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13858 echo "configure:13859: checking for dbm_open in -ldbm" >&5
13859 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13860
13861 xe_check_libs=" -ldbm "
13862 cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* Override any gcc2 internal prototype to avoid an error.  */
13866 /* We use char because int might match the return type of a gcc2
13867     builtin and then its argument prototype would still apply.  */
13868 char dbm_open();
13869
13870 int main() {
13871 dbm_open()
13872 ; return 0; }
13873 EOF
13874 if { (eval echo configure:13875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13875   rm -rf conftest*
13876   eval "ac_cv_lib_$ac_lib_var=yes"
13877 else
13878   echo "configure: failed program was:" >&5
13879   cat conftest.$ac_ext >&5
13880   rm -rf conftest*
13881   eval "ac_cv_lib_$ac_lib_var=no"
13882 fi
13883 rm -f conftest*
13884 xe_check_libs=""
13885
13886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13887   echo "$ac_t""yes" 1>&6
13888   with_database_dbm=yes libdbm=-ldbm
13889 else
13890   echo "$ac_t""no" 1>&6
13891 test "$with_database_dbm" = "yes" && \
13892         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13893       with_database_dbm=no
13894 fi
13895
13896
13897 fi
13898
13899 fi
13900
13901 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13902 test "$with_database_gdbm" = "yes" -o \
13903      "$with_database_dbm"  = "yes" && \
13904   { test "$extra_verbose" = "yes" && cat << \EOF
13905     Defining HAVE_DBM
13906 EOF
13907 cat >> confdefs.h <<\EOF
13908 #define HAVE_DBM 1
13909 EOF
13910 }
13911
13912
13913 if test "$with_database_berkdb" != "no"; then
13914   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13915 echo "configure:13916: checking for Berkeley db.h" >&5
13916   for header in "db/db.h" "db.h"; do
13917     cat > conftest.$ac_ext <<EOF
13918 #line 13919 "configure"
13919 #include "confdefs.h"
13920
13921 #include <stdlib.h>
13922 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13923 #ifdef HAVE_INTTYPES_H
13924 #define __BIT_TYPES_DEFINED__
13925 #include <inttypes.h>
13926 typedef uint8_t  u_int8_t;
13927 typedef uint16_t u_int16_t;
13928 typedef uint32_t u_int32_t;
13929 #ifdef WE_DONT_NEED_QUADS
13930 typedef uint64_t u_int64_t;
13931 #endif
13932 #endif
13933 #endif
13934 #include <$header>
13935
13936 int main() {
13937
13938 ; return 0; }
13939 EOF
13940 if { (eval echo configure:13941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13941   rm -rf conftest*
13942   db_h_file="$header"; break
13943 else
13944   echo "configure: failed program was:" >&5
13945   cat conftest.$ac_ext >&5
13946 fi
13947 rm -f conftest*
13948   done
13949   if test -z "$db_h_file"
13950   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13951   else echo "$ac_t""$db_h_file" 1>&6
13952   fi
13953
13954   if test "$with_database_berkdb" != "no"; then
13955     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13956 echo "configure:13957: checking for Berkeley DB version" >&5
13957     cat > conftest.$ac_ext <<EOF
13958 #line 13959 "configure"
13959 #include "confdefs.h"
13960 #include <$db_h_file>
13961 #if DB_VERSION_MAJOR > 1
13962 yes
13963 #endif
13964
13965 EOF
13966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13967   egrep "yes" >/dev/null 2>&1; then
13968   rm -rf conftest*
13969   cat > conftest.$ac_ext <<EOF
13970 #line 13971 "configure"
13971 #include "confdefs.h"
13972 #include <$db_h_file>
13973 #if DB_VERSION_MAJOR > 2
13974 yes
13975 #endif
13976
13977 EOF
13978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13979   egrep "yes" >/dev/null 2>&1; then
13980   rm -rf conftest*
13981   echo "$ac_t""3" 1>&6; dbfunc=db_create
13982 else
13983   rm -rf conftest*
13984   
13985     echo "$ac_t""2" 1>&6; dbfunc=db_open
13986 fi
13987 rm -f conftest*
13988
13989 else
13990   rm -rf conftest*
13991   
13992     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13993 fi
13994 rm -f conftest*
13995
13996     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13997 echo "configure:13998: checking for $dbfunc" >&5
13998
13999 cat > conftest.$ac_ext <<EOF
14000 #line 14001 "configure"
14001 #include "confdefs.h"
14002 /* System header to define __stub macros and hopefully few prototypes,
14003     which can conflict with char $dbfunc(); below.  */
14004 #include <assert.h>
14005 /* Override any gcc2 internal prototype to avoid an error.  */
14006 /* We use char because int might match the return type of a gcc2
14007     builtin and then its argument prototype would still apply.  */
14008 char $dbfunc();
14009
14010 int main() {
14011
14012 /* The GNU C library defines this for functions which it implements
14013     to always fail with ENOSYS.  Some functions are actually named
14014     something starting with __ and the normal name is an alias.  */
14015 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14016 choke me
14017 #else
14018 $dbfunc();
14019 #endif
14020
14021 ; return 0; }
14022 EOF
14023 if { (eval echo configure:14024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14024   rm -rf conftest*
14025   eval "ac_cv_func_$dbfunc=yes"
14026 else
14027   echo "configure: failed program was:" >&5
14028   cat conftest.$ac_ext >&5
14029   rm -rf conftest*
14030   eval "ac_cv_func_$dbfunc=no"
14031 fi
14032 rm -f conftest*
14033
14034 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14035   echo "$ac_t""yes" 1>&6
14036   with_database_berkdb=yes need_libdb=no
14037 else
14038   echo "$ac_t""no" 1>&6
14039
14040     
14041 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14042 echo "configure:14043: checking for $dbfunc in -ldb" >&5
14043 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14044
14045 xe_check_libs=" -ldb "
14046 cat > conftest.$ac_ext <<EOF
14047 #line 14048 "configure"
14048 #include "confdefs.h"
14049 /* Override any gcc2 internal prototype to avoid an error.  */
14050 /* We use char because int might match the return type of a gcc2
14051     builtin and then its argument prototype would still apply.  */
14052 char $dbfunc();
14053
14054 int main() {
14055 $dbfunc()
14056 ; return 0; }
14057 EOF
14058 if { (eval echo configure:14059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14059   rm -rf conftest*
14060   eval "ac_cv_lib_$ac_lib_var=yes"
14061 else
14062   echo "configure: failed program was:" >&5
14063   cat conftest.$ac_ext >&5
14064   rm -rf conftest*
14065   eval "ac_cv_lib_$ac_lib_var=no"
14066 fi
14067 rm -f conftest*
14068 xe_check_libs=""
14069
14070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14071   echo "$ac_t""yes" 1>&6
14072   with_database_berkdb=yes need_libdb=yes
14073 else
14074   echo "$ac_t""no" 1>&6
14075 fi
14076
14077
14078 fi
14079
14080   fi
14081
14082   if test "$with_database_berkdb" = "yes"; then
14083     { test "$extra_verbose" = "yes" && cat << EOF
14084     Defining DB_H_FILE = "$db_h_file"
14085 EOF
14086 cat >> confdefs.h <<EOF
14087 #define DB_H_FILE "$db_h_file"
14088 EOF
14089 }
14090
14091     { test "$extra_verbose" = "yes" && cat << \EOF
14092     Defining HAVE_BERKELEY_DB
14093 EOF
14094 cat >> confdefs.h <<\EOF
14095 #define HAVE_BERKELEY_DB 1
14096 EOF
14097 }
14098
14099     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14100   else with_database_berkdb=no
14101   fi
14102 fi
14103
14104 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14105      != "no no no"; then
14106   { test "$extra_verbose" = "yes" && cat << \EOF
14107     Defining HAVE_DATABASE
14108 EOF
14109 cat >> confdefs.h <<\EOF
14110 #define HAVE_DATABASE 1
14111 EOF
14112 }
14113
14114   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14115    echo "    xemacs will be linked with \"database.o\""
14116  fi
14117   if test "$with_utf_2000" = "yes"; then
14118     { test "$extra_verbose" = "yes" && cat << \EOF
14119     Defining HAVE_CHISE_CLIENT
14120 EOF
14121 cat >> confdefs.h <<\EOF
14122 #define HAVE_CHISE_CLIENT 1
14123 EOF
14124 }
14125
14126   fi
14127 fi
14128
14129 if test "$with_socks" = "yes"; then
14130   
14131 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14132 echo "configure:14133: checking for SOCKSinit in -lsocks" >&5
14133 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14134
14135 xe_check_libs=" -lsocks "
14136 cat > conftest.$ac_ext <<EOF
14137 #line 14138 "configure"
14138 #include "confdefs.h"
14139 /* Override any gcc2 internal prototype to avoid an error.  */
14140 /* We use char because int might match the return type of a gcc2
14141     builtin and then its argument prototype would still apply.  */
14142 char SOCKSinit();
14143
14144 int main() {
14145 SOCKSinit()
14146 ; return 0; }
14147 EOF
14148 if { (eval echo configure:14149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14149   rm -rf conftest*
14150   eval "ac_cv_lib_$ac_lib_var=yes"
14151 else
14152   echo "configure: failed program was:" >&5
14153   cat conftest.$ac_ext >&5
14154   rm -rf conftest*
14155   eval "ac_cv_lib_$ac_lib_var=no"
14156 fi
14157 rm -f conftest*
14158 xe_check_libs=""
14159
14160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14161   echo "$ac_t""yes" 1>&6
14162     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14164   { test "$extra_verbose" = "yes" && cat << EOF
14165     Defining $ac_tr_lib
14166 EOF
14167 cat >> confdefs.h <<EOF
14168 #define $ac_tr_lib 1
14169 EOF
14170 }
14171
14172   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14173
14174 else
14175   echo "$ac_t""no" 1>&6
14176 fi
14177
14178
14179   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14180     Defining HAVE_SOCKS
14181 EOF
14182 cat >> confdefs.h <<\EOF
14183 #define HAVE_SOCKS 1
14184 EOF
14185 }
14186
14187 fi
14188
14189 if test "$usage_tracking" = "yes"; then
14190   { test "$extra_verbose" = "yes" && cat << \EOF
14191     Defining USAGE_TRACKING
14192 EOF
14193 cat >> confdefs.h <<\EOF
14194 #define USAGE_TRACKING 1
14195 EOF
14196 }
14197
14198   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14199 fi
14200
14201 if test "$with_modules" != "no"; then
14202   echo "checking for module support" 1>&6
14203 echo "configure:14204: checking for module support" >&5
14204
14205     if test "$with_msw" = "yes"; then
14206     have_dl=yes;
14207   else
14208         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14209 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14210 echo "configure:14211: checking for dlfcn.h" >&5
14211
14212 cat > conftest.$ac_ext <<EOF
14213 #line 14214 "configure"
14214 #include "confdefs.h"
14215 #include <dlfcn.h>
14216 EOF
14217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14218 { (eval echo configure:14219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14220 if test -z "$ac_err"; then
14221   rm -rf conftest*
14222   eval "ac_cv_header_$ac_safe=yes"
14223 else
14224   echo "$ac_err" >&5
14225   echo "configure: failed program was:" >&5
14226   cat conftest.$ac_ext >&5
14227   rm -rf conftest*
14228   eval "ac_cv_header_$ac_safe=no"
14229 fi
14230 rm -f conftest*
14231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14232   echo "$ac_t""yes" 1>&6
14233   
14234       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14235 echo "configure:14236: checking for dlopen in -lc" >&5
14236       cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239 #include <dlfcn.h>
14240 int main() {
14241         dlopen ("", 0);
14242 ; return 0; }
14243 EOF
14244 if { (eval echo configure:14245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14245   rm -rf conftest*
14246    have_dl=yes 
14247 else
14248   echo "configure: failed program was:" >&5
14249   cat conftest.$ac_ext >&5
14250   rm -rf conftest*
14251   
14252       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14253 echo "configure:14254: checking for dlopen in -ldl" >&5
14254       ac_save_LIBS="$LIBS"
14255       LIBS="-ldl $LIBS"
14256       cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 #include <dlfcn.h>
14260 int main() {
14261         dlopen ("", 0);
14262 ; return 0; }
14263 EOF
14264 if { (eval echo configure:14265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14265   rm -rf conftest*
14266    have_dl=yes 
14267 else
14268   echo "configure: failed program was:" >&5
14269   cat conftest.$ac_ext >&5
14270   rm -rf conftest*
14271   LIBS="$ac_save_LIBS"
14272 fi
14273 rm -f conftest*
14274       ac_save_LIBS=
14275 fi
14276 rm -f conftest*
14277 else
14278   echo "$ac_t""no" 1>&6
14279 fi
14280
14281     if test -n "$have_dl"; then
14282       { test "$extra_verbose" = "yes" && cat << \EOF
14283     Defining HAVE_DLOPEN
14284 EOF
14285 cat >> confdefs.h <<\EOF
14286 #define HAVE_DLOPEN 1
14287 EOF
14288 }
14289
14290     else
14291       
14292 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14293 echo "configure:14294: checking for shl_load in -ldld" >&5
14294 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14295
14296 xe_check_libs=" -ldld "
14297 cat > conftest.$ac_ext <<EOF
14298 #line 14299 "configure"
14299 #include "confdefs.h"
14300 /* Override any gcc2 internal prototype to avoid an error.  */
14301 /* We use char because int might match the return type of a gcc2
14302     builtin and then its argument prototype would still apply.  */
14303 char shl_load();
14304
14305 int main() {
14306 shl_load()
14307 ; return 0; }
14308 EOF
14309 if { (eval echo configure:14310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14310   rm -rf conftest*
14311   eval "ac_cv_lib_$ac_lib_var=yes"
14312 else
14313   echo "configure: failed program was:" >&5
14314   cat conftest.$ac_ext >&5
14315   rm -rf conftest*
14316   eval "ac_cv_lib_$ac_lib_var=no"
14317 fi
14318 rm -f conftest*
14319 xe_check_libs=""
14320
14321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14322   echo "$ac_t""yes" 1>&6
14323   libdl=dld have_dl=yes;
14324         { test "$extra_verbose" = "yes" && cat << \EOF
14325     Defining HAVE_SHL_LOAD
14326 EOF
14327 cat >> confdefs.h <<\EOF
14328 #define HAVE_SHL_LOAD 1
14329 EOF
14330 }
14331
14332 else
14333   echo "$ac_t""no" 1>&6
14334
14335 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14336 echo "configure:14337: checking for dld_init in -ldld" >&5
14337 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14338
14339 xe_check_libs=" -ldld "
14340 cat > conftest.$ac_ext <<EOF
14341 #line 14342 "configure"
14342 #include "confdefs.h"
14343 /* Override any gcc2 internal prototype to avoid an error.  */
14344 /* We use char because int might match the return type of a gcc2
14345     builtin and then its argument prototype would still apply.  */
14346 char dld_init();
14347
14348 int main() {
14349 dld_init()
14350 ; return 0; }
14351 EOF
14352 if { (eval echo configure:14353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14353   rm -rf conftest*
14354   eval "ac_cv_lib_$ac_lib_var=yes"
14355 else
14356   echo "configure: failed program was:" >&5
14357   cat conftest.$ac_ext >&5
14358   rm -rf conftest*
14359   eval "ac_cv_lib_$ac_lib_var=no"
14360 fi
14361 rm -f conftest*
14362 xe_check_libs=""
14363
14364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14365   echo "$ac_t""yes" 1>&6
14366   libdl=dld have_dl=yes;
14367         { test "$extra_verbose" = "yes" && cat << \EOF
14368     Defining HAVE_DLD_INIT
14369 EOF
14370 cat >> confdefs.h <<\EOF
14371 #define HAVE_DLD_INIT 1
14372 EOF
14373 }
14374
14375 else
14376   echo "$ac_t""no" 1>&6
14377 fi
14378
14379
14380 fi
14381
14382
14383     fi
14384   fi 
14385   if test -n "$have_dl"; then
14386         
14387 dll_ld=
14388 dll_ldflags=
14389 dll_cflags=
14390 dll_post=
14391 dll_ldo="-o"
14392 ld_dynamic_link_flags=
14393 xehost=$canonical
14394 xealias=$internal_configuration
14395
14396 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14397 echo "configure:14398: checking how to build dynamic libraries for ${xehost}" >&5
14398 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14399 case "$xehost" in
14400 *-*-linux-gnu*) ;;
14401 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14402 esac
14403
14404 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14405 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14406 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14407
14408 case "$xehost_os" in
14409 aix3*)
14410   # AIX sometimes has problems with the GCC collect2 program.  For some
14411   # reason, if we set the COLLECT_NAMES environment variable, the problems
14412   # vanish in a puff of smoke.
14413   if test "${COLLECT_NAMES+set}" != set; then
14414     COLLECT_NAMES=
14415     export COLLECT_NAMES
14416   fi
14417   ;;
14418 esac
14419
14420 # Now see if the compiler is really GCC.
14421 if test "$GCC" = "yes"; then
14422   XEGCC=yes
14423 else
14424   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14425 echo "configure:14426: checking checking whether we are using GNU C" >&5
14426   cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429
14430 #ifdef __GNUC__
14431   yes;
14432 #endif
14433
14434 EOF
14435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14436   egrep "yes" >/dev/null 2>&1; then
14437   rm -rf conftest*
14438   XEGCC=yes
14439 else
14440   rm -rf conftest*
14441   XEGCC=no
14442 fi
14443 rm -f conftest*
14444
14445   echo "$ac_t""${XEGCC}" 1>&6
14446 fi
14447
14448 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14449 echo "configure:14450: checking how to produce PIC code" >&5
14450 wl=
14451
14452 can_build_shared=yes
14453 if test "$XEGCC" = yes; then
14454   wl='-Wl,'
14455
14456   case "$xehost_os" in
14457   aix[3-9]* | irix[5-9]* | osf[3-9])
14458     # PIC is the default for these OSes.
14459     ;;
14460
14461   os2*)
14462     # We can build DLLs from non-PIC.
14463     ;;
14464   amigaos*)
14465     # FIXME: we need at least 68020 code to build shared libraries, but
14466     # adding the `-m68020' flag to GCC prevents building anything better,
14467     # like `-m68040'.
14468     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14469     ;;
14470   *cygwin* | *mingw* )
14471     # PIC is the default
14472     ;;
14473   *)
14474     dll_cflags='-fPIC'
14475     ;;
14476   esac
14477 else
14478   # PORTME Check for PIC flags for the system compiler.
14479   case "$xehost_os" in
14480   hpux9* | hpux1[0-9]*)
14481     # Is there a better link_static_flag that works with the bundled CC?
14482     wl='-Wl,'
14483     dll_cflags='+Z'
14484     ;;
14485
14486   irix[5-9]*)
14487     wl='-Wl,'
14488     # PIC (with -KPIC) is the default.
14489     ;;
14490
14491   os2*)
14492     # We can build DLLs from non-PIC.
14493     ;;
14494
14495   osf[3-9]*)
14496     # All OSF/1 code is PIC.
14497     wl='-Wl,'
14498     ;;
14499
14500   aix[3-9]*)
14501     # All AIX code is PIC.
14502     wl='-Wl,'
14503     ;;
14504
14505   sco3.2v5*)
14506     dll_cflags='-belf -Kpic'
14507     wl='-Wl,'
14508     ;;
14509
14510   unixware*)
14511     dll_cflags="-KPIC"
14512     wl="-Wl,"
14513     ;;
14514
14515   sysv4*)
14516     dll_cflags="-KPIC"
14517     wl="-Wl,"
14518     ;;
14519
14520   sysv5*)
14521     dll_cflags="-KPIC"
14522     wl="-Wl,"
14523     ;;
14524
14525   solaris2*)
14526     dll_cflags='-KPIC'
14527     wl='-Wl,'
14528     ;;
14529
14530   sunos4*)
14531     dll_cflags='-PIC'
14532     wl='-Qoption ld '
14533     ;;
14534
14535   uts4*)
14536     dll_cflags='-pic'
14537     ;;
14538
14539   *)
14540     can_build_shared=no
14541     ;;
14542   esac
14543 fi
14544
14545 if test -n "$dll_cflags"; then
14546   echo "$ac_t""${dll_cflags}" 1>&6
14547
14548   # Check to make sure the dll_cflags actually works.
14549   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14550 echo "configure:14551: checking if PIC flag ${dll_cflags} really works" >&5
14551   save_CFLAGS="$CFLAGS"
14552   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14553   cat > conftest.$ac_ext <<EOF
14554 #line 14555 "configure"
14555 #include "confdefs.h"
14556
14557 int main() {
14558 int x=0;
14559 ; return 0; }
14560 EOF
14561 if { (eval echo configure:14562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14562   rm -rf conftest*
14563   
14564     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14565     # reports no error.  So, we need to grep stderr for (Bundled).
14566     if grep '(Bundled)' config.log >/dev/null; then
14567       echo "$ac_t""no" 1>&6
14568       can_build_shared=no
14569       dll_cflags=
14570     else
14571       echo "$ac_t""yes" 1>&6
14572     fi
14573 else
14574   echo "configure: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   rm -rf conftest*
14577   echo "$ac_t""no" 1>&6
14578     can_build_shared=no
14579     dll_cflags=
14580 fi
14581 rm -f conftest*
14582   CFLAGS="$save_CFLAGS"
14583 else
14584   echo "$ac_t""none" 1>&6
14585 fi
14586
14587 if test "$can_build_shared" = "yes"; then
14588 cc_produces_so=no
14589 xldf=
14590 xcldf=
14591 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14592 echo "configure:14593: checking if C compiler can produce shared libraries" >&5
14593 if test "$XEGCC" = yes; then
14594   xcldf="-shared"
14595   xldf="-shared"
14596 else # Not using GCC
14597   case "$xehost_os" in
14598     aix[3-9]*)
14599       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14600       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14601       ;;
14602
14603     freebsd2* | netbsd* | openbsd*)
14604       xldf="-Bshareable"
14605       xcldf="${wl}-Bshareable"
14606       ;;
14607
14608     freebsd3*)
14609       xcldf="-shared"
14610       ;;
14611
14612     hpux*)
14613       xldf="-b +s"
14614       xcldf="${wl}-b ${wl}+s"
14615       ;;
14616
14617     irix[5-9]* | osf[3-9]*)
14618       xcldf="${wl}-shared"
14619       xldf="-shared"
14620       ;;
14621
14622     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14623       xcldf="-G"
14624       xldf="-G"
14625       ;;
14626
14627     sunos4*)
14628       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14629       xldf="-assert pure-text -Bstatic"
14630       ;;
14631   esac
14632 fi # End if if we are using gcc
14633
14634 if test -n "$xcldf"; then
14635   save_LDFLAGS=$LDFLAGS
14636   save_LIBS=$LIBS
14637   save_xe_libs=$xe_libs
14638   LDFLAGS="$xcldf $LDFLAGS"
14639   LIBS=
14640   xe_libs=
14641   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14642   cat > conftest.$ac_ext <<EOF
14643 #line 14644 "configure"
14644 #include "confdefs.h"
14645
14646 int main() {
14647 int x=0;
14648 ; return 0; }
14649 EOF
14650 if { (eval echo configure:14651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14651   rm -rf conftest*
14652   cc_produces_so=yes
14653 else
14654   echo "configure: failed program was:" >&5
14655   cat conftest.$ac_ext >&5
14656   rm -rf conftest*
14657   cc_produces_so=no
14658 fi
14659 rm -f conftest*
14660   LDFLAGS=$save_LDFLAGS
14661   LIBS=$save_LIBS
14662   xe_libs=$save_xe_libs
14663   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14664 else
14665   cc_produces_so=no
14666 fi
14667 echo "$ac_t""${cc_produces_so}" 1>&6
14668
14669 LTLD=$LD
14670 if test -z "$LTLD"; then
14671   ac_prog=ld
14672   if test "$XEGCC" = yes; then
14673     # Check if gcc -print-prog-name=ld gives a path.
14674     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14675 echo "configure:14676: checking for ld used by GCC" >&5
14676     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14677     case "$ac_prog" in
14678     # Accept absolute paths.
14679     /*)
14680       if test -z "$LTLD"; then
14681         case "$ac_prog" in
14682           *gcc-lib*) LTLD="$CC"
14683                      ;;
14684           *)         LTLD="$ac_prog"
14685                      ;;
14686         esac
14687       fi
14688       ;;
14689     "")
14690       # If it fails, then pretend we aren't using GCC.
14691       ac_prog=ld
14692       ;;
14693     *)
14694       # If it is relative, then search for the first ld in PATH.
14695       with_gnu_ld=unknown
14696       ;;
14697     esac
14698   else
14699     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14700 echo "configure:14701: checking for GNU ld" >&5
14701   fi
14702
14703   if test -z "$LTLD"; then
14704     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14705     for ac_dir in $PATH; do
14706       test -z "$ac_dir" && ac_dir=.
14707       if test -f "$ac_dir/$ac_prog"; then
14708         LTLD="$ac_dir/$ac_prog"
14709         # Check to see if the program is GNU ld.  I'd rather use --version,
14710         # but apparently some GNU ld's only accept -v.
14711         # Break only if it was the GNU/non-GNU ld that we prefer.
14712         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14713           xe_gnu_ld=yes
14714         else
14715           xe_gnu_ld=no
14716         fi
14717       fi
14718     done
14719     IFS="$ac_save_ifs"
14720   fi
14721
14722   if test -n "$LTLD"; then
14723     echo "$ac_t""${LTLD}" 1>&6
14724   else
14725     echo "$ac_t""no" 1>&6
14726   fi
14727
14728   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14729     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14730     exit 1
14731   fi
14732 fi
14733
14734 ld_dynamic_link_flags=
14735
14736 # Check to see if it really is or isn't GNU ld.
14737 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14738 echo "configure:14739: checking if the linker is GNU ld" >&5
14739 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14740 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14741   xe_gnu_ld=yes
14742 else
14743   xe_gnu_ld=no
14744 fi
14745 echo "$ac_t""${xe_gnu_ld}" 1>&6
14746
14747 case "$xehost_os" in
14748   amigaos* | sunos4*)
14749     # On these operating systems, we should treat GNU ld like the system ld.
14750     gnu_ld_acts_native=yes
14751     ;;
14752   *)
14753     gnu_ld_acts_native=no
14754     ;;
14755 esac
14756
14757 if test "$cc_produces_so" = "yes"; then
14758   dll_ld=$CC
14759   dll_ldflags=$xcldf
14760   can_build_shared=yes
14761   ld_shlibs=yes
14762 else
14763   # OK - only NOW do we futz about with ld.
14764   # See if the linker supports building shared libraries.
14765   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14766 echo "configure:14767: checking whether the linker supports shared libraries" >&5
14767   dll_ld=$CC
14768   dll_ldflags=$LDFLAGS
14769   ld_shlibs=yes
14770   can_build_shared=yes
14771   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14772     # See if GNU ld supports shared libraries.
14773     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14774       dll_ld=$CC
14775       dll_ldflags="-shared"
14776       ld_shlibs=yes
14777     else
14778       ld_shlibs=no
14779     fi
14780   else
14781     # PORTME fill in a description of your system's linker (not GNU ld)
14782     case "$xehost_os" in
14783     aix3*)
14784       dll_ld=$LTLD
14785       dll_ldflags=$xldf
14786       ;;
14787
14788     aix[4-9]*)
14789       dll_ldflags=$xcldf
14790       ;;
14791
14792     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14793     # support.  Future versions do this automatically, but an explicit c++rt0.o
14794     # doesn't break anything, and helps significantly (at the cost of a little
14795     # extra space).
14796     freebsd2.2*)
14797       dll_ld=$LTLD
14798       dll_ldflags=$xldf
14799       dll_post="/usr/lib/c++rt0.o"
14800       ;;
14801
14802     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14803     freebsd2*)
14804       dll_ld=$LTLD
14805       dll_ldflags="-Bshareable"
14806       ;;
14807
14808     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14809     freebsd3*)
14810       dll_ldflags="-shared"
14811       ;;
14812
14813     hpux*)
14814       dll_ld=$LTLD
14815       dll_ldflags=$xldf
14816       ;;
14817
14818     irix[5-9]*)
14819       dll_ld=$LTLD
14820       dll_ldflags=$xldf
14821       ;;
14822
14823     netbsd*)
14824       # Tested with NetBSD 1.2 ld
14825       dll_ld=$LTLD
14826       dll_ldflags=$xldf
14827       ;;
14828
14829     openbsd*)
14830       dll_ld=$LTLD
14831       dll_ldflags=$xldf
14832       ;;
14833
14834     osf3* | osf4*)
14835       dll_ld=$LTLD
14836       dll_ldflags=$xldf
14837       ;;
14838
14839     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14840     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14841       dll_ld=$LTLD
14842       case "$dll_ld" in
14843         *gcc*) dll_ldflags="-shared"
14844                dll_ld=$CC
14845                ;;
14846         *)     dll_ldflags="-G"
14847                ;;
14848       esac
14849       ;;
14850
14851     sunos4*)
14852       if test "$XEGCC" = yes; then
14853         dll_ld=$CC
14854       else
14855         dll_ld=$LTLD
14856       fi
14857       dll_ldflags=$xldf
14858       ;;
14859
14860     uts4*)
14861       dll_ld=$LTLD
14862       dll_ldflags="-G"
14863       ;;
14864
14865     bsdi*)
14866       dll_ldflags="-r"
14867       dll_ld="shlicc2"
14868       ;;
14869
14870     *)
14871       ld_shlibs=no
14872       can_build_shared=no
14873       ;;
14874     esac
14875   fi
14876   echo "$ac_t""${ld_shlibs}" 1>&6
14877   if test "$ld_shlibs" = "no"; then
14878     can_build_shared=no
14879   fi
14880 fi # End of if cc_produces_so = no
14881
14882
14883 if test "$xe_gnu_ld" = yes; then
14884   if test "$ld_shlibs" = yes; then
14885     ld_dynamic_link_flags="${wl}-export-dynamic"
14886   fi
14887 fi
14888
14889 if test -z "$ld_dynamic_link_flags"; then
14890   case "$xehost_os" in
14891   aix[3-9]*)
14892     ld_dynamic_link_flags=
14893     ;;
14894
14895   freebsd2.2*)
14896     ld_dynamic_link_flags=
14897     ;;
14898
14899   freebsd2*)
14900     ld_dynamic_link_flags=
14901     ;;
14902
14903   freebsd3*)
14904     ld_dynamic_link_flags=
14905     ;;
14906
14907   hpux*)
14908     ld_dynamic_link_flags="${wl}-E"
14909     ;;
14910
14911   irix[5-9]*)
14912     ld_dynamic_link_flags=
14913     ;;
14914
14915   netbsd*)
14916     ld_dynamic_link_flags=
14917     ;;
14918
14919   openbsd*)
14920     ld_dynamic_link_flags=
14921     ;;
14922
14923   osf3* | osf4*)
14924     ld_dynamic_link_flags=
14925     ;;
14926
14927   solaris2* | solaris7*)
14928     ld_dynamic_link_flags=
14929     ;;
14930
14931   sco3.2v5* | unixware* | sysv5* | sysv4*)
14932     ld_dynamic_link_flags="${wl}-Bexport"
14933     ;;
14934
14935   sunos4*)
14936     ld_dynamic_link_flags=
14937     ;;
14938
14939   uts4*)
14940     ld_dynamic_link_flags=
14941     ;;
14942
14943   bsdi*)
14944     ld_dynamic_link_flags=
14945     ;;
14946
14947   esac
14948 fi # End of if -z ld_dynamic_link_flags
14949 fi # End of if test "$can_build_shared" = "yes"
14950
14951
14952
14953
14954
14955
14956
14957
14958   fi
14959
14960   if test "$can_build_shared" = "yes"; then
14961     { test "$extra_verbose" = "yes" && cat << \EOF
14962     Defining HAVE_SHLIB
14963 EOF
14964 cat >> confdefs.h <<\EOF
14965 #define HAVE_SHLIB 1
14966 EOF
14967 }
14968
14969     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14970    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14971  fi
14972     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14973     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14974     for ac_func in dlerror _dlerror
14975 do
14976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14977 echo "configure:14978: checking for $ac_func" >&5
14978
14979 cat > conftest.$ac_ext <<EOF
14980 #line 14981 "configure"
14981 #include "confdefs.h"
14982 /* System header to define __stub macros and hopefully few prototypes,
14983     which can conflict with char $ac_func(); below.  */
14984 #include <assert.h>
14985 /* Override any gcc2 internal prototype to avoid an error.  */
14986 /* We use char because int might match the return type of a gcc2
14987     builtin and then its argument prototype would still apply.  */
14988 char $ac_func();
14989
14990 int main() {
14991
14992 /* The GNU C library defines this for functions which it implements
14993     to always fail with ENOSYS.  Some functions are actually named
14994     something starting with __ and the normal name is an alias.  */
14995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14996 choke me
14997 #else
14998 $ac_func();
14999 #endif
15000
15001 ; return 0; }
15002 EOF
15003 if { (eval echo configure:15004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15004   rm -rf conftest*
15005   eval "ac_cv_func_$ac_func=yes"
15006 else
15007   echo "configure: failed program was:" >&5
15008   cat conftest.$ac_ext >&5
15009   rm -rf conftest*
15010   eval "ac_cv_func_$ac_func=no"
15011 fi
15012 rm -f conftest*
15013
15014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15015   echo "$ac_t""yes" 1>&6
15016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15017   { test "$extra_verbose" = "yes" && cat << EOF
15018     Defining $ac_tr_func
15019 EOF
15020 cat >> confdefs.h <<EOF
15021 #define $ac_tr_func 1
15022 EOF
15023 }
15024  
15025 else
15026   echo "$ac_t""no" 1>&6
15027 fi
15028 done
15029
15030     with_modules=yes
15031   else
15032     if test "$with_modules" = "yes"; then
15033       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15034     else
15035       echo "configure: warning: "Module support cannot be provided."" 1>&2
15036     fi
15037     with_modules=no
15038   fi
15039 fi
15040
15041 cat > conftest.$ac_ext <<EOF
15042 #line 15043 "configure"
15043 #include "confdefs.h"
15044 int main(int c,char *v[]){return 0;}
15045 EOF
15046 if { (eval echo configure:15047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15047 then
15048   :
15049 else
15050   conftest_rc="$?"
15051   echo "configure: failed program was:" >&5
15052   cat conftest.$ac_ext >&5
15053   rm -fr conftest*
15054   
15055   echo ""
15056   echo "*** PANIC *** The C compiler can no longer build working executables."
15057   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15058   echo "*** PANIC *** The most likely reason for this problem is that configure"
15059   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15060   echo "*** PANIC *** found at run time."
15061   echo "*** PANIC ***"
15062   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15063   echo "*** PANIC *** On other systems, try telling configure where to find the"
15064   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15065   echo "*** PANIC ***"
15066   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15067   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15068   echo "*** PANIC *** on your system.  Don't do that."
15069   exit 1
15070 fi
15071 rm -fr conftest*
15072
15073 if test "$win32_processes" = "yes"; then
15074   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15075    echo "    xemacs will be linked with \"process-nt.o\""
15076  fi
15077 else
15078   { test "$extra_verbose" = "yes" && cat << \EOF
15079     Defining HAVE_UNIX_PROCESSES
15080 EOF
15081 cat >> confdefs.h <<\EOF
15082 #define HAVE_UNIX_PROCESSES 1
15083 EOF
15084 }
15085
15086   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15087    echo "    xemacs will be linked with \"process-unix.o\""
15088  fi
15089 fi
15090
15091
15092
15093 T=""
15094 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15095 CFLAGS="$T"
15096
15097
15098 T=""
15099 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15100 extra_objs="$T"
15101
15102
15103 T=""
15104 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
15105 c_switch_general="$T"
15106
15107
15108 T=""
15109 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
15110 c_switch_window_system="$T"
15111
15112
15113 T=""
15114 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15115 c_switch_all="$T"
15116
15117
15118 T=""
15119 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
15120 ld_switch_general="$T"
15121
15122
15123 T=""
15124 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15125 ld_switch_window_system="$T"
15126
15127
15128 T=""
15129 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15130 ld_switch_all="$T"
15131
15132
15133 T=""
15134 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15135 ld_libs_general="$T"
15136
15137
15138 T=""
15139 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
15140 ld_libs_window_system="$T"
15141
15142
15143 T=""
15144 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15145 ld_libs_all="$T"
15146
15147
15148
15149 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15150 internal_makefile_list="Makefile.in"
15151 SUBDIR_MAKEFILES=''
15152 test -d lock || mkdir lock
15153 for dir in $MAKE_SUBDIR; do
15154   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15155         test -d "$d" || mkdir "$d"; cd "$d"
15156       done ) ;;
15157    * ) test -d "$dir" || mkdir "$dir" ;;
15158   esac
15159   
15160 T=""
15161 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15162 SUBDIR_MAKEFILES="$T"
15163
15164   
15165 T=""
15166 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15167 internal_makefile_list="$T"
15168
15169 done
15170
15171
15172
15173
15174 for dir in src/s src/m; do
15175   if test ! -d "$dir" ; then
15176     echo Making symbolic link to "$srcdir/$dir"
15177     ${LN_S} "$srcdir/$dir" "$dir"
15178   fi
15179 done
15180
15181 if test "$extra_verbose" = "yes"; then
15182   echo ""
15183   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
15184   echo ""
15185 fi
15186
15187
15188 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15189   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15190   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15191 fi
15192
15193 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15194   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15195   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15196 fi
15197
15198 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15199   test "$extra_verbose" = "yes" && echo "creating TAGS"
15200   echo "\f
15201 $srcdir/TAGS,include" > "TAGS"
15202 fi
15203
15204 if test "$__SUNPRO_C" = "yes"; then
15205   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15206   ( echo "# For use with Sun WorkShop's Source browser."
15207     echo "# See sbquery(1) and sbinit(4) for more information"
15208     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15209   ) > .sbinit
15210 fi
15211
15212 rm -f core
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233 PREFIX=$prefix
15234 while true; do
15235   case "$PREFIX" in
15236     *\$* ) eval "PREFIX=$PREFIX" ;;
15237     *) break ;;
15238   esac
15239 done
15240
15241
15242
15243
15244 EXEC_PREFIX=$exec_prefix
15245 while true; do
15246   case "$EXEC_PREFIX" in
15247     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15248     *) break ;;
15249   esac
15250 done
15251
15252
15253
15254
15255 INFODIR=$infodir
15256 while true; do
15257   case "$INFODIR" in
15258     *\$* ) eval "INFODIR=$INFODIR" ;;
15259     *) break ;;
15260   esac
15261 done
15262
15263
15264
15265
15266 INFOPATH=$infopath
15267 while true; do
15268   case "$INFOPATH" in
15269     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15270     *) break ;;
15271   esac
15272 done
15273
15274
15275
15276
15277 PACKAGE_PATH=$package_path
15278 while true; do
15279   case "$PACKAGE_PATH" in
15280     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15281     *) break ;;
15282   esac
15283 done
15284
15285
15286
15287
15288 LISPDIR=$lispdir
15289 while true; do
15290   case "$LISPDIR" in
15291     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15292     *) break ;;
15293   esac
15294 done
15295
15296
15297
15298
15299 MODULEDIR=$moduledir
15300 while true; do
15301   case "$MODULEDIR" in
15302     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15303     *) break ;;
15304   esac
15305 done
15306
15307
15308
15309
15310 SITELISPDIR=$sitelispdir
15311 while true; do
15312   case "$SITELISPDIR" in
15313     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15314     *) break ;;
15315   esac
15316 done
15317
15318
15319
15320
15321 SITEMODULEDIR=$sitemoduledir
15322 while true; do
15323   case "$SITEMODULEDIR" in
15324     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15325     *) break ;;
15326   esac
15327 done
15328
15329
15330
15331
15332 ETCDIR=$etcdir
15333 while true; do
15334   case "$ETCDIR" in
15335     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15336     *) break ;;
15337   esac
15338 done
15339
15340
15341
15342
15343 DOCDIR=$docdir
15344 while true; do
15345   case "$DOCDIR" in
15346     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15347     *) break ;;
15348   esac
15349 done
15350
15351
15352
15353
15354 ARCHLIBDIR=$archlibdir
15355 while true; do
15356   case "$ARCHLIBDIR" in
15357     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15358     *) break ;;
15359   esac
15360 done
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15382
15383
15384
15385
15386
15387
15388
15389 : ${XEMACS_CC:=$CC}
15390
15391
15392 if test "$with_prefix" = "yes"; then
15393   { test "$extra_verbose" = "yes" && cat << \EOF
15394     Defining PREFIX_USER_DEFINED
15395 EOF
15396 cat >> confdefs.h <<\EOF
15397 #define PREFIX_USER_DEFINED 1
15398 EOF
15399 }
15400
15401 fi
15402
15403 if test "$with_site_lisp" = "no"; then
15404   { test "$extra_verbose" = "yes" && cat << \EOF
15405     Defining INHIBIT_SITE_LISP
15406 EOF
15407 cat >> confdefs.h <<\EOF
15408 #define INHIBIT_SITE_LISP 1
15409 EOF
15410 }
15411
15412 fi
15413 if test "$with_site_modules" = "no"; then
15414   { test "$extra_verbose" = "yes" && cat << \EOF
15415     Defining INHIBIT_SITE_MODULES
15416 EOF
15417 cat >> confdefs.h <<\EOF
15418 #define INHIBIT_SITE_MODULES 1
15419 EOF
15420 }
15421
15422 fi
15423
15424
15425 T=""
15426 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15427 ac_configure_args="$T"
15428
15429 { test "$extra_verbose" = "yes" && cat << EOF
15430     Defining EMACS_CONFIGURATION = "$configuration"
15431 EOF
15432 cat >> confdefs.h <<EOF
15433 #define EMACS_CONFIGURATION "$configuration"
15434 EOF
15435 }
15436
15437 { test "$extra_verbose" = "yes" && cat << EOF
15438     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15439 EOF
15440 cat >> confdefs.h <<EOF
15441 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15442 EOF
15443 }
15444
15445
15446
15447 null_string=""
15448 { test "$extra_verbose" = "yes" && cat << EOF
15449     Defining LD_SWITCH_X_SITE = $null_string
15450 EOF
15451 cat >> confdefs.h <<EOF
15452 #define LD_SWITCH_X_SITE $null_string
15453 EOF
15454 }
15455
15456 { test "$extra_verbose" = "yes" && cat << EOF
15457     Defining LD_SWITCH_X_SITE_AUX = $null_string
15458 EOF
15459 cat >> confdefs.h <<EOF
15460 #define LD_SWITCH_X_SITE_AUX $null_string
15461 EOF
15462 }
15463
15464 { test "$extra_verbose" = "yes" && cat << EOF
15465     Defining C_SWITCH_X_SITE = $null_string
15466 EOF
15467 cat >> confdefs.h <<EOF
15468 #define C_SWITCH_X_SITE $null_string
15469 EOF
15470 }
15471
15472 { test "$extra_verbose" = "yes" && cat << EOF
15473     Defining LD_SWITCH_SITE = $null_string
15474 EOF
15475 cat >> confdefs.h <<EOF
15476 #define LD_SWITCH_SITE $null_string
15477 EOF
15478 }
15479
15480 { test "$extra_verbose" = "yes" && cat << EOF
15481     Defining C_SWITCH_SITE = $null_string
15482 EOF
15483 cat >> confdefs.h <<EOF
15484 #define C_SWITCH_SITE $null_string
15485 EOF
15486 }
15487
15488
15489
15490 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15491     Defining GNU_MALLOC
15492 EOF
15493 cat >> confdefs.h <<\EOF
15494 #define GNU_MALLOC 1
15495 EOF
15496 }
15497
15498 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15499     Defining USE_SYSTEM_MALLOC
15500 EOF
15501 cat >> confdefs.h <<\EOF
15502 #define USE_SYSTEM_MALLOC 1
15503 EOF
15504 }
15505
15506 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15507     Defining USE_DEBUG_MALLOC
15508 EOF
15509 cat >> confdefs.h <<\EOF
15510 #define USE_DEBUG_MALLOC 1
15511 EOF
15512 }
15513
15514                                               { test "$extra_verbose" = "yes" && cat << \EOF
15515     Defining USE_SYSTEM_MALLOC
15516 EOF
15517 cat >> confdefs.h <<\EOF
15518 #define USE_SYSTEM_MALLOC 1
15519 EOF
15520 }
15521
15522 fi
15523 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15524     Defining I18N3
15525 EOF
15526 cat >> confdefs.h <<\EOF
15527 #define I18N3 1
15528 EOF
15529 }
15530
15531 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15532     Defining USE_GCC
15533 EOF
15534 cat >> confdefs.h <<\EOF
15535 #define USE_GCC 1
15536 EOF
15537 }
15538
15539 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15540     Defining EXTERNAL_WIDGET
15541 EOF
15542 cat >> confdefs.h <<\EOF
15543 #define EXTERNAL_WIDGET 1
15544 EOF
15545 }
15546
15547 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15548     Defining QUICK_BUILD
15549 EOF
15550 cat >> confdefs.h <<\EOF
15551 #define QUICK_BUILD 1
15552 EOF
15553 }
15554
15555 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15556     Defining PURIFY
15557 EOF
15558 cat >> confdefs.h <<\EOF
15559 #define PURIFY 1
15560 EOF
15561 }
15562
15563 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15564     Defining QUANTIFY
15565 EOF
15566 cat >> confdefs.h <<\EOF
15567 #define QUANTIFY 1
15568 EOF
15569 }
15570
15571 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15572     Defining MAIL_USE_POP
15573 EOF
15574 cat >> confdefs.h <<\EOF
15575 #define MAIL_USE_POP 1
15576 EOF
15577 }
15578
15579 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15580     Defining KERBEROS
15581 EOF
15582 cat >> confdefs.h <<\EOF
15583 #define KERBEROS 1
15584 EOF
15585 }
15586
15587 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15588     Defining HESIOD
15589 EOF
15590 cat >> confdefs.h <<\EOF
15591 #define HESIOD 1
15592 EOF
15593 }
15594
15595 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15596     Defining USE_UNION_TYPE
15597 EOF
15598 cat >> confdefs.h <<\EOF
15599 #define USE_UNION_TYPE 1
15600 EOF
15601 }
15602
15603 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15604     Defining PDUMP
15605 EOF
15606 cat >> confdefs.h <<\EOF
15607 #define PDUMP 1
15608 EOF
15609 }
15610
15611
15612
15613 (
15614 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15615 else
15616   echo "uname -a: `uname -a`"
15617 fi
15618 echo ""
15619 echo "$0 $quoted_arguments"
15620 ) > Installation
15621
15622 if test ! -z ${emacs_beta_version} ; then
15623   if test -z "${emacs_is_beta}" ; then
15624         xemacs_betaname=".${emacs_beta_version}"
15625   else
15626         xemacs_betaname="-b${emacs_beta_version}"
15627   fi
15628 else
15629   xemacs_betaname=""
15630 fi
15631
15632 (
15633 echo "
15634
15635 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15636 "
15637 echo "
15638 Compilation / Installation:"
15639 echo "  Source code location:              $srcdir"
15640 echo "  Installation prefix:               $prefix"
15641 if test -n "$site_includes"; then
15642   echo "  Additional header files:           $site_includes"
15643 fi
15644 if test -n "$site_libraries"; then
15645   echo "  Additional libraries:              $site_libraries"
15646 fi
15647 if test -n "$site_prefixes"; then
15648   echo "  Additional prefixes:               $site_prefixes"
15649 fi
15650 if test -n "$runpath"; then
15651   echo "  Runtime library search path:       $runpath"
15652 fi
15653
15654 if test -n "$opsysfile"
15655 then echo "  Operating system description file: \`$opsysfile'"
15656 else echo "  Not using any operating system description file"
15657 fi
15658 if test -n "$machfile"
15659 then echo "  Machine description file:          \`$machfile'"
15660 else echo "  Not using any machine description file"
15661 fi
15662
15663 echo "  Compiler:                          $CC $CFLAGS"
15664 echo "  Relocating allocator for buffers:  $rel_alloc"
15665 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15666
15667 echo "
15668 Window System:"
15669 if test "$with_msw" = "yes"; then
15670   echo "  Compiling in support for the Microsoft window system."
15671 fi
15672 if test "$with_x11" = "yes"; then
15673   echo "  Compiling in support for the X window system:"
15674   echo "    - X Windows headers location:                 $x_includes"
15675   echo "    - X Windows libraries location:               $x_libraries"
15676   if test "$with_xauth" != yes; then
15677     echo "    - Xau (X authority) not available."
15678   fi
15679   if test "$with_xmu" != yes; then
15680     echo "    - Xmu library not available; substituting equivalent routines."
15681   fi
15682   if test "$with_wmcommand" != no; then
15683     echo "    - Handling WM_COMMAND properly."
15684   fi
15685 fi
15686 if test "$need_athena" = "yes"; then
15687   echo "  Compiling in support for the Athena widget set:"
15688   echo "    - Athena headers location:                    $athena_h_path"
15689   echo "    - Athena library to link:                     $athena_lib"
15690 fi
15691 case "$with_menubars" in
15692   gtk   ) echo "  Using GTK menubars."   ;;
15693   lucid ) echo "  Using Lucid menubars." ;;
15694   motif ) echo "  Using Motif menubars."
15695           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15696           echo "             We recommend using the Lucid menubar instead."
15697           echo "             Re-run configure with --with-menubars='lucid'." ;;
15698     msw ) echo "  Using MS-Windows menubars." ;;
15699 esac
15700 case "$with_scrollbars" in
15701   gtk    ) echo "  Using GTK scrollbars."        ;;
15702   lucid  ) echo "  Using Lucid scrollbars."      ;;
15703   motif  ) echo "  Using Motif scrollbars."      ;;
15704   athena ) echo "  Using Athena scrollbars."     ;;
15705      msw ) echo "  Using MS-Windows scrollbars." ;;
15706 esac
15707 case "$with_dialogs" in
15708   gtk    ) echo "  Using GTK dialog boxes." ;;
15709   motif  ) echo "  Using Motif dialog boxes."
15710            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15711              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15712              echo "             We recommend using the Athena dialog boxes instead."
15713              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15714              echo "             Read the PROBLEMS file for more information."
15715            fi; fi ;;
15716   athena ) echo "  Using Athena dialog boxes."     ;;
15717      msw ) echo "  Using MS-Windows dialog boxes." ;;
15718 esac
15719 case "$with_widgets" in
15720   gtk    ) echo "  Using GTK native widgets."        ;;
15721   motif  ) echo "  Using Motif native widgets."      ;;
15722   athena ) echo "  Using Athena native widgets."     ;;
15723      msw ) echo "  Using MS-Windows native widgets." ;;
15724 esac
15725 if test "$with_dragndrop" = yes; then
15726   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15727   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15728 fi
15729
15730 echo "
15731 TTY:"
15732 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15733 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15734
15735 echo "
15736 Images:"
15737 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15738 if test "$with_xpm" = yes; then
15739   echo "  Compiling in support for XPM  images."
15740 elif test "$with_x11" = yes; then
15741   echo "  WARNING: -----------------------------------------------------------"
15742   echo "  WARNING: Compiling without XPM image support."
15743   if test "$xpm_problem" != ""; then
15744     echo "  Reason: $xpm_problem"
15745   fi
15746   echo "  WARNING: You should strongly consider installing XPM."
15747   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15748   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15749   echo "  WARNING: -----------------------------------------------------------"
15750 fi
15751 if test "$with_png" = yes; then
15752   echo "  Compiling in support for PNG  images."
15753 elif test "$window_system" != "none"; then
15754   echo "  WARNING: -----------------------------------------------------------"
15755   echo "  WARNING: Compiling without PNG image support."
15756   if test "$png_problem" != ""; then
15757     echo "  Reason: $png_problem"
15758   fi
15759   echo "  WARNING: You should strongly consider installing the PNG libraries."
15760   echo "  WARNING: Otherwise certain images and glyphs may not display."
15761   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15762   echo "  WARNING: -----------------------------------------------------------"
15763 fi
15764 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15765 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15766 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15767
15768 echo "
15769 Sound:"
15770 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15771 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15772 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15773 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15774
15775 echo "
15776 Databases:"
15777 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15778 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15779 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15780 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15781 if test "$with_postgresql" = yes; then
15782   echo "  Compiling in support for PostgreSQL."
15783   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15784   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15785 fi
15786
15787 echo "
15788 Internationalization:"
15789 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15790 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15791 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15792 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15793 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15794 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15795 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15796 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15797 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15798 if test "$with_wnn" = yes; then
15799   echo "  Compiling in support for the WNN input method on Mule."
15800   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15801 fi
15802 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15803
15804 echo "
15805 Mail:"
15806 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15807 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15808 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15809 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15810
15811 echo "
15812 Other Features:"
15813 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15814 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15815 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15816 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15817 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15818 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15819 test "$pdump" = yes && echo "  Using the new portable dumper."
15820 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15821 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15822 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15823   != "no no no no no no"; then
15824   echo "  WARNING: ---------------------------------------------------------"
15825   echo "  WARNING: Compiling in support for runtime error checking."
15826   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15827   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15828   echo "  WARNING: ---------------------------------------------------------"
15829 fi
15830 echo ""
15831 ) | tee -a Installation
15832 echo ""
15833
15834
15835 # Remove any trailing slashes in these variables.
15836 test -n "$prefix" &&
15837   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15838 test -n "$exec_prefix" &&
15839   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15840
15841
15842 for file in $internal_makefile_list; do
15843   test "$file" = src/Makefile.in && \
15844     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15845   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15846 done
15847 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15848 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
15849
15850 trap '' 1 2 15
15851
15852 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15853
15854 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15855 # Let make expand exec_prefix.
15856 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15857
15858 # Any assignment to VPATH causes Sun make to only execute
15859 # the first set of double-colon rules, so remove it if not needed.
15860 # If there is a colon in the path, we need to keep it.
15861 if test "x$srcdir" = x.; then
15862   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15863 fi
15864
15865 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15866
15867 DEFS=-DHAVE_CONFIG_H
15868
15869 # Without the "./", some shells look in PATH for config.status.
15870 : ${CONFIG_STATUS=./config.status}
15871
15872 echo creating $CONFIG_STATUS
15873 rm -f $CONFIG_STATUS
15874 cat > $CONFIG_STATUS <<EOF
15875 #! /bin/sh
15876 # Generated automatically by configure.
15877 # Run this file to recreate the current configuration.
15878 # This directory was configured as follows,
15879 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15880 #
15881 # $0 $ac_configure_args
15882 #
15883 # Compiler output produced by configure, useful for debugging
15884 # configure, is in ./config.log if it exists.
15885
15886 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15887 for ac_option
15888 do
15889   case "\$ac_option" in
15890   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15891     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15892     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15893   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15894     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15895     exit 0 ;;
15896   -help | --help | --hel | --he | --h)
15897     echo "\$ac_cs_usage"; exit 0 ;;
15898   *) echo "\$ac_cs_usage"; exit 1 ;;
15899   esac
15900 done
15901
15902 ac_given_srcdir=$srcdir
15903 ac_given_INSTALL="$INSTALL"
15904
15905 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15906 EOF
15907 cat >> $CONFIG_STATUS <<EOF
15908
15909 # Protect against being on the right side of a sed subst in config.status.
15910 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15911  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15912 $ac_vpsub
15913 $extrasub
15914 s%@SHELL@%$SHELL%g
15915 s%@CFLAGS@%$CFLAGS%g
15916 s%@CPPFLAGS@%$CPPFLAGS%g
15917 s%@CXXFLAGS@%$CXXFLAGS%g
15918 s%@FFLAGS@%$FFLAGS%g
15919 s%@DEFS@%$DEFS%g
15920 s%@LDFLAGS@%$LDFLAGS%g
15921 s%@LIBS@%$LIBS%g
15922 s%@exec_prefix@%$exec_prefix%g
15923 s%@prefix@%$prefix%g
15924 s%@program_transform_name@%$program_transform_name%g
15925 s%@bindir@%$bindir%g
15926 s%@sbindir@%$sbindir%g
15927 s%@libexecdir@%$libexecdir%g
15928 s%@datadir@%$datadir%g
15929 s%@sysconfdir@%$sysconfdir%g
15930 s%@sharedstatedir@%$sharedstatedir%g
15931 s%@localstatedir@%$localstatedir%g
15932 s%@libdir@%$libdir%g
15933 s%@includedir@%$includedir%g
15934 s%@oldincludedir@%$oldincludedir%g
15935 s%@infodir@%$infodir%g
15936 s%@mandir@%$mandir%g
15937 s%@LN_S@%$LN_S%g
15938 s%@blddir@%$blddir%g
15939 s%@CC@%$CC%g
15940 s%@CPP@%$CPP%g
15941 s%@start_flags@%$start_flags%g
15942 s%@ld_switch_shared@%$ld_switch_shared%g
15943 s%@start_files@%$start_files%g
15944 s%@ld@%$ld%g
15945 s%@lib_gcc@%$lib_gcc%g
15946 s%@RANLIB@%$RANLIB%g
15947 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15948 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15949 s%@INSTALL_DATA@%$INSTALL_DATA%g
15950 s%@YACC@%$YACC%g
15951 s%@SET_MAKE@%$SET_MAKE%g
15952 s%@GTK_CONFIG@%$GTK_CONFIG%g
15953 s%@X_CFLAGS@%$X_CFLAGS%g
15954 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15955 s%@X_LIBS@%$X_LIBS%g
15956 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15957 s%@install_pp@%$install_pp%g
15958 s%@libs_xauth@%$libs_xauth%g
15959 s%@dnd_objs@%$dnd_objs%g
15960 s%@lwlib_objs@%$lwlib_objs%g
15961 s%@ALLOCA@%$ALLOCA%g
15962 s%@have_esd_config@%$have_esd_config%g
15963 s%@dll_ld@%$dll_ld%g
15964 s%@dll_cflags@%$dll_cflags%g
15965 s%@dll_ldflags@%$dll_ldflags%g
15966 s%@dll_post@%$dll_post%g
15967 s%@dll_ldo@%$dll_ldo%g
15968 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15969 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15970 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15971 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15972 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15973 s%@PROGNAME@%$PROGNAME%g
15974 s%@version@%$version%g
15975 s%@configuration@%$configuration%g
15976 s%@canonical@%$canonical%g
15977 s%@inststaticdir@%$inststaticdir%g
15978 s%@instvardir@%$instvardir%g
15979 s%@srcdir@%$srcdir%g
15980 s%@pkgdir@%$pkgdir%g
15981 s%@statedir@%$statedir%g
15982 s%@extra_includes@%$extra_includes%g
15983 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15984 s%@PREFIX@%$PREFIX%g
15985 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15986 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15987 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15988 s%@INFODIR@%$INFODIR%g
15989 s%@infopath@%$infopath%g
15990 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15991 s%@INFOPATH@%$INFOPATH%g
15992 s%@package_path@%$package_path%g
15993 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15994 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15995 s%@lispdir@%$lispdir%g
15996 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15997 s%@LISPDIR@%$LISPDIR%g
15998 s%@moduledir@%$moduledir%g
15999 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16000 s%@MODULEDIR@%$MODULEDIR%g
16001 s%@sitelispdir@%$sitelispdir%g
16002 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16003 s%@SITELISPDIR@%$SITELISPDIR%g
16004 s%@sitemoduledir@%$sitemoduledir%g
16005 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16006 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16007 s%@etcdir@%$etcdir%g
16008 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16009 s%@ETCDIR@%$ETCDIR%g
16010 s%@docdir@%$docdir%g
16011 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16012 s%@DOCDIR@%$DOCDIR%g
16013 s%@archlibdir@%$archlibdir%g
16014 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16015 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16016 s%@bitmapdir@%$bitmapdir%g
16017 s%@extra_objs@%$extra_objs%g
16018 s%@machfile@%$machfile%g
16019 s%@opsysfile@%$opsysfile%g
16020 s%@c_switch_general@%$c_switch_general%g
16021 s%@c_switch_window_system@%$c_switch_window_system%g
16022 s%@c_switch_all@%$c_switch_all%g
16023 s%@ld_switch_general@%$ld_switch_general%g
16024 s%@ld_switch_window_system@%$ld_switch_window_system%g
16025 s%@ld_switch_all@%$ld_switch_all%g
16026 s%@ld_libs_general@%$ld_libs_general%g
16027 s%@ld_libs_window_system@%$ld_libs_window_system%g
16028 s%@ld_libs_all@%$ld_libs_all%g
16029 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16030 s%@native_sound_lib@%$native_sound_lib%g
16031 s%@sound_cflags@%$sound_cflags%g
16032 s%@dynodump_arch@%$dynodump_arch%g
16033 s%@XEMACS_CC@%$XEMACS_CC%g
16034 s%@internal_makefile_list@%$internal_makefile_list%g
16035
16036 CEOF
16037 EOF
16038
16039 cat >> $CONFIG_STATUS <<\EOF
16040
16041 # Split the substitutions into bite-sized pieces for seds with
16042 # small command number limits, like on Digital OSF/1 and HP-UX.
16043 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16044 ac_file=1 # Number of current file.
16045 ac_beg=1 # First line for current file.
16046 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16047 ac_more_lines=:
16048 ac_sed_cmds=""
16049 while $ac_more_lines; do
16050   if test $ac_beg -gt 1; then
16051     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16052   else
16053     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16054   fi
16055   if test ! -s conftest.s$ac_file; then
16056     ac_more_lines=false
16057     rm -f conftest.s$ac_file
16058   else
16059     if test -z "$ac_sed_cmds"; then
16060       ac_sed_cmds="sed -f conftest.s$ac_file"
16061     else
16062       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16063     fi
16064     ac_file=`expr $ac_file + 1`
16065     ac_beg=$ac_end
16066     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16067   fi
16068 done
16069 if test -z "$ac_sed_cmds"; then
16070   ac_sed_cmds=cat
16071 fi
16072 EOF
16073
16074 cat >> $CONFIG_STATUS <<EOF
16075
16076 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16077 EOF
16078 cat >> $CONFIG_STATUS <<\EOF
16079 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16080   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16081   case "$ac_file" in
16082   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16083        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16084   *) ac_file_in="${ac_file}.in" ;;
16085   esac
16086
16087   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16088
16089   # Remove last slash and all that follows it.  Not all systems have dirname.
16090   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16091   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16092     # The file is in a subdirectory.
16093     test ! -d "$ac_dir" && mkdir "$ac_dir"
16094     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16095     # A "../" for each directory in $ac_dir_suffix.
16096     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16097   else
16098     ac_dir_suffix= ac_dots=
16099   fi
16100
16101   case "$ac_given_srcdir" in
16102   .)  srcdir=.
16103       if test -z "$ac_dots"; then top_srcdir=.
16104       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16105   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16106   *) # Relative path.
16107     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16108     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16109   esac
16110
16111   case "$ac_given_INSTALL" in
16112   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16113   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16114   esac
16115
16116   echo creating "$ac_file"
16117   rm -f "$ac_file"
16118   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16119   case "$ac_file" in
16120   *Makefile*) ac_comsub="1i\\
16121 # $configure_input" ;;
16122   *) ac_comsub= ;;
16123   esac
16124
16125   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16126   sed -e "$ac_comsub
16127 s%@configure_input@%$configure_input%g
16128 s%@srcdir@%$srcdir%g
16129 s%@top_srcdir@%$top_srcdir%g
16130 s%@INSTALL@%$INSTALL%g
16131 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16132 fi; done
16133 rm -f conftest.s*
16134
16135 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16136 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16137 #
16138 # ac_d sets the value in "#define NAME VALUE" lines.
16139 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16140 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16141 ac_dC='\3'
16142 ac_dD='%g'
16143 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16144 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16145 ac_uB='\([      ]\)%\1#\2define\3'
16146 ac_uC=' '
16147 ac_uD='\4%g'
16148 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16149 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16150 ac_eB='$%\1#\2define\3'
16151 ac_eC=' '
16152 ac_eD='%g'
16153
16154 if test "${CONFIG_HEADERS+set}" != set; then
16155 EOF
16156 cat >> $CONFIG_STATUS <<EOF
16157   CONFIG_HEADERS="src/config.h lwlib/config.h"
16158 EOF
16159 cat >> $CONFIG_STATUS <<\EOF
16160 fi
16161 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16162   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16163   case "$ac_file" in
16164   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16165        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16166   *) ac_file_in="${ac_file}.in" ;;
16167   esac
16168
16169   echo creating $ac_file
16170
16171   rm -f conftest.frag conftest.in conftest.out
16172   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16173   cat $ac_file_inputs > conftest.in
16174
16175 EOF
16176
16177 # Transform confdefs.h into a sed script conftest.vals that substitutes
16178 # the proper values into config.h.in to produce config.h.  And first:
16179 # Protect against being on the right side of a sed subst in config.status.
16180 # Protect against being in an unquoted here document in config.status.
16181 rm -f conftest.vals
16182 cat > conftest.hdr <<\EOF
16183 s/[\\&%]/\\&/g
16184 s%[\\$`]%\\&%g
16185 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16186 s%ac_d%ac_u%gp
16187 s%ac_u%ac_e%gp
16188 EOF
16189 sed -n -f conftest.hdr confdefs.h > conftest.vals
16190 rm -f conftest.hdr
16191
16192 # This sed command replaces #undef with comments.  This is necessary, for
16193 # example, in the case of _POSIX_SOURCE, which is predefined and required
16194 # on some systems where configure will not decide to define it.
16195 cat >> conftest.vals <<\EOF
16196 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16197 EOF
16198
16199 # Break up conftest.vals because some shells have a limit on
16200 # the size of here documents, and old seds have small limits too.
16201
16202 rm -f conftest.tail
16203 while :
16204 do
16205   ac_lines=`grep -c . conftest.vals`
16206   # grep -c gives empty output for an empty file on some AIX systems.
16207   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16208   # Write a limited-size here document to conftest.frag.
16209   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16210   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16211   echo 'CEOF
16212   sed -f conftest.frag conftest.in > conftest.out
16213   rm -f conftest.in
16214   mv conftest.out conftest.in
16215 ' >> $CONFIG_STATUS
16216   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16217   rm -f conftest.vals
16218   mv conftest.tail conftest.vals
16219 done
16220 rm -f conftest.vals
16221
16222 cat >> $CONFIG_STATUS <<\EOF
16223   rm -f conftest.frag conftest.h
16224   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16225   cat conftest.in >> conftest.h
16226   rm -f conftest.in
16227   if cmp -s $ac_file conftest.h 2>/dev/null; then
16228     echo "$ac_file is unchanged"
16229     rm -f conftest.h
16230   else
16231     # Remove last slash and all that follows it.  Not all systems have dirname.
16232       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16233       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16234       # The file is in a subdirectory.
16235       test ! -d "$ac_dir" && mkdir "$ac_dir"
16236     fi
16237     rm -f $ac_file
16238     mv conftest.h $ac_file
16239   fi
16240 fi; done
16241
16242 EOF
16243 cat >> $CONFIG_STATUS <<EOF
16244 CPP="$CPP"
16245  top_srcdir="$srcdir"
16246  MAKE_SUBDIR="$MAKE_SUBDIR"
16247
16248 EOF
16249 cat >> $CONFIG_STATUS <<\EOF
16250 for dir in . $MAKE_SUBDIR; do
16251   (
16252     cd $dir
16253     rm -f junk.c
16254     < Makefile.in \
16255       sed -e '/^# Generated/d' \
16256           -e 's%/\*\*/#.*%%' \
16257           -e 's/^ *# */#/' \
16258           -e '/^##/d' \
16259           -e '/^#/ {
16260 p
16261 d
16262 }'        \
16263           -e '/./ {
16264 s/\([\"]\)/\\\1/g
16265 s/^/"/
16266 s/$/"/
16267 }'  > junk.c;
16268
16269
16270
16271     echo creating $dir/Makefile
16272 $CPP -I. -I${top_srcdir}/src  junk.c \
16273   | sed -e 's/^\#.*//'          \
16274         -e 's/^[        ][      ]*$//'\
16275         -e 's/^ /       /'              \
16276         -e '/^[ \f]*$/d' \
16277         -e '/^\"/ {
16278         s/\\\([\"]\)/\1/g
16279         s/^[    ]*\"//
16280         s/\"[   ]*$//
16281 }' > Makefile.new
16282     chmod 444 Makefile.new
16283     mv -f Makefile.new Makefile
16284
16285     echo creating $dir/GNUmakefile
16286 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16287   | sed -e 's/^\#.*//'          \
16288         -e 's/^[        ][      ]*$//'\
16289         -e 's/^ /       /'              \
16290         -e '/^[ \f]*$/d' \
16291         -e '/^\"/ {
16292         s/\\\([\"]\)/\1/g
16293         s/^[    ]*\"//
16294         s/\"[   ]*$//
16295 }' > Makefile.new
16296     chmod 444 Makefile.new
16297     mv -f Makefile.new GNUmakefile
16298
16299     rm -f junk.c
16300   )
16301 done
16302
16303 sed < config.status >> lib-src/config.values \
16304   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16305   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16306   -e 's/^\([^ ]*\) $/\1 ""/' \
16307   -e 's/ 1$/ t/'
16308
16309
16310 exit 0
16311 EOF
16312 chmod +x $CONFIG_STATUS
16313 rm -fr confdefs* $ac_clean_files
16314 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1