73fe0f69e21e3594863919f5aff33e4d366acc91
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 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) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 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
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_postgresql | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         memory_usage_stats | \
368         with_clash_detection | \
369         with_modules | \
370         quick_build )
371                   case "$val" in
372             y | ye | yes )      val=yes ;;
373             n | no )            val=no  ;;
374             * ) (echo "$progname: Usage error:"
375 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
376 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
377           esac
378           eval "$opt=\"$val\"" ;;
379
380
381                         srcdir          | \
382         compiler        | \
383         cflags          | \
384         cpp             | \
385         cppflags        | \
386         libs            | \
387         ldflags         | \
388         cache_file      | \
389         native_sound_lib| \
390         site_lisp       | \
391         x_includes      | \
392         x_libraries     | \
393         site_includes   | \
394         site_libraries  | \
395         site_prefixes   | \
396         site_runtime_libraries )
397                   if test "$valomitted" = "yes" ; then
398                     if test "$#" = 0 ; then
399               (echo "$progname: Usage error:"
400 echo " " "The \`--$optname' option requires a value."
401 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
402             fi
403             val="$1"; shift
404           fi
405           eval "$opt=\"$val\""
406         ;;
407
408                 rel_alloc | \
409         with_dlmalloc | \
410         with_debug_malloc  | use_debug_malloc | \
411         with_system_malloc | use_system_malloc )
412           case "$val" in
413             y | ye | yes )      val=yes ;;
414             n | no )            val=no  ;;
415             d | de | def | defa | defau | defaul | default ) val=default ;;
416             * ) (echo "$progname: Usage error:"
417 echo " " "The \`--$optname' option requires one of these values:
418   \`yes', \`no', or \`default'."
419 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
420           esac
421           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
422           eval "$opt=\"$val\""
423         ;;
424
425                 "with_database" )
426           with_database_berkdb=no
427           with_database_dbm=no
428           with_database_gdbm=no
429           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
430             case "$x" in
431               no ) ;;
432               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
433               d | db | dbm )                               with_database_dbm=yes    ;;
434               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
435               * ) (echo "$progname: Usage error:"
436 echo " " "The \`--$optname' option value
437   must be either \`no' or a comma-separated list
438   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
440             esac
441           done
442           if test "$with_database_dbm"  = "yes" -a \
443                   "$with_database_gdbm" = "yes"; then
444           (echo "$progname: Usage error:"
445 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
446   with the \`--$optname' option."
447 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
448           fi
449         ;;
450
451                 "with_sound" )
452                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
453             case "$x" in
454                       n | no | non | none ) new_sdefault=no ;;
455               a | al | all | both ) new_sdefault=yes ;;
456
457               native )       with_native_sound=yes ;;
458               nonative )     with_native_sound=no ;;
459
460               nas )          with_nas_sound=yes ;;
461               nonas )        with_nas_sound=no ;;
462
463               esd )          with_esd_sound=yes ;;
464               noesd )        with_esd_sound=no ;;
465
466               * ) bogus_sound=yes ;;
467             esac
468             if test "$bogus_sound" -o \
469                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
470                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
471                 (echo "$progname: Usage error:"
472 echo " " "Valid types for the \`--$optname' option are:
473   $types.
474 The default is to autodetect all sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               glyphs )     error_check_glyphs=yes ;;
555               noglyphs )   error_check_glyphs=no ;;
556
557               * ) bogus_error_check=yes ;;
558             esac
559             if test "$bogus_error_check" -o \
560                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
561                 if test "$error_check_default" = yes ; then
562                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
563                 else
564                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
565                 fi
566                 (echo "$progname: Usage error:"
567 echo " " "Valid types for the \`--$optname' option are:
568   $types."
569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
570             elif test -n "$new_default" ; then
571                 error_check_extents=$new_default
572                 error_check_typecheck=$new_default
573                 error_check_bufpos=$new_default
574                 error_check_gc=$new_default
575                 error_check_malloc=$new_default
576                 error_check_byte_code=$new_default
577                 error_check_glyphs=$new_default
578                 new_default=    # reset this
579             fi
580             echeck_notfirst=true
581           done
582         ;;
583
584                                 
585                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
586         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
587         archlibdir | docdir | package_path )
588                    if test "$valomitted" = "yes"; then
589              if test "$#" = 0; then
590                  (echo "$progname: Usage error:"
591 echo " " "The \`--$optname' option requires a value."
592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
593              fi
594              val="$1"; shift
595            fi
596            eval "$opt=\"$val\""
597
598                            case "$opt" in
599                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining EXEC_PREFIX_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define EXEC_PREFIX_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining LISPDIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define LISPDIR_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining SITELISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define SITELISPDIR_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630  ;;
631              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining INFODIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define INFODIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining INFOPATH_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define INFOPATH_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining PACKAGE_PATH_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define PACKAGE_PATH_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              datadir )
664                 { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining INFODIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define INFODIR_USER_DEFINED 1
669 EOF
670 }
671
672                 { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining LISPDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define LISPDIR_USER_DEFINED 1
677 EOF
678 }
679
680             { test "$extra_verbose" = "yes" && cat << \EOF
681     Defining MODULEDIR_USER_DEFINED
682 EOF
683 cat >> confdefs.h <<\EOF
684 #define MODULEDIR_USER_DEFINED 1
685 EOF
686 }
687
688                 { test "$extra_verbose" = "yes" && cat << \EOF
689     Defining ETCDIR_USER_DEFINED
690 EOF
691 cat >> confdefs.h <<\EOF
692 #define ETCDIR_USER_DEFINED 1
693 EOF
694 }
695  ;;
696              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
697     Defining DOCDIR_USER_DEFINED
698 EOF
699 cat >> confdefs.h <<\EOF
700 #define DOCDIR_USER_DEFINED 1
701 EOF
702 }
703  ;;
704              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
705     Defining ARCHLIBDIR_USER_DEFINED
706 EOF
707 cat >> confdefs.h <<\EOF
708 #define ARCHLIBDIR_USER_DEFINED 1
709 EOF
710 }
711  ;;
712            esac
713         ;;
714
715                 "no_create" ) ;;
716
717                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
718
719                 "with_menubars"   | \
720         "with_scrollbars" | \
721         "with_dialogs"    | \
722         "with_widgets" )
723           case "$val" in
724             l | lu | luc | luci | lucid )               val=lucid  ;;
725             m | mo | mot | moti | motif )               val=motif  ;;
726             a | at | ath | athe | athen | athena )      val=athena ;;
727             n | no | non | none )                       val=no     ;;
728             y | ye | yes )                              val=yes    ;;
729             * ) (echo "$progname: Usage error:"
730 echo " " "The \`--$optname' option must have one of these values:
731   \`lucid', \`motif', \`athena', \`yes', or \`no'."
732 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
733           esac
734           eval "$opt=\"$val\""
735         ;;
736
737                 "use_minimal_tagbits" | \
738         "use_indexed_lrecord_implementation" | \
739         "run_in_place"  | \
740         "const_is_losing" | \
741         "with_gnu_make" )
742           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
743         ;;
744
745                 * ) (echo "$progname: Usage error:"
746 echo " " "Unrecognized option: $arg"
747 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
748
749       esac
750     ;;
751
752         *-*-*) configuration="$arg" ;;
753
754         *) (echo "$progname: Usage error:"
755 echo " " "Unrecognized argument: $arg"
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
757
758   esac
759 done
760
761
762 test -n "$cpp"      && CPP="$cpp"
763 test -n "$cppflags" && CPPFLAGS="$cppflags"
764 test -n "$libs"     && LIBS="$libs"
765 test -n "$ldflags"  && LDFLAGS="$ldflags"
766
767 eval set x "$quoted_arguments"; shift
768
769 test "$extra_verbose" = "yes" && verbose=yes
770
771 test -n "$with_x" && with_x11="$with_x"
772
773 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
774   test "$with_system_malloc" = "default" && with_system_malloc=yes
775 fi
776
777
778
779 if test "$with_cde $with_tooltalk" = "yes no"; then
780   (echo "$progname: Usage error:"
781 echo " " "--with-cde requires --with-tooltalk"
782 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
783 elif test "$with_tooltalk" = "no" ; then with_cde=no
784 elif test "$with_cde" = "yes"; then with_tooltalk=yes
785 fi
786
787
788 case "$srcdir" in
789
790     "" )
791     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
792       if test -f "$dir/src/lisp.h" -a \
793               -f "$dir/lisp/version.el" ; then
794         srcdir="$dir"
795         break
796       fi
797     done
798     if test -z "$srcdir" ; then
799       (echo "$progname: Usage error:"
800 echo " " "Neither the current directory nor its parent seem to
801   contain the XEmacs sources.  If you do not want to build XEmacs in its
802   source tree, you should run \`$progname' in the directory in which
803   you wish to build XEmacs, using the \`--srcdir' option to say where the
804   sources may be found."
805 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
806     fi
807   ;;
808
809     * )
810     if test ! -f "$srcdir/src/lisp.h" -o \
811             ! -f "$srcdir/lisp/version.el" ; then
812       (echo "$progname: Usage error:"
813 echo " " "The directory specified with the \`--srcdir' option,
814   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
815   either run the \`$progname' script at the top of the XEmacs source
816   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
817 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
818     fi
819   ;;
820 esac
821
822 if test -z "$configuration"; then
823     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
824   if test -z "$configuration"; then
825     (echo "$progname: Usage error:"
826 echo " " "XEmacs has not been ported to this host type.
827 Try explicitly specifying the CONFIGURATION when rerunning configure."
828 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
829   fi
830 fi
831
832 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
833 echo "configure:834: checking whether ln -s works" >&5
834
835 rm -f conftestdata
836 if ln -s X conftestdata 2>/dev/null
837 then
838   rm -f conftestdata
839   ac_cv_prog_LN_S="ln -s"
840 else
841   ac_cv_prog_LN_S=ln
842 fi
843 LN_S="$ac_cv_prog_LN_S"
844 if test "$ac_cv_prog_LN_S" = "ln -s"; then
845   echo "$ac_t""yes" 1>&6
846 else
847   echo "$ac_t""no" 1>&6
848 fi
849
850
851 for dir in lisp etc man info tests; do
852   if test ! -d "$dir" ; then
853     echo Making symbolic link to "$srcdir/$dir"
854     ${LN_S} "$srcdir/$dir" "$dir"
855   fi
856 done
857
858
859 absolute_pwd="`pwd`";
860 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
861 then blddir="$PWD"
862 else blddir="$absolute_pwd"; if test -d "/net"; then
863   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
864   blddir=`echo "$blddir" | \
865    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
866 fi
867 fi
868
869
870 case "$srcdir" in
871   /* ) ;;
872   .  ) srcdir="$blddir" ;;
873   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
874   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
875   srcdir=`echo "$srcdir" | \
876    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
877 fi ;;
878 esac
879
880 if test `pwd` != `sh -c cd $srcdir && pwd`  \
881    && test -f "$srcdir/src/config.h"; then
882   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
883    echo "   as a build directory right now; it has been configured in its own"
884    echo "   right.  To configure in another directory as well, you MUST"
885    echo "   use GNU make.  If you do not have GNU make, then you must"
886    echo "   now do \`make distclean' in $srcdir,"
887    echo "   and then run $progname again.") >&2
888   extrasub='/^VPATH[     ]*=/c\
889 vpath %.c $(srcdir)\
890 vpath %.h $(srcdir)\
891 vpath %.y $(srcdir)\
892 vpath %.l $(srcdir)\
893 vpath %.s $(srcdir)\
894 vpath %.in $(srcdir)'
895 fi
896
897 . "$srcdir/version.sh" || exit 1;
898 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
899 : "${extra_verbose=$beta}"
900 version="${emacs_major_version}.${emacs_minor_version}"
901 { test "$extra_verbose" = "yes" && cat << EOF
902     Defining EMACS_MAJOR_VERSION = $emacs_major_version
903 EOF
904 cat >> confdefs.h <<EOF
905 #define EMACS_MAJOR_VERSION $emacs_major_version
906 EOF
907 }
908
909 { test "$extra_verbose" = "yes" && cat << EOF
910     Defining EMACS_MINOR_VERSION = $emacs_minor_version
911 EOF
912 cat >> confdefs.h <<EOF
913 #define EMACS_MINOR_VERSION $emacs_minor_version
914 EOF
915 }
916
917 if test -n "$emacs_beta_version" ; then
918   if test "$beta" = "yes"; then
919         version="${version}-b${emacs_beta_version}"
920         { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_BETA_VERSION = $emacs_beta_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_BETA_VERSION $emacs_beta_version
925 EOF
926 }
927
928   else
929         version="${version}.${emacs_beta_version}"
930         { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_PATCH_LEVEL $emacs_beta_version
935 EOF
936 }
937
938   fi
939 fi
940 { test "$extra_verbose" = "yes" && cat << EOF
941     Defining XEMACS_CODENAME = "$xemacs_codename"
942 EOF
943 cat >> confdefs.h <<EOF
944 #define XEMACS_CODENAME "$xemacs_codename"
945 EOF
946 }
947
948 { test "$extra_verbose" = "yes" && cat << EOF
949     Defining EMACS_VERSION = "$version"
950 EOF
951 cat >> confdefs.h <<EOF
952 #define EMACS_VERSION "$version"
953 EOF
954 }
955
956
957 if test "$with_infodock" = "yes"; then
958   if test ! -f ../../ID-INSTALL; then
959     echo "Cannot build InfoDock without InfoDock sources"
960     with_infodock=no
961   fi
962 fi
963
964 if test "$with_infodock" = "yes"; then
965       { test "$extra_verbose" = "yes" && cat << EOF
966     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
967 EOF
968 cat >> confdefs.h <<EOF
969 #define INFODOCK_MAJOR_VERSION $infodock_major_version
970 EOF
971 }
972
973   { test "$extra_verbose" = "yes" && cat << EOF
974     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
975 EOF
976 cat >> confdefs.h <<EOF
977 #define INFODOCK_MINOR_VERSION $infodock_minor_version
978 EOF
979 }
980
981   { test "$extra_verbose" = "yes" && cat << EOF
982     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
983 EOF
984 cat >> confdefs.h <<EOF
985 #define INFODOCK_BUILD_VERSION $infodock_build_version
986 EOF
987 }
988
989   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
990   PROGNAME=infodock
991   CPPFLAGS="$CPPFLAGS -DINFODOCK"
992 else
993   PROGNAME=xemacs
994 fi
995
996 { test "$extra_verbose" = "yes" && cat << EOF
997     Defining EMACS_PROGNAME = "$PROGNAME"
998 EOF
999 cat >> confdefs.h <<EOF
1000 #define EMACS_PROGNAME "$PROGNAME"
1001 EOF
1002 }
1003
1004
1005 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1006 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1007     Defining ERROR_CHECK_EXTENTS
1008 EOF
1009 cat >> confdefs.h <<\EOF
1010 #define ERROR_CHECK_EXTENTS 1
1011 EOF
1012 }
1013
1014 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining ERROR_CHECK_TYPECHECK
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define ERROR_CHECK_TYPECHECK 1
1019 EOF
1020 }
1021
1022 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1023     Defining ERROR_CHECK_BUFPOS
1024 EOF
1025 cat >> confdefs.h <<\EOF
1026 #define ERROR_CHECK_BUFPOS 1
1027 EOF
1028 }
1029
1030 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_GC
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_GC 1
1035 EOF
1036 }
1037
1038 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_MALLOC
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_MALLOC 1
1043 EOF
1044 }
1045
1046 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_BYTE_CODE
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_BYTE_CODE 1
1051 EOF
1052 }
1053
1054 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_GLYPHS
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_GLYPHS 1
1059 EOF
1060 }
1061
1062 if test "${debug:=$beta}" = "yes"; then
1063   use_assertions=yes memory_usage_stats=yes
1064   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1065    echo "    xemacs will be linked with \"debug.o\""
1066  fi
1067   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1068    echo "    xemacs will be linked with \"tests.o\""
1069  fi
1070   { test "$extra_verbose" = "yes" && cat << \EOF
1071     Defining DEBUG_XEMACS
1072 EOF
1073 cat >> confdefs.h <<\EOF
1074 #define DEBUG_XEMACS 1
1075 EOF
1076 }
1077
1078 fi
1079 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1080     Defining USE_ASSERTIONS
1081 EOF
1082 cat >> confdefs.h <<\EOF
1083 #define USE_ASSERTIONS 1
1084 EOF
1085 }
1086
1087 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1088     Defining MEMORY_USAGE_STATS
1089 EOF
1090 cat >> confdefs.h <<\EOF
1091 #define MEMORY_USAGE_STATS 1
1092 EOF
1093 }
1094
1095
1096
1097 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1098 echo "configure:1099: checking "host system type"" >&5
1099 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1100 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1101 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1102 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1103 echo "$ac_t""$configuration" 1>&6
1104
1105
1106
1107
1108
1109 machine='' opsys=''
1110
1111 case "$canonical" in
1112   sparc-*-*        ) machine=sparc ;;
1113   alpha*-*-*       ) machine=alpha ;;
1114   vax-*-*          ) machine=vax ;;
1115   mips-dec-*       ) machine=pmax ;;
1116   mips-sgi-irix6*  ) machine=iris6d ;;
1117   mips-sgi-*       ) machine=iris4d ;;
1118   mips*-linux      ) machine=mips ;;
1119   romp-ibm-*       ) machine=ibmrt ;;
1120   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1121   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1122   powerpc*-*       ) machine=powerpc ;;
1123   hppa-*-*         ) machine=hp800 ;;
1124   m88k-dg-*        ) machine=aviion ;;
1125   m68*-sony-*      ) machine=news ;;
1126   mips-sony-*      ) machine=news-risc ;;
1127   clipper-*        ) machine=clipper ;;
1128   arm*             ) machine=arm ;;
1129   ns32k-*          ) machine=ns32000 ;;
1130   s390-*           ) machine=s390 ;;
1131 esac
1132
1133 case "$canonical" in
1134   *-*-linux*    ) opsys=linux ;;
1135   *-*-netbsd*   ) opsys=netbsd ;;
1136   *-*-openbsd*  ) opsys=openbsd ;;
1137   *-*-nextstep* ) opsys=nextstep ;;
1138   *-*-vms       ) opsys=vms ;;
1139
1140     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1141   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1142   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1143   *-dec-osf3*                ) opsys=decosf3-1 ;;
1144   *-dec-osf4*                ) opsys=decosf4-0 ;;
1145
1146     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1147   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1148   *-*-ultrix* )         opsys=ultrix4-3 ;;
1149
1150     *-*-aix3.1*  ) opsys=aix3-1 ;;
1151   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1152   *-*-aix3*    ) opsys=aix3-2   ;;
1153   *-*-aix4.0*  ) opsys=aix4     ;;
1154   *-*-aix4.1*  ) opsys=aix4-1   ;;
1155   *-*-aix4*    ) opsys=aix4-2   ;;
1156
1157     *-gnu* )                    opsys=gnu    ;;
1158   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1159   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1160   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1161   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1162   *-*-aos*   )                  opsys=bsd4-3 ;;
1163   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1164   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1165   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1166   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1167   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1168   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1169         if test -z "$NON_GNU_CPP" ; then
1170           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1171             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1172           done
1173         fi
1174         opsys=usg5-4-2 ;;
1175     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1176     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1177 esac
1178
1179 case "$canonical" in
1180
1181     *-*-netbsd* )
1182     case "$canonical" in
1183       i[3-9]86-*-netbsd*) machine=intel386 ;;
1184       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1185                                             machine=hp9000s300 ;;
1186       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1187       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1188     esac
1189   ;;
1190
1191     *-*-openbsd* )
1192     case "${canonical}" in
1193       i386-*-openbsd*)          machine=intel386 ;;
1194       m68k-*-openbsd*)          machine=hp9000s300 ;;
1195       mipsel-*-openbsd*)        machine=pmax ;;
1196      esac
1197    ;;
1198
1199     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1200   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1201
1202     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1203   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1204
1205     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1206
1207     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1208
1209     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1210
1211     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1212
1213     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1214
1215     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1216   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1217   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1218
1219   
1220     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1221
1222     *-convex-bsd* | *-convex-convexos* )
1223     machine=convex opsys=bsd4-3
1224     NON_GNU_CPP="cc -E -P"
1225   ;;
1226
1227     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1228
1229     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1230   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1231   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1232   m88k-dg-dgux*                           ) opsys=dgux     ;;
1233
1234     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1235   m88k-motorola-sysv4* )
1236                     machine=delta88k opsys=usg5-4-2
1237   ;;
1238   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1239
1240     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1241   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1242
1243     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1244
1245     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1246   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1247   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1248
1249       m88k-harris-cxux* )
1250         case "`uname -r`" in
1251        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1252        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1253     esac
1254     NON_GNU_CPP="/lib/cpp"
1255   ;;
1256     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1257     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1258
1259     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1260
1261     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1262
1263     *-hp-hpux* )
1264         case "$canonical" in
1265       m68*  ) machine=hp9000s300 ;;
1266       hppa* ) machine=hp800      ;;
1267     esac
1268
1269     case "$canonical" in
1270       *-hp-hpux7*  )  opsys=hpux   ;;
1271       *-hp-hpux8*  )  opsys=hpux8  ;;
1272       *-hp-hpux9*  )  opsys=hpux9  ;;
1273       *-hp-hpux10* )  opsys=hpux10 ;;
1274       *-hp-hpux11* )  opsys=hpux11 ;;
1275       *            )  opsys=hpux   ;;
1276     esac
1277
1278         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1279    echo "    xemacs will be linked with \"strcat.o\""
1280  fi ;; esac
1281
1282     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1283         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1284     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1285
1286     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1287   ;;
1288
1289     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1290   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1291
1292     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1293   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1294   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1295   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1296   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1297   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1298
1299     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1300   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1301
1302     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1303
1304     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1305
1306     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1307
1308     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1309
1310       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1311
1312     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1313
1314     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1315
1316     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1317
1318     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1319
1320         mips-mips-usg* ) machine=mips4 ;;
1321   mips-mips-riscos4 )
1322     machine=mips4
1323     NON_GNU_CC="cc -systype bsd43"
1324     NON_GNU_CPP="cc -systype bsd43 -E"
1325     case "$canonical" in
1326       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1327       mips-mips-riscos5* ) opsys=riscos5 ;;
1328     esac
1329   ;;
1330   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1331   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1332
1333     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1334
1335     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1336
1337     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1338   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1339
1340     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1341
1342     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1343
1344     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1345
1346     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1347
1348     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1349   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1350
1351     mips-siemens-sysv* | mips-sni-sysv*)
1352     machine=mips-siemens opsys=usg5-4
1353     NON_GNU_CC=/usr/ccs/bin/cc
1354     NON_GNU_CPP=/usr/ccs/lib/cpp
1355   ;;
1356
1357     mips-nec-sysv*)
1358     machine=mips-nec
1359     NON_GNU_CC=/usr/ccs/bin/cc
1360     NON_GNU_CPP=/usr/ccs/lib/cpp
1361   ;;
1362
1363       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1364   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1365     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1366   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1367   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1368   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1369   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1370   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1371   mips-sgi-irix*      ) opsys=irix5-0 ;;
1372
1373     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1374   *-sony-news* ) opsys=newsos5 ;;
1375
1376     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1377
1378     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1379         case "$canonical" in
1380       m68*-sunos1* )             machine=sun1     ;;
1381       m68*-sunos2* )             machine=sun2     ;;
1382       m68* )                     machine=sun3     ;;
1383       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1384       i*86-*-* )                 machine=intel386 ;;
1385       rs6000* )                  machine=rs6000   ;;
1386     esac
1387
1388         case "$canonical" in *-sunos5*)
1389       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1390     esac
1391
1392                     case "$canonical" in
1393       *-sunos4* )
1394         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1395         : ;;
1396       *-solaris2* )
1397         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1398         RANLIB=':' ;;
1399     esac
1400
1401     case "$canonical" in
1402       *-solaris*          )
1403         opsys=sol2
1404         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1405         { test "$extra_verbose" = "yes" && cat << EOF
1406     Defining OS_RELEASE = $os_release
1407 EOF
1408 cat >> confdefs.h <<EOF
1409 #define OS_RELEASE $os_release
1410 EOF
1411 }
1412  ;;
1413
1414             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1415       *-sunos4.0*         ) opsys=sunos4-0      ;;
1416       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1417       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1418       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1419       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1420       *-mach*             ) opsys=mach-bsd4-3   ;;
1421       *                   ) opsys=bsd4-2        ;;
1422     esac
1423
1424     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1425
1426         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1427   ;;
1428
1429     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1430
1431     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1432   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1433
1434     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1435
1436     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1437
1438     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1439       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1440
1441     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1442
1443     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1444
1445     vax-dec-* )
1446     case "$canonical" in
1447       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1448       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1449       *-mach* )                         opsys=mach-bsd4-3 ;;
1450     esac
1451   ;;
1452
1453     ns16k-whitechapel-* ) machine=mg1 ;;
1454
1455     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1456
1457     i[3-9]86-*-* )
1458     machine=intel386
1459     case "$canonical" in
1460       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1461       *-isc2.2* )               opsys=isc2-2 ;;
1462       *-isc4.0* )               opsys=isc4-0 ;;
1463       *-isc4.* )                opsys=isc4-1
1464                                 GCC_TEST_OPTIONS=-posix
1465                                 NON_GCC_TEST_OPTIONS=-Xp
1466                                 ;;
1467       *-isc* )                  opsys=isc3-0 ;;
1468       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1469       *-esix* )                 opsys=esix ;;
1470       *-mach* )                 opsys=mach-bsd4-3 ;;
1471       *-xenix* )                opsys=xenix ;;
1472       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1473       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1474       *-bsdi4* )                opsys=bsdos4 ;;
1475       *-bsdi3* )                opsys=bsdos3 ;;
1476       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1477       *-bsdi2* )                opsys=bsdos2 ;;
1478       *-sco3.2v5* )             opsys=sco5 ;
1479                                                         if test "$dynamic" = "yes" ; then
1480                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1481         else
1482                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1483         fi ;;
1484       *-sysv5* )                opsys=sco7 ;;
1485       *-386bsd* )               opsys=386bsd ;;
1486       *-freebsd* )              opsys=freebsd ;;
1487       *-nextstep* )             opsys=nextstep ;;
1488       *-pc-cygwin* )            opsys=cygwin32 ;;
1489       *-pc-mingw* )             opsys=mingw32 ;
1490                                 test -z "$with_tty" && with_tty="no";;
1491           esac
1492   ;;
1493
1494     m68k-*-linux* ) machine=m68k opsys=linux ;;
1495
1496 esac
1497
1498 if test -z "$machine" -o -z "$opsys"; then
1499   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1500    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1501   ) >&2
1502   exit 1
1503 fi
1504
1505 if test -z "$dynamic"; then
1506   case "$opsys" in
1507     hpux* | sunos4* ) dynamic=no ;;
1508     *) dynamic=yes ;;
1509   esac
1510 fi
1511 if test "$dynamic" = "yes"; then
1512   case "$opsys" in
1513     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1514     decosf* ) ld_call_shared="-call_shared" ;;
1515   esac
1516 else   case "$opsys" in
1517     sol2 )
1518       echo "Static linking is not supported on Solaris 2."
1519       echo "Rerun configure without specifying --dynamic=no."
1520       exit 1 ;;
1521     linux   ) ld_call_shared="-Bstatic" ;;
1522     decosf* ) ld_call_shared="-non_shared" ;;
1523   esac
1524 fi
1525
1526 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1527
1528 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1529 { test "$extra_verbose" = "yes" && cat << EOF
1530     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1531 EOF
1532 cat >> confdefs.h <<EOF
1533 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1534 EOF
1535 }
1536
1537
1538 machfile="m/${machine}.h"
1539 opsysfile="s/${opsys}.h"
1540
1541
1542 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1543 if test "$with_workshop $with_tooltalk" = "yes no"; then
1544   (echo "$progname: Usage error:"
1545 echo " " "--with-workshop requires --with-tooltalk"
1546 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1547 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1548 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1549 fi
1550
1551 if test "$with_workshop" = "yes"; then
1552   { test "$extra_verbose" = "yes" && cat << \EOF
1553     Defining SUNPRO
1554 EOF
1555 cat >> confdefs.h <<\EOF
1556 #define SUNPRO 1
1557 EOF
1558 }
1559
1560   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1561    echo "    xemacs will be linked with \"sunpro.o\""
1562  fi
1563 fi
1564
1565 if test "$with_clash_detection" != "no"; then
1566   { test "$extra_verbose" = "yes" && cat << \EOF
1567     Defining CLASH_DETECTION
1568 EOF
1569 cat >> confdefs.h <<\EOF
1570 #define CLASH_DETECTION 1
1571 EOF
1572 }
1573
1574   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1575    echo "    xemacs will be linked with \"filelock.o\""
1576  fi
1577 fi
1578
1579 test -n "$compiler" && CC="$compiler"
1580 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1581 fi
1582
1583 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1584 if test "${CFLAGS-unset}" != unset
1585   then cflags_specified=yes;
1586   else cflags_specified=no;
1587 fi
1588
1589 xe_save_CFLAGS="$CFLAGS"
1590
1591 # Extract the first word of "gcc", so it can be a program name with args.
1592 set dummy gcc; ac_word=$2
1593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1594 echo "configure:1595: checking for $ac_word" >&5
1595
1596 if test -n "$CC"; then
1597   ac_cv_prog_CC="$CC" # Let the user override the test.
1598 else
1599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1600   ac_dummy="$PATH"
1601   for ac_dir in $ac_dummy; do
1602     test -z "$ac_dir" && ac_dir=.
1603     if test -f $ac_dir/$ac_word; then
1604       ac_cv_prog_CC="gcc"
1605       break
1606     fi
1607   done
1608   IFS="$ac_save_ifs"
1609 fi
1610 CC="$ac_cv_prog_CC"
1611 if test -n "$CC"; then
1612   echo "$ac_t""$CC" 1>&6
1613 else
1614   echo "$ac_t""no" 1>&6
1615 fi
1616
1617 if test -z "$CC"; then
1618   # Extract the first word of "cc", so it can be a program name with args.
1619 set dummy cc; ac_word=$2
1620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1621 echo "configure:1622: checking for $ac_word" >&5
1622
1623 if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1627   ac_prog_rejected=no
1628   ac_dummy="$PATH"
1629   for ac_dir in $ac_dummy; do
1630     test -z "$ac_dir" && ac_dir=.
1631     if test -f $ac_dir/$ac_word; then
1632       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1633         ac_prog_rejected=yes
1634         continue
1635       fi
1636       ac_cv_prog_CC="cc"
1637       break
1638     fi
1639   done
1640   IFS="$ac_save_ifs"
1641 if test $ac_prog_rejected = yes; then
1642   # We found a bogon in the path, so make sure we never use it.
1643   set dummy $ac_cv_prog_CC
1644   shift
1645   if test $# -gt 0; then
1646     # We chose a different compiler from the bogus one.
1647     # However, it has the same basename, so the bogon will be chosen
1648     # first if we set CC to just the basename; use the full file name.
1649     shift
1650     set dummy "$ac_dir/$ac_word" "$@"
1651     shift
1652     ac_cv_prog_CC="$@"
1653   fi
1654 fi
1655 fi
1656 CC="$ac_cv_prog_CC"
1657 if test -n "$CC"; then
1658   echo "$ac_t""$CC" 1>&6
1659 else
1660   echo "$ac_t""no" 1>&6
1661 fi
1662
1663   if test -z "$CC"; then
1664     case "`uname -s`" in
1665     *win32* | *WIN32*)
1666       # Extract the first word of "cl", so it can be a program name with args.
1667 set dummy cl; ac_word=$2
1668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1669 echo "configure:1670: checking for $ac_word" >&5
1670
1671 if test -n "$CC"; then
1672   ac_cv_prog_CC="$CC" # Let the user override the test.
1673 else
1674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1675   ac_dummy="$PATH"
1676   for ac_dir in $ac_dummy; do
1677     test -z "$ac_dir" && ac_dir=.
1678     if test -f $ac_dir/$ac_word; then
1679       ac_cv_prog_CC="cl"
1680       break
1681     fi
1682   done
1683   IFS="$ac_save_ifs"
1684 fi
1685 CC="$ac_cv_prog_CC"
1686 if test -n "$CC"; then
1687   echo "$ac_t""$CC" 1>&6
1688 else
1689   echo "$ac_t""no" 1>&6
1690 fi
1691  ;;
1692     esac
1693   fi
1694   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1695 fi
1696
1697 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1698 echo "configure:1699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1699
1700 ac_ext=c
1701 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1702 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1703 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1704 ac_cpp='$CPP '"$xe_cppflags"
1705 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1706 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1707 cross_compiling=no
1708
1709 cat > conftest.$ac_ext << EOF
1710
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713
1714 main(){return(0);}
1715 EOF
1716 if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1717   ac_cv_prog_cc_works=yes
1718   # If we can't run a trivial program, we are probably using a cross compiler.
1719   if (./conftest; exit) 2>/dev/null; then
1720     ac_cv_prog_cc_cross=no
1721   else
1722     ac_cv_prog_cc_cross=yes
1723   fi
1724 else
1725   echo "configure: failed program was:" >&5
1726   cat conftest.$ac_ext >&5
1727   ac_cv_prog_cc_works=no
1728 fi
1729 rm -fr conftest*
1730 ac_ext=c
1731 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1732 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1733 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1734 ac_cpp='$CPP '"$xe_cppflags"
1735 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1736 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1737 cross_compiling=no
1738
1739 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1740 if test $ac_cv_prog_cc_works = no; then
1741   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1742 fi
1743 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1744 echo "configure:1745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1745 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1746 cross_compiling=$ac_cv_prog_cc_cross
1747
1748 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1749 echo "configure:1750: checking whether we are using GNU C" >&5
1750
1751 cat > conftest.c <<EOF
1752 #ifdef __GNUC__
1753   yes;
1754 #endif
1755 EOF
1756 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1757   ac_cv_prog_gcc=yes
1758 else
1759   ac_cv_prog_gcc=no
1760 fi
1761
1762 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1763
1764 if test $ac_cv_prog_gcc = yes; then
1765   GCC=yes
1766 else
1767   GCC=
1768 fi
1769
1770 ac_test_CFLAGS="${CFLAGS+set}"
1771 ac_save_CFLAGS="$CFLAGS"
1772 CFLAGS=
1773 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether ${CC-cc} accepts -g" >&5
1775
1776 echo 'void f(){}' > conftest.c
1777 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1778   ac_cv_prog_cc_g=yes
1779 else
1780   ac_cv_prog_cc_g=no
1781 fi
1782 rm -f conftest*
1783
1784
1785 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1786 if test "$ac_test_CFLAGS" = set; then
1787   CFLAGS="$ac_save_CFLAGS"
1788 elif test $ac_cv_prog_cc_g = yes; then
1789   if test "$GCC" = yes; then
1790     CFLAGS="-g -O2"
1791   else
1792     CFLAGS="-g"
1793   fi
1794 else
1795   if test "$GCC" = yes; then
1796     CFLAGS="-O2"
1797   else
1798     CFLAGS=
1799   fi
1800 fi
1801  
1802 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1803   CC=${NON_GNU_CC-cc}
1804   # Extract the first word of "gcc", so it can be a program name with args.
1805 set dummy gcc; ac_word=$2
1806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1807 echo "configure:1808: checking for $ac_word" >&5
1808
1809 if test -n "$CC"; then
1810   ac_cv_prog_CC="$CC" # Let the user override the test.
1811 else
1812   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1813   ac_dummy="$PATH"
1814   for ac_dir in $ac_dummy; do
1815     test -z "$ac_dir" && ac_dir=.
1816     if test -f $ac_dir/$ac_word; then
1817       ac_cv_prog_CC="gcc"
1818       break
1819     fi
1820   done
1821   IFS="$ac_save_ifs"
1822 fi
1823 CC="$ac_cv_prog_CC"
1824 if test -n "$CC"; then
1825   echo "$ac_t""$CC" 1>&6
1826 else
1827   echo "$ac_t""no" 1>&6
1828 fi
1829
1830 if test -z "$CC"; then
1831   # Extract the first word of "cc", so it can be a program name with args.
1832 set dummy cc; ac_word=$2
1833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1834 echo "configure:1835: checking for $ac_word" >&5
1835
1836 if test -n "$CC"; then
1837   ac_cv_prog_CC="$CC" # Let the user override the test.
1838 else
1839   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1840   ac_prog_rejected=no
1841   ac_dummy="$PATH"
1842   for ac_dir in $ac_dummy; do
1843     test -z "$ac_dir" && ac_dir=.
1844     if test -f $ac_dir/$ac_word; then
1845       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1846         ac_prog_rejected=yes
1847         continue
1848       fi
1849       ac_cv_prog_CC="cc"
1850       break
1851     fi
1852   done
1853   IFS="$ac_save_ifs"
1854 if test $ac_prog_rejected = yes; then
1855   # We found a bogon in the path, so make sure we never use it.
1856   set dummy $ac_cv_prog_CC
1857   shift
1858   if test $# -gt 0; then
1859     # We chose a different compiler from the bogus one.
1860     # However, it has the same basename, so the bogon will be chosen
1861     # first if we set CC to just the basename; use the full file name.
1862     shift
1863     set dummy "$ac_dir/$ac_word" "$@"
1864     shift
1865     ac_cv_prog_CC="$@"
1866   fi
1867 fi
1868 fi
1869 CC="$ac_cv_prog_CC"
1870 if test -n "$CC"; then
1871   echo "$ac_t""$CC" 1>&6
1872 else
1873   echo "$ac_t""no" 1>&6
1874 fi
1875
1876   if test -z "$CC"; then
1877     case "`uname -s`" in
1878     *win32* | *WIN32*)
1879       # Extract the first word of "cl", so it can be a program name with args.
1880 set dummy cl; ac_word=$2
1881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1882 echo "configure:1883: checking for $ac_word" >&5
1883
1884 if test -n "$CC"; then
1885   ac_cv_prog_CC="$CC" # Let the user override the test.
1886 else
1887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1888   ac_dummy="$PATH"
1889   for ac_dir in $ac_dummy; do
1890     test -z "$ac_dir" && ac_dir=.
1891     if test -f $ac_dir/$ac_word; then
1892       ac_cv_prog_CC="cl"
1893       break
1894     fi
1895   done
1896   IFS="$ac_save_ifs"
1897 fi
1898 CC="$ac_cv_prog_CC"
1899 if test -n "$CC"; then
1900   echo "$ac_t""$CC" 1>&6
1901 else
1902   echo "$ac_t""no" 1>&6
1903 fi
1904  ;;
1905     esac
1906   fi
1907   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1908 fi
1909
1910 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1911 echo "configure:1912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1912
1913 ac_ext=c
1914 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1915 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1916 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1917 ac_cpp='$CPP '"$xe_cppflags"
1918 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1919 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1920 cross_compiling=no
1921
1922 cat > conftest.$ac_ext << EOF
1923
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926
1927 main(){return(0);}
1928 EOF
1929 if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1930   ac_cv_prog_cc_works=yes
1931   # If we can't run a trivial program, we are probably using a cross compiler.
1932   if (./conftest; exit) 2>/dev/null; then
1933     ac_cv_prog_cc_cross=no
1934   else
1935     ac_cv_prog_cc_cross=yes
1936   fi
1937 else
1938   echo "configure: failed program was:" >&5
1939   cat conftest.$ac_ext >&5
1940   ac_cv_prog_cc_works=no
1941 fi
1942 rm -fr conftest*
1943 ac_ext=c
1944 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1945 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1946 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1947 ac_cpp='$CPP '"$xe_cppflags"
1948 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1949 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1950 cross_compiling=no
1951
1952 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1953 if test $ac_cv_prog_cc_works = no; then
1954   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1955 fi
1956 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1957 echo "configure:1958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1958 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1959 cross_compiling=$ac_cv_prog_cc_cross
1960
1961 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1962 echo "configure:1963: checking whether we are using GNU C" >&5
1963
1964 cat > conftest.c <<EOF
1965 #ifdef __GNUC__
1966   yes;
1967 #endif
1968 EOF
1969 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1970   ac_cv_prog_gcc=yes
1971 else
1972   ac_cv_prog_gcc=no
1973 fi
1974
1975 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1976
1977 if test $ac_cv_prog_gcc = yes; then
1978   GCC=yes
1979 else
1980   GCC=
1981 fi
1982
1983 ac_test_CFLAGS="${CFLAGS+set}"
1984 ac_save_CFLAGS="$CFLAGS"
1985 CFLAGS=
1986 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1987 echo "configure:1988: checking whether ${CC-cc} accepts -g" >&5
1988
1989 echo 'void f(){}' > conftest.c
1990 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1991   ac_cv_prog_cc_g=yes
1992 else
1993   ac_cv_prog_cc_g=no
1994 fi
1995 rm -f conftest*
1996
1997
1998 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1999 if test "$ac_test_CFLAGS" = set; then
2000   CFLAGS="$ac_save_CFLAGS"
2001 elif test $ac_cv_prog_cc_g = yes; then
2002   if test "$GCC" = yes; then
2003     CFLAGS="-g -O2"
2004   else
2005     CFLAGS="-g"
2006   fi
2007 else
2008   if test "$GCC" = yes; then
2009     CFLAGS="-O2"
2010   else
2011     CFLAGS=
2012   fi
2013 fi
2014
2015 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2016   CC=gcc
2017   # Extract the first word of "gcc", so it can be a program name with args.
2018 set dummy gcc; ac_word=$2
2019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2020 echo "configure:2021: checking for $ac_word" >&5
2021
2022 if test -n "$CC"; then
2023   ac_cv_prog_CC="$CC" # Let the user override the test.
2024 else
2025   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2026   ac_dummy="$PATH"
2027   for ac_dir in $ac_dummy; do
2028     test -z "$ac_dir" && ac_dir=.
2029     if test -f $ac_dir/$ac_word; then
2030       ac_cv_prog_CC="gcc"
2031       break
2032     fi
2033   done
2034   IFS="$ac_save_ifs"
2035 fi
2036 CC="$ac_cv_prog_CC"
2037 if test -n "$CC"; then
2038   echo "$ac_t""$CC" 1>&6
2039 else
2040   echo "$ac_t""no" 1>&6
2041 fi
2042
2043 if test -z "$CC"; then
2044   # Extract the first word of "cc", so it can be a program name with args.
2045 set dummy cc; ac_word=$2
2046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_word" >&5
2048
2049 if test -n "$CC"; then
2050   ac_cv_prog_CC="$CC" # Let the user override the test.
2051 else
2052   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2053   ac_prog_rejected=no
2054   ac_dummy="$PATH"
2055   for ac_dir in $ac_dummy; do
2056     test -z "$ac_dir" && ac_dir=.
2057     if test -f $ac_dir/$ac_word; then
2058       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2059         ac_prog_rejected=yes
2060         continue
2061       fi
2062       ac_cv_prog_CC="cc"
2063       break
2064     fi
2065   done
2066   IFS="$ac_save_ifs"
2067 if test $ac_prog_rejected = yes; then
2068   # We found a bogon in the path, so make sure we never use it.
2069   set dummy $ac_cv_prog_CC
2070   shift
2071   if test $# -gt 0; then
2072     # We chose a different compiler from the bogus one.
2073     # However, it has the same basename, so the bogon will be chosen
2074     # first if we set CC to just the basename; use the full file name.
2075     shift
2076     set dummy "$ac_dir/$ac_word" "$@"
2077     shift
2078     ac_cv_prog_CC="$@"
2079   fi
2080 fi
2081 fi
2082 CC="$ac_cv_prog_CC"
2083 if test -n "$CC"; then
2084   echo "$ac_t""$CC" 1>&6
2085 else
2086   echo "$ac_t""no" 1>&6
2087 fi
2088
2089   if test -z "$CC"; then
2090     case "`uname -s`" in
2091     *win32* | *WIN32*)
2092       # Extract the first word of "cl", so it can be a program name with args.
2093 set dummy cl; ac_word=$2
2094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2095 echo "configure:2096: checking for $ac_word" >&5
2096
2097 if test -n "$CC"; then
2098   ac_cv_prog_CC="$CC" # Let the user override the test.
2099 else
2100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2101   ac_dummy="$PATH"
2102   for ac_dir in $ac_dummy; do
2103     test -z "$ac_dir" && ac_dir=.
2104     if test -f $ac_dir/$ac_word; then
2105       ac_cv_prog_CC="cl"
2106       break
2107     fi
2108   done
2109   IFS="$ac_save_ifs"
2110 fi
2111 CC="$ac_cv_prog_CC"
2112 if test -n "$CC"; then
2113   echo "$ac_t""$CC" 1>&6
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117  ;;
2118     esac
2119   fi
2120   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2121 fi
2122
2123 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2124 echo "configure:2125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2125
2126 ac_ext=c
2127 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2128 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2129 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2130 ac_cpp='$CPP '"$xe_cppflags"
2131 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2132 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2133 cross_compiling=no
2134
2135 cat > conftest.$ac_ext << EOF
2136
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139
2140 main(){return(0);}
2141 EOF
2142 if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2143   ac_cv_prog_cc_works=yes
2144   # If we can't run a trivial program, we are probably using a cross compiler.
2145   if (./conftest; exit) 2>/dev/null; then
2146     ac_cv_prog_cc_cross=no
2147   else
2148     ac_cv_prog_cc_cross=yes
2149   fi
2150 else
2151   echo "configure: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   ac_cv_prog_cc_works=no
2154 fi
2155 rm -fr conftest*
2156 ac_ext=c
2157 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2158 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2159 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2160 ac_cpp='$CPP '"$xe_cppflags"
2161 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2162 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2163 cross_compiling=no
2164
2165 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2166 if test $ac_cv_prog_cc_works = no; then
2167   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2168 fi
2169 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2170 echo "configure:2171: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2171 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2172 cross_compiling=$ac_cv_prog_cc_cross
2173
2174 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2175 echo "configure:2176: checking whether we are using GNU C" >&5
2176
2177 cat > conftest.c <<EOF
2178 #ifdef __GNUC__
2179   yes;
2180 #endif
2181 EOF
2182 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2183   ac_cv_prog_gcc=yes
2184 else
2185   ac_cv_prog_gcc=no
2186 fi
2187
2188 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2189
2190 if test $ac_cv_prog_gcc = yes; then
2191   GCC=yes
2192 else
2193   GCC=
2194 fi
2195
2196 ac_test_CFLAGS="${CFLAGS+set}"
2197 ac_save_CFLAGS="$CFLAGS"
2198 CFLAGS=
2199 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2200 echo "configure:2201: checking whether ${CC-cc} accepts -g" >&5
2201
2202 echo 'void f(){}' > conftest.c
2203 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2204   ac_cv_prog_cc_g=yes
2205 else
2206   ac_cv_prog_cc_g=no
2207 fi
2208 rm -f conftest*
2209
2210
2211 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2212 if test "$ac_test_CFLAGS" = set; then
2213   CFLAGS="$ac_save_CFLAGS"
2214 elif test $ac_cv_prog_cc_g = yes; then
2215   if test "$GCC" = yes; then
2216     CFLAGS="-g -O2"
2217   else
2218     CFLAGS="-g"
2219   fi
2220 else
2221   if test "$GCC" = yes; then
2222     CFLAGS="-O2"
2223   else
2224     CFLAGS=
2225   fi
2226 fi
2227
2228 fi
2229 CFLAGS="$xe_save_CFLAGS"
2230
2231
2232 test -n "$CPP" -a -d "$CPP" && CPP=
2233
2234 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2235
2236 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2237 echo "configure:2238: checking how to run the C preprocessor" >&5
2238 # On Suns, sometimes $CPP names a directory.
2239 if test -n "$CPP" && test -d "$CPP"; then
2240   CPP=
2241 fi
2242 if test -z "$CPP"; then
2243
2244   # This must be in double quotes, not single quotes, because CPP may get
2245   # substituted into the Makefile and "${CC-cc}" will confuse make.
2246   CPP="${CC-cc} -E"
2247   # On the NeXT, cc -E runs the code through the compiler's parser,
2248   # not just through cpp.
2249   cat > conftest.$ac_ext <<EOF
2250 #line 2251 "configure"
2251 #include "confdefs.h"
2252 #include <assert.h>
2253 Syntax Error
2254 EOF
2255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2256 { (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2258 if test -z "$ac_err"; then
2259   :
2260 else
2261   echo "$ac_err" >&5
2262   echo "configure: failed program was:" >&5
2263   cat conftest.$ac_ext >&5
2264   rm -rf conftest*
2265   CPP="${CC-cc} -E -traditional-cpp"
2266   cat > conftest.$ac_ext <<EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2269 #include <assert.h>
2270 Syntax Error
2271 EOF
2272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2273 { (eval echo configure:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2275 if test -z "$ac_err"; then
2276   :
2277 else
2278   echo "$ac_err" >&5
2279   echo "configure: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   rm -rf conftest*
2282   CPP="${CC-cc} -nologo -E"
2283   cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <assert.h>
2287 Syntax Error
2288 EOF
2289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2290 { (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2292 if test -z "$ac_err"; then
2293   :
2294 else
2295   echo "$ac_err" >&5
2296   echo "configure: failed program was:" >&5
2297   cat conftest.$ac_ext >&5
2298   rm -rf conftest*
2299   CPP=/lib/cpp
2300 fi
2301 rm -f conftest*
2302 fi
2303 rm -f conftest*
2304 fi
2305 rm -f conftest*
2306   ac_cv_prog_CPP="$CPP"
2307   CPP="$ac_cv_prog_CPP"
2308 else
2309   ac_cv_prog_CPP="$CPP"
2310 fi
2311 echo "$ac_t""$CPP" 1>&6
2312
2313
2314
2315 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2316 echo "configure:2317: checking for AIX" >&5
2317 cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #ifdef _AIX
2321   yes
2322 #endif
2323
2324 EOF
2325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2326   egrep "yes" >/dev/null 2>&1; then
2327   rm -rf conftest*
2328   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2329     Defining _ALL_SOURCE
2330 EOF
2331 cat >> confdefs.h <<\EOF
2332 #define _ALL_SOURCE 1
2333 EOF
2334 }
2335
2336 else
2337   rm -rf conftest*
2338   echo "$ac_t""no" 1>&6
2339 fi
2340 rm -f conftest*
2341
2342  
2343
2344 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2345 echo "configure:2346: checking for GNU libc" >&5
2346 cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <features.h>
2350 int main() {
2351
2352 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2353 #error Not a GNU libc system :-(
2354 ******* ======= ******** &&&&&&&&
2355 #endif
2356
2357 ; return 0; }
2358 EOF
2359 if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2360   rm -rf conftest*
2361   have_glibc=yes
2362 else
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   have_glibc=no
2367 fi
2368 rm -f conftest*
2369 echo "$ac_t""$have_glibc" 1>&6
2370 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2371     Defining _GNU_SOURCE
2372 EOF
2373 cat >> confdefs.h <<\EOF
2374 #define _GNU_SOURCE 1
2375 EOF
2376 }
2377
2378
2379 case "$opsys" in
2380   sol2)
2381    { test "$extra_verbose" = "yes" && cat << \EOF
2382     Defining __EXTENSIONS__
2383 EOF
2384 cat >> confdefs.h <<\EOF
2385 #define __EXTENSIONS__ 1
2386 EOF
2387 }
2388
2389       if test "$os_release" -ge 55; then
2390      { test "$extra_verbose" = "yes" && cat << \EOF
2391     Defining _XOPEN_SOURCE = 500
2392 EOF
2393 cat >> confdefs.h <<\EOF
2394 #define _XOPEN_SOURCE 500
2395 EOF
2396 }
2397
2398      { test "$extra_verbose" = "yes" && cat << \EOF
2399     Defining _XOPEN_SOURCE_EXTENDED
2400 EOF
2401 cat >> confdefs.h <<\EOF
2402 #define _XOPEN_SOURCE_EXTENDED 1
2403 EOF
2404 }
2405
2406    fi ;;
2407   linux)
2408     { test "$extra_verbose" = "yes" && cat << \EOF
2409     Defining _POSIX_C_SOURCE = 199506L
2410 EOF
2411 cat >> confdefs.h <<\EOF
2412 #define _POSIX_C_SOURCE 199506L
2413 EOF
2414 }
2415
2416     { test "$extra_verbose" = "yes" && cat << \EOF
2417     Defining _XOPEN_SOURCE = 500
2418 EOF
2419 cat >> confdefs.h <<\EOF
2420 #define _XOPEN_SOURCE 500
2421 EOF
2422 }
2423
2424     { test "$extra_verbose" = "yes" && cat << \EOF
2425     Defining _XOPEN_SOURCE_EXTENDED
2426 EOF
2427 cat >> confdefs.h <<\EOF
2428 #define _XOPEN_SOURCE_EXTENDED 1
2429 EOF
2430 }
2431
2432     ;;
2433 esac
2434
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 int main () {
2439 #if defined __SUNPRO_C
2440 return 11;
2441 #elif defined __DECC
2442 return 12;
2443 #else
2444 return 0;
2445 #endif
2446 }
2447 EOF
2448 if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2449 then
2450   :
2451 else
2452   conftest_rc="$?"
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -fr conftest*
2456   case "$conftest_rc" in
2457   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2458   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2459 esac
2460 fi
2461 rm -fr conftest*
2462
2463
2464
2465
2466 echo "Extracting information from the machine- and system-dependent headers..."
2467
2468 tempcname="conftest.c"
2469
2470
2471
2472 cat > $tempcname <<EOF
2473 #define NOT_C_CODE
2474 #define C_SWITCH_SITE
2475 #define C_SWITCH_X_SITE
2476 #define LD_SWITCH_SITE
2477 #define LD_SWITCH_X_SITE
2478 #define LD_SWITCH_X_SITE_AUX
2479 #define OS_RELEASE $os_release
2480 #include "$srcdir/src/$opsysfile"
2481 #include "$srcdir/src/$machfile"
2482
2483 #ifndef LIBS_MACHINE
2484 #define LIBS_MACHINE
2485 #endif
2486 configure___ libs_machine=LIBS_MACHINE
2487
2488 #ifndef LIBS_SYSTEM
2489 #define LIBS_SYSTEM
2490 #endif
2491 configure___ libs_system=LIBS_SYSTEM
2492
2493 #ifndef LIBS_TERMCAP
2494 #define LIBS_TERMCAP
2495 #endif
2496 configure___ libs_termcap=LIBS_TERMCAP
2497
2498 #ifndef LIB_STANDARD
2499 #define LIB_STANDARD
2500 #endif
2501 configure___ libs_standard=LIB_STANDARD
2502
2503
2504 #ifndef OBJECTS_MACHINE
2505 #define OBJECTS_MACHINE
2506 #endif
2507 configure___ objects_machine=OBJECTS_MACHINE
2508
2509 #ifndef OBJECTS_SYSTEM
2510 #define OBJECTS_SYSTEM
2511 #endif
2512 configure___ objects_system=OBJECTS_SYSTEM
2513
2514
2515 #ifndef C_SWITCH_MACHINE
2516 #define C_SWITCH_MACHINE
2517 #endif
2518 configure___ c_switch_machine=C_SWITCH_MACHINE
2519
2520 #ifndef C_SWITCH_SYSTEM
2521 #define C_SWITCH_SYSTEM
2522 #endif
2523 configure___ c_switch_system=C_SWITCH_SYSTEM
2524
2525
2526 #ifndef LD_SWITCH_MACHINE
2527 #define LD_SWITCH_MACHINE
2528 #endif
2529 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2530
2531 #ifndef LD_SWITCH_SYSTEM
2532 #define LD_SWITCH_SYSTEM
2533 #endif
2534 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2535
2536
2537 #ifndef UNEXEC
2538 #define UNEXEC "unexec.o"
2539 #endif
2540 configure___ unexec=UNEXEC
2541
2542
2543 #ifndef LD_SWITCH_SHARED
2544 #define LD_SWITCH_SHARED "-c"
2545 #endif
2546 configure___ ld_switch_shared=LD_SWITCH_SHARED
2547
2548
2549 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2550 configure___ ordinary_ld=ORDINARY_LD
2551
2552 #ifdef ORDINARY_LINK
2553 #define LD ORDINARY_LD
2554 #else /* no ORDINARY LINK */
2555 #ifdef COFF_ENCAPSULATE
2556 #define LD "\$(CC) -nostdlib"
2557 #else /* not COFF_ENCAPSULATE */
2558 #ifdef LINKER
2559 #define LD LINKER
2560 #else /* ! defined (LINKER) */
2561 #define LD "ld"
2562 #endif /* ! defined (LINKER) */
2563 #endif /* ! defined (COFF_ENCAPSULATE) */
2564 #endif /* not ORDINARY_LINK */
2565 configure___ ld=LD
2566
2567 #ifndef LIB_GCC
2568 #define LIB_GCC
2569 #endif
2570 configure___ lib_gcc=LIB_GCC
2571
2572 #ifndef LD_TEXT_START_ADDR
2573 #define LD_TEXT_START_ADDR
2574 #endif
2575 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2576
2577
2578 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2579 #ifdef NO_REMAP
2580 #ifdef COFF_ENCAPSULATE
2581 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2582 #else /* ! defined (COFF_ENCAPSULATE) */
2583 #define START_FILES "pre-crt0.o /lib/crt0.o"
2584 #endif /* ! defined (COFF_ENCAPSULATE) */
2585 #else /* ! defined (NO_REMAP) */
2586 #define START_FILES "ecrt0.o"
2587 #endif /* ! defined (NO_REMAP) */
2588 #endif /* no ORDINARY_LINK */
2589 #ifndef START_FILES
2590 #define START_FILES
2591 #endif
2592 configure___ start_files=START_FILES
2593
2594 #ifdef ORDINARY_LINK
2595 configure___ ordinary_link=yes
2596 #else
2597 configure___ ordinary_link=no
2598 #endif
2599
2600 #ifdef SYSTEM_MALLOC
2601 configure___ system_malloc=yes
2602 #else
2603 configure___ system_malloc=no
2604 #endif
2605
2606 #ifdef TERMINFO
2607 configure___ have_terminfo=yes
2608 #else
2609 configure___ have_terminfo=no
2610 #endif
2611
2612 #ifdef MAIL_USE_FLOCK
2613 configure___ mail_use_flock=yes
2614 #else
2615 configure___ mail_use_flock=no
2616 #endif
2617
2618 #ifdef MAIL_USE_LOCKF
2619 configure___ mail_use_lockf=yes
2620 #else
2621 configure___ mail_use_lockf=no
2622 #endif
2623
2624 #ifdef MAIL_USE_LOCKING
2625 configure___ mail_use_locking=yes
2626 #else
2627 configure___ mail_use_locking=no
2628 #endif
2629
2630 #ifdef HAVE_WIN32_PROCESSES
2631 configure___ win32_processes=yes
2632 #else
2633 configure___ win32_processes=no
2634 #endif
2635
2636 EOF
2637
2638 CPP=`eval "echo $CPP $CPPFLAGS"`
2639 eval `$CPP -Isrc $tempcname \
2640         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2641
2642 rm $tempcname
2643
2644 if test "$pdump" = "yes"; then
2645   ordinary_link="yes"
2646   ld="${ordinary_ld}"
2647   start_files=
2648   libs_standard=
2649   unexec=
2650   lib_gcc=
2651 fi
2652
2653 test "$extra_verbose" = "yes" && \
2654   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 ""
2655
2656 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2657         mingw_include=`eval "dirname $mingw_include"` ;
2658         mingw_include="-I$mingw_include/../include/mingw32" ;
2659         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2660 esac
2661
2662 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2663
2664 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2665
2666 if test "$cflags_specified" = "no"; then
2667       if   test "$GCC" = "yes"; then
2668     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2669               elif test "$__SUNPRO_C" = "yes"; then
2670     case "$opsys" in
2671       sol2    ) CFLAGS="-v -xO4" ;;
2672       sunos4* ) CFLAGS="-xO2";;
2673     esac
2674   elif test "$__DECC" = "yes"; then
2675     CFLAGS="-O3"
2676   elif test "$CC" = "xlc"; then
2677     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2678     else
2679     CFLAGS="-O" ;  fi
2680 fi
2681
2682 if test "$GCC" = "yes"; then
2683 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2684 echo "configure:2685: checking for buggy gcc versions" >&5
2685 GCC_VERSION=`$CC --version`
2686 case `uname -s`:`uname -m`:$GCC_VERSION in
2687                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2688                         case "$CFLAGS" in
2689             *-O2*|*-O3*)
2690                 case "$CFLAGS" in
2691                     *-fno-schedule-insns*) ;;
2692                     *)
2693                         echo "$ac_t""Yes" 1>&6
2694                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2695                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2696                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2697                         ;;
2698                 esac
2699                 ;;
2700         esac
2701         ;;
2702                     Linux:alpha:egcs-2.91.*)
2703         echo "$ac_t""Yes" 1>&6
2704         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2705         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2706         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2707         ;;
2708     *:i*86*:2.7.2*)
2709         case "$GCC_VERSION" in
2710             2.7.2)
2711                 case "$CFLAGS" in
2712                     *-O2*|*-O3*)
2713                         case "$CFLAGS" in
2714                             *-fno-strength-reduce*) ;;
2715                             *)
2716                                 echo "$ac_t""Yes" 1>&6
2717                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2718                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2719                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2720                                 ;;
2721                         esac
2722                         ;;
2723                 esac
2724                 ;;
2725         esac
2726         case "$CFLAGS" in
2727          *-fno-caller-saves*) ;;
2728          *)
2729             echo "$ac_t""Yes" 1>&6
2730             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2731             echo "configure: warning: -fno-caller-saves." 1>&2
2732             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2733             ;;
2734         esac
2735         ;;
2736 esac
2737 fi
2738 echo "$ac_t""No" 1>&6
2739
2740
2741 if test "$GCC" = "yes"; then
2742   set x $ld_switch_system; shift; ld_switch_system=""
2743   while test -n "$1"; do
2744     case $1 in
2745       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2746       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2747       -Xlinker* ) ;;
2748       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2749     esac
2750     shift
2751   done
2752 fi
2753
2754 if test "$GCC" = "yes"; then
2755   set x $ld_switch_machine; shift; ld_switch_machine=""
2756   while test -n "$1"; do
2757     case $1 in
2758       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2759       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2760       -Xlinker* ) ;;
2761       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2762     esac
2763     shift
2764   done
2765 fi
2766
2767 if test "$GCC" = "yes"; then
2768   set x $LDFLAGS; shift; LDFLAGS=""
2769   while test -n "$1"; do
2770     case $1 in
2771       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2772       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2773       -Xlinker* ) ;;
2774       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2775     esac
2776     shift
2777   done
2778 fi
2779
2780 if test "$GCC" = "yes"; then
2781   set x $ld_call_shared; shift; ld_call_shared=""
2782   while test -n "$1"; do
2783     case $1 in
2784       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2785       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2786       -Xlinker* ) ;;
2787       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2788     esac
2789     shift
2790   done
2791 fi
2792
2793 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2794    echo "    xemacs will be linked with \"$objects_machine\""
2795  fi
2796 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2797    echo "    xemacs will be linked with \"$objects_system\""
2798  fi
2799 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2800    echo "    xemacs will be linked with \"$unexec\""
2801  fi
2802 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2803    echo "    xemacs will be linked with \"dumper.o\""
2804  fi
2805
2806 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2807 echo "configure:2808: checking for dynodump" >&5
2808 if test "$unexec" != "unexsol2.o"; then
2809   echo "$ac_t""no" 1>&6
2810 else
2811   echo "$ac_t""yes" 1>&6
2812   { test "$extra_verbose" = "yes" && cat << \EOF
2813     Defining DYNODUMP
2814 EOF
2815 cat >> confdefs.h <<\EOF
2816 #define DYNODUMP 1
2817 EOF
2818 }
2819
2820   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2821   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2822   case "$machine" in
2823     sparc   ) dynodump_arch=sparc ;;
2824     *86*    ) dynodump_arch=i386  ;;
2825     powerpc ) dynodump_arch=ppc   ;;
2826   esac
2827     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
2828 fi
2829
2830
2831 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2832
2833 if test "$unexec" = "unexaix.o"; then
2834   if   test "$dynamic" = "no"; then
2835   start_flags="-Wl,-bnso,-bnodelcsect"
2836   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2837   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2838     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2839   done
2840   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2841     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2842   done
2843   
2844 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2845 echo "configure:2846: checking for terminateAndUnload in -lC" >&5
2846 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2847
2848 xe_check_libs=" -lC "
2849 cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 /* Override any gcc2 internal prototype to avoid an error.  */
2853 /* We use char because int might match the return type of a gcc2
2854     builtin and then its argument prototype would still apply.  */
2855 char terminateAndUnload();
2856
2857 int main() {
2858 terminateAndUnload()
2859 ; return 0; }
2860 EOF
2861 if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2862   rm -rf conftest*
2863   eval "ac_cv_lib_$ac_lib_var=yes"
2864 else
2865   echo "configure: failed program was:" >&5
2866   cat conftest.$ac_ext >&5
2867   rm -rf conftest*
2868   eval "ac_cv_lib_$ac_lib_var=no"
2869 fi
2870 rm -f conftest*
2871 xe_check_libs=""
2872
2873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2874   echo "$ac_t""yes" 1>&6
2875   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879
2880
2881   fi
2882 elif test -n "$ld_text_start_addr"; then
2883   start_flags="-T $ld_text_start_addr -e __start"
2884 fi
2885
2886
2887
2888
2889 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2890  test -z "$linker" &&  linker='$(CC) -nostdlib'
2891  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2892 fi
2893 test "$GCC" != "yes" && lib_gcc=
2894
2895
2896
2897
2898
2899 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2900 if test -n "$site_libraries"; then
2901   for arg in $site_libraries; do
2902     case "$arg" in
2903      -* ) ;;
2904      * ) test -d "$arg" || \
2905            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2906        arg="-L${arg}" ;;
2907     esac
2908     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2909   done
2910 fi
2911
2912 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2913 if test -n "$site_includes"; then
2914   for arg in $site_includes; do
2915     case "$arg" in
2916       -* ) ;;
2917       * ) test -d "$arg" || \
2918            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2919       arg="-I${arg}" ;;
2920     esac
2921     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2922   done
2923 fi
2924
2925 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2926 if test -n "$site_prefixes"; then
2927   for dir in $site_prefixes; do
2928     lib_dir="${dir}/lib"
2929     inc_dir="${dir}/include"
2930     if test ! -d "$dir"; then
2931       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2932     elif test ! -d "$lib_dir"; then
2933       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2934     else
2935       if test -d "$inc_dir"; then
2936         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
2937       fi
2938       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
2939     fi
2940   done
2941 fi
2942
2943
2944 for dir in "/usr/ccs/lib"; do
2945   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
2946 done
2947
2948 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2949 if test -n "$site_runtime_libraries"; then
2950   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2951   export LD_RUN_PATH
2952 fi
2953
2954
2955
2956
2957
2958 if test -n "$add_runtime_path"; then :;
2959 elif test "$dynamic" = "no"; then add_runtime_path=no
2960 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2961 else case "$opsys" in
2962        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2963        * ) add_runtime_path=no ;;
2964      esac
2965 fi
2966
2967 if test "$add_runtime_path" = "yes"; then
2968       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2969 echo "configure:2970: checking "for runtime libraries flag"" >&5
2970   case "$opsys" in
2971     sol2 ) dash_r="-R" ;;
2972     decosf* | linux* | irix*) dash_r="-rpath " ;;
2973     *)
2974       dash_r=""
2975       for try_dash_r in "-R" "-R " "-rpath "; do
2976         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2977         
2978 if test "$GCC" = "yes"; then
2979   set x $xe_check_libs; shift; xe_check_libs=""
2980   while test -n "$1"; do
2981     case $1 in
2982       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2983       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2984       -Xlinker* ) ;;
2985       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2986     esac
2987     shift
2988   done
2989 fi
2990         cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993
2994 int main() {
2995
2996 ; return 0; }
2997 EOF
2998 if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2999   rm -rf conftest*
3000   dash_r="$try_dash_r"
3001 else
3002   echo "configure: failed program was:" >&5
3003   cat conftest.$ac_ext >&5
3004 fi
3005 rm -f conftest*
3006         xe_check_libs=""
3007         test -n "$dash_r" && break
3008       done ;;
3009   esac
3010   if test -n "$dash_r";
3011     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3012     else echo "$ac_t""NONE" 1>&6
3013   fi
3014 fi
3015
3016 xe_add_unique_runpath_dir='
3017   xe_add_p=yes
3018   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3019   done
3020   if test "$xe_add_p" = "yes"; then
3021     test -n "$runpath" && runpath="${runpath}:"
3022     runpath="${runpath}${xe_runpath_dir}"
3023     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3024   fi'
3025
3026
3027
3028
3029 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3030     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3031   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3032   
3033         runpath="" runpath_dirs=""
3034   if test -n "$LD_RUN_PATH"; then
3035     runpath="$LD_RUN_PATH"
3036   elif test "$GCC" = "yes"; then
3037         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3038     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3039     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3040     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3041       case "$arg" in P,* | -L* | -R* )
3042         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3043           {
3044 xe_runpath_dir="$dir"
3045   test "$xe_runpath_dir" != "/lib"     -a \
3046         "$xe_runpath_dir" != "/usr/lib" -a \
3047         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3048   eval "$xe_add_unique_runpath_dir"
3049 }
3050         done ;;
3051       esac
3052     done
3053     ld_switch_run="$ld_switch_run_save"
3054     rm -f conftest*
3055   else
3056         for arg in $ld_switch_site $ld_switch_x_site; do
3057       case "$arg" in -L*) {
3058 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3059   test "$xe_runpath_dir" != "/lib"     -a \
3060         "$xe_runpath_dir" != "/usr/lib" -a \
3061         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3062   eval "$xe_add_unique_runpath_dir"
3063 };; esac
3064     done
3065         if test "$opsys $need_motif" = "sol2 yes"; then
3066       xe_runpath_dir="/opt/SUNWdt/lib";
3067       eval "$xe_add_unique_runpath_dir";
3068     fi
3069   fi 
3070   if test -n "$runpath"; then
3071     ld_switch_run="${dash_r}${runpath}"
3072     
3073 if test "$GCC" = "yes"; then
3074   set x $ld_switch_run; shift; ld_switch_run=""
3075   while test -n "$1"; do
3076     case $1 in
3077       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3078       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3079       -Xlinker* ) ;;
3080       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3081     esac
3082     shift
3083   done
3084 fi
3085     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3086   fi
3087 fi
3088
3089
3090
3091
3092 GNU_MALLOC=yes
3093 if test "$with_dlmalloc" != "no"; then
3094         doug_lea_malloc=yes
3095 else
3096         doug_lea_malloc=no
3097 fi
3098 after_morecore_hook_exists=yes
3099 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3100 echo "configure:3101: checking for malloc_set_state" >&5
3101
3102 cat > conftest.$ac_ext <<EOF
3103 #line 3104 "configure"
3104 #include "confdefs.h"
3105 /* System header to define __stub macros and hopefully few prototypes,
3106     which can conflict with char malloc_set_state(); below.  */
3107 #include <assert.h>
3108 /* Override any gcc2 internal prototype to avoid an error.  */
3109 /* We use char because int might match the return type of a gcc2
3110     builtin and then its argument prototype would still apply.  */
3111 char malloc_set_state();
3112
3113 int main() {
3114
3115 /* The GNU C library defines this for functions which it implements
3116     to always fail with ENOSYS.  Some functions are actually named
3117     something starting with __ and the normal name is an alias.  */
3118 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3119 choke me
3120 #else
3121 malloc_set_state();
3122 #endif
3123
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3127   rm -rf conftest*
3128   eval "ac_cv_func_malloc_set_state=yes"
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_func_malloc_set_state=no"
3134 fi
3135 rm -f conftest*
3136
3137 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3138   echo "$ac_t""yes" 1>&6
3139   :
3140 else
3141   echo "$ac_t""no" 1>&6
3142 doug_lea_malloc=no
3143 fi
3144
3145 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3146 echo "configure:3147: checking whether __after_morecore_hook exists" >&5
3147 cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 extern void (* __after_morecore_hook)();
3151 int main() {
3152 __after_morecore_hook = 0
3153 ; return 0; }
3154 EOF
3155 if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3156   rm -rf conftest*
3157   echo "$ac_t""yes" 1>&6
3158 else
3159   echo "configure: failed program was:" >&5
3160   cat conftest.$ac_ext >&5
3161   rm -rf conftest*
3162   echo "$ac_t""no" 1>&6
3163    after_morecore_hook_exists=no
3164 fi
3165 rm -f conftest*
3166 if test "$system_malloc" = "yes" ; then
3167   GNU_MALLOC=no
3168   GNU_MALLOC_reason="
3169     - The GNU allocators don't work with this system configuration."
3170 elif test "$with_system_malloc" = "yes" ; then
3171   GNU_MALLOC=no
3172   GNU_MALLOC_reason="
3173     - User chose not to use GNU allocators."
3174 elif test "$with_debug_malloc" = "yes" ; then
3175   GNU_MALLOC=no
3176   GNU_MALLOC_reason="
3177     - User chose to use Debugging Malloc."
3178 fi
3179
3180 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3181   GNU_MALLOC_reason="
3182     - Using Doug Lea's new malloc from the GNU C Library."
3183   { test "$extra_verbose" = "yes" && cat << \EOF
3184     Defining DOUG_LEA_MALLOC
3185 EOF
3186 cat >> confdefs.h <<\EOF
3187 #define DOUG_LEA_MALLOC 1
3188 EOF
3189 }
3190
3191   if test "$after_morecore_hook_exists" = "no" ; then
3192     GNU_MALLOC_reason="
3193     - Using Doug Lea's new malloc from the Linux C Library."
3194     { test "$extra_verbose" = "yes" && cat << \EOF
3195     Defining _NO_MALLOC_WARNING_
3196 EOF
3197 cat >> confdefs.h <<\EOF
3198 #define _NO_MALLOC_WARNING_ 1
3199 EOF
3200 }
3201
3202   fi
3203 fi
3204
3205
3206
3207
3208 # Extract the first word of "ranlib", so it can be a program name with args.
3209 set dummy ranlib; ac_word=$2
3210 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3211 echo "configure:3212: checking for $ac_word" >&5
3212
3213 if test -n "$RANLIB"; then
3214   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3215 else
3216   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3217   ac_dummy="$PATH"
3218   for ac_dir in $ac_dummy; do
3219     test -z "$ac_dir" && ac_dir=.
3220     if test -f $ac_dir/$ac_word; then
3221       ac_cv_prog_RANLIB="ranlib"
3222       break
3223     fi
3224   done
3225   IFS="$ac_save_ifs"
3226   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3227 fi
3228 RANLIB="$ac_cv_prog_RANLIB"
3229 if test -n "$RANLIB"; then
3230   echo "$ac_t""$RANLIB" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 ac_aux_dir=
3236 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3237   if test -f $ac_dir/install-sh; then
3238     ac_aux_dir=$ac_dir
3239     ac_install_sh="$ac_aux_dir/install-sh -c"
3240     break
3241   elif test -f $ac_dir/install.sh; then
3242     ac_aux_dir=$ac_dir
3243     ac_install_sh="$ac_aux_dir/install.sh -c"
3244     break
3245   fi
3246 done
3247 if test -z "$ac_aux_dir"; then
3248   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3249 fi
3250 ac_config_guess=$ac_aux_dir/config.guess
3251 ac_config_sub=$ac_aux_dir/config.sub
3252 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3253
3254 # Find a good install program.  We prefer a C program (faster),
3255 # so one script is as good as another.  But avoid the broken or
3256 # incompatible versions:
3257 # SysV /etc/install, /usr/sbin/install
3258 # SunOS /usr/etc/install
3259 # IRIX /sbin/install
3260 # AIX /bin/install
3261 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3262 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3263 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3264 # ./install, which can be erroneously created by make from ./install.sh.
3265 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3266 echo "configure:3267: checking for a BSD compatible install" >&5
3267 if test -z "$INSTALL"; then
3268
3269   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3270   for ac_dir in $PATH; do
3271     # Account for people who put trailing slashes in PATH elements.
3272     case "$ac_dir/" in
3273     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3274     *)
3275       # OSF1 and SCO ODT 3.0 have their own names for install.
3276       # Don't use installbsd from OSF since it installs stuff as root
3277       # by default.
3278       for ac_prog in ginstall scoinst install; do
3279         if test -f $ac_dir/$ac_prog; then
3280           if test $ac_prog = install &&
3281             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3282             # AIX install.  It has an incompatible calling convention.
3283             :
3284           else
3285             ac_cv_path_install="$ac_dir/$ac_prog -c"
3286             break 2
3287           fi
3288         fi
3289       done
3290       ;;
3291     esac
3292   done
3293   IFS="$ac_save_IFS"
3294
3295   if test "${ac_cv_path_install+set}" = set; then
3296     INSTALL="$ac_cv_path_install"
3297   else
3298     # As a last resort, use the slow shell script.  We don't cache a
3299     # path for INSTALL within a source directory, because that will
3300     # break other packages using the cache if that directory is
3301     # removed, or if the path is relative.
3302     INSTALL="$ac_install_sh"
3303   fi
3304 fi
3305 echo "$ac_t""$INSTALL" 1>&6
3306
3307 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3308 # It thinks the first close brace ends the variable substitution.
3309 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3310
3311 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3312
3313 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3314
3315 for ac_prog in 'bison -y' byacc
3316 do
3317 # Extract the first word of "$ac_prog", so it can be a program name with args.
3318 set dummy $ac_prog; ac_word=$2
3319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_word" >&5
3321
3322 if test -n "$YACC"; then
3323   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3324 else
3325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3326   ac_dummy="$PATH"
3327   for ac_dir in $ac_dummy; do
3328     test -z "$ac_dir" && ac_dir=.
3329     if test -f $ac_dir/$ac_word; then
3330       ac_cv_prog_YACC="$ac_prog"
3331       break
3332     fi
3333   done
3334   IFS="$ac_save_ifs"
3335 fi
3336 YACC="$ac_cv_prog_YACC"
3337 if test -n "$YACC"; then
3338   echo "$ac_t""$YACC" 1>&6
3339 else
3340   echo "$ac_t""no" 1>&6
3341 fi
3342
3343 test -n "$YACC" && break
3344 done
3345 test -n "$YACC" || YACC="yacc"
3346
3347
3348 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3349 do
3350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3352 echo "configure:3353: checking for $ac_hdr" >&5
3353
3354 cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
3356 #include "confdefs.h"
3357 #include <$ac_hdr>
3358 EOF
3359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3360 { (eval echo configure:3361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3362 if test -z "$ac_err"; then
3363   rm -rf conftest*
3364   eval "ac_cv_header_$ac_safe=yes"
3365 else
3366   echo "$ac_err" >&5
3367   echo "configure: failed program was:" >&5
3368   cat conftest.$ac_ext >&5
3369   rm -rf conftest*
3370   eval "ac_cv_header_$ac_safe=no"
3371 fi
3372 rm -f conftest*
3373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3374   echo "$ac_t""yes" 1>&6
3375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3376   { test "$extra_verbose" = "yes" && cat << EOF
3377     Defining $ac_tr_hdr
3378 EOF
3379 cat >> confdefs.h <<EOF
3380 #define $ac_tr_hdr 1
3381 EOF
3382 }
3383  
3384 else
3385   echo "$ac_t""no" 1>&6
3386 fi
3387 done
3388
3389 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3390 echo "configure:3391: checking for sys/wait.h that is POSIX.1 compatible" >&5
3391
3392 cat > conftest.$ac_ext <<EOF
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395 #include <sys/types.h>
3396 #include <sys/wait.h>
3397 #ifndef WEXITSTATUS
3398 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3399 #endif
3400 #ifndef WIFEXITED
3401 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3402 #endif
3403 int main() {
3404 int s;
3405 wait (&s);
3406 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3407 ; return 0; }
3408 EOF
3409 if { (eval echo configure:3410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3410   rm -rf conftest*
3411   ac_cv_header_sys_wait_h=yes
3412 else
3413   echo "configure: failed program was:" >&5
3414   cat conftest.$ac_ext >&5
3415   rm -rf conftest*
3416   ac_cv_header_sys_wait_h=no
3417 fi
3418 rm -f conftest*
3419
3420 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3421 if test $ac_cv_header_sys_wait_h = yes; then
3422   { test "$extra_verbose" = "yes" && cat << \EOF
3423     Defining HAVE_SYS_WAIT_H
3424 EOF
3425 cat >> confdefs.h <<\EOF
3426 #define HAVE_SYS_WAIT_H 1
3427 EOF
3428 }
3429
3430 fi
3431
3432 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3433 echo "configure:3434: checking for ANSI C header files" >&5
3434
3435 cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <stdlib.h>
3439 #include <stdarg.h>
3440 #include <string.h>
3441 #include <float.h>
3442 EOF
3443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3444 { (eval echo configure:3445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3446 if test -z "$ac_err"; then
3447   rm -rf conftest*
3448   ac_cv_header_stdc=yes
3449 else
3450   echo "$ac_err" >&5
3451   echo "configure: failed program was:" >&5
3452   cat conftest.$ac_ext >&5
3453   rm -rf conftest*
3454   ac_cv_header_stdc=no
3455 fi
3456 rm -f conftest*
3457
3458 if test $ac_cv_header_stdc = yes; then
3459   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3460 cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463 #include <string.h>
3464 EOF
3465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3466   egrep "memchr" >/dev/null 2>&1; then
3467   :
3468 else
3469   rm -rf conftest*
3470   ac_cv_header_stdc=no
3471 fi
3472 rm -f conftest*
3473
3474 fi
3475
3476 if test $ac_cv_header_stdc = yes; then
3477   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3478 cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 #include <stdlib.h>
3482 EOF
3483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3484   egrep "free" >/dev/null 2>&1; then
3485   :
3486 else
3487   rm -rf conftest*
3488   ac_cv_header_stdc=no
3489 fi
3490 rm -f conftest*
3491
3492 fi
3493
3494 if test $ac_cv_header_stdc = yes; then
3495   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 #include <ctype.h>
3500 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3501 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3502 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3503 int main () { int i; for (i = 0; i < 256; i++)
3504 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3505 exit (0); }
3506
3507 EOF
3508 if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3509 then
3510   :
3511 else
3512   conftest_rc="$?"
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   rm -fr conftest*
3516   ac_cv_header_stdc=no
3517 fi
3518 rm -fr conftest*
3519 fi
3520
3521 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3522 if test $ac_cv_header_stdc = yes; then
3523   { test "$extra_verbose" = "yes" && cat << \EOF
3524     Defining STDC_HEADERS
3525 EOF
3526 cat >> confdefs.h <<\EOF
3527 #define STDC_HEADERS 1
3528 EOF
3529 }
3530
3531 fi
3532
3533 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3534 echo "configure:3535: checking whether time.h and sys/time.h may both be included" >&5
3535
3536 cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 #include <sys/types.h>
3540 #include <sys/time.h>
3541 #include <time.h>
3542 int main() {
3543 struct tm *tp;
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3547   rm -rf conftest*
3548   ac_cv_header_time=yes
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   ac_cv_header_time=no
3554 fi
3555 rm -f conftest*
3556
3557 echo "$ac_t""$ac_cv_header_time" 1>&6
3558 if test $ac_cv_header_time = yes; then
3559   { test "$extra_verbose" = "yes" && cat << \EOF
3560     Defining TIME_WITH_SYS_TIME
3561 EOF
3562 cat >> confdefs.h <<\EOF
3563 #define TIME_WITH_SYS_TIME 1
3564 EOF
3565 }
3566
3567 fi
3568
3569 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3570 echo "configure:3571: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3571
3572 cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <sys/types.h>
3576 #include <signal.h>
3577 /* NetBSD declares sys_siglist in unistd.h.  */
3578 #ifdef HAVE_UNISTD_H
3579 #include <unistd.h>
3580 #endif
3581 int main() {
3582 char *msg = *(sys_siglist + 1);
3583 ; return 0; }
3584 EOF
3585 if { (eval echo configure:3586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3586   rm -rf conftest*
3587   ac_cv_decl_sys_siglist=yes
3588 else
3589   echo "configure: failed program was:" >&5
3590   cat conftest.$ac_ext >&5
3591   rm -rf conftest*
3592   ac_cv_decl_sys_siglist=no
3593 fi
3594 rm -f conftest*
3595
3596 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3597 if test $ac_cv_decl_sys_siglist = yes; then
3598   { test "$extra_verbose" = "yes" && cat << \EOF
3599     Defining SYS_SIGLIST_DECLARED
3600 EOF
3601 cat >> confdefs.h <<\EOF
3602 #define SYS_SIGLIST_DECLARED 1
3603 EOF
3604 }
3605
3606 fi
3607
3608
3609 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3610 echo "configure:3611: checking for struct utimbuf" >&5
3611 cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614 #ifdef TIME_WITH_SYS_TIME
3615 #include <sys/time.h>
3616 #include <time.h>
3617 #else
3618 #ifdef HAVE_SYS_TIME_H
3619 #include <sys/time.h>
3620 #else
3621 #include <time.h>
3622 #endif
3623 #endif
3624 #ifdef HAVE_UTIME_H
3625 #include <utime.h>
3626 #endif
3627 int main() {
3628 static struct utimbuf x; x.actime = x.modtime;
3629 ; return 0; }
3630 EOF
3631 if { (eval echo configure:3632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3632   rm -rf conftest*
3633   echo "$ac_t""yes" 1>&6
3634    { test "$extra_verbose" = "yes" && cat << \EOF
3635     Defining HAVE_STRUCT_UTIMBUF
3636 EOF
3637 cat >> confdefs.h <<\EOF
3638 #define HAVE_STRUCT_UTIMBUF 1
3639 EOF
3640 }
3641
3642 else
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   echo "$ac_t""no" 1>&6
3647 fi
3648 rm -f conftest*
3649
3650 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3651 echo "configure:3652: checking return type of signal handlers" >&5
3652
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #include <signal.h>
3658 #ifdef signal
3659 #undef signal
3660 #endif
3661 #ifdef __cplusplus
3662 extern "C" void (*signal (int, void (*)(int)))(int);
3663 #else
3664 void (*signal ()) ();
3665 #endif
3666
3667 int main() {
3668 int i;
3669 ; return 0; }
3670 EOF
3671 if { (eval echo configure:3672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3672   rm -rf conftest*
3673   ac_cv_type_signal=void
3674 else
3675   echo "configure: failed program was:" >&5
3676   cat conftest.$ac_ext >&5
3677   rm -rf conftest*
3678   ac_cv_type_signal=int
3679 fi
3680 rm -f conftest*
3681
3682 echo "$ac_t""$ac_cv_type_signal" 1>&6
3683 { test "$extra_verbose" = "yes" && cat << EOF
3684     Defining RETSIGTYPE = $ac_cv_type_signal
3685 EOF
3686 cat >> confdefs.h <<EOF
3687 #define RETSIGTYPE $ac_cv_type_signal
3688 EOF
3689 }
3690
3691
3692 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3693 echo "configure:3694: checking for size_t" >&5
3694
3695 cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 #include <sys/types.h>
3699 #if STDC_HEADERS
3700 #include <stdlib.h>
3701 #include <stddef.h>
3702 #endif
3703 EOF
3704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3705   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3706   rm -rf conftest*
3707   ac_cv_type_size_t=yes
3708 else
3709   rm -rf conftest*
3710   ac_cv_type_size_t=no
3711 fi
3712 rm -f conftest*
3713
3714 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3715 if test $ac_cv_type_size_t = no; then
3716   { test "$extra_verbose" = "yes" && cat << \EOF
3717     Defining size_t = unsigned
3718 EOF
3719 cat >> confdefs.h <<\EOF
3720 #define size_t unsigned
3721 EOF
3722 }
3723
3724 fi
3725
3726 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3727 echo "configure:3728: checking for pid_t" >&5
3728
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3733 #if STDC_HEADERS
3734 #include <stdlib.h>
3735 #include <stddef.h>
3736 #endif
3737 EOF
3738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3739   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3740   rm -rf conftest*
3741   ac_cv_type_pid_t=yes
3742 else
3743   rm -rf conftest*
3744   ac_cv_type_pid_t=no
3745 fi
3746 rm -f conftest*
3747
3748 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3749 if test $ac_cv_type_pid_t = no; then
3750   { test "$extra_verbose" = "yes" && cat << \EOF
3751     Defining pid_t = int
3752 EOF
3753 cat >> confdefs.h <<\EOF
3754 #define pid_t int
3755 EOF
3756 }
3757
3758 fi
3759
3760 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3761 echo "configure:3762: checking for uid_t in sys/types.h" >&5
3762
3763 cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 #include <sys/types.h>
3767 EOF
3768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3769   egrep "uid_t" >/dev/null 2>&1; then
3770   rm -rf conftest*
3771   ac_cv_type_uid_t=yes
3772 else
3773   rm -rf conftest*
3774   ac_cv_type_uid_t=no
3775 fi
3776 rm -f conftest*
3777
3778
3779 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3780 if test $ac_cv_type_uid_t = no; then
3781   { test "$extra_verbose" = "yes" && cat << \EOF
3782     Defining uid_t = int
3783 EOF
3784 cat >> confdefs.h <<\EOF
3785 #define uid_t int
3786 EOF
3787 }
3788
3789   { test "$extra_verbose" = "yes" && cat << \EOF
3790     Defining gid_t = int
3791 EOF
3792 cat >> confdefs.h <<\EOF
3793 #define gid_t int
3794 EOF
3795 }
3796
3797 fi
3798
3799 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3800 echo "configure:3801: checking for mode_t" >&5
3801
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 #include <sys/types.h>
3806 #if STDC_HEADERS
3807 #include <stdlib.h>
3808 #include <stddef.h>
3809 #endif
3810 EOF
3811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3812   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3813   rm -rf conftest*
3814   ac_cv_type_mode_t=yes
3815 else
3816   rm -rf conftest*
3817   ac_cv_type_mode_t=no
3818 fi
3819 rm -f conftest*
3820
3821 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3822 if test $ac_cv_type_mode_t = no; then
3823   { test "$extra_verbose" = "yes" && cat << \EOF
3824     Defining mode_t = int
3825 EOF
3826 cat >> confdefs.h <<\EOF
3827 #define mode_t int
3828 EOF
3829 }
3830
3831 fi
3832
3833 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3834 echo "configure:3835: checking for off_t" >&5
3835
3836 cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <sys/types.h>
3840 #if STDC_HEADERS
3841 #include <stdlib.h>
3842 #include <stddef.h>
3843 #endif
3844 EOF
3845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3846   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3847   rm -rf conftest*
3848   ac_cv_type_off_t=yes
3849 else
3850   rm -rf conftest*
3851   ac_cv_type_off_t=no
3852 fi
3853 rm -f conftest*
3854
3855 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3856 if test $ac_cv_type_off_t = no; then
3857   { test "$extra_verbose" = "yes" && cat << \EOF
3858     Defining off_t = long
3859 EOF
3860 cat >> confdefs.h <<\EOF
3861 #define off_t long
3862 EOF
3863 }
3864
3865 fi
3866
3867 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3868 echo "configure:3869: checking for ssize_t" >&5
3869
3870 cat > conftest.$ac_ext <<EOF
3871 #line 3872 "configure"
3872 #include "confdefs.h"
3873 #include <sys/types.h>
3874 #if STDC_HEADERS
3875 #include <stdlib.h>
3876 #include <stddef.h>
3877 #endif
3878 EOF
3879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3881   rm -rf conftest*
3882   ac_cv_type_ssize_t=yes
3883 else
3884   rm -rf conftest*
3885   ac_cv_type_ssize_t=no
3886 fi
3887 rm -f conftest*
3888
3889 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3890 if test $ac_cv_type_ssize_t = no; then
3891   { test "$extra_verbose" = "yes" && cat << \EOF
3892     Defining ssize_t = int
3893 EOF
3894 cat >> confdefs.h <<\EOF
3895 #define ssize_t int
3896 EOF
3897 }
3898
3899 fi
3900
3901
3902 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3903 echo "configure:3904: checking for socklen_t" >&5
3904 cat > conftest.$ac_ext <<EOF
3905 #line 3906 "configure"
3906 #include "confdefs.h"
3907 #include <sys/socket.h>
3908 socklen_t x;
3909
3910 int main() {
3911
3912 ; return 0; }
3913 EOF
3914 if { (eval echo configure:3915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3915   rm -rf conftest*
3916   echo "$ac_t""yes" 1>&6
3917 else
3918   echo "configure: failed program was:" >&5
3919   cat conftest.$ac_ext >&5
3920   rm -rf conftest*
3921   
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <sys/socket.h>
3926 int accept (int, struct sockaddr *, size_t *);
3927
3928 int main() {
3929
3930 ; return 0; }
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   rm -rf conftest*
3934   
3935 echo "$ac_t""size_t" 1>&6
3936 { test "$extra_verbose" = "yes" && cat << \EOF
3937     Defining socklen_t = size_t
3938 EOF
3939 cat >> confdefs.h <<\EOF
3940 #define socklen_t size_t
3941 EOF
3942 }
3943
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   
3949 echo "$ac_t""int" 1>&6
3950 { test "$extra_verbose" = "yes" && cat << \EOF
3951     Defining socklen_t = int
3952 EOF
3953 cat >> confdefs.h <<\EOF
3954 #define socklen_t int
3955 EOF
3956 }
3957
3958 fi
3959 rm -f conftest*
3960 fi
3961 rm -f conftest*
3962
3963 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3964 echo "configure:3965: checking for struct timeval" >&5
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 #ifdef TIME_WITH_SYS_TIME
3969 #include <sys/time.h>
3970 #include <time.h>
3971 #else
3972 #ifdef HAVE_SYS_TIME_H
3973 #include <sys/time.h>
3974 #else
3975 #include <time.h>
3976 #endif
3977 #endif
3978 int main() {
3979 static struct timeval x; x.tv_sec = x.tv_usec;
3980 ; return 0; }
3981 EOF
3982 if { (eval echo configure:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3983   rm -rf conftest*
3984   echo "$ac_t""yes" 1>&6
3985   HAVE_TIMEVAL=yes
3986   { test "$extra_verbose" = "yes" && cat << \EOF
3987     Defining HAVE_TIMEVAL
3988 EOF
3989 cat >> confdefs.h <<\EOF
3990 #define HAVE_TIMEVAL 1
3991 EOF
3992 }
3993
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   echo "$ac_t""no" 1>&6
3999    HAVE_TIMEVAL=no
4000 fi
4001 rm -f conftest*
4002
4003 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4004 echo "configure:4005: checking whether struct tm is in sys/time.h or time.h" >&5
4005
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009 #include <sys/types.h>
4010 #include <time.h>
4011 int main() {
4012 struct tm *tp; tp->tm_sec;
4013 ; return 0; }
4014 EOF
4015 if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4016   rm -rf conftest*
4017   ac_cv_struct_tm=time.h
4018 else
4019   echo "configure: failed program was:" >&5
4020   cat conftest.$ac_ext >&5
4021   rm -rf conftest*
4022   ac_cv_struct_tm=sys/time.h
4023 fi
4024 rm -f conftest*
4025
4026 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4027 if test $ac_cv_struct_tm = sys/time.h; then
4028   { test "$extra_verbose" = "yes" && cat << \EOF
4029     Defining TM_IN_SYS_TIME
4030 EOF
4031 cat >> confdefs.h <<\EOF
4032 #define TM_IN_SYS_TIME 1
4033 EOF
4034 }
4035
4036 fi
4037
4038 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4039 echo "configure:4040: checking for tm_zone in struct tm" >&5
4040
4041 cat > conftest.$ac_ext <<EOF
4042 #line 4043 "configure"
4043 #include "confdefs.h"
4044 #include <sys/types.h>
4045 #include <$ac_cv_struct_tm>
4046 int main() {
4047 struct tm tm; tm.tm_zone;
4048 ; return 0; }
4049 EOF
4050 if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4051   rm -rf conftest*
4052   ac_cv_struct_tm_zone=yes
4053 else
4054   echo "configure: failed program was:" >&5
4055   cat conftest.$ac_ext >&5
4056   rm -rf conftest*
4057   ac_cv_struct_tm_zone=no
4058 fi
4059 rm -f conftest*
4060
4061 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4062 if test "$ac_cv_struct_tm_zone" = yes; then
4063   { test "$extra_verbose" = "yes" && cat << \EOF
4064     Defining HAVE_TM_ZONE
4065 EOF
4066 cat >> confdefs.h <<\EOF
4067 #define HAVE_TM_ZONE 1
4068 EOF
4069 }
4070
4071 else
4072   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4073 echo "configure:4074: checking for tzname" >&5
4074
4075 cat > conftest.$ac_ext <<EOF
4076 #line 4077 "configure"
4077 #include "confdefs.h"
4078 #include <time.h>
4079 #ifndef tzname /* For SGI.  */
4080 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4081 #endif
4082 int main() {
4083 atoi(*tzname);
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4087   rm -rf conftest*
4088   ac_cv_var_tzname=yes
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   ac_cv_var_tzname=no
4094 fi
4095 rm -f conftest*
4096
4097 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4098   if test $ac_cv_var_tzname = yes; then
4099     { test "$extra_verbose" = "yes" && cat << \EOF
4100     Defining HAVE_TZNAME
4101 EOF
4102 cat >> confdefs.h <<\EOF
4103 #define HAVE_TZNAME 1
4104 EOF
4105 }
4106
4107   fi
4108 fi
4109
4110
4111 echo $ac_n "checking for working const""... $ac_c" 1>&6
4112 echo "configure:4113: checking for working const" >&5
4113
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117
4118 int main() {
4119
4120 /* Ultrix mips cc rejects this.  */
4121 typedef int charset[2]; const charset x;
4122 /* SunOS 4.1.1 cc rejects this.  */
4123 char const *const *ccp;
4124 char **p;
4125 /* NEC SVR4.0.2 mips cc rejects this.  */
4126 struct point {int x, y;};
4127 static struct point const zero = {0,0};
4128 /* AIX XL C 1.02.0.0 rejects this.
4129    It does not let you subtract one const X* pointer from another in an arm
4130    of an if-expression whose if-part is not a constant expression */
4131 const char *g = "string";
4132 ccp = &g + (g ? g-g : 0);
4133 /* HPUX 7.0 cc rejects these. */
4134 ++ccp;
4135 p = (char**) ccp;
4136 ccp = (char const *const *) p;
4137 { /* SCO 3.2v4 cc rejects this.  */
4138   char *t;
4139   char const *s = 0 ? (char *) 0 : (char const *) 0;
4140
4141   *t++ = 0;
4142 }
4143 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4144   int x[] = {25, 17};
4145   const int *foo = &x[0];
4146   ++foo;
4147 }
4148 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4149   typedef const int *iptr;
4150   iptr p = 0;
4151   ++p;
4152 }
4153 { /* AIX XL C 1.02.0.0 rejects this saying
4154      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4155   struct s { int j; const int *ap[3]; };
4156   struct s *b; b->j = 5;
4157 }
4158 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4159   const int foo = 10;
4160 }
4161
4162 ; return 0; }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4165   rm -rf conftest*
4166   ac_cv_c_const=yes
4167 else
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   ac_cv_c_const=no
4172 fi
4173 rm -f conftest*
4174
4175 echo "$ac_t""$ac_cv_c_const" 1>&6
4176 if test $ac_cv_c_const = no; then
4177   { test "$extra_verbose" = "yes" && cat << \EOF
4178     Defining const = 
4179 EOF
4180 cat >> confdefs.h <<\EOF
4181 #define const 
4182 EOF
4183 }
4184
4185 fi
4186
4187
4188 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4189 echo "configure:4190: checking whether ${MAKE-make} sets \${MAKE}" >&5
4190 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4191
4192 cat > conftestmake <<\EOF
4193 all:
4194         @echo 'ac_maketemp="${MAKE}"'
4195 EOF
4196 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4197 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4198 if test -n "$ac_maketemp"; then
4199   eval ac_cv_prog_make_${ac_make}_set=yes
4200 else
4201   eval ac_cv_prog_make_${ac_make}_set=no
4202 fi
4203 rm -f conftestmake
4204 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4205   echo "$ac_t""yes" 1>&6
4206   SET_MAKE=
4207 else
4208   echo "$ac_t""no" 1>&6
4209   SET_MAKE="MAKE=${MAKE-make}"
4210 fi
4211
4212
4213 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4214 echo "configure:4215: checking whether byte ordering is bigendian" >&5
4215
4216 ac_cv_c_bigendian=unknown
4217 # See if sys/param.h defines the BYTE_ORDER macro.
4218 cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <sys/types.h>
4222 #include <sys/param.h>
4223 int main() {
4224
4225 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4226  bogus endian macros
4227 #endif
4228 ; return 0; }
4229 EOF
4230 if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4231   rm -rf conftest*
4232   # It does; now see whether it defined to BIG_ENDIAN or not.
4233 cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 #include <sys/types.h>
4237 #include <sys/param.h>
4238 int main() {
4239
4240 #if BYTE_ORDER != BIG_ENDIAN
4241  not big endian
4242 #endif
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4246   rm -rf conftest*
4247   ac_cv_c_bigendian=yes
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   ac_cv_c_bigendian=no
4253 fi
4254 rm -f conftest*
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258 fi
4259 rm -f conftest*
4260 if test $ac_cv_c_bigendian = unknown; then
4261 cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 main () {
4265   /* Are we little or big endian?  From Harbison&Steele.  */
4266   union
4267   {
4268     long l;
4269     char c[sizeof (long)];
4270   } u;
4271   u.l = 1;
4272   exit (u.c[sizeof (long) - 1] == 1);
4273 }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4276 then
4277   ac_cv_c_bigendian=no
4278 else
4279   conftest_rc="$?"
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -fr conftest*
4283   ac_cv_c_bigendian=yes
4284 fi
4285 rm -fr conftest*
4286 fi
4287
4288 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4289 if test $ac_cv_c_bigendian = yes; then
4290   { test "$extra_verbose" = "yes" && cat << \EOF
4291     Defining WORDS_BIGENDIAN
4292 EOF
4293 cat >> confdefs.h <<\EOF
4294 #define WORDS_BIGENDIAN 1
4295 EOF
4296 }
4297
4298 fi
4299
4300
4301 echo $ac_n "checking size of short""... $ac_c" 1>&6
4302 echo "configure:4303: checking size of short" >&5
4303
4304 cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 #include <stdio.h>
4308 main()
4309 {
4310   FILE *f=fopen("conftestval", "w");
4311   if (!f) exit(1);
4312   fprintf(f, "%d\n", sizeof(short));
4313   exit(0);
4314 }
4315 EOF
4316 if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4317 then
4318   ac_cv_sizeof_short=`cat conftestval`
4319 else
4320   conftest_rc="$?"
4321   echo "configure: failed program was:" >&5
4322   cat conftest.$ac_ext >&5
4323   rm -fr conftest*
4324   ac_cv_sizeof_short=0
4325 fi
4326 rm -fr conftest*
4327 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4328 { test "$extra_verbose" = "yes" && cat << EOF
4329     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4330 EOF
4331 cat >> confdefs.h <<EOF
4332 #define SIZEOF_SHORT $ac_cv_sizeof_short
4333 EOF
4334 }
4335
4336
4337 if test "$ac_cv_sizeof_short" = 0; then
4338   echo ""
4339   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4340   echo "*** PANIC *** Please examine config.log for compilation errors."
4341   exit 1
4342 fi
4343 echo $ac_n "checking size of int""... $ac_c" 1>&6
4344 echo "configure:4345: checking size of int" >&5
4345
4346 cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 #include <stdio.h>
4350 main()
4351 {
4352   FILE *f=fopen("conftestval", "w");
4353   if (!f) exit(1);
4354   fprintf(f, "%d\n", sizeof(int));
4355   exit(0);
4356 }
4357 EOF
4358 if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4359 then
4360   ac_cv_sizeof_int=`cat conftestval`
4361 else
4362   conftest_rc="$?"
4363   echo "configure: failed program was:" >&5
4364   cat conftest.$ac_ext >&5
4365   rm -fr conftest*
4366   ac_cv_sizeof_int=0
4367 fi
4368 rm -fr conftest*
4369 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4370 { test "$extra_verbose" = "yes" && cat << EOF
4371     Defining SIZEOF_INT = $ac_cv_sizeof_int
4372 EOF
4373 cat >> confdefs.h <<EOF
4374 #define SIZEOF_INT $ac_cv_sizeof_int
4375 EOF
4376 }
4377
4378
4379 echo $ac_n "checking size of long""... $ac_c" 1>&6
4380 echo "configure:4381: checking size of long" >&5
4381
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <stdio.h>
4386 main()
4387 {
4388   FILE *f=fopen("conftestval", "w");
4389   if (!f) exit(1);
4390   fprintf(f, "%d\n", sizeof(long));
4391   exit(0);
4392 }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4395 then
4396   ac_cv_sizeof_long=`cat conftestval`
4397 else
4398   conftest_rc="$?"
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -fr conftest*
4402   ac_cv_sizeof_long=0
4403 fi
4404 rm -fr conftest*
4405 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4406 { test "$extra_verbose" = "yes" && cat << EOF
4407     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4408 EOF
4409 cat >> confdefs.h <<EOF
4410 #define SIZEOF_LONG $ac_cv_sizeof_long
4411 EOF
4412 }
4413
4414
4415 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4416 echo "configure:4417: checking size of long long" >&5
4417
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 #include <stdio.h>
4422 main()
4423 {
4424   FILE *f=fopen("conftestval", "w");
4425   if (!f) exit(1);
4426   fprintf(f, "%d\n", sizeof(long long));
4427   exit(0);
4428 }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4431 then
4432   ac_cv_sizeof_long_long=`cat conftestval`
4433 else
4434   conftest_rc="$?"
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -fr conftest*
4438   ac_cv_sizeof_long_long=0
4439 fi
4440 rm -fr conftest*
4441 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4442 { test "$extra_verbose" = "yes" && cat << EOF
4443     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4444 EOF
4445 cat >> confdefs.h <<EOF
4446 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4447 EOF
4448 }
4449
4450
4451 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4452 echo "configure:4453: checking size of void *" >&5
4453
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 #include <stdio.h>
4458 main()
4459 {
4460   FILE *f=fopen("conftestval", "w");
4461   if (!f) exit(1);
4462   fprintf(f, "%d\n", sizeof(void *));
4463   exit(0);
4464 }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4467 then
4468   ac_cv_sizeof_void_p=`cat conftestval`
4469 else
4470   conftest_rc="$?"
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -fr conftest*
4474   ac_cv_sizeof_void_p=0
4475 fi
4476 rm -fr conftest*
4477 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4478 { test "$extra_verbose" = "yes" && cat << EOF
4479     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4480 EOF
4481 cat >> confdefs.h <<EOF
4482 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4483 EOF
4484 }
4485
4486
4487
4488 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4489 echo "configure:4490: checking for long file names" >&5
4490
4491 ac_cv_sys_long_file_names=yes
4492 # Test for long file names in all the places we know might matter:
4493 #      .                the current directory, where building will happen
4494 #      $prefix/lib      where we will be installing things
4495 #      $exec_prefix/lib likewise
4496 # eval it to expand exec_prefix.
4497 #      $TMPDIR          if set, where it might want to write temporary files
4498 # if $TMPDIR is not set:
4499 #      /tmp             where it might want to write temporary files
4500 #      /var/tmp         likewise
4501 #      /usr/tmp         likewise
4502 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4503   ac_tmpdirs="$TMPDIR"
4504 else
4505   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4506 fi
4507 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4508   test -d $ac_dir || continue
4509   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4510   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4511   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4512   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4513   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4514     ac_cv_sys_long_file_names=no
4515     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4516     break
4517   fi
4518   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4519 done
4520
4521 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4522 if test $ac_cv_sys_long_file_names = yes; then
4523   { test "$extra_verbose" = "yes" && cat << \EOF
4524     Defining HAVE_LONG_FILE_NAMES
4525 EOF
4526 cat >> confdefs.h <<\EOF
4527 #define HAVE_LONG_FILE_NAMES 1
4528 EOF
4529 }
4530
4531 fi
4532
4533
4534 echo $ac_n "checking for sin""... $ac_c" 1>&6
4535 echo "configure:4536: checking for sin" >&5
4536
4537 cat > conftest.$ac_ext <<EOF
4538 #line 4539 "configure"
4539 #include "confdefs.h"
4540 /* System header to define __stub macros and hopefully few prototypes,
4541     which can conflict with char sin(); below.  */
4542 #include <assert.h>
4543 /* Override any gcc2 internal prototype to avoid an error.  */
4544 /* We use char because int might match the return type of a gcc2
4545     builtin and then its argument prototype would still apply.  */
4546 char sin();
4547
4548 int main() {
4549
4550 /* The GNU C library defines this for functions which it implements
4551     to always fail with ENOSYS.  Some functions are actually named
4552     something starting with __ and the normal name is an alias.  */
4553 #if defined (__stub_sin) || defined (__stub___sin)
4554 choke me
4555 #else
4556 sin();
4557 #endif
4558
4559 ; return 0; }
4560 EOF
4561 if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4562   rm -rf conftest*
4563   eval "ac_cv_func_sin=yes"
4564 else
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -rf conftest*
4568   eval "ac_cv_func_sin=no"
4569 fi
4570 rm -f conftest*
4571
4572 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4573   echo "$ac_t""yes" 1>&6
4574   :
4575 else
4576   echo "$ac_t""no" 1>&6
4577
4578 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4579 echo "configure:4580: checking for sin in -lm" >&5
4580 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4581
4582 xe_check_libs=" -lm "
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* Override any gcc2 internal prototype to avoid an error.  */
4587 /* We use char because int might match the return type of a gcc2
4588     builtin and then its argument prototype would still apply.  */
4589 char sin();
4590
4591 int main() {
4592 sin()
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=no"
4603 fi
4604 rm -f conftest*
4605 xe_check_libs=""
4606
4607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4608   echo "$ac_t""yes" 1>&6
4609     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4610     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4611   { test "$extra_verbose" = "yes" && cat << EOF
4612     Defining $ac_tr_lib
4613 EOF
4614 cat >> confdefs.h <<EOF
4615 #define $ac_tr_lib 1
4616 EOF
4617 }
4618
4619   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4620
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625
4626 fi
4627
4628
4629 { test "$extra_verbose" = "yes" && cat << \EOF
4630     Defining LISP_FLOAT_TYPE
4631 EOF
4632 cat >> confdefs.h <<\EOF
4633 #define LISP_FLOAT_TYPE 1
4634 EOF
4635 }
4636
4637
4638 cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <math.h>
4642 int main() {
4643 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647   rm -rf conftest*
4648   { test "$extra_verbose" = "yes" && cat << \EOF
4649     Defining HAVE_INVERSE_HYPERBOLIC
4650 EOF
4651 cat >> confdefs.h <<\EOF
4652 #define HAVE_INVERSE_HYPERBOLIC 1
4653 EOF
4654 }
4655
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659 fi
4660 rm -f conftest*
4661
4662 echo "checking type of mail spool file locking" 1>&6
4663 echo "configure:4664: checking type of mail spool file locking" >&5
4664 for ac_func in lockf flock
4665 do
4666 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4667 echo "configure:4668: checking for $ac_func" >&5
4668
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 /* System header to define __stub macros and hopefully few prototypes,
4673     which can conflict with char $ac_func(); below.  */
4674 #include <assert.h>
4675 /* Override any gcc2 internal prototype to avoid an error.  */
4676 /* We use char because int might match the return type of a gcc2
4677     builtin and then its argument prototype would still apply.  */
4678 char $ac_func();
4679
4680 int main() {
4681
4682 /* The GNU C library defines this for functions which it implements
4683     to always fail with ENOSYS.  Some functions are actually named
4684     something starting with __ and the normal name is an alias.  */
4685 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4686 choke me
4687 #else
4688 $ac_func();
4689 #endif
4690
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4694   rm -rf conftest*
4695   eval "ac_cv_func_$ac_func=yes"
4696 else
4697   echo "configure: failed program was:" >&5
4698   cat conftest.$ac_ext >&5
4699   rm -rf conftest*
4700   eval "ac_cv_func_$ac_func=no"
4701 fi
4702 rm -f conftest*
4703
4704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4705   echo "$ac_t""yes" 1>&6
4706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4707   { test "$extra_verbose" = "yes" && cat << EOF
4708     Defining $ac_tr_func
4709 EOF
4710 cat >> confdefs.h <<EOF
4711 #define $ac_tr_func 1
4712 EOF
4713 }
4714  
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718 done
4719
4720 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4721 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4722 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4723 if   test -z "$mail_locking"; then
4724   case "$opsys" in cygwin* | mingw*)
4725     mail_locking=pop ;;
4726   esac
4727 fi
4728
4729 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4730     Defining MAIL_LOCK_LOCKF
4731 EOF
4732 cat >> confdefs.h <<\EOF
4733 #define MAIL_LOCK_LOCKF 1
4734 EOF
4735 }
4736
4737 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4738     Defining MAIL_LOCK_FLOCK
4739 EOF
4740 cat >> confdefs.h <<\EOF
4741 #define MAIL_LOCK_FLOCK 1
4742 EOF
4743 }
4744
4745 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4746     Defining MAIL_LOCK_LOCKING
4747 EOF
4748 cat >> confdefs.h <<\EOF
4749 #define MAIL_LOCK_LOCKING 1
4750 EOF
4751 }
4752
4753 elif test "$mail_locking" = "pop"; then
4754   with_pop=yes
4755   mail_locking=
4756 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4757     Defining MAIL_LOCK_DOT
4758 EOF
4759 cat >> confdefs.h <<\EOF
4760 #define MAIL_LOCK_DOT 1
4761 EOF
4762 }
4763
4764 fi
4765 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4766   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4767 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4768   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4769 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4770   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4771
4772 case "$opsys" in decosf*)
4773   
4774 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4775 echo "configure:4776: checking for cma_open in -lpthreads" >&5
4776 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4777
4778 xe_check_libs=" -lpthreads "
4779 cat > conftest.$ac_ext <<EOF
4780 #line 4781 "configure"
4781 #include "confdefs.h"
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char cma_open();
4786
4787 int main() {
4788 cma_open()
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=yes"
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=no"
4799 fi
4800 rm -f conftest*
4801 xe_check_libs=""
4802
4803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4804   echo "$ac_t""yes" 1>&6
4805     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4806     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4807   { test "$extra_verbose" = "yes" && cat << EOF
4808     Defining $ac_tr_lib
4809 EOF
4810 cat >> confdefs.h <<EOF
4811 #define $ac_tr_lib 1
4812 EOF
4813 }
4814
4815   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4816
4817 else
4818   echo "$ac_t""no" 1>&6
4819 fi
4820
4821
4822   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4823     c_switch_site="$c_switch_site -threads" ;;
4824 esac
4825
4826 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4827 echo "configure:4828: checking whether the -xildoff compiler flag is required" >&5
4828 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4829   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4830     then echo "$ac_t""no" 1>&6;
4831     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
4832   fi
4833   else echo "$ac_t""no" 1>&6
4834 fi
4835
4836 if test "$opsys" = "sol2"; then
4837   if test "$os_release" -ge 56; then
4838     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4839 echo "configure:4840: checking for \"-z ignore\" linker flag" >&5
4840     case "`ld -h 2>&1`" in
4841       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4842         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4843       *) echo "$ac_t""no" 1>&6 ;;
4844     esac
4845   fi
4846 fi
4847
4848
4849 echo "checking "for specified window system"" 1>&6
4850 echo "configure:4851: checking "for specified window system"" >&5
4851
4852 if test "$with_x11" != "no"; then
4853     test "$x_includes $x_libraries" != "NONE NONE" && \
4854    window_system=x11 with_x11=yes
4855
4856         
4857       if test "$x_includes $x_libraries" = "NONE NONE" \
4858     -a -n "$OPENWINHOME" \
4859     -a "$OPENWINHOME" != "/usr/openwin" \
4860     -a -d "$OPENWINHOME"; then
4861       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4862       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4863       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4864   fi
4865
4866   if test "$x_includes" = "NONE"; then
4867                     for dir in "/usr/X11" "/usr/X11R6"; do
4868       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4869     done
4870   fi
4871
4872   if test "$x_libraries" = "NONE"; then
4873     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4874       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4875     done
4876   fi
4877
4878   # If we find X, set shell vars x_includes and x_libraries to the
4879 # paths, otherwise set no_x=yes.
4880 # Uses ac_ vars as temps to allow command line to override cache and checks.
4881 # --without-x overrides everything else, but does not touch the cache.
4882 echo $ac_n "checking for X""... $ac_c" 1>&6
4883 echo "configure:4884: checking for X" >&5
4884
4885 # Check whether --with-x or --without-x was given.
4886 if test "${with_x+set}" = set; then
4887   withval="$with_x"
4888   :
4889 fi
4890
4891 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4892 if test "x$with_x" = xno; then
4893   # The user explicitly disabled X.
4894   have_x=disabled
4895 else
4896   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4897     # Both variables are already set.
4898     have_x=yes
4899   else
4900
4901 # One or both of the vars are not set, and there is no cached value.
4902 ac_x_includes=NO ac_x_libraries=NO
4903 rm -fr conftestdir
4904 if mkdir conftestdir; then
4905   cd conftestdir
4906   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4907   cat > Imakefile <<'EOF'
4908 acfindx:
4909         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4910 EOF
4911   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4912     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4913     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4914     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4915     for ac_extension in a so sl; do
4916       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4917         test -f $ac_im_libdir/libX11.$ac_extension; then
4918         ac_im_usrlibdir=$ac_im_libdir; break
4919       fi
4920     done
4921     # Screen out bogus values from the imake configuration.  They are
4922     # bogus both because they are the default anyway, and because
4923     # using them would break gcc on systems where it needs fixed includes.
4924     case "$ac_im_incroot" in
4925         /usr/include) ;;
4926         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4927     esac
4928     case "$ac_im_usrlibdir" in
4929         /usr/lib | /lib) ;;
4930         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4931     esac
4932   fi
4933   cd ..
4934   rm -fr conftestdir
4935 fi
4936
4937 if test "$ac_x_includes" = NO; then
4938   # Guess where to find include files, by looking for this one X11 .h file.
4939   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4940
4941   # First, try using that file with no special directory specified.
4942 cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 #include <$x_direct_test_include>
4946 EOF
4947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4948 { (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4950 if test -z "$ac_err"; then
4951   rm -rf conftest*
4952   # We can compile using X headers with no special include directory.
4953 ac_x_includes=
4954 else
4955   echo "$ac_err" >&5
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   # Look for the header file in a standard set of common directories.
4960 # Check X11 before X11Rn because it is often a symlink to the current release.
4961   for ac_dir in               \
4962     /usr/X11/include          \
4963     /usr/X11R6/include        \
4964     /usr/X11R5/include        \
4965     /usr/X11R4/include        \
4966                               \
4967     /usr/include/X11          \
4968     /usr/include/X11R6        \
4969     /usr/include/X11R5        \
4970     /usr/include/X11R4        \
4971                               \
4972     /usr/local/X11/include    \
4973     /usr/local/X11R6/include  \
4974     /usr/local/X11R5/include  \
4975     /usr/local/X11R4/include  \
4976                               \
4977     /usr/local/include/X11    \
4978     /usr/local/include/X11R6  \
4979     /usr/local/include/X11R5  \
4980     /usr/local/include/X11R4  \
4981                               \
4982     /usr/X386/include         \
4983     /usr/x386/include         \
4984     /usr/XFree86/include/X11  \
4985                               \
4986     /usr/include              \
4987     /usr/local/include        \
4988     /usr/unsupported/include  \
4989     /usr/athena/include       \
4990     /usr/local/x11r5/include  \
4991     /usr/lpp/Xamples/include  \
4992                               \
4993     /usr/openwin/include      \
4994     /usr/openwin/share/include \
4995     ; \
4996   do
4997     if test -r "$ac_dir/$x_direct_test_include"; then
4998       ac_x_includes=$ac_dir
4999       break
5000     fi
5001   done
5002 fi
5003 rm -f conftest*
5004 fi # $ac_x_includes = NO
5005
5006 if test "$ac_x_libraries" = NO; then
5007   # Check for the libraries.
5008
5009   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5010   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5011
5012   # See if we find them without any special options.
5013   # Don't add to $LIBS permanently.
5014   ac_save_LIBS="$LIBS"
5015   LIBS="-l$x_direct_test_library $LIBS"
5016 cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019
5020 int main() {
5021 ${x_direct_test_function}()
5022 ; return 0; }
5023 EOF
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5025   rm -rf conftest*
5026   LIBS="$ac_save_LIBS"
5027 # We can link X programs with no special library path.
5028 ac_x_libraries=
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   LIBS="$ac_save_LIBS"
5034 # First see if replacing the include by lib works.
5035 # Check X11 before X11Rn because it is often a symlink to the current release.
5036 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5037     /usr/X11/lib          \
5038     /usr/X11R6/lib        \
5039     /usr/X11R5/lib        \
5040     /usr/X11R4/lib        \
5041                           \
5042     /usr/lib/X11          \
5043     /usr/lib/X11R6        \
5044     /usr/lib/X11R5        \
5045     /usr/lib/X11R4        \
5046                           \
5047     /usr/local/X11/lib    \
5048     /usr/local/X11R6/lib  \
5049     /usr/local/X11R5/lib  \
5050     /usr/local/X11R4/lib  \
5051                           \
5052     /usr/local/lib/X11    \
5053     /usr/local/lib/X11R6  \
5054     /usr/local/lib/X11R5  \
5055     /usr/local/lib/X11R4  \
5056                           \
5057     /usr/X386/lib         \
5058     /usr/x386/lib         \
5059     /usr/XFree86/lib/X11  \
5060                           \
5061     /usr/lib              \
5062     /usr/local/lib        \
5063     /usr/unsupported/lib  \
5064     /usr/athena/lib       \
5065     /usr/local/x11r5/lib  \
5066     /usr/lpp/Xamples/lib  \
5067     /lib/usr/lib/X11      \
5068                           \
5069     /usr/openwin/lib      \
5070     /usr/openwin/share/lib \
5071     ; \
5072 do
5073   for ac_extension in a so sl; do
5074     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5075       ac_x_libraries=$ac_dir
5076       break 2
5077     fi
5078   done
5079 done
5080 fi
5081 rm -f conftest*
5082 fi # $ac_x_libraries = NO
5083
5084 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5085   # Didn't find X anywhere.  Cache the known absence of X.
5086   ac_cv_have_x="have_x=no"
5087 else
5088   # Record where we found X for the cache.
5089   ac_cv_have_x="have_x=yes \
5090                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5091 fi
5092   fi
5093   eval "$ac_cv_have_x"
5094 fi # $with_x != no
5095
5096 if test "$have_x" != yes; then
5097   echo "$ac_t""$have_x" 1>&6
5098   no_x=yes
5099 else
5100   # If each of the values was on the command line, it overrides each guess.
5101   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5102   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5103   # Update the cache value to reflect the command line values.
5104   ac_cv_have_x="have_x=yes \
5105                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5106   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5107 fi
5108
5109 if test "$no_x" = yes; then
5110   # Not all programs may use this symbol, but it does not hurt to define it.
5111   { test "$extra_verbose" = "yes" && cat << \EOF
5112     Defining X_DISPLAY_MISSING
5113 EOF
5114 cat >> confdefs.h <<\EOF
5115 #define X_DISPLAY_MISSING 1
5116 EOF
5117 }
5118
5119   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5120 else
5121   if test -n "$x_includes"; then
5122     X_CFLAGS="$X_CFLAGS -I$x_includes"
5123   fi
5124
5125   # It would also be nice to do this for all -L options, not just this one.
5126   if test -n "$x_libraries"; then
5127     X_LIBS="$X_LIBS -L$x_libraries"
5128     # For Solaris; some versions of Sun CC require a space after -R and
5129     # others require no space.  Words are not sufficient . . . .
5130     case "`(uname -sr) 2>/dev/null`" in
5131     "SunOS 5"*)
5132       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5133 echo "configure:5134: checking whether -R must be followed by a space" >&5
5134       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5135       cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138
5139 int main() {
5140
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5144   rm -rf conftest*
5145   ac_R_nospace=yes
5146 else
5147   echo "configure: failed program was:" >&5
5148   cat conftest.$ac_ext >&5
5149   rm -rf conftest*
5150   ac_R_nospace=no
5151 fi
5152 rm -f conftest*
5153       if test $ac_R_nospace = yes; then
5154         echo "$ac_t""no" 1>&6
5155         X_LIBS="$X_LIBS -R$x_libraries"
5156       else
5157         LIBS="$ac_xsave_LIBS -R $x_libraries"
5158         cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161
5162 int main() {
5163
5164 ; return 0; }
5165 EOF
5166 if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5167   rm -rf conftest*
5168   ac_R_space=yes
5169 else
5170   echo "configure: failed program was:" >&5
5171   cat conftest.$ac_ext >&5
5172   rm -rf conftest*
5173   ac_R_space=no
5174 fi
5175 rm -f conftest*
5176         if test $ac_R_space = yes; then
5177           echo "$ac_t""yes" 1>&6
5178           X_LIBS="$X_LIBS -R $x_libraries"
5179         else
5180           echo "$ac_t""neither works" 1>&6
5181         fi
5182       fi
5183       LIBS="$ac_xsave_LIBS"
5184     esac
5185   fi
5186
5187   # Check for system-dependent libraries X programs must link with.
5188   # Do this before checking for the system-independent R6 libraries
5189   # (-lICE), since we may need -lsocket or whatever for X linking.
5190
5191   if test "$ISC" = yes; then
5192     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5193   else
5194     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5195     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5196     # the Alpha needs dnet_stub (dnet does not exist).
5197     if test "$with_dnet" = "no" ; then
5198 ac_cv_lib_dnet_dnet_ntoa=no
5199 else
5200
5201 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5202 echo "configure:5203: checking for dnet_ntoa in -ldnet" >&5
5203 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5204
5205 xe_check_libs=" -ldnet "
5206 cat > conftest.$ac_ext <<EOF
5207 #line 5208 "configure"
5208 #include "confdefs.h"
5209 /* Override any gcc2 internal prototype to avoid an error.  */
5210 /* We use char because int might match the return type of a gcc2
5211     builtin and then its argument prototype would still apply.  */
5212 char dnet_ntoa();
5213
5214 int main() {
5215 dnet_ntoa()
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219   rm -rf conftest*
5220   eval "ac_cv_lib_$ac_lib_var=yes"
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_lib_$ac_lib_var=no"
5226 fi
5227 rm -f conftest*
5228 xe_check_libs=""
5229
5230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5231   echo "$ac_t""yes" 1>&6
5232   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5233 else
5234   echo "$ac_t""no" 1>&6
5235 fi
5236
5237 fi
5238
5239     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5240       
5241 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5242 echo "configure:5243: checking for dnet_ntoa in -ldnet_stub" >&5
5243 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5244
5245 xe_check_libs=" -ldnet_stub "
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 /* Override any gcc2 internal prototype to avoid an error.  */
5250 /* We use char because int might match the return type of a gcc2
5251     builtin and then its argument prototype would still apply.  */
5252 char dnet_ntoa();
5253
5254 int main() {
5255 dnet_ntoa()
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   eval "ac_cv_lib_$ac_lib_var=yes"
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   eval "ac_cv_lib_$ac_lib_var=no"
5266 fi
5267 rm -f conftest*
5268 xe_check_libs=""
5269
5270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5271   echo "$ac_t""yes" 1>&6
5272   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5273 else
5274   echo "$ac_t""no" 1>&6
5275 fi
5276
5277
5278     fi
5279
5280     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5281     # to get the SysV transport functions.
5282     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5283     # needs -lnsl.
5284     # The nsl library prevents programs from opening the X display
5285     # on Irix 5.2, according to dickey@clark.net.
5286     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5287 echo "configure:5288: checking for gethostbyname" >&5
5288
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292 /* System header to define __stub macros and hopefully few prototypes,
5293     which can conflict with char gethostbyname(); below.  */
5294 #include <assert.h>
5295 /* Override any gcc2 internal prototype to avoid an error.  */
5296 /* We use char because int might match the return type of a gcc2
5297     builtin and then its argument prototype would still apply.  */
5298 char gethostbyname();
5299
5300 int main() {
5301
5302 /* The GNU C library defines this for functions which it implements
5303     to always fail with ENOSYS.  Some functions are actually named
5304     something starting with __ and the normal name is an alias.  */
5305 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5306 choke me
5307 #else
5308 gethostbyname();
5309 #endif
5310
5311 ; return 0; }
5312 EOF
5313 if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5314   rm -rf conftest*
5315   eval "ac_cv_func_gethostbyname=yes"
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   eval "ac_cv_func_gethostbyname=no"
5321 fi
5322 rm -f conftest*
5323
5324 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5325   echo "$ac_t""yes" 1>&6
5326   :
5327 else
5328   echo "$ac_t""no" 1>&6
5329 fi
5330
5331     if test $ac_cv_func_gethostbyname = no; then
5332       
5333 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5334 echo "configure:5335: checking for gethostbyname in -lnsl" >&5
5335 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5336
5337 xe_check_libs=" -lnsl "
5338 cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 /* We use char because int might match the return type of a gcc2
5343     builtin and then its argument prototype would still apply.  */
5344 char gethostbyname();
5345
5346 int main() {
5347 gethostbyname()
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_lib_$ac_lib_var=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=no"
5358 fi
5359 rm -f conftest*
5360 xe_check_libs=""
5361
5362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5363   echo "$ac_t""yes" 1>&6
5364   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5365 else
5366   echo "$ac_t""no" 1>&6
5367 fi
5368
5369
5370     fi
5371
5372     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5373     # socket/setsockopt and other routines are undefined under SCO ODT
5374     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5375     # on later versions), says simon@lia.di.epfl.ch: it contains
5376     # gethostby* variants that don't use the nameserver (or something).
5377     # -lsocket must be given before -lnsl if both are needed.
5378     # We assume that if connect needs -lnsl, so does gethostbyname.
5379     echo $ac_n "checking for connect""... $ac_c" 1>&6
5380 echo "configure:5381: checking for connect" >&5
5381
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 /* System header to define __stub macros and hopefully few prototypes,
5386     which can conflict with char connect(); below.  */
5387 #include <assert.h>
5388 /* Override any gcc2 internal prototype to avoid an error.  */
5389 /* We use char because int might match the return type of a gcc2
5390     builtin and then its argument prototype would still apply.  */
5391 char connect();
5392
5393 int main() {
5394
5395 /* The GNU C library defines this for functions which it implements
5396     to always fail with ENOSYS.  Some functions are actually named
5397     something starting with __ and the normal name is an alias.  */
5398 #if defined (__stub_connect) || defined (__stub___connect)
5399 choke me
5400 #else
5401 connect();
5402 #endif
5403
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5407   rm -rf conftest*
5408   eval "ac_cv_func_connect=yes"
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_func_connect=no"
5414 fi
5415 rm -f conftest*
5416
5417 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5418   echo "$ac_t""yes" 1>&6
5419   :
5420 else
5421   echo "$ac_t""no" 1>&6
5422 fi
5423
5424     if test $ac_cv_func_connect = no; then
5425       
5426 xe_msg_checking="for connect in -lsocket"
5427 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5428 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5429 echo "configure:5430: checking "$xe_msg_checking"" >&5
5430 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5431
5432 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5433 cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* Override any gcc2 internal prototype to avoid an error.  */
5437 /* We use char because int might match the return type of a gcc2
5438     builtin and then its argument prototype would still apply.  */
5439 char connect();
5440
5441 int main() {
5442 connect()
5443 ; return 0; }
5444 EOF
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446   rm -rf conftest*
5447   eval "ac_cv_lib_$ac_lib_var=yes"
5448 else
5449   echo "configure: failed program was:" >&5
5450   cat conftest.$ac_ext >&5
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=no"
5453 fi
5454 rm -f conftest*
5455 xe_check_libs=""
5456
5457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5458   echo "$ac_t""yes" 1>&6
5459   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5460 else
5461   echo "$ac_t""no" 1>&6
5462 fi
5463
5464
5465     fi
5466
5467     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5468     echo $ac_n "checking for remove""... $ac_c" 1>&6
5469 echo "configure:5470: checking for remove" >&5
5470
5471 cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 /* System header to define __stub macros and hopefully few prototypes,
5475     which can conflict with char remove(); below.  */
5476 #include <assert.h>
5477 /* Override any gcc2 internal prototype to avoid an error.  */
5478 /* We use char because int might match the return type of a gcc2
5479     builtin and then its argument prototype would still apply.  */
5480 char remove();
5481
5482 int main() {
5483
5484 /* The GNU C library defines this for functions which it implements
5485     to always fail with ENOSYS.  Some functions are actually named
5486     something starting with __ and the normal name is an alias.  */
5487 #if defined (__stub_remove) || defined (__stub___remove)
5488 choke me
5489 #else
5490 remove();
5491 #endif
5492
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496   rm -rf conftest*
5497   eval "ac_cv_func_remove=yes"
5498 else
5499   echo "configure: failed program was:" >&5
5500   cat conftest.$ac_ext >&5
5501   rm -rf conftest*
5502   eval "ac_cv_func_remove=no"
5503 fi
5504 rm -f conftest*
5505
5506 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5507   echo "$ac_t""yes" 1>&6
5508   :
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512
5513     if test $ac_cv_func_remove = no; then
5514       
5515 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5516 echo "configure:5517: checking for remove in -lposix" >&5
5517 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5518
5519 xe_check_libs=" -lposix "
5520 cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 /* Override any gcc2 internal prototype to avoid an error.  */
5524 /* We use char because int might match the return type of a gcc2
5525     builtin and then its argument prototype would still apply.  */
5526 char remove();
5527
5528 int main() {
5529 remove()
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   eval "ac_cv_lib_$ac_lib_var=yes"
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   eval "ac_cv_lib_$ac_lib_var=no"
5540 fi
5541 rm -f conftest*
5542 xe_check_libs=""
5543
5544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5545   echo "$ac_t""yes" 1>&6
5546   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5547 else
5548   echo "$ac_t""no" 1>&6
5549 fi
5550
5551
5552     fi
5553
5554     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5555     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5556 echo "configure:5557: checking for shmat" >&5
5557
5558 cat > conftest.$ac_ext <<EOF
5559 #line 5560 "configure"
5560 #include "confdefs.h"
5561 /* System header to define __stub macros and hopefully few prototypes,
5562     which can conflict with char shmat(); below.  */
5563 #include <assert.h>
5564 /* Override any gcc2 internal prototype to avoid an error.  */
5565 /* We use char because int might match the return type of a gcc2
5566     builtin and then its argument prototype would still apply.  */
5567 char shmat();
5568
5569 int main() {
5570
5571 /* The GNU C library defines this for functions which it implements
5572     to always fail with ENOSYS.  Some functions are actually named
5573     something starting with __ and the normal name is an alias.  */
5574 #if defined (__stub_shmat) || defined (__stub___shmat)
5575 choke me
5576 #else
5577 shmat();
5578 #endif
5579
5580 ; return 0; }
5581 EOF
5582 if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5583   rm -rf conftest*
5584   eval "ac_cv_func_shmat=yes"
5585 else
5586   echo "configure: failed program was:" >&5
5587   cat conftest.$ac_ext >&5
5588   rm -rf conftest*
5589   eval "ac_cv_func_shmat=no"
5590 fi
5591 rm -f conftest*
5592
5593 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5594   echo "$ac_t""yes" 1>&6
5595   :
5596 else
5597   echo "$ac_t""no" 1>&6
5598 fi
5599
5600     if test $ac_cv_func_shmat = no; then
5601       
5602 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5603 echo "configure:5604: checking for shmat in -lipc" >&5
5604 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5605
5606 xe_check_libs=" -lipc "
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 /* Override any gcc2 internal prototype to avoid an error.  */
5611 /* We use char because int might match the return type of a gcc2
5612     builtin and then its argument prototype would still apply.  */
5613 char shmat();
5614
5615 int main() {
5616 shmat()
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=yes"
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_lib_$ac_lib_var=no"
5627 fi
5628 rm -f conftest*
5629 xe_check_libs=""
5630
5631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5632   echo "$ac_t""yes" 1>&6
5633   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637
5638
5639     fi
5640   fi
5641
5642   # Check for libraries that X11R6 Xt/Xaw programs need.
5643   ac_save_LDFLAGS="$LDFLAGS"
5644   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5645   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5646   # check for ICE first), but we must link in the order -lSM -lICE or
5647   # we get undefined symbols.  So assume we have SM if we have ICE.
5648   # These have to be linked with before -lX11, unlike the other
5649   # libraries we check for below, so use a different variable.
5650   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5651   
5652 xe_msg_checking="for IceConnectionNumber in -lICE"
5653 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5654 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5655 echo "configure:5656: checking "$xe_msg_checking"" >&5
5656 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5657
5658 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5659 cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662 /* Override any gcc2 internal prototype to avoid an error.  */
5663 /* We use char because int might match the return type of a gcc2
5664     builtin and then its argument prototype would still apply.  */
5665 char IceConnectionNumber();
5666
5667 int main() {
5668 IceConnectionNumber()
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=yes"
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   eval "ac_cv_lib_$ac_lib_var=no"
5679 fi
5680 rm -f conftest*
5681 xe_check_libs=""
5682
5683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5684   echo "$ac_t""yes" 1>&6
5685   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5686 else
5687   echo "$ac_t""no" 1>&6
5688 fi
5689
5690
5691   LDFLAGS="$ac_save_LDFLAGS"
5692
5693 fi
5694  # Autoconf claims to find X library and include dirs for us.
5695   if test "$no_x" = "yes"
5696   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5697   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5698   fi
5699 fi
5700
5701 case "$with_x11" in
5702   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5703   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5704 esac
5705
5706 if test "$with_x11" = "yes"; then
5707   { test "$extra_verbose" = "yes" && cat << \EOF
5708     Defining HAVE_X_WINDOWS
5709 EOF
5710 cat >> confdefs.h <<\EOF
5711 #define HAVE_X_WINDOWS 1
5712 EOF
5713 }
5714
5715   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5716   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5717
5718       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5719     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5720     if test -d "$lib_dir" -a -d "$inc_dir"; then
5721       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5722         x_libraries="$lib_dir $x_libraries"
5723         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5724       esac
5725       case "$x_includes" in "$inc_dir"* ) ;; *)
5726         x_includes="$inc_dir $x_includes"
5727         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5728       esac
5729       break;       fi
5730   done
5731
5732     for rel in "X11R6" "X11R5" "X11R4"; do
5733     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5734     if test -d "$lib_dir" -a -d "$inc_dir"; then
5735       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5736         x_libraries="$x_libraries $lib_dir"
5737         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5738       esac
5739       case "$x_includes" in "$inc_dir"* ) ;; *)
5740         x_includes="$x_includes $inc_dir"
5741         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5742       esac
5743       break;     fi
5744   done
5745
5746     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
5747
5748   ld_switch_x_site="$X_LIBS"
5749
5750   
5751 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5752     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5753   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5754   
5755         runpath="" runpath_dirs=""
5756   if test -n "$LD_RUN_PATH"; then
5757     runpath="$LD_RUN_PATH"
5758   elif test "$GCC" = "yes"; then
5759         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5760     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5761     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5762     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5763       case "$arg" in P,* | -L* | -R* )
5764         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5765           {
5766 xe_runpath_dir="$dir"
5767   test "$xe_runpath_dir" != "/lib"     -a \
5768         "$xe_runpath_dir" != "/usr/lib" -a \
5769         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5770   eval "$xe_add_unique_runpath_dir"
5771 }
5772         done ;;
5773       esac
5774     done
5775     ld_switch_run="$ld_switch_run_save"
5776     rm -f conftest*
5777   else
5778         for arg in $ld_switch_site $ld_switch_x_site; do
5779       case "$arg" in -L*) {
5780 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5781   test "$xe_runpath_dir" != "/lib"     -a \
5782         "$xe_runpath_dir" != "/usr/lib" -a \
5783         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5784   eval "$xe_add_unique_runpath_dir"
5785 };; esac
5786     done
5787         if test "$opsys $need_motif" = "sol2 yes"; then
5788       xe_runpath_dir="/opt/SUNWdt/lib";
5789       eval "$xe_add_unique_runpath_dir";
5790     fi
5791   fi 
5792   if test -n "$runpath"; then
5793     ld_switch_run="${dash_r}${runpath}"
5794     
5795 if test "$GCC" = "yes"; then
5796   set x $ld_switch_run; shift; ld_switch_run=""
5797   while test -n "$1"; do
5798     case $1 in
5799       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5800       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5801       -Xlinker* ) ;;
5802       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5803     esac
5804     shift
5805   done
5806 fi
5807     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5808   fi
5809 fi
5810
5811
5812   if test "$extra_verbose" = "yes"; then
5813     echo; echo "X11 compilation variables:"
5814     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5815     echo
5816   fi
5817
5818             bitmapdirs=
5819   if test "$x_includes" != NONE; then
5820     for i in $x_includes; do
5821       if test -d "$i/bitmaps"; then
5822         bitmapdirs="$i/bitmaps:$bitmapdirs"
5823       fi
5824       if test -d "$i/X11/bitmaps"; then
5825         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5826       fi
5827     done
5828     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5829   fi
5830   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5831     Defining BITMAPDIR = "$bitmapdirs"
5832 EOF
5833 cat >> confdefs.h <<EOF
5834 #define BITMAPDIR "$bitmapdirs"
5835 EOF
5836 }
5837
5838
5839     echo "checking for X defines extracted by xmkmf" 1>&6
5840 echo "configure:5841: checking for X defines extracted by xmkmf" >&5
5841   rm -fr conftestdir
5842   if mkdir conftestdir; then
5843     cd conftestdir
5844     cat > Imakefile <<'EOF'
5845 xetest:
5846         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5847 EOF
5848     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5849       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5850       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5851     fi
5852     cd ..
5853     rm -fr conftestdir
5854     for word in $xmkmf_defines; do
5855       case "$word" in -D* )
5856         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5857         case "$word" in
5858           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5859           *     ) val=1 ;;
5860         esac
5861         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5862           if test "$val" = "1"
5863             then { test "$extra_verbose" = "yes" && cat << EOF
5864     Defining $sym
5865 EOF
5866 cat >> confdefs.h <<EOF
5867 #define $sym 1
5868 EOF
5869 }
5870
5871             else { test "$extra_verbose" = "yes" && cat << EOF
5872     Defining $sym = $val
5873 EOF
5874 cat >> confdefs.h <<EOF
5875 #define $sym $val
5876 EOF
5877 }
5878
5879           fi
5880         fi  ;;
5881       esac
5882     done
5883   fi
5884
5885     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5886 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5887 echo "configure:5888: checking for X11/Intrinsic.h" >&5
5888
5889 cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 #include <X11/Intrinsic.h>
5893 EOF
5894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5895 { (eval echo configure:5896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5897 if test -z "$ac_err"; then
5898   rm -rf conftest*
5899   eval "ac_cv_header_$ac_safe=yes"
5900 else
5901   echo "$ac_err" >&5
5902   echo "configure: failed program was:" >&5
5903   cat conftest.$ac_ext >&5
5904   rm -rf conftest*
5905   eval "ac_cv_header_$ac_safe=no"
5906 fi
5907 rm -f conftest*
5908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5909   echo "$ac_t""yes" 1>&6
5910   :
5911 else
5912   echo "$ac_t""no" 1>&6
5913 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5914 fi
5915
5916
5917       
5918 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5919 echo "configure:5920: checking for XOpenDisplay in -lX11" >&5
5920 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5921
5922 xe_check_libs=" -lX11 "
5923 cat > conftest.$ac_ext <<EOF
5924 #line 5925 "configure"
5925 #include "confdefs.h"
5926 /* Override any gcc2 internal prototype to avoid an error.  */
5927 /* We use char because int might match the return type of a gcc2
5928     builtin and then its argument prototype would still apply.  */
5929 char XOpenDisplay();
5930
5931 int main() {
5932 XOpenDisplay()
5933 ; return 0; }
5934 EOF
5935 if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5936   rm -rf conftest*
5937   eval "ac_cv_lib_$ac_lib_var=yes"
5938 else
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_lib_$ac_lib_var=no"
5943 fi
5944 rm -f conftest*
5945 xe_check_libs=""
5946
5947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5948   echo "$ac_t""yes" 1>&6
5949   have_lib_x11=yes
5950 else
5951   echo "$ac_t""no" 1>&6
5952 fi
5953
5954
5955   if test "$have_lib_x11" != "yes"; then
5956     
5957 xe_msg_checking="for XGetFontProperty in -lX11"
5958 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5959 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5960 echo "configure:5961: checking "$xe_msg_checking"" >&5
5961 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5962
5963 xe_check_libs=" -lX11 -b i486-linuxaout"
5964 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967 /* Override any gcc2 internal prototype to avoid an error.  */
5968 /* We use char because int might match the return type of a gcc2
5969     builtin and then its argument prototype would still apply.  */
5970 char XGetFontProperty();
5971
5972 int main() {
5973 XGetFontProperty()
5974 ; return 0; }
5975 EOF
5976 if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5977   rm -rf conftest*
5978   eval "ac_cv_lib_$ac_lib_var=yes"
5979 else
5980   echo "configure: failed program was:" >&5
5981   cat conftest.$ac_ext >&5
5982   rm -rf conftest*
5983   eval "ac_cv_lib_$ac_lib_var=no"
5984 fi
5985 rm -f conftest*
5986 xe_check_libs=""
5987
5988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5989   echo "$ac_t""yes" 1>&6
5990   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5991 else
5992   echo "$ac_t""no" 1>&6
5993 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5994 fi
5995
5996
5997   fi
5998   libs_x="-lX11"
5999   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6000
6001     
6002 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6003 echo "configure:6004: checking for XShapeSelectInput in -lXext" >&5
6004 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6005
6006 xe_check_libs=" -lXext "
6007 cat > conftest.$ac_ext <<EOF
6008 #line 6009 "configure"
6009 #include "confdefs.h"
6010 /* Override any gcc2 internal prototype to avoid an error.  */
6011 /* We use char because int might match the return type of a gcc2
6012     builtin and then its argument prototype would still apply.  */
6013 char XShapeSelectInput();
6014
6015 int main() {
6016 XShapeSelectInput()
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=yes"
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=no"
6027 fi
6028 rm -f conftest*
6029 xe_check_libs=""
6030
6031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6032   echo "$ac_t""yes" 1>&6
6033   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6034 else
6035   echo "$ac_t""no" 1>&6
6036 fi
6037
6038
6039
6040     
6041 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6042 echo "configure:6043: checking for XtOpenDisplay in -lXt" >&5
6043 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6044
6045 xe_check_libs=" -lXt "
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* Override any gcc2 internal prototype to avoid an error.  */
6050 /* We use char because int might match the return type of a gcc2
6051     builtin and then its argument prototype would still apply.  */
6052 char XtOpenDisplay();
6053
6054 int main() {
6055 XtOpenDisplay()
6056 ; return 0; }
6057 EOF
6058 if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6059   rm -rf conftest*
6060   eval "ac_cv_lib_$ac_lib_var=yes"
6061 else
6062   echo "configure: failed program was:" >&5
6063   cat conftest.$ac_ext >&5
6064   rm -rf conftest*
6065   eval "ac_cv_lib_$ac_lib_var=no"
6066 fi
6067 rm -f conftest*
6068 xe_check_libs=""
6069
6070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6071   echo "$ac_t""yes" 1>&6
6072   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6073 else
6074   echo "$ac_t""no" 1>&6
6075 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6076 fi
6077
6078
6079
6080   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6081 echo "configure:6082: checking the version of X11 being used" >&5
6082   cat > conftest.$ac_ext <<EOF
6083 #line 6084 "configure"
6084 #include "confdefs.h"
6085 #include <X11/Intrinsic.h>
6086     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6089 then
6090   ./conftest foobar; x11_release=$?
6091 else
6092   conftest_rc="$?"
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -fr conftest*
6096   x11_release=4
6097 fi
6098 rm -fr conftest*
6099   echo "$ac_t""R${x11_release}" 1>&6
6100   { test "$extra_verbose" = "yes" && cat << EOF
6101     Defining THIS_IS_X11R${x11_release}
6102 EOF
6103 cat >> confdefs.h <<EOF
6104 #define THIS_IS_X11R${x11_release} 1
6105 EOF
6106 }
6107
6108
6109   for ac_func in XConvertCase
6110 do
6111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6112 echo "configure:6113: checking for $ac_func" >&5
6113
6114 cat > conftest.$ac_ext <<EOF
6115 #line 6116 "configure"
6116 #include "confdefs.h"
6117 /* System header to define __stub macros and hopefully few prototypes,
6118     which can conflict with char $ac_func(); below.  */
6119 #include <assert.h>
6120 /* Override any gcc2 internal prototype to avoid an error.  */
6121 /* We use char because int might match the return type of a gcc2
6122     builtin and then its argument prototype would still apply.  */
6123 char $ac_func();
6124
6125 int main() {
6126
6127 /* The GNU C library defines this for functions which it implements
6128     to always fail with ENOSYS.  Some functions are actually named
6129     something starting with __ and the normal name is an alias.  */
6130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6131 choke me
6132 #else
6133 $ac_func();
6134 #endif
6135
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=yes"
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_func_$ac_func=no"
6146 fi
6147 rm -f conftest*
6148
6149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6150   echo "$ac_t""yes" 1>&6
6151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6152   { test "$extra_verbose" = "yes" && cat << EOF
6153     Defining $ac_tr_func
6154 EOF
6155 cat >> confdefs.h <<EOF
6156 #define $ac_tr_func 1
6157 EOF
6158 }
6159  
6160 else
6161   echo "$ac_t""no" 1>&6
6162 fi
6163 done
6164
6165
6166   for ac_hdr in X11/Xlocale.h
6167 do
6168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6170 echo "configure:6171: checking for $ac_hdr" >&5
6171
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 #include <$ac_hdr>
6176 EOF
6177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6178 { (eval echo configure:6179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6180 if test -z "$ac_err"; then
6181   rm -rf conftest*
6182   eval "ac_cv_header_$ac_safe=yes"
6183 else
6184   echo "$ac_err" >&5
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -rf conftest*
6188   eval "ac_cv_header_$ac_safe=no"
6189 fi
6190 rm -f conftest*
6191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6192   echo "$ac_t""yes" 1>&6
6193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6194   { test "$extra_verbose" = "yes" && cat << EOF
6195     Defining $ac_tr_hdr
6196 EOF
6197 cat >> confdefs.h <<EOF
6198 #define $ac_tr_hdr 1
6199 EOF
6200 }
6201  
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205 done
6206
6207
6208     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6209 echo "configure:6210: checking for XFree86" >&5
6210   if test -d "/usr/X386/include" -o \
6211           -f "/etc/XF86Config"    -o \
6212           -f "/etc/X11/XF86Config" -o \
6213           -f "/usr/X11R6/lib/X11/XF86Config"; then
6214     echo "$ac_t""yes" 1>&6
6215     { test "$extra_verbose" = "yes" && cat << \EOF
6216     Defining HAVE_XFREE386
6217 EOF
6218 cat >> confdefs.h <<\EOF
6219 #define HAVE_XFREE386 1
6220 EOF
6221 }
6222
6223   else
6224     echo "$ac_t""no" 1>&6
6225   fi
6226
6227     test -z "$with_xmu" && { 
6228 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6229 echo "configure:6230: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6230 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6231
6232 xe_check_libs=" -lXmu "
6233 cat > conftest.$ac_ext <<EOF
6234 #line 6235 "configure"
6235 #include "confdefs.h"
6236 /* Override any gcc2 internal prototype to avoid an error.  */
6237 /* We use char because int might match the return type of a gcc2
6238     builtin and then its argument prototype would still apply.  */
6239 char XmuReadBitmapDataFromFile();
6240
6241 int main() {
6242 XmuReadBitmapDataFromFile()
6243 ; return 0; }
6244 EOF
6245 if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6246   rm -rf conftest*
6247   eval "ac_cv_lib_$ac_lib_var=yes"
6248 else
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   eval "ac_cv_lib_$ac_lib_var=no"
6253 fi
6254 rm -f conftest*
6255 xe_check_libs=""
6256
6257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6258   echo "$ac_t""yes" 1>&6
6259   with_xmu=yes
6260 else
6261   echo "$ac_t""no" 1>&6
6262 with_xmu=no
6263 fi
6264
6265  }
6266   if test "$with_xmu" = "no"; then
6267     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6268    echo "    xemacs will be linked with \"xmu.o\""
6269  fi
6270   else
6271     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6272     { test "$extra_verbose" = "yes" && cat << \EOF
6273     Defining HAVE_XMU
6274 EOF
6275 cat >> confdefs.h <<\EOF
6276 #define HAVE_XMU 1
6277 EOF
6278 }
6279
6280   fi
6281
6282       
6283 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6284 echo "configure:6285: checking for main in -lXbsd" >&5
6285 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6286
6287 xe_check_libs=" -lXbsd "
6288 cat > conftest.$ac_ext <<EOF
6289 #line 6290 "configure"
6290 #include "confdefs.h"
6291
6292 int main() {
6293 main()
6294 ; return 0; }
6295 EOF
6296 if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6297   rm -rf conftest*
6298   eval "ac_cv_lib_$ac_lib_var=yes"
6299 else
6300   echo "configure: failed program was:" >&5
6301   cat conftest.$ac_ext >&5
6302   rm -rf conftest*
6303   eval "ac_cv_lib_$ac_lib_var=no"
6304 fi
6305 rm -f conftest*
6306 xe_check_libs=""
6307
6308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6309   echo "$ac_t""yes" 1>&6
6310   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6311 else
6312   echo "$ac_t""no" 1>&6
6313 fi
6314
6315
6316
6317     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6318         if test "$GCC" = "yes"; then
6319       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6320       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6321     else
6322       case "$CC" in
6323         "xlc" ) CC="xlc_r" ;;
6324         "xlC" ) CC="xlC_r" ;;
6325         "cc"  ) CC="cc_r" ;;
6326       esac
6327     fi
6328   fi
6329
6330 fi 
6331 if test "$with_msw" != "no"; then
6332   echo "checking for MS-Windows" 1>&6
6333 echo "configure:6334: checking for MS-Windows" >&5
6334   
6335 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6336 echo "configure:6337: checking for main in -lgdi32" >&5
6337 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6338
6339 xe_check_libs=" -lgdi32 "
6340 cat > conftest.$ac_ext <<EOF
6341 #line 6342 "configure"
6342 #include "confdefs.h"
6343
6344 int main() {
6345 main()
6346 ; return 0; }
6347 EOF
6348 if { (eval echo configure:6349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6349   rm -rf conftest*
6350   eval "ac_cv_lib_$ac_lib_var=yes"
6351 else
6352   echo "configure: failed program was:" >&5
6353   cat conftest.$ac_ext >&5
6354   rm -rf conftest*
6355   eval "ac_cv_lib_$ac_lib_var=no"
6356 fi
6357 rm -f conftest*
6358 xe_check_libs=""
6359
6360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6361   echo "$ac_t""yes" 1>&6
6362   with_msw=yes
6363 else
6364   echo "$ac_t""no" 1>&6
6365 fi
6366
6367
6368   if test "$with_msw" = "yes"; then
6369     { test "$extra_verbose" = "yes" && cat << \EOF
6370     Defining HAVE_MS_WINDOWS
6371 EOF
6372 cat >> confdefs.h <<\EOF
6373 #define HAVE_MS_WINDOWS 1
6374 EOF
6375 }
6376
6377     install_pp="$blddir/lib-src/installexe.sh"
6378     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
6379     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6380     if test "$window_system" != x11; then
6381         window_system=msw
6382         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6383             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6384    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6385  fi
6386         test "$with_menubars"   != "no" && with_menubars=msw \
6387             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6388    echo "    xemacs will be linked with \"menubar-msw.o\""
6389  fi
6390         test "$with_toolbars"   != "no" && with_toolbars=msw \
6391             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6392    echo "    xemacs will be linked with \"toolbar-msw.o\""
6393  fi
6394         test "$with_dialogs"   != "no" && with_dialogs=msw \
6395             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6396    echo "    xemacs will be linked with \"dialog-msw.o\""
6397  fi
6398         test "$with_widgets"   != "no" && with_widgets=msw
6399     else
6400         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6401    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6402  fi
6403         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6404    echo "    xemacs will be linked with \"menubar-msw.o\""
6405  fi
6406         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6407    echo "    xemacs will be linked with \"toolbar-msw.o\""
6408  fi
6409         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6410    echo "    xemacs will be linked with \"dialog-msw.o\""
6411  fi
6412     fi
6413         cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 #include <fcntl.h>
6417     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6418 EOF
6419 if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6420 then
6421   { test "$extra_verbose" = "yes" && cat << \EOF
6422     Defining HAVE_MSG_SELECT
6423 EOF
6424 cat >> confdefs.h <<\EOF
6425 #define HAVE_MSG_SELECT 1
6426 EOF
6427 }
6428
6429 else
6430   conftest_rc="$?"
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433 fi
6434 rm -fr conftest*
6435     with_file_coding=yes
6436     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
6437    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\""
6438  fi
6439   fi
6440 fi
6441
6442
6443
6444 test -z "$window_system" && window_system="none"
6445
6446 if test "$window_system" = "none"; then
6447   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6448   do
6449     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6450        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6451     fi
6452     eval "with_${feature}=no"
6453   done
6454 else
6455   test -z "$with_toolbars" && with_toolbars=yes
6456 fi
6457
6458 if test "$with_msw" != "yes"; then
6459   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6460   do
6461     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6462        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6463     fi
6464     eval "with_${feature}=no"
6465   done
6466 else
6467   :
6468 fi
6469
6470 if test "$with_x11" != "yes"; then
6471             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6472   do
6473     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6474        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6475     fi
6476     eval "with_${feature}=no"
6477   done
6478 fi
6479
6480 bitmapdir=
6481
6482 case "$window_system" in
6483   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6484   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6485   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6486 esac
6487
6488 case "$x_libraries" in *X11R4* )
6489   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6490   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6491 esac
6492
6493 echo "checking for WM_COMMAND option" 1>&6
6494 echo "configure:6495: checking for WM_COMMAND option" >&5;
6495 if test "$with_wmcommand" != "no"; then
6496   { test "$extra_verbose" = "yes" && cat << \EOF
6497     Defining HAVE_WMCOMMAND
6498 EOF
6499 cat >> confdefs.h <<\EOF
6500 #define HAVE_WMCOMMAND 1
6501 EOF
6502 }
6503
6504 fi
6505
6506 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6507 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6508 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6509 echo "configure:6510: checking for X11/Xauth.h" >&5
6510
6511 cat > conftest.$ac_ext <<EOF
6512 #line 6513 "configure"
6513 #include "confdefs.h"
6514 #include <X11/Xauth.h>
6515 EOF
6516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6517 { (eval echo configure:6518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6519 if test -z "$ac_err"; then
6520   rm -rf conftest*
6521   eval "ac_cv_header_$ac_safe=yes"
6522 else
6523   echo "$ac_err" >&5
6524   echo "configure: failed program was:" >&5
6525   cat conftest.$ac_ext >&5
6526   rm -rf conftest*
6527   eval "ac_cv_header_$ac_safe=no"
6528 fi
6529 rm -f conftest*
6530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6531   echo "$ac_t""yes" 1>&6
6532   :
6533 else
6534   echo "$ac_t""no" 1>&6
6535 with_xauth=no
6536 fi
6537  }
6538 test -z "$with_xauth" && { 
6539 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6540 echo "configure:6541: checking for XauGetAuthByAddr in -lXau" >&5
6541 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6542
6543 xe_check_libs=" -lXau "
6544 cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 /* We use char because int might match the return type of a gcc2
6549     builtin and then its argument prototype would still apply.  */
6550 char XauGetAuthByAddr();
6551
6552 int main() {
6553 XauGetAuthByAddr()
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6557   rm -rf conftest*
6558   eval "ac_cv_lib_$ac_lib_var=yes"
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   eval "ac_cv_lib_$ac_lib_var=no"
6564 fi
6565 rm -f conftest*
6566 xe_check_libs=""
6567
6568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6569   echo "$ac_t""yes" 1>&6
6570   :
6571 else
6572   echo "$ac_t""no" 1>&6
6573 with_xauth=no
6574 fi
6575
6576  }
6577 test -z "$with_xauth" && with_xauth=yes
6578 if test "$with_xauth" = "yes"; then
6579   { test "$extra_verbose" = "yes" && cat << \EOF
6580     Defining HAVE_XAUTH
6581 EOF
6582 cat >> confdefs.h <<\EOF
6583 #define HAVE_XAUTH 1
6584 EOF
6585 }
6586
6587   
6588 T=""
6589 for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
6590 libs_xauth="$T"
6591
6592 fi
6593
6594
6595
6596
6597 if test "$with_tooltalk" != "no" ; then
6598       for dir in "" "Tt/" "desktop/" ; do
6599     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6600 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6601 echo "configure:6602: checking for ${dir}tt_c.h" >&5
6602
6603 cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 #include <${dir}tt_c.h>
6607 EOF
6608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6609 { (eval echo configure:6610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6611 if test -z "$ac_err"; then
6612   rm -rf conftest*
6613   eval "ac_cv_header_$ac_safe=yes"
6614 else
6615   echo "$ac_err" >&5
6616   echo "configure: failed program was:" >&5
6617   cat conftest.$ac_ext >&5
6618   rm -rf conftest*
6619   eval "ac_cv_header_$ac_safe=no"
6620 fi
6621 rm -f conftest*
6622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6623   echo "$ac_t""yes" 1>&6
6624   tt_c_h_file="${dir}tt_c.h"; break
6625 else
6626   echo "$ac_t""no" 1>&6
6627 fi
6628
6629   done
6630   if test -z "$tt_c_h_file"; then
6631     if test "$with_tooltalk" = "yes"; then
6632       (echo "$progname: Usage error:"
6633 echo " " "Unable to find required tooltalk header files."
6634 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6635     fi
6636     with_tooltalk=no
6637   fi
6638 fi
6639 if test "$with_tooltalk" != "no" ; then
6640   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6641     
6642 xe_msg_checking="for tt_message_create in -ltt"
6643 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6644 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6645 echo "configure:6646: checking "$xe_msg_checking"" >&5
6646 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6647
6648 xe_check_libs=" -ltt $extra_libs"
6649 cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char tt_message_create();
6656
6657 int main() {
6658 tt_message_create()
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=no"
6669 fi
6670 rm -f conftest*
6671 xe_check_libs=""
6672
6673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6674   echo "$ac_t""yes" 1>&6
6675   tt_libs="-ltt $extra_libs"; break
6676 else
6677   echo "$ac_t""no" 1>&6
6678 :
6679 fi
6680
6681
6682   done
6683   if test -z "$tt_libs"; then
6684     if test "$with_tooltalk" = "yes"; then
6685       (echo "$progname: Usage error:"
6686 echo " " "Unable to find required tooltalk libraries."
6687 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6688     fi
6689     with_tooltalk=no
6690   fi
6691 fi
6692 test -z "$with_tooltalk" && with_tooltalk=yes
6693 if test "$with_tooltalk" = "yes"; then
6694   { test "$extra_verbose" = "yes" && cat << \EOF
6695     Defining TOOLTALK
6696 EOF
6697 cat >> confdefs.h <<\EOF
6698 #define TOOLTALK 1
6699 EOF
6700 }
6701
6702   { test "$extra_verbose" = "yes" && cat << EOF
6703     Defining TT_C_H_FILE = "$tt_c_h_file"
6704 EOF
6705 cat >> confdefs.h <<EOF
6706 #define TT_C_H_FILE "$tt_c_h_file"
6707 EOF
6708 }
6709
6710   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6711   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6712    echo "    xemacs will be linked with \"tooltalk.o\""
6713  fi
6714 fi
6715
6716 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6717 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6718 echo "configure:6719: checking for Dt/Dt.h" >&5
6719
6720 cat > conftest.$ac_ext <<EOF
6721 #line 6722 "configure"
6722 #include "confdefs.h"
6723 #include <Dt/Dt.h>
6724 EOF
6725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6726 { (eval echo configure:6727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6728 if test -z "$ac_err"; then
6729   rm -rf conftest*
6730   eval "ac_cv_header_$ac_safe=yes"
6731 else
6732   echo "$ac_err" >&5
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_header_$ac_safe=no"
6737 fi
6738 rm -f conftest*
6739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6740   echo "$ac_t""yes" 1>&6
6741   :
6742 else
6743   echo "$ac_t""no" 1>&6
6744 with_cde=no
6745 fi
6746  }
6747 test -z "$with_cde" && { 
6748 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6749 echo "configure:6750: checking for DtDndDragStart in -lDtSvc" >&5
6750 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6751
6752 xe_check_libs=" -lDtSvc "
6753 cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 /* Override any gcc2 internal prototype to avoid an error.  */
6757 /* We use char because int might match the return type of a gcc2
6758     builtin and then its argument prototype would still apply.  */
6759 char DtDndDragStart();
6760
6761 int main() {
6762 DtDndDragStart()
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6766   rm -rf conftest*
6767   eval "ac_cv_lib_$ac_lib_var=yes"
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   eval "ac_cv_lib_$ac_lib_var=no"
6773 fi
6774 rm -f conftest*
6775 xe_check_libs=""
6776
6777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6778   echo "$ac_t""yes" 1>&6
6779   :
6780 else
6781   echo "$ac_t""no" 1>&6
6782 with_cde=no
6783 fi
6784
6785  }
6786 test -z "$with_cde" && with_cde=yes
6787 if test "$with_dragndrop" = no; then
6788   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6789   with_cde=no
6790 fi
6791 if test "$with_cde" = "yes" ; then
6792   { test "$extra_verbose" = "yes" && cat << \EOF
6793     Defining HAVE_CDE
6794 EOF
6795 cat >> confdefs.h <<\EOF
6796 #define HAVE_CDE 1
6797 EOF
6798 }
6799
6800   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6801   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6802   with_tooltalk=yes # CDE requires Tooltalk
6803   need_motif=yes    # CDE requires Motif
6804 fi
6805
6806 test "$window_system" != "x11" && with_offix=no
6807 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6808   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6809   with_offix=no
6810 fi
6811 if test "$with_dragndrop" = no; then
6812   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6813   with_offix=no
6814 fi
6815 if test "$with_cde" = yes; then
6816   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6817   with_offix=no
6818 fi
6819 test -z "$with_offix" && with_offix=no
6820 if test "$with_offix" = "yes"; then
6821   { test "$extra_verbose" = "yes" && cat << \EOF
6822     Defining HAVE_OFFIX_DND
6823 EOF
6824 cat >> confdefs.h <<\EOF
6825 #define HAVE_OFFIX_DND 1
6826 EOF
6827 }
6828
6829   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6830   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6831 fi
6832
6833 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6834 echo "configure:6835: checking if drag and drop API is needed" >&5
6835 if test "$with_dragndrop" != "no" ; then
6836   if test -n "$dragndrop_proto" ; then
6837     with_dragndrop=yes
6838     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6839     { test "$extra_verbose" = "yes" && cat << \EOF
6840     Defining HAVE_DRAGNDROP
6841 EOF
6842 cat >> confdefs.h <<\EOF
6843 #define HAVE_DRAGNDROP 1
6844 EOF
6845 }
6846
6847     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6848   else
6849     with_dragndrop=no
6850     echo "$ac_t""no" 1>&6
6851   fi
6852 fi
6853
6854 echo "checking for LDAP" 1>&6
6855 echo "configure:6856: checking for LDAP" >&5
6856 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6857 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6858 echo "configure:6859: checking for ldap.h" >&5
6859
6860 cat > conftest.$ac_ext <<EOF
6861 #line 6862 "configure"
6862 #include "confdefs.h"
6863 #include <ldap.h>
6864 EOF
6865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6866 { (eval echo configure:6867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6868 if test -z "$ac_err"; then
6869   rm -rf conftest*
6870   eval "ac_cv_header_$ac_safe=yes"
6871 else
6872   echo "$ac_err" >&5
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_header_$ac_safe=no"
6877 fi
6878 rm -f conftest*
6879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6880   echo "$ac_t""yes" 1>&6
6881   :
6882 else
6883   echo "$ac_t""no" 1>&6
6884 with_ldap=no
6885 fi
6886  }
6887 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6888 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6889 echo "configure:6890: checking for lber.h" >&5
6890
6891 cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894 #include <lber.h>
6895 EOF
6896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6897 { (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6899 if test -z "$ac_err"; then
6900   rm -rf conftest*
6901   eval "ac_cv_header_$ac_safe=yes"
6902 else
6903   echo "$ac_err" >&5
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   eval "ac_cv_header_$ac_safe=no"
6908 fi
6909 rm -f conftest*
6910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6911   echo "$ac_t""yes" 1>&6
6912   :
6913 else
6914   echo "$ac_t""no" 1>&6
6915 with_ldap=no
6916 fi
6917  }
6918 if test "$with_ldap" != "no"; then
6919   
6920 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6921 echo "configure:6922: checking for ldap_search in -lldap" >&5
6922 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6923
6924 xe_check_libs=" -lldap "
6925 cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 /* Override any gcc2 internal prototype to avoid an error.  */
6929 /* We use char because int might match the return type of a gcc2
6930     builtin and then its argument prototype would still apply.  */
6931 char ldap_search();
6932
6933 int main() {
6934 ldap_search()
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=yes"
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=no"
6945 fi
6946 rm -f conftest*
6947 xe_check_libs=""
6948
6949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6950   echo "$ac_t""yes" 1>&6
6951   with_ldap_nolber=yes
6952 else
6953   echo "$ac_t""no" 1>&6
6954 with_ldap_nolber=no
6955 fi
6956
6957
6958   test "$with_ldap_nolber" = "no" && { 
6959 xe_msg_checking="for ldap_open in -lldap"
6960 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6961 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6962 echo "configure:6963: checking "$xe_msg_checking"" >&5
6963 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6964
6965 xe_check_libs=" -lldap -llber"
6966 cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 /* Override any gcc2 internal prototype to avoid an error.  */
6970 /* We use char because int might match the return type of a gcc2
6971     builtin and then its argument prototype would still apply.  */
6972 char ldap_open();
6973
6974 int main() {
6975 ldap_open()
6976 ; return 0; }
6977 EOF
6978 if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=yes"
6981 else
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984   rm -rf conftest*
6985   eval "ac_cv_lib_$ac_lib_var=no"
6986 fi
6987 rm -f conftest*
6988 xe_check_libs=""
6989
6990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6991   echo "$ac_t""yes" 1>&6
6992   with_ldap_lber=yes
6993 else
6994   echo "$ac_t""no" 1>&6
6995 with_ldap_lber=no
6996 fi
6997
6998  }
6999   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7000 xe_msg_checking="for ldap_open in -lldap"
7001 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7002 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7003 echo "configure:7004: checking "$xe_msg_checking"" >&5
7004 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7005
7006 xe_check_libs=" -lldap -llber -lkrb"
7007 cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010 /* Override any gcc2 internal prototype to avoid an error.  */
7011 /* We use char because int might match the return type of a gcc2
7012     builtin and then its argument prototype would still apply.  */
7013 char ldap_open();
7014
7015 int main() {
7016 ldap_open()
7017 ; return 0; }
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7020   rm -rf conftest*
7021   eval "ac_cv_lib_$ac_lib_var=yes"
7022 else
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   eval "ac_cv_lib_$ac_lib_var=no"
7027 fi
7028 rm -f conftest*
7029 xe_check_libs=""
7030
7031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7032   echo "$ac_t""yes" 1>&6
7033   with_ldap_krb=yes
7034 else
7035   echo "$ac_t""no" 1>&6
7036 with_ldap_krb=no
7037 fi
7038
7039  }
7040   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7041 xe_msg_checking="for ldap_open in -lldap"
7042 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7043 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7044 echo "configure:7045: checking "$xe_msg_checking"" >&5
7045 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7046
7047 xe_check_libs=" -lldap -llber -lkrb -ldes"
7048 cat > conftest.$ac_ext <<EOF
7049 #line 7050 "configure"
7050 #include "confdefs.h"
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char ldap_open();
7055
7056 int main() {
7057 ldap_open()
7058 ; return 0; }
7059 EOF
7060 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7061   rm -rf conftest*
7062   eval "ac_cv_lib_$ac_lib_var=yes"
7063 else
7064   echo "configure: failed program was:" >&5
7065   cat conftest.$ac_ext >&5
7066   rm -rf conftest*
7067   eval "ac_cv_lib_$ac_lib_var=no"
7068 fi
7069 rm -f conftest*
7070 xe_check_libs=""
7071
7072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7073   echo "$ac_t""yes" 1>&6
7074   with_ldap_krbdes=yes
7075 else
7076   echo "$ac_t""no" 1>&6
7077 with_ldap_krbdes=no
7078 fi
7079
7080  }
7081   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
7082 fi
7083 if test "$with_ldap" = "yes"; then
7084   { test "$extra_verbose" = "yes" && cat << \EOF
7085     Defining HAVE_LDAP
7086 EOF
7087 cat >> confdefs.h <<\EOF
7088 #define HAVE_LDAP 1
7089 EOF
7090 }
7091
7092   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7093    echo "    xemacs will be linked with \"eldap.o\""
7094  fi
7095   if test "$with_ldap_nolber" = "yes" ; then
7096     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7097   else
7098     if test "$with_ldap_krb" = "yes" ; then
7099       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7100     fi
7101     if test "$with_ldap_krbdes" = "yes" ; then
7102       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7103       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7104     fi
7105     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7106     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7107   fi
7108   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7109 do
7110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7111 echo "configure:7112: checking for $ac_func" >&5
7112
7113 cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 /* System header to define __stub macros and hopefully few prototypes,
7117     which can conflict with char $ac_func(); below.  */
7118 #include <assert.h>
7119 /* Override any gcc2 internal prototype to avoid an error.  */
7120 /* We use char because int might match the return type of a gcc2
7121     builtin and then its argument prototype would still apply.  */
7122 char $ac_func();
7123
7124 int main() {
7125
7126 /* The GNU C library defines this for functions which it implements
7127     to always fail with ENOSYS.  Some functions are actually named
7128     something starting with __ and the normal name is an alias.  */
7129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7130 choke me
7131 #else
7132 $ac_func();
7133 #endif
7134
7135 ; return 0; }
7136 EOF
7137 if { (eval echo configure:7138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7138   rm -rf conftest*
7139   eval "ac_cv_func_$ac_func=yes"
7140 else
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -rf conftest*
7144   eval "ac_cv_func_$ac_func=no"
7145 fi
7146 rm -f conftest*
7147
7148 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7149   echo "$ac_t""yes" 1>&6
7150     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7151   { test "$extra_verbose" = "yes" && cat << EOF
7152     Defining $ac_tr_func
7153 EOF
7154 cat >> confdefs.h <<EOF
7155 #define $ac_tr_func 1
7156 EOF
7157 }
7158  
7159 else
7160   echo "$ac_t""no" 1>&6
7161 fi
7162 done
7163
7164 fi
7165
7166 if test "$with_postgresql" != "no"; then
7167   echo "checking for PostgreSQL" 1>&6
7168 echo "configure:7169: checking for PostgreSQL" >&5
7169
7170   for header_dir in "" "pgsql/" "postgresql/"; do
7171     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7172 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7173 echo "configure:7174: checking for ${header_dir}libpq-fe.h" >&5
7174
7175 cat > conftest.$ac_ext <<EOF
7176 #line 7177 "configure"
7177 #include "confdefs.h"
7178 #include <${header_dir}libpq-fe.h>
7179 EOF
7180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7181 { (eval echo configure:7182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7183 if test -z "$ac_err"; then
7184   rm -rf conftest*
7185   eval "ac_cv_header_$ac_safe=yes"
7186 else
7187   echo "$ac_err" >&5
7188   echo "configure: failed program was:" >&5
7189   cat conftest.$ac_ext >&5
7190   rm -rf conftest*
7191   eval "ac_cv_header_$ac_safe=no"
7192 fi
7193 rm -f conftest*
7194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7195   echo "$ac_t""yes" 1>&6
7196   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7197 else
7198   echo "$ac_t""no" 1>&6
7199 fi
7200
7201   done
7202
7203   test -n "$libpq_fe_h_file" && { 
7204 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7205 echo "configure:7206: checking for PQconnectdb in -lpq" >&5
7206 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7207
7208 xe_check_libs=" -lpq "
7209 cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 /* Override any gcc2 internal prototype to avoid an error.  */
7213 /* We use char because int might match the return type of a gcc2
7214     builtin and then its argument prototype would still apply.  */
7215 char PQconnectdb();
7216
7217 int main() {
7218 PQconnectdb()
7219 ; return 0; }
7220 EOF
7221 if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7222   rm -rf conftest*
7223   eval "ac_cv_lib_$ac_lib_var=yes"
7224 else
7225   echo "configure: failed program was:" >&5
7226   cat conftest.$ac_ext >&5
7227   rm -rf conftest*
7228   eval "ac_cv_lib_$ac_lib_var=no"
7229 fi
7230 rm -f conftest*
7231 xe_check_libs=""
7232
7233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7234   echo "$ac_t""yes" 1>&6
7235   have_libpq=yes
7236 else
7237   echo "$ac_t""no" 1>&6
7238 fi
7239
7240  }
7241
7242   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7243     with_postgresql=yes
7244     { test "$extra_verbose" = "yes" && cat << \EOF
7245     Defining HAVE_POSTGRESQL
7246 EOF
7247 cat >> confdefs.h <<\EOF
7248 #define HAVE_POSTGRESQL 1
7249 EOF
7250 }
7251
7252     
7253 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7254 echo "configure:7255: checking for PQconnectStart in -lpq" >&5
7255 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7256
7257 xe_check_libs=" -lpq "
7258 cat > conftest.$ac_ext <<EOF
7259 #line 7260 "configure"
7260 #include "confdefs.h"
7261 /* Override any gcc2 internal prototype to avoid an error.  */
7262 /* We use char because int might match the return type of a gcc2
7263     builtin and then its argument prototype would still apply.  */
7264 char PQconnectStart();
7265
7266 int main() {
7267 PQconnectStart()
7268 ; return 0; }
7269 EOF
7270 if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7271   rm -rf conftest*
7272   eval "ac_cv_lib_$ac_lib_var=yes"
7273 else
7274   echo "configure: failed program was:" >&5
7275   cat conftest.$ac_ext >&5
7276   rm -rf conftest*
7277   eval "ac_cv_lib_$ac_lib_var=no"
7278 fi
7279 rm -f conftest*
7280 xe_check_libs=""
7281
7282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7283   echo "$ac_t""yes" 1>&6
7284   with_postgresqlv7=yes;
7285                  { test "$extra_verbose" = "yes" && cat << \EOF
7286     Defining HAVE_POSTGRESQLV7
7287 EOF
7288 cat >> confdefs.h <<\EOF
7289 #define HAVE_POSTGRESQLV7 1
7290 EOF
7291 }
7292
7293 else
7294   echo "$ac_t""no" 1>&6
7295 fi
7296
7297
7298     { test "$extra_verbose" = "yes" && cat << EOF
7299     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7300 EOF
7301 cat >> confdefs.h <<EOF
7302 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7303 EOF
7304 }
7305
7306     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7307     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7308    echo "    xemacs will be linked with \"postgresql.o\""
7309  fi
7310   elif test "$with_postgresql" = "yes"; then
7311     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7312   fi
7313 fi
7314
7315
7316 if test "$window_system" != "none"; then
7317   echo "checking for graphics libraries" 1>&6
7318 echo "configure:7319: checking for graphics libraries" >&5
7319
7320     xpm_problem=""
7321   if test -z "$with_xpm"; then
7322     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7323 echo "configure:7324: checking for Xpm - no older than 3.4f" >&5
7324     xe_check_libs=-lXpm
7325     cat > conftest.$ac_ext <<EOF
7326 #line 7327 "configure"
7327 #include "confdefs.h"
7328 #define XPM_NUMBERS
7329 #include <X11/xpm.h>
7330     int main(int c, char **v) {
7331     return c == 1 ? 0 :
7332       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7333       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7334 EOF
7335 if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7336 then
7337   ./conftest dummy_arg; xpm_status=$?;
7338       if test "$xpm_status" = "0"; then
7339         with_xpm=yes;
7340       else
7341         with_xpm=no;
7342         if test "$xpm_status" = "1"; then
7343           xpm_problem="Xpm library version and header file version don't match!"
7344         elif test "$xpm_status" = "2"; then
7345           xpm_problem="Xpm library version is too old!"
7346         else
7347           xpm_problem="Internal xpm detection logic error!"
7348         fi
7349         echo "
7350 *** WARNING *** $xpm_problem
7351   I'm not touching that with a 10-foot pole!
7352   If you really want to use the installed version of Xpm, rerun
7353   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7354     fi
7355 else
7356   conftest_rc="$?"
7357   echo "configure: failed program was:" >&5
7358   cat conftest.$ac_ext >&5
7359   rm -fr conftest*
7360   with_xpm=no
7361 fi
7362 rm -fr conftest*
7363     xe_check_libs=
7364     echo "$ac_t""$with_xpm" 1>&6
7365   fi
7366   if test "$with_xpm" = "yes"; then
7367     { test "$extra_verbose" = "yes" && cat << \EOF
7368     Defining HAVE_XPM
7369 EOF
7370 cat >> confdefs.h <<\EOF
7371 #define HAVE_XPM 1
7372 EOF
7373 }
7374
7375     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7376     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7377 echo "configure:7378: checking for \"FOR_MSW\" xpm" >&5
7378     xe_check_libs=-lXpm
7379     cat > conftest.$ac_ext <<EOF
7380 #line 7381 "configure"
7381 #include "confdefs.h"
7382
7383 int main() {
7384 XpmCreatePixmapFromData()
7385 ; return 0; }
7386 EOF
7387 if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7388   rm -rf conftest*
7389   xpm_for_msw=no
7390 else
7391   echo "configure: failed program was:" >&5
7392   cat conftest.$ac_ext >&5
7393   rm -rf conftest*
7394   xpm_for_msw=yes
7395 fi
7396 rm -f conftest*
7397     xe_check_libs=
7398     echo "$ac_t""$xpm_for_msw" 1>&6
7399     if test "$xpm_for_msw" = "yes"; then
7400       { test "$extra_verbose" = "yes" && cat << \EOF
7401     Defining FOR_MSW
7402 EOF
7403 cat >> confdefs.h <<\EOF
7404 #define FOR_MSW 1
7405 EOF
7406 }
7407
7408     fi
7409   fi
7410
7411     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7412 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7413 echo "configure:7414: checking for compface.h" >&5
7414
7415 cat > conftest.$ac_ext <<EOF
7416 #line 7417 "configure"
7417 #include "confdefs.h"
7418 #include <compface.h>
7419 EOF
7420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7421 { (eval echo configure:7422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7423 if test -z "$ac_err"; then
7424   rm -rf conftest*
7425   eval "ac_cv_header_$ac_safe=yes"
7426 else
7427   echo "$ac_err" >&5
7428   echo "configure: failed program was:" >&5
7429   cat conftest.$ac_ext >&5
7430   rm -rf conftest*
7431   eval "ac_cv_header_$ac_safe=no"
7432 fi
7433 rm -f conftest*
7434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7435   echo "$ac_t""yes" 1>&6
7436   :
7437 else
7438   echo "$ac_t""no" 1>&6
7439 with_xface=no
7440 fi
7441  }
7442   test -z "$with_xface" && { 
7443 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7444 echo "configure:7445: checking for UnGenFace in -lcompface" >&5
7445 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7446
7447 xe_check_libs=" -lcompface "
7448 cat > conftest.$ac_ext <<EOF
7449 #line 7450 "configure"
7450 #include "confdefs.h"
7451 /* Override any gcc2 internal prototype to avoid an error.  */
7452 /* We use char because int might match the return type of a gcc2
7453     builtin and then its argument prototype would still apply.  */
7454 char UnGenFace();
7455
7456 int main() {
7457 UnGenFace()
7458 ; return 0; }
7459 EOF
7460 if { (eval echo configure:7461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7461   rm -rf conftest*
7462   eval "ac_cv_lib_$ac_lib_var=yes"
7463 else
7464   echo "configure: failed program was:" >&5
7465   cat conftest.$ac_ext >&5
7466   rm -rf conftest*
7467   eval "ac_cv_lib_$ac_lib_var=no"
7468 fi
7469 rm -f conftest*
7470 xe_check_libs=""
7471
7472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7473   echo "$ac_t""yes" 1>&6
7474   : 
7475 else
7476   echo "$ac_t""no" 1>&6
7477 with_xface=no
7478 fi
7479
7480  }
7481   test -z "$with_xface" && with_xface=yes
7482   if test "$with_xface" = "yes"; then
7483     { test "$extra_verbose" = "yes" && cat << \EOF
7484     Defining HAVE_XFACE
7485 EOF
7486 cat >> confdefs.h <<\EOF
7487 #define HAVE_XFACE 1
7488 EOF
7489 }
7490
7491     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7492   fi
7493
7494         if test "$with_gif" != "no"; then
7495     with_gif="yes"
7496     { test "$extra_verbose" = "yes" && cat << \EOF
7497     Defining HAVE_GIF
7498 EOF
7499 cat >> confdefs.h <<\EOF
7500 #define HAVE_GIF 1
7501 EOF
7502 }
7503
7504     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7505    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7506  fi
7507   fi
7508
7509       if test "$with_png $with_tiff" != "no no"; then
7510     
7511 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7512 echo "configure:7513: checking for inflate in -lc" >&5
7513 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7514
7515 xe_check_libs=" -lc "
7516 cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 /* We use char because int might match the return type of a gcc2
7521     builtin and then its argument prototype would still apply.  */
7522 char inflate();
7523
7524 int main() {
7525 inflate()
7526 ; return 0; }
7527 EOF
7528 if { (eval echo configure:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7529   rm -rf conftest*
7530   eval "ac_cv_lib_$ac_lib_var=yes"
7531 else
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -rf conftest*
7535   eval "ac_cv_lib_$ac_lib_var=no"
7536 fi
7537 rm -f conftest*
7538 xe_check_libs=""
7539
7540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7541   echo "$ac_t""yes" 1>&6
7542   :
7543 else
7544   echo "$ac_t""no" 1>&6
7545
7546 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7547 echo "configure:7548: checking for inflate in -lz" >&5
7548 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7549
7550 xe_check_libs=" -lz "
7551 cat > conftest.$ac_ext <<EOF
7552 #line 7553 "configure"
7553 #include "confdefs.h"
7554 /* Override any gcc2 internal prototype to avoid an error.  */
7555 /* We use char because int might match the return type of a gcc2
7556     builtin and then its argument prototype would still apply.  */
7557 char inflate();
7558
7559 int main() {
7560 inflate()
7561 ; return 0; }
7562 EOF
7563 if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7564   rm -rf conftest*
7565   eval "ac_cv_lib_$ac_lib_var=yes"
7566 else
7567   echo "configure: failed program was:" >&5
7568   cat conftest.$ac_ext >&5
7569   rm -rf conftest*
7570   eval "ac_cv_lib_$ac_lib_var=no"
7571 fi
7572 rm -f conftest*
7573 xe_check_libs=""
7574
7575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7576   echo "$ac_t""yes" 1>&6
7577   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7578 else
7579   echo "$ac_t""no" 1>&6
7580
7581 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7582 echo "configure:7583: checking for inflate in -lgz" >&5
7583 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7584
7585 xe_check_libs=" -lgz "
7586 cat > conftest.$ac_ext <<EOF
7587 #line 7588 "configure"
7588 #include "confdefs.h"
7589 /* Override any gcc2 internal prototype to avoid an error.  */
7590 /* We use char because int might match the return type of a gcc2
7591     builtin and then its argument prototype would still apply.  */
7592 char inflate();
7593
7594 int main() {
7595 inflate()
7596 ; return 0; }
7597 EOF
7598 if { (eval echo configure:7599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7599   rm -rf conftest*
7600   eval "ac_cv_lib_$ac_lib_var=yes"
7601 else
7602   echo "configure: failed program was:" >&5
7603   cat conftest.$ac_ext >&5
7604   rm -rf conftest*
7605   eval "ac_cv_lib_$ac_lib_var=no"
7606 fi
7607 rm -f conftest*
7608 xe_check_libs=""
7609
7610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7611   echo "$ac_t""yes" 1>&6
7612   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7613 else
7614   echo "$ac_t""no" 1>&6
7615 fi
7616
7617
7618 fi
7619
7620
7621 fi
7622
7623
7624   fi
7625
7626     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7627 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7628 echo "configure:7629: checking for jpeglib.h" >&5
7629
7630 cat > conftest.$ac_ext <<EOF
7631 #line 7632 "configure"
7632 #include "confdefs.h"
7633 #include <jpeglib.h>
7634 EOF
7635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7636 { (eval echo configure:7637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7638 if test -z "$ac_err"; then
7639   rm -rf conftest*
7640   eval "ac_cv_header_$ac_safe=yes"
7641 else
7642   echo "$ac_err" >&5
7643   echo "configure: failed program was:" >&5
7644   cat conftest.$ac_ext >&5
7645   rm -rf conftest*
7646   eval "ac_cv_header_$ac_safe=no"
7647 fi
7648 rm -f conftest*
7649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7650   echo "$ac_t""yes" 1>&6
7651   :
7652 else
7653   echo "$ac_t""no" 1>&6
7654 with_jpeg=no
7655 fi
7656  }
7657   test -z "$with_jpeg" && { 
7658 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7659 echo "configure:7660: checking for jpeg_destroy_decompress in -ljpeg" >&5
7660 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7661
7662 xe_check_libs=" -ljpeg "
7663 cat > conftest.$ac_ext <<EOF
7664 #line 7665 "configure"
7665 #include "confdefs.h"
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 /* We use char because int might match the return type of a gcc2
7668     builtin and then its argument prototype would still apply.  */
7669 char jpeg_destroy_decompress();
7670
7671 int main() {
7672 jpeg_destroy_decompress()
7673 ; return 0; }
7674 EOF
7675 if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=yes"
7678 else
7679   echo "configure: failed program was:" >&5
7680   cat conftest.$ac_ext >&5
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=no"
7683 fi
7684 rm -f conftest*
7685 xe_check_libs=""
7686
7687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7688   echo "$ac_t""yes" 1>&6
7689   :
7690 else
7691   echo "$ac_t""no" 1>&6
7692 with_jpeg=no
7693 fi
7694
7695  }
7696   test -z "$with_jpeg" && with_jpeg=yes
7697   if test "$with_jpeg" = "yes"; then
7698     { test "$extra_verbose" = "yes" && cat << \EOF
7699     Defining HAVE_JPEG
7700 EOF
7701 cat >> confdefs.h <<\EOF
7702 #define HAVE_JPEG 1
7703 EOF
7704 }
7705
7706     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7707   fi
7708
7709     png_problem=""
7710   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7711 echo "configure:7712: checking for pow" >&5
7712
7713 cat > conftest.$ac_ext <<EOF
7714 #line 7715 "configure"
7715 #include "confdefs.h"
7716 /* System header to define __stub macros and hopefully few prototypes,
7717     which can conflict with char pow(); below.  */
7718 #include <assert.h>
7719 /* Override any gcc2 internal prototype to avoid an error.  */
7720 /* We use char because int might match the return type of a gcc2
7721     builtin and then its argument prototype would still apply.  */
7722 char pow();
7723
7724 int main() {
7725
7726 /* The GNU C library defines this for functions which it implements
7727     to always fail with ENOSYS.  Some functions are actually named
7728     something starting with __ and the normal name is an alias.  */
7729 #if defined (__stub_pow) || defined (__stub___pow)
7730 choke me
7731 #else
7732 pow();
7733 #endif
7734
7735 ; return 0; }
7736 EOF
7737 if { (eval echo configure:7738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7738   rm -rf conftest*
7739   eval "ac_cv_func_pow=yes"
7740 else
7741   echo "configure: failed program was:" >&5
7742   cat conftest.$ac_ext >&5
7743   rm -rf conftest*
7744   eval "ac_cv_func_pow=no"
7745 fi
7746 rm -f conftest*
7747
7748 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7749   echo "$ac_t""yes" 1>&6
7750   :
7751 else
7752   echo "$ac_t""no" 1>&6
7753 with_png=no
7754 fi
7755  }
7756   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7757 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7758 echo "configure:7759: checking for png.h" >&5
7759
7760 cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 #include <png.h>
7764 EOF
7765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7766 { (eval echo configure:7767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7768 if test -z "$ac_err"; then
7769   rm -rf conftest*
7770   eval "ac_cv_header_$ac_safe=yes"
7771 else
7772   echo "$ac_err" >&5
7773   echo "configure: failed program was:" >&5
7774   cat conftest.$ac_ext >&5
7775   rm -rf conftest*
7776   eval "ac_cv_header_$ac_safe=no"
7777 fi
7778 rm -f conftest*
7779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7780   echo "$ac_t""yes" 1>&6
7781   :
7782 else
7783   echo "$ac_t""no" 1>&6
7784 with_png=no
7785 fi
7786  }
7787   test -z "$with_png" && { 
7788 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7789 echo "configure:7790: checking for png_read_image in -lpng" >&5
7790 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7791
7792 xe_check_libs=" -lpng "
7793 cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* Override any gcc2 internal prototype to avoid an error.  */
7797 /* We use char because int might match the return type of a gcc2
7798     builtin and then its argument prototype would still apply.  */
7799 char png_read_image();
7800
7801 int main() {
7802 png_read_image()
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=yes"
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=no"
7813 fi
7814 rm -f conftest*
7815 xe_check_libs=""
7816
7817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7818   echo "$ac_t""yes" 1>&6
7819   :
7820 else
7821   echo "$ac_t""no" 1>&6
7822 with_png=no
7823 fi
7824
7825  }
7826   if test -z "$with_png"; then
7827     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7828 echo "configure:7829: checking for workable png version information" >&5
7829     xe_check_libs="-lpng -lz"
7830     cat > conftest.$ac_ext <<EOF
7831 #line 7832 "configure"
7832 #include "confdefs.h"
7833 #include <png.h>
7834     int main(int c, char **v) {
7835     if (c == 1) return 0;
7836     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7837     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7838 EOF
7839 if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7840 then
7841   ./conftest dummy_arg; png_status=$?;
7842       if test "$png_status" = "0"; then
7843         with_png=yes;
7844       else
7845         with_png=no;
7846         if test "$png_status" = "1"; then
7847           png_problem="PNG library version and header file don't match!"
7848         elif test "$png_status" = "2"; then
7849           png_problem="PNG library version too old (pre 1.0.2)!"
7850         fi
7851         echo "
7852 *** WARNING *** $png_problem
7853   I'm not touching that with a 10-foot pole!
7854   If you really want to use the installed version of libPNG, rerun
7855   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7856     fi
7857 else
7858   conftest_rc="$?"
7859   echo "configure: failed program was:" >&5
7860   cat conftest.$ac_ext >&5
7861   rm -fr conftest*
7862   with_png=no
7863 fi
7864 rm -fr conftest*
7865     xe_check_libs=
7866     echo "$ac_t""$with_png" 1>&6
7867   fi
7868   if test "$with_png" = "yes"; then
7869     { test "$extra_verbose" = "yes" && cat << \EOF
7870     Defining HAVE_PNG
7871 EOF
7872 cat >> confdefs.h <<\EOF
7873 #define HAVE_PNG 1
7874 EOF
7875 }
7876
7877     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7878   fi
7879
7880     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7881 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7882 echo "configure:7883: checking for tiffio.h" >&5
7883
7884 cat > conftest.$ac_ext <<EOF
7885 #line 7886 "configure"
7886 #include "confdefs.h"
7887 #include <tiffio.h>
7888 EOF
7889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7890 { (eval echo configure:7891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7892 if test -z "$ac_err"; then
7893   rm -rf conftest*
7894   eval "ac_cv_header_$ac_safe=yes"
7895 else
7896   echo "$ac_err" >&5
7897   echo "configure: failed program was:" >&5
7898   cat conftest.$ac_ext >&5
7899   rm -rf conftest*
7900   eval "ac_cv_header_$ac_safe=no"
7901 fi
7902 rm -f conftest*
7903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7904   echo "$ac_t""yes" 1>&6
7905   :
7906 else
7907   echo "$ac_t""no" 1>&6
7908 with_tiff=no
7909 fi
7910  }
7911   test -z "$with_tiff" && { 
7912 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7913 echo "configure:7914: checking for TIFFClientOpen in -ltiff" >&5
7914 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7915
7916 xe_check_libs=" -ltiff "
7917 cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 /* Override any gcc2 internal prototype to avoid an error.  */
7921 /* We use char because int might match the return type of a gcc2
7922     builtin and then its argument prototype would still apply.  */
7923 char TIFFClientOpen();
7924
7925 int main() {
7926 TIFFClientOpen()
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_lib_$ac_lib_var=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_lib_$ac_lib_var=no"
7937 fi
7938 rm -f conftest*
7939 xe_check_libs=""
7940
7941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7942   echo "$ac_t""yes" 1>&6
7943   :
7944 else
7945   echo "$ac_t""no" 1>&6
7946 with_tiff=no
7947 fi
7948
7949  }
7950   test -z "$with_tiff" && with_tiff=yes
7951   if test "$with_tiff" = "yes"; then
7952     { test "$extra_verbose" = "yes" && cat << \EOF
7953     Defining HAVE_TIFF
7954 EOF
7955 cat >> confdefs.h <<\EOF
7956 #define HAVE_TIFF 1
7957 EOF
7958 }
7959
7960     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7961   fi
7962 fi
7963
7964
7965 if test "$with_x11" = "yes"; then
7966
7967   echo "checking for X11 graphics libraries" 1>&6
7968 echo "configure:7969: checking for X11 graphics libraries" >&5
7969
7970   echo "checking for the Athena widgets" 1>&6
7971 echo "configure:7972: checking for the Athena widgets" >&5
7972
7973     case "$with_athena" in
7974         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7975     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7976     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7977     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7978     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7979     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7980   esac
7981
7982     if test "$athena_3d" = "no"; then
7983     
7984 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7985 echo "configure:7986: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7986 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7987
7988 xe_check_libs=" -l$athena_variant "
7989 cat > conftest.$ac_ext <<EOF
7990 #line 7991 "configure"
7991 #include "confdefs.h"
7992 /* Override any gcc2 internal prototype to avoid an error.  */
7993 /* We use char because int might match the return type of a gcc2
7994     builtin and then its argument prototype would still apply.  */
7995 char XawScrollbarSetThumb();
7996
7997 int main() {
7998 XawScrollbarSetThumb()
7999 ; return 0; }
8000 EOF
8001 if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8002   rm -rf conftest*
8003   eval "ac_cv_lib_$ac_lib_var=yes"
8004 else
8005   echo "configure: failed program was:" >&5
8006   cat conftest.$ac_ext >&5
8007   rm -rf conftest*
8008   eval "ac_cv_lib_$ac_lib_var=no"
8009 fi
8010 rm -f conftest*
8011 xe_check_libs=""
8012
8013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8014   echo "$ac_t""yes" 1>&6
8015           
8016 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8017 echo "configure:8018: checking for threeDClassRec in -l$athena_variant" >&5
8018 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8019
8020 xe_check_libs=" -l$athena_variant "
8021 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 /* Override any gcc2 internal prototype to avoid an error.  */
8025 /* We use char because int might match the return type of a gcc2
8026     builtin and then its argument prototype would still apply.  */
8027 char threeDClassRec();
8028
8029 int main() {
8030 threeDClassRec()
8031 ; return 0; }
8032 EOF
8033 if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8034   rm -rf conftest*
8035   eval "ac_cv_lib_$ac_lib_var=yes"
8036 else
8037   echo "configure: failed program was:" >&5
8038   cat conftest.$ac_ext >&5
8039   rm -rf conftest*
8040   eval "ac_cv_lib_$ac_lib_var=no"
8041 fi
8042 rm -f conftest*
8043 xe_check_libs=""
8044
8045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8046   echo "$ac_t""yes" 1>&6
8047   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8048 else
8049   echo "$ac_t""no" 1>&6
8050 athena_lib=$athena_variant
8051 fi
8052
8053
8054       
8055 else
8056   echo "$ac_t""no" 1>&6
8057 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8058 fi
8059
8060
8061   else
8062         
8063 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8064 echo "configure:8065: checking for threeDClassRec in -l$athena_variant" >&5
8065 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8066
8067 xe_check_libs=" -l$athena_variant "
8068 cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* Override any gcc2 internal prototype to avoid an error.  */
8072 /* We use char because int might match the return type of a gcc2
8073     builtin and then its argument prototype would still apply.  */
8074 char threeDClassRec();
8075
8076 int main() {
8077 threeDClassRec()
8078 ; return 0; }
8079 EOF
8080 if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8081   rm -rf conftest*
8082   eval "ac_cv_lib_$ac_lib_var=yes"
8083 else
8084   echo "configure: failed program was:" >&5
8085   cat conftest.$ac_ext >&5
8086   rm -rf conftest*
8087   eval "ac_cv_lib_$ac_lib_var=no"
8088 fi
8089 rm -f conftest*
8090 xe_check_libs=""
8091
8092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8093   echo "$ac_t""yes" 1>&6
8094   athena_lib=$athena_variant
8095 else
8096   echo "$ac_t""no" 1>&6
8097 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8098 echo "configure:8099: checking for threeDClassRec in -lXaw" >&5
8099 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8100
8101 xe_check_libs=" -lXaw "
8102 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 /* Override any gcc2 internal prototype to avoid an error.  */
8106 /* We use char because int might match the return type of a gcc2
8107     builtin and then its argument prototype would still apply.  */
8108 char threeDClassRec();
8109
8110 int main() {
8111 threeDClassRec()
8112 ; return 0; }
8113 EOF
8114 if { (eval echo configure:8115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=yes"
8117 else
8118   echo "configure: failed program was:" >&5
8119   cat conftest.$ac_ext >&5
8120   rm -rf conftest*
8121   eval "ac_cv_lib_$ac_lib_var=no"
8122 fi
8123 rm -f conftest*
8124 xe_check_libs=""
8125
8126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8127   echo "$ac_t""yes" 1>&6
8128   athena_lib=Xaw;
8129           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8130         
8131 else
8132   echo "$ac_t""no" 1>&6
8133 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8134 fi
8135
8136
8137 fi
8138
8139
8140   fi
8141
8142     if test "$athena_3d" = "no"; then
8143     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8144 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8145 echo "configure:8146: checking for X11/Xaw/ThreeD.h" >&5
8146
8147 cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150 #include <X11/Xaw/ThreeD.h>
8151 EOF
8152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8153 { (eval echo configure:8154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8155 if test -z "$ac_err"; then
8156   rm -rf conftest*
8157   eval "ac_cv_header_$ac_safe=yes"
8158 else
8159   echo "$ac_err" >&5
8160   echo "configure: failed program was:" >&5
8161   cat conftest.$ac_ext >&5
8162   rm -rf conftest*
8163   eval "ac_cv_header_$ac_safe=no"
8164 fi
8165 rm -f conftest*
8166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8167   echo "$ac_t""yes" 1>&6
8168   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8169 else
8170   echo "$ac_t""no" 1>&6
8171 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8172 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8173 echo "configure:8174: checking for X11/Xaw/XawInit.h" >&5
8174
8175 cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 #include <X11/Xaw/XawInit.h>
8179 EOF
8180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8181 { (eval echo configure:8182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8183 if test -z "$ac_err"; then
8184   rm -rf conftest*
8185   eval "ac_cv_header_$ac_safe=yes"
8186 else
8187   echo "$ac_err" >&5
8188   echo "configure: failed program was:" >&5
8189   cat conftest.$ac_ext >&5
8190   rm -rf conftest*
8191   eval "ac_cv_header_$ac_safe=no"
8192 fi
8193 rm -f conftest*
8194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8195   echo "$ac_t""yes" 1>&6
8196   athena_h_path=X11/Xaw
8197 else
8198   echo "$ac_t""no" 1>&6
8199 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8200 fi
8201
8202 fi
8203
8204   else
8205             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8206 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8207 echo "configure:8208: checking for X11/$athena_variant/XawInit.h" >&5
8208
8209 cat > conftest.$ac_ext <<EOF
8210 #line 8211 "configure"
8211 #include "confdefs.h"
8212 #include <X11/$athena_variant/XawInit.h>
8213 EOF
8214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8215 { (eval echo configure:8216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8217 if test -z "$ac_err"; then
8218   rm -rf conftest*
8219   eval "ac_cv_header_$ac_safe=yes"
8220 else
8221   echo "$ac_err" >&5
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   eval "ac_cv_header_$ac_safe=no"
8226 fi
8227 rm -f conftest*
8228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8229   echo "$ac_t""yes" 1>&6
8230   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8231 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8232 echo "configure:8233: checking for X11/$athena_variant/ThreeD.h" >&5
8233
8234 cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237 #include <X11/$athena_variant/ThreeD.h>
8238 EOF
8239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8240 { (eval echo configure:8241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8242 if test -z "$ac_err"; then
8243   rm -rf conftest*
8244   eval "ac_cv_header_$ac_safe=yes"
8245 else
8246   echo "$ac_err" >&5
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -rf conftest*
8250   eval "ac_cv_header_$ac_safe=no"
8251 fi
8252 rm -f conftest*
8253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255   athena_h_path=X11/$athena_variant
8256 else
8257   echo "$ac_t""no" 1>&6
8258 fi
8259
8260 else
8261   echo "$ac_t""no" 1>&6
8262 fi
8263
8264
8265         if test -z "$athena_h_path"; then
8266       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8267 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8268 echo "configure:8269: checking for $athena_variant/XawInit.h" >&5
8269
8270 cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273 #include <$athena_variant/XawInit.h>
8274 EOF
8275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8276 { (eval echo configure:8277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8278 if test -z "$ac_err"; then
8279   rm -rf conftest*
8280   eval "ac_cv_header_$ac_safe=yes"
8281 else
8282   echo "$ac_err" >&5
8283   echo "configure: failed program was:" >&5
8284   cat conftest.$ac_ext >&5
8285   rm -rf conftest*
8286   eval "ac_cv_header_$ac_safe=no"
8287 fi
8288 rm -f conftest*
8289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8290   echo "$ac_t""yes" 1>&6
8291   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8292 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8293 echo "configure:8294: checking for $athena_variant/ThreeD.h" >&5
8294
8295 cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 #include <$athena_variant/ThreeD.h>
8299 EOF
8300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8301 { (eval echo configure:8302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8303 if test -z "$ac_err"; then
8304   rm -rf conftest*
8305   eval "ac_cv_header_$ac_safe=yes"
8306 else
8307   echo "$ac_err" >&5
8308   echo "configure: failed program was:" >&5
8309   cat conftest.$ac_ext >&5
8310   rm -rf conftest*
8311   eval "ac_cv_header_$ac_safe=no"
8312 fi
8313 rm -f conftest*
8314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8315   echo "$ac_t""yes" 1>&6
8316   athena_h_path=$athena_variant
8317 else
8318   echo "$ac_t""no" 1>&6
8319 fi
8320
8321 else
8322   echo "$ac_t""no" 1>&6
8323 fi
8324
8325     fi
8326
8327         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8328       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8329 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8330 echo "configure:8331: checking for X11/Xaw3d/XawInit.h" >&5
8331
8332 cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 #include <X11/Xaw3d/XawInit.h>
8336 EOF
8337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8338 { (eval echo configure:8339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8340 if test -z "$ac_err"; then
8341   rm -rf conftest*
8342   eval "ac_cv_header_$ac_safe=yes"
8343 else
8344   echo "$ac_err" >&5
8345   echo "configure: failed program was:" >&5
8346   cat conftest.$ac_ext >&5
8347   rm -rf conftest*
8348   eval "ac_cv_header_$ac_safe=no"
8349 fi
8350 rm -f conftest*
8351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8354 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8355 echo "configure:8356: checking for X11/Xaw3d/ThreeD.h" >&5
8356
8357 cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 #include <X11/Xaw3d/ThreeD.h>
8361 EOF
8362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8363 { (eval echo configure:8364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8365 if test -z "$ac_err"; then
8366   rm -rf conftest*
8367   eval "ac_cv_header_$ac_safe=yes"
8368 else
8369   echo "$ac_err" >&5
8370   echo "configure: failed program was:" >&5
8371   cat conftest.$ac_ext >&5
8372   rm -rf conftest*
8373   eval "ac_cv_header_$ac_safe=no"
8374 fi
8375 rm -f conftest*
8376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8377   echo "$ac_t""yes" 1>&6
8378   
8379             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8380             athena_h_path=X11/Xaw3d
8381           
8382 else
8383   echo "$ac_t""no" 1>&6
8384 fi
8385
8386 else
8387   echo "$ac_t""no" 1>&6
8388 fi
8389
8390     fi
8391
8392         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8393       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8394 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8395 echo "configure:8396: checking for Xaw3d/XawInit.h" >&5
8396
8397 cat > conftest.$ac_ext <<EOF
8398 #line 8399 "configure"
8399 #include "confdefs.h"
8400 #include <Xaw3d/XawInit.h>
8401 EOF
8402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8403 { (eval echo configure:8404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8405 if test -z "$ac_err"; then
8406   rm -rf conftest*
8407   eval "ac_cv_header_$ac_safe=yes"
8408 else
8409   echo "$ac_err" >&5
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_header_$ac_safe=no"
8414 fi
8415 rm -f conftest*
8416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8417   echo "$ac_t""yes" 1>&6
8418   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8419 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8420 echo "configure:8421: checking for Xaw3d/ThreeD.h" >&5
8421
8422 cat > conftest.$ac_ext <<EOF
8423 #line 8424 "configure"
8424 #include "confdefs.h"
8425 #include <Xaw3d/ThreeD.h>
8426 EOF
8427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8428 { (eval echo configure:8429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8430 if test -z "$ac_err"; then
8431   rm -rf conftest*
8432   eval "ac_cv_header_$ac_safe=yes"
8433 else
8434   echo "$ac_err" >&5
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   eval "ac_cv_header_$ac_safe=no"
8439 fi
8440 rm -f conftest*
8441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8442   echo "$ac_t""yes" 1>&6
8443   
8444             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8445             athena_h_path=Xaw3d
8446           
8447 else
8448   echo "$ac_t""no" 1>&6
8449 fi
8450
8451 else
8452   echo "$ac_t""no" 1>&6
8453 fi
8454
8455     fi
8456
8457             if test -z "$athena_h_path"; then
8458       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8459 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8460 echo "configure:8461: checking for X11/Xaw/ThreeD.h" >&5
8461
8462 cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <X11/Xaw/ThreeD.h>
8466 EOF
8467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8468 { (eval echo configure:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8470 if test -z "$ac_err"; then
8471   rm -rf conftest*
8472   eval "ac_cv_header_$ac_safe=yes"
8473 else
8474   echo "$ac_err" >&5
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -rf conftest*
8478   eval "ac_cv_header_$ac_safe=no"
8479 fi
8480 rm -f conftest*
8481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8482   echo "$ac_t""yes" 1>&6
8483   
8484           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8485           athena_h_path=X11/Xaw
8486         
8487 else
8488   echo "$ac_t""no" 1>&6
8489 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8490 fi
8491
8492     fi
8493   fi
8494
8495     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8496     have_xaw=yes
8497   else
8498     have_xaw=no
8499   fi
8500
8501     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8502 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8503 echo "configure:8504: checking for Xm/Xm.h" >&5
8504
8505 cat > conftest.$ac_ext <<EOF
8506 #line 8507 "configure"
8507 #include "confdefs.h"
8508 #include <Xm/Xm.h>
8509 EOF
8510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8511 { (eval echo configure:8512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8513 if test -z "$ac_err"; then
8514   rm -rf conftest*
8515   eval "ac_cv_header_$ac_safe=yes"
8516 else
8517   echo "$ac_err" >&5
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520   rm -rf conftest*
8521   eval "ac_cv_header_$ac_safe=no"
8522 fi
8523 rm -f conftest*
8524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8525   echo "$ac_t""yes" 1>&6
8526   
8527 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8528 echo "configure:8529: checking for XmStringFree in -lXm" >&5
8529 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8530
8531 xe_check_libs=" -lXm "
8532 cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 /* Override any gcc2 internal prototype to avoid an error.  */
8536 /* We use char because int might match the return type of a gcc2
8537     builtin and then its argument prototype would still apply.  */
8538 char XmStringFree();
8539
8540 int main() {
8541 XmStringFree()
8542 ; return 0; }
8543 EOF
8544 if { (eval echo configure:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8545   rm -rf conftest*
8546   eval "ac_cv_lib_$ac_lib_var=yes"
8547 else
8548   echo "configure: failed program was:" >&5
8549   cat conftest.$ac_ext >&5
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=no"
8552 fi
8553 rm -f conftest*
8554 xe_check_libs=""
8555
8556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8557   echo "$ac_t""yes" 1>&6
8558   have_motif=yes
8559 else
8560   echo "$ac_t""no" 1>&6
8561 have_motif=no
8562 fi
8563
8564
8565 else
8566   echo "$ac_t""no" 1>&6
8567 have_motif=no
8568 fi
8569
8570
8571   if test "$have_motif" = "yes"; then
8572         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8573 echo "configure:8574: checking for Lesstif" >&5
8574     cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 #include <Xm/Xm.h>
8578 #ifdef LESSTIF_VERSION
8579 yes
8580 #endif
8581
8582 EOF
8583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8584   egrep "yes" >/dev/null 2>&1; then
8585   rm -rf conftest*
8586   have_lesstif=yes
8587 else
8588   rm -rf conftest*
8589   have_lesstif=no
8590 fi
8591 rm -f conftest*
8592
8593   echo "$ac_t""$have_lesstif" 1>&6
8594   fi
8595
8596 fi 
8597
8598 case "$with_menubars" in "" | "yes" | "athena" )
8599   with_menubars="lucid" ;;
8600 esac
8601 case "$with_dialogs" in "" | "yes" | "lucid" )
8602   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8603   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8604   else with_dialogs=no
8605   fi ;;
8606 esac
8607 case "$with_scrollbars" in "" | "yes" )
8608   with_scrollbars="lucid" ;;
8609 esac
8610 case "$with_widgets" in "" | "yes" | "lucid")
8611   if   test "$have_motif" = "yes"; then with_widgets="motif"
8612   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8613   else with_widgets=no
8614   fi ;;
8615 esac
8616
8617 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8618
8619 case "$all_widgets" in
8620   *athena* )
8621     if test "$have_xaw" != "yes"; then
8622       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8623     fi
8624
8625         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8626
8627         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8628
8629                     { test "$extra_verbose" = "yes" && cat << EOF
8630     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8631 EOF
8632 cat >> confdefs.h <<EOF
8633 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8634 EOF
8635 }
8636
8637     { test "$extra_verbose" = "yes" && cat << EOF
8638     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8639 EOF
8640 cat >> confdefs.h <<EOF
8641 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8642 EOF
8643 }
8644
8645     { test "$extra_verbose" = "yes" && cat << EOF
8646     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8647 EOF
8648 cat >> confdefs.h <<EOF
8649 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8650 EOF
8651 }
8652
8653     { test "$extra_verbose" = "yes" && cat << EOF
8654     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8655 EOF
8656 cat >> confdefs.h <<EOF
8657 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8658 EOF
8659 }
8660
8661     { test "$extra_verbose" = "yes" && cat << EOF
8662     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8663 EOF
8664 cat >> confdefs.h <<EOF
8665 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8666 EOF
8667 }
8668
8669     { test "$extra_verbose" = "yes" && cat << EOF
8670     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8671 EOF
8672 cat >> confdefs.h <<EOF
8673 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8674 EOF
8675 }
8676
8677     { test "$extra_verbose" = "yes" && cat << EOF
8678     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8679 EOF
8680 cat >> confdefs.h <<EOF
8681 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8682 EOF
8683 }
8684
8685     { test "$extra_verbose" = "yes" && cat << EOF
8686     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8687 EOF
8688 cat >> confdefs.h <<EOF
8689 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8690 EOF
8691 }
8692
8693     { test "$extra_verbose" = "yes" && cat << EOF
8694     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8695 EOF
8696 cat >> confdefs.h <<EOF
8697 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8698 EOF
8699 }
8700
8701     { test "$extra_verbose" = "yes" && cat << EOF
8702     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8703 EOF
8704 cat >> confdefs.h <<EOF
8705 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8706 EOF
8707 }
8708
8709
8710     { test "$extra_verbose" = "yes" && cat << \EOF
8711     Defining LWLIB_USES_ATHENA
8712 EOF
8713 cat >> confdefs.h <<\EOF
8714 #define LWLIB_USES_ATHENA 1
8715 EOF
8716 }
8717
8718     { test "$extra_verbose" = "yes" && cat << \EOF
8719     Defining NEED_ATHENA
8720 EOF
8721 cat >> confdefs.h <<\EOF
8722 #define NEED_ATHENA 1
8723 EOF
8724 }
8725
8726     need_athena="yes"
8727
8728     if test "$athena_3d" = "yes"; then
8729       { test "$extra_verbose" = "yes" && cat << \EOF
8730     Defining HAVE_ATHENA_3D
8731 EOF
8732 cat >> confdefs.h <<\EOF
8733 #define HAVE_ATHENA_3D 1
8734 EOF
8735 }
8736
8737     fi
8738   ;;
8739 esac
8740
8741 case "$all_widgets" in *motif* )
8742   { test "$extra_verbose" = "yes" && cat << \EOF
8743     Defining LWLIB_USES_MOTIF
8744 EOF
8745 cat >> confdefs.h <<\EOF
8746 #define LWLIB_USES_MOTIF 1
8747 EOF
8748 }
8749
8750   { test "$extra_verbose" = "yes" && cat << \EOF
8751     Defining NEED_MOTIF
8752 EOF
8753 cat >> confdefs.h <<\EOF
8754 #define NEED_MOTIF 1
8755 EOF
8756 }
8757
8758   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8759   need_motif=yes ;;
8760 esac
8761
8762 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8763 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8764 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8765 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8766         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8767 case "$with_widgets" in athena* )
8768         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;;
8769 esac
8770 case "$all_widgets" in *lucid* )
8771   { test "$extra_verbose" = "yes" && cat << \EOF
8772     Defining NEED_LUCID
8773 EOF
8774 cat >> confdefs.h <<\EOF
8775 #define NEED_LUCID 1
8776 EOF
8777 }
8778
8779   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8780 esac
8781
8782
8783
8784 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8785     Defining LWLIB_SCROLLBARS_ATHENA
8786 EOF
8787 cat >> confdefs.h <<\EOF
8788 #define LWLIB_SCROLLBARS_ATHENA 1
8789 EOF
8790 }
8791
8792 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8793     Defining LWLIB_DIALOGS_ATHENA
8794 EOF
8795 cat >> confdefs.h <<\EOF
8796 #define LWLIB_DIALOGS_ATHENA 1
8797 EOF
8798 }
8799
8800
8801 if test "$athena_3d" = "yes"; then
8802   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8803     Defining LWLIB_SCROLLBARS_ATHENA3D
8804 EOF
8805 cat >> confdefs.h <<\EOF
8806 #define LWLIB_SCROLLBARS_ATHENA3D 1
8807 EOF
8808 }
8809
8810   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8811     Defining LWLIB_DIALOGS_ATHENA3D
8812 EOF
8813 cat >> confdefs.h <<\EOF
8814 #define LWLIB_DIALOGS_ATHENA3D 1
8815 EOF
8816 }
8817
8818 fi
8819
8820 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8821     Defining LWLIB_WIDGETS_ATHENA
8822 EOF
8823 cat >> confdefs.h <<\EOF
8824 #define LWLIB_WIDGETS_ATHENA 1
8825 EOF
8826 }
8827 ;; esac
8828 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8829         { test "$extra_verbose" = "yes" && cat << \EOF
8830     Defining LWLIB_TABS_LUCID
8831 EOF
8832 cat >> confdefs.h <<\EOF
8833 #define LWLIB_TABS_LUCID 1
8834 EOF
8835 }
8836
8837
8838 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8839     Defining HAVE_MENUBARS
8840 EOF
8841 cat >> confdefs.h <<\EOF
8842 #define HAVE_MENUBARS 1
8843 EOF
8844 }
8845
8846 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8847     Defining HAVE_SCROLLBARS
8848 EOF
8849 cat >> confdefs.h <<\EOF
8850 #define HAVE_SCROLLBARS 1
8851 EOF
8852 }
8853
8854 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8855     Defining HAVE_DIALOGS
8856 EOF
8857 cat >> confdefs.h <<\EOF
8858 #define HAVE_DIALOGS 1
8859 EOF
8860 }
8861
8862 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8863     Defining HAVE_TOOLBARS
8864 EOF
8865 cat >> confdefs.h <<\EOF
8866 #define HAVE_TOOLBARS 1
8867 EOF
8868 }
8869
8870 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8871     Defining HAVE_WIDGETS
8872 EOF
8873 cat >> confdefs.h <<\EOF
8874 #define HAVE_WIDGETS 1
8875 EOF
8876 }
8877
8878
8879 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8880     Defining LWLIB_MENUBARS_LUCID
8881 EOF
8882 cat >> confdefs.h <<\EOF
8883 #define LWLIB_MENUBARS_LUCID 1
8884 EOF
8885 }
8886
8887 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8888     Defining LWLIB_SCROLLBARS_LUCID
8889 EOF
8890 cat >> confdefs.h <<\EOF
8891 #define LWLIB_SCROLLBARS_LUCID 1
8892 EOF
8893 }
8894
8895
8896 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8897     Defining LWLIB_MENUBARS_MOTIF
8898 EOF
8899 cat >> confdefs.h <<\EOF
8900 #define LWLIB_MENUBARS_MOTIF 1
8901 EOF
8902 }
8903
8904 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8905     Defining LWLIB_SCROLLBARS_MOTIF
8906 EOF
8907 cat >> confdefs.h <<\EOF
8908 #define LWLIB_SCROLLBARS_MOTIF 1
8909 EOF
8910 }
8911
8912 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8913     Defining LWLIB_DIALOGS_MOTIF
8914 EOF
8915 cat >> confdefs.h <<\EOF
8916 #define LWLIB_DIALOGS_MOTIF 1
8917 EOF
8918 }
8919
8920 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8921     Defining LWLIB_WIDGETS_MOTIF
8922 EOF
8923 cat >> confdefs.h <<\EOF
8924 #define LWLIB_WIDGETS_MOTIF 1
8925 EOF
8926 }
8927
8928
8929 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8930    echo "    xemacs will be linked with \"menubar.o\""
8931  fi
8932 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8933    echo "    xemacs will be linked with \"scrollbar.o\""
8934  fi
8935 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8936    echo "    xemacs will be linked with \"dialog.o\""
8937  fi
8938 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8939    echo "    xemacs will be linked with \"toolbar.o\""
8940  fi
8941
8942 if test "$with_x11" = "yes"; then
8943   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8944    echo "    xemacs will be linked with \"menubar-x.o\""
8945  fi
8946   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8947    echo "    xemacs will be linked with \"scrollbar-x.o\""
8948  fi
8949   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8950    echo "    xemacs will be linked with \"dialog-x.o\""
8951  fi
8952   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8953    echo "    xemacs will be linked with \"toolbar-x.o\""
8954  fi
8955   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8956    echo "    xemacs will be linked with \"gui-x.o\""
8957  fi
8958 fi
8959
8960
8961 test -z "$with_mule" && with_mule=no
8962 test -z "$with_file_coding" && with_file_coding=no
8963
8964
8965 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8966   { test "$extra_verbose" = "yes" && cat << \EOF
8967     Defining FILE_CODING
8968 EOF
8969 cat >> confdefs.h <<\EOF
8970 #define FILE_CODING 1
8971 EOF
8972 }
8973
8974   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8975    echo "    xemacs will be linked with \"file-coding.o\""
8976  fi
8977 fi
8978
8979 if test "$with_mule" = "yes" ; then
8980   echo "checking for Mule-related features" 1>&6
8981 echo "configure:8982: checking for Mule-related features" >&5
8982   { test "$extra_verbose" = "yes" && cat << \EOF
8983     Defining MULE
8984 EOF
8985 cat >> confdefs.h <<\EOF
8986 #define MULE 1
8987 EOF
8988 }
8989
8990   { test "$extra_verbose" = "yes" && cat << \EOF
8991     Defining FILE_CODING
8992 EOF
8993 cat >> confdefs.h <<\EOF
8994 #define FILE_CODING 1
8995 EOF
8996 }
8997
8998   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8999    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9000  fi
9001
9002     for ac_hdr in libintl.h
9003 do
9004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9006 echo "configure:9007: checking for $ac_hdr" >&5
9007
9008 cat > conftest.$ac_ext <<EOF
9009 #line 9010 "configure"
9010 #include "confdefs.h"
9011 #include <$ac_hdr>
9012 EOF
9013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9014 { (eval echo configure:9015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9016 if test -z "$ac_err"; then
9017   rm -rf conftest*
9018   eval "ac_cv_header_$ac_safe=yes"
9019 else
9020   echo "$ac_err" >&5
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   eval "ac_cv_header_$ac_safe=no"
9025 fi
9026 rm -f conftest*
9027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9028   echo "$ac_t""yes" 1>&6
9029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9030   { test "$extra_verbose" = "yes" && cat << EOF
9031     Defining $ac_tr_hdr
9032 EOF
9033 cat >> confdefs.h <<EOF
9034 #define $ac_tr_hdr 1
9035 EOF
9036 }
9037  
9038 else
9039   echo "$ac_t""no" 1>&6
9040 fi
9041 done
9042
9043   
9044 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9045 echo "configure:9046: checking for strerror in -lintl" >&5
9046 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9047
9048 xe_check_libs=" -lintl "
9049 cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052 /* Override any gcc2 internal prototype to avoid an error.  */
9053 /* We use char because int might match the return type of a gcc2
9054     builtin and then its argument prototype would still apply.  */
9055 char strerror();
9056
9057 int main() {
9058 strerror()
9059 ; return 0; }
9060 EOF
9061 if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=yes"
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -rf conftest*
9068   eval "ac_cv_lib_$ac_lib_var=no"
9069 fi
9070 rm -f conftest*
9071 xe_check_libs=""
9072
9073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9074   echo "$ac_t""yes" 1>&6
9075     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9076     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9077   { test "$extra_verbose" = "yes" && cat << EOF
9078     Defining $ac_tr_lib
9079 EOF
9080 cat >> confdefs.h <<EOF
9081 #define $ac_tr_lib 1
9082 EOF
9083 }
9084
9085   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9086
9087 else
9088   echo "$ac_t""no" 1>&6
9089 fi
9090
9091
9092
9093   echo "checking for Mule input methods" 1>&6
9094 echo "configure:9095: checking for Mule input methods" >&5
9095         case "$with_xim" in "" | "yes" )
9096     echo "checking for XIM" 1>&6
9097 echo "configure:9098: checking for XIM" >&5
9098     
9099 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9100 echo "configure:9101: checking for XOpenIM in -lX11" >&5
9101 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9102
9103 xe_check_libs=" -lX11 "
9104 cat > conftest.$ac_ext <<EOF
9105 #line 9106 "configure"
9106 #include "confdefs.h"
9107 /* Override any gcc2 internal prototype to avoid an error.  */
9108 /* We use char because int might match the return type of a gcc2
9109     builtin and then its argument prototype would still apply.  */
9110 char XOpenIM();
9111
9112 int main() {
9113 XOpenIM()
9114 ; return 0; }
9115 EOF
9116 if { (eval echo configure:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9117   rm -rf conftest*
9118   eval "ac_cv_lib_$ac_lib_var=yes"
9119 else
9120   echo "configure: failed program was:" >&5
9121   cat conftest.$ac_ext >&5
9122   rm -rf conftest*
9123   eval "ac_cv_lib_$ac_lib_var=no"
9124 fi
9125 rm -f conftest*
9126 xe_check_libs=""
9127
9128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9129   echo "$ac_t""yes" 1>&6
9130   with_xim=xlib
9131 else
9132   echo "$ac_t""no" 1>&6
9133 with_xim=no
9134 fi
9135
9136
9137         if test "$have_motif $have_lesstif" = "yes no"; then
9138       
9139 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9140 echo "configure:9141: checking for XmImMbLookupString in -lXm" >&5
9141 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9142
9143 xe_check_libs=" -lXm "
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 /* Override any gcc2 internal prototype to avoid an error.  */
9148 /* We use char because int might match the return type of a gcc2
9149     builtin and then its argument prototype would still apply.  */
9150 char XmImMbLookupString();
9151
9152 int main() {
9153 XmImMbLookupString()
9154 ; return 0; }
9155 EOF
9156 if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9157   rm -rf conftest*
9158   eval "ac_cv_lib_$ac_lib_var=yes"
9159 else
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   eval "ac_cv_lib_$ac_lib_var=no"
9164 fi
9165 rm -f conftest*
9166 xe_check_libs=""
9167
9168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9169   echo "$ac_t""yes" 1>&6
9170   with_xim=motif
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174
9175
9176     fi ;;
9177   esac
9178   if test "$with_xim" != "no"; then
9179     { test "$extra_verbose" = "yes" && cat << \EOF
9180     Defining HAVE_XIM
9181 EOF
9182 cat >> confdefs.h <<\EOF
9183 #define HAVE_XIM 1
9184 EOF
9185 }
9186
9187     if test "$with_xim" = "xlib"; then
9188       { test "$extra_verbose" = "yes" && cat << \EOF
9189     Defining XIM_XLIB
9190 EOF
9191 cat >> confdefs.h <<\EOF
9192 #define XIM_XLIB 1
9193 EOF
9194 }
9195
9196       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9197    echo "    xemacs will be linked with \"input-method-xlib.o\""
9198  fi
9199     fi
9200     if test "$with_xim" = "motif"; then
9201       { test "$extra_verbose" = "yes" && cat << \EOF
9202     Defining XIM_MOTIF
9203 EOF
9204 cat >> confdefs.h <<\EOF
9205 #define XIM_MOTIF 1
9206 EOF
9207 }
9208
9209       need_motif=yes
9210       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9211    echo "    xemacs will be linked with \"input-method-motif.o\""
9212  fi
9213     fi
9214     if test "$with_xim" = "motif"; then
9215       with_xfs=no
9216     fi
9217   fi
9218
9219     if test "$with_xfs" = "yes" ; then
9220     echo "checking for XFontSet" 1>&6
9221 echo "configure:9222: checking for XFontSet" >&5
9222     
9223 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9224 echo "configure:9225: checking for XmbDrawString in -lX11" >&5
9225 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9226
9227 xe_check_libs=" -lX11 "
9228 cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231 /* Override any gcc2 internal prototype to avoid an error.  */
9232 /* We use char because int might match the return type of a gcc2
9233     builtin and then its argument prototype would still apply.  */
9234 char XmbDrawString();
9235
9236 int main() {
9237 XmbDrawString()
9238 ; return 0; }
9239 EOF
9240 if { (eval echo configure:9241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=yes"
9243 else
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   eval "ac_cv_lib_$ac_lib_var=no"
9248 fi
9249 rm -f conftest*
9250 xe_check_libs=""
9251
9252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9253   echo "$ac_t""yes" 1>&6
9254   :
9255 else
9256   echo "$ac_t""no" 1>&6
9257 with_xfs=no
9258 fi
9259
9260
9261     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9262       { test "$extra_verbose" = "yes" && cat << \EOF
9263     Defining USE_XFONTSET
9264 EOF
9265 cat >> confdefs.h <<\EOF
9266 #define USE_XFONTSET 1
9267 EOF
9268 }
9269
9270       if test "$with_xim" = "no" ; then
9271         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9272    echo "    xemacs will be linked with \"input-method-xfs.o\""
9273  fi
9274       fi
9275     fi
9276   fi 
9277     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9278   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9279 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9280 echo "configure:9281: checking for wnn/jllib.h" >&5
9281
9282 cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285 #include <wnn/jllib.h>
9286 EOF
9287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9288 { (eval echo configure:9289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9290 if test -z "$ac_err"; then
9291   rm -rf conftest*
9292   eval "ac_cv_header_$ac_safe=yes"
9293 else
9294   echo "$ac_err" >&5
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297   rm -rf conftest*
9298   eval "ac_cv_header_$ac_safe=no"
9299 fi
9300 rm -f conftest*
9301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9302   echo "$ac_t""yes" 1>&6
9303   :
9304 else
9305   echo "$ac_t""no" 1>&6
9306 with_wnn=no
9307 fi
9308  }
9309     if test "$with_wnn" != "no"; then
9310     for ac_func in crypt
9311 do
9312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9313 echo "configure:9314: checking for $ac_func" >&5
9314
9315 cat > conftest.$ac_ext <<EOF
9316 #line 9317 "configure"
9317 #include "confdefs.h"
9318 /* System header to define __stub macros and hopefully few prototypes,
9319     which can conflict with char $ac_func(); below.  */
9320 #include <assert.h>
9321 /* Override any gcc2 internal prototype to avoid an error.  */
9322 /* We use char because int might match the return type of a gcc2
9323     builtin and then its argument prototype would still apply.  */
9324 char $ac_func();
9325
9326 int main() {
9327
9328 /* The GNU C library defines this for functions which it implements
9329     to always fail with ENOSYS.  Some functions are actually named
9330     something starting with __ and the normal name is an alias.  */
9331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9332 choke me
9333 #else
9334 $ac_func();
9335 #endif
9336
9337 ; return 0; }
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9340   rm -rf conftest*
9341   eval "ac_cv_func_$ac_func=yes"
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   eval "ac_cv_func_$ac_func=no"
9347 fi
9348 rm -f conftest*
9349
9350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9351   echo "$ac_t""yes" 1>&6
9352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9353   { test "$extra_verbose" = "yes" && cat << EOF
9354     Defining $ac_tr_func
9355 EOF
9356 cat >> confdefs.h <<EOF
9357 #define $ac_tr_func 1
9358 EOF
9359 }
9360  
9361 else
9362   echo "$ac_t""no" 1>&6
9363 fi
9364 done
9365
9366     test "$ac_cv_func_crypt" != "yes" && { 
9367 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9368 echo "configure:9369: checking for crypt in -lcrypt" >&5
9369 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9370
9371 xe_check_libs=" -lcrypt "
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* Override any gcc2 internal prototype to avoid an error.  */
9376 /* We use char because int might match the return type of a gcc2
9377     builtin and then its argument prototype would still apply.  */
9378 char crypt();
9379
9380 int main() {
9381 crypt()
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_lib_$ac_lib_var=no"
9392 fi
9393 rm -f conftest*
9394 xe_check_libs=""
9395
9396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9397   echo "$ac_t""yes" 1>&6
9398     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9399     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9400   { test "$extra_verbose" = "yes" && cat << EOF
9401     Defining $ac_tr_lib
9402 EOF
9403 cat >> confdefs.h <<EOF
9404 #define $ac_tr_lib 1
9405 EOF
9406 }
9407
9408   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9409
9410 else
9411   echo "$ac_t""no" 1>&6
9412 fi
9413
9414  }
9415   fi
9416     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9417     
9418 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9419 echo "configure:9420: checking for jl_dic_list_e in -lwnn" >&5
9420 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9421
9422 xe_check_libs=" -lwnn "
9423 cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426 /* Override any gcc2 internal prototype to avoid an error.  */
9427 /* We use char because int might match the return type of a gcc2
9428     builtin and then its argument prototype would still apply.  */
9429 char jl_dic_list_e();
9430
9431 int main() {
9432 jl_dic_list_e()
9433 ; return 0; }
9434 EOF
9435 if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9436   rm -rf conftest*
9437   eval "ac_cv_lib_$ac_lib_var=yes"
9438 else
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -rf conftest*
9442   eval "ac_cv_lib_$ac_lib_var=no"
9443 fi
9444 rm -f conftest*
9445 xe_check_libs=""
9446
9447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9448   echo "$ac_t""yes" 1>&6
9449   libwnn=wnn
9450 else
9451   echo "$ac_t""no" 1>&6
9452 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9453 echo "configure:9454: checking for jl_dic_list_e in -lwnn4" >&5
9454 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9455
9456 xe_check_libs=" -lwnn4 "
9457 cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460 /* Override any gcc2 internal prototype to avoid an error.  */
9461 /* We use char because int might match the return type of a gcc2
9462     builtin and then its argument prototype would still apply.  */
9463 char jl_dic_list_e();
9464
9465 int main() {
9466 jl_dic_list_e()
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9470   rm -rf conftest*
9471   eval "ac_cv_lib_$ac_lib_var=yes"
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   eval "ac_cv_lib_$ac_lib_var=no"
9477 fi
9478 rm -f conftest*
9479 xe_check_libs=""
9480
9481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9482   echo "$ac_t""yes" 1>&6
9483   libwnn=wnn4
9484 else
9485   echo "$ac_t""no" 1>&6
9486 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9487 echo "configure:9488: checking for jl_dic_list_e in -lwnn6" >&5
9488 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9489
9490 xe_check_libs=" -lwnn6 "
9491 cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 /* Override any gcc2 internal prototype to avoid an error.  */
9495 /* We use char because int might match the return type of a gcc2
9496     builtin and then its argument prototype would still apply.  */
9497 char jl_dic_list_e();
9498
9499 int main() {
9500 jl_dic_list_e()
9501 ; return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9504   rm -rf conftest*
9505   eval "ac_cv_lib_$ac_lib_var=yes"
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_lib_$ac_lib_var=no"
9511 fi
9512 rm -f conftest*
9513 xe_check_libs=""
9514
9515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9516   echo "$ac_t""yes" 1>&6
9517   libwnn=wnn6
9518 else
9519   echo "$ac_t""no" 1>&6
9520 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9521 echo "configure:9522: checking for dic_list_e in -lwnn6_fromsrc" >&5
9522 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9523
9524 xe_check_libs=" -lwnn6_fromsrc "
9525 cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 /* Override any gcc2 internal prototype to avoid an error.  */
9529 /* We use char because int might match the return type of a gcc2
9530     builtin and then its argument prototype would still apply.  */
9531 char dic_list_e();
9532
9533 int main() {
9534 dic_list_e()
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9538   rm -rf conftest*
9539   eval "ac_cv_lib_$ac_lib_var=yes"
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   eval "ac_cv_lib_$ac_lib_var=no"
9545 fi
9546 rm -f conftest*
9547 xe_check_libs=""
9548
9549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9550   echo "$ac_t""yes" 1>&6
9551   libwnn=wnn6_fromsrc
9552 else
9553   echo "$ac_t""no" 1>&6
9554 with_wnn=no
9555 fi
9556
9557
9558 fi
9559
9560
9561 fi
9562
9563
9564 fi
9565
9566
9567   fi
9568   test -z "$with_wnn" && with_wnn=yes
9569   if test "$with_wnn" = "yes"; then
9570     { test "$extra_verbose" = "yes" && cat << \EOF
9571     Defining HAVE_WNN
9572 EOF
9573 cat >> confdefs.h <<\EOF
9574 #define HAVE_WNN 1
9575 EOF
9576 }
9577
9578     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9579     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9580    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9581  fi
9582     if test "$with_wnn6" != "no"; then
9583       
9584 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9585 echo "configure:9586: checking for jl_fi_dic_list in -l$libwnn" >&5
9586 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9587
9588 xe_check_libs=" -l$libwnn "
9589 cat > conftest.$ac_ext <<EOF
9590 #line 9591 "configure"
9591 #include "confdefs.h"
9592 /* Override any gcc2 internal prototype to avoid an error.  */
9593 /* We use char because int might match the return type of a gcc2
9594     builtin and then its argument prototype would still apply.  */
9595 char jl_fi_dic_list();
9596
9597 int main() {
9598 jl_fi_dic_list()
9599 ; return 0; }
9600 EOF
9601 if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9602   rm -rf conftest*
9603   eval "ac_cv_lib_$ac_lib_var=yes"
9604 else
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607   rm -rf conftest*
9608   eval "ac_cv_lib_$ac_lib_var=no"
9609 fi
9610 rm -f conftest*
9611 xe_check_libs=""
9612
9613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9614   echo "$ac_t""yes" 1>&6
9615   with_wnn6=yes
9616 else
9617   echo "$ac_t""no" 1>&6
9618 fi
9619
9620
9621       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9622     Defining WNN6
9623 EOF
9624 cat >> confdefs.h <<\EOF
9625 #define WNN6 1
9626 EOF
9627 }
9628
9629     fi
9630   fi
9631
9632     canna_includes_found=no
9633   if test "$with_canna" != "no"; then
9634     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9635 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9636 echo "configure:9637: checking for canna/jrkanji.h" >&5
9637
9638 cat > conftest.$ac_ext <<EOF
9639 #line 9640 "configure"
9640 #include "confdefs.h"
9641 #include <canna/jrkanji.h>
9642 EOF
9643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9644 { (eval echo configure:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9646 if test -z "$ac_err"; then
9647   rm -rf conftest*
9648   eval "ac_cv_header_$ac_safe=yes"
9649 else
9650   echo "$ac_err" >&5
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653   rm -rf conftest*
9654   eval "ac_cv_header_$ac_safe=no"
9655 fi
9656 rm -f conftest*
9657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9658   echo "$ac_t""yes" 1>&6
9659   canna_includes_found=yes
9660 else
9661   echo "$ac_t""no" 1>&6
9662 fi
9663
9664   fi
9665   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9666       -d "/usr/local/canna/include"; then
9667     save_c_switch_site="$c_switch_site"
9668     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9669     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9670 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9671 echo "configure:9672: checking for canna/jrkanji.h" >&5
9672
9673 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 #include <canna/jrkanji.h>
9677 EOF
9678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9679 { (eval echo configure:9680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9681 if test -z "$ac_err"; then
9682   rm -rf conftest*
9683   eval "ac_cv_header_$ac_safe=yes"
9684 else
9685   echo "$ac_err" >&5
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -rf conftest*
9689   eval "ac_cv_header_$ac_safe=no"
9690 fi
9691 rm -f conftest*
9692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9693   echo "$ac_t""yes" 1>&6
9694   canna_includes_found=yes
9695 else
9696   echo "$ac_t""no" 1>&6
9697 fi
9698
9699     if test "$canna_includes_found" != "yes"; then
9700       c_switch_site="$save_c_switch_site"
9701       with_canna="no"
9702     fi
9703   fi
9704
9705   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9706 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9707 echo "configure:9708: checking for canna/RK.h" >&5
9708
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <canna/RK.h>
9713 EOF
9714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9715 { (eval echo configure:9716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9717 if test -z "$ac_err"; then
9718   rm -rf conftest*
9719   eval "ac_cv_header_$ac_safe=yes"
9720 else
9721   echo "$ac_err" >&5
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724   rm -rf conftest*
9725   eval "ac_cv_header_$ac_safe=no"
9726 fi
9727 rm -f conftest*
9728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9729   echo "$ac_t""yes" 1>&6
9730   :
9731 else
9732   echo "$ac_t""no" 1>&6
9733 with_canna=no
9734 fi
9735  }
9736   test -z "$with_canna" && { 
9737 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9738 echo "configure:9739: checking for RkBgnBun in -lRKC" >&5
9739 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9740
9741 xe_check_libs=" -lRKC "
9742 cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 /* Override any gcc2 internal prototype to avoid an error.  */
9746 /* We use char because int might match the return type of a gcc2
9747     builtin and then its argument prototype would still apply.  */
9748 char RkBgnBun();
9749
9750 int main() {
9751 RkBgnBun()
9752 ; return 0; }
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755   rm -rf conftest*
9756   eval "ac_cv_lib_$ac_lib_var=yes"
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760   rm -rf conftest*
9761   eval "ac_cv_lib_$ac_lib_var=no"
9762 fi
9763 rm -f conftest*
9764 xe_check_libs=""
9765
9766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9767   echo "$ac_t""yes" 1>&6
9768   :
9769 else
9770   echo "$ac_t""no" 1>&6
9771 with_canna=no
9772 fi
9773
9774  }
9775   test -z "$with_canna" && { 
9776 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9777 echo "configure:9778: checking for jrKanjiControl in -lcanna" >&5
9778 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9779
9780 xe_check_libs=" -lcanna "
9781 cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 /* Override any gcc2 internal prototype to avoid an error.  */
9785 /* We use char because int might match the return type of a gcc2
9786     builtin and then its argument prototype would still apply.  */
9787 char jrKanjiControl();
9788
9789 int main() {
9790 jrKanjiControl()
9791 ; return 0; }
9792 EOF
9793 if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9794   rm -rf conftest*
9795   eval "ac_cv_lib_$ac_lib_var=yes"
9796 else
9797   echo "configure: failed program was:" >&5
9798   cat conftest.$ac_ext >&5
9799   rm -rf conftest*
9800   eval "ac_cv_lib_$ac_lib_var=no"
9801 fi
9802 rm -f conftest*
9803 xe_check_libs=""
9804
9805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9806   echo "$ac_t""yes" 1>&6
9807   :
9808 else
9809   echo "$ac_t""no" 1>&6
9810 with_canna=no
9811 fi
9812
9813  }
9814   test -z "$with_canna" && with_canna=yes
9815   if test "$with_canna" = "yes"; then
9816     { test "$extra_verbose" = "yes" && cat << \EOF
9817     Defining HAVE_CANNA
9818 EOF
9819 cat >> confdefs.h <<\EOF
9820 #define HAVE_CANNA 1
9821 EOF
9822 }
9823
9824     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9825     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9826    echo "    xemacs will be linked with \"mule-canna.o\""
9827  fi
9828   fi
9829
9830 else   for feature in xim canna wnn; do
9831     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9832       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9833     fi
9834     eval "with_${feature}=no"
9835   done
9836 fi 
9837
9838 if test "$need_motif" = "yes" ; then
9839   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9840     
9841 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9842 echo "configure:9843: checking for layout_object_getvalue in -li18n" >&5
9843 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9844
9845 xe_check_libs=" -li18n "
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 /* Override any gcc2 internal prototype to avoid an error.  */
9850 /* We use char because int might match the return type of a gcc2
9851     builtin and then its argument prototype would still apply.  */
9852 char layout_object_getvalue();
9853
9854 int main() {
9855 layout_object_getvalue()
9856 ; return 0; }
9857 EOF
9858 if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9859   rm -rf conftest*
9860   eval "ac_cv_lib_$ac_lib_var=yes"
9861 else
9862   echo "configure: failed program was:" >&5
9863   cat conftest.$ac_ext >&5
9864   rm -rf conftest*
9865   eval "ac_cv_lib_$ac_lib_var=no"
9866 fi
9867 rm -f conftest*
9868 xe_check_libs=""
9869
9870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9871   echo "$ac_t""yes" 1>&6
9872   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9873 else
9874   echo "$ac_t""no" 1>&6
9875 fi
9876
9877
9878   
9879 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9880     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9881   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9882   
9883         runpath="" runpath_dirs=""
9884   if test -n "$LD_RUN_PATH"; then
9885     runpath="$LD_RUN_PATH"
9886   elif test "$GCC" = "yes"; then
9887         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9888     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9889     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9890     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9891       case "$arg" in P,* | -L* | -R* )
9892         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9893           {
9894 xe_runpath_dir="$dir"
9895   test "$xe_runpath_dir" != "/lib"     -a \
9896         "$xe_runpath_dir" != "/usr/lib" -a \
9897         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9898   eval "$xe_add_unique_runpath_dir"
9899 }
9900         done ;;
9901       esac
9902     done
9903     ld_switch_run="$ld_switch_run_save"
9904     rm -f conftest*
9905   else
9906         for arg in $ld_switch_site $ld_switch_x_site; do
9907       case "$arg" in -L*) {
9908 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9909   test "$xe_runpath_dir" != "/lib"     -a \
9910         "$xe_runpath_dir" != "/usr/lib" -a \
9911         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9912   eval "$xe_add_unique_runpath_dir"
9913 };; esac
9914     done
9915         if test "$opsys $need_motif" = "sol2 yes"; then
9916       xe_runpath_dir="/opt/SUNWdt/lib";
9917       eval "$xe_add_unique_runpath_dir";
9918     fi
9919   fi 
9920   if test -n "$runpath"; then
9921     ld_switch_run="${dash_r}${runpath}"
9922     
9923 if test "$GCC" = "yes"; then
9924   set x $ld_switch_run; shift; ld_switch_run=""
9925   while test -n "$1"; do
9926     case $1 in
9927       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9928       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9929       -Xlinker* ) ;;
9930       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9931     esac
9932     shift
9933   done
9934 fi
9935     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9936   fi
9937 fi
9938
9939 fi
9940
9941 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
9942 do
9943 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9944 echo "configure:9945: checking for $ac_func" >&5
9945
9946 cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 /* System header to define __stub macros and hopefully few prototypes,
9950     which can conflict with char $ac_func(); below.  */
9951 #include <assert.h>
9952 /* Override any gcc2 internal prototype to avoid an error.  */
9953 /* We use char because int might match the return type of a gcc2
9954     builtin and then its argument prototype would still apply.  */
9955 char $ac_func();
9956
9957 int main() {
9958
9959 /* The GNU C library defines this for functions which it implements
9960     to always fail with ENOSYS.  Some functions are actually named
9961     something starting with __ and the normal name is an alias.  */
9962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9963 choke me
9964 #else
9965 $ac_func();
9966 #endif
9967
9968 ; return 0; }
9969 EOF
9970 if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9971   rm -rf conftest*
9972   eval "ac_cv_func_$ac_func=yes"
9973 else
9974   echo "configure: failed program was:" >&5
9975   cat conftest.$ac_ext >&5
9976   rm -rf conftest*
9977   eval "ac_cv_func_$ac_func=no"
9978 fi
9979 rm -f conftest*
9980
9981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9982   echo "$ac_t""yes" 1>&6
9983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9984   { test "$extra_verbose" = "yes" && cat << EOF
9985     Defining $ac_tr_func
9986 EOF
9987 cat >> confdefs.h <<EOF
9988 #define $ac_tr_func 1
9989 EOF
9990 }
9991  
9992 else
9993   echo "$ac_t""no" 1>&6
9994 fi
9995 done
9996
9997
9998 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9999    echo "    xemacs will be linked with \"realpath.o\""
10000  fi
10001
10002 for ac_func in getloadavg
10003 do
10004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10005 echo "configure:10006: checking for $ac_func" >&5
10006
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* System header to define __stub macros and hopefully few prototypes,
10011     which can conflict with char $ac_func(); below.  */
10012 #include <assert.h>
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 /* We use char because int might match the return type of a gcc2
10015     builtin and then its argument prototype would still apply.  */
10016 char $ac_func();
10017
10018 int main() {
10019
10020 /* The GNU C library defines this for functions which it implements
10021     to always fail with ENOSYS.  Some functions are actually named
10022     something starting with __ and the normal name is an alias.  */
10023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10024 choke me
10025 #else
10026 $ac_func();
10027 #endif
10028
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10032   rm -rf conftest*
10033   eval "ac_cv_func_$ac_func=yes"
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_func_$ac_func=no"
10039 fi
10040 rm -f conftest*
10041
10042 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10045   { test "$extra_verbose" = "yes" && cat << EOF
10046     Defining $ac_tr_func
10047 EOF
10048 cat >> confdefs.h <<EOF
10049 #define $ac_tr_func 1
10050 EOF
10051 }
10052  
10053 else
10054   echo "$ac_t""no" 1>&6
10055 fi
10056 done
10057
10058
10059 if test "$ac_cv_func_getloadavg" != "yes"
10060 then
10061   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10062    echo "    xemacs will be linked with \"getloadavg.o\""
10063  fi
10064
10065     
10066 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10067 echo "configure:10068: checking for kstat_open in -lkstat" >&5
10068 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10069
10070 xe_check_libs=" -lkstat "
10071 cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 /* Override any gcc2 internal prototype to avoid an error.  */
10075 /* We use char because int might match the return type of a gcc2
10076     builtin and then its argument prototype would still apply.  */
10077 char kstat_open();
10078
10079 int main() {
10080 kstat_open()
10081 ; return 0; }
10082 EOF
10083 if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10084   rm -rf conftest*
10085   eval "ac_cv_lib_$ac_lib_var=yes"
10086 else
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_lib_$ac_lib_var=no"
10091 fi
10092 rm -f conftest*
10093 xe_check_libs=""
10094
10095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10096   echo "$ac_t""yes" 1>&6
10097     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10099   { test "$extra_verbose" = "yes" && cat << EOF
10100     Defining $ac_tr_lib
10101 EOF
10102 cat >> confdefs.h <<EOF
10103 #define $ac_tr_lib 1
10104 EOF
10105 }
10106
10107   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10108
10109 else
10110   echo "$ac_t""no" 1>&6
10111 fi
10112
10113
10114
10115     
10116 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10117 echo "configure:10118: checking for kvm_read in -lkvm" >&5
10118 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10119
10120 xe_check_libs=" -lkvm "
10121 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 /* Override any gcc2 internal prototype to avoid an error.  */
10125 /* We use char because int might match the return type of a gcc2
10126     builtin and then its argument prototype would still apply.  */
10127 char kvm_read();
10128
10129 int main() {
10130 kvm_read()
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=yes"
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=no"
10141 fi
10142 rm -f conftest*
10143 xe_check_libs=""
10144
10145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10146   echo "$ac_t""yes" 1>&6
10147     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10149   { test "$extra_verbose" = "yes" && cat << EOF
10150     Defining $ac_tr_lib
10151 EOF
10152 cat >> confdefs.h <<EOF
10153 #define $ac_tr_lib 1
10154 EOF
10155 }
10156
10157   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10158
10159 else
10160   echo "$ac_t""no" 1>&6
10161 fi
10162
10163
10164 fi
10165
10166 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10167 echo "configure:10168: checking whether netdb declares h_errno" >&5
10168 cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 #include <netdb.h>
10172 int main() {
10173 return h_errno;
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   echo "$ac_t""yes" 1>&6
10179    { test "$extra_verbose" = "yes" && cat << \EOF
10180     Defining HAVE_H_ERRNO
10181 EOF
10182 cat >> confdefs.h <<\EOF
10183 #define HAVE_H_ERRNO 1
10184 EOF
10185 }
10186
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   echo "$ac_t""no" 1>&6
10192 fi
10193 rm -f conftest*
10194
10195 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10196 echo "configure:10197: checking for sigsetjmp" >&5
10197 cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 #include <setjmp.h>
10201 int main() {
10202 sigjmp_buf bar; sigsetjmp (bar, 0);
10203 ; return 0; }
10204 EOF
10205 if { (eval echo configure:10206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10206   rm -rf conftest*
10207   echo "$ac_t""yes" 1>&6
10208    { test "$extra_verbose" = "yes" && cat << \EOF
10209     Defining HAVE_SIGSETJMP
10210 EOF
10211 cat >> confdefs.h <<\EOF
10212 #define HAVE_SIGSETJMP 1
10213 EOF
10214 }
10215
10216 else
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -rf conftest*
10220   echo "$ac_t""no" 1>&6
10221 fi
10222 rm -f conftest*
10223
10224 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10225 echo "configure:10226: checking whether localtime caches TZ" >&5
10226
10227 if test "$ac_cv_func_tzset" = "yes"; then
10228 cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 #include <time.h>
10232 #if STDC_HEADERS
10233 # include <stdlib.h>
10234 #endif
10235 extern char **environ;
10236 unset_TZ ()
10237 {
10238   char **from, **to;
10239   for (to = from = environ; (*to = *from); from++)
10240     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10241       to++;
10242 }
10243 char TZ_GMT0[] = "TZ=GMT0";
10244 char TZ_PST8[] = "TZ=PST8";
10245 main()
10246 {
10247   time_t now = time ((time_t *) 0);
10248   int hour_GMT0, hour_unset;
10249   if (putenv (TZ_GMT0) != 0)
10250     exit (1);
10251   hour_GMT0 = localtime (&now)->tm_hour;
10252   unset_TZ ();
10253   hour_unset = localtime (&now)->tm_hour;
10254   if (putenv (TZ_PST8) != 0)
10255     exit (1);
10256   if (localtime (&now)->tm_hour == hour_GMT0)
10257     exit (1);
10258   unset_TZ ();
10259   if (localtime (&now)->tm_hour != hour_unset)
10260     exit (1);
10261   exit (0);
10262 }
10263 EOF
10264 if { (eval echo configure:10265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10265 then
10266   emacs_cv_localtime_cache=no
10267 else
10268   conftest_rc="$?"
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -fr conftest*
10272   emacs_cv_localtime_cache=yes
10273 fi
10274 rm -fr conftest*
10275 else
10276         # If we lack tzset, report that localtime does not cache TZ,
10277         # since we can't invalidate the cache if we don't have tzset.
10278         emacs_cv_localtime_cache=no
10279 fi
10280 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10281 if test $emacs_cv_localtime_cache = yes; then
10282   { test "$extra_verbose" = "yes" && cat << \EOF
10283     Defining LOCALTIME_CACHE
10284 EOF
10285 cat >> confdefs.h <<\EOF
10286 #define LOCALTIME_CACHE 1
10287 EOF
10288 }
10289
10290 fi
10291
10292 if test "$HAVE_TIMEVAL" = "yes"; then
10293 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10294 echo "configure:10295: checking whether gettimeofday accepts one or two arguments" >&5
10295 cat > conftest.$ac_ext <<EOF
10296 #line 10297 "configure"
10297 #include "confdefs.h"
10298
10299 #ifdef TIME_WITH_SYS_TIME
10300 #include <sys/time.h>
10301 #include <time.h>
10302 #else
10303 #ifdef HAVE_SYS_TIME_H
10304 #include <sys/time.h>
10305 #else
10306 #include <time.h>
10307 #endif
10308 #endif
10309   
10310 int main() {
10311
10312   struct timeval time;
10313   gettimeofday (&time, 0);
10314
10315 ; return 0; }
10316 EOF
10317 if { (eval echo configure:10318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10318   rm -rf conftest*
10319   echo "$ac_t""two" 1>&6
10320 else
10321   echo "configure: failed program was:" >&5
10322   cat conftest.$ac_ext >&5
10323   rm -rf conftest*
10324   echo "$ac_t""one" 1>&6
10325    { test "$extra_verbose" = "yes" && cat << \EOF
10326     Defining GETTIMEOFDAY_ONE_ARGUMENT
10327 EOF
10328 cat >> confdefs.h <<\EOF
10329 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10330 EOF
10331 }
10332
10333 fi
10334 rm -f conftest*
10335 fi
10336
10337
10338 echo $ac_n "checking for inline""... $ac_c" 1>&6
10339 echo "configure:10340: checking for inline" >&5
10340
10341 ac_cv_c_inline=no
10342 for ac_kw in inline __inline__ __inline; do
10343   cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346
10347 int main() {
10348 } $ac_kw foo() {
10349 ; return 0; }
10350 EOF
10351 if { (eval echo configure:10352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10352   rm -rf conftest*
10353   ac_cv_c_inline=$ac_kw; break
10354 else
10355   echo "configure: failed program was:" >&5
10356   cat conftest.$ac_ext >&5
10357 fi
10358 rm -f conftest*
10359 done
10360
10361
10362 echo "$ac_t""$ac_cv_c_inline" 1>&6
10363 case "$ac_cv_c_inline" in
10364   inline | yes) ;;
10365   no) { test "$extra_verbose" = "yes" && cat << \EOF
10366     Defining inline = 
10367 EOF
10368 cat >> confdefs.h <<\EOF
10369 #define inline 
10370 EOF
10371 }
10372  ;;
10373   *)  { test "$extra_verbose" = "yes" && cat << EOF
10374     Defining inline = $ac_cv_c_inline
10375 EOF
10376 cat >> confdefs.h <<EOF
10377 #define inline $ac_cv_c_inline
10378 EOF
10379 }
10380  ;;
10381 esac
10382
10383 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10384    echo "    xemacs will be linked with \"inline.o\""
10385  fi
10386
10387
10388 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10389 # for constant arguments.  Useless!
10390 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10391 echo "configure:10392: checking for working alloca.h" >&5
10392
10393 cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <alloca.h>
10397 int main() {
10398 char *p = alloca(2 * sizeof(int));
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   ac_cv_header_alloca_h=yes
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   ac_cv_header_alloca_h=no
10409 fi
10410 rm -f conftest*
10411
10412 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10413 if test $ac_cv_header_alloca_h = yes; then
10414   { test "$extra_verbose" = "yes" && cat << \EOF
10415     Defining HAVE_ALLOCA_H
10416 EOF
10417 cat >> confdefs.h <<\EOF
10418 #define HAVE_ALLOCA_H 1
10419 EOF
10420 }
10421
10422 fi
10423
10424 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10425 echo "configure:10426: checking for alloca" >&5
10426
10427 cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430
10431 #ifdef __GNUC__
10432 # define alloca __builtin_alloca
10433 #else
10434 # ifdef _MSC_VER
10435 #  include <malloc.h>
10436 #  define alloca _alloca
10437 # else
10438 #  if HAVE_ALLOCA_H
10439 #   include <alloca.h>
10440 #  else
10441 #   ifdef _AIX
10442  #pragma alloca
10443 #   else
10444 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10445 char *alloca ();
10446 #    endif
10447 #   endif
10448 #  endif
10449 # endif
10450 #endif
10451
10452 int main() {
10453 char *p = (char *) alloca(1);
10454 ; return 0; }
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10457   rm -rf conftest*
10458   ac_cv_func_alloca_works=yes
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   ac_cv_func_alloca_works=no
10464 fi
10465 rm -f conftest*
10466
10467 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10468 if test $ac_cv_func_alloca_works = yes; then
10469   { test "$extra_verbose" = "yes" && cat << \EOF
10470     Defining HAVE_ALLOCA
10471 EOF
10472 cat >> confdefs.h <<\EOF
10473 #define HAVE_ALLOCA 1
10474 EOF
10475 }
10476
10477 fi
10478
10479 if test $ac_cv_func_alloca_works = no; then
10480   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10481   # that cause trouble.  Some versions do not even contain alloca or
10482   # contain a buggy version.  If you still want to use their alloca,
10483   # use ar to extract alloca.o from them instead of compiling alloca.c.
10484   ALLOCA=alloca.${ac_objext}
10485   { test "$extra_verbose" = "yes" && cat << \EOF
10486     Defining C_ALLOCA
10487 EOF
10488 cat >> confdefs.h <<\EOF
10489 #define C_ALLOCA 1
10490 EOF
10491 }
10492
10493
10494 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10495 echo "configure:10496: checking whether alloca needs Cray hooks" >&5
10496
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 #if defined(CRAY) && ! defined(CRAY2)
10501 webecray
10502 #else
10503 wenotbecray
10504 #endif
10505
10506 EOF
10507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10508   egrep "webecray" >/dev/null 2>&1; then
10509   rm -rf conftest*
10510   ac_cv_os_cray=yes
10511 else
10512   rm -rf conftest*
10513   ac_cv_os_cray=no
10514 fi
10515 rm -f conftest*
10516
10517
10518 echo "$ac_t""$ac_cv_os_cray" 1>&6
10519 if test $ac_cv_os_cray = yes; then
10520 for ac_func in _getb67 GETB67 getb67; do
10521   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10522 echo "configure:10523: checking for $ac_func" >&5
10523
10524 cat > conftest.$ac_ext <<EOF
10525 #line 10526 "configure"
10526 #include "confdefs.h"
10527 /* System header to define __stub macros and hopefully few prototypes,
10528     which can conflict with char $ac_func(); below.  */
10529 #include <assert.h>
10530 /* Override any gcc2 internal prototype to avoid an error.  */
10531 /* We use char because int might match the return type of a gcc2
10532     builtin and then its argument prototype would still apply.  */
10533 char $ac_func();
10534
10535 int main() {
10536
10537 /* The GNU C library defines this for functions which it implements
10538     to always fail with ENOSYS.  Some functions are actually named
10539     something starting with __ and the normal name is an alias.  */
10540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10541 choke me
10542 #else
10543 $ac_func();
10544 #endif
10545
10546 ; return 0; }
10547 EOF
10548 if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10549   rm -rf conftest*
10550   eval "ac_cv_func_$ac_func=yes"
10551 else
10552   echo "configure: failed program was:" >&5
10553   cat conftest.$ac_ext >&5
10554   rm -rf conftest*
10555   eval "ac_cv_func_$ac_func=no"
10556 fi
10557 rm -f conftest*
10558
10559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10560   echo "$ac_t""yes" 1>&6
10561   { test "$extra_verbose" = "yes" && cat << EOF
10562     Defining CRAY_STACKSEG_END = $ac_func
10563 EOF
10564 cat >> confdefs.h <<EOF
10565 #define CRAY_STACKSEG_END $ac_func
10566 EOF
10567 }
10568
10569   break
10570 else
10571   echo "$ac_t""no" 1>&6
10572 fi
10573
10574 done
10575 fi
10576
10577 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10578 echo "configure:10579: checking stack direction for C alloca" >&5
10579
10580 cat > conftest.$ac_ext <<EOF
10581 #line 10582 "configure"
10582 #include "confdefs.h"
10583 find_stack_direction ()
10584 {
10585   static char *addr = 0;
10586   auto char dummy;
10587   if (addr == 0)
10588     {
10589       addr = &dummy;
10590       return find_stack_direction ();
10591     }
10592   else
10593     return (&dummy > addr) ? 1 : -1;
10594 }
10595 main ()
10596 {
10597   exit (find_stack_direction() < 0);
10598 }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10601 then
10602   ac_cv_c_stack_direction=1
10603 else
10604   conftest_rc="$?"
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -fr conftest*
10608   ac_cv_c_stack_direction=-1
10609 fi
10610 rm -fr conftest*
10611
10612 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10613 { test "$extra_verbose" = "yes" && cat << EOF
10614     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10615 EOF
10616 cat >> confdefs.h <<EOF
10617 #define STACK_DIRECTION $ac_cv_c_stack_direction
10618 EOF
10619 }
10620
10621 fi
10622
10623 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10624    echo "    xemacs will be linked with \"$ALLOCA\""
10625  fi
10626
10627 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10628 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10629 echo "configure:10630: checking for vfork.h" >&5
10630
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634 #include <vfork.h>
10635 EOF
10636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10637 { (eval echo configure:10638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10639 if test -z "$ac_err"; then
10640   rm -rf conftest*
10641   eval "ac_cv_header_$ac_safe=yes"
10642 else
10643   echo "$ac_err" >&5
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   eval "ac_cv_header_$ac_safe=no"
10648 fi
10649 rm -f conftest*
10650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10651   echo "$ac_t""yes" 1>&6
10652   { test "$extra_verbose" = "yes" && cat << \EOF
10653     Defining HAVE_VFORK_H
10654 EOF
10655 cat >> confdefs.h <<\EOF
10656 #define HAVE_VFORK_H 1
10657 EOF
10658 }
10659
10660 else
10661   echo "$ac_t""no" 1>&6
10662 fi
10663
10664 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10665 echo "configure:10666: checking for working vfork" >&5
10666
10667 cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 /* Thanks to Paul Eggert for this test.  */
10671 #include <stdio.h>
10672 #include <sys/types.h>
10673 #include <sys/stat.h>
10674 #ifdef HAVE_UNISTD_H
10675 #include <unistd.h>
10676 #endif
10677 #ifdef HAVE_VFORK_H
10678 #include <vfork.h>
10679 #endif
10680 /* On some sparc systems, changes by the child to local and incoming
10681    argument registers are propagated back to the parent.
10682    The compiler is told about this with #include <vfork.h>,
10683    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10684    Test for this by using a static variable whose address
10685    is put into a register that is clobbered by the vfork.  */
10686 static
10687 #ifdef __cplusplus
10688 sparc_address_test (int arg)
10689 #else
10690 sparc_address_test (arg) int arg;
10691 #endif
10692 {
10693   static pid_t child;
10694   if (!child) {
10695     child = vfork ();
10696     if (child < 0) {
10697       perror ("vfork");
10698       _exit(2);
10699     }
10700     if (!child) {
10701       arg = getpid();
10702       write(-1, "", 0);
10703       _exit (arg);
10704     }
10705   }
10706 }
10707 main() {
10708   pid_t parent = getpid ();
10709   pid_t child;
10710
10711   sparc_address_test ();
10712
10713   child = vfork ();
10714
10715   if (child == 0) {
10716     /* Here is another test for sparc vfork register problems.
10717        This test uses lots of local variables, at least
10718        as many local variables as main has allocated so far
10719        including compiler temporaries.  4 locals are enough for
10720        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10721        A buggy compiler should reuse the register of parent
10722        for one of the local variables, since it will think that
10723        parent can't possibly be used any more in this routine.
10724        Assigning to the local variable will thus munge parent
10725        in the parent process.  */
10726     pid_t
10727       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10728       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10729     /* Convince the compiler that p..p7 are live; otherwise, it might
10730        use the same hardware register for all 8 local variables.  */
10731     if (p != p1 || p != p2 || p != p3 || p != p4
10732         || p != p5 || p != p6 || p != p7)
10733       _exit(1);
10734
10735     /* On some systems (e.g. IRIX 3.3),
10736        vfork doesn't separate parent from child file descriptors.
10737        If the child closes a descriptor before it execs or exits,
10738        this munges the parent's descriptor as well.
10739        Test for this by closing stdout in the child.  */
10740     _exit(close(fileno(stdout)) != 0);
10741   } else {
10742     int status;
10743     struct stat st;
10744
10745     while (wait(&status) != child)
10746       ;
10747     exit(
10748          /* Was there some problem with vforking?  */
10749          child < 0
10750
10751          /* Did the child fail?  (This shouldn't happen.)  */
10752          || status
10753
10754          /* Did the vfork/compiler bug occur?  */
10755          || parent != getpid()
10756
10757          /* Did the file descriptor bug occur?  */
10758          || fstat(fileno(stdout), &st) != 0
10759          );
10760   }
10761 }
10762 EOF
10763 if { (eval echo configure:10764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10764 then
10765   ac_cv_func_vfork_works=yes
10766 else
10767   conftest_rc="$?"
10768   echo "configure: failed program was:" >&5
10769   cat conftest.$ac_ext >&5
10770   rm -fr conftest*
10771   ac_cv_func_vfork_works=no
10772 fi
10773 rm -fr conftest*
10774
10775 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10776 if test $ac_cv_func_vfork_works = no; then
10777   { test "$extra_verbose" = "yes" && cat << \EOF
10778     Defining vfork = fork
10779 EOF
10780 cat >> confdefs.h <<\EOF
10781 #define vfork fork
10782 EOF
10783 }
10784
10785 fi
10786
10787
10788 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10789 echo "configure:10790: checking for working strcoll" >&5
10790
10791 cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <string.h>
10795 main ()
10796 {
10797   exit (strcoll ("abc", "def") >= 0 ||
10798         strcoll ("ABC", "DEF") >= 0 ||
10799         strcoll ("123", "456") >= 0);
10800 }
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10803 then
10804   ac_cv_func_strcoll_works=yes
10805 else
10806   conftest_rc="$?"
10807   echo "configure: failed program was:" >&5
10808   cat conftest.$ac_ext >&5
10809   rm -fr conftest*
10810   ac_cv_func_strcoll_works=no
10811 fi
10812 rm -fr conftest*
10813
10814 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10815 if test $ac_cv_func_strcoll_works = yes; then
10816   { test "$extra_verbose" = "yes" && cat << \EOF
10817     Defining HAVE_STRCOLL
10818 EOF
10819 cat >> confdefs.h <<\EOF
10820 #define HAVE_STRCOLL 1
10821 EOF
10822 }
10823
10824 fi
10825
10826
10827 for ac_func in getpgrp
10828 do
10829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10830 echo "configure:10831: checking for $ac_func" >&5
10831
10832 cat > conftest.$ac_ext <<EOF
10833 #line 10834 "configure"
10834 #include "confdefs.h"
10835 /* System header to define __stub macros and hopefully few prototypes,
10836     which can conflict with char $ac_func(); below.  */
10837 #include <assert.h>
10838 /* Override any gcc2 internal prototype to avoid an error.  */
10839 /* We use char because int might match the return type of a gcc2
10840     builtin and then its argument prototype would still apply.  */
10841 char $ac_func();
10842
10843 int main() {
10844
10845 /* The GNU C library defines this for functions which it implements
10846     to always fail with ENOSYS.  Some functions are actually named
10847     something starting with __ and the normal name is an alias.  */
10848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10849 choke me
10850 #else
10851 $ac_func();
10852 #endif
10853
10854 ; return 0; }
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10857   rm -rf conftest*
10858   eval "ac_cv_func_$ac_func=yes"
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -rf conftest*
10863   eval "ac_cv_func_$ac_func=no"
10864 fi
10865 rm -f conftest*
10866
10867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10868   echo "$ac_t""yes" 1>&6
10869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10870   { test "$extra_verbose" = "yes" && cat << EOF
10871     Defining $ac_tr_func
10872 EOF
10873 cat >> confdefs.h <<EOF
10874 #define $ac_tr_func 1
10875 EOF
10876 }
10877  
10878 else
10879   echo "$ac_t""no" 1>&6
10880 fi
10881 done
10882
10883 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10884 echo "configure:10885: checking whether getpgrp takes no argument" >&5
10885
10886 cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889
10890 /*
10891  * If this system has a BSD-style getpgrp(),
10892  * which takes a pid argument, exit unsuccessfully.
10893  *
10894  * Snarfed from Chet Ramey's bash pgrp.c test program
10895  */
10896 #include <stdio.h>
10897 #include <sys/types.h>
10898
10899 int     pid;
10900 int     pg1, pg2, pg3, pg4;
10901 int     ng, np, s, child;
10902
10903 main()
10904 {
10905         pid = getpid();
10906         pg1 = getpgrp(0);
10907         pg2 = getpgrp();
10908         pg3 = getpgrp(pid);
10909         pg4 = getpgrp(1);
10910
10911         /*
10912          * If all of these values are the same, it's pretty sure that
10913          * we're on a system that ignores getpgrp's first argument.
10914          */
10915         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10916                 exit(0);
10917
10918         child = fork();
10919         if (child < 0)
10920                 exit(1);
10921         else if (child == 0) {
10922                 np = getpid();
10923                 /*
10924                  * If this is Sys V, this will not work; pgrp will be
10925                  * set to np because setpgrp just changes a pgrp to be
10926                  * the same as the pid.
10927                  */
10928                 setpgrp(np, pg1);
10929                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10930                 if (ng == pg1) {
10931                         exit(1);
10932                 } else {
10933                         exit(0);
10934                 }
10935         } else {
10936                 wait(&s);
10937                 exit(s>>8);
10938         }
10939 }
10940
10941 EOF
10942 if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10943 then
10944   ac_cv_func_getpgrp_void=yes
10945 else
10946   conftest_rc="$?"
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -fr conftest*
10950   ac_cv_func_getpgrp_void=no
10951 fi
10952 rm -fr conftest*
10953
10954
10955 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10956 if test $ac_cv_func_getpgrp_void = yes; then
10957   { test "$extra_verbose" = "yes" && cat << \EOF
10958     Defining GETPGRP_VOID
10959 EOF
10960 cat >> confdefs.h <<\EOF
10961 #define GETPGRP_VOID 1
10962 EOF
10963 }
10964
10965 fi
10966
10967
10968 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10969 echo "configure:10970: checking for working mmap" >&5
10970 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10971 cat > conftest.$ac_ext <<EOF
10972 #line 10973 "configure"
10973 #include "confdefs.h"
10974 #include <stdio.h>
10975 #include <unistd.h>
10976 #include <fcntl.h>
10977 #include <sys/mman.h>
10978
10979 #ifndef MAP_VARIABLE
10980 #define MAP_VARIABLE 0
10981 #endif
10982
10983 #ifndef MAP_FAILED
10984 #define MAP_FAILED -1
10985 #endif
10986
10987 int main (int argc, char *argv[])
10988 {
10989   int fd = -1;
10990   caddr_t p;
10991 #ifndef MAP_ANONYMOUS
10992   fd = open ("/dev/zero", O_RDWR);
10993   if (fd < 0)
10994     return 1;
10995 #define MAP_ANONYMOUS 0
10996 #endif
10997   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10998            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10999            fd, 0) != (void *) MAP_FAILED)
11000     return 0;
11001   perror ("conftest: mmap failed");
11002   return 1;
11003 }
11004 EOF
11005 if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11006 then
11007   have_mmap=yes
11008 else
11009   conftest_rc="$?"
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -fr conftest*
11013   have_mmap=no
11014 fi
11015 rm -fr conftest* ;;
11016 esac
11017 echo "$ac_t""$have_mmap" 1>&6
11018 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11019     Defining HAVE_MMAP
11020 EOF
11021 cat >> confdefs.h <<\EOF
11022 #define HAVE_MMAP 1
11023 EOF
11024 }
11025
11026
11027 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11028 if test "$rel_alloc $have_mmap" = "default yes"; then
11029   if test "$doug_lea_malloc" = "yes"; then
11030         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11031 echo "configure:11032: checking for M_MMAP_THRESHOLD" >&5
11032     cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 #include <malloc.h>
11036 int main() {
11037
11038 #ifndef M_MMAP_THRESHOLD
11039 #error No M_MMAP_THRESHOLD :-(
11040 !@+$%^&*_)(_ - unlikely to compile...
11041 #endif
11042
11043 ; return 0; }
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11046   rm -rf conftest*
11047   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11048 else
11049   echo "configure: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   rm -rf conftest*
11052   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11053 fi
11054 rm -f conftest*
11055   else
11056     rel_alloc=yes
11057   fi
11058 fi
11059 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11060     Defining REL_ALLOC
11061 EOF
11062 cat >> confdefs.h <<\EOF
11063 #define REL_ALLOC 1
11064 EOF
11065 }
11066
11067
11068 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11069 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11070 echo "configure:11071: checking for termios.h" >&5
11071
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 #include <termios.h>
11076 EOF
11077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11078 { (eval echo configure:11079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11080 if test -z "$ac_err"; then
11081   rm -rf conftest*
11082   eval "ac_cv_header_$ac_safe=yes"
11083 else
11084   echo "$ac_err" >&5
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_header_$ac_safe=no"
11089 fi
11090 rm -f conftest*
11091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093   { test "$extra_verbose" = "yes" && cat << \EOF
11094     Defining HAVE_TERMIOS
11095 EOF
11096 cat >> confdefs.h <<\EOF
11097 #define HAVE_TERMIOS 1
11098 EOF
11099 }
11100
11101   { test "$extra_verbose" = "yes" && cat << \EOF
11102     Defining SIGNALS_VIA_CHARACTERS
11103 EOF
11104 cat >> confdefs.h <<\EOF
11105 #define SIGNALS_VIA_CHARACTERS 1
11106 EOF
11107 }
11108
11109   { test "$extra_verbose" = "yes" && cat << \EOF
11110     Defining NO_TERMIO
11111 EOF
11112 cat >> confdefs.h <<\EOF
11113 #define NO_TERMIO 1
11114 EOF
11115 }
11116
11117 else
11118   echo "$ac_t""no" 1>&6
11119 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11120 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11121 echo "configure:11122: checking for termio.h" >&5
11122
11123 cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <termio.h>
11127 EOF
11128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11129 { (eval echo configure:11130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11131 if test -z "$ac_err"; then
11132   rm -rf conftest*
11133   eval "ac_cv_header_$ac_safe=yes"
11134 else
11135   echo "$ac_err" >&5
11136   echo "configure: failed program was:" >&5
11137   cat conftest.$ac_ext >&5
11138   rm -rf conftest*
11139   eval "ac_cv_header_$ac_safe=no"
11140 fi
11141 rm -f conftest*
11142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144   { test "$extra_verbose" = "yes" && cat << \EOF
11145     Defining HAVE_TERMIO
11146 EOF
11147 cat >> confdefs.h <<\EOF
11148 #define HAVE_TERMIO 1
11149 EOF
11150 }
11151
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155
11156 fi
11157
11158
11159
11160 echo $ac_n "checking for socket""... $ac_c" 1>&6
11161 echo "configure:11162: checking for socket" >&5
11162
11163 cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 /* System header to define __stub macros and hopefully few prototypes,
11167     which can conflict with char socket(); below.  */
11168 #include <assert.h>
11169 /* Override any gcc2 internal prototype to avoid an error.  */
11170 /* We use char because int might match the return type of a gcc2
11171     builtin and then its argument prototype would still apply.  */
11172 char socket();
11173
11174 int main() {
11175
11176 /* The GNU C library defines this for functions which it implements
11177     to always fail with ENOSYS.  Some functions are actually named
11178     something starting with __ and the normal name is an alias.  */
11179 #if defined (__stub_socket) || defined (__stub___socket)
11180 choke me
11181 #else
11182 socket();
11183 #endif
11184
11185 ; return 0; }
11186 EOF
11187 if { (eval echo configure:11188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11188   rm -rf conftest*
11189   eval "ac_cv_func_socket=yes"
11190 else
11191   echo "configure: failed program was:" >&5
11192   cat conftest.$ac_ext >&5
11193   rm -rf conftest*
11194   eval "ac_cv_func_socket=no"
11195 fi
11196 rm -f conftest*
11197
11198 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11199   echo "$ac_t""yes" 1>&6
11200   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11201 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11202 echo "configure:11203: checking for netinet/in.h" >&5
11203
11204 cat > conftest.$ac_ext <<EOF
11205 #line 11206 "configure"
11206 #include "confdefs.h"
11207 #include <netinet/in.h>
11208 EOF
11209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11210 { (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11212 if test -z "$ac_err"; then
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=yes"
11215 else
11216   echo "$ac_err" >&5
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=no"
11221 fi
11222 rm -f conftest*
11223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11224   echo "$ac_t""yes" 1>&6
11225   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11226 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11227 echo "configure:11228: checking for arpa/inet.h" >&5
11228
11229 cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 #include <arpa/inet.h>
11233 EOF
11234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11235 { (eval echo configure:11236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11237 if test -z "$ac_err"; then
11238   rm -rf conftest*
11239   eval "ac_cv_header_$ac_safe=yes"
11240 else
11241   echo "$ac_err" >&5
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -rf conftest*
11245   eval "ac_cv_header_$ac_safe=no"
11246 fi
11247 rm -f conftest*
11248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11249   echo "$ac_t""yes" 1>&6
11250   
11251   { test "$extra_verbose" = "yes" && cat << \EOF
11252     Defining HAVE_SOCKETS
11253 EOF
11254 cat >> confdefs.h <<\EOF
11255 #define HAVE_SOCKETS 1
11256 EOF
11257 }
11258
11259       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11260 echo "configure:11261: checking "for sun_len member in struct sockaddr_un"" >&5
11261       cat > conftest.$ac_ext <<EOF
11262 #line 11263 "configure"
11263 #include "confdefs.h"
11264
11265 #include <sys/types.h>
11266 #include <sys/socket.h>
11267 #include <sys/un.h>
11268       
11269 int main() {
11270 static struct sockaddr_un x; x.sun_len = 1;
11271 ; return 0; }
11272 EOF
11273 if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11274   rm -rf conftest*
11275   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11276     Defining HAVE_SOCKADDR_SUN_LEN
11277 EOF
11278 cat >> confdefs.h <<\EOF
11279 #define HAVE_SOCKADDR_SUN_LEN 1
11280 EOF
11281 }
11282
11283 else
11284   echo "configure: failed program was:" >&5
11285   cat conftest.$ac_ext >&5
11286   rm -rf conftest*
11287   echo "$ac_t""no" 1>&6
11288 fi
11289 rm -f conftest*
11290       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11291 echo "configure:11292: checking "for ip_mreq struct in netinet/in.h"" >&5
11292       cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295
11296 #include <sys/types.h>
11297 #include <netinet/in.h>
11298       
11299 int main() {
11300 static struct ip_mreq x;
11301 ; return 0; }
11302 EOF
11303 if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11304   rm -rf conftest*
11305   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11306     Defining HAVE_MULTICAST
11307 EOF
11308 cat >> confdefs.h <<\EOF
11309 #define HAVE_MULTICAST 1
11310 EOF
11311 }
11312
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   echo "$ac_t""no" 1>&6
11318 fi
11319 rm -f conftest*
11320 else
11321   echo "$ac_t""no" 1>&6
11322 fi
11323
11324 else
11325   echo "$ac_t""no" 1>&6
11326 fi
11327
11328 else
11329   echo "$ac_t""no" 1>&6
11330 fi
11331
11332
11333 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11334 echo "configure:11335: checking for msgget" >&5
11335
11336 cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 /* System header to define __stub macros and hopefully few prototypes,
11340     which can conflict with char msgget(); below.  */
11341 #include <assert.h>
11342 /* Override any gcc2 internal prototype to avoid an error.  */
11343 /* We use char because int might match the return type of a gcc2
11344     builtin and then its argument prototype would still apply.  */
11345 char msgget();
11346
11347 int main() {
11348
11349 /* The GNU C library defines this for functions which it implements
11350     to always fail with ENOSYS.  Some functions are actually named
11351     something starting with __ and the normal name is an alias.  */
11352 #if defined (__stub_msgget) || defined (__stub___msgget)
11353 choke me
11354 #else
11355 msgget();
11356 #endif
11357
11358 ; return 0; }
11359 EOF
11360 if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11361   rm -rf conftest*
11362   eval "ac_cv_func_msgget=yes"
11363 else
11364   echo "configure: failed program was:" >&5
11365   cat conftest.$ac_ext >&5
11366   rm -rf conftest*
11367   eval "ac_cv_func_msgget=no"
11368 fi
11369 rm -f conftest*
11370
11371 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11372   echo "$ac_t""yes" 1>&6
11373   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11374 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11375 echo "configure:11376: checking for sys/ipc.h" >&5
11376
11377 cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380 #include <sys/ipc.h>
11381 EOF
11382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11383 { (eval echo configure:11384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11385 if test -z "$ac_err"; then
11386   rm -rf conftest*
11387   eval "ac_cv_header_$ac_safe=yes"
11388 else
11389   echo "$ac_err" >&5
11390   echo "configure: failed program was:" >&5
11391   cat conftest.$ac_ext >&5
11392   rm -rf conftest*
11393   eval "ac_cv_header_$ac_safe=no"
11394 fi
11395 rm -f conftest*
11396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11397   echo "$ac_t""yes" 1>&6
11398   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11399 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11400 echo "configure:11401: checking for sys/msg.h" >&5
11401
11402 cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 #include <sys/msg.h>
11406 EOF
11407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11408 { (eval echo configure:11409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11410 if test -z "$ac_err"; then
11411   rm -rf conftest*
11412   eval "ac_cv_header_$ac_safe=yes"
11413 else
11414   echo "$ac_err" >&5
11415   echo "configure: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   rm -rf conftest*
11418   eval "ac_cv_header_$ac_safe=no"
11419 fi
11420 rm -f conftest*
11421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11422   echo "$ac_t""yes" 1>&6
11423   { test "$extra_verbose" = "yes" && cat << \EOF
11424     Defining HAVE_SYSVIPC
11425 EOF
11426 cat >> confdefs.h <<\EOF
11427 #define HAVE_SYSVIPC 1
11428 EOF
11429 }
11430
11431 else
11432   echo "$ac_t""no" 1>&6
11433 fi
11434
11435 else
11436   echo "$ac_t""no" 1>&6
11437 fi
11438
11439 else
11440   echo "$ac_t""no" 1>&6
11441 fi
11442
11443
11444 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11445 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11446 echo "configure:11447: checking for dirent.h" >&5
11447
11448 cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451 #include <dirent.h>
11452 EOF
11453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11454 { (eval echo configure:11455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11456 if test -z "$ac_err"; then
11457   rm -rf conftest*
11458   eval "ac_cv_header_$ac_safe=yes"
11459 else
11460   echo "$ac_err" >&5
11461   echo "configure: failed program was:" >&5
11462   cat conftest.$ac_ext >&5
11463   rm -rf conftest*
11464   eval "ac_cv_header_$ac_safe=no"
11465 fi
11466 rm -f conftest*
11467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11468   echo "$ac_t""yes" 1>&6
11469   { test "$extra_verbose" = "yes" && cat << \EOF
11470     Defining SYSV_SYSTEM_DIR
11471 EOF
11472 cat >> confdefs.h <<\EOF
11473 #define SYSV_SYSTEM_DIR 1
11474 EOF
11475 }
11476
11477 else
11478   echo "$ac_t""no" 1>&6
11479 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11480 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11481 echo "configure:11482: checking for sys/dir.h" >&5
11482
11483 cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486 #include <sys/dir.h>
11487 EOF
11488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11489 { (eval echo configure:11490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11491 if test -z "$ac_err"; then
11492   rm -rf conftest*
11493   eval "ac_cv_header_$ac_safe=yes"
11494 else
11495   echo "$ac_err" >&5
11496   echo "configure: failed program was:" >&5
11497   cat conftest.$ac_ext >&5
11498   rm -rf conftest*
11499   eval "ac_cv_header_$ac_safe=no"
11500 fi
11501 rm -f conftest*
11502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11503   echo "$ac_t""yes" 1>&6
11504   :
11505 else
11506   echo "$ac_t""no" 1>&6
11507 { test "$extra_verbose" = "yes" && cat << \EOF
11508     Defining NONSYSTEM_DIR_LIBRARY
11509 EOF
11510 cat >> confdefs.h <<\EOF
11511 #define NONSYSTEM_DIR_LIBRARY 1
11512 EOF
11513 }
11514
11515 fi
11516
11517 fi
11518
11519
11520 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11521 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11522 echo "configure:11523: checking for nlist.h" >&5
11523
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <nlist.h>
11528 EOF
11529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11530 { (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11532 if test -z "$ac_err"; then
11533   rm -rf conftest*
11534   eval "ac_cv_header_$ac_safe=yes"
11535 else
11536   echo "$ac_err" >&5
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_header_$ac_safe=no"
11541 fi
11542 rm -f conftest*
11543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545   { test "$extra_verbose" = "yes" && cat << \EOF
11546     Defining NLIST_STRUCT
11547 EOF
11548 cat >> confdefs.h <<\EOF
11549 #define NLIST_STRUCT 1
11550 EOF
11551 }
11552
11553 else
11554   echo "$ac_t""no" 1>&6
11555 fi
11556
11557
11558
11559 echo "checking "for sound support"" 1>&6
11560 echo "configure:11561: checking "for sound support"" >&5
11561 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11562
11563 if test "$with_native_sound" != "no"; then
11564     if test -n "$native_sound_lib"; then
11565     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11566 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11567 echo "configure:11568: checking for multimedia/audio_device.h" >&5
11568
11569 cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 #include <multimedia/audio_device.h>
11573 EOF
11574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11575 { (eval echo configure:11576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11577 if test -z "$ac_err"; then
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=yes"
11580 else
11581   echo "$ac_err" >&5
11582   echo "configure: failed program was:" >&5
11583   cat conftest.$ac_ext >&5
11584   rm -rf conftest*
11585   eval "ac_cv_header_$ac_safe=no"
11586 fi
11587 rm -f conftest*
11588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11589   echo "$ac_t""yes" 1>&6
11590   sound_found=yes sound_cflags=""
11591       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11592    echo "    xemacs will be linked with \"sunplay.o\""
11593  fi
11594 else
11595   echo "$ac_t""no" 1>&6
11596 fi
11597
11598   fi
11599
11600     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11601     sound_found=yes
11602     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11603    echo "    xemacs will be linked with \"sunplay.o\""
11604  fi
11605     if test -d "/usr/demo/SOUND/include"
11606       then sound_cflags="-I/usr/demo/SOUND/include"
11607       else sound_cflags="-I/usr/demo/SOUND"
11608     fi
11609     if test -z "$native_sound_lib" ; then
11610       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11611         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11612         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11613       fi
11614     fi
11615   fi
11616
11617     if test -z "$sound_found"; then
11618     case "$canonical" in
11619     *-sgi-* )
11620       if test -z "$native_sound_lib"; then
11621         
11622 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11623 echo "configure:11624: checking for ALopenport in -laudio" >&5
11624 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11625
11626 xe_check_libs=" -laudio "
11627 cat > conftest.$ac_ext <<EOF
11628 #line 11629 "configure"
11629 #include "confdefs.h"
11630 /* Override any gcc2 internal prototype to avoid an error.  */
11631 /* We use char because int might match the return type of a gcc2
11632     builtin and then its argument prototype would still apply.  */
11633 char ALopenport();
11634
11635 int main() {
11636 ALopenport()
11637 ; return 0; }
11638 EOF
11639 if { (eval echo configure:11640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11640   rm -rf conftest*
11641   eval "ac_cv_lib_$ac_lib_var=yes"
11642 else
11643   echo "configure: failed program was:" >&5
11644   cat conftest.$ac_ext >&5
11645   rm -rf conftest*
11646   eval "ac_cv_lib_$ac_lib_var=no"
11647 fi
11648 rm -f conftest*
11649 xe_check_libs=""
11650
11651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11652   echo "$ac_t""yes" 1>&6
11653   native_sound_lib="-laudio"
11654 else
11655   echo "$ac_t""no" 1>&6
11656 fi
11657
11658
11659       fi
11660       if test -n "$native_sound_lib"; then
11661         sound_found=yes sound_cflags=""
11662         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11663    echo "    xemacs will be linked with \"sgiplay.o\""
11664  fi
11665       fi ;;
11666     hppa*-hp-hpux* )
11667       if test -z "$native_sound_lib"; then
11668         
11669 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11670 echo "configure:11671: checking for AOpenAudio in -lAlib" >&5
11671 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11672
11673 xe_check_libs=" -lAlib "
11674 cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 /* Override any gcc2 internal prototype to avoid an error.  */
11678 /* We use char because int might match the return type of a gcc2
11679     builtin and then its argument prototype would still apply.  */
11680 char AOpenAudio();
11681
11682 int main() {
11683 AOpenAudio()
11684 ; return 0; }
11685 EOF
11686 if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11687   rm -rf conftest*
11688   eval "ac_cv_lib_$ac_lib_var=yes"
11689 else
11690   echo "configure: failed program was:" >&5
11691   cat conftest.$ac_ext >&5
11692   rm -rf conftest*
11693   eval "ac_cv_lib_$ac_lib_var=no"
11694 fi
11695 rm -f conftest*
11696 xe_check_libs=""
11697
11698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11699   echo "$ac_t""yes" 1>&6
11700   native_sound_lib="-lAlib"
11701 else
11702   echo "$ac_t""no" 1>&6
11703 fi
11704
11705
11706       fi
11707       if test -n "$native_sound_lib"; then
11708         sound_found=yes
11709         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11710    echo "    xemacs will be linked with \"hpplay.o\""
11711  fi
11712         if test "$GCC" = "yes" # Kludge city
11713           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11714           else sound_cflags="+e -I/usr/audio/examples"
11715         fi
11716       fi ;;
11717     esac
11718   fi
11719
11720     if test -z "$sound_found"; then
11721     for dir in "machine" "sys" "linux"; do
11722       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11723 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11724 echo "configure:11725: checking for ${dir}/soundcard.h" >&5
11725
11726 cat > conftest.$ac_ext <<EOF
11727 #line 11728 "configure"
11728 #include "confdefs.h"
11729 #include <${dir}/soundcard.h>
11730 EOF
11731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11732 { (eval echo configure:11733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11734 if test -z "$ac_err"; then
11735   rm -rf conftest*
11736   eval "ac_cv_header_$ac_safe=yes"
11737 else
11738   echo "$ac_err" >&5
11739   echo "configure: failed program was:" >&5
11740   cat conftest.$ac_ext >&5
11741   rm -rf conftest*
11742   eval "ac_cv_header_$ac_safe=no"
11743 fi
11744 rm -f conftest*
11745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11746   echo "$ac_t""yes" 1>&6
11747   sound_found=yes
11748        need_miscplay=yes
11749         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11750    echo "    xemacs will be linked with \"linuxplay.o\""
11751  fi
11752         { test "$extra_verbose" = "yes" && cat << EOF
11753     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
11754 EOF
11755 cat >> confdefs.h <<EOF
11756 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
11757 EOF
11758 }
11759
11760         break
11761 else
11762   echo "$ac_t""no" 1>&6
11763 fi
11764
11765     done
11766   fi
11767
11768     if test -z "$sound_found"; then
11769     if test "$with_msw" = "yes"; then
11770     sound_found=yes
11771     native_sound_lib=
11772     fi
11773   fi
11774
11775   test "$sound_found" = "yes" && with_native_sound=yes
11776 fi
11777
11778 if test "$with_native_sound" = "yes"; then
11779   { test "$extra_verbose" = "yes" && cat << \EOF
11780     Defining HAVE_NATIVE_SOUND
11781 EOF
11782 cat >> confdefs.h <<\EOF
11783 #define HAVE_NATIVE_SOUND 1
11784 EOF
11785 }
11786
11787   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11788 fi
11789
11790 if test "$with_nas_sound" != "no"; then
11791   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11792 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11793 echo "configure:11794: checking for audio/audiolib.h" >&5
11794
11795 cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 #include <audio/audiolib.h>
11799 EOF
11800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11801 { (eval echo configure:11802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11803 if test -z "$ac_err"; then
11804   rm -rf conftest*
11805   eval "ac_cv_header_$ac_safe=yes"
11806 else
11807   echo "$ac_err" >&5
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   eval "ac_cv_header_$ac_safe=no"
11812 fi
11813 rm -f conftest*
11814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11815   echo "$ac_t""yes" 1>&6
11816   
11817     
11818 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11819 echo "configure:11820: checking for AuOpenServer in -laudio" >&5
11820 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11821
11822 xe_check_libs=" -laudio "
11823 cat > conftest.$ac_ext <<EOF
11824 #line 11825 "configure"
11825 #include "confdefs.h"
11826 /* Override any gcc2 internal prototype to avoid an error.  */
11827 /* We use char because int might match the return type of a gcc2
11828     builtin and then its argument prototype would still apply.  */
11829 char AuOpenServer();
11830
11831 int main() {
11832 AuOpenServer()
11833 ; return 0; }
11834 EOF
11835 if { (eval echo configure:11836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11836   rm -rf conftest*
11837   eval "ac_cv_lib_$ac_lib_var=yes"
11838 else
11839   echo "configure: failed program was:" >&5
11840   cat conftest.$ac_ext >&5
11841   rm -rf conftest*
11842   eval "ac_cv_lib_$ac_lib_var=no"
11843 fi
11844 rm -f conftest*
11845 xe_check_libs=""
11846
11847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11848   echo "$ac_t""yes" 1>&6
11849   have_nas_sound=yes
11850 else
11851   echo "$ac_t""no" 1>&6
11852 fi
11853
11854
11855 else
11856   echo "$ac_t""no" 1>&6
11857 fi
11858
11859   if test "$have_nas_sound" = "yes"; then
11860     with_nas_sound=yes
11861     { test "$extra_verbose" = "yes" && cat << \EOF
11862     Defining HAVE_NAS_SOUND
11863 EOF
11864 cat >> confdefs.h <<\EOF
11865 #define HAVE_NAS_SOUND 1
11866 EOF
11867 }
11868
11869     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11870    echo "    xemacs will be linked with \"nas.o\""
11871  fi
11872     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11873             cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876 #include <audio/Xtutil.h>
11877 EOF
11878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11879   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11880   :
11881 else
11882   rm -rf conftest*
11883   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11884     Defining NAS_NO_ERROR_JUMP
11885 EOF
11886 cat >> confdefs.h <<\EOF
11887 #define NAS_NO_ERROR_JUMP 1
11888 EOF
11889 }
11890
11891 fi
11892 rm -f conftest*
11893
11894   else
11895     test "$with_nas_sound" = "yes" && \
11896       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11897     with_nas_sound=no
11898   fi
11899 fi
11900
11901 if test "$with_esd_sound" != "no"; then
11902   # Extract the first word of "esd-config", so it can be a program name with args.
11903 set dummy esd-config; ac_word=$2
11904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11905 echo "configure:11906: checking for $ac_word" >&5
11906
11907 if test -n "$have_esd_config"; then
11908   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11909 else
11910   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11911   ac_dummy="$PATH"
11912   for ac_dir in $ac_dummy; do
11913     test -z "$ac_dir" && ac_dir=.
11914     if test -f $ac_dir/$ac_word; then
11915       ac_cv_prog_have_esd_config="yes"
11916       break
11917     fi
11918   done
11919   IFS="$ac_save_ifs"
11920   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11921 fi
11922 have_esd_config="$ac_cv_prog_have_esd_config"
11923 if test -n "$have_esd_config"; then
11924   echo "$ac_t""$have_esd_config" 1>&6
11925 else
11926   echo "$ac_t""no" 1>&6
11927 fi
11928
11929   if test "$have_esd_config" = "yes"; then
11930     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11931     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
11932     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11933     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11934 echo "configure:11935: checking for esd_play_stream" >&5
11935
11936 cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939 /* System header to define __stub macros and hopefully few prototypes,
11940     which can conflict with char esd_play_stream(); below.  */
11941 #include <assert.h>
11942 /* Override any gcc2 internal prototype to avoid an error.  */
11943 /* We use char because int might match the return type of a gcc2
11944     builtin and then its argument prototype would still apply.  */
11945 char esd_play_stream();
11946
11947 int main() {
11948
11949 /* The GNU C library defines this for functions which it implements
11950     to always fail with ENOSYS.  Some functions are actually named
11951     something starting with __ and the normal name is an alias.  */
11952 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11953 choke me
11954 #else
11955 esd_play_stream();
11956 #endif
11957
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11961   rm -rf conftest*
11962   eval "ac_cv_func_esd_play_stream=yes"
11963 else
11964   echo "configure: failed program was:" >&5
11965   cat conftest.$ac_ext >&5
11966   rm -rf conftest*
11967   eval "ac_cv_func_esd_play_stream=no"
11968 fi
11969 rm -f conftest*
11970
11971 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11972   echo "$ac_t""yes" 1>&6
11973   have_esd_sound=yes
11974 else
11975   echo "$ac_t""no" 1>&6
11976 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11977 fi
11978
11979   fi
11980
11981   if test "$have_esd_sound" = "yes"; then
11982     with_esd_sound=yes
11983     need_miscplay=yes
11984     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11985    echo "    xemacs will be linked with \"esd.o\""
11986  fi
11987     { test "$extra_verbose" = "yes" && cat << \EOF
11988     Defining HAVE_ESD_SOUND
11989 EOF
11990 cat >> confdefs.h <<\EOF
11991 #define HAVE_ESD_SOUND 1
11992 EOF
11993 }
11994
11995   else
11996     test "$with_esd_sound" = "yes" && \
11997       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11998     with_esd_sound=no
11999   fi
12000 fi
12001
12002 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12003    echo "    xemacs will be linked with \"miscplay.o\""
12004  fi
12005
12006
12007 test -z "$with_tty" && with_tty=yes
12008
12009 if test "$with_tty" = "yes"  ; then
12010   echo "checking for TTY-related features" 1>&6
12011 echo "configure:12012: checking for TTY-related features" >&5
12012   { test "$extra_verbose" = "yes" && cat << \EOF
12013     Defining HAVE_TTY
12014 EOF
12015 cat >> confdefs.h <<\EOF
12016 #define HAVE_TTY 1
12017 EOF
12018 }
12019
12020   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
12021    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\""
12022  fi
12023
12024     if test -z "$with_ncurses"; then
12025     
12026 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12027 echo "configure:12028: checking for tgetent in -lncurses" >&5
12028 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12029
12030 xe_check_libs=" -lncurses "
12031 cat > conftest.$ac_ext <<EOF
12032 #line 12033 "configure"
12033 #include "confdefs.h"
12034 /* Override any gcc2 internal prototype to avoid an error.  */
12035 /* We use char because int might match the return type of a gcc2
12036     builtin and then its argument prototype would still apply.  */
12037 char tgetent();
12038
12039 int main() {
12040 tgetent()
12041 ; return 0; }
12042 EOF
12043 if { (eval echo configure:12044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12044   rm -rf conftest*
12045   eval "ac_cv_lib_$ac_lib_var=yes"
12046 else
12047   echo "configure: failed program was:" >&5
12048   cat conftest.$ac_ext >&5
12049   rm -rf conftest*
12050   eval "ac_cv_lib_$ac_lib_var=no"
12051 fi
12052 rm -f conftest*
12053 xe_check_libs=""
12054
12055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12056   echo "$ac_t""yes" 1>&6
12057   with_ncurses=yes
12058 else
12059   echo "$ac_t""no" 1>&6
12060 with_ncurses=no
12061 fi
12062
12063
12064   fi
12065   if test "$with_ncurses" = "yes"; then
12066     { test "$extra_verbose" = "yes" && cat << \EOF
12067     Defining HAVE_NCURSES
12068 EOF
12069 cat >> confdefs.h <<\EOF
12070 #define HAVE_NCURSES 1
12071 EOF
12072 }
12073
12074     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12075 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12076 echo "configure:12077: checking for ncurses/curses.h" >&5
12077
12078 cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 #include <ncurses/curses.h>
12082 EOF
12083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12084 { (eval echo configure:12085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12086 if test -z "$ac_err"; then
12087   rm -rf conftest*
12088   eval "ac_cv_header_$ac_safe=yes"
12089 else
12090   echo "$ac_err" >&5
12091   echo "configure: failed program was:" >&5
12092   cat conftest.$ac_ext >&5
12093   rm -rf conftest*
12094   eval "ac_cv_header_$ac_safe=no"
12095 fi
12096 rm -f conftest*
12097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12098   echo "$ac_t""yes" 1>&6
12099   curses_h_file=ncurses/curses.h
12100 else
12101   echo "$ac_t""no" 1>&6
12102 fi
12103
12104     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12105 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12106 echo "configure:12107: checking for ncurses/term.h" >&5
12107
12108 cat > conftest.$ac_ext <<EOF
12109 #line 12110 "configure"
12110 #include "confdefs.h"
12111 #include <ncurses/term.h>
12112 EOF
12113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12114 { (eval echo configure:12115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12116 if test -z "$ac_err"; then
12117   rm -rf conftest*
12118   eval "ac_cv_header_$ac_safe=yes"
12119 else
12120   echo "$ac_err" >&5
12121   echo "configure: failed program was:" >&5
12122   cat conftest.$ac_ext >&5
12123   rm -rf conftest*
12124   eval "ac_cv_header_$ac_safe=no"
12125 fi
12126 rm -f conftest*
12127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12128   echo "$ac_t""yes" 1>&6
12129   term_h_file=ncurses/term.h
12130 else
12131   echo "$ac_t""no" 1>&6
12132 fi
12133
12134     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12135    echo "    xemacs will be linked with \"terminfo.o\""
12136  fi
12137     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12138
12139     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12140                         save_c_switch_site="$c_switch_site"
12141       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12142       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12143 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12144 echo "configure:12145: checking for ncurses/curses.h" >&5
12145
12146 cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149 #include <ncurses/curses.h>
12150 EOF
12151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12152 { (eval echo configure:12153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12154 if test -z "$ac_err"; then
12155   rm -rf conftest*
12156   eval "ac_cv_header_$ac_safe=yes"
12157 else
12158   echo "$ac_err" >&5
12159   echo "configure: failed program was:" >&5
12160   cat conftest.$ac_ext >&5
12161   rm -rf conftest*
12162   eval "ac_cv_header_$ac_safe=no"
12163 fi
12164 rm -f conftest*
12165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12166   echo "$ac_t""yes" 1>&6
12167   curses_h_file=ncurses/curses.h
12168 else
12169   echo "$ac_t""no" 1>&6
12170 fi
12171
12172       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12173         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12174         else c_switch_site="$save_c_switch_site"
12175       fi
12176     fi
12177   else         if test "$have_terminfo" = "yes"; then
12178       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12179    echo "    xemacs will be linked with \"terminfo.o\""
12180  fi
12181       if test -n "$libs_termcap"; then
12182         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12183       else
12184         for lib in curses termlib termcap; do
12185           
12186 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12187 echo "configure:12188: checking for tgetent in -l$lib" >&5
12188 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12189
12190 xe_check_libs=" -l$lib "
12191 cat > conftest.$ac_ext <<EOF
12192 #line 12193 "configure"
12193 #include "confdefs.h"
12194 /* Override any gcc2 internal prototype to avoid an error.  */
12195 /* We use char because int might match the return type of a gcc2
12196     builtin and then its argument prototype would still apply.  */
12197 char tgetent();
12198
12199 int main() {
12200 tgetent()
12201 ; return 0; }
12202 EOF
12203 if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12204   rm -rf conftest*
12205   eval "ac_cv_lib_$ac_lib_var=yes"
12206 else
12207   echo "configure: failed program was:" >&5
12208   cat conftest.$ac_ext >&5
12209   rm -rf conftest*
12210   eval "ac_cv_lib_$ac_lib_var=no"
12211 fi
12212 rm -f conftest*
12213 xe_check_libs=""
12214
12215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12216   echo "$ac_t""yes" 1>&6
12217   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12218 else
12219   echo "$ac_t""no" 1>&6
12220 fi
12221
12222
12223         done
12224       fi
12225     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12226    echo "    xemacs will be linked with \"tparam.o\""
12227  fi
12228                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12229       if test -n "$libs_termcap"; then
12230         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12231       else
12232         
12233 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12234 echo "configure:12235: checking for tgetent in -lcurses" >&5
12235 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12236
12237 xe_check_libs=" -lcurses "
12238 cat > conftest.$ac_ext <<EOF
12239 #line 12240 "configure"
12240 #include "confdefs.h"
12241 /* Override any gcc2 internal prototype to avoid an error.  */
12242 /* We use char because int might match the return type of a gcc2
12243     builtin and then its argument prototype would still apply.  */
12244 char tgetent();
12245
12246 int main() {
12247 tgetent()
12248 ; return 0; }
12249 EOF
12250 if { (eval echo configure:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12251   rm -rf conftest*
12252   eval "ac_cv_lib_$ac_lib_var=yes"
12253 else
12254   echo "configure: failed program was:" >&5
12255   cat conftest.$ac_ext >&5
12256   rm -rf conftest*
12257   eval "ac_cv_lib_$ac_lib_var=no"
12258 fi
12259 rm -f conftest*
12260 xe_check_libs=""
12261
12262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12263   echo "$ac_t""yes" 1>&6
12264   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12265 else
12266   echo "$ac_t""no" 1>&6
12267 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12268 echo "configure:12269: checking for tgetent in -ltermcap" >&5
12269 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12270
12271 xe_check_libs=" -ltermcap "
12272 cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 /* Override any gcc2 internal prototype to avoid an error.  */
12276 /* We use char because int might match the return type of a gcc2
12277     builtin and then its argument prototype would still apply.  */
12278 char tgetent();
12279
12280 int main() {
12281 tgetent()
12282 ; return 0; }
12283 EOF
12284 if { (eval echo configure:12285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12285   rm -rf conftest*
12286   eval "ac_cv_lib_$ac_lib_var=yes"
12287 else
12288   echo "configure: failed program was:" >&5
12289   cat conftest.$ac_ext >&5
12290   rm -rf conftest*
12291   eval "ac_cv_lib_$ac_lib_var=no"
12292 fi
12293 rm -f conftest*
12294 xe_check_libs=""
12295
12296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12297   echo "$ac_t""yes" 1>&6
12298   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12299 else
12300   echo "$ac_t""no" 1>&6
12301 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12302    echo "    xemacs will be linked with \"termcap.o\""
12303  fi
12304 fi
12305
12306
12307 fi
12308
12309
12310       fi
12311     fi
12312   fi
12313   { test "$extra_verbose" = "yes" && cat << EOF
12314     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12315 EOF
12316 cat >> confdefs.h <<EOF
12317 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12318 EOF
12319 }
12320
12321   { test "$extra_verbose" = "yes" && cat << EOF
12322     Defining TERM_H_FILE = "${term_h_file-term.h}"
12323 EOF
12324 cat >> confdefs.h <<EOF
12325 #define TERM_H_FILE "${term_h_file-term.h}"
12326 EOF
12327 }
12328
12329
12330     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12331 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12332 echo "configure:12333: checking for gpm.h" >&5
12333
12334 cat > conftest.$ac_ext <<EOF
12335 #line 12336 "configure"
12336 #include "confdefs.h"
12337 #include <gpm.h>
12338 EOF
12339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12340 { (eval echo configure:12341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12342 if test -z "$ac_err"; then
12343   rm -rf conftest*
12344   eval "ac_cv_header_$ac_safe=yes"
12345 else
12346   echo "$ac_err" >&5
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -rf conftest*
12350   eval "ac_cv_header_$ac_safe=no"
12351 fi
12352 rm -f conftest*
12353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12354   echo "$ac_t""yes" 1>&6
12355   :
12356 else
12357   echo "$ac_t""no" 1>&6
12358 with_gpm=no
12359 fi
12360  }
12361   test -z "$with_gpm" && { 
12362 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12363 echo "configure:12364: checking for Gpm_Open in -lgpm" >&5
12364 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12365
12366 xe_check_libs=" -lgpm "
12367 cat > conftest.$ac_ext <<EOF
12368 #line 12369 "configure"
12369 #include "confdefs.h"
12370 /* Override any gcc2 internal prototype to avoid an error.  */
12371 /* We use char because int might match the return type of a gcc2
12372     builtin and then its argument prototype would still apply.  */
12373 char Gpm_Open();
12374
12375 int main() {
12376 Gpm_Open()
12377 ; return 0; }
12378 EOF
12379 if { (eval echo configure:12380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12380   rm -rf conftest*
12381   eval "ac_cv_lib_$ac_lib_var=yes"
12382 else
12383   echo "configure: failed program was:" >&5
12384   cat conftest.$ac_ext >&5
12385   rm -rf conftest*
12386   eval "ac_cv_lib_$ac_lib_var=no"
12387 fi
12388 rm -f conftest*
12389 xe_check_libs=""
12390
12391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12392   echo "$ac_t""yes" 1>&6
12393   with_gpm=yes
12394 else
12395   echo "$ac_t""no" 1>&6
12396 with_gpm=no
12397 fi
12398
12399  }
12400   if test "$with_gpm" = "yes"; then
12401     { test "$extra_verbose" = "yes" && cat << \EOF
12402     Defining HAVE_GPM
12403 EOF
12404 cat >> confdefs.h <<\EOF
12405 #define HAVE_GPM 1
12406 EOF
12407 }
12408
12409     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12410    echo "    xemacs will be linked with \"gpmevent.o\""
12411  fi
12412     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12413   fi
12414
12415 else   for feature in ncurses gpm; do
12416     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12417       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12418     fi
12419     eval "with_${feature}=no"
12420   done
12421 fi 
12422 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12423    echo "    xemacs will be linked with \"event-unixoid.o\""
12424  fi
12425
12426
12427 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12428   != "no no no" && echo "checking for database support" 1>&6
12429 echo "configure:12430: checking for database support" >&5
12430
12431 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12432   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12433 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12434 echo "configure:12435: checking for ndbm.h" >&5
12435
12436 cat > conftest.$ac_ext <<EOF
12437 #line 12438 "configure"
12438 #include "confdefs.h"
12439 #include <ndbm.h>
12440 EOF
12441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12442 { (eval echo configure:12443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12444 if test -z "$ac_err"; then
12445   rm -rf conftest*
12446   eval "ac_cv_header_$ac_safe=yes"
12447 else
12448   echo "$ac_err" >&5
12449   echo "configure: failed program was:" >&5
12450   cat conftest.$ac_ext >&5
12451   rm -rf conftest*
12452   eval "ac_cv_header_$ac_safe=no"
12453 fi
12454 rm -f conftest*
12455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12456   echo "$ac_t""yes" 1>&6
12457   :
12458 else
12459   echo "$ac_t""no" 1>&6
12460
12461     test "$with_database_gdbm" = "yes" -o \
12462          "$with_database_dbm"  = "yes" && \
12463       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12464     with_database_gdbm=no with_database_dbm=no
12465 fi
12466
12467 fi
12468
12469 if test "$with_database_gdbm" != "no"; then
12470   
12471 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12472 echo "configure:12473: checking for dbm_open in -lgdbm" >&5
12473 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12474
12475 xe_check_libs=" -lgdbm "
12476 cat > conftest.$ac_ext <<EOF
12477 #line 12478 "configure"
12478 #include "confdefs.h"
12479 /* Override any gcc2 internal prototype to avoid an error.  */
12480 /* We use char because int might match the return type of a gcc2
12481     builtin and then its argument prototype would still apply.  */
12482 char dbm_open();
12483
12484 int main() {
12485 dbm_open()
12486 ; return 0; }
12487 EOF
12488 if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12489   rm -rf conftest*
12490   eval "ac_cv_lib_$ac_lib_var=yes"
12491 else
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -rf conftest*
12495   eval "ac_cv_lib_$ac_lib_var=no"
12496 fi
12497 rm -f conftest*
12498 xe_check_libs=""
12499
12500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12501   echo "$ac_t""yes" 1>&6
12502   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12503 else
12504   echo "$ac_t""no" 1>&6
12505 if test "$with_database_gdbm" = "yes"; then
12506      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12507    fi
12508    with_database_gdbm=no
12509 fi
12510
12511
12512 fi
12513
12514 if test "$with_database_dbm" != "no"; then
12515   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12516 echo "configure:12517: checking for dbm_open" >&5
12517
12518 cat > conftest.$ac_ext <<EOF
12519 #line 12520 "configure"
12520 #include "confdefs.h"
12521 /* System header to define __stub macros and hopefully few prototypes,
12522     which can conflict with char dbm_open(); below.  */
12523 #include <assert.h>
12524 /* Override any gcc2 internal prototype to avoid an error.  */
12525 /* We use char because int might match the return type of a gcc2
12526     builtin and then its argument prototype would still apply.  */
12527 char dbm_open();
12528
12529 int main() {
12530
12531 /* The GNU C library defines this for functions which it implements
12532     to always fail with ENOSYS.  Some functions are actually named
12533     something starting with __ and the normal name is an alias.  */
12534 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12535 choke me
12536 #else
12537 dbm_open();
12538 #endif
12539
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12543   rm -rf conftest*
12544   eval "ac_cv_func_dbm_open=yes"
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   eval "ac_cv_func_dbm_open=no"
12550 fi
12551 rm -f conftest*
12552
12553 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12554   echo "$ac_t""yes" 1>&6
12555   with_database_dbm=yes libdbm=
12556 else
12557   echo "$ac_t""no" 1>&6
12558
12559     
12560 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12561 echo "configure:12562: checking for dbm_open in -ldbm" >&5
12562 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12563
12564 xe_check_libs=" -ldbm "
12565 cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568 /* Override any gcc2 internal prototype to avoid an error.  */
12569 /* We use char because int might match the return type of a gcc2
12570     builtin and then its argument prototype would still apply.  */
12571 char dbm_open();
12572
12573 int main() {
12574 dbm_open()
12575 ; return 0; }
12576 EOF
12577 if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12578   rm -rf conftest*
12579   eval "ac_cv_lib_$ac_lib_var=yes"
12580 else
12581   echo "configure: failed program was:" >&5
12582   cat conftest.$ac_ext >&5
12583   rm -rf conftest*
12584   eval "ac_cv_lib_$ac_lib_var=no"
12585 fi
12586 rm -f conftest*
12587 xe_check_libs=""
12588
12589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12590   echo "$ac_t""yes" 1>&6
12591   with_database_dbm=yes libdbm=-ldbm
12592 else
12593   echo "$ac_t""no" 1>&6
12594 test "$with_database_dbm" = "yes" && \
12595         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12596       with_database_dbm=no
12597 fi
12598
12599
12600 fi
12601
12602 fi
12603
12604 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12605 test "$with_database_gdbm" = "yes" -o \
12606      "$with_database_dbm"  = "yes" && \
12607   { test "$extra_verbose" = "yes" && cat << \EOF
12608     Defining HAVE_DBM
12609 EOF
12610 cat >> confdefs.h <<\EOF
12611 #define HAVE_DBM 1
12612 EOF
12613 }
12614
12615
12616 if test "$with_database_berkdb" != "no"; then
12617   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12618 echo "configure:12619: checking for Berkeley db.h" >&5
12619   for header in "db/db.h" "db.h"; do
12620     cat > conftest.$ac_ext <<EOF
12621 #line 12622 "configure"
12622 #include "confdefs.h"
12623
12624 #include <stdlib.h>
12625 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12626 #ifdef HAVE_INTTYPES_H
12627 #define __BIT_TYPES_DEFINED__
12628 #include <inttypes.h>
12629 typedef uint8_t  u_int8_t;
12630 typedef uint16_t u_int16_t;
12631 typedef uint32_t u_int32_t;
12632 #ifdef WE_DONT_NEED_QUADS
12633 typedef uint64_t u_int64_t;
12634 #endif
12635 #endif
12636 #endif
12637 #include <$header>
12638
12639 int main() {
12640
12641 ; return 0; }
12642 EOF
12643 if { (eval echo configure:12644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12644   rm -rf conftest*
12645   db_h_file="$header"; break
12646 else
12647   echo "configure: failed program was:" >&5
12648   cat conftest.$ac_ext >&5
12649 fi
12650 rm -f conftest*
12651   done
12652   if test -z "$db_h_file"
12653   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12654   else echo "$ac_t""$db_h_file" 1>&6
12655   fi
12656
12657   if test "$with_database_berkdb" != "no"; then
12658     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12659 echo "configure:12660: checking for Berkeley DB version" >&5
12660     cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 #include <$db_h_file>
12664 #if DB_VERSION_MAJOR > 1
12665 yes
12666 #endif
12667
12668 EOF
12669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12670   egrep "yes" >/dev/null 2>&1; then
12671   rm -rf conftest*
12672   echo "$ac_t""2" 1>&6; dbfunc=db_open
12673 else
12674   rm -rf conftest*
12675   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12676 fi
12677 rm -f conftest*
12678
12679     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12680 echo "configure:12681: checking for $dbfunc" >&5
12681
12682 cat > conftest.$ac_ext <<EOF
12683 #line 12684 "configure"
12684 #include "confdefs.h"
12685 /* System header to define __stub macros and hopefully few prototypes,
12686     which can conflict with char $dbfunc(); below.  */
12687 #include <assert.h>
12688 /* Override any gcc2 internal prototype to avoid an error.  */
12689 /* We use char because int might match the return type of a gcc2
12690     builtin and then its argument prototype would still apply.  */
12691 char $dbfunc();
12692
12693 int main() {
12694
12695 /* The GNU C library defines this for functions which it implements
12696     to always fail with ENOSYS.  Some functions are actually named
12697     something starting with __ and the normal name is an alias.  */
12698 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12699 choke me
12700 #else
12701 $dbfunc();
12702 #endif
12703
12704 ; return 0; }
12705 EOF
12706 if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12707   rm -rf conftest*
12708   eval "ac_cv_func_$dbfunc=yes"
12709 else
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -rf conftest*
12713   eval "ac_cv_func_$dbfunc=no"
12714 fi
12715 rm -f conftest*
12716
12717 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12718   echo "$ac_t""yes" 1>&6
12719   with_database_berkdb=yes need_libdb=no
12720 else
12721   echo "$ac_t""no" 1>&6
12722
12723     
12724 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12725 echo "configure:12726: checking for $dbfunc in -ldb" >&5
12726 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12727
12728 xe_check_libs=" -ldb "
12729 cat > conftest.$ac_ext <<EOF
12730 #line 12731 "configure"
12731 #include "confdefs.h"
12732 /* Override any gcc2 internal prototype to avoid an error.  */
12733 /* We use char because int might match the return type of a gcc2
12734     builtin and then its argument prototype would still apply.  */
12735 char $dbfunc();
12736
12737 int main() {
12738 $dbfunc()
12739 ; return 0; }
12740 EOF
12741 if { (eval echo configure:12742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12742   rm -rf conftest*
12743   eval "ac_cv_lib_$ac_lib_var=yes"
12744 else
12745   echo "configure: failed program was:" >&5
12746   cat conftest.$ac_ext >&5
12747   rm -rf conftest*
12748   eval "ac_cv_lib_$ac_lib_var=no"
12749 fi
12750 rm -f conftest*
12751 xe_check_libs=""
12752
12753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12754   echo "$ac_t""yes" 1>&6
12755   with_database_berkdb=yes need_libdb=yes
12756 else
12757   echo "$ac_t""no" 1>&6
12758 fi
12759
12760
12761 fi
12762
12763   fi
12764
12765   if test "$with_database_berkdb" = "yes"; then
12766     { test "$extra_verbose" = "yes" && cat << EOF
12767     Defining DB_H_FILE = "$db_h_file"
12768 EOF
12769 cat >> confdefs.h <<EOF
12770 #define DB_H_FILE "$db_h_file"
12771 EOF
12772 }
12773
12774     { test "$extra_verbose" = "yes" && cat << \EOF
12775     Defining HAVE_BERKELEY_DB
12776 EOF
12777 cat >> confdefs.h <<\EOF
12778 #define HAVE_BERKELEY_DB 1
12779 EOF
12780 }
12781
12782     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12783   else with_database_berkdb=no
12784   fi
12785 fi
12786
12787 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12788      != "no no no"; then
12789   { test "$extra_verbose" = "yes" && cat << \EOF
12790     Defining HAVE_DATABASE
12791 EOF
12792 cat >> confdefs.h <<\EOF
12793 #define HAVE_DATABASE 1
12794 EOF
12795 }
12796
12797   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12798    echo "    xemacs will be linked with \"database.o\""
12799  fi
12800 fi
12801
12802 if test "$with_socks" = "yes"; then
12803   
12804 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12805 echo "configure:12806: checking for SOCKSinit in -lsocks" >&5
12806 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12807
12808 xe_check_libs=" -lsocks "
12809 cat > conftest.$ac_ext <<EOF
12810 #line 12811 "configure"
12811 #include "confdefs.h"
12812 /* Override any gcc2 internal prototype to avoid an error.  */
12813 /* We use char because int might match the return type of a gcc2
12814     builtin and then its argument prototype would still apply.  */
12815 char SOCKSinit();
12816
12817 int main() {
12818 SOCKSinit()
12819 ; return 0; }
12820 EOF
12821 if { (eval echo configure:12822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12822   rm -rf conftest*
12823   eval "ac_cv_lib_$ac_lib_var=yes"
12824 else
12825   echo "configure: failed program was:" >&5
12826   cat conftest.$ac_ext >&5
12827   rm -rf conftest*
12828   eval "ac_cv_lib_$ac_lib_var=no"
12829 fi
12830 rm -f conftest*
12831 xe_check_libs=""
12832
12833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12834   echo "$ac_t""yes" 1>&6
12835     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12836     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12837   { test "$extra_verbose" = "yes" && cat << EOF
12838     Defining $ac_tr_lib
12839 EOF
12840 cat >> confdefs.h <<EOF
12841 #define $ac_tr_lib 1
12842 EOF
12843 }
12844
12845   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12846
12847 else
12848   echo "$ac_t""no" 1>&6
12849 fi
12850
12851
12852   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12853     Defining HAVE_SOCKS
12854 EOF
12855 cat >> confdefs.h <<\EOF
12856 #define HAVE_SOCKS 1
12857 EOF
12858 }
12859
12860 fi
12861
12862 if test "$usage_tracking" = "yes"; then
12863   { test "$extra_verbose" = "yes" && cat << \EOF
12864     Defining USAGE_TRACKING
12865 EOF
12866 cat >> confdefs.h <<\EOF
12867 #define USAGE_TRACKING 1
12868 EOF
12869 }
12870
12871   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12872 fi
12873
12874 if test "$with_modules" != "no"; then
12875   echo "checking for module support" 1>&6
12876 echo "configure:12877: checking for module support" >&5
12877
12878     if test "$with_msw" = "yes"; then
12879     have_dl=yes;
12880   else
12881         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12882 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12883 echo "configure:12884: checking for dlfcn.h" >&5
12884
12885 cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 #include <dlfcn.h>
12889 EOF
12890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12891 { (eval echo configure:12892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12893 if test -z "$ac_err"; then
12894   rm -rf conftest*
12895   eval "ac_cv_header_$ac_safe=yes"
12896 else
12897   echo "$ac_err" >&5
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   eval "ac_cv_header_$ac_safe=no"
12902 fi
12903 rm -f conftest*
12904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12905   echo "$ac_t""yes" 1>&6
12906   
12907       
12908 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12909 echo "configure:12910: checking for dlopen in -ldl" >&5
12910 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12911
12912 xe_check_libs=" -ldl "
12913 cat > conftest.$ac_ext <<EOF
12914 #line 12915 "configure"
12915 #include "confdefs.h"
12916 /* Override any gcc2 internal prototype to avoid an error.  */
12917 /* We use char because int might match the return type of a gcc2
12918     builtin and then its argument prototype would still apply.  */
12919 char dlopen();
12920
12921 int main() {
12922 dlopen()
12923 ; return 0; }
12924 EOF
12925 if { (eval echo configure:12926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12926   rm -rf conftest*
12927   eval "ac_cv_lib_$ac_lib_var=yes"
12928 else
12929   echo "configure: failed program was:" >&5
12930   cat conftest.$ac_ext >&5
12931   rm -rf conftest*
12932   eval "ac_cv_lib_$ac_lib_var=no"
12933 fi
12934 rm -f conftest*
12935 xe_check_libs=""
12936
12937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12938   echo "$ac_t""yes" 1>&6
12939   have_dl=yes libdl=dl
12940 else
12941   echo "$ac_t""no" 1>&6
12942
12943 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12944 echo "configure:12945: checking for dlopen in -lc" >&5
12945 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12946
12947 xe_check_libs=" -lc "
12948 cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 /* Override any gcc2 internal prototype to avoid an error.  */
12952 /* We use char because int might match the return type of a gcc2
12953     builtin and then its argument prototype would still apply.  */
12954 char dlopen();
12955
12956 int main() {
12957 dlopen()
12958 ; return 0; }
12959 EOF
12960 if { (eval echo configure:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12961   rm -rf conftest*
12962   eval "ac_cv_lib_$ac_lib_var=yes"
12963 else
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -rf conftest*
12967   eval "ac_cv_lib_$ac_lib_var=no"
12968 fi
12969 rm -f conftest*
12970 xe_check_libs=""
12971
12972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12973   echo "$ac_t""yes" 1>&6
12974   have_dl=yes 
12975 else
12976   echo "$ac_t""no" 1>&6
12977 fi
12978
12979
12980 fi
12981
12982
12983 else
12984   echo "$ac_t""no" 1>&6
12985 fi
12986
12987     if test -n "$have_dl"; then
12988       { test "$extra_verbose" = "yes" && cat << \EOF
12989     Defining HAVE_DLOPEN
12990 EOF
12991 cat >> confdefs.h <<\EOF
12992 #define HAVE_DLOPEN 1
12993 EOF
12994 }
12995
12996     else
12997       
12998 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12999 echo "configure:13000: checking for shl_load in -ldld" >&5
13000 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13001
13002 xe_check_libs=" -ldld "
13003 cat > conftest.$ac_ext <<EOF
13004 #line 13005 "configure"
13005 #include "confdefs.h"
13006 /* Override any gcc2 internal prototype to avoid an error.  */
13007 /* We use char because int might match the return type of a gcc2
13008     builtin and then its argument prototype would still apply.  */
13009 char shl_load();
13010
13011 int main() {
13012 shl_load()
13013 ; return 0; }
13014 EOF
13015 if { (eval echo configure:13016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13016   rm -rf conftest*
13017   eval "ac_cv_lib_$ac_lib_var=yes"
13018 else
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   eval "ac_cv_lib_$ac_lib_var=no"
13023 fi
13024 rm -f conftest*
13025 xe_check_libs=""
13026
13027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13028   echo "$ac_t""yes" 1>&6
13029   libdl=dld have_dl=yes;
13030         { test "$extra_verbose" = "yes" && cat << \EOF
13031     Defining HAVE_SHL_LOAD
13032 EOF
13033 cat >> confdefs.h <<\EOF
13034 #define HAVE_SHL_LOAD 1
13035 EOF
13036 }
13037
13038 else
13039   echo "$ac_t""no" 1>&6
13040
13041 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13042 echo "configure:13043: checking for dld_init in -ldld" >&5
13043 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13044
13045 xe_check_libs=" -ldld "
13046 cat > conftest.$ac_ext <<EOF
13047 #line 13048 "configure"
13048 #include "confdefs.h"
13049 /* Override any gcc2 internal prototype to avoid an error.  */
13050 /* We use char because int might match the return type of a gcc2
13051     builtin and then its argument prototype would still apply.  */
13052 char dld_init();
13053
13054 int main() {
13055 dld_init()
13056 ; return 0; }
13057 EOF
13058 if { (eval echo configure:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13059   rm -rf conftest*
13060   eval "ac_cv_lib_$ac_lib_var=yes"
13061 else
13062   echo "configure: failed program was:" >&5
13063   cat conftest.$ac_ext >&5
13064   rm -rf conftest*
13065   eval "ac_cv_lib_$ac_lib_var=no"
13066 fi
13067 rm -f conftest*
13068 xe_check_libs=""
13069
13070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13071   echo "$ac_t""yes" 1>&6
13072   libdl=dld have_dl=yes;
13073         { test "$extra_verbose" = "yes" && cat << \EOF
13074     Defining HAVE_DLD_INIT
13075 EOF
13076 cat >> confdefs.h <<\EOF
13077 #define HAVE_DLD_INIT 1
13078 EOF
13079 }
13080
13081 else
13082   echo "$ac_t""no" 1>&6
13083 fi
13084
13085
13086 fi
13087
13088
13089     fi
13090   fi 
13091   if test -n "$have_dl"; then
13092         
13093 dll_ld=
13094 dll_ldflags=
13095 dll_cflags=
13096 dll_post=
13097 dll_ldo="-o"
13098 ld_dynamic_link_flags=
13099 xehost=$canonical
13100 xealias=$internal_configuration
13101
13102 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13103 echo "configure:13104: checking how to build dynamic libraries for ${xehost}" >&5
13104 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13105 case "$xehost" in
13106 *-*-linux-gnu*) ;;
13107 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13108 esac
13109
13110 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13111 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13112 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13113
13114 case "$xehost_os" in
13115 aix3*)
13116   # AIX sometimes has problems with the GCC collect2 program.  For some
13117   # reason, if we set the COLLECT_NAMES environment variable, the problems
13118   # vanish in a puff of smoke.
13119   if test "${COLLECT_NAMES+set}" != set; then
13120     COLLECT_NAMES=
13121     export COLLECT_NAMES
13122   fi
13123   ;;
13124 esac
13125
13126 # Now see if the compiler is really GCC.
13127 if test "$GCC" = "yes"; then
13128   XEGCC=yes
13129 else
13130   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13131 echo "configure:13132: checking checking whether we are using GNU C" >&5
13132   cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135
13136 #ifdef __GNUC__
13137   yes;
13138 #endif
13139
13140 EOF
13141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13142   egrep "yes" >/dev/null 2>&1; then
13143   rm -rf conftest*
13144   XEGCC=yes
13145 else
13146   rm -rf conftest*
13147   XEGCC=no
13148 fi
13149 rm -f conftest*
13150
13151   echo "$ac_t""${XEGCC}" 1>&6
13152 fi
13153
13154 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13155 echo "configure:13156: checking how to produce PIC code" >&5
13156 wl=
13157
13158 can_build_shared=yes
13159 if test "$XEGCC" = yes; then
13160   wl='-Wl,'
13161
13162   case "$xehost_os" in
13163   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13164     # PIC is the default for these OSes.
13165     ;;
13166
13167   aix3* | aix4* | os2*)
13168     # We can build DLLs from non-PIC.
13169     ;;
13170   amigaos*)
13171     # FIXME: we need at least 68020 code to build shared libraries, but
13172     # adding the `-m68020' flag to GCC prevents building anything better,
13173     # like `-m68040'.
13174     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13175     ;;
13176   *cygwin* | *mingw* )
13177     # PIC is the default
13178     ;;
13179   *)
13180     dll_cflags='-fPIC'
13181     ;;
13182   esac
13183 else
13184   # PORTME Check for PIC flags for the system compiler.
13185   case "$xehost_os" in
13186   hpux9* | hpux1[0-9]*)
13187     # Is there a better link_static_flag that works with the bundled CC?
13188     wl='-Wl,'
13189     dll_cflags='+Z'
13190     ;;
13191
13192   irix5* | irix6*)
13193     wl='-Wl,'
13194     # PIC (with -KPIC) is the default.
13195     ;;
13196
13197   os2*)
13198     # We can build DLLs from non-PIC.
13199     ;;
13200
13201   osf3* | osf4*)
13202     # All OSF/1 code is PIC.
13203     wl='-Wl,'
13204     ;;
13205
13206   sco3.2v5*)
13207     dll_cflags='-belf -Kpic'
13208     wl='-Wl,'
13209     ;;
13210
13211   unixware*)
13212     dll_cflags="-KPIC"
13213     wl="-Wl,"
13214     ;;
13215
13216   sysv4*)
13217     dll_cflags="-KPIC"
13218     wl="-Wl,"
13219     ;;
13220
13221   sysv5*)
13222     dll_cflags="-KPIC"
13223     wl="-Wl,"
13224     ;;
13225
13226   solaris2*)
13227     dll_cflags='-KPIC'
13228     wl='-Wl,'
13229     ;;
13230
13231   sunos4*)
13232     dll_cflags='-PIC'
13233     wl='-Qoption ld '
13234     ;;
13235
13236   uts4*)
13237     dll_cflags='-pic'
13238     ;;
13239
13240   *)
13241     can_build_shared=no
13242     ;;
13243   esac
13244 fi
13245
13246 if test -n "$dll_cflags"; then
13247   echo "$ac_t""${dll_cflags}" 1>&6
13248   
13249   # Check to make sure the dll_cflags actually works.
13250   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13251 echo "configure:13252: checking if PIC flag ${dll_cflags} really works" >&5
13252   save_CFLAGS="$CFLAGS"
13253   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13254   cat > conftest.$ac_ext <<EOF
13255 #line 13256 "configure"
13256 #include "confdefs.h"
13257
13258 int main() {
13259 int x=0;
13260 ; return 0; }
13261 EOF
13262 if { (eval echo configure:13263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13263   rm -rf conftest*
13264   
13265     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13266     # reports no error.  So, we need to grep stderr for (Bundled).
13267     if grep '(Bundled)' config.log >/dev/null; then
13268       echo "$ac_t""no" 1>&6
13269       can_build_shared=no
13270       dll_cflags=
13271     else
13272       echo "$ac_t""yes" 1>&6
13273     fi
13274 else
13275   echo "configure: failed program was:" >&5
13276   cat conftest.$ac_ext >&5
13277   rm -rf conftest*
13278   echo "$ac_t""no" 1>&6
13279     can_build_shared=no
13280     dll_cflags=
13281 fi
13282 rm -f conftest*
13283   CFLAGS="$save_CFLAGS"
13284 else
13285   echo "$ac_t""none" 1>&6
13286 fi
13287
13288 if test "$can_build_shared" = "yes"; then
13289 cc_produces_so=no
13290 xldf=
13291 xcldf=
13292 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13293 echo "configure:13294: checking if C compiler can produce shared libraries" >&5
13294 if test "$XEGCC" = yes; then
13295   xcldf="-shared"
13296   xldf="-shared"
13297 else # Not using GCC
13298   case "$xehost_os" in
13299     aix3* | aix4*)
13300       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13301       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13302       ;;
13303
13304     freebsd2* | netbsd* | openbsd*)
13305       xldf="-Bshareable"
13306       xcldf="${wl}-Bshareable"
13307       ;;
13308
13309     freebsd3*)
13310       xcldf="-shared"
13311       ;;
13312
13313     hpux*)
13314       xldf="-b +s"
13315       xcldf="${wl}-b ${wl}+s"
13316       ;;
13317
13318     irix5* | irix6* | osf3* | osf4*)
13319       xcldf="${wl}-shared"
13320       xldf="-shared"
13321       ;;
13322
13323     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13324       xcldf="-G"
13325       xldf="-G"
13326       ;;
13327
13328     sunos4*)
13329       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13330       xldf="-assert pure-text -Bstatic"
13331       ;;
13332   esac
13333 fi # End if if we are using gcc
13334
13335 if test -n "$xcldf"; then
13336   save_LDFLAGS=$LDFLAGS
13337   save_LIBS=$LIBS
13338   save_xe_libs=$xe_libs
13339   LDFLAGS="$xcldf $LDFLAGS"
13340   LIBS=
13341   xe_libs=
13342   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13343   cat > conftest.$ac_ext <<EOF
13344 #line 13345 "configure"
13345 #include "confdefs.h"
13346
13347 int main() {
13348 int x=0;
13349 ; return 0; }
13350 EOF
13351 if { (eval echo configure:13352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13352   rm -rf conftest*
13353   cc_produces_so=yes
13354 else
13355   echo "configure: failed program was:" >&5
13356   cat conftest.$ac_ext >&5
13357   rm -rf conftest*
13358   cc_produces_so=no
13359 fi
13360 rm -f conftest*
13361   LDFLAGS=$save_LDFLAGS
13362   LIBS=$save_LIBS
13363   xe_libs=$save_xe_libs
13364   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13365 else
13366   cc_produces_so=no
13367 fi
13368 echo "$ac_t""${cc_produces_so}" 1>&6
13369
13370 LTLD=$LD
13371 if test -z "$LTLD"; then
13372   ac_prog=ld
13373   if test "$XEGCC" = yes; then
13374     # Check if gcc -print-prog-name=ld gives a path.
13375     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13376 echo "configure:13377: checking for ld used by GCC" >&5
13377     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13378     case "$ac_prog" in
13379     # Accept absolute paths.
13380     /*)
13381       if test -z "$LTLD"; then
13382         case "$ac_prog" in
13383           *gcc-lib*) LTLD="$CC"
13384                      ;;
13385           *)         LTLD="$ac_prog"
13386                      ;;
13387         esac
13388       fi
13389       ;;
13390     "")
13391       # If it fails, then pretend we aren't using GCC.
13392       ac_prog=ld
13393       ;;
13394     *)
13395       # If it is relative, then search for the first ld in PATH.
13396       with_gnu_ld=unknown
13397       ;;
13398     esac
13399   else
13400     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13401 echo "configure:13402: checking for GNU ld" >&5
13402   fi
13403
13404   if test -z "$LTLD"; then
13405     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13406     for ac_dir in $PATH; do
13407       test -z "$ac_dir" && ac_dir=.
13408       if test -f "$ac_dir/$ac_prog"; then
13409         LTLD="$ac_dir/$ac_prog"
13410         # Check to see if the program is GNU ld.  I'd rather use --version,
13411         # but apparently some GNU ld's only accept -v.
13412         # Break only if it was the GNU/non-GNU ld that we prefer.
13413         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13414           xe_gnu_ld=yes
13415         else
13416           xe_gnu_ld=no
13417         fi
13418       fi
13419     done
13420     IFS="$ac_save_ifs"
13421   fi
13422
13423   if test -n "$LTLD"; then
13424     echo "$ac_t""${LTLD}" 1>&6
13425   else
13426     echo "$ac_t""no" 1>&6
13427   fi
13428
13429   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13430     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13431     exit 1
13432   fi
13433 fi
13434
13435 ld_dynamic_link_flags=
13436
13437 # Check to see if it really is or isn't GNU ld.
13438 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13439 echo "configure:13440: checking if the linker is GNU ld" >&5
13440 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13441 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13442   xe_gnu_ld=yes
13443 else
13444   xe_gnu_ld=no
13445 fi
13446 echo "$ac_t""${xe_gnu_ld}" 1>&6
13447
13448 case "$xehost_os" in
13449   amigaos* | sunos4*)
13450     # On these operating systems, we should treat GNU ld like the system ld.
13451     gnu_ld_acts_native=yes
13452     ;;
13453   *)
13454     gnu_ld_acts_native=no
13455     ;;
13456 esac
13457
13458 if test "$cc_produces_so" = "yes"; then
13459   dll_ld=$CC
13460   dll_ldflags=$xcldf
13461   can_build_shared=yes
13462   ld_shlibs=yes
13463 else
13464   # OK - only NOW do we futz about with ld.
13465   # See if the linker supports building shared libraries.
13466   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13467 echo "configure:13468: checking whether the linker supports shared libraries" >&5
13468   dll_ld=$CC
13469   dll_ldflags=$LDFLAGS
13470   ld_shlibs=yes
13471   can_build_shared=yes
13472   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13473     # See if GNU ld supports shared libraries.
13474     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13475       dll_ld=$CC
13476       dll_ldflags="-shared"
13477       ld_shlibs=yes
13478     else
13479       ld_shlibs=no
13480     fi
13481   else
13482     # PORTME fill in a description of your system's linker (not GNU ld)
13483     case "$xehost_os" in
13484     aix3*)
13485       dll_ld=$LTLD
13486       dll_ldflags=$xldf
13487       ;;
13488
13489     aix4*)
13490       dll_ldflags=$xcldf
13491       ;;
13492
13493     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13494     # support.  Future versions do this automatically, but an explicit c++rt0.o
13495     # doesn't break anything, and helps significantly (at the cost of a little
13496     # extra space).
13497     freebsd2.2*)
13498       dll_ld=$LTLD
13499       dll_ldflags=$xldf
13500       dll_post="/usr/lib/c++rt0.o"
13501       ;;
13502
13503     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13504     freebsd2*)
13505       dll_ld=$LTLD
13506       dll_ldflags="-Bshareable"
13507       ;;
13508
13509     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13510     freebsd3*)
13511       dll_ldflags="-shared"
13512       ;;
13513
13514     hpux*)
13515       dll_ld=$LTLD
13516       dll_ldflags=$xldf
13517       ;;
13518
13519     irix5* | irix6*)
13520       dll_ld=$LTLD
13521       dll_ldflags=$xldf
13522       ;;
13523
13524     netbsd*)
13525       # Tested with NetBSD 1.2 ld
13526       dll_ld=$LTLD
13527       dll_ldflags=$xldf
13528       ;;
13529
13530     openbsd*)
13531       dll_ld=$LTLD
13532       dll_ldflags=$xldf
13533       ;;
13534
13535     osf3* | osf4*)
13536       dll_ld=$LTLD
13537       dll_ldflags=$xldf
13538       ;;
13539
13540     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13541     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13542       dll_ld=$LTLD
13543       case "$dll_ld" in
13544         *gcc*) dll_ldflags="-shared"
13545                dll_ld=$CC
13546                ;;
13547         *)     dll_ldflags="-G"
13548                ;;
13549       esac
13550       ;;
13551
13552     sunos4*)
13553       if test "$XEGCC" = yes; then
13554         dll_ld=$CC
13555       else
13556         dll_ld=$LTLD
13557       fi
13558       dll_ldflags=$xldf
13559       ;;
13560
13561     uts4*)
13562       dll_ld=$LTLD
13563       dll_ldflags="-G"
13564       ;;
13565
13566     bsdi*)
13567       dll_ldflags="-r"
13568       dll_ld="shlicc2"
13569       ;;
13570
13571     *)
13572       ld_shlibs=no
13573       can_build_shared=no
13574       ;;
13575     esac
13576   fi
13577   echo "$ac_t""${ld_shlibs}" 1>&6
13578   if test "$ld_shlibs" = "no"; then
13579     can_build_shared=no
13580   fi
13581 fi # End of if cc_produces_so = no
13582
13583
13584 if test "$xe_gnu_ld" = yes; then
13585   if test "$ld_shlibs" = yes; then
13586     ld_dynamic_link_flags="${wl}-export-dynamic"
13587   fi
13588 fi
13589
13590 if test -z "$ld_dynamic_link_flags"; then
13591   case "$xehost_os" in
13592   aix3*)
13593     ld_dynamic_link_flags=
13594     ;;
13595
13596   aix4*)
13597     ld_dynamic_link_flags=
13598     ;;
13599
13600   freebsd2.2*)
13601     ld_dynamic_link_flags=
13602     ;;
13603
13604   freebsd2*)
13605     ld_dynamic_link_flags=
13606     ;;
13607
13608   freebsd3*)
13609     ld_dynamic_link_flags=
13610     ;;
13611
13612   hpux*)
13613     ld_dynamic_link_flags="${wl}-E"
13614     ;;
13615
13616   irix5* | irix6*)
13617     ld_dynamic_link_flags=
13618     ;;
13619
13620   netbsd*)
13621     ld_dynamic_link_flags=
13622     ;;
13623
13624   openbsd*)
13625     ld_dynamic_link_flags=
13626     ;;
13627
13628   osf3* | osf4*)
13629     ld_dynamic_link_flags=
13630     ;;
13631
13632   solaris2* | solaris7*)
13633     ld_dynamic_link_flags=
13634     ;;
13635
13636   sco3.2v5* | unixware* | sysv5* | sysv4*)
13637     ld_dynamic_link_flags="${wl}-Bexport"
13638     ;;
13639
13640   sunos4*)
13641     ld_dynamic_link_flags=
13642     ;;
13643
13644   uts4*)
13645     ld_dynamic_link_flags=
13646     ;;
13647
13648   bsdi*)
13649     ld_dynamic_link_flags=
13650     ;;
13651
13652   esac
13653 fi # End of if -z ld_dynamic_link_flags
13654 fi # End of if test "$can_build_shared" = "yes"
13655
13656
13657
13658
13659
13660
13661
13662
13663   fi
13664
13665   if test "$can_build_shared" = "yes"; then
13666     { test "$extra_verbose" = "yes" && cat << \EOF
13667     Defining HAVE_SHLIB
13668 EOF
13669 cat >> confdefs.h <<\EOF
13670 #define HAVE_SHLIB 1
13671 EOF
13672 }
13673
13674     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13675    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13676  fi
13677     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13678     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13679     for ac_func in dlerror _dlerror
13680 do
13681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13682 echo "configure:13683: checking for $ac_func" >&5
13683
13684 cat > conftest.$ac_ext <<EOF
13685 #line 13686 "configure"
13686 #include "confdefs.h"
13687 /* System header to define __stub macros and hopefully few prototypes,
13688     which can conflict with char $ac_func(); below.  */
13689 #include <assert.h>
13690 /* Override any gcc2 internal prototype to avoid an error.  */
13691 /* We use char because int might match the return type of a gcc2
13692     builtin and then its argument prototype would still apply.  */
13693 char $ac_func();
13694
13695 int main() {
13696
13697 /* The GNU C library defines this for functions which it implements
13698     to always fail with ENOSYS.  Some functions are actually named
13699     something starting with __ and the normal name is an alias.  */
13700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13701 choke me
13702 #else
13703 $ac_func();
13704 #endif
13705
13706 ; return 0; }
13707 EOF
13708 if { (eval echo configure:13709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13709   rm -rf conftest*
13710   eval "ac_cv_func_$ac_func=yes"
13711 else
13712   echo "configure: failed program was:" >&5
13713   cat conftest.$ac_ext >&5
13714   rm -rf conftest*
13715   eval "ac_cv_func_$ac_func=no"
13716 fi
13717 rm -f conftest*
13718
13719 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13720   echo "$ac_t""yes" 1>&6
13721     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13722   { test "$extra_verbose" = "yes" && cat << EOF
13723     Defining $ac_tr_func
13724 EOF
13725 cat >> confdefs.h <<EOF
13726 #define $ac_tr_func 1
13727 EOF
13728 }
13729  
13730 else
13731   echo "$ac_t""no" 1>&6
13732 fi
13733 done
13734
13735     with_modules=yes
13736   else
13737     if test "$with_modules" = "yes"; then
13738       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13739     else
13740       echo "configure: warning: "Module support cannot be provided."" 1>&2
13741     fi
13742     with_modules=no
13743   fi
13744 fi
13745
13746 cat > conftest.$ac_ext <<EOF
13747 #line 13748 "configure"
13748 #include "confdefs.h"
13749 int main(int c,char *v[]){return 0;}
13750 EOF
13751 if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13752 then
13753   :
13754 else
13755   conftest_rc="$?"
13756   echo "configure: failed program was:" >&5
13757   cat conftest.$ac_ext >&5
13758   rm -fr conftest*
13759   
13760   echo ""
13761   echo "*** PANIC *** The C compiler can no longer build working executables."
13762   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13763   echo "*** PANIC *** The most likely reason for this problem is that configure"
13764   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13765   echo "*** PANIC *** found at run time."
13766   echo "*** PANIC ***"
13767   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13768   echo "*** PANIC *** On other systems, try telling configure where to find the"
13769   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13770   echo "*** PANIC ***"
13771   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13772   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13773   echo "*** PANIC *** on your system.  Don't do that."
13774   exit 1
13775 fi
13776 rm -fr conftest*
13777
13778 if test "$win32_processes" = "yes"; then
13779   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13780    echo "    xemacs will be linked with \"process-nt.o\""
13781  fi
13782 else
13783   { test "$extra_verbose" = "yes" && cat << \EOF
13784     Defining HAVE_UNIX_PROCESSES
13785 EOF
13786 cat >> confdefs.h <<\EOF
13787 #define HAVE_UNIX_PROCESSES 1
13788 EOF
13789 }
13790
13791   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13792    echo "    xemacs will be linked with \"process-unix.o\""
13793  fi
13794 fi
13795
13796
13797
13798 T=""
13799 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13800 CFLAGS="$T"
13801
13802
13803 T=""
13804 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13805 extra_objs="$T"
13806
13807
13808 T=""
13809 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
13810 c_switch_general="$T"
13811
13812
13813 T=""
13814 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13815 c_switch_window_system="$T"
13816
13817
13818 T=""
13819 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13820 c_switch_all="$T"
13821
13822
13823 T=""
13824 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
13825 ld_switch_general="$T"
13826
13827
13828 T=""
13829 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13830 ld_switch_window_system="$T"
13831
13832
13833 T=""
13834 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13835 ld_switch_all="$T"
13836
13837
13838 T=""
13839 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13840 ld_libs_general="$T"
13841
13842
13843 T=""
13844 for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13845 ld_libs_window_system="$T"
13846
13847
13848 T=""
13849 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13850 ld_libs_all="$T"
13851
13852
13853
13854 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13855 internal_makefile_list="Makefile.in"
13856 SUBDIR_MAKEFILES=''
13857 test -d lock || mkdir lock
13858 for dir in $MAKE_SUBDIR; do
13859   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13860         test -d "$d" || mkdir "$d"; cd "$d"
13861       done ) ;;
13862    * ) test -d "$dir" || mkdir "$dir" ;;
13863   esac
13864   
13865 T=""
13866 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13867 SUBDIR_MAKEFILES="$T"
13868
13869   
13870 T=""
13871 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13872 internal_makefile_list="$T"
13873
13874 done
13875
13876
13877
13878
13879 for dir in src/s src/m; do
13880   if test ! -d "$dir" ; then
13881     echo Making symbolic link to "$srcdir/$dir"
13882     ${LN_S} "$srcdir/$dir" "$dir"
13883   fi
13884 done
13885
13886 if test "$extra_verbose" = "yes"; then
13887   echo ""
13888   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
13889   echo ""
13890 fi
13891
13892
13893 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13894   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13895   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13896 fi
13897
13898 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13899   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13900   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13901 fi
13902
13903 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13904   test "$extra_verbose" = "yes" && echo "creating TAGS"
13905   echo "\f
13906 $srcdir/TAGS,include" > "TAGS"
13907 fi
13908
13909 if test "$__SUNPRO_C" = "yes"; then
13910   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13911   ( echo "# For use with Sun WorkShop's Source browser."
13912     echo "# See sbquery(1) and sbinit(4) for more information"
13913     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13914   ) > .sbinit
13915 fi
13916
13917 rm -f core
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937 PREFIX=$prefix
13938 while true; do
13939   case "$PREFIX" in
13940     *\$* ) eval "PREFIX=$PREFIX" ;;
13941     *) break ;;
13942   esac
13943 done
13944
13945
13946
13947
13948 EXEC_PREFIX=$exec_prefix
13949 while true; do
13950   case "$EXEC_PREFIX" in
13951     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13952     *) break ;;
13953   esac
13954 done
13955
13956
13957
13958
13959 INFODIR=$infodir
13960 while true; do
13961   case "$INFODIR" in
13962     *\$* ) eval "INFODIR=$INFODIR" ;;
13963     *) break ;;
13964   esac
13965 done
13966
13967
13968
13969
13970 INFOPATH=$infopath
13971 while true; do
13972   case "$INFOPATH" in
13973     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13974     *) break ;;
13975   esac
13976 done
13977
13978
13979
13980
13981 PACKAGE_PATH=$package_path
13982 while true; do
13983   case "$PACKAGE_PATH" in
13984     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13985     *) break ;;
13986   esac
13987 done
13988
13989
13990
13991
13992 LISPDIR=$lispdir
13993 while true; do
13994   case "$LISPDIR" in
13995     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13996     *) break ;;
13997   esac
13998 done
13999
14000
14001
14002
14003 MODULEDIR=$moduledir
14004 while true; do
14005   case "$MODULEDIR" in
14006     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14007     *) break ;;
14008   esac
14009 done
14010
14011
14012
14013
14014 SITELISPDIR=$sitelispdir
14015 while true; do
14016   case "$SITELISPDIR" in
14017     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14018     *) break ;;
14019   esac
14020 done
14021
14022
14023
14024
14025 SITEMODULEDIR=$sitemoduledir
14026 while true; do
14027   case "$SITEMODULEDIR" in
14028     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14029     *) break ;;
14030   esac
14031 done
14032
14033
14034
14035
14036 ETCDIR=$etcdir
14037 while true; do
14038   case "$ETCDIR" in
14039     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14040     *) break ;;
14041   esac
14042 done
14043
14044
14045
14046
14047 DOCDIR=$docdir
14048 while true; do
14049   case "$DOCDIR" in
14050     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14051     *) break ;;
14052   esac
14053 done
14054
14055
14056
14057
14058 ARCHLIBDIR=$archlibdir
14059 while true; do
14060   case "$ARCHLIBDIR" in
14061     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14062     *) break ;;
14063   esac
14064 done
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14086
14087
14088
14089
14090
14091
14092
14093 : ${XEMACS_CC:=$CC}
14094
14095
14096 if test "$with_prefix" = "yes"; then
14097   { test "$extra_verbose" = "yes" && cat << \EOF
14098     Defining PREFIX_USER_DEFINED
14099 EOF
14100 cat >> confdefs.h <<\EOF
14101 #define PREFIX_USER_DEFINED 1
14102 EOF
14103 }
14104
14105 fi
14106
14107 if test "$with_site_lisp" = "no"; then
14108   { test "$extra_verbose" = "yes" && cat << \EOF
14109     Defining INHIBIT_SITE_LISP
14110 EOF
14111 cat >> confdefs.h <<\EOF
14112 #define INHIBIT_SITE_LISP 1
14113 EOF
14114 }
14115
14116 fi
14117 if test "$with_site_modules" = "no"; then
14118   { test "$extra_verbose" = "yes" && cat << \EOF
14119     Defining INHIBIT_SITE_MODULES
14120 EOF
14121 cat >> confdefs.h <<\EOF
14122 #define INHIBIT_SITE_MODULES 1
14123 EOF
14124 }
14125
14126 fi
14127
14128
14129 T=""
14130 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14131 ac_configure_args="$T"
14132
14133 { test "$extra_verbose" = "yes" && cat << EOF
14134     Defining EMACS_CONFIGURATION = "$configuration"
14135 EOF
14136 cat >> confdefs.h <<EOF
14137 #define EMACS_CONFIGURATION "$configuration"
14138 EOF
14139 }
14140
14141 { test "$extra_verbose" = "yes" && cat << EOF
14142     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14143 EOF
14144 cat >> confdefs.h <<EOF
14145 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14146 EOF
14147 }
14148
14149 { test "$extra_verbose" = "yes" && cat << EOF
14150     Defining config_machfile = "$machfile"
14151 EOF
14152 cat >> confdefs.h <<EOF
14153 #define config_machfile "$machfile"
14154 EOF
14155 }
14156
14157 { test "$extra_verbose" = "yes" && cat << EOF
14158     Defining config_opsysfile = "$opsysfile"
14159 EOF
14160 cat >> confdefs.h <<EOF
14161 #define config_opsysfile "$opsysfile"
14162 EOF
14163 }
14164
14165
14166
14167 null_string=""
14168 { test "$extra_verbose" = "yes" && cat << EOF
14169     Defining LD_SWITCH_X_SITE = $null_string
14170 EOF
14171 cat >> confdefs.h <<EOF
14172 #define LD_SWITCH_X_SITE $null_string
14173 EOF
14174 }
14175
14176 { test "$extra_verbose" = "yes" && cat << EOF
14177     Defining LD_SWITCH_X_SITE_AUX = $null_string
14178 EOF
14179 cat >> confdefs.h <<EOF
14180 #define LD_SWITCH_X_SITE_AUX $null_string
14181 EOF
14182 }
14183
14184 { test "$extra_verbose" = "yes" && cat << EOF
14185     Defining C_SWITCH_X_SITE = $null_string
14186 EOF
14187 cat >> confdefs.h <<EOF
14188 #define C_SWITCH_X_SITE $null_string
14189 EOF
14190 }
14191
14192 { test "$extra_verbose" = "yes" && cat << EOF
14193     Defining LD_SWITCH_SITE = $null_string
14194 EOF
14195 cat >> confdefs.h <<EOF
14196 #define LD_SWITCH_SITE $null_string
14197 EOF
14198 }
14199
14200 { test "$extra_verbose" = "yes" && cat << EOF
14201     Defining C_SWITCH_SITE = $null_string
14202 EOF
14203 cat >> confdefs.h <<EOF
14204 #define C_SWITCH_SITE $null_string
14205 EOF
14206 }
14207
14208
14209
14210 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14211     Defining GNU_MALLOC
14212 EOF
14213 cat >> confdefs.h <<\EOF
14214 #define GNU_MALLOC 1
14215 EOF
14216 }
14217
14218 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14219     Defining USE_SYSTEM_MALLOC
14220 EOF
14221 cat >> confdefs.h <<\EOF
14222 #define USE_SYSTEM_MALLOC 1
14223 EOF
14224 }
14225
14226 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14227     Defining USE_DEBUG_MALLOC
14228 EOF
14229 cat >> confdefs.h <<\EOF
14230 #define USE_DEBUG_MALLOC 1
14231 EOF
14232 }
14233
14234                                               { test "$extra_verbose" = "yes" && cat << \EOF
14235     Defining USE_SYSTEM_MALLOC
14236 EOF
14237 cat >> confdefs.h <<\EOF
14238 #define USE_SYSTEM_MALLOC 1
14239 EOF
14240 }
14241
14242 fi
14243 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14244     Defining I18N3
14245 EOF
14246 cat >> confdefs.h <<\EOF
14247 #define I18N3 1
14248 EOF
14249 }
14250
14251 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14252     Defining USE_GCC
14253 EOF
14254 cat >> confdefs.h <<\EOF
14255 #define USE_GCC 1
14256 EOF
14257 }
14258
14259 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14260     Defining EXTERNAL_WIDGET
14261 EOF
14262 cat >> confdefs.h <<\EOF
14263 #define EXTERNAL_WIDGET 1
14264 EOF
14265 }
14266
14267 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14268     Defining QUICK_BUILD
14269 EOF
14270 cat >> confdefs.h <<\EOF
14271 #define QUICK_BUILD 1
14272 EOF
14273 }
14274
14275 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14276     Defining PURIFY
14277 EOF
14278 cat >> confdefs.h <<\EOF
14279 #define PURIFY 1
14280 EOF
14281 }
14282
14283 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14284     Defining QUANTIFY
14285 EOF
14286 cat >> confdefs.h <<\EOF
14287 #define QUANTIFY 1
14288 EOF
14289 }
14290
14291 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14292     Defining MAIL_USE_POP
14293 EOF
14294 cat >> confdefs.h <<\EOF
14295 #define MAIL_USE_POP 1
14296 EOF
14297 }
14298
14299 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14300     Defining KERBEROS
14301 EOF
14302 cat >> confdefs.h <<\EOF
14303 #define KERBEROS 1
14304 EOF
14305 }
14306
14307 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14308     Defining HESIOD
14309 EOF
14310 cat >> confdefs.h <<\EOF
14311 #define HESIOD 1
14312 EOF
14313 }
14314
14315 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14316     Defining USE_UNION_TYPE
14317 EOF
14318 cat >> confdefs.h <<\EOF
14319 #define USE_UNION_TYPE 1
14320 EOF
14321 }
14322
14323 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14324     Defining PDUMP
14325 EOF
14326 cat >> confdefs.h <<\EOF
14327 #define PDUMP 1
14328 EOF
14329 }
14330
14331
14332
14333 (
14334 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14335 else
14336   echo "uname -a: `uname -a`"
14337 fi
14338 echo ""
14339 echo "$0 $quoted_arguments"
14340 ) > Installation
14341
14342 if test ! -z ${emacs_beta_version} ; then
14343   if test -z "${emacs_is_beta}" ; then
14344         xemacs_betaname=".${emacs_beta_version}"
14345   else
14346         xemacs_betaname="-b${emacs_beta_version}"
14347   fi
14348 else
14349   xemacs_betaname=""
14350 fi
14351
14352 (
14353 echo "
14354
14355 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14356 "
14357 echo "
14358 Compilation / Installation:"
14359 echo "  Source code location:              $srcdir"
14360 echo "  Installation prefix:               $prefix"
14361 if test -n "$site_includes"; then
14362   echo "  Additional header files:           $site_includes"
14363 fi
14364 if test -n "$site_libraries"; then
14365   echo "  Additional libraries:              $site_libraries"
14366 fi
14367 if test -n "$site_prefixes"; then
14368   echo "  Additional prefixes:               $site_prefixes"
14369 fi
14370 if test -n "$runpath"; then
14371   echo "  Runtime library search path:       $runpath"
14372 fi
14373 echo "  Operating system description file: \`$opsysfile'"
14374 echo "  Machine description file:          \`$machfile'"
14375 echo "  Compiler:                          $CC $CFLAGS"
14376 echo "  Relocating allocator for buffers:  $rel_alloc"
14377 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14378
14379 echo "
14380 Window System:"
14381 if test "$with_msw" = "yes"; then
14382   echo "  Compiling in support for the Microsoft window system."
14383 fi
14384 if test "$with_x11" = "yes"; then
14385   echo "  Compiling in support for the X window system:"
14386   echo "    - X Windows headers location:                 $x_includes"
14387   echo "    - X Windows libraries location:               $x_libraries"
14388   if test "$with_xauth" != yes; then
14389     echo "    - Xau (X authority) not available."
14390   fi
14391   if test "$with_xmu" != yes; then
14392     echo "    - Xmu library not available; substituting equivalent routines."
14393   fi
14394   if test "$with_wmcommand" != no; then
14395     echo "    - Handling WM_COMMAND properly."
14396   fi
14397 fi
14398 if test "$need_athena" = "yes"; then
14399   echo "  Compiling in support for the Athena widget set:"
14400   echo "    - Athena headers location:                    $athena_h_path"
14401   echo "    - Athena library to link:                     $athena_lib"
14402 fi
14403 case "$with_menubars" in
14404   lucid ) echo "  Using Lucid menubars." ;;
14405   motif ) echo "  Using Motif menubars."
14406           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14407           echo "             We recommend using the Lucid menubar instead."
14408           echo "             Re-run configure with --with-menubars='lucid'." ;;
14409     msw ) echo "  Using MS-Windows menubars." ;;
14410 esac
14411 case "$with_scrollbars" in
14412   lucid  ) echo "  Using Lucid scrollbars."      ;;
14413   motif  ) echo "  Using Motif scrollbars."      ;;
14414   athena ) echo "  Using Athena scrollbars."     ;;
14415      msw ) echo "  Using MS-Windows scrollbars." ;;
14416 esac
14417 case "$with_dialogs" in
14418   motif  ) echo "  Using Motif dialog boxes."
14419            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14420              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14421              echo "             We recommend using the Athena dialog boxes instead."
14422              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14423              echo "             Read the PROBLEMS file for more information."
14424            fi; fi ;;
14425   athena ) echo "  Using Athena dialog boxes."     ;;
14426      msw ) echo "  Using MS-Windows dialog boxes." ;;
14427 esac
14428 case "$with_widgets" in
14429   motif  ) echo "  Using Motif native widgets."      ;;
14430   athena ) echo "  Using Athena native widgets."     ;;
14431      msw ) echo "  Using MS-Windows native widgets." ;;
14432 esac
14433 if test "$with_dragndrop" = yes; then
14434   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
14435   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
14436 fi
14437
14438 echo "
14439 TTY:"
14440 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
14441 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14442
14443 echo "
14444 Images:"
14445 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
14446 if test "$with_xpm" = yes; then
14447   echo "  Compiling in support for XPM  images."
14448 elif test "$with_x11" = yes; then
14449   echo "  WARNING: -----------------------------------------------------------"
14450   echo "  WARNING: Compiling without XPM image support."
14451   if test "$xpm_problem" != ""; then
14452     echo "  Reason: $xpm_problem"
14453   fi
14454   echo "  WARNING: You should strongly consider installing XPM."
14455   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14456   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14457   echo "  WARNING: -----------------------------------------------------------"
14458 fi
14459 if test "$with_png" = yes; then
14460   echo "  Compiling in support for PNG  images."
14461 elif test "$window_system" != "none"; then
14462   echo "  WARNING: -----------------------------------------------------------"
14463   echo "  WARNING: Compiling without PNG image support."
14464   if test "$png_problem" != ""; then
14465     echo "  Reason: $png_problem"
14466   fi
14467   echo "  WARNING: You should strongly consider installing the PNG libraries."
14468   echo "  WARNING: Otherwise certain images and glyphs may not display."
14469   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14470   echo "  WARNING: -----------------------------------------------------------"
14471 fi
14472 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
14473 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
14474 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14475
14476 echo "
14477 Sound:"
14478 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
14479 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
14480 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
14481 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
14482
14483 echo "
14484 Databases:"
14485 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
14486 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14487 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14488 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
14489 if test "$with_postgresql" = yes; then
14490   echo "  Compiling in support for PostgreSQL."
14491   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
14492   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
14493 fi
14494
14495 echo "
14496 Internationalization:"
14497 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
14498 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
14499 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
14500 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
14501 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
14502 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
14503 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
14504 if test "$with_wnn" = yes; then
14505   echo "  Compiling in support for the WNN input method on Mule."
14506   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
14507 fi
14508 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
14509
14510 echo "
14511 Mail:"
14512 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
14513 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
14514 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
14515 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
14516
14517 echo "
14518 Other Features:"
14519 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14520 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14521 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14522 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
14523 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
14524 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
14525 test "$pdump" = yes && echo "  Using the new portable dumper."
14526 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
14527 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
14528 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
14529   != "no no no no no no"; then
14530   echo "  WARNING: ---------------------------------------------------------"
14531   echo "  WARNING: Compiling in support for runtime error checking."
14532   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14533   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14534   echo "  WARNING: ---------------------------------------------------------"
14535 fi
14536 echo ""
14537 ) | tee -a Installation
14538 echo ""
14539
14540
14541 # Remove any trailing slashes in these variables.
14542 test -n "$prefix" &&
14543   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14544 test -n "$exec_prefix" &&
14545   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14546
14547
14548 for file in $internal_makefile_list; do
14549   test "$file" = src/Makefile.in && \
14550     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14551   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14552 done
14553 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14554 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
14555
14556 trap '' 1 2 15
14557
14558 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14559
14560 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14561 # Let make expand exec_prefix.
14562 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14563
14564 # Any assignment to VPATH causes Sun make to only execute
14565 # the first set of double-colon rules, so remove it if not needed.
14566 # If there is a colon in the path, we need to keep it.
14567 if test "x$srcdir" = x.; then
14568   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14569 fi
14570
14571 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14572
14573 DEFS=-DHAVE_CONFIG_H
14574
14575 # Without the "./", some shells look in PATH for config.status.
14576 : ${CONFIG_STATUS=./config.status}
14577
14578 echo creating $CONFIG_STATUS
14579 rm -f $CONFIG_STATUS
14580 cat > $CONFIG_STATUS <<EOF
14581 #! /bin/sh
14582 # Generated automatically by configure.
14583 # Run this file to recreate the current configuration.
14584 # This directory was configured as follows,
14585 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14586 #
14587 # $0 $ac_configure_args
14588 #
14589 # Compiler output produced by configure, useful for debugging
14590 # configure, is in ./config.log if it exists.
14591
14592 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14593 for ac_option
14594 do
14595   case "\$ac_option" in
14596   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14597     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14598     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14599   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14600     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14601     exit 0 ;;
14602   -help | --help | --hel | --he | --h)
14603     echo "\$ac_cs_usage"; exit 0 ;;
14604   *) echo "\$ac_cs_usage"; exit 1 ;;
14605   esac
14606 done
14607
14608 ac_given_srcdir=$srcdir
14609 ac_given_INSTALL="$INSTALL"
14610
14611 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14612 EOF
14613 cat >> $CONFIG_STATUS <<EOF
14614
14615 # Protect against being on the right side of a sed subst in config.status.
14616 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14617  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14618 $ac_vpsub
14619 $extrasub
14620 s%@SHELL@%$SHELL%g
14621 s%@CFLAGS@%$CFLAGS%g
14622 s%@CPPFLAGS@%$CPPFLAGS%g
14623 s%@CXXFLAGS@%$CXXFLAGS%g
14624 s%@FFLAGS@%$FFLAGS%g
14625 s%@DEFS@%$DEFS%g
14626 s%@LDFLAGS@%$LDFLAGS%g
14627 s%@LIBS@%$LIBS%g
14628 s%@exec_prefix@%$exec_prefix%g
14629 s%@prefix@%$prefix%g
14630 s%@program_transform_name@%$program_transform_name%g
14631 s%@bindir@%$bindir%g
14632 s%@sbindir@%$sbindir%g
14633 s%@libexecdir@%$libexecdir%g
14634 s%@datadir@%$datadir%g
14635 s%@sysconfdir@%$sysconfdir%g
14636 s%@sharedstatedir@%$sharedstatedir%g
14637 s%@localstatedir@%$localstatedir%g
14638 s%@libdir@%$libdir%g
14639 s%@includedir@%$includedir%g
14640 s%@oldincludedir@%$oldincludedir%g
14641 s%@infodir@%$infodir%g
14642 s%@mandir@%$mandir%g
14643 s%@LN_S@%$LN_S%g
14644 s%@blddir@%$blddir%g
14645 s%@CC@%$CC%g
14646 s%@CPP@%$CPP%g
14647 s%@start_flags@%$start_flags%g
14648 s%@ld_switch_shared@%$ld_switch_shared%g
14649 s%@start_files@%$start_files%g
14650 s%@ld@%$ld%g
14651 s%@lib_gcc@%$lib_gcc%g
14652 s%@RANLIB@%$RANLIB%g
14653 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14654 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14655 s%@INSTALL_DATA@%$INSTALL_DATA%g
14656 s%@YACC@%$YACC%g
14657 s%@SET_MAKE@%$SET_MAKE%g
14658 s%@X_CFLAGS@%$X_CFLAGS%g
14659 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14660 s%@X_LIBS@%$X_LIBS%g
14661 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14662 s%@install_pp@%$install_pp%g
14663 s%@libs_xauth@%$libs_xauth%g
14664 s%@dnd_objs@%$dnd_objs%g
14665 s%@lwlib_objs@%$lwlib_objs%g
14666 s%@ALLOCA@%$ALLOCA%g
14667 s%@have_esd_config@%$have_esd_config%g
14668 s%@dll_ld@%$dll_ld%g
14669 s%@dll_cflags@%$dll_cflags%g
14670 s%@dll_ldflags@%$dll_ldflags%g
14671 s%@dll_post@%$dll_post%g
14672 s%@dll_ldo@%$dll_ldo%g
14673 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14674 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14675 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14676 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14677 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14678 s%@PROGNAME@%$PROGNAME%g
14679 s%@version@%$version%g
14680 s%@configuration@%$configuration%g
14681 s%@canonical@%$canonical%g
14682 s%@inststaticdir@%$inststaticdir%g
14683 s%@instvardir@%$instvardir%g
14684 s%@srcdir@%$srcdir%g
14685 s%@pkgdir@%$pkgdir%g
14686 s%@statedir@%$statedir%g
14687 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14688 s%@PREFIX@%$PREFIX%g
14689 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14690 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14691 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14692 s%@INFODIR@%$INFODIR%g
14693 s%@infopath@%$infopath%g
14694 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14695 s%@INFOPATH@%$INFOPATH%g
14696 s%@package_path@%$package_path%g
14697 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14698 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14699 s%@lispdir@%$lispdir%g
14700 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14701 s%@LISPDIR@%$LISPDIR%g
14702 s%@moduledir@%$moduledir%g
14703 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14704 s%@MODULEDIR@%$MODULEDIR%g
14705 s%@sitelispdir@%$sitelispdir%g
14706 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14707 s%@SITELISPDIR@%$SITELISPDIR%g
14708 s%@sitemoduledir@%$sitemoduledir%g
14709 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14710 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14711 s%@etcdir@%$etcdir%g
14712 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14713 s%@ETCDIR@%$ETCDIR%g
14714 s%@docdir@%$docdir%g
14715 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14716 s%@DOCDIR@%$DOCDIR%g
14717 s%@archlibdir@%$archlibdir%g
14718 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14719 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14720 s%@bitmapdir@%$bitmapdir%g
14721 s%@extra_objs@%$extra_objs%g
14722 s%@machfile@%$machfile%g
14723 s%@opsysfile@%$opsysfile%g
14724 s%@c_switch_general@%$c_switch_general%g
14725 s%@c_switch_window_system@%$c_switch_window_system%g
14726 s%@c_switch_all@%$c_switch_all%g
14727 s%@ld_switch_general@%$ld_switch_general%g
14728 s%@ld_switch_window_system@%$ld_switch_window_system%g
14729 s%@ld_switch_all@%$ld_switch_all%g
14730 s%@ld_libs_general@%$ld_libs_general%g
14731 s%@ld_libs_window_system@%$ld_libs_window_system%g
14732 s%@ld_libs_all@%$ld_libs_all%g
14733 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14734 s%@native_sound_lib@%$native_sound_lib%g
14735 s%@sound_cflags@%$sound_cflags%g
14736 s%@dynodump_arch@%$dynodump_arch%g
14737 s%@XEMACS_CC@%$XEMACS_CC%g
14738 s%@internal_makefile_list@%$internal_makefile_list%g
14739
14740 CEOF
14741 EOF
14742
14743 cat >> $CONFIG_STATUS <<\EOF
14744
14745 # Split the substitutions into bite-sized pieces for seds with
14746 # small command number limits, like on Digital OSF/1 and HP-UX.
14747 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14748 ac_file=1 # Number of current file.
14749 ac_beg=1 # First line for current file.
14750 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14751 ac_more_lines=:
14752 ac_sed_cmds=""
14753 while $ac_more_lines; do
14754   if test $ac_beg -gt 1; then
14755     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14756   else
14757     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14758   fi
14759   if test ! -s conftest.s$ac_file; then
14760     ac_more_lines=false
14761     rm -f conftest.s$ac_file
14762   else
14763     if test -z "$ac_sed_cmds"; then
14764       ac_sed_cmds="sed -f conftest.s$ac_file"
14765     else
14766       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14767     fi
14768     ac_file=`expr $ac_file + 1`
14769     ac_beg=$ac_end
14770     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14771   fi
14772 done
14773 if test -z "$ac_sed_cmds"; then
14774   ac_sed_cmds=cat
14775 fi
14776 EOF
14777
14778 cat >> $CONFIG_STATUS <<EOF
14779
14780 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14781 EOF
14782 cat >> $CONFIG_STATUS <<\EOF
14783 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14784   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14785   case "$ac_file" in
14786   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14787        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14788   *) ac_file_in="${ac_file}.in" ;;
14789   esac
14790
14791   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14792
14793   # Remove last slash and all that follows it.  Not all systems have dirname.
14794   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14795   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14796     # The file is in a subdirectory.
14797     test ! -d "$ac_dir" && mkdir "$ac_dir"
14798     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14799     # A "../" for each directory in $ac_dir_suffix.
14800     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14801   else
14802     ac_dir_suffix= ac_dots=
14803   fi
14804
14805   case "$ac_given_srcdir" in
14806   .)  srcdir=.
14807       if test -z "$ac_dots"; then top_srcdir=.
14808       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14809   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14810   *) # Relative path.
14811     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14812     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14813   esac
14814
14815   case "$ac_given_INSTALL" in
14816   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14817   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14818   esac
14819
14820   echo creating "$ac_file"
14821   rm -f "$ac_file"
14822   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14823   case "$ac_file" in
14824   *Makefile*) ac_comsub="1i\\
14825 # $configure_input" ;;
14826   *) ac_comsub= ;;
14827   esac
14828
14829   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14830   sed -e "$ac_comsub
14831 s%@configure_input@%$configure_input%g
14832 s%@srcdir@%$srcdir%g
14833 s%@top_srcdir@%$top_srcdir%g
14834 s%@INSTALL@%$INSTALL%g
14835 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14836 fi; done
14837 rm -f conftest.s*
14838
14839 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14840 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14841 #
14842 # ac_d sets the value in "#define NAME VALUE" lines.
14843 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14844 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14845 ac_dC='\3'
14846 ac_dD='%g'
14847 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14848 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14849 ac_uB='\([      ]\)%\1#\2define\3'
14850 ac_uC=' '
14851 ac_uD='\4%g'
14852 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14853 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14854 ac_eB='$%\1#\2define\3'
14855 ac_eC=' '
14856 ac_eD='%g'
14857
14858 if test "${CONFIG_HEADERS+set}" != set; then
14859 EOF
14860 cat >> $CONFIG_STATUS <<EOF
14861   CONFIG_HEADERS="src/config.h lwlib/config.h"
14862 EOF
14863 cat >> $CONFIG_STATUS <<\EOF
14864 fi
14865 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14866   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14867   case "$ac_file" in
14868   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14869        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14870   *) ac_file_in="${ac_file}.in" ;;
14871   esac
14872
14873   echo creating $ac_file
14874
14875   rm -f conftest.frag conftest.in conftest.out
14876   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14877   cat $ac_file_inputs > conftest.in
14878
14879 EOF
14880
14881 # Transform confdefs.h into a sed script conftest.vals that substitutes
14882 # the proper values into config.h.in to produce config.h.  And first:
14883 # Protect against being on the right side of a sed subst in config.status.
14884 # Protect against being in an unquoted here document in config.status.
14885 rm -f conftest.vals
14886 cat > conftest.hdr <<\EOF
14887 s/[\\&%]/\\&/g
14888 s%[\\$`]%\\&%g
14889 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14890 s%ac_d%ac_u%gp
14891 s%ac_u%ac_e%gp
14892 EOF
14893 sed -n -f conftest.hdr confdefs.h > conftest.vals
14894 rm -f conftest.hdr
14895
14896 # This sed command replaces #undef with comments.  This is necessary, for
14897 # example, in the case of _POSIX_SOURCE, which is predefined and required
14898 # on some systems where configure will not decide to define it.
14899 cat >> conftest.vals <<\EOF
14900 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14901 EOF
14902
14903 # Break up conftest.vals because some shells have a limit on
14904 # the size of here documents, and old seds have small limits too.
14905
14906 rm -f conftest.tail
14907 while :
14908 do
14909   ac_lines=`grep -c . conftest.vals`
14910   # grep -c gives empty output for an empty file on some AIX systems.
14911   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14912   # Write a limited-size here document to conftest.frag.
14913   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14914   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14915   echo 'CEOF
14916   sed -f conftest.frag conftest.in > conftest.out
14917   rm -f conftest.in
14918   mv conftest.out conftest.in
14919 ' >> $CONFIG_STATUS
14920   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14921   rm -f conftest.vals
14922   mv conftest.tail conftest.vals
14923 done
14924 rm -f conftest.vals
14925
14926 cat >> $CONFIG_STATUS <<\EOF
14927   rm -f conftest.frag conftest.h
14928   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14929   cat conftest.in >> conftest.h
14930   rm -f conftest.in
14931   if cmp -s $ac_file conftest.h 2>/dev/null; then
14932     echo "$ac_file is unchanged"
14933     rm -f conftest.h
14934   else
14935     # Remove last slash and all that follows it.  Not all systems have dirname.
14936       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14937       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14938       # The file is in a subdirectory.
14939       test ! -d "$ac_dir" && mkdir "$ac_dir"
14940     fi
14941     rm -f $ac_file
14942     mv conftest.h $ac_file
14943   fi
14944 fi; done
14945
14946 EOF
14947 cat >> $CONFIG_STATUS <<EOF
14948 CPP="$CPP"
14949  top_srcdir="$srcdir"
14950  MAKE_SUBDIR="$MAKE_SUBDIR"
14951
14952 EOF
14953 cat >> $CONFIG_STATUS <<\EOF
14954 for dir in . $MAKE_SUBDIR; do
14955   (
14956     cd $dir
14957     rm -f junk.c
14958     < Makefile.in \
14959       sed -e '/^# Generated/d' \
14960           -e 's%/\*\*/#.*%%' \
14961           -e 's/^ *# */#/' \
14962           -e '/^##/d' \
14963           -e '/^#/ {
14964 p
14965 d
14966 }'        \
14967           -e '/./ {
14968 s/\([\"]\)/\\\1/g
14969 s/^/"/
14970 s/$/"/
14971 }'  > junk.c;
14972
14973
14974
14975     echo creating $dir/Makefile
14976 $CPP -I. -I${top_srcdir}/src  junk.c \
14977   | sed -e 's/^\#.*//'          \
14978         -e 's/^[        ][      ]*$//'\
14979         -e 's/^ /       /'              \
14980   | sed -n -e '/^..*$/p'        \
14981   | sed '/^\"/ {
14982         s/\\\([\"]\)/\1/g
14983         s/^[    ]*\"//
14984         s/\"[   ]*$//
14985 }' > Makefile.new
14986     chmod 444 Makefile.new
14987     mv -f Makefile.new Makefile
14988
14989     echo creating $dir/GNUmakefile
14990 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14991   | sed -e 's/^\#.*//'          \
14992         -e 's/^[        ][      ]*$//'\
14993         -e 's/^ /       /'              \
14994   | sed -n -e '/^..*$/p'        \
14995   | sed '/^\"/ {
14996         s/\\\([\"]\)/\1/g
14997         s/^[    ]*\"//
14998         s/\"[   ]*$//
14999 }' > Makefile.new
15000     chmod 444 Makefile.new
15001     mv -f Makefile.new GNUmakefile
15002
15003     rm -f junk.c
15004   )
15005 done
15006
15007 sed < config.status >> lib-src/config.values \
15008   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15009   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15010   -e 's/^\([^ ]*\) $/\1 ""/' \
15011   -e 's/ 1$/ t/'
15012
15013
15014 exit 0
15015 EOF
15016 chmod +x $CONFIG_STATUS
15017 rm -fr confdefs* $ac_clean_files
15018 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1