b57dabfded64329bf1c66758cf891a492b241735
[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 esac
1131
1132 case "$canonical" in
1133   *-*-linux*    ) opsys=linux ;;
1134   *-*-netbsd*   ) opsys=netbsd ;;
1135   *-*-openbsd*  ) opsys=openbsd ;;
1136   *-*-nextstep* ) opsys=nextstep ;;
1137   *-*-vms       ) opsys=vms ;;
1138
1139     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1140   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1141   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1142   *-dec-osf3*                ) opsys=decosf3-1 ;;
1143   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1144
1145     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1146   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1147   *-*-ultrix* )         opsys=ultrix4-3 ;;
1148
1149     *-*-aix3.1*  ) opsys=aix3-1 ;;
1150   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1151   *-*-aix3*    ) opsys=aix3-2   ;;
1152   *-*-aix4.0*  ) opsys=aix4     ;;
1153   *-*-aix4.1*  ) opsys=aix4-1   ;;
1154   *-*-aix4*    ) opsys=aix4-2   ;;
1155
1156     *-gnu* )                    opsys=gnu    ;;
1157   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1158   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1159   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1160   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1161   *-*-aos*   )                  opsys=bsd4-3 ;;
1162   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1163   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1164   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1165   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1166   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1167   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1168         if test -z "$NON_GNU_CPP" ; then
1169           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1170             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1171           done
1172         fi
1173         opsys=usg5-4-2 ;;
1174     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1175     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1176 esac
1177
1178 case "$canonical" in
1179
1180     *-*-netbsd* )
1181     case "$canonical" in
1182       i[3-9]86-*-netbsd*) machine=intel386 ;;
1183       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1184                                             machine=hp9000s300 ;;
1185       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1186       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1187     esac
1188   ;;
1189
1190     *-*-openbsd* )
1191     case "${canonical}" in
1192       i386-*-openbsd*)          machine=intel386 ;;
1193       m68k-*-openbsd*)          machine=hp9000s300 ;;
1194       mipsel-*-openbsd*)        machine=pmax ;;
1195      esac
1196    ;;
1197
1198     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1199   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1200
1201     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1202   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1203
1204     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1205
1206     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1207
1208     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1209
1210     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1211
1212     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1213
1214     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1215   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1216   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1217
1218   
1219     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1220
1221     *-convex-bsd* | *-convex-convexos* )
1222     machine=convex opsys=bsd4-3
1223     NON_GNU_CPP="cc -E -P"
1224   ;;
1225
1226     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1227
1228     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1229   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1230   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1231   m88k-dg-dgux*                           ) opsys=dgux     ;;
1232
1233     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1234   m88k-motorola-sysv4* )
1235                     machine=delta88k opsys=usg5-4-2
1236   ;;
1237   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1238
1239     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1240   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1241
1242     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1243
1244     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1245   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1246   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1247
1248       m88k-harris-cxux* )
1249         case "`uname -r`" in
1250        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1251        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1252     esac
1253     NON_GNU_CPP="/lib/cpp"
1254   ;;
1255     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1256     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1257
1258     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1259
1260     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1261
1262     *-hp-hpux* )
1263         case "$canonical" in
1264       m68*  ) machine=hp9000s300 ;;
1265       hppa* ) machine=hp800      ;;
1266     esac
1267
1268     case "$canonical" in
1269       *-hp-hpux7*  )  opsys=hpux   ;;
1270       *-hp-hpux8*  )  opsys=hpux8  ;;
1271       *-hp-hpux9*  )  opsys=hpux9  ;;
1272       *-hp-hpux10* )  opsys=hpux10 ;;
1273       *-hp-hpux11* )  opsys=hpux11 ;;
1274       *            )  opsys=hpux   ;;
1275     esac
1276
1277         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1278    echo "    xemacs will be linked with \"strcat.o\""
1279  fi ;; esac
1280
1281     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1282         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1283     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1284
1285     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1286   ;;
1287
1288     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1289   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1290
1291     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1292   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1293   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1294   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1295   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1296   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1297
1298     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1299   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1300
1301     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1302
1303     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1304
1305     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1306
1307     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1308
1309       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1310
1311     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1312
1313     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1314
1315     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1316
1317     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1318
1319         mips-mips-usg* ) machine=mips4 ;;
1320   mips-mips-riscos4 )
1321     machine=mips4
1322     NON_GNU_CC="cc -systype bsd43"
1323     NON_GNU_CPP="cc -systype bsd43 -E"
1324     case "$canonical" in
1325       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1326       mips-mips-riscos5* ) opsys=riscos5 ;;
1327     esac
1328   ;;
1329   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1330   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1331
1332     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1333
1334     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1335
1336     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1337   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1338
1339     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1340
1341     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1342
1343     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1344
1345     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1346
1347     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1348   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1349
1350     mips-siemens-sysv* | mips-sni-sysv*)
1351     machine=mips-siemens opsys=usg5-4
1352     NON_GNU_CC=/usr/ccs/bin/cc
1353     NON_GNU_CPP=/usr/ccs/lib/cpp
1354   ;;
1355
1356     mips-nec-sysv*)
1357     machine=mips-nec
1358     NON_GNU_CC=/usr/ccs/bin/cc
1359     NON_GNU_CPP=/usr/ccs/lib/cpp
1360   ;;
1361
1362       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1363   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1364     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1365   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1366   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1367   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1368   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1369   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1370   mips-sgi-irix*      ) opsys=irix5-0 ;;
1371
1372     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1373   *-sony-news* ) opsys=newsos5 ;;
1374
1375     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1376
1377     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1378         case "$canonical" in
1379       m68*-sunos1* )             machine=sun1     ;;
1380       m68*-sunos2* )             machine=sun2     ;;
1381       m68* )                     machine=sun3     ;;
1382       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1383       i*86-*-* )                 machine=intel386 ;;
1384       rs6000* )                  machine=rs6000   ;;
1385     esac
1386
1387         case "$canonical" in *-sunos5*)
1388       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1389     esac
1390
1391                     case "$canonical" in
1392       *-sunos4* )
1393         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1394         : ;;
1395       *-solaris2* )
1396         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1397         RANLIB=':' ;;
1398     esac
1399
1400     case "$canonical" in
1401       *-solaris*          )
1402         opsys=sol2
1403         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1404         { test "$extra_verbose" = "yes" && cat << EOF
1405     Defining OS_RELEASE = $os_release
1406 EOF
1407 cat >> confdefs.h <<EOF
1408 #define OS_RELEASE $os_release
1409 EOF
1410 }
1411  ;;
1412
1413             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1414       *-sunos4.0*         ) opsys=sunos4-0      ;;
1415       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1416       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1417       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1418       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1419       *-mach*             ) opsys=mach-bsd4-3   ;;
1420       *                   ) opsys=bsd4-2        ;;
1421     esac
1422
1423     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1424
1425         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1426   ;;
1427
1428     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1429
1430     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1431   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1432
1433     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1434
1435     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1436
1437     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1438       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1439
1440     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1441
1442     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1443
1444     vax-dec-* )
1445     case "$canonical" in
1446       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1447       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1448       *-mach* )                         opsys=mach-bsd4-3 ;;
1449     esac
1450   ;;
1451
1452     ns16k-whitechapel-* ) machine=mg1 ;;
1453
1454     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1455
1456     i[3-9]86-*-* )
1457     machine=intel386
1458     case "$canonical" in
1459       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1460       *-isc2.2* )               opsys=isc2-2 ;;
1461       *-isc4.0* )               opsys=isc4-0 ;;
1462       *-isc4.* )                opsys=isc4-1
1463                                 GCC_TEST_OPTIONS=-posix
1464                                 NON_GCC_TEST_OPTIONS=-Xp
1465                                 ;;
1466       *-isc* )                  opsys=isc3-0 ;;
1467       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1468       *-esix* )                 opsys=esix ;;
1469       *-mach* )                 opsys=mach-bsd4-3 ;;
1470       *-xenix* )                opsys=xenix ;;
1471       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1472       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1473       *-bsdi4* )                opsys=bsdos4 ;;
1474       *-bsdi3* )                opsys=bsdos3 ;;
1475       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1476       *-bsdi2* )                opsys=bsdos2 ;;
1477       *-sco3.2v5* )             opsys=sco5 ;
1478                                                         if test "$dynamic" = "yes" ; then
1479                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1480         else
1481                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1482         fi ;;
1483       *-sysv5* )                opsys=sco7 ;;
1484       *-386bsd* )               opsys=386bsd ;;
1485       *-freebsd* )              opsys=freebsd ;;
1486       *-nextstep* )             opsys=nextstep ;;
1487       *-pc-cygwin* )            opsys=cygwin32 ;;
1488       *-pc-mingw* )             opsys=mingw32 ;
1489                                 test -z "$with_tty" && with_tty="no";;
1490           esac
1491   ;;
1492
1493     m68k-*-linux* ) machine=m68k opsys=linux ;;
1494
1495 esac
1496
1497 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1498 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1499
1500 if test -r "${srcdir}/src/m/${machine}.h"; then
1501   machfile="m/${machine}.h"
1502   { test "$extra_verbose" = "yes" && cat << EOF
1503     Defining config_machfile = "$machfile"
1504 EOF
1505 cat >> confdefs.h <<EOF
1506 #define config_machfile "$machfile"
1507 EOF
1508 }
1509
1510 else
1511   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1512   echo "Using configure-time autodetection only."
1513 fi
1514
1515 if test -r "${srcdir}/src/s/${opsys}.h"; then
1516   opsysfile="s/${opsys}.h"
1517   { test "$extra_verbose" = "yes" && cat << EOF
1518     Defining config_opsysfile = "$opsysfile"
1519 EOF
1520 cat >> confdefs.h <<EOF
1521 #define config_opsysfile "$opsysfile"
1522 EOF
1523 }
1524
1525 else
1526   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1527   echo "Using configure-time autodetection only."
1528 fi
1529
1530
1531 if test -z "$dynamic"; then
1532   case "$opsys" in
1533     hpux* | sunos4* ) dynamic=no ;;
1534     *) dynamic=yes ;;
1535   esac
1536 fi
1537 if test "$dynamic" = "yes"; then
1538   case "$opsys" in
1539     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1540     decosf* ) ld_call_shared="-call_shared" ;;
1541   esac
1542 else   case "$opsys" in
1543     sol2 )
1544       echo "Static linking is not supported on Solaris 2."
1545       echo "Rerun configure without specifying --dynamic=no."
1546       exit 1 ;;
1547     linux   ) ld_call_shared="-Bstatic" ;;
1548     decosf* ) ld_call_shared="-non_shared" ;;
1549   esac
1550 fi
1551
1552 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1553
1554 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1555 { test "$extra_verbose" = "yes" && cat << EOF
1556     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1557 EOF
1558 cat >> confdefs.h <<EOF
1559 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1560 EOF
1561 }
1562
1563
1564
1565 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1566 if test "$with_workshop $with_tooltalk" = "yes no"; then
1567   (echo "$progname: Usage error:"
1568 echo " " "--with-workshop requires --with-tooltalk"
1569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1570 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1571 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1572 fi
1573
1574 if test "$with_workshop" = "yes"; then
1575   { test "$extra_verbose" = "yes" && cat << \EOF
1576     Defining SUNPRO
1577 EOF
1578 cat >> confdefs.h <<\EOF
1579 #define SUNPRO 1
1580 EOF
1581 }
1582
1583   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1584    echo "    xemacs will be linked with \"sunpro.o\""
1585  fi
1586 fi
1587
1588 if test "$with_clash_detection" != "no"; then
1589   { test "$extra_verbose" = "yes" && cat << \EOF
1590     Defining CLASH_DETECTION
1591 EOF
1592 cat >> confdefs.h <<\EOF
1593 #define CLASH_DETECTION 1
1594 EOF
1595 }
1596
1597   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1598    echo "    xemacs will be linked with \"filelock.o\""
1599  fi
1600 fi
1601
1602 test -n "$compiler" && CC="$compiler"
1603 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1604 fi
1605
1606 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1607 if test "${CFLAGS-unset}" != unset
1608   then cflags_specified=yes;
1609   else cflags_specified=no;
1610 fi
1611
1612 xe_save_CFLAGS="$CFLAGS"
1613
1614 # Extract the first word of "gcc", so it can be a program name with args.
1615 set dummy gcc; ac_word=$2
1616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1617 echo "configure:1618: checking for $ac_word" >&5
1618
1619 if test -n "$CC"; then
1620   ac_cv_prog_CC="$CC" # Let the user override the test.
1621 else
1622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1623   ac_dummy="$PATH"
1624   for ac_dir in $ac_dummy; do
1625     test -z "$ac_dir" && ac_dir=.
1626     if test -f $ac_dir/$ac_word; then
1627       ac_cv_prog_CC="gcc"
1628       break
1629     fi
1630   done
1631   IFS="$ac_save_ifs"
1632 fi
1633 CC="$ac_cv_prog_CC"
1634 if test -n "$CC"; then
1635   echo "$ac_t""$CC" 1>&6
1636 else
1637   echo "$ac_t""no" 1>&6
1638 fi
1639
1640 if test -z "$CC"; then
1641   # Extract the first word of "cc", so it can be a program name with args.
1642 set dummy cc; ac_word=$2
1643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1644 echo "configure:1645: checking for $ac_word" >&5
1645
1646 if test -n "$CC"; then
1647   ac_cv_prog_CC="$CC" # Let the user override the test.
1648 else
1649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1650   ac_prog_rejected=no
1651   ac_dummy="$PATH"
1652   for ac_dir in $ac_dummy; do
1653     test -z "$ac_dir" && ac_dir=.
1654     if test -f $ac_dir/$ac_word; then
1655       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1656         ac_prog_rejected=yes
1657         continue
1658       fi
1659       ac_cv_prog_CC="cc"
1660       break
1661     fi
1662   done
1663   IFS="$ac_save_ifs"
1664 if test $ac_prog_rejected = yes; then
1665   # We found a bogon in the path, so make sure we never use it.
1666   set dummy $ac_cv_prog_CC
1667   shift
1668   if test $# -gt 0; then
1669     # We chose a different compiler from the bogus one.
1670     # However, it has the same basename, so the bogon will be chosen
1671     # first if we set CC to just the basename; use the full file name.
1672     shift
1673     set dummy "$ac_dir/$ac_word" "$@"
1674     shift
1675     ac_cv_prog_CC="$@"
1676   fi
1677 fi
1678 fi
1679 CC="$ac_cv_prog_CC"
1680 if test -n "$CC"; then
1681   echo "$ac_t""$CC" 1>&6
1682 else
1683   echo "$ac_t""no" 1>&6
1684 fi
1685
1686   if test -z "$CC"; then
1687     case "`uname -s`" in
1688     *win32* | *WIN32*)
1689       # Extract the first word of "cl", so it can be a program name with args.
1690 set dummy cl; ac_word=$2
1691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1692 echo "configure:1693: checking for $ac_word" >&5
1693
1694 if test -n "$CC"; then
1695   ac_cv_prog_CC="$CC" # Let the user override the test.
1696 else
1697   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1698   ac_dummy="$PATH"
1699   for ac_dir in $ac_dummy; do
1700     test -z "$ac_dir" && ac_dir=.
1701     if test -f $ac_dir/$ac_word; then
1702       ac_cv_prog_CC="cl"
1703       break
1704     fi
1705   done
1706   IFS="$ac_save_ifs"
1707 fi
1708 CC="$ac_cv_prog_CC"
1709 if test -n "$CC"; then
1710   echo "$ac_t""$CC" 1>&6
1711 else
1712   echo "$ac_t""no" 1>&6
1713 fi
1714  ;;
1715     esac
1716   fi
1717   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1718 fi
1719
1720 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1721 echo "configure:1722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1722
1723 ac_ext=c
1724 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1725 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1726 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1727 ac_cpp='$CPP '"$xe_cppflags"
1728 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1729 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1730 cross_compiling=no
1731
1732 cat > conftest.$ac_ext << EOF
1733
1734 #line 1735 "configure"
1735 #include "confdefs.h"
1736
1737 main(){return(0);}
1738 EOF
1739 if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1740   ac_cv_prog_cc_works=yes
1741   # If we can't run a trivial program, we are probably using a cross compiler.
1742   if (./conftest; exit) 2>/dev/null; then
1743     ac_cv_prog_cc_cross=no
1744   else
1745     ac_cv_prog_cc_cross=yes
1746   fi
1747 else
1748   echo "configure: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   ac_cv_prog_cc_works=no
1751 fi
1752 rm -fr conftest*
1753 ac_ext=c
1754 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1755 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1756 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1757 ac_cpp='$CPP '"$xe_cppflags"
1758 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1759 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1760 cross_compiling=no
1761
1762 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1763 if test $ac_cv_prog_cc_works = no; then
1764   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1765 fi
1766 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1767 echo "configure:1768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1768 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1769 cross_compiling=$ac_cv_prog_cc_cross
1770
1771 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1772 echo "configure:1773: checking whether we are using GNU C" >&5
1773
1774 cat > conftest.c <<EOF
1775 #ifdef __GNUC__
1776   yes;
1777 #endif
1778 EOF
1779 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1780   ac_cv_prog_gcc=yes
1781 else
1782   ac_cv_prog_gcc=no
1783 fi
1784
1785 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1786
1787 if test $ac_cv_prog_gcc = yes; then
1788   GCC=yes
1789 else
1790   GCC=
1791 fi
1792
1793 ac_test_CFLAGS="${CFLAGS+set}"
1794 ac_save_CFLAGS="$CFLAGS"
1795 CFLAGS=
1796 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1797 echo "configure:1798: checking whether ${CC-cc} accepts -g" >&5
1798
1799 echo 'void f(){}' > conftest.c
1800 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1801   ac_cv_prog_cc_g=yes
1802 else
1803   ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest*
1806
1807
1808 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS="$ac_save_CFLAGS"
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824  
1825 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1826   CC=${NON_GNU_CC-cc}
1827   # Extract the first word of "gcc", so it can be a program name with args.
1828 set dummy gcc; ac_word=$2
1829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1830 echo "configure:1831: checking for $ac_word" >&5
1831
1832 if test -n "$CC"; then
1833   ac_cv_prog_CC="$CC" # Let the user override the test.
1834 else
1835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1836   ac_dummy="$PATH"
1837   for ac_dir in $ac_dummy; do
1838     test -z "$ac_dir" && ac_dir=.
1839     if test -f $ac_dir/$ac_word; then
1840       ac_cv_prog_CC="gcc"
1841       break
1842     fi
1843   done
1844   IFS="$ac_save_ifs"
1845 fi
1846 CC="$ac_cv_prog_CC"
1847 if test -n "$CC"; then
1848   echo "$ac_t""$CC" 1>&6
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852
1853 if test -z "$CC"; then
1854   # Extract the first word of "cc", so it can be a program name with args.
1855 set dummy cc; ac_word=$2
1856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1857 echo "configure:1858: checking for $ac_word" >&5
1858
1859 if test -n "$CC"; then
1860   ac_cv_prog_CC="$CC" # Let the user override the test.
1861 else
1862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1863   ac_prog_rejected=no
1864   ac_dummy="$PATH"
1865   for ac_dir in $ac_dummy; do
1866     test -z "$ac_dir" && ac_dir=.
1867     if test -f $ac_dir/$ac_word; then
1868       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1869         ac_prog_rejected=yes
1870         continue
1871       fi
1872       ac_cv_prog_CC="cc"
1873       break
1874     fi
1875   done
1876   IFS="$ac_save_ifs"
1877 if test $ac_prog_rejected = yes; then
1878   # We found a bogon in the path, so make sure we never use it.
1879   set dummy $ac_cv_prog_CC
1880   shift
1881   if test $# -gt 0; then
1882     # We chose a different compiler from the bogus one.
1883     # However, it has the same basename, so the bogon will be chosen
1884     # first if we set CC to just the basename; use the full file name.
1885     shift
1886     set dummy "$ac_dir/$ac_word" "$@"
1887     shift
1888     ac_cv_prog_CC="$@"
1889   fi
1890 fi
1891 fi
1892 CC="$ac_cv_prog_CC"
1893 if test -n "$CC"; then
1894   echo "$ac_t""$CC" 1>&6
1895 else
1896   echo "$ac_t""no" 1>&6
1897 fi
1898
1899   if test -z "$CC"; then
1900     case "`uname -s`" in
1901     *win32* | *WIN32*)
1902       # Extract the first word of "cl", so it can be a program name with args.
1903 set dummy cl; ac_word=$2
1904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1905 echo "configure:1906: checking for $ac_word" >&5
1906
1907 if test -n "$CC"; then
1908   ac_cv_prog_CC="$CC" # Let the user override the test.
1909 else
1910   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1911   ac_dummy="$PATH"
1912   for ac_dir in $ac_dummy; do
1913     test -z "$ac_dir" && ac_dir=.
1914     if test -f $ac_dir/$ac_word; then
1915       ac_cv_prog_CC="cl"
1916       break
1917     fi
1918   done
1919   IFS="$ac_save_ifs"
1920 fi
1921 CC="$ac_cv_prog_CC"
1922 if test -n "$CC"; then
1923   echo "$ac_t""$CC" 1>&6
1924 else
1925   echo "$ac_t""no" 1>&6
1926 fi
1927  ;;
1928     esac
1929   fi
1930   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1931 fi
1932
1933 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1934 echo "configure:1935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1935
1936 ac_ext=c
1937 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1938 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1939 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1940 ac_cpp='$CPP '"$xe_cppflags"
1941 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1942 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1943 cross_compiling=no
1944
1945 cat > conftest.$ac_ext << EOF
1946
1947 #line 1948 "configure"
1948 #include "confdefs.h"
1949
1950 main(){return(0);}
1951 EOF
1952 if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1953   ac_cv_prog_cc_works=yes
1954   # If we can't run a trivial program, we are probably using a cross compiler.
1955   if (./conftest; exit) 2>/dev/null; then
1956     ac_cv_prog_cc_cross=no
1957   else
1958     ac_cv_prog_cc_cross=yes
1959   fi
1960 else
1961   echo "configure: failed program was:" >&5
1962   cat conftest.$ac_ext >&5
1963   ac_cv_prog_cc_works=no
1964 fi
1965 rm -fr conftest*
1966 ac_ext=c
1967 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1968 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1969 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1970 ac_cpp='$CPP '"$xe_cppflags"
1971 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1972 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1973 cross_compiling=no
1974
1975 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1976 if test $ac_cv_prog_cc_works = no; then
1977   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1978 fi
1979 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1980 echo "configure:1981: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1981 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1982 cross_compiling=$ac_cv_prog_cc_cross
1983
1984 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1985 echo "configure:1986: checking whether we are using GNU C" >&5
1986
1987 cat > conftest.c <<EOF
1988 #ifdef __GNUC__
1989   yes;
1990 #endif
1991 EOF
1992 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1993   ac_cv_prog_gcc=yes
1994 else
1995   ac_cv_prog_gcc=no
1996 fi
1997
1998 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1999
2000 if test $ac_cv_prog_gcc = yes; then
2001   GCC=yes
2002 else
2003   GCC=
2004 fi
2005
2006 ac_test_CFLAGS="${CFLAGS+set}"
2007 ac_save_CFLAGS="$CFLAGS"
2008 CFLAGS=
2009 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2010 echo "configure:2011: checking whether ${CC-cc} accepts -g" >&5
2011
2012 echo 'void f(){}' > conftest.c
2013 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2014   ac_cv_prog_cc_g=yes
2015 else
2016   ac_cv_prog_cc_g=no
2017 fi
2018 rm -f conftest*
2019
2020
2021 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2022 if test "$ac_test_CFLAGS" = set; then
2023   CFLAGS="$ac_save_CFLAGS"
2024 elif test $ac_cv_prog_cc_g = yes; then
2025   if test "$GCC" = yes; then
2026     CFLAGS="-g -O2"
2027   else
2028     CFLAGS="-g"
2029   fi
2030 else
2031   if test "$GCC" = yes; then
2032     CFLAGS="-O2"
2033   else
2034     CFLAGS=
2035   fi
2036 fi
2037
2038 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2039   CC=gcc
2040   # Extract the first word of "gcc", so it can be a program name with args.
2041 set dummy gcc; ac_word=$2
2042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2043 echo "configure:2044: checking for $ac_word" >&5
2044
2045 if test -n "$CC"; then
2046   ac_cv_prog_CC="$CC" # Let the user override the test.
2047 else
2048   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2049   ac_dummy="$PATH"
2050   for ac_dir in $ac_dummy; do
2051     test -z "$ac_dir" && ac_dir=.
2052     if test -f $ac_dir/$ac_word; then
2053       ac_cv_prog_CC="gcc"
2054       break
2055     fi
2056   done
2057   IFS="$ac_save_ifs"
2058 fi
2059 CC="$ac_cv_prog_CC"
2060 if test -n "$CC"; then
2061   echo "$ac_t""$CC" 1>&6
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065
2066 if test -z "$CC"; then
2067   # Extract the first word of "cc", so it can be a program name with args.
2068 set dummy cc; ac_word=$2
2069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2070 echo "configure:2071: checking for $ac_word" >&5
2071
2072 if test -n "$CC"; then
2073   ac_cv_prog_CC="$CC" # Let the user override the test.
2074 else
2075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2076   ac_prog_rejected=no
2077   ac_dummy="$PATH"
2078   for ac_dir in $ac_dummy; do
2079     test -z "$ac_dir" && ac_dir=.
2080     if test -f $ac_dir/$ac_word; then
2081       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2082         ac_prog_rejected=yes
2083         continue
2084       fi
2085       ac_cv_prog_CC="cc"
2086       break
2087     fi
2088   done
2089   IFS="$ac_save_ifs"
2090 if test $ac_prog_rejected = yes; then
2091   # We found a bogon in the path, so make sure we never use it.
2092   set dummy $ac_cv_prog_CC
2093   shift
2094   if test $# -gt 0; then
2095     # We chose a different compiler from the bogus one.
2096     # However, it has the same basename, so the bogon will be chosen
2097     # first if we set CC to just the basename; use the full file name.
2098     shift
2099     set dummy "$ac_dir/$ac_word" "$@"
2100     shift
2101     ac_cv_prog_CC="$@"
2102   fi
2103 fi
2104 fi
2105 CC="$ac_cv_prog_CC"
2106 if test -n "$CC"; then
2107   echo "$ac_t""$CC" 1>&6
2108 else
2109   echo "$ac_t""no" 1>&6
2110 fi
2111
2112   if test -z "$CC"; then
2113     case "`uname -s`" in
2114     *win32* | *WIN32*)
2115       # Extract the first word of "cl", so it can be a program name with args.
2116 set dummy cl; ac_word=$2
2117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2118 echo "configure:2119: checking for $ac_word" >&5
2119
2120 if test -n "$CC"; then
2121   ac_cv_prog_CC="$CC" # Let the user override the test.
2122 else
2123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2124   ac_dummy="$PATH"
2125   for ac_dir in $ac_dummy; do
2126     test -z "$ac_dir" && ac_dir=.
2127     if test -f $ac_dir/$ac_word; then
2128       ac_cv_prog_CC="cl"
2129       break
2130     fi
2131   done
2132   IFS="$ac_save_ifs"
2133 fi
2134 CC="$ac_cv_prog_CC"
2135 if test -n "$CC"; then
2136   echo "$ac_t""$CC" 1>&6
2137 else
2138   echo "$ac_t""no" 1>&6
2139 fi
2140  ;;
2141     esac
2142   fi
2143   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2144 fi
2145
2146 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2147 echo "configure:2148: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2148
2149 ac_ext=c
2150 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2151 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2152 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2153 ac_cpp='$CPP '"$xe_cppflags"
2154 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2155 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2156 cross_compiling=no
2157
2158 cat > conftest.$ac_ext << EOF
2159
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2162
2163 main(){return(0);}
2164 EOF
2165 if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2166   ac_cv_prog_cc_works=yes
2167   # If we can't run a trivial program, we are probably using a cross compiler.
2168   if (./conftest; exit) 2>/dev/null; then
2169     ac_cv_prog_cc_cross=no
2170   else
2171     ac_cv_prog_cc_cross=yes
2172   fi
2173 else
2174   echo "configure: failed program was:" >&5
2175   cat conftest.$ac_ext >&5
2176   ac_cv_prog_cc_works=no
2177 fi
2178 rm -fr conftest*
2179 ac_ext=c
2180 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2181 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2182 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2183 ac_cpp='$CPP '"$xe_cppflags"
2184 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2185 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2186 cross_compiling=no
2187
2188 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2189 if test $ac_cv_prog_cc_works = no; then
2190   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2191 fi
2192 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2193 echo "configure:2194: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2194 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2195 cross_compiling=$ac_cv_prog_cc_cross
2196
2197 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2198 echo "configure:2199: checking whether we are using GNU C" >&5
2199
2200 cat > conftest.c <<EOF
2201 #ifdef __GNUC__
2202   yes;
2203 #endif
2204 EOF
2205 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2206   ac_cv_prog_gcc=yes
2207 else
2208   ac_cv_prog_gcc=no
2209 fi
2210
2211 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2212
2213 if test $ac_cv_prog_gcc = yes; then
2214   GCC=yes
2215 else
2216   GCC=
2217 fi
2218
2219 ac_test_CFLAGS="${CFLAGS+set}"
2220 ac_save_CFLAGS="$CFLAGS"
2221 CFLAGS=
2222 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2223 echo "configure:2224: checking whether ${CC-cc} accepts -g" >&5
2224
2225 echo 'void f(){}' > conftest.c
2226 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2227   ac_cv_prog_cc_g=yes
2228 else
2229   ac_cv_prog_cc_g=no
2230 fi
2231 rm -f conftest*
2232
2233
2234 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2235 if test "$ac_test_CFLAGS" = set; then
2236   CFLAGS="$ac_save_CFLAGS"
2237 elif test $ac_cv_prog_cc_g = yes; then
2238   if test "$GCC" = yes; then
2239     CFLAGS="-g -O2"
2240   else
2241     CFLAGS="-g"
2242   fi
2243 else
2244   if test "$GCC" = yes; then
2245     CFLAGS="-O2"
2246   else
2247     CFLAGS=
2248   fi
2249 fi
2250
2251 fi
2252 CFLAGS="$xe_save_CFLAGS"
2253
2254
2255 test -n "$CPP" -a -d "$CPP" && CPP=
2256
2257 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2258
2259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2260 echo "configure:2261: checking how to run the C preprocessor" >&5
2261 # On Suns, sometimes $CPP names a directory.
2262 if test -n "$CPP" && test -d "$CPP"; then
2263   CPP=
2264 fi
2265 if test -z "$CPP"; then
2266
2267   # This must be in double quotes, not single quotes, because CPP may get
2268   # substituted into the Makefile and "${CC-cc}" will confuse make.
2269   CPP="${CC-cc} -E"
2270   # On the NeXT, cc -E runs the code through the compiler's parser,
2271   # not just through cpp.
2272   cat > conftest.$ac_ext <<EOF
2273 #line 2274 "configure"
2274 #include "confdefs.h"
2275 #include <assert.h>
2276 Syntax Error
2277 EOF
2278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2279 { (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2281 if test -z "$ac_err"; then
2282   :
2283 else
2284   echo "$ac_err" >&5
2285   echo "configure: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   rm -rf conftest*
2288   CPP="${CC-cc} -E -traditional-cpp"
2289   cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 #include <assert.h>
2293 Syntax Error
2294 EOF
2295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2296 { (eval echo configure:2297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2298 if test -z "$ac_err"; then
2299   :
2300 else
2301   echo "$ac_err" >&5
2302   echo "configure: failed program was:" >&5
2303   cat conftest.$ac_ext >&5
2304   rm -rf conftest*
2305   CPP="${CC-cc} -nologo -E"
2306   cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <assert.h>
2310 Syntax Error
2311 EOF
2312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2313 { (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2315 if test -z "$ac_err"; then
2316   :
2317 else
2318   echo "$ac_err" >&5
2319   echo "configure: failed program was:" >&5
2320   cat conftest.$ac_ext >&5
2321   rm -rf conftest*
2322   CPP=/lib/cpp
2323 fi
2324 rm -f conftest*
2325 fi
2326 rm -f conftest*
2327 fi
2328 rm -f conftest*
2329   ac_cv_prog_CPP="$CPP"
2330   CPP="$ac_cv_prog_CPP"
2331 else
2332   ac_cv_prog_CPP="$CPP"
2333 fi
2334 echo "$ac_t""$CPP" 1>&6
2335
2336
2337
2338 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2339 echo "configure:2340: checking for AIX" >&5
2340 cat > conftest.$ac_ext <<EOF
2341 #line 2342 "configure"
2342 #include "confdefs.h"
2343 #ifdef _AIX
2344   yes
2345 #endif
2346
2347 EOF
2348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349   egrep "yes" >/dev/null 2>&1; then
2350   rm -rf conftest*
2351   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2352     Defining _ALL_SOURCE
2353 EOF
2354 cat >> confdefs.h <<\EOF
2355 #define _ALL_SOURCE 1
2356 EOF
2357 }
2358
2359 else
2360   rm -rf conftest*
2361   echo "$ac_t""no" 1>&6
2362 fi
2363 rm -f conftest*
2364
2365  
2366
2367 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2368 echo "configure:2369: checking for GNU libc" >&5
2369 cat > conftest.$ac_ext <<EOF
2370 #line 2371 "configure"
2371 #include "confdefs.h"
2372 #include <features.h>
2373 int main() {
2374
2375 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2376 #error Not a GNU libc system :-(
2377 ******* ======= ******** &&&&&&&&
2378 #endif
2379
2380 ; return 0; }
2381 EOF
2382 if { (eval echo configure:2383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2383   rm -rf conftest*
2384   have_glibc=yes
2385 else
2386   echo "configure: failed program was:" >&5
2387   cat conftest.$ac_ext >&5
2388   rm -rf conftest*
2389   have_glibc=no
2390 fi
2391 rm -f conftest*
2392 echo "$ac_t""$have_glibc" 1>&6
2393 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2394     Defining _GNU_SOURCE
2395 EOF
2396 cat >> confdefs.h <<\EOF
2397 #define _GNU_SOURCE 1
2398 EOF
2399 }
2400
2401
2402 case "$opsys" in
2403   sol2)
2404    { test "$extra_verbose" = "yes" && cat << \EOF
2405     Defining __EXTENSIONS__
2406 EOF
2407 cat >> confdefs.h <<\EOF
2408 #define __EXTENSIONS__ 1
2409 EOF
2410 }
2411
2412       if test "$os_release" -ge 55; then
2413      { test "$extra_verbose" = "yes" && cat << \EOF
2414     Defining _XOPEN_SOURCE = 500
2415 EOF
2416 cat >> confdefs.h <<\EOF
2417 #define _XOPEN_SOURCE 500
2418 EOF
2419 }
2420
2421      { test "$extra_verbose" = "yes" && cat << \EOF
2422     Defining _XOPEN_SOURCE_EXTENDED
2423 EOF
2424 cat >> confdefs.h <<\EOF
2425 #define _XOPEN_SOURCE_EXTENDED 1
2426 EOF
2427 }
2428
2429    fi ;;
2430   linux)
2431     { test "$extra_verbose" = "yes" && cat << \EOF
2432     Defining _POSIX_C_SOURCE = 199506L
2433 EOF
2434 cat >> confdefs.h <<\EOF
2435 #define _POSIX_C_SOURCE 199506L
2436 EOF
2437 }
2438
2439     { test "$extra_verbose" = "yes" && cat << \EOF
2440     Defining _XOPEN_SOURCE = 500
2441 EOF
2442 cat >> confdefs.h <<\EOF
2443 #define _XOPEN_SOURCE 500
2444 EOF
2445 }
2446
2447     { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining _XOPEN_SOURCE_EXTENDED
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define _XOPEN_SOURCE_EXTENDED 1
2452 EOF
2453 }
2454
2455     ;;
2456 esac
2457
2458 cat > conftest.$ac_ext <<EOF
2459 #line 2460 "configure"
2460 #include "confdefs.h"
2461 int main () {
2462 #if defined __SUNPRO_C
2463 return 11;
2464 #elif defined __DECC
2465 return 12;
2466 #elif defined __USLC__ && defined __SCO_VERSION__
2467 return 13;
2468 #else
2469 return 0;
2470 #endif
2471 }
2472 EOF
2473 if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2474 then
2475   :
2476 else
2477   conftest_rc="$?"
2478   echo "configure: failed program was:" >&5
2479   cat conftest.$ac_ext >&5
2480   rm -fr conftest*
2481   case "$conftest_rc" in
2482   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2483   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2484   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2485 esac
2486 fi
2487 rm -fr conftest*
2488
2489
2490
2491
2492 echo "Extracting information from the machine- and system-dependent headers..."
2493
2494 tempcname="conftest.c"
2495
2496
2497
2498 cat > $tempcname < confdefs.h
2499 cat >> $tempcname <<EOF
2500 #define NOT_C_CODE
2501 #define C_SWITCH_SITE
2502 #define C_SWITCH_X_SITE
2503 #define LD_SWITCH_SITE
2504 #define LD_SWITCH_X_SITE
2505 #define LD_SWITCH_X_SITE_AUX
2506 #define OS_RELEASE $os_release
2507
2508 #ifdef config_opsysfile
2509 #include "$srcdir/src/$opsysfile"
2510 #endif
2511
2512 #ifdef config_machfile
2513 #include "$srcdir/src/$machfile"
2514 #endif
2515
2516 #ifndef LIBS_MACHINE
2517 #define LIBS_MACHINE
2518 #endif
2519 configure___ libs_machine=LIBS_MACHINE
2520
2521 #ifndef LIBS_SYSTEM
2522 #define LIBS_SYSTEM
2523 #endif
2524 configure___ libs_system=LIBS_SYSTEM
2525
2526 #ifndef LIBS_TERMCAP
2527 #define LIBS_TERMCAP
2528 #endif
2529 configure___ libs_termcap=LIBS_TERMCAP
2530
2531 #ifndef LIB_STANDARD
2532 #define LIB_STANDARD
2533 #endif
2534 configure___ libs_standard=LIB_STANDARD
2535
2536
2537 #ifndef OBJECTS_MACHINE
2538 #define OBJECTS_MACHINE
2539 #endif
2540 configure___ objects_machine=OBJECTS_MACHINE
2541
2542 #ifndef OBJECTS_SYSTEM
2543 #define OBJECTS_SYSTEM
2544 #endif
2545 configure___ objects_system=OBJECTS_SYSTEM
2546
2547
2548 #ifndef C_SWITCH_MACHINE
2549 #define C_SWITCH_MACHINE
2550 #endif
2551 configure___ c_switch_machine=C_SWITCH_MACHINE
2552
2553 #ifndef C_SWITCH_SYSTEM
2554 #define C_SWITCH_SYSTEM
2555 #endif
2556 configure___ c_switch_system=C_SWITCH_SYSTEM
2557
2558
2559 #ifndef LD_SWITCH_MACHINE
2560 #define LD_SWITCH_MACHINE
2561 #endif
2562 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2563
2564 #ifndef LD_SWITCH_SYSTEM
2565 #define LD_SWITCH_SYSTEM
2566 #endif
2567 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2568
2569
2570 #ifndef UNEXEC
2571 #define UNEXEC "unexec.o"
2572 #endif
2573 configure___ unexec=UNEXEC
2574
2575
2576 #ifndef LD_SWITCH_SHARED
2577 #define LD_SWITCH_SHARED "-c"
2578 #endif
2579 configure___ ld_switch_shared=LD_SWITCH_SHARED
2580
2581
2582 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2583 configure___ ordinary_ld=ORDINARY_LD
2584
2585 #ifdef ORDINARY_LINK
2586 #define LD ORDINARY_LD
2587 #else /* no ORDINARY LINK */
2588 #ifdef COFF_ENCAPSULATE
2589 #define LD "\$(CC) -nostdlib"
2590 #else /* not COFF_ENCAPSULATE */
2591 #ifdef LINKER
2592 #define LD LINKER
2593 #else /* ! defined (LINKER) */
2594 #define LD "ld"
2595 #endif /* ! defined (LINKER) */
2596 #endif /* ! defined (COFF_ENCAPSULATE) */
2597 #endif /* not ORDINARY_LINK */
2598 configure___ ld=LD
2599
2600 #ifndef LIB_GCC
2601 #define LIB_GCC
2602 #endif
2603 configure___ lib_gcc=LIB_GCC
2604
2605 #ifndef LD_TEXT_START_ADDR
2606 #define LD_TEXT_START_ADDR
2607 #endif
2608 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2609
2610
2611 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2612 #ifdef NO_REMAP
2613 #ifdef COFF_ENCAPSULATE
2614 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2615 #else /* ! defined (COFF_ENCAPSULATE) */
2616 #define START_FILES "pre-crt0.o /lib/crt0.o"
2617 #endif /* ! defined (COFF_ENCAPSULATE) */
2618 #else /* ! defined (NO_REMAP) */
2619 #define START_FILES "ecrt0.o"
2620 #endif /* ! defined (NO_REMAP) */
2621 #endif /* no ORDINARY_LINK */
2622 #ifndef START_FILES
2623 #define START_FILES
2624 #endif
2625 configure___ start_files=START_FILES
2626
2627 #ifdef ORDINARY_LINK
2628 configure___ ordinary_link=yes
2629 #else
2630 configure___ ordinary_link=no
2631 #endif
2632
2633 #ifdef SYSTEM_MALLOC
2634 configure___ system_malloc=yes
2635 #else
2636 configure___ system_malloc=no
2637 #endif
2638
2639 #ifdef TERMINFO
2640 configure___ have_terminfo=yes
2641 #else
2642 configure___ have_terminfo=no
2643 #endif
2644
2645 #ifdef MAIL_USE_FLOCK
2646 configure___ mail_use_flock=yes
2647 #else
2648 configure___ mail_use_flock=no
2649 #endif
2650
2651 #ifdef MAIL_USE_LOCKF
2652 configure___ mail_use_lockf=yes
2653 #else
2654 configure___ mail_use_lockf=no
2655 #endif
2656
2657 #ifdef MAIL_USE_LOCKING
2658 configure___ mail_use_locking=yes
2659 #else
2660 configure___ mail_use_locking=no
2661 #endif
2662
2663 #ifdef HAVE_WIN32_PROCESSES
2664 configure___ win32_processes=yes
2665 #else
2666 configure___ win32_processes=no
2667 #endif
2668
2669 EOF
2670
2671 CPP=`eval "echo $CPP $CPPFLAGS"`
2672 eval `$CPP -Isrc $tempcname \
2673         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2674
2675 rm $tempcname
2676
2677 if test "$pdump" = "yes"; then
2678   ordinary_link="yes"
2679   ld="${ordinary_ld}"
2680   start_files=
2681   libs_standard=
2682   unexec=
2683   lib_gcc=
2684 fi
2685
2686 test "$extra_verbose" = "yes" && \
2687   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 ""
2688
2689 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2690         mingw_include=`eval "dirname $mingw_include"` ;
2691         mingw_include="-I$mingw_include/../include/mingw32" ;
2692         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2693 esac
2694
2695 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2696
2697
2698 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2699
2700 if test "$__USLC__" = yes; then
2701   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2702 echo "configure:2703: checking for whether the -Kalloca compiler flag is needed" >&5
2703   need_kalloca=no
2704   cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707
2708 int main() {
2709 void *x = alloca(4);
2710 ; return 0; }
2711 EOF
2712 if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2713   rm -rf conftest*
2714   :
2715 else
2716   echo "configure: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   rm -rf conftest*
2719   
2720     xe_save_c_switch_system="$c_switch_system"
2721     c_switch_system="$c_switch_system -Kalloca"
2722     cat > conftest.$ac_ext <<EOF
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725
2726 int main() {
2727 void *x = alloca(4);
2728 ; return 0; }
2729 EOF
2730 if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2731   rm -rf conftest*
2732    need_kalloca=yes 
2733 else
2734   echo "configure: failed program was:" >&5
2735   cat conftest.$ac_ext >&5
2736 fi
2737 rm -f conftest*
2738     c_switch_system="$xe_save_c_switch_system"
2739 fi
2740 rm -f conftest*
2741   echo "$ac_t""$need_kalloca" 1>&6
2742   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2743 fi
2744
2745 if test "$cflags_specified" = "no"; then
2746       if   test "$GCC" = "yes"; then
2747     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2748               elif test "$__SUNPRO_C" = "yes"; then
2749     case "$opsys" in
2750       sol2    ) CFLAGS="-v -xO4" ;;
2751       sunos4* ) CFLAGS="-xO2";;
2752     esac
2753   elif test "$__DECC" = "yes"; then
2754     CFLAGS="-O3"
2755   elif test "$CC" = "xlc"; then
2756     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2757     else
2758     CFLAGS="-O" ;  fi
2759 fi
2760
2761 if test "$GCC" = "yes"; then
2762 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2763 echo "configure:2764: checking for buggy gcc versions" >&5
2764 GCC_VERSION=`$CC --version`
2765 case `uname -s`:`uname -m`:$GCC_VERSION in
2766                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2767                         case "$CFLAGS" in
2768             *-O2*|*-O3*)
2769                 case "$CFLAGS" in
2770                     *-fno-schedule-insns*) ;;
2771                     *)
2772                         echo "$ac_t""yes" 1>&6
2773                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2774                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2775                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2776                         ;;
2777                 esac
2778                 ;;
2779         esac
2780         ;;
2781                     Linux:alpha:egcs-2.91.*)
2782         echo "$ac_t""yes" 1>&6
2783         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2784         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2785         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2786         ;;
2787     *:i*86*:2.7.2*)
2788         case "$CFLAGS" in
2789             *-O2*|*-O3*)
2790                 case "$GCC_VERSION" in
2791                     2.7.2)
2792                         case "$CFLAGS" in
2793                             *-fno-strength-reduce*) ;;
2794                             *)
2795                                 echo "$ac_t""yes" 1>&6
2796                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2797                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2798                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2799                                 ;;
2800                         esac
2801                         ;;
2802                 esac
2803                 case "$CFLAGS" in
2804                  *-fno-caller-saves*) ;;
2805                  *)
2806                     echo "$ac_t""yes" 1>&6
2807                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2808                     echo "configure: warning: -fno-caller-saves." 1>&2
2809                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2810                     ;;
2811                 esac
2812                 ;;
2813         esac
2814         ;;
2815 esac
2816 echo "$ac_t""no" 1>&6
2817 fi
2818
2819
2820 if test "$GCC" = "yes"; then
2821   set x $ld_switch_system; shift; ld_switch_system=""
2822   while test -n "$1"; do
2823     case $1 in
2824       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2825       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2826       -Xlinker* ) ;;
2827       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2828     esac
2829     shift
2830   done
2831 fi
2832
2833 if test "$GCC" = "yes"; then
2834   set x $ld_switch_machine; shift; ld_switch_machine=""
2835   while test -n "$1"; do
2836     case $1 in
2837       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2838       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2839       -Xlinker* ) ;;
2840       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2841     esac
2842     shift
2843   done
2844 fi
2845
2846 if test "$GCC" = "yes"; then
2847   set x $LDFLAGS; shift; LDFLAGS=""
2848   while test -n "$1"; do
2849     case $1 in
2850       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2851       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2852       -Xlinker* ) ;;
2853       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2854     esac
2855     shift
2856   done
2857 fi
2858
2859 if test "$GCC" = "yes"; then
2860   set x $ld_call_shared; shift; ld_call_shared=""
2861   while test -n "$1"; do
2862     case $1 in
2863       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2864       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2865       -Xlinker* ) ;;
2866       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2867     esac
2868     shift
2869   done
2870 fi
2871
2872 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2873    echo "    xemacs will be linked with \"$objects_machine\""
2874  fi
2875 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2876    echo "    xemacs will be linked with \"$objects_system\""
2877  fi
2878 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2879    echo "    xemacs will be linked with \"$unexec\""
2880  fi
2881 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2882    echo "    xemacs will be linked with \"dumper.o\""
2883  fi
2884
2885 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2886 echo "configure:2887: checking for dynodump" >&5
2887 if test "$unexec" != "unexsol2.o"; then
2888   echo "$ac_t""no" 1>&6
2889 else
2890   echo "$ac_t""yes" 1>&6
2891   { test "$extra_verbose" = "yes" && cat << \EOF
2892     Defining DYNODUMP
2893 EOF
2894 cat >> confdefs.h <<\EOF
2895 #define DYNODUMP 1
2896 EOF
2897 }
2898
2899   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2900   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2901   case "$machine" in
2902     sparc   ) dynodump_arch=sparc ;;
2903     *86*    ) dynodump_arch=i386  ;;
2904     powerpc ) dynodump_arch=ppc   ;;
2905   esac
2906     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
2907 fi
2908
2909
2910 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2911
2912 if test "$unexec" = "unexaix.o"; then
2913   if   test "$dynamic" = "no"; then
2914   start_flags="-Wl,-bnso,-bnodelcsect"
2915   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2916   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2917     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2918   done
2919   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2920     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2921   done
2922   
2923 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2924 echo "configure:2925: checking for terminateAndUnload in -lC" >&5
2925 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2926
2927 xe_check_libs=" -lC "
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2931 /* Override any gcc2 internal prototype to avoid an error.  */
2932 /* We use char because int might match the return type of a gcc2
2933     builtin and then its argument prototype would still apply.  */
2934 char terminateAndUnload();
2935
2936 int main() {
2937 terminateAndUnload()
2938 ; return 0; }
2939 EOF
2940 if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2941   rm -rf conftest*
2942   eval "ac_cv_lib_$ac_lib_var=yes"
2943 else
2944   echo "configure: failed program was:" >&5
2945   cat conftest.$ac_ext >&5
2946   rm -rf conftest*
2947   eval "ac_cv_lib_$ac_lib_var=no"
2948 fi
2949 rm -f conftest*
2950 xe_check_libs=""
2951
2952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2953   echo "$ac_t""yes" 1>&6
2954   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2955 else
2956   echo "$ac_t""no" 1>&6
2957 fi
2958
2959
2960   fi
2961 elif test -n "$ld_text_start_addr"; then
2962   start_flags="-T $ld_text_start_addr -e __start"
2963 fi
2964
2965
2966
2967
2968 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2969  test -z "$linker" &&  linker='$(CC) -nostdlib'
2970  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2971 fi
2972 test "$GCC" != "yes" && lib_gcc=
2973
2974
2975
2976
2977
2978 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2979 if test -n "$site_libraries"; then
2980   for arg in $site_libraries; do
2981     case "$arg" in
2982      -* ) ;;
2983      * ) test -d "$arg" || \
2984            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2985        arg="-L${arg}" ;;
2986     esac
2987     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2988   done
2989 fi
2990
2991 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2992 if test -n "$site_includes"; then
2993   for arg in $site_includes; do
2994     case "$arg" in
2995       -* ) ;;
2996       * ) test -d "$arg" || \
2997            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2998       arg="-I${arg}" ;;
2999     esac
3000     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3001   done
3002 fi
3003
3004 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3005 if test -n "$site_prefixes"; then
3006   for dir in $site_prefixes; do
3007     lib_dir="${dir}/lib"
3008     inc_dir="${dir}/include"
3009     if test ! -d "$dir"; then
3010       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3011     elif test ! -d "$lib_dir"; then
3012       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3013     else
3014       if test -d "$inc_dir"; then
3015         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
3016       fi
3017       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
3018     fi
3019   done
3020 fi
3021
3022
3023 for dir in "/usr/ccs/lib"; do
3024   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
3025 done
3026
3027 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3028 if test -n "$site_runtime_libraries"; then
3029   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3030   export LD_RUN_PATH
3031 fi
3032
3033
3034
3035
3036
3037 if test -n "$add_runtime_path"; then :;
3038 elif test "$dynamic" = "no"; then add_runtime_path=no
3039 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3040 else case "$opsys" in
3041        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3042        * ) add_runtime_path=no ;;
3043      esac
3044 fi
3045
3046 if test "$add_runtime_path" = "yes"; then
3047       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3048 echo "configure:3049: checking "for runtime libraries flag"" >&5
3049   case "$opsys" in
3050     sol2 ) dash_r="-R" ;;
3051     decosf* | linux* | irix*) dash_r="-rpath " ;;
3052     *)
3053       dash_r=""
3054       for try_dash_r in "-R" "-R " "-rpath "; do
3055         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3056         
3057 if test "$GCC" = "yes"; then
3058   set x $xe_check_libs; shift; xe_check_libs=""
3059   while test -n "$1"; do
3060     case $1 in
3061       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3062       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3063       -Xlinker* ) ;;
3064       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3065     esac
3066     shift
3067   done
3068 fi
3069         cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072
3073 int main() {
3074
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3078   rm -rf conftest*
3079   dash_r="$try_dash_r"
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083 fi
3084 rm -f conftest*
3085         xe_check_libs=""
3086         test -n "$dash_r" && break
3087       done ;;
3088   esac
3089   if test -n "$dash_r";
3090     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3091     else echo "$ac_t""NONE" 1>&6
3092   fi
3093 fi
3094
3095 xe_add_unique_runpath_dir='
3096   xe_add_p=yes
3097   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3098   done
3099   if test "$xe_add_p" = "yes"; then
3100     test -n "$runpath" && runpath="${runpath}:"
3101     runpath="${runpath}${xe_runpath_dir}"
3102     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3103   fi'
3104
3105
3106
3107
3108 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3109     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3110   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3111   
3112         runpath="" runpath_dirs=""
3113   if test -n "$LD_RUN_PATH"; then
3114     runpath="$LD_RUN_PATH"
3115   elif test "$GCC" = "yes"; then
3116         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3117     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3118     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3119     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3120       case "$arg" in P,* | -L* | -R* )
3121         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3122           {
3123 xe_runpath_dir="$dir"
3124   test "$xe_runpath_dir" != "/lib"     -a \
3125         "$xe_runpath_dir" != "/usr/lib" -a \
3126         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3127   eval "$xe_add_unique_runpath_dir"
3128 }
3129         done ;;
3130       esac
3131     done
3132     ld_switch_run="$ld_switch_run_save"
3133     rm -f conftest*
3134   else
3135         for arg in $ld_switch_site $ld_switch_x_site; do
3136       case "$arg" in -L*) {
3137 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3138   test "$xe_runpath_dir" != "/lib"     -a \
3139         "$xe_runpath_dir" != "/usr/lib" -a \
3140         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3141   eval "$xe_add_unique_runpath_dir"
3142 };; esac
3143     done
3144         if test "$opsys $need_motif" = "sol2 yes"; then
3145       xe_runpath_dir="/opt/SUNWdt/lib";
3146       eval "$xe_add_unique_runpath_dir";
3147     fi
3148   fi 
3149   if test -n "$runpath"; then
3150     ld_switch_run="${dash_r}${runpath}"
3151     
3152 if test "$GCC" = "yes"; then
3153   set x $ld_switch_run; shift; ld_switch_run=""
3154   while test -n "$1"; do
3155     case $1 in
3156       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3157       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3158       -Xlinker* ) ;;
3159       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3160     esac
3161     shift
3162   done
3163 fi
3164     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3165   fi
3166 fi
3167
3168
3169
3170
3171 GNU_MALLOC=yes
3172 if test "$with_dlmalloc" != "no"; then
3173         doug_lea_malloc=yes
3174 else
3175         doug_lea_malloc=no
3176 fi
3177 after_morecore_hook_exists=yes
3178 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3179 echo "configure:3180: checking for malloc_set_state" >&5
3180
3181 cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 /* System header to define __stub macros and hopefully few prototypes,
3185     which can conflict with char malloc_set_state(); below.  */
3186 #include <assert.h>
3187 /* Override any gcc2 internal prototype to avoid an error.  */
3188 /* We use char because int might match the return type of a gcc2
3189     builtin and then its argument prototype would still apply.  */
3190 char malloc_set_state();
3191
3192 int main() {
3193
3194 /* The GNU C library defines this for functions which it implements
3195     to always fail with ENOSYS.  Some functions are actually named
3196     something starting with __ and the normal name is an alias.  */
3197 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3198 choke me
3199 #else
3200 malloc_set_state();
3201 #endif
3202
3203 ; return 0; }
3204 EOF
3205 if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3206   rm -rf conftest*
3207   eval "ac_cv_func_malloc_set_state=yes"
3208 else
3209   echo "configure: failed program was:" >&5
3210   cat conftest.$ac_ext >&5
3211   rm -rf conftest*
3212   eval "ac_cv_func_malloc_set_state=no"
3213 fi
3214 rm -f conftest*
3215
3216 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3217   echo "$ac_t""yes" 1>&6
3218   :
3219 else
3220   echo "$ac_t""no" 1>&6
3221 doug_lea_malloc=no
3222 fi
3223
3224 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3225 echo "configure:3226: checking whether __after_morecore_hook exists" >&5
3226 cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229 extern void (* __after_morecore_hook)();
3230 int main() {
3231 __after_morecore_hook = 0
3232 ; return 0; }
3233 EOF
3234 if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3235   rm -rf conftest*
3236   echo "$ac_t""yes" 1>&6
3237 else
3238   echo "configure: failed program was:" >&5
3239   cat conftest.$ac_ext >&5
3240   rm -rf conftest*
3241   echo "$ac_t""no" 1>&6
3242    after_morecore_hook_exists=no
3243 fi
3244 rm -f conftest*
3245 if test "$system_malloc" = "yes" ; then
3246   GNU_MALLOC=no
3247   GNU_MALLOC_reason="
3248     - The GNU allocators don't work with this system configuration."
3249 elif test "$with_system_malloc" = "yes" ; then
3250   GNU_MALLOC=no
3251   GNU_MALLOC_reason="
3252     - User chose not to use GNU allocators."
3253 elif test "$with_debug_malloc" = "yes" ; then
3254   GNU_MALLOC=no
3255   GNU_MALLOC_reason="
3256     - User chose to use Debugging Malloc."
3257 fi
3258
3259 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3260   GNU_MALLOC_reason="
3261     - Using Doug Lea's new malloc from the GNU C Library."
3262   { test "$extra_verbose" = "yes" && cat << \EOF
3263     Defining DOUG_LEA_MALLOC
3264 EOF
3265 cat >> confdefs.h <<\EOF
3266 #define DOUG_LEA_MALLOC 1
3267 EOF
3268 }
3269
3270   if test "$after_morecore_hook_exists" = "no" ; then
3271     GNU_MALLOC_reason="
3272     - Using Doug Lea's new malloc from the Linux C Library."
3273     { test "$extra_verbose" = "yes" && cat << \EOF
3274     Defining _NO_MALLOC_WARNING_
3275 EOF
3276 cat >> confdefs.h <<\EOF
3277 #define _NO_MALLOC_WARNING_ 1
3278 EOF
3279 }
3280
3281   fi
3282 fi
3283
3284
3285
3286
3287 # Extract the first word of "ranlib", so it can be a program name with args.
3288 set dummy ranlib; ac_word=$2
3289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3290 echo "configure:3291: checking for $ac_word" >&5
3291
3292 if test -n "$RANLIB"; then
3293   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3294 else
3295   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3296   ac_dummy="$PATH"
3297   for ac_dir in $ac_dummy; do
3298     test -z "$ac_dir" && ac_dir=.
3299     if test -f $ac_dir/$ac_word; then
3300       ac_cv_prog_RANLIB="ranlib"
3301       break
3302     fi
3303   done
3304   IFS="$ac_save_ifs"
3305   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3306 fi
3307 RANLIB="$ac_cv_prog_RANLIB"
3308 if test -n "$RANLIB"; then
3309   echo "$ac_t""$RANLIB" 1>&6
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313
3314 ac_aux_dir=
3315 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3316   if test -f $ac_dir/install-sh; then
3317     ac_aux_dir=$ac_dir
3318     ac_install_sh="$ac_aux_dir/install-sh -c"
3319     break
3320   elif test -f $ac_dir/install.sh; then
3321     ac_aux_dir=$ac_dir
3322     ac_install_sh="$ac_aux_dir/install.sh -c"
3323     break
3324   fi
3325 done
3326 if test -z "$ac_aux_dir"; then
3327   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3328 fi
3329 ac_config_guess=$ac_aux_dir/config.guess
3330 ac_config_sub=$ac_aux_dir/config.sub
3331 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3332
3333 # Find a good install program.  We prefer a C program (faster),
3334 # so one script is as good as another.  But avoid the broken or
3335 # incompatible versions:
3336 # SysV /etc/install, /usr/sbin/install
3337 # SunOS /usr/etc/install
3338 # IRIX /sbin/install
3339 # AIX /bin/install
3340 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3341 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3342 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3343 # ./install, which can be erroneously created by make from ./install.sh.
3344 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3345 echo "configure:3346: checking for a BSD compatible install" >&5
3346 if test -z "$INSTALL"; then
3347
3348   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3349   for ac_dir in $PATH; do
3350     # Account for people who put trailing slashes in PATH elements.
3351     case "$ac_dir/" in
3352     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3353     *)
3354       # OSF1 and SCO ODT 3.0 have their own names for install.
3355       # Don't use installbsd from OSF since it installs stuff as root
3356       # by default.
3357       for ac_prog in ginstall scoinst install; do
3358         if test -f $ac_dir/$ac_prog; then
3359           if test $ac_prog = install &&
3360             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3361             # AIX install.  It has an incompatible calling convention.
3362             :
3363           else
3364             ac_cv_path_install="$ac_dir/$ac_prog -c"
3365             break 2
3366           fi
3367         fi
3368       done
3369       ;;
3370     esac
3371   done
3372   IFS="$ac_save_IFS"
3373
3374   if test "${ac_cv_path_install+set}" = set; then
3375     INSTALL="$ac_cv_path_install"
3376   else
3377     # As a last resort, use the slow shell script.  We don't cache a
3378     # path for INSTALL within a source directory, because that will
3379     # break other packages using the cache if that directory is
3380     # removed, or if the path is relative.
3381     INSTALL="$ac_install_sh"
3382   fi
3383 fi
3384 echo "$ac_t""$INSTALL" 1>&6
3385
3386 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3387 # It thinks the first close brace ends the variable substitution.
3388 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3389
3390 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3391
3392 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3393
3394 for ac_prog in 'bison -y' byacc
3395 do
3396 # Extract the first word of "$ac_prog", so it can be a program name with args.
3397 set dummy $ac_prog; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400
3401 if test -n "$YACC"; then
3402   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3403 else
3404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3405   ac_dummy="$PATH"
3406   for ac_dir in $ac_dummy; do
3407     test -z "$ac_dir" && ac_dir=.
3408     if test -f $ac_dir/$ac_word; then
3409       ac_cv_prog_YACC="$ac_prog"
3410       break
3411     fi
3412   done
3413   IFS="$ac_save_ifs"
3414 fi
3415 YACC="$ac_cv_prog_YACC"
3416 if test -n "$YACC"; then
3417   echo "$ac_t""$YACC" 1>&6
3418 else
3419   echo "$ac_t""no" 1>&6
3420 fi
3421
3422 test -n "$YACC" && break
3423 done
3424 test -n "$YACC" || YACC="yacc"
3425
3426
3427 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h   utime.h 
3428 do
3429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3431 echo "configure:3432: checking for $ac_hdr" >&5
3432
3433 cat > conftest.$ac_ext <<EOF
3434 #line 3435 "configure"
3435 #include "confdefs.h"
3436 #include <$ac_hdr>
3437 EOF
3438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3439 { (eval echo configure:3440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3441 if test -z "$ac_err"; then
3442   rm -rf conftest*
3443   eval "ac_cv_header_$ac_safe=yes"
3444 else
3445   echo "$ac_err" >&5
3446   echo "configure: failed program was:" >&5
3447   cat conftest.$ac_ext >&5
3448   rm -rf conftest*
3449   eval "ac_cv_header_$ac_safe=no"
3450 fi
3451 rm -f conftest*
3452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3453   echo "$ac_t""yes" 1>&6
3454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3455   { test "$extra_verbose" = "yes" && cat << EOF
3456     Defining $ac_tr_hdr
3457 EOF
3458 cat >> confdefs.h <<EOF
3459 #define $ac_tr_hdr 1
3460 EOF
3461 }
3462  
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466 done
3467
3468 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3469 echo "configure:3470: checking for sys/wait.h that is POSIX.1 compatible" >&5
3470
3471 cat > conftest.$ac_ext <<EOF
3472 #line 3473 "configure"
3473 #include "confdefs.h"
3474 #include <sys/types.h>
3475 #include <sys/wait.h>
3476 #ifndef WEXITSTATUS
3477 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3478 #endif
3479 #ifndef WIFEXITED
3480 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3481 #endif
3482 int main() {
3483 int s;
3484 wait (&s);
3485 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3486 ; return 0; }
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3489   rm -rf conftest*
3490   ac_cv_header_sys_wait_h=yes
3491 else
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   ac_cv_header_sys_wait_h=no
3496 fi
3497 rm -f conftest*
3498
3499 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3500 if test $ac_cv_header_sys_wait_h = yes; then
3501   { test "$extra_verbose" = "yes" && cat << \EOF
3502     Defining HAVE_SYS_WAIT_H
3503 EOF
3504 cat >> confdefs.h <<\EOF
3505 #define HAVE_SYS_WAIT_H 1
3506 EOF
3507 }
3508
3509 fi
3510
3511 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3512 echo "configure:3513: checking for ANSI C header files" >&5
3513
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 #include <stdlib.h>
3518 #include <stdarg.h>
3519 #include <string.h>
3520 #include <float.h>
3521 EOF
3522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3523 { (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3525 if test -z "$ac_err"; then
3526   rm -rf conftest*
3527   ac_cv_header_stdc=yes
3528 else
3529   echo "$ac_err" >&5
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   ac_cv_header_stdc=no
3534 fi
3535 rm -f conftest*
3536
3537 if test $ac_cv_header_stdc = yes; then
3538   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <string.h>
3543 EOF
3544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3545   egrep "memchr" >/dev/null 2>&1; then
3546   :
3547 else
3548   rm -rf conftest*
3549   ac_cv_header_stdc=no
3550 fi
3551 rm -f conftest*
3552
3553 fi
3554
3555 if test $ac_cv_header_stdc = yes; then
3556   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 #include <stdlib.h>
3561 EOF
3562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3563   egrep "free" >/dev/null 2>&1; then
3564   :
3565 else
3566   rm -rf conftest*
3567   ac_cv_header_stdc=no
3568 fi
3569 rm -f conftest*
3570
3571 fi
3572
3573 if test $ac_cv_header_stdc = yes; then
3574   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #include <ctype.h>
3579 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3580 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3581 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3582 int main () { int i; for (i = 0; i < 256; i++)
3583 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3584 exit (0); }
3585
3586 EOF
3587 if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3588 then
3589   :
3590 else
3591   conftest_rc="$?"
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -fr conftest*
3595   ac_cv_header_stdc=no
3596 fi
3597 rm -fr conftest*
3598 fi
3599
3600 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3601 if test $ac_cv_header_stdc = yes; then
3602   { test "$extra_verbose" = "yes" && cat << \EOF
3603     Defining STDC_HEADERS
3604 EOF
3605 cat >> confdefs.h <<\EOF
3606 #define STDC_HEADERS 1
3607 EOF
3608 }
3609
3610 fi
3611
3612 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3613 echo "configure:3614: checking whether time.h and sys/time.h may both be included" >&5
3614
3615 cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618 #include <sys/types.h>
3619 #include <sys/time.h>
3620 #include <time.h>
3621 int main() {
3622 struct tm *tp;
3623 ; return 0; }
3624 EOF
3625 if { (eval echo configure:3626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3626   rm -rf conftest*
3627   ac_cv_header_time=yes
3628 else
3629   echo "configure: failed program was:" >&5
3630   cat conftest.$ac_ext >&5
3631   rm -rf conftest*
3632   ac_cv_header_time=no
3633 fi
3634 rm -f conftest*
3635
3636 echo "$ac_t""$ac_cv_header_time" 1>&6
3637 if test $ac_cv_header_time = yes; then
3638   { test "$extra_verbose" = "yes" && cat << \EOF
3639     Defining TIME_WITH_SYS_TIME
3640 EOF
3641 cat >> confdefs.h <<\EOF
3642 #define TIME_WITH_SYS_TIME 1
3643 EOF
3644 }
3645
3646 fi
3647
3648 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3649 echo "configure:3650: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3650
3651 cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <sys/types.h>
3655 #include <signal.h>
3656 /* NetBSD declares sys_siglist in unistd.h.  */
3657 #ifdef HAVE_UNISTD_H
3658 #include <unistd.h>
3659 #endif
3660 int main() {
3661 char *msg = *(sys_siglist + 1);
3662 ; return 0; }
3663 EOF
3664 if { (eval echo configure:3665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3665   rm -rf conftest*
3666   ac_cv_decl_sys_siglist=yes
3667 else
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -rf conftest*
3671   ac_cv_decl_sys_siglist=no
3672 fi
3673 rm -f conftest*
3674
3675 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3676 if test $ac_cv_decl_sys_siglist = yes; then
3677   { test "$extra_verbose" = "yes" && cat << \EOF
3678     Defining SYS_SIGLIST_DECLARED
3679 EOF
3680 cat >> confdefs.h <<\EOF
3681 #define SYS_SIGLIST_DECLARED 1
3682 EOF
3683 }
3684
3685 fi
3686
3687
3688 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3689 echo "configure:3690: checking for struct utimbuf" >&5
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 #ifdef TIME_WITH_SYS_TIME
3694 #include <sys/time.h>
3695 #include <time.h>
3696 #else
3697 #ifdef HAVE_SYS_TIME_H
3698 #include <sys/time.h>
3699 #else
3700 #include <time.h>
3701 #endif
3702 #endif
3703 #ifdef HAVE_UTIME_H
3704 #include <utime.h>
3705 #endif
3706 int main() {
3707 static struct utimbuf x; x.actime = x.modtime;
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3711   rm -rf conftest*
3712   echo "$ac_t""yes" 1>&6
3713    { test "$extra_verbose" = "yes" && cat << \EOF
3714     Defining HAVE_STRUCT_UTIMBUF
3715 EOF
3716 cat >> confdefs.h <<\EOF
3717 #define HAVE_STRUCT_UTIMBUF 1
3718 EOF
3719 }
3720
3721 else
3722   echo "configure: failed program was:" >&5
3723   cat conftest.$ac_ext >&5
3724   rm -rf conftest*
3725   echo "$ac_t""no" 1>&6
3726 fi
3727 rm -f conftest*
3728
3729 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3730 echo "configure:3731: checking return type of signal handlers" >&5
3731
3732 cat > conftest.$ac_ext <<EOF
3733 #line 3734 "configure"
3734 #include "confdefs.h"
3735 #include <sys/types.h>
3736 #include <signal.h>
3737 #ifdef signal
3738 #undef signal
3739 #endif
3740 #ifdef __cplusplus
3741 extern "C" void (*signal (int, void (*)(int)))(int);
3742 #else
3743 void (*signal ()) ();
3744 #endif
3745
3746 int main() {
3747 int i;
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_type_signal=void
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_type_signal=int
3758 fi
3759 rm -f conftest*
3760
3761 echo "$ac_t""$ac_cv_type_signal" 1>&6
3762 { test "$extra_verbose" = "yes" && cat << EOF
3763     Defining RETSIGTYPE = $ac_cv_type_signal
3764 EOF
3765 cat >> confdefs.h <<EOF
3766 #define RETSIGTYPE $ac_cv_type_signal
3767 EOF
3768 }
3769
3770
3771 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3772 echo "configure:3773: checking for size_t" >&5
3773
3774 cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 #include <sys/types.h>
3778 #if STDC_HEADERS
3779 #include <stdlib.h>
3780 #include <stddef.h>
3781 #endif
3782 EOF
3783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3784   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3785   rm -rf conftest*
3786   ac_cv_type_size_t=yes
3787 else
3788   rm -rf conftest*
3789   ac_cv_type_size_t=no
3790 fi
3791 rm -f conftest*
3792
3793 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3794 if test $ac_cv_type_size_t = no; then
3795   { test "$extra_verbose" = "yes" && cat << \EOF
3796     Defining size_t = unsigned
3797 EOF
3798 cat >> confdefs.h <<\EOF
3799 #define size_t unsigned
3800 EOF
3801 }
3802
3803 fi
3804
3805 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3806 echo "configure:3807: checking for pid_t" >&5
3807
3808 cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <sys/types.h>
3812 #if STDC_HEADERS
3813 #include <stdlib.h>
3814 #include <stddef.h>
3815 #endif
3816 EOF
3817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3818   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3819   rm -rf conftest*
3820   ac_cv_type_pid_t=yes
3821 else
3822   rm -rf conftest*
3823   ac_cv_type_pid_t=no
3824 fi
3825 rm -f conftest*
3826
3827 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3828 if test $ac_cv_type_pid_t = no; then
3829   { test "$extra_verbose" = "yes" && cat << \EOF
3830     Defining pid_t = int
3831 EOF
3832 cat >> confdefs.h <<\EOF
3833 #define pid_t int
3834 EOF
3835 }
3836
3837 fi
3838
3839 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3840 echo "configure:3841: checking for uid_t in sys/types.h" >&5
3841
3842 cat > conftest.$ac_ext <<EOF
3843 #line 3844 "configure"
3844 #include "confdefs.h"
3845 #include <sys/types.h>
3846 EOF
3847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3848   egrep "uid_t" >/dev/null 2>&1; then
3849   rm -rf conftest*
3850   ac_cv_type_uid_t=yes
3851 else
3852   rm -rf conftest*
3853   ac_cv_type_uid_t=no
3854 fi
3855 rm -f conftest*
3856
3857
3858 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3859 if test $ac_cv_type_uid_t = no; then
3860   { test "$extra_verbose" = "yes" && cat << \EOF
3861     Defining uid_t = int
3862 EOF
3863 cat >> confdefs.h <<\EOF
3864 #define uid_t int
3865 EOF
3866 }
3867
3868   { test "$extra_verbose" = "yes" && cat << \EOF
3869     Defining gid_t = int
3870 EOF
3871 cat >> confdefs.h <<\EOF
3872 #define gid_t int
3873 EOF
3874 }
3875
3876 fi
3877
3878 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3879 echo "configure:3880: checking for mode_t" >&5
3880
3881 cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <sys/types.h>
3885 #if STDC_HEADERS
3886 #include <stdlib.h>
3887 #include <stddef.h>
3888 #endif
3889 EOF
3890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3891   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3892   rm -rf conftest*
3893   ac_cv_type_mode_t=yes
3894 else
3895   rm -rf conftest*
3896   ac_cv_type_mode_t=no
3897 fi
3898 rm -f conftest*
3899
3900 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3901 if test $ac_cv_type_mode_t = no; then
3902   { test "$extra_verbose" = "yes" && cat << \EOF
3903     Defining mode_t = int
3904 EOF
3905 cat >> confdefs.h <<\EOF
3906 #define mode_t int
3907 EOF
3908 }
3909
3910 fi
3911
3912 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3913 echo "configure:3914: checking for off_t" >&5
3914
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 #include <sys/types.h>
3919 #if STDC_HEADERS
3920 #include <stdlib.h>
3921 #include <stddef.h>
3922 #endif
3923 EOF
3924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3925   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3926   rm -rf conftest*
3927   ac_cv_type_off_t=yes
3928 else
3929   rm -rf conftest*
3930   ac_cv_type_off_t=no
3931 fi
3932 rm -f conftest*
3933
3934 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3935 if test $ac_cv_type_off_t = no; then
3936   { test "$extra_verbose" = "yes" && cat << \EOF
3937     Defining off_t = long
3938 EOF
3939 cat >> confdefs.h <<\EOF
3940 #define off_t long
3941 EOF
3942 }
3943
3944 fi
3945
3946 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3947 echo "configure:3948: checking for ssize_t" >&5
3948
3949 cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <sys/types.h>
3953 #if STDC_HEADERS
3954 #include <stdlib.h>
3955 #include <stddef.h>
3956 #endif
3957 EOF
3958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3959   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3960   rm -rf conftest*
3961   ac_cv_type_ssize_t=yes
3962 else
3963   rm -rf conftest*
3964   ac_cv_type_ssize_t=no
3965 fi
3966 rm -f conftest*
3967
3968 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3969 if test $ac_cv_type_ssize_t = no; then
3970   { test "$extra_verbose" = "yes" && cat << \EOF
3971     Defining ssize_t = int
3972 EOF
3973 cat >> confdefs.h <<\EOF
3974 #define ssize_t int
3975 EOF
3976 }
3977
3978 fi
3979
3980
3981 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3982 echo "configure:3983: checking for socklen_t" >&5
3983 cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 #include <sys/socket.h>
3987 socklen_t x;
3988
3989 int main() {
3990
3991 ; return 0; }
3992 EOF
3993 if { (eval echo configure:3994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3994   rm -rf conftest*
3995   echo "$ac_t""yes" 1>&6
3996 else
3997   echo "configure: failed program was:" >&5
3998   cat conftest.$ac_ext >&5
3999   rm -rf conftest*
4000   
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <sys/socket.h>
4005 int accept (int, struct sockaddr *, size_t *);
4006
4007 int main() {
4008
4009 ; return 0; }
4010 EOF
4011 if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4012   rm -rf conftest*
4013   
4014 echo "$ac_t""size_t" 1>&6
4015 { test "$extra_verbose" = "yes" && cat << \EOF
4016     Defining socklen_t = size_t
4017 EOF
4018 cat >> confdefs.h <<\EOF
4019 #define socklen_t size_t
4020 EOF
4021 }
4022
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -rf conftest*
4027   
4028 echo "$ac_t""int" 1>&6
4029 { test "$extra_verbose" = "yes" && cat << \EOF
4030     Defining socklen_t = int
4031 EOF
4032 cat >> confdefs.h <<\EOF
4033 #define socklen_t int
4034 EOF
4035 }
4036
4037 fi
4038 rm -f conftest*
4039 fi
4040 rm -f conftest*
4041
4042 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4043 echo "configure:4044: checking for struct timeval" >&5
4044 cat > conftest.$ac_ext <<EOF
4045 #line 4046 "configure"
4046 #include "confdefs.h"
4047 #ifdef TIME_WITH_SYS_TIME
4048 #include <sys/time.h>
4049 #include <time.h>
4050 #else
4051 #ifdef HAVE_SYS_TIME_H
4052 #include <sys/time.h>
4053 #else
4054 #include <time.h>
4055 #endif
4056 #endif
4057 int main() {
4058 static struct timeval x; x.tv_sec = x.tv_usec;
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062   rm -rf conftest*
4063   echo "$ac_t""yes" 1>&6
4064   HAVE_TIMEVAL=yes
4065   { test "$extra_verbose" = "yes" && cat << \EOF
4066     Defining HAVE_TIMEVAL
4067 EOF
4068 cat >> confdefs.h <<\EOF
4069 #define HAVE_TIMEVAL 1
4070 EOF
4071 }
4072
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -rf conftest*
4077   echo "$ac_t""no" 1>&6
4078    HAVE_TIMEVAL=no
4079 fi
4080 rm -f conftest*
4081
4082 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4083 echo "configure:4084: checking whether struct tm is in sys/time.h or time.h" >&5
4084
4085 cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <sys/types.h>
4089 #include <time.h>
4090 int main() {
4091 struct tm *tp; tp->tm_sec;
4092 ; return 0; }
4093 EOF
4094 if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4095   rm -rf conftest*
4096   ac_cv_struct_tm=time.h
4097 else
4098   echo "configure: failed program was:" >&5
4099   cat conftest.$ac_ext >&5
4100   rm -rf conftest*
4101   ac_cv_struct_tm=sys/time.h
4102 fi
4103 rm -f conftest*
4104
4105 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4106 if test $ac_cv_struct_tm = sys/time.h; then
4107   { test "$extra_verbose" = "yes" && cat << \EOF
4108     Defining TM_IN_SYS_TIME
4109 EOF
4110 cat >> confdefs.h <<\EOF
4111 #define TM_IN_SYS_TIME 1
4112 EOF
4113 }
4114
4115 fi
4116
4117 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4118 echo "configure:4119: checking for tm_zone in struct tm" >&5
4119
4120 cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <sys/types.h>
4124 #include <$ac_cv_struct_tm>
4125 int main() {
4126 struct tm tm; tm.tm_zone;
4127 ; return 0; }
4128 EOF
4129 if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4130   rm -rf conftest*
4131   ac_cv_struct_tm_zone=yes
4132 else
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -rf conftest*
4136   ac_cv_struct_tm_zone=no
4137 fi
4138 rm -f conftest*
4139
4140 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4141 if test "$ac_cv_struct_tm_zone" = yes; then
4142   { test "$extra_verbose" = "yes" && cat << \EOF
4143     Defining HAVE_TM_ZONE
4144 EOF
4145 cat >> confdefs.h <<\EOF
4146 #define HAVE_TM_ZONE 1
4147 EOF
4148 }
4149
4150 else
4151   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4152 echo "configure:4153: checking for tzname" >&5
4153
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 #include <time.h>
4158 #ifndef tzname /* For SGI.  */
4159 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4160 #endif
4161 int main() {
4162 atoi(*tzname);
4163 ; return 0; }
4164 EOF
4165 if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4166   rm -rf conftest*
4167   ac_cv_var_tzname=yes
4168 else
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -rf conftest*
4172   ac_cv_var_tzname=no
4173 fi
4174 rm -f conftest*
4175
4176 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4177   if test $ac_cv_var_tzname = yes; then
4178     { test "$extra_verbose" = "yes" && cat << \EOF
4179     Defining HAVE_TZNAME
4180 EOF
4181 cat >> confdefs.h <<\EOF
4182 #define HAVE_TZNAME 1
4183 EOF
4184 }
4185
4186   fi
4187 fi
4188
4189
4190 echo $ac_n "checking for working const""... $ac_c" 1>&6
4191 echo "configure:4192: checking for working const" >&5
4192
4193 cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196
4197 int main() {
4198
4199 /* Ultrix mips cc rejects this.  */
4200 typedef int charset[2]; const charset x;
4201 /* SunOS 4.1.1 cc rejects this.  */
4202 char const *const *ccp;
4203 char **p;
4204 /* NEC SVR4.0.2 mips cc rejects this.  */
4205 struct point {int x, y;};
4206 static struct point const zero = {0,0};
4207 /* AIX XL C 1.02.0.0 rejects this.
4208    It does not let you subtract one const X* pointer from another in an arm
4209    of an if-expression whose if-part is not a constant expression */
4210 const char *g = "string";
4211 ccp = &g + (g ? g-g : 0);
4212 /* HPUX 7.0 cc rejects these. */
4213 ++ccp;
4214 p = (char**) ccp;
4215 ccp = (char const *const *) p;
4216 { /* SCO 3.2v4 cc rejects this.  */
4217   char *t;
4218   char const *s = 0 ? (char *) 0 : (char const *) 0;
4219
4220   *t++ = 0;
4221 }
4222 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4223   int x[] = {25, 17};
4224   const int *foo = &x[0];
4225   ++foo;
4226 }
4227 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4228   typedef const int *iptr;
4229   iptr p = 0;
4230   ++p;
4231 }
4232 { /* AIX XL C 1.02.0.0 rejects this saying
4233      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4234   struct s { int j; const int *ap[3]; };
4235   struct s *b; b->j = 5;
4236 }
4237 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4238   const int foo = 10;
4239 }
4240
4241 ; return 0; }
4242 EOF
4243 if { (eval echo configure:4244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4244   rm -rf conftest*
4245   ac_cv_c_const=yes
4246 else
4247   echo "configure: failed program was:" >&5
4248   cat conftest.$ac_ext >&5
4249   rm -rf conftest*
4250   ac_cv_c_const=no
4251 fi
4252 rm -f conftest*
4253
4254 echo "$ac_t""$ac_cv_c_const" 1>&6
4255 if test $ac_cv_c_const = no; then
4256   { test "$extra_verbose" = "yes" && cat << \EOF
4257     Defining const = 
4258 EOF
4259 cat >> confdefs.h <<\EOF
4260 #define const 
4261 EOF
4262 }
4263
4264 fi
4265
4266
4267 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4268 echo "configure:4269: checking whether ${MAKE-make} sets \${MAKE}" >&5
4269 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4270
4271 cat > conftestmake <<\EOF
4272 all:
4273         @echo 'ac_maketemp="${MAKE}"'
4274 EOF
4275 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4276 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4277 if test -n "$ac_maketemp"; then
4278   eval ac_cv_prog_make_${ac_make}_set=yes
4279 else
4280   eval ac_cv_prog_make_${ac_make}_set=no
4281 fi
4282 rm -f conftestmake
4283 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4284   echo "$ac_t""yes" 1>&6
4285   SET_MAKE=
4286 else
4287   echo "$ac_t""no" 1>&6
4288   SET_MAKE="MAKE=${MAKE-make}"
4289 fi
4290
4291
4292 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4293 echo "configure:4294: checking whether byte ordering is bigendian" >&5
4294
4295 ac_cv_c_bigendian=unknown
4296 # See if sys/param.h defines the BYTE_ORDER macro.
4297 cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 #include <sys/types.h>
4301 #include <sys/param.h>
4302 int main() {
4303
4304 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4305  bogus endian macros
4306 #endif
4307 ; return 0; }
4308 EOF
4309 if { (eval echo configure:4310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4310   rm -rf conftest*
4311   # It does; now see whether it defined to BIG_ENDIAN or not.
4312 cat > conftest.$ac_ext <<EOF
4313 #line 4314 "configure"
4314 #include "confdefs.h"
4315 #include <sys/types.h>
4316 #include <sys/param.h>
4317 int main() {
4318
4319 #if BYTE_ORDER != BIG_ENDIAN
4320  not big endian
4321 #endif
4322 ; return 0; }
4323 EOF
4324 if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4325   rm -rf conftest*
4326   ac_cv_c_bigendian=yes
4327 else
4328   echo "configure: failed program was:" >&5
4329   cat conftest.$ac_ext >&5
4330   rm -rf conftest*
4331   ac_cv_c_bigendian=no
4332 fi
4333 rm -f conftest*
4334 else
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337 fi
4338 rm -f conftest*
4339 if test $ac_cv_c_bigendian = unknown; then
4340 cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 main () {
4344   /* Are we little or big endian?  From Harbison&Steele.  */
4345   union
4346   {
4347     long l;
4348     char c[sizeof (long)];
4349   } u;
4350   u.l = 1;
4351   exit (u.c[sizeof (long) - 1] == 1);
4352 }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4355 then
4356   ac_cv_c_bigendian=no
4357 else
4358   conftest_rc="$?"
4359   echo "configure: failed program was:" >&5
4360   cat conftest.$ac_ext >&5
4361   rm -fr conftest*
4362   ac_cv_c_bigendian=yes
4363 fi
4364 rm -fr conftest*
4365 fi
4366
4367 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4368 if test $ac_cv_c_bigendian = yes; then
4369   { test "$extra_verbose" = "yes" && cat << \EOF
4370     Defining WORDS_BIGENDIAN
4371 EOF
4372 cat >> confdefs.h <<\EOF
4373 #define WORDS_BIGENDIAN 1
4374 EOF
4375 }
4376
4377 fi
4378
4379
4380 echo $ac_n "checking size of short""... $ac_c" 1>&6
4381 echo "configure:4382: checking size of short" >&5
4382
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <stdio.h>
4387 main()
4388 {
4389   FILE *f=fopen("conftestval", "w");
4390   if (!f) exit(1);
4391   fprintf(f, "%d\n", sizeof(short));
4392   exit(0);
4393 }
4394 EOF
4395 if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4396 then
4397   ac_cv_sizeof_short=`cat conftestval`
4398 else
4399   conftest_rc="$?"
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -fr conftest*
4403   ac_cv_sizeof_short=0
4404 fi
4405 rm -fr conftest*
4406 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4407 { test "$extra_verbose" = "yes" && cat << EOF
4408     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4409 EOF
4410 cat >> confdefs.h <<EOF
4411 #define SIZEOF_SHORT $ac_cv_sizeof_short
4412 EOF
4413 }
4414
4415
4416 if test "$ac_cv_sizeof_short" = 0; then
4417   echo ""
4418   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4419   echo "*** PANIC *** Please examine config.log for compilation errors."
4420   exit 1
4421 fi
4422 echo $ac_n "checking size of int""... $ac_c" 1>&6
4423 echo "configure:4424: checking size of int" >&5
4424
4425 cat > conftest.$ac_ext <<EOF
4426 #line 4427 "configure"
4427 #include "confdefs.h"
4428 #include <stdio.h>
4429 main()
4430 {
4431   FILE *f=fopen("conftestval", "w");
4432   if (!f) exit(1);
4433   fprintf(f, "%d\n", sizeof(int));
4434   exit(0);
4435 }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4438 then
4439   ac_cv_sizeof_int=`cat conftestval`
4440 else
4441   conftest_rc="$?"
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -fr conftest*
4445   ac_cv_sizeof_int=0
4446 fi
4447 rm -fr conftest*
4448 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4449 { test "$extra_verbose" = "yes" && cat << EOF
4450     Defining SIZEOF_INT = $ac_cv_sizeof_int
4451 EOF
4452 cat >> confdefs.h <<EOF
4453 #define SIZEOF_INT $ac_cv_sizeof_int
4454 EOF
4455 }
4456
4457
4458 echo $ac_n "checking size of long""... $ac_c" 1>&6
4459 echo "configure:4460: checking size of long" >&5
4460
4461 cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <stdio.h>
4465 main()
4466 {
4467   FILE *f=fopen("conftestval", "w");
4468   if (!f) exit(1);
4469   fprintf(f, "%d\n", sizeof(long));
4470   exit(0);
4471 }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4474 then
4475   ac_cv_sizeof_long=`cat conftestval`
4476 else
4477   conftest_rc="$?"
4478   echo "configure: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   rm -fr conftest*
4481   ac_cv_sizeof_long=0
4482 fi
4483 rm -fr conftest*
4484 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4485 { test "$extra_verbose" = "yes" && cat << EOF
4486     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4487 EOF
4488 cat >> confdefs.h <<EOF
4489 #define SIZEOF_LONG $ac_cv_sizeof_long
4490 EOF
4491 }
4492
4493
4494 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4495 echo "configure:4496: checking size of long long" >&5
4496
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 #include <stdio.h>
4501 main()
4502 {
4503   FILE *f=fopen("conftestval", "w");
4504   if (!f) exit(1);
4505   fprintf(f, "%d\n", sizeof(long long));
4506   exit(0);
4507 }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4510 then
4511   ac_cv_sizeof_long_long=`cat conftestval`
4512 else
4513   conftest_rc="$?"
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -fr conftest*
4517   ac_cv_sizeof_long_long=0
4518 fi
4519 rm -fr conftest*
4520 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4521 { test "$extra_verbose" = "yes" && cat << EOF
4522     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4523 EOF
4524 cat >> confdefs.h <<EOF
4525 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4526 EOF
4527 }
4528
4529
4530 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4531 echo "configure:4532: checking size of void *" >&5
4532
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536 #include <stdio.h>
4537 main()
4538 {
4539   FILE *f=fopen("conftestval", "w");
4540   if (!f) exit(1);
4541   fprintf(f, "%d\n", sizeof(void *));
4542   exit(0);
4543 }
4544 EOF
4545 if { (eval echo configure:4546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4546 then
4547   ac_cv_sizeof_void_p=`cat conftestval`
4548 else
4549   conftest_rc="$?"
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -fr conftest*
4553   ac_cv_sizeof_void_p=0
4554 fi
4555 rm -fr conftest*
4556 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4557 { test "$extra_verbose" = "yes" && cat << EOF
4558     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4559 EOF
4560 cat >> confdefs.h <<EOF
4561 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4562 EOF
4563 }
4564
4565
4566
4567 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4568 echo "configure:4569: checking for long file names" >&5
4569
4570 ac_cv_sys_long_file_names=yes
4571 # Test for long file names in all the places we know might matter:
4572 #      .                the current directory, where building will happen
4573 #      $prefix/lib      where we will be installing things
4574 #      $exec_prefix/lib likewise
4575 # eval it to expand exec_prefix.
4576 #      $TMPDIR          if set, where it might want to write temporary files
4577 # if $TMPDIR is not set:
4578 #      /tmp             where it might want to write temporary files
4579 #      /var/tmp         likewise
4580 #      /usr/tmp         likewise
4581 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4582   ac_tmpdirs="$TMPDIR"
4583 else
4584   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4585 fi
4586 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4587   test -d $ac_dir || continue
4588   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4589   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4590   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4591   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4592   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4593     ac_cv_sys_long_file_names=no
4594     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4595     break
4596   fi
4597   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4598 done
4599
4600 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4601 if test $ac_cv_sys_long_file_names = yes; then
4602   { test "$extra_verbose" = "yes" && cat << \EOF
4603     Defining HAVE_LONG_FILE_NAMES
4604 EOF
4605 cat >> confdefs.h <<\EOF
4606 #define HAVE_LONG_FILE_NAMES 1
4607 EOF
4608 }
4609
4610 fi
4611
4612
4613 echo $ac_n "checking for sin""... $ac_c" 1>&6
4614 echo "configure:4615: checking for sin" >&5
4615
4616 cat > conftest.$ac_ext <<EOF
4617 #line 4618 "configure"
4618 #include "confdefs.h"
4619 /* System header to define __stub macros and hopefully few prototypes,
4620     which can conflict with char sin(); below.  */
4621 #include <assert.h>
4622 /* Override any gcc2 internal prototype to avoid an error.  */
4623 /* We use char because int might match the return type of a gcc2
4624     builtin and then its argument prototype would still apply.  */
4625 char sin();
4626
4627 int main() {
4628
4629 /* The GNU C library defines this for functions which it implements
4630     to always fail with ENOSYS.  Some functions are actually named
4631     something starting with __ and the normal name is an alias.  */
4632 #if defined (__stub_sin) || defined (__stub___sin)
4633 choke me
4634 #else
4635 sin();
4636 #endif
4637
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_func_sin=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_func_sin=no"
4648 fi
4649 rm -f conftest*
4650
4651 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653   :
4654 else
4655   echo "$ac_t""no" 1>&6
4656
4657 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4658 echo "configure:4659: checking for sin in -lm" >&5
4659 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4660
4661 xe_check_libs=" -lm "
4662 cat > conftest.$ac_ext <<EOF
4663 #line 4664 "configure"
4664 #include "confdefs.h"
4665 /* Override any gcc2 internal prototype to avoid an error.  */
4666 /* We use char because int might match the return type of a gcc2
4667     builtin and then its argument prototype would still apply.  */
4668 char sin();
4669
4670 int main() {
4671 sin()
4672 ; return 0; }
4673 EOF
4674 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4675   rm -rf conftest*
4676   eval "ac_cv_lib_$ac_lib_var=yes"
4677 else
4678   echo "configure: failed program was:" >&5
4679   cat conftest.$ac_ext >&5
4680   rm -rf conftest*
4681   eval "ac_cv_lib_$ac_lib_var=no"
4682 fi
4683 rm -f conftest*
4684 xe_check_libs=""
4685
4686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4687   echo "$ac_t""yes" 1>&6
4688     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4689     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4690   { test "$extra_verbose" = "yes" && cat << EOF
4691     Defining $ac_tr_lib
4692 EOF
4693 cat >> confdefs.h <<EOF
4694 #define $ac_tr_lib 1
4695 EOF
4696 }
4697
4698   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4699
4700 else
4701   echo "$ac_t""no" 1>&6
4702 fi
4703
4704
4705 fi
4706
4707
4708 { test "$extra_verbose" = "yes" && cat << \EOF
4709     Defining LISP_FLOAT_TYPE
4710 EOF
4711 cat >> confdefs.h <<\EOF
4712 #define LISP_FLOAT_TYPE 1
4713 EOF
4714 }
4715
4716
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <math.h>
4721 int main() {
4722 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4723 ; return 0; }
4724 EOF
4725 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726   rm -rf conftest*
4727   { test "$extra_verbose" = "yes" && cat << \EOF
4728     Defining HAVE_INVERSE_HYPERBOLIC
4729 EOF
4730 cat >> confdefs.h <<\EOF
4731 #define HAVE_INVERSE_HYPERBOLIC 1
4732 EOF
4733 }
4734
4735 else
4736   echo "configure: failed program was:" >&5
4737   cat conftest.$ac_ext >&5
4738 fi
4739 rm -f conftest*
4740
4741 echo "checking type of mail spool file locking" 1>&6
4742 echo "configure:4743: checking type of mail spool file locking" >&5
4743 for ac_func in lockf flock
4744 do
4745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4746 echo "configure:4747: checking for $ac_func" >&5
4747
4748 cat > conftest.$ac_ext <<EOF
4749 #line 4750 "configure"
4750 #include "confdefs.h"
4751 /* System header to define __stub macros and hopefully few prototypes,
4752     which can conflict with char $ac_func(); below.  */
4753 #include <assert.h>
4754 /* Override any gcc2 internal prototype to avoid an error.  */
4755 /* We use char because int might match the return type of a gcc2
4756     builtin and then its argument prototype would still apply.  */
4757 char $ac_func();
4758
4759 int main() {
4760
4761 /* The GNU C library defines this for functions which it implements
4762     to always fail with ENOSYS.  Some functions are actually named
4763     something starting with __ and the normal name is an alias.  */
4764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4765 choke me
4766 #else
4767 $ac_func();
4768 #endif
4769
4770 ; return 0; }
4771 EOF
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773   rm -rf conftest*
4774   eval "ac_cv_func_$ac_func=yes"
4775 else
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   eval "ac_cv_func_$ac_func=no"
4780 fi
4781 rm -f conftest*
4782
4783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4786   { test "$extra_verbose" = "yes" && cat << EOF
4787     Defining $ac_tr_func
4788 EOF
4789 cat >> confdefs.h <<EOF
4790 #define $ac_tr_func 1
4791 EOF
4792 }
4793  
4794 else
4795   echo "$ac_t""no" 1>&6
4796 fi
4797 done
4798
4799 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4800 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4801 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4802 if   test -z "$mail_locking"; then
4803   case "$opsys" in cygwin* | mingw*)
4804     mail_locking=pop ;;
4805   esac
4806 fi
4807
4808 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4809     Defining MAIL_LOCK_LOCKF
4810 EOF
4811 cat >> confdefs.h <<\EOF
4812 #define MAIL_LOCK_LOCKF 1
4813 EOF
4814 }
4815
4816 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4817     Defining MAIL_LOCK_FLOCK
4818 EOF
4819 cat >> confdefs.h <<\EOF
4820 #define MAIL_LOCK_FLOCK 1
4821 EOF
4822 }
4823
4824 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4825     Defining MAIL_LOCK_LOCKING
4826 EOF
4827 cat >> confdefs.h <<\EOF
4828 #define MAIL_LOCK_LOCKING 1
4829 EOF
4830 }
4831
4832 elif test "$mail_locking" = "pop"; then
4833   with_pop=yes
4834   mail_locking=
4835 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4836     Defining MAIL_LOCK_DOT
4837 EOF
4838 cat >> confdefs.h <<\EOF
4839 #define MAIL_LOCK_DOT 1
4840 EOF
4841 }
4842
4843 fi
4844 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4845   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4846 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4847   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4848 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4849   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4850
4851 case "$opsys" in decosf*)
4852   
4853 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4854 echo "configure:4855: checking for cma_open in -lpthreads" >&5
4855 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4856
4857 xe_check_libs=" -lpthreads "
4858 cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861 /* Override any gcc2 internal prototype to avoid an error.  */
4862 /* We use char because int might match the return type of a gcc2
4863     builtin and then its argument prototype would still apply.  */
4864 char cma_open();
4865
4866 int main() {
4867 cma_open()
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4871   rm -rf conftest*
4872   eval "ac_cv_lib_$ac_lib_var=yes"
4873 else
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -rf conftest*
4877   eval "ac_cv_lib_$ac_lib_var=no"
4878 fi
4879 rm -f conftest*
4880 xe_check_libs=""
4881
4882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4883   echo "$ac_t""yes" 1>&6
4884     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4885     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4886   { test "$extra_verbose" = "yes" && cat << EOF
4887     Defining $ac_tr_lib
4888 EOF
4889 cat >> confdefs.h <<EOF
4890 #define $ac_tr_lib 1
4891 EOF
4892 }
4893
4894   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4895
4896 else
4897   echo "$ac_t""no" 1>&6
4898 fi
4899
4900
4901   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4902     c_switch_site="$c_switch_site -threads" ;;
4903 esac
4904
4905 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4906 echo "configure:4907: checking whether the -xildoff compiler flag is required" >&5
4907 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4908   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4909     then echo "$ac_t""no" 1>&6;
4910     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
4911   fi
4912   else echo "$ac_t""no" 1>&6
4913 fi
4914
4915 if test "$opsys" = "sol2"; then
4916   if test "$os_release" -ge 56; then
4917     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4918 echo "configure:4919: checking for \"-z ignore\" linker flag" >&5
4919     case "`ld -h 2>&1`" in
4920       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4921         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4922       *) echo "$ac_t""no" 1>&6 ;;
4923     esac
4924   fi
4925 fi
4926
4927
4928 echo "checking "for specified window system"" 1>&6
4929 echo "configure:4930: checking "for specified window system"" >&5
4930
4931 if test "$with_x11" != "no"; then
4932     test "$x_includes $x_libraries" != "NONE NONE" && \
4933    window_system=x11 with_x11=yes
4934
4935         
4936       if test "$x_includes $x_libraries" = "NONE NONE" \
4937     -a -n "$OPENWINHOME" \
4938     -a "$OPENWINHOME" != "/usr/openwin" \
4939     -a -d "$OPENWINHOME"; then
4940       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4941       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4942       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4943   fi
4944
4945   if test "$x_includes" = "NONE"; then
4946                     for dir in "/usr/X11" "/usr/X11R6"; do
4947       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4948     done
4949   fi
4950
4951   if test "$x_libraries" = "NONE"; then
4952     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4953       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4954     done
4955   fi
4956
4957   # If we find X, set shell vars x_includes and x_libraries to the
4958 # paths, otherwise set no_x=yes.
4959 # Uses ac_ vars as temps to allow command line to override cache and checks.
4960 # --without-x overrides everything else, but does not touch the cache.
4961 echo $ac_n "checking for X""... $ac_c" 1>&6
4962 echo "configure:4963: checking for X" >&5
4963
4964 # Check whether --with-x or --without-x was given.
4965 if test "${with_x+set}" = set; then
4966   withval="$with_x"
4967   :
4968 fi
4969
4970 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4971 if test "x$with_x" = xno; then
4972   # The user explicitly disabled X.
4973   have_x=disabled
4974 else
4975   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4976     # Both variables are already set.
4977     have_x=yes
4978   else
4979
4980 # One or both of the vars are not set, and there is no cached value.
4981 ac_x_includes=NO ac_x_libraries=NO
4982 rm -fr conftestdir
4983 if mkdir conftestdir; then
4984   cd conftestdir
4985   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4986   cat > Imakefile <<'EOF'
4987 acfindx:
4988         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4989 EOF
4990   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4991     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4992     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4993     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4994     for ac_extension in a so sl; do
4995       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4996         test -f $ac_im_libdir/libX11.$ac_extension; then
4997         ac_im_usrlibdir=$ac_im_libdir; break
4998       fi
4999     done
5000     # Screen out bogus values from the imake configuration.  They are
5001     # bogus both because they are the default anyway, and because
5002     # using them would break gcc on systems where it needs fixed includes.
5003     case "$ac_im_incroot" in
5004         /usr/include) ;;
5005         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5006     esac
5007     case "$ac_im_usrlibdir" in
5008         /usr/lib | /lib) ;;
5009         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5010     esac
5011   fi
5012   cd ..
5013   rm -fr conftestdir
5014 fi
5015
5016 if test "$ac_x_includes" = NO; then
5017   # Guess where to find include files, by looking for this one X11 .h file.
5018   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5019
5020   # First, try using that file with no special directory specified.
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 #include <$x_direct_test_include>
5025 EOF
5026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5027 { (eval echo configure:5028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5029 if test -z "$ac_err"; then
5030   rm -rf conftest*
5031   # We can compile using X headers with no special include directory.
5032 ac_x_includes=
5033 else
5034   echo "$ac_err" >&5
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   # Look for the header file in a standard set of common directories.
5039 # Check X11 before X11Rn because it is often a symlink to the current release.
5040   for ac_dir in               \
5041     /usr/X11/include          \
5042     /usr/X11R6/include        \
5043     /usr/X11R5/include        \
5044     /usr/X11R4/include        \
5045                               \
5046     /usr/include/X11          \
5047     /usr/include/X11R6        \
5048     /usr/include/X11R5        \
5049     /usr/include/X11R4        \
5050                               \
5051     /usr/local/X11/include    \
5052     /usr/local/X11R6/include  \
5053     /usr/local/X11R5/include  \
5054     /usr/local/X11R4/include  \
5055                               \
5056     /usr/local/include/X11    \
5057     /usr/local/include/X11R6  \
5058     /usr/local/include/X11R5  \
5059     /usr/local/include/X11R4  \
5060                               \
5061     /usr/X386/include         \
5062     /usr/x386/include         \
5063     /usr/XFree86/include/X11  \
5064                               \
5065     /usr/include              \
5066     /usr/local/include        \
5067     /usr/unsupported/include  \
5068     /usr/athena/include       \
5069     /usr/local/x11r5/include  \
5070     /usr/lpp/Xamples/include  \
5071                               \
5072     /usr/openwin/include      \
5073     /usr/openwin/share/include \
5074     ; \
5075   do
5076     if test -r "$ac_dir/$x_direct_test_include"; then
5077       ac_x_includes=$ac_dir
5078       break
5079     fi
5080   done
5081 fi
5082 rm -f conftest*
5083 fi # $ac_x_includes = NO
5084
5085 if test "$ac_x_libraries" = NO; then
5086   # Check for the libraries.
5087
5088   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5089   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5090
5091   # See if we find them without any special options.
5092   # Don't add to $LIBS permanently.
5093   ac_save_LIBS="$LIBS"
5094   LIBS="-l$x_direct_test_library $LIBS"
5095 cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098
5099 int main() {
5100 ${x_direct_test_function}()
5101 ; return 0; }
5102 EOF
5103 if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5104   rm -rf conftest*
5105   LIBS="$ac_save_LIBS"
5106 # We can link X programs with no special library path.
5107 ac_x_libraries=
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   LIBS="$ac_save_LIBS"
5113 # First see if replacing the include by lib works.
5114 # Check X11 before X11Rn because it is often a symlink to the current release.
5115 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5116     /usr/X11/lib          \
5117     /usr/X11R6/lib        \
5118     /usr/X11R5/lib        \
5119     /usr/X11R4/lib        \
5120                           \
5121     /usr/lib/X11          \
5122     /usr/lib/X11R6        \
5123     /usr/lib/X11R5        \
5124     /usr/lib/X11R4        \
5125                           \
5126     /usr/local/X11/lib    \
5127     /usr/local/X11R6/lib  \
5128     /usr/local/X11R5/lib  \
5129     /usr/local/X11R4/lib  \
5130                           \
5131     /usr/local/lib/X11    \
5132     /usr/local/lib/X11R6  \
5133     /usr/local/lib/X11R5  \
5134     /usr/local/lib/X11R4  \
5135                           \
5136     /usr/X386/lib         \
5137     /usr/x386/lib         \
5138     /usr/XFree86/lib/X11  \
5139                           \
5140     /usr/lib              \
5141     /usr/local/lib        \
5142     /usr/unsupported/lib  \
5143     /usr/athena/lib       \
5144     /usr/local/x11r5/lib  \
5145     /usr/lpp/Xamples/lib  \
5146     /lib/usr/lib/X11      \
5147                           \
5148     /usr/openwin/lib      \
5149     /usr/openwin/share/lib \
5150     ; \
5151 do
5152   for ac_extension in a so sl; do
5153     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5154       ac_x_libraries=$ac_dir
5155       break 2
5156     fi
5157   done
5158 done
5159 fi
5160 rm -f conftest*
5161 fi # $ac_x_libraries = NO
5162
5163 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5164   # Didn't find X anywhere.  Cache the known absence of X.
5165   ac_cv_have_x="have_x=no"
5166 else
5167   # Record where we found X for the cache.
5168   ac_cv_have_x="have_x=yes \
5169                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5170 fi
5171   fi
5172   eval "$ac_cv_have_x"
5173 fi # $with_x != no
5174
5175 if test "$have_x" != yes; then
5176   echo "$ac_t""$have_x" 1>&6
5177   no_x=yes
5178 else
5179   # If each of the values was on the command line, it overrides each guess.
5180   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5181   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5182   # Update the cache value to reflect the command line values.
5183   ac_cv_have_x="have_x=yes \
5184                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5185   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5186 fi
5187
5188 if test "$no_x" = yes; then
5189   # Not all programs may use this symbol, but it does not hurt to define it.
5190   { test "$extra_verbose" = "yes" && cat << \EOF
5191     Defining X_DISPLAY_MISSING
5192 EOF
5193 cat >> confdefs.h <<\EOF
5194 #define X_DISPLAY_MISSING 1
5195 EOF
5196 }
5197
5198   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5199 else
5200   if test -n "$x_includes"; then
5201     X_CFLAGS="$X_CFLAGS -I$x_includes"
5202   fi
5203
5204   # It would also be nice to do this for all -L options, not just this one.
5205   if test -n "$x_libraries"; then
5206     X_LIBS="$X_LIBS -L$x_libraries"
5207     # For Solaris; some versions of Sun CC require a space after -R and
5208     # others require no space.  Words are not sufficient . . . .
5209     case "`(uname -sr) 2>/dev/null`" in
5210     "SunOS 5"*)
5211       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5212 echo "configure:5213: checking whether -R must be followed by a space" >&5
5213       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5214       cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217
5218 int main() {
5219
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   ac_R_nospace=yes
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   ac_R_nospace=no
5230 fi
5231 rm -f conftest*
5232       if test $ac_R_nospace = yes; then
5233         echo "$ac_t""no" 1>&6
5234         X_LIBS="$X_LIBS -R$x_libraries"
5235       else
5236         LIBS="$ac_xsave_LIBS -R $x_libraries"
5237         cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240
5241 int main() {
5242
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   ac_R_space=yes
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   ac_R_space=no
5253 fi
5254 rm -f conftest*
5255         if test $ac_R_space = yes; then
5256           echo "$ac_t""yes" 1>&6
5257           X_LIBS="$X_LIBS -R $x_libraries"
5258         else
5259           echo "$ac_t""neither works" 1>&6
5260         fi
5261       fi
5262       LIBS="$ac_xsave_LIBS"
5263     esac
5264   fi
5265
5266   # Check for system-dependent libraries X programs must link with.
5267   # Do this before checking for the system-independent R6 libraries
5268   # (-lICE), since we may need -lsocket or whatever for X linking.
5269
5270   if test "$ISC" = yes; then
5271     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5272   else
5273     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5274     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5275     # the Alpha needs dnet_stub (dnet does not exist).
5276     if test "$with_dnet" = "no" ; then
5277 ac_cv_lib_dnet_dnet_ntoa=no
5278 else
5279
5280 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5281 echo "configure:5282: checking for dnet_ntoa in -ldnet" >&5
5282 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5283
5284 xe_check_libs=" -ldnet "
5285 cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 /* Override any gcc2 internal prototype to avoid an error.  */
5289 /* We use char because int might match the return type of a gcc2
5290     builtin and then its argument prototype would still apply.  */
5291 char dnet_ntoa();
5292
5293 int main() {
5294 dnet_ntoa()
5295 ; return 0; }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298   rm -rf conftest*
5299   eval "ac_cv_lib_$ac_lib_var=yes"
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303   rm -rf conftest*
5304   eval "ac_cv_lib_$ac_lib_var=no"
5305 fi
5306 rm -f conftest*
5307 xe_check_libs=""
5308
5309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5310   echo "$ac_t""yes" 1>&6
5311   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315
5316 fi
5317
5318     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5319       
5320 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5321 echo "configure:5322: checking for dnet_ntoa in -ldnet_stub" >&5
5322 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5323
5324 xe_check_libs=" -ldnet_stub "
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328 /* Override any gcc2 internal prototype to avoid an error.  */
5329 /* We use char because int might match the return type of a gcc2
5330     builtin and then its argument prototype would still apply.  */
5331 char dnet_ntoa();
5332
5333 int main() {
5334 dnet_ntoa()
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=yes"
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   eval "ac_cv_lib_$ac_lib_var=no"
5345 fi
5346 rm -f conftest*
5347 xe_check_libs=""
5348
5349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5350   echo "$ac_t""yes" 1>&6
5351   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5352 else
5353   echo "$ac_t""no" 1>&6
5354 fi
5355
5356
5357     fi
5358
5359     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5360     # to get the SysV transport functions.
5361     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5362     # needs -lnsl.
5363     # The nsl library prevents programs from opening the X display
5364     # on Irix 5.2, according to dickey@clark.net.
5365     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5366 echo "configure:5367: checking for gethostbyname" >&5
5367
5368 cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5371 /* System header to define __stub macros and hopefully few prototypes,
5372     which can conflict with char gethostbyname(); below.  */
5373 #include <assert.h>
5374 /* Override any gcc2 internal prototype to avoid an error.  */
5375 /* We use char because int might match the return type of a gcc2
5376     builtin and then its argument prototype would still apply.  */
5377 char gethostbyname();
5378
5379 int main() {
5380
5381 /* The GNU C library defines this for functions which it implements
5382     to always fail with ENOSYS.  Some functions are actually named
5383     something starting with __ and the normal name is an alias.  */
5384 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5385 choke me
5386 #else
5387 gethostbyname();
5388 #endif
5389
5390 ; return 0; }
5391 EOF
5392 if { (eval echo configure:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5393   rm -rf conftest*
5394   eval "ac_cv_func_gethostbyname=yes"
5395 else
5396   echo "configure: failed program was:" >&5
5397   cat conftest.$ac_ext >&5
5398   rm -rf conftest*
5399   eval "ac_cv_func_gethostbyname=no"
5400 fi
5401 rm -f conftest*
5402
5403 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5404   echo "$ac_t""yes" 1>&6
5405   :
5406 else
5407   echo "$ac_t""no" 1>&6
5408 fi
5409
5410     if test $ac_cv_func_gethostbyname = no; then
5411       
5412 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5413 echo "configure:5414: checking for gethostbyname in -lnsl" >&5
5414 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5415
5416 xe_check_libs=" -lnsl "
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 /* Override any gcc2 internal prototype to avoid an error.  */
5421 /* We use char because int might match the return type of a gcc2
5422     builtin and then its argument prototype would still apply.  */
5423 char gethostbyname();
5424
5425 int main() {
5426 gethostbyname()
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=yes"
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=no"
5437 fi
5438 rm -f conftest*
5439 xe_check_libs=""
5440
5441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5442   echo "$ac_t""yes" 1>&6
5443   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5444 else
5445   echo "$ac_t""no" 1>&6
5446 fi
5447
5448
5449     fi
5450
5451     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5452     # socket/setsockopt and other routines are undefined under SCO ODT
5453     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5454     # on later versions), says simon@lia.di.epfl.ch: it contains
5455     # gethostby* variants that don't use the nameserver (or something).
5456     # -lsocket must be given before -lnsl if both are needed.
5457     # We assume that if connect needs -lnsl, so does gethostbyname.
5458     echo $ac_n "checking for connect""... $ac_c" 1>&6
5459 echo "configure:5460: checking for connect" >&5
5460
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 /* System header to define __stub macros and hopefully few prototypes,
5465     which can conflict with char connect(); below.  */
5466 #include <assert.h>
5467 /* Override any gcc2 internal prototype to avoid an error.  */
5468 /* We use char because int might match the return type of a gcc2
5469     builtin and then its argument prototype would still apply.  */
5470 char connect();
5471
5472 int main() {
5473
5474 /* The GNU C library defines this for functions which it implements
5475     to always fail with ENOSYS.  Some functions are actually named
5476     something starting with __ and the normal name is an alias.  */
5477 #if defined (__stub_connect) || defined (__stub___connect)
5478 choke me
5479 #else
5480 connect();
5481 #endif
5482
5483 ; return 0; }
5484 EOF
5485 if { (eval echo configure:5486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5486   rm -rf conftest*
5487   eval "ac_cv_func_connect=yes"
5488 else
5489   echo "configure: failed program was:" >&5
5490   cat conftest.$ac_ext >&5
5491   rm -rf conftest*
5492   eval "ac_cv_func_connect=no"
5493 fi
5494 rm -f conftest*
5495
5496 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5497   echo "$ac_t""yes" 1>&6
5498   :
5499 else
5500   echo "$ac_t""no" 1>&6
5501 fi
5502
5503     if test $ac_cv_func_connect = no; then
5504       
5505 xe_msg_checking="for connect in -lsocket"
5506 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5507 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5508 echo "configure:5509: checking "$xe_msg_checking"" >&5
5509 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5510
5511 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5512 cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 /* Override any gcc2 internal prototype to avoid an error.  */
5516 /* We use char because int might match the return type of a gcc2
5517     builtin and then its argument prototype would still apply.  */
5518 char connect();
5519
5520 int main() {
5521 connect()
5522 ; return 0; }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525   rm -rf conftest*
5526   eval "ac_cv_lib_$ac_lib_var=yes"
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -rf conftest*
5531   eval "ac_cv_lib_$ac_lib_var=no"
5532 fi
5533 rm -f conftest*
5534 xe_check_libs=""
5535
5536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5537   echo "$ac_t""yes" 1>&6
5538   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5539 else
5540   echo "$ac_t""no" 1>&6
5541 fi
5542
5543
5544     fi
5545
5546     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5547     echo $ac_n "checking for remove""... $ac_c" 1>&6
5548 echo "configure:5549: checking for remove" >&5
5549
5550 cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 /* System header to define __stub macros and hopefully few prototypes,
5554     which can conflict with char remove(); below.  */
5555 #include <assert.h>
5556 /* Override any gcc2 internal prototype to avoid an error.  */
5557 /* We use char because int might match the return type of a gcc2
5558     builtin and then its argument prototype would still apply.  */
5559 char remove();
5560
5561 int main() {
5562
5563 /* The GNU C library defines this for functions which it implements
5564     to always fail with ENOSYS.  Some functions are actually named
5565     something starting with __ and the normal name is an alias.  */
5566 #if defined (__stub_remove) || defined (__stub___remove)
5567 choke me
5568 #else
5569 remove();
5570 #endif
5571
5572 ; return 0; }
5573 EOF
5574 if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5575   rm -rf conftest*
5576   eval "ac_cv_func_remove=yes"
5577 else
5578   echo "configure: failed program was:" >&5
5579   cat conftest.$ac_ext >&5
5580   rm -rf conftest*
5581   eval "ac_cv_func_remove=no"
5582 fi
5583 rm -f conftest*
5584
5585 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5586   echo "$ac_t""yes" 1>&6
5587   :
5588 else
5589   echo "$ac_t""no" 1>&6
5590 fi
5591
5592     if test $ac_cv_func_remove = no; then
5593       
5594 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5595 echo "configure:5596: checking for remove in -lposix" >&5
5596 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5597
5598 xe_check_libs=" -lposix "
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char remove();
5606
5607 int main() {
5608 remove()
5609 ; return 0; }
5610 EOF
5611 if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612   rm -rf conftest*
5613   eval "ac_cv_lib_$ac_lib_var=yes"
5614 else
5615   echo "configure: failed program was:" >&5
5616   cat conftest.$ac_ext >&5
5617   rm -rf conftest*
5618   eval "ac_cv_lib_$ac_lib_var=no"
5619 fi
5620 rm -f conftest*
5621 xe_check_libs=""
5622
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5624   echo "$ac_t""yes" 1>&6
5625   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5626 else
5627   echo "$ac_t""no" 1>&6
5628 fi
5629
5630
5631     fi
5632
5633     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5634     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5635 echo "configure:5636: checking for shmat" >&5
5636
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5640 /* System header to define __stub macros and hopefully few prototypes,
5641     which can conflict with char shmat(); below.  */
5642 #include <assert.h>
5643 /* Override any gcc2 internal prototype to avoid an error.  */
5644 /* We use char because int might match the return type of a gcc2
5645     builtin and then its argument prototype would still apply.  */
5646 char shmat();
5647
5648 int main() {
5649
5650 /* The GNU C library defines this for functions which it implements
5651     to always fail with ENOSYS.  Some functions are actually named
5652     something starting with __ and the normal name is an alias.  */
5653 #if defined (__stub_shmat) || defined (__stub___shmat)
5654 choke me
5655 #else
5656 shmat();
5657 #endif
5658
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_func_shmat=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_func_shmat=no"
5669 fi
5670 rm -f conftest*
5671
5672 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5673   echo "$ac_t""yes" 1>&6
5674   :
5675 else
5676   echo "$ac_t""no" 1>&6
5677 fi
5678
5679     if test $ac_cv_func_shmat = no; then
5680       
5681 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5682 echo "configure:5683: checking for shmat in -lipc" >&5
5683 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5684
5685 xe_check_libs=" -lipc "
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 /* Override any gcc2 internal prototype to avoid an error.  */
5690 /* We use char because int might match the return type of a gcc2
5691     builtin and then its argument prototype would still apply.  */
5692 char shmat();
5693
5694 int main() {
5695 shmat()
5696 ; return 0; }
5697 EOF
5698 if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5699   rm -rf conftest*
5700   eval "ac_cv_lib_$ac_lib_var=yes"
5701 else
5702   echo "configure: failed program was:" >&5
5703   cat conftest.$ac_ext >&5
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=no"
5706 fi
5707 rm -f conftest*
5708 xe_check_libs=""
5709
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5711   echo "$ac_t""yes" 1>&6
5712   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716
5717
5718     fi
5719   fi
5720
5721   # Check for libraries that X11R6 Xt/Xaw programs need.
5722   ac_save_LDFLAGS="$LDFLAGS"
5723   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5724   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5725   # check for ICE first), but we must link in the order -lSM -lICE or
5726   # we get undefined symbols.  So assume we have SM if we have ICE.
5727   # These have to be linked with before -lX11, unlike the other
5728   # libraries we check for below, so use a different variable.
5729   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5730   
5731 xe_msg_checking="for IceConnectionNumber in -lICE"
5732 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5733 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5734 echo "configure:5735: checking "$xe_msg_checking"" >&5
5735 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5736
5737 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5738 cat > conftest.$ac_ext <<EOF
5739 #line 5740 "configure"
5740 #include "confdefs.h"
5741 /* Override any gcc2 internal prototype to avoid an error.  */
5742 /* We use char because int might match the return type of a gcc2
5743     builtin and then its argument prototype would still apply.  */
5744 char IceConnectionNumber();
5745
5746 int main() {
5747 IceConnectionNumber()
5748 ; return 0; }
5749 EOF
5750 if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5751   rm -rf conftest*
5752   eval "ac_cv_lib_$ac_lib_var=yes"
5753 else
5754   echo "configure: failed program was:" >&5
5755   cat conftest.$ac_ext >&5
5756   rm -rf conftest*
5757   eval "ac_cv_lib_$ac_lib_var=no"
5758 fi
5759 rm -f conftest*
5760 xe_check_libs=""
5761
5762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5763   echo "$ac_t""yes" 1>&6
5764   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5765 else
5766   echo "$ac_t""no" 1>&6
5767 fi
5768
5769
5770   LDFLAGS="$ac_save_LDFLAGS"
5771
5772 fi
5773  # Autoconf claims to find X library and include dirs for us.
5774   if test "$no_x" = "yes"
5775   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5776   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5777   fi
5778 fi
5779
5780 case "$with_x11" in
5781   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5782   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5783 esac
5784
5785 if test "$with_x11" = "yes"; then
5786   { test "$extra_verbose" = "yes" && cat << \EOF
5787     Defining HAVE_X_WINDOWS
5788 EOF
5789 cat >> confdefs.h <<\EOF
5790 #define HAVE_X_WINDOWS 1
5791 EOF
5792 }
5793
5794   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5795   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5796
5797       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5798     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5799     if test -d "$lib_dir" -a -d "$inc_dir"; then
5800       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5801         x_libraries="$lib_dir $x_libraries"
5802         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5803       esac
5804       case "$x_includes" in "$inc_dir"* ) ;; *)
5805         x_includes="$inc_dir $x_includes"
5806         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5807       esac
5808       break;       fi
5809   done
5810
5811     for rel in "X11R6" "X11R5" "X11R4"; do
5812     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5813     if test -d "$lib_dir" -a -d "$inc_dir"; then
5814       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5815         x_libraries="$x_libraries $lib_dir"
5816         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5817       esac
5818       case "$x_includes" in "$inc_dir"* ) ;; *)
5819         x_includes="$x_includes $inc_dir"
5820         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5821       esac
5822       break;     fi
5823   done
5824
5825     case "$opsys" in
5826   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
5827   esac
5828
5829   ld_switch_x_site="$X_LIBS"
5830
5831   
5832 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5833     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5834   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5835   
5836         runpath="" runpath_dirs=""
5837   if test -n "$LD_RUN_PATH"; then
5838     runpath="$LD_RUN_PATH"
5839   elif test "$GCC" = "yes"; then
5840         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5841     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5842     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5843     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5844       case "$arg" in P,* | -L* | -R* )
5845         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5846           {
5847 xe_runpath_dir="$dir"
5848   test "$xe_runpath_dir" != "/lib"     -a \
5849         "$xe_runpath_dir" != "/usr/lib" -a \
5850         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5851   eval "$xe_add_unique_runpath_dir"
5852 }
5853         done ;;
5854       esac
5855     done
5856     ld_switch_run="$ld_switch_run_save"
5857     rm -f conftest*
5858   else
5859         for arg in $ld_switch_site $ld_switch_x_site; do
5860       case "$arg" in -L*) {
5861 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5862   test "$xe_runpath_dir" != "/lib"     -a \
5863         "$xe_runpath_dir" != "/usr/lib" -a \
5864         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5865   eval "$xe_add_unique_runpath_dir"
5866 };; esac
5867     done
5868         if test "$opsys $need_motif" = "sol2 yes"; then
5869       xe_runpath_dir="/opt/SUNWdt/lib";
5870       eval "$xe_add_unique_runpath_dir";
5871     fi
5872   fi 
5873   if test -n "$runpath"; then
5874     ld_switch_run="${dash_r}${runpath}"
5875     
5876 if test "$GCC" = "yes"; then
5877   set x $ld_switch_run; shift; ld_switch_run=""
5878   while test -n "$1"; do
5879     case $1 in
5880       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5881       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5882       -Xlinker* ) ;;
5883       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5884     esac
5885     shift
5886   done
5887 fi
5888     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5889   fi
5890 fi
5891
5892
5893   if test "$extra_verbose" = "yes"; then
5894     echo; echo "X11 compilation variables:"
5895     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5896     echo
5897   fi
5898
5899             bitmapdirs=
5900   if test "$x_includes" != NONE; then
5901     for i in $x_includes; do
5902       if test -d "$i/bitmaps"; then
5903         bitmapdirs="$i/bitmaps:$bitmapdirs"
5904       fi
5905       if test -d "$i/X11/bitmaps"; then
5906         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5907       fi
5908     done
5909     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5910   fi
5911   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5912     Defining BITMAPDIR = "$bitmapdirs"
5913 EOF
5914 cat >> confdefs.h <<EOF
5915 #define BITMAPDIR "$bitmapdirs"
5916 EOF
5917 }
5918
5919
5920     echo "checking for X defines extracted by xmkmf" 1>&6
5921 echo "configure:5922: checking for X defines extracted by xmkmf" >&5
5922   rm -fr conftestdir
5923   if mkdir conftestdir; then
5924     cd conftestdir
5925     cat > Imakefile <<'EOF'
5926 xetest:
5927         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5928 EOF
5929     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5930       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5931       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5932     fi
5933     cd ..
5934     rm -fr conftestdir
5935     for word in $xmkmf_defines; do
5936       case "$word" in -D* )
5937         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5938         case "$word" in
5939           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5940           *     ) val=1 ;;
5941         esac
5942         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5943           if test "$val" = "1"
5944             then { test "$extra_verbose" = "yes" && cat << EOF
5945     Defining $sym
5946 EOF
5947 cat >> confdefs.h <<EOF
5948 #define $sym 1
5949 EOF
5950 }
5951
5952             else { test "$extra_verbose" = "yes" && cat << EOF
5953     Defining $sym = $val
5954 EOF
5955 cat >> confdefs.h <<EOF
5956 #define $sym $val
5957 EOF
5958 }
5959
5960           fi
5961         fi  ;;
5962       esac
5963     done
5964   fi
5965
5966     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5967 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5968 echo "configure:5969: checking for X11/Intrinsic.h" >&5
5969
5970 cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 #include <X11/Intrinsic.h>
5974 EOF
5975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5976 { (eval echo configure:5977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5978 if test -z "$ac_err"; then
5979   rm -rf conftest*
5980   eval "ac_cv_header_$ac_safe=yes"
5981 else
5982   echo "$ac_err" >&5
5983   echo "configure: failed program was:" >&5
5984   cat conftest.$ac_ext >&5
5985   rm -rf conftest*
5986   eval "ac_cv_header_$ac_safe=no"
5987 fi
5988 rm -f conftest*
5989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5990   echo "$ac_t""yes" 1>&6
5991   :
5992 else
5993   echo "$ac_t""no" 1>&6
5994 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5995 fi
5996
5997
5998       
5999 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6000 echo "configure:6001: checking for XOpenDisplay in -lX11" >&5
6001 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6002
6003 xe_check_libs=" -lX11 "
6004 cat > conftest.$ac_ext <<EOF
6005 #line 6006 "configure"
6006 #include "confdefs.h"
6007 /* Override any gcc2 internal prototype to avoid an error.  */
6008 /* We use char because int might match the return type of a gcc2
6009     builtin and then its argument prototype would still apply.  */
6010 char XOpenDisplay();
6011
6012 int main() {
6013 XOpenDisplay()
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   eval "ac_cv_lib_$ac_lib_var=yes"
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_lib_$ac_lib_var=no"
6024 fi
6025 rm -f conftest*
6026 xe_check_libs=""
6027
6028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6029   echo "$ac_t""yes" 1>&6
6030   have_lib_x11=yes
6031 else
6032   echo "$ac_t""no" 1>&6
6033 fi
6034
6035
6036   if test "$have_lib_x11" != "yes"; then
6037     
6038 xe_msg_checking="for XGetFontProperty in -lX11"
6039 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6040 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6041 echo "configure:6042: checking "$xe_msg_checking"" >&5
6042 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6043
6044 xe_check_libs=" -lX11 -b i486-linuxaout"
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* Override any gcc2 internal prototype to avoid an error.  */
6049 /* We use char because int might match the return type of a gcc2
6050     builtin and then its argument prototype would still apply.  */
6051 char XGetFontProperty();
6052
6053 int main() {
6054 XGetFontProperty()
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_lib_$ac_lib_var=no"
6065 fi
6066 rm -f conftest*
6067 xe_check_libs=""
6068
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6070   echo "$ac_t""yes" 1>&6
6071   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6072 else
6073   echo "$ac_t""no" 1>&6
6074 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6075 fi
6076
6077
6078   fi
6079   libs_x="-lX11"
6080   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6081
6082     
6083 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6084 echo "configure:6085: checking for XShapeSelectInput in -lXext" >&5
6085 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6086
6087 xe_check_libs=" -lXext "
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char XShapeSelectInput();
6095
6096 int main() {
6097 XShapeSelectInput()
6098 ; return 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101   rm -rf conftest*
6102   eval "ac_cv_lib_$ac_lib_var=yes"
6103 else
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=no"
6108 fi
6109 rm -f conftest*
6110 xe_check_libs=""
6111
6112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6113   echo "$ac_t""yes" 1>&6
6114   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6115 else
6116   echo "$ac_t""no" 1>&6
6117 fi
6118
6119
6120
6121     
6122 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6123 echo "configure:6124: checking for XtOpenDisplay in -lXt" >&5
6124 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6125
6126 xe_check_libs=" -lXt "
6127 cat > conftest.$ac_ext <<EOF
6128 #line 6129 "configure"
6129 #include "confdefs.h"
6130 /* Override any gcc2 internal prototype to avoid an error.  */
6131 /* We use char because int might match the return type of a gcc2
6132     builtin and then its argument prototype would still apply.  */
6133 char XtOpenDisplay();
6134
6135 int main() {
6136 XtOpenDisplay()
6137 ; return 0; }
6138 EOF
6139 if { (eval echo configure:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6140   rm -rf conftest*
6141   eval "ac_cv_lib_$ac_lib_var=yes"
6142 else
6143   echo "configure: failed program was:" >&5
6144   cat conftest.$ac_ext >&5
6145   rm -rf conftest*
6146   eval "ac_cv_lib_$ac_lib_var=no"
6147 fi
6148 rm -f conftest*
6149 xe_check_libs=""
6150
6151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6152   echo "$ac_t""yes" 1>&6
6153   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6154 else
6155   echo "$ac_t""no" 1>&6
6156 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6157 fi
6158
6159
6160
6161   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6162 echo "configure:6163: checking the version of X11 being used" >&5
6163   cat > conftest.$ac_ext <<EOF
6164 #line 6165 "configure"
6165 #include "confdefs.h"
6166 #include <X11/Intrinsic.h>
6167     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6168 EOF
6169 if { (eval echo configure:6170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6170 then
6171   ./conftest foobar; x11_release=$?
6172 else
6173   conftest_rc="$?"
6174   echo "configure: failed program was:" >&5
6175   cat conftest.$ac_ext >&5
6176   rm -fr conftest*
6177   x11_release=4
6178 fi
6179 rm -fr conftest*
6180   echo "$ac_t""R${x11_release}" 1>&6
6181   { test "$extra_verbose" = "yes" && cat << EOF
6182     Defining THIS_IS_X11R${x11_release}
6183 EOF
6184 cat >> confdefs.h <<EOF
6185 #define THIS_IS_X11R${x11_release} 1
6186 EOF
6187 }
6188
6189
6190   if test "${x11_release}" = "4"; then
6191     case "$with_widgets" in
6192       "" | "no") with_widgets=no ;;
6193       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6194     esac
6195   fi
6196
6197   for ac_func in XConvertCase
6198 do
6199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6200 echo "configure:6201: checking for $ac_func" >&5
6201
6202 cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 /* System header to define __stub macros and hopefully few prototypes,
6206     which can conflict with char $ac_func(); below.  */
6207 #include <assert.h>
6208 /* Override any gcc2 internal prototype to avoid an error.  */
6209 /* We use char because int might match the return type of a gcc2
6210     builtin and then its argument prototype would still apply.  */
6211 char $ac_func();
6212
6213 int main() {
6214
6215 /* The GNU C library defines this for functions which it implements
6216     to always fail with ENOSYS.  Some functions are actually named
6217     something starting with __ and the normal name is an alias.  */
6218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6219 choke me
6220 #else
6221 $ac_func();
6222 #endif
6223
6224 ; return 0; }
6225 EOF
6226 if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6227   rm -rf conftest*
6228   eval "ac_cv_func_$ac_func=yes"
6229 else
6230   echo "configure: failed program was:" >&5
6231   cat conftest.$ac_ext >&5
6232   rm -rf conftest*
6233   eval "ac_cv_func_$ac_func=no"
6234 fi
6235 rm -f conftest*
6236
6237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6238   echo "$ac_t""yes" 1>&6
6239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6240   { test "$extra_verbose" = "yes" && cat << EOF
6241     Defining $ac_tr_func
6242 EOF
6243 cat >> confdefs.h <<EOF
6244 #define $ac_tr_func 1
6245 EOF
6246 }
6247  
6248 else
6249   echo "$ac_t""no" 1>&6
6250 fi
6251 done
6252
6253
6254   for ac_hdr in X11/Xlocale.h
6255 do
6256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6258 echo "configure:6259: checking for $ac_hdr" >&5
6259
6260 cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 #include <$ac_hdr>
6264 EOF
6265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6266 { (eval echo configure:6267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6268 if test -z "$ac_err"; then
6269   rm -rf conftest*
6270   eval "ac_cv_header_$ac_safe=yes"
6271 else
6272   echo "$ac_err" >&5
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_header_$ac_safe=no"
6277 fi
6278 rm -f conftest*
6279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6280   echo "$ac_t""yes" 1>&6
6281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6282   { test "$extra_verbose" = "yes" && cat << EOF
6283     Defining $ac_tr_hdr
6284 EOF
6285 cat >> confdefs.h <<EOF
6286 #define $ac_tr_hdr 1
6287 EOF
6288 }
6289  
6290 else
6291   echo "$ac_t""no" 1>&6
6292 fi
6293 done
6294
6295
6296     for ac_func in XRegisterIMInstantiateCallback
6297 do
6298 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_func" >&5
6300
6301 cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304 /* System header to define __stub macros and hopefully few prototypes,
6305     which can conflict with char $ac_func(); below.  */
6306 #include <assert.h>
6307 /* Override any gcc2 internal prototype to avoid an error.  */
6308 /* We use char because int might match the return type of a gcc2
6309     builtin and then its argument prototype would still apply.  */
6310 char $ac_func();
6311
6312 int main() {
6313
6314 /* The GNU C library defines this for functions which it implements
6315     to always fail with ENOSYS.  Some functions are actually named
6316     something starting with __ and the normal name is an alias.  */
6317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6318 choke me
6319 #else
6320 $ac_func();
6321 #endif
6322
6323 ; return 0; }
6324 EOF
6325 if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6326   rm -rf conftest*
6327   eval "ac_cv_func_$ac_func=yes"
6328 else
6329   echo "configure: failed program was:" >&5
6330   cat conftest.$ac_ext >&5
6331   rm -rf conftest*
6332   eval "ac_cv_func_$ac_func=no"
6333 fi
6334 rm -f conftest*
6335
6336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6337   echo "$ac_t""yes" 1>&6
6338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6339   { test "$extra_verbose" = "yes" && cat << EOF
6340     Defining $ac_tr_func
6341 EOF
6342 cat >> confdefs.h <<EOF
6343 #define $ac_tr_func 1
6344 EOF
6345 }
6346  
6347 else
6348   echo "$ac_t""no" 1>&6
6349 fi
6350 done
6351
6352   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6353 echo "configure:6354: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6354   cat > conftest.$ac_ext <<EOF
6355 #line 6356 "configure"
6356 #include "confdefs.h"
6357
6358 #define NeedFunctionPrototypes 1
6359 #include <X11/Xlib.h>
6360 extern Bool XRegisterIMInstantiateCallback(
6361    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6362
6363 int main() {
6364
6365 ; return 0; }
6366 EOF
6367 if { (eval echo configure:6368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6368   rm -rf conftest*
6369   echo "$ac_t""yes" 1>&6
6370 else
6371   echo "configure: failed program was:" >&5
6372   cat conftest.$ac_ext >&5
6373   rm -rf conftest*
6374   echo "$ac_t""no" 1>&6
6375    { test "$extra_verbose" = "yes" && cat << \EOF
6376     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6377 EOF
6378 cat >> confdefs.h <<\EOF
6379 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6380 EOF
6381 }
6382
6383 fi
6384 rm -f conftest*
6385
6386     test -z "$with_xmu" && { 
6387 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6388 echo "configure:6389: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6389 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6390
6391 xe_check_libs=" -lXmu "
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char XmuReadBitmapDataFromFile();
6399
6400 int main() {
6401 XmuReadBitmapDataFromFile()
6402 ; return 0; }
6403 EOF
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405   rm -rf conftest*
6406   eval "ac_cv_lib_$ac_lib_var=yes"
6407 else
6408   echo "configure: failed program was:" >&5
6409   cat conftest.$ac_ext >&5
6410   rm -rf conftest*
6411   eval "ac_cv_lib_$ac_lib_var=no"
6412 fi
6413 rm -f conftest*
6414 xe_check_libs=""
6415
6416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6417   echo "$ac_t""yes" 1>&6
6418   with_xmu=yes
6419 else
6420   echo "$ac_t""no" 1>&6
6421 with_xmu=no
6422 fi
6423
6424  }
6425   if test "$with_xmu" = "no"; then
6426     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6427    echo "    xemacs will be linked with \"xmu.o\""
6428  fi
6429   else
6430     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6431     { test "$extra_verbose" = "yes" && cat << \EOF
6432     Defining HAVE_XMU
6433 EOF
6434 cat >> confdefs.h <<\EOF
6435 #define HAVE_XMU 1
6436 EOF
6437 }
6438
6439   fi
6440
6441       
6442 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6443 echo "configure:6444: checking for main in -lXbsd" >&5
6444 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6445
6446 xe_check_libs=" -lXbsd "
6447 cat > conftest.$ac_ext <<EOF
6448 #line 6449 "configure"
6449 #include "confdefs.h"
6450
6451 int main() {
6452 main()
6453 ; return 0; }
6454 EOF
6455 if { (eval echo configure:6456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6456   rm -rf conftest*
6457   eval "ac_cv_lib_$ac_lib_var=yes"
6458 else
6459   echo "configure: failed program was:" >&5
6460   cat conftest.$ac_ext >&5
6461   rm -rf conftest*
6462   eval "ac_cv_lib_$ac_lib_var=no"
6463 fi
6464 rm -f conftest*
6465 xe_check_libs=""
6466
6467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6468   echo "$ac_t""yes" 1>&6
6469   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6470 else
6471   echo "$ac_t""no" 1>&6
6472 fi
6473
6474
6475
6476     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6477         if test "$GCC" = "yes"; then
6478       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6479       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6480     else
6481       case "$CC" in
6482         "xlc" ) CC="xlc_r" ;;
6483         "xlC" ) CC="xlC_r" ;;
6484         "cc"  ) CC="cc_r" ;;
6485       esac
6486     fi
6487   fi
6488
6489 fi 
6490 if test "$with_msw" != "no"; then
6491   echo "checking for MS-Windows" 1>&6
6492 echo "configure:6493: checking for MS-Windows" >&5
6493   
6494 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6495 echo "configure:6496: checking for main in -lgdi32" >&5
6496 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6497
6498 xe_check_libs=" -lgdi32 "
6499 cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502
6503 int main() {
6504 main()
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6508   rm -rf conftest*
6509   eval "ac_cv_lib_$ac_lib_var=yes"
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=no"
6515 fi
6516 rm -f conftest*
6517 xe_check_libs=""
6518
6519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6520   echo "$ac_t""yes" 1>&6
6521   with_msw=yes
6522 else
6523   echo "$ac_t""no" 1>&6
6524 fi
6525
6526
6527   if test "$with_msw" = "yes"; then
6528     { test "$extra_verbose" = "yes" && cat << \EOF
6529     Defining HAVE_MS_WINDOWS
6530 EOF
6531 cat >> confdefs.h <<\EOF
6532 #define HAVE_MS_WINDOWS 1
6533 EOF
6534 }
6535
6536
6537         MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
6538     SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
6539     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
6540         
6541     install_pp="$blddir/lib-src/installexe.sh"
6542     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
6543     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6544     if test "$window_system" != x11; then
6545         window_system=msw
6546         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6547             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6548    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6549  fi
6550         test "$with_menubars"   != "no" && with_menubars=msw \
6551             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6552    echo "    xemacs will be linked with \"menubar-msw.o\""
6553  fi
6554         test "$with_toolbars"   != "no" && with_toolbars=msw \
6555             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6556    echo "    xemacs will be linked with \"toolbar-msw.o\""
6557  fi
6558         test "$with_dialogs"   != "no" && with_dialogs=msw \
6559             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6560    echo "    xemacs will be linked with \"dialog-msw.o\""
6561  fi
6562         test "$with_widgets"   != "no" && with_widgets=msw
6563     else
6564         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6565    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6566  fi
6567         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6568    echo "    xemacs will be linked with \"menubar-msw.o\""
6569  fi
6570         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6571    echo "    xemacs will be linked with \"toolbar-msw.o\""
6572  fi
6573         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6574    echo "    xemacs will be linked with \"dialog-msw.o\""
6575  fi
6576     fi
6577         cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 #include <fcntl.h>
6581     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6584 then
6585   { test "$extra_verbose" = "yes" && cat << \EOF
6586     Defining HAVE_MSG_SELECT
6587 EOF
6588 cat >> confdefs.h <<\EOF
6589 #define HAVE_MSG_SELECT 1
6590 EOF
6591 }
6592
6593 else
6594   conftest_rc="$?"
6595   echo "configure: failed program was:" >&5
6596   cat conftest.$ac_ext >&5
6597 fi
6598 rm -fr conftest*
6599     with_file_coding=yes
6600     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
6601    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\""
6602  fi
6603   fi
6604 fi
6605
6606
6607
6608 test -z "$window_system" && window_system="none"
6609
6610 if test "$window_system" = "none"; then
6611   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6612   do
6613     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6614        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6615     fi
6616     eval "with_${feature}=no"
6617   done
6618 else
6619   test -z "$with_toolbars" && with_toolbars=yes
6620 fi
6621
6622 if test "$with_msw" != "yes"; then
6623   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6624   do
6625     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6626        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6627     fi
6628     eval "with_${feature}=no"
6629   done
6630 else
6631   :
6632 fi
6633
6634 if test "$with_x11" != "yes"; then
6635             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6636   do
6637     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6638        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6639     fi
6640     eval "with_${feature}=no"
6641   done
6642 fi
6643
6644 if test "$with_x11" = "yes"; then
6645   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6646 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6647 echo "configure:6648: checking for X11/extensions/shape.h" >&5
6648
6649 cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 #include <X11/extensions/shape.h>
6653 EOF
6654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6655 { (eval echo configure:6656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6657 if test -z "$ac_err"; then
6658   rm -rf conftest*
6659   eval "ac_cv_header_$ac_safe=yes"
6660 else
6661   echo "$ac_err" >&5
6662   echo "configure: failed program was:" >&5
6663   cat conftest.$ac_ext >&5
6664   rm -rf conftest*
6665   eval "ac_cv_header_$ac_safe=no"
6666 fi
6667 rm -f conftest*
6668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6669   echo "$ac_t""yes" 1>&6
6670   
6671    { test "$extra_verbose" = "yes" && cat << \EOF
6672     Defining HAVE_BALLOON_HELP
6673 EOF
6674 cat >> confdefs.h <<\EOF
6675 #define HAVE_BALLOON_HELP 1
6676 EOF
6677 }
6678
6679    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6680    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6681  fi
6682 else
6683   echo "$ac_t""no" 1>&6
6684 fi
6685
6686 fi
6687
6688 bitmapdir=
6689
6690 case "$window_system" in
6691   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6692   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6693   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6694 esac
6695
6696 case "$x_libraries" in *X11R4* )
6697   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6698   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6699 esac
6700
6701 echo "checking for WM_COMMAND option" 1>&6
6702 echo "configure:6703: checking for WM_COMMAND option" >&5;
6703 if test "$with_wmcommand" != "no"; then
6704   { test "$extra_verbose" = "yes" && cat << \EOF
6705     Defining HAVE_WMCOMMAND
6706 EOF
6707 cat >> confdefs.h <<\EOF
6708 #define HAVE_WMCOMMAND 1
6709 EOF
6710 }
6711
6712 fi
6713
6714 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6715 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6716 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6717 echo "configure:6718: checking for X11/Xauth.h" >&5
6718
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 #include <X11/Xauth.h>
6723 EOF
6724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6725 { (eval echo configure:6726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6727 if test -z "$ac_err"; then
6728   rm -rf conftest*
6729   eval "ac_cv_header_$ac_safe=yes"
6730 else
6731   echo "$ac_err" >&5
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_header_$ac_safe=no"
6736 fi
6737 rm -f conftest*
6738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6739   echo "$ac_t""yes" 1>&6
6740   :
6741 else
6742   echo "$ac_t""no" 1>&6
6743 with_xauth=no
6744 fi
6745  }
6746 test -z "$with_xauth" && { 
6747 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6748 echo "configure:6749: checking for XauGetAuthByAddr in -lXau" >&5
6749 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6750
6751 xe_check_libs=" -lXau "
6752 cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 /* Override any gcc2 internal prototype to avoid an error.  */
6756 /* We use char because int might match the return type of a gcc2
6757     builtin and then its argument prototype would still apply.  */
6758 char XauGetAuthByAddr();
6759
6760 int main() {
6761 XauGetAuthByAddr()
6762 ; return 0; }
6763 EOF
6764 if { (eval echo configure:6765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6765   rm -rf conftest*
6766   eval "ac_cv_lib_$ac_lib_var=yes"
6767 else
6768   echo "configure: failed program was:" >&5
6769   cat conftest.$ac_ext >&5
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=no"
6772 fi
6773 rm -f conftest*
6774 xe_check_libs=""
6775
6776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6777   echo "$ac_t""yes" 1>&6
6778   :
6779 else
6780   echo "$ac_t""no" 1>&6
6781 with_xauth=no
6782 fi
6783
6784  }
6785 test -z "$with_xauth" && with_xauth=yes
6786 if test "$with_xauth" = "yes"; then
6787   { test "$extra_verbose" = "yes" && cat << \EOF
6788     Defining HAVE_XAUTH
6789 EOF
6790 cat >> confdefs.h <<\EOF
6791 #define HAVE_XAUTH 1
6792 EOF
6793 }
6794
6795   
6796 T=""
6797 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
6798 libs_xauth="$T"
6799
6800 fi
6801
6802
6803
6804
6805 if test "$with_tooltalk" != "no" ; then
6806       for dir in "" "Tt/" "desktop/" ; do
6807     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6808 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6809 echo "configure:6810: checking for ${dir}tt_c.h" >&5
6810
6811 cat > conftest.$ac_ext <<EOF
6812 #line 6813 "configure"
6813 #include "confdefs.h"
6814 #include <${dir}tt_c.h>
6815 EOF
6816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6817 { (eval echo configure:6818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6819 if test -z "$ac_err"; then
6820   rm -rf conftest*
6821   eval "ac_cv_header_$ac_safe=yes"
6822 else
6823   echo "$ac_err" >&5
6824   echo "configure: failed program was:" >&5
6825   cat conftest.$ac_ext >&5
6826   rm -rf conftest*
6827   eval "ac_cv_header_$ac_safe=no"
6828 fi
6829 rm -f conftest*
6830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6831   echo "$ac_t""yes" 1>&6
6832   tt_c_h_file="${dir}tt_c.h"; break
6833 else
6834   echo "$ac_t""no" 1>&6
6835 fi
6836
6837   done
6838   if test -z "$tt_c_h_file"; then
6839     if test "$with_tooltalk" = "yes"; then
6840       (echo "$progname: Usage error:"
6841 echo " " "Unable to find required tooltalk header files."
6842 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6843     fi
6844     with_tooltalk=no
6845   fi
6846 fi
6847 if test "$with_tooltalk" != "no" ; then
6848   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6849     
6850 xe_msg_checking="for tt_message_create in -ltt"
6851 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6852 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6853 echo "configure:6854: checking "$xe_msg_checking"" >&5
6854 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6855
6856 xe_check_libs=" -ltt $extra_libs"
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char tt_message_create();
6864
6865 int main() {
6866 tt_message_create()
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_lib_$ac_lib_var=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_lib_$ac_lib_var=no"
6877 fi
6878 rm -f conftest*
6879 xe_check_libs=""
6880
6881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6882   echo "$ac_t""yes" 1>&6
6883   tt_libs="-ltt $extra_libs"; break
6884 else
6885   echo "$ac_t""no" 1>&6
6886 :
6887 fi
6888
6889
6890   done
6891   if test -z "$tt_libs"; then
6892     if test "$with_tooltalk" = "yes"; then
6893       (echo "$progname: Usage error:"
6894 echo " " "Unable to find required tooltalk libraries."
6895 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6896     fi
6897     with_tooltalk=no
6898   fi
6899 fi
6900 test -z "$with_tooltalk" && with_tooltalk=yes
6901 if test "$with_tooltalk" = "yes"; then
6902   { test "$extra_verbose" = "yes" && cat << \EOF
6903     Defining TOOLTALK
6904 EOF
6905 cat >> confdefs.h <<\EOF
6906 #define TOOLTALK 1
6907 EOF
6908 }
6909
6910   { test "$extra_verbose" = "yes" && cat << EOF
6911     Defining TT_C_H_FILE = "$tt_c_h_file"
6912 EOF
6913 cat >> confdefs.h <<EOF
6914 #define TT_C_H_FILE "$tt_c_h_file"
6915 EOF
6916 }
6917
6918   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6919   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6920    echo "    xemacs will be linked with \"tooltalk.o\""
6921  fi
6922 fi
6923
6924 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6925 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6926 echo "configure:6927: checking for Dt/Dt.h" >&5
6927
6928 cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 #include <Dt/Dt.h>
6932 EOF
6933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6934 { (eval echo configure:6935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6936 if test -z "$ac_err"; then
6937   rm -rf conftest*
6938   eval "ac_cv_header_$ac_safe=yes"
6939 else
6940   echo "$ac_err" >&5
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   eval "ac_cv_header_$ac_safe=no"
6945 fi
6946 rm -f conftest*
6947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6948   echo "$ac_t""yes" 1>&6
6949   :
6950 else
6951   echo "$ac_t""no" 1>&6
6952 with_cde=no
6953 fi
6954  }
6955 test -z "$with_cde" && { 
6956 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6957 echo "configure:6958: checking for DtDndDragStart in -lDtSvc" >&5
6958 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6959
6960 xe_check_libs=" -lDtSvc "
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char DtDndDragStart();
6968
6969 int main() {
6970 DtDndDragStart()
6971 ; return 0; }
6972 EOF
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974   rm -rf conftest*
6975   eval "ac_cv_lib_$ac_lib_var=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=no"
6981 fi
6982 rm -f conftest*
6983 xe_check_libs=""
6984
6985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6986   echo "$ac_t""yes" 1>&6
6987   :
6988 else
6989   echo "$ac_t""no" 1>&6
6990 with_cde=no
6991 fi
6992
6993  }
6994 test -z "$with_cde" && with_cde=yes
6995 if test "$with_dragndrop" = no; then
6996   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6997   with_cde=no
6998 fi
6999 if test "$with_cde" = "yes" ; then
7000   { test "$extra_verbose" = "yes" && cat << \EOF
7001     Defining HAVE_CDE
7002 EOF
7003 cat >> confdefs.h <<\EOF
7004 #define HAVE_CDE 1
7005 EOF
7006 }
7007
7008   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7009   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7010   with_tooltalk=yes # CDE requires Tooltalk
7011   need_motif=yes    # CDE requires Motif
7012 fi
7013
7014 test "$window_system" != "x11" && with_offix=no
7015 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7016   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7017   with_offix=no
7018 fi
7019 if test "$with_dragndrop" = no; then
7020   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7021   with_offix=no
7022 fi
7023 if test "$with_cde" = yes; then
7024   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7025   with_offix=no
7026 fi
7027 test -z "$with_offix" && with_offix=no
7028 if test "$with_offix" = "yes"; then
7029   { test "$extra_verbose" = "yes" && cat << \EOF
7030     Defining HAVE_OFFIX_DND
7031 EOF
7032 cat >> confdefs.h <<\EOF
7033 #define HAVE_OFFIX_DND 1
7034 EOF
7035 }
7036
7037   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7038   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7039 fi
7040
7041 if test "$with_dragndrop" != "no" ; then
7042   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7043 echo "configure:7044: checking if drag and drop API is needed" >&5
7044   if test -n "$dragndrop_proto" ; then
7045     with_dragndrop=yes
7046     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7047     { test "$extra_verbose" = "yes" && cat << \EOF
7048     Defining HAVE_DRAGNDROP
7049 EOF
7050 cat >> confdefs.h <<\EOF
7051 #define HAVE_DRAGNDROP 1
7052 EOF
7053 }
7054
7055     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7056   else
7057     with_dragndrop=no
7058     echo "$ac_t""no" 1>&6
7059   fi
7060 fi
7061
7062 echo "checking for LDAP" 1>&6
7063 echo "configure:7064: checking for LDAP" >&5
7064 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7065 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7066 echo "configure:7067: checking for ldap.h" >&5
7067
7068 cat > conftest.$ac_ext <<EOF
7069 #line 7070 "configure"
7070 #include "confdefs.h"
7071 #include <ldap.h>
7072 EOF
7073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7074 { (eval echo configure:7075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7076 if test -z "$ac_err"; then
7077   rm -rf conftest*
7078   eval "ac_cv_header_$ac_safe=yes"
7079 else
7080   echo "$ac_err" >&5
7081   echo "configure: failed program was:" >&5
7082   cat conftest.$ac_ext >&5
7083   rm -rf conftest*
7084   eval "ac_cv_header_$ac_safe=no"
7085 fi
7086 rm -f conftest*
7087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7088   echo "$ac_t""yes" 1>&6
7089   :
7090 else
7091   echo "$ac_t""no" 1>&6
7092 with_ldap=no
7093 fi
7094  }
7095 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7096 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7097 echo "configure:7098: checking for lber.h" >&5
7098
7099 cat > conftest.$ac_ext <<EOF
7100 #line 7101 "configure"
7101 #include "confdefs.h"
7102 #include <lber.h>
7103 EOF
7104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7105 { (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7107 if test -z "$ac_err"; then
7108   rm -rf conftest*
7109   eval "ac_cv_header_$ac_safe=yes"
7110 else
7111   echo "$ac_err" >&5
7112   echo "configure: failed program was:" >&5
7113   cat conftest.$ac_ext >&5
7114   rm -rf conftest*
7115   eval "ac_cv_header_$ac_safe=no"
7116 fi
7117 rm -f conftest*
7118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7119   echo "$ac_t""yes" 1>&6
7120   :
7121 else
7122   echo "$ac_t""no" 1>&6
7123 with_ldap=no
7124 fi
7125  }
7126 if test "$with_ldap" != "no"; then
7127   
7128 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7129 echo "configure:7130: checking for ldap_search in -lldap" >&5
7130 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7131
7132 xe_check_libs=" -lldap "
7133 cat > conftest.$ac_ext <<EOF
7134 #line 7135 "configure"
7135 #include "confdefs.h"
7136 /* Override any gcc2 internal prototype to avoid an error.  */
7137 /* We use char because int might match the return type of a gcc2
7138     builtin and then its argument prototype would still apply.  */
7139 char ldap_search();
7140
7141 int main() {
7142 ldap_search()
7143 ; return 0; }
7144 EOF
7145 if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7146   rm -rf conftest*
7147   eval "ac_cv_lib_$ac_lib_var=yes"
7148 else
7149   echo "configure: failed program was:" >&5
7150   cat conftest.$ac_ext >&5
7151   rm -rf conftest*
7152   eval "ac_cv_lib_$ac_lib_var=no"
7153 fi
7154 rm -f conftest*
7155 xe_check_libs=""
7156
7157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7158   echo "$ac_t""yes" 1>&6
7159   with_ldap_nolber=yes
7160 else
7161   echo "$ac_t""no" 1>&6
7162 with_ldap_nolber=no
7163 fi
7164
7165
7166   test "$with_ldap_nolber" = "no" && { 
7167 xe_msg_checking="for ldap_open in -lldap"
7168 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7169 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7170 echo "configure:7171: checking "$xe_msg_checking"" >&5
7171 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7172
7173 xe_check_libs=" -lldap -llber"
7174 cat > conftest.$ac_ext <<EOF
7175 #line 7176 "configure"
7176 #include "confdefs.h"
7177 /* Override any gcc2 internal prototype to avoid an error.  */
7178 /* We use char because int might match the return type of a gcc2
7179     builtin and then its argument prototype would still apply.  */
7180 char ldap_open();
7181
7182 int main() {
7183 ldap_open()
7184 ; return 0; }
7185 EOF
7186 if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7187   rm -rf conftest*
7188   eval "ac_cv_lib_$ac_lib_var=yes"
7189 else
7190   echo "configure: failed program was:" >&5
7191   cat conftest.$ac_ext >&5
7192   rm -rf conftest*
7193   eval "ac_cv_lib_$ac_lib_var=no"
7194 fi
7195 rm -f conftest*
7196 xe_check_libs=""
7197
7198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7199   echo "$ac_t""yes" 1>&6
7200   with_ldap_lber=yes
7201 else
7202   echo "$ac_t""no" 1>&6
7203 with_ldap_lber=no
7204 fi
7205
7206  }
7207   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7208 xe_msg_checking="for ldap_open in -lldap"
7209 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7210 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7211 echo "configure:7212: checking "$xe_msg_checking"" >&5
7212 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7213
7214 xe_check_libs=" -lldap -llber -lkrb"
7215 cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 /* Override any gcc2 internal prototype to avoid an error.  */
7219 /* We use char because int might match the return type of a gcc2
7220     builtin and then its argument prototype would still apply.  */
7221 char ldap_open();
7222
7223 int main() {
7224 ldap_open()
7225 ; return 0; }
7226 EOF
7227 if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228   rm -rf conftest*
7229   eval "ac_cv_lib_$ac_lib_var=yes"
7230 else
7231   echo "configure: failed program was:" >&5
7232   cat conftest.$ac_ext >&5
7233   rm -rf conftest*
7234   eval "ac_cv_lib_$ac_lib_var=no"
7235 fi
7236 rm -f conftest*
7237 xe_check_libs=""
7238
7239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7240   echo "$ac_t""yes" 1>&6
7241   with_ldap_krb=yes
7242 else
7243   echo "$ac_t""no" 1>&6
7244 with_ldap_krb=no
7245 fi
7246
7247  }
7248   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7249 xe_msg_checking="for ldap_open in -lldap"
7250 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7251 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7252 echo "configure:7253: checking "$xe_msg_checking"" >&5
7253 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7254
7255 xe_check_libs=" -lldap -llber -lkrb -ldes"
7256 cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 /* We use char because int might match the return type of a gcc2
7261     builtin and then its argument prototype would still apply.  */
7262 char ldap_open();
7263
7264 int main() {
7265 ldap_open()
7266 ; return 0; }
7267 EOF
7268 if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7269   rm -rf conftest*
7270   eval "ac_cv_lib_$ac_lib_var=yes"
7271 else
7272   echo "configure: failed program was:" >&5
7273   cat conftest.$ac_ext >&5
7274   rm -rf conftest*
7275   eval "ac_cv_lib_$ac_lib_var=no"
7276 fi
7277 rm -f conftest*
7278 xe_check_libs=""
7279
7280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7281   echo "$ac_t""yes" 1>&6
7282   with_ldap_krbdes=yes
7283 else
7284   echo "$ac_t""no" 1>&6
7285 with_ldap_krbdes=no
7286 fi
7287
7288  }
7289   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
7290 fi
7291 if test "$with_ldap" = "yes"; then
7292   { test "$extra_verbose" = "yes" && cat << \EOF
7293     Defining HAVE_LDAP
7294 EOF
7295 cat >> confdefs.h <<\EOF
7296 #define HAVE_LDAP 1
7297 EOF
7298 }
7299
7300   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7301    echo "    xemacs will be linked with \"eldap.o\""
7302  fi
7303   if test "$with_ldap_nolber" = "yes" ; then
7304     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7305   else
7306     if test "$with_ldap_krb" = "yes" ; then
7307       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7308     fi
7309     if test "$with_ldap_krbdes" = "yes" ; then
7310       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7311       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7312     fi
7313     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7314     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7315   fi
7316   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7317 do
7318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7319 echo "configure:7320: checking for $ac_func" >&5
7320
7321 cat > conftest.$ac_ext <<EOF
7322 #line 7323 "configure"
7323 #include "confdefs.h"
7324 /* System header to define __stub macros and hopefully few prototypes,
7325     which can conflict with char $ac_func(); below.  */
7326 #include <assert.h>
7327 /* Override any gcc2 internal prototype to avoid an error.  */
7328 /* We use char because int might match the return type of a gcc2
7329     builtin and then its argument prototype would still apply.  */
7330 char $ac_func();
7331
7332 int main() {
7333
7334 /* The GNU C library defines this for functions which it implements
7335     to always fail with ENOSYS.  Some functions are actually named
7336     something starting with __ and the normal name is an alias.  */
7337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7338 choke me
7339 #else
7340 $ac_func();
7341 #endif
7342
7343 ; return 0; }
7344 EOF
7345 if { (eval echo configure:7346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7346   rm -rf conftest*
7347   eval "ac_cv_func_$ac_func=yes"
7348 else
7349   echo "configure: failed program was:" >&5
7350   cat conftest.$ac_ext >&5
7351   rm -rf conftest*
7352   eval "ac_cv_func_$ac_func=no"
7353 fi
7354 rm -f conftest*
7355
7356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7357   echo "$ac_t""yes" 1>&6
7358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7359   { test "$extra_verbose" = "yes" && cat << EOF
7360     Defining $ac_tr_func
7361 EOF
7362 cat >> confdefs.h <<EOF
7363 #define $ac_tr_func 1
7364 EOF
7365 }
7366  
7367 else
7368   echo "$ac_t""no" 1>&6
7369 fi
7370 done
7371
7372 fi
7373
7374 if test "$with_postgresql" != "no"; then
7375   echo "checking for PostgreSQL" 1>&6
7376 echo "configure:7377: checking for PostgreSQL" >&5
7377
7378   for header_dir in "" "pgsql/" "postgresql/"; do
7379     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7380 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7381 echo "configure:7382: checking for ${header_dir}libpq-fe.h" >&5
7382
7383 cat > conftest.$ac_ext <<EOF
7384 #line 7385 "configure"
7385 #include "confdefs.h"
7386 #include <${header_dir}libpq-fe.h>
7387 EOF
7388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7389 { (eval echo configure:7390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7391 if test -z "$ac_err"; then
7392   rm -rf conftest*
7393   eval "ac_cv_header_$ac_safe=yes"
7394 else
7395   echo "$ac_err" >&5
7396   echo "configure: failed program was:" >&5
7397   cat conftest.$ac_ext >&5
7398   rm -rf conftest*
7399   eval "ac_cv_header_$ac_safe=no"
7400 fi
7401 rm -f conftest*
7402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7403   echo "$ac_t""yes" 1>&6
7404   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7405 else
7406   echo "$ac_t""no" 1>&6
7407 fi
7408
7409   done
7410
7411   test -n "$libpq_fe_h_file" && { 
7412 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7413 echo "configure:7414: checking for PQconnectdb in -lpq" >&5
7414 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7415
7416 xe_check_libs=" -lpq "
7417 cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 /* Override any gcc2 internal prototype to avoid an error.  */
7421 /* We use char because int might match the return type of a gcc2
7422     builtin and then its argument prototype would still apply.  */
7423 char PQconnectdb();
7424
7425 int main() {
7426 PQconnectdb()
7427 ; return 0; }
7428 EOF
7429 if { (eval echo configure:7430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7430   rm -rf conftest*
7431   eval "ac_cv_lib_$ac_lib_var=yes"
7432 else
7433   echo "configure: failed program was:" >&5
7434   cat conftest.$ac_ext >&5
7435   rm -rf conftest*
7436   eval "ac_cv_lib_$ac_lib_var=no"
7437 fi
7438 rm -f conftest*
7439 xe_check_libs=""
7440
7441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7442   echo "$ac_t""yes" 1>&6
7443   have_libpq=yes
7444 else
7445   echo "$ac_t""no" 1>&6
7446 fi
7447
7448  }
7449
7450   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7451     with_postgresql=yes
7452     { test "$extra_verbose" = "yes" && cat << \EOF
7453     Defining HAVE_POSTGRESQL
7454 EOF
7455 cat >> confdefs.h <<\EOF
7456 #define HAVE_POSTGRESQL 1
7457 EOF
7458 }
7459
7460     
7461 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7462 echo "configure:7463: checking for PQconnectStart in -lpq" >&5
7463 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7464
7465 xe_check_libs=" -lpq "
7466 cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* Override any gcc2 internal prototype to avoid an error.  */
7470 /* We use char because int might match the return type of a gcc2
7471     builtin and then its argument prototype would still apply.  */
7472 char PQconnectStart();
7473
7474 int main() {
7475 PQconnectStart()
7476 ; return 0; }
7477 EOF
7478 if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7479   rm -rf conftest*
7480   eval "ac_cv_lib_$ac_lib_var=yes"
7481 else
7482   echo "configure: failed program was:" >&5
7483   cat conftest.$ac_ext >&5
7484   rm -rf conftest*
7485   eval "ac_cv_lib_$ac_lib_var=no"
7486 fi
7487 rm -f conftest*
7488 xe_check_libs=""
7489
7490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7491   echo "$ac_t""yes" 1>&6
7492   with_postgresqlv7=yes;
7493                  { test "$extra_verbose" = "yes" && cat << \EOF
7494     Defining HAVE_POSTGRESQLV7
7495 EOF
7496 cat >> confdefs.h <<\EOF
7497 #define HAVE_POSTGRESQLV7 1
7498 EOF
7499 }
7500
7501 else
7502   echo "$ac_t""no" 1>&6
7503 fi
7504
7505
7506     { test "$extra_verbose" = "yes" && cat << EOF
7507     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7508 EOF
7509 cat >> confdefs.h <<EOF
7510 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7511 EOF
7512 }
7513
7514     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7515     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7516    echo "    xemacs will be linked with \"postgresql.o\""
7517  fi
7518   elif test "$with_postgresql" = "yes"; then
7519     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7520   fi
7521 fi
7522
7523
7524 if test "$window_system" != "none"; then
7525   echo "checking for graphics libraries" 1>&6
7526 echo "configure:7527: checking for graphics libraries" >&5
7527
7528     xpm_problem=""
7529   if test -z "$with_xpm"; then
7530     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7531 echo "configure:7532: checking for Xpm - no older than 3.4f" >&5
7532     xe_check_libs=-lXpm
7533     cat > conftest.$ac_ext <<EOF
7534 #line 7535 "configure"
7535 #include "confdefs.h"
7536 #define XPM_NUMBERS
7537 #include <X11/xpm.h>
7538     int main(int c, char **v) {
7539     return c == 1 ? 0 :
7540       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7541       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7542 EOF
7543 if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7544 then
7545   ./conftest dummy_arg; xpm_status=$?;
7546       if test "$xpm_status" = "0"; then
7547         with_xpm=yes;
7548       else
7549         with_xpm=no;
7550         if test "$xpm_status" = "1"; then
7551           xpm_problem="Xpm library version and header file version don't match!"
7552         elif test "$xpm_status" = "2"; then
7553           xpm_problem="Xpm library version is too old!"
7554         else
7555           xpm_problem="Internal xpm detection logic error!"
7556         fi
7557         echo "
7558 *** WARNING *** $xpm_problem
7559   I'm not touching that with a 10-foot pole!
7560   If you really want to use the installed version of Xpm, rerun
7561   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7562     fi
7563 else
7564   conftest_rc="$?"
7565   echo "configure: failed program was:" >&5
7566   cat conftest.$ac_ext >&5
7567   rm -fr conftest*
7568   with_xpm=no
7569 fi
7570 rm -fr conftest*
7571     xe_check_libs=
7572     echo "$ac_t""$with_xpm" 1>&6
7573   fi
7574   if test "$with_xpm" = "yes"; then
7575     { test "$extra_verbose" = "yes" && cat << \EOF
7576     Defining HAVE_XPM
7577 EOF
7578 cat >> confdefs.h <<\EOF
7579 #define HAVE_XPM 1
7580 EOF
7581 }
7582
7583     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7584     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7585 echo "configure:7586: checking for \"FOR_MSW\" xpm" >&5
7586     xe_check_libs=-lXpm
7587     cat > conftest.$ac_ext <<EOF
7588 #line 7589 "configure"
7589 #include "confdefs.h"
7590
7591 int main() {
7592 XpmCreatePixmapFromData()
7593 ; return 0; }
7594 EOF
7595 if { (eval echo configure:7596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7596   rm -rf conftest*
7597   xpm_for_msw=no
7598 else
7599   echo "configure: failed program was:" >&5
7600   cat conftest.$ac_ext >&5
7601   rm -rf conftest*
7602   xpm_for_msw=yes
7603 fi
7604 rm -f conftest*
7605     xe_check_libs=
7606     echo "$ac_t""$xpm_for_msw" 1>&6
7607     if test "$xpm_for_msw" = "yes"; then
7608       { test "$extra_verbose" = "yes" && cat << \EOF
7609     Defining FOR_MSW
7610 EOF
7611 cat >> confdefs.h <<\EOF
7612 #define FOR_MSW 1
7613 EOF
7614 }
7615
7616     fi
7617   fi
7618
7619     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7620 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7621 echo "configure:7622: checking for compface.h" >&5
7622
7623 cat > conftest.$ac_ext <<EOF
7624 #line 7625 "configure"
7625 #include "confdefs.h"
7626 #include <compface.h>
7627 EOF
7628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7629 { (eval echo configure:7630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7631 if test -z "$ac_err"; then
7632   rm -rf conftest*
7633   eval "ac_cv_header_$ac_safe=yes"
7634 else
7635   echo "$ac_err" >&5
7636   echo "configure: failed program was:" >&5
7637   cat conftest.$ac_ext >&5
7638   rm -rf conftest*
7639   eval "ac_cv_header_$ac_safe=no"
7640 fi
7641 rm -f conftest*
7642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7643   echo "$ac_t""yes" 1>&6
7644   :
7645 else
7646   echo "$ac_t""no" 1>&6
7647 with_xface=no
7648 fi
7649  }
7650   test -z "$with_xface" && { 
7651 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7652 echo "configure:7653: checking for UnGenFace in -lcompface" >&5
7653 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7654
7655 xe_check_libs=" -lcompface "
7656 cat > conftest.$ac_ext <<EOF
7657 #line 7658 "configure"
7658 #include "confdefs.h"
7659 /* Override any gcc2 internal prototype to avoid an error.  */
7660 /* We use char because int might match the return type of a gcc2
7661     builtin and then its argument prototype would still apply.  */
7662 char UnGenFace();
7663
7664 int main() {
7665 UnGenFace()
7666 ; return 0; }
7667 EOF
7668 if { (eval echo configure:7669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7669   rm -rf conftest*
7670   eval "ac_cv_lib_$ac_lib_var=yes"
7671 else
7672   echo "configure: failed program was:" >&5
7673   cat conftest.$ac_ext >&5
7674   rm -rf conftest*
7675   eval "ac_cv_lib_$ac_lib_var=no"
7676 fi
7677 rm -f conftest*
7678 xe_check_libs=""
7679
7680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7681   echo "$ac_t""yes" 1>&6
7682   : 
7683 else
7684   echo "$ac_t""no" 1>&6
7685 with_xface=no
7686 fi
7687
7688  }
7689   test -z "$with_xface" && with_xface=yes
7690   if test "$with_xface" = "yes"; then
7691     { test "$extra_verbose" = "yes" && cat << \EOF
7692     Defining HAVE_XFACE
7693 EOF
7694 cat >> confdefs.h <<\EOF
7695 #define HAVE_XFACE 1
7696 EOF
7697 }
7698
7699     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7700   fi
7701
7702         if test "$with_gif" != "no"; then
7703     with_gif="yes"
7704     { test "$extra_verbose" = "yes" && cat << \EOF
7705     Defining HAVE_GIF
7706 EOF
7707 cat >> confdefs.h <<\EOF
7708 #define HAVE_GIF 1
7709 EOF
7710 }
7711
7712     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7713    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7714  fi
7715   fi
7716
7717       if test "$with_png $with_tiff" != "no no"; then
7718     
7719 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7720 echo "configure:7721: checking for inflate in -lc" >&5
7721 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7722
7723 xe_check_libs=" -lc "
7724 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 /* Override any gcc2 internal prototype to avoid an error.  */
7728 /* We use char because int might match the return type of a gcc2
7729     builtin and then its argument prototype would still apply.  */
7730 char inflate();
7731
7732 int main() {
7733 inflate()
7734 ; return 0; }
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7737   rm -rf conftest*
7738   eval "ac_cv_lib_$ac_lib_var=yes"
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -rf conftest*
7743   eval "ac_cv_lib_$ac_lib_var=no"
7744 fi
7745 rm -f conftest*
7746 xe_check_libs=""
7747
7748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7749   echo "$ac_t""yes" 1>&6
7750   :
7751 else
7752   echo "$ac_t""no" 1>&6
7753
7754 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7755 echo "configure:7756: checking for inflate in -lz" >&5
7756 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7757
7758 xe_check_libs=" -lz "
7759 cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762 /* Override any gcc2 internal prototype to avoid an error.  */
7763 /* We use char because int might match the return type of a gcc2
7764     builtin and then its argument prototype would still apply.  */
7765 char inflate();
7766
7767 int main() {
7768 inflate()
7769 ; return 0; }
7770 EOF
7771 if { (eval echo configure:7772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7772   rm -rf conftest*
7773   eval "ac_cv_lib_$ac_lib_var=yes"
7774 else
7775   echo "configure: failed program was:" >&5
7776   cat conftest.$ac_ext >&5
7777   rm -rf conftest*
7778   eval "ac_cv_lib_$ac_lib_var=no"
7779 fi
7780 rm -f conftest*
7781 xe_check_libs=""
7782
7783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7784   echo "$ac_t""yes" 1>&6
7785   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7786 else
7787   echo "$ac_t""no" 1>&6
7788
7789 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7790 echo "configure:7791: checking for inflate in -lgz" >&5
7791 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7792
7793 xe_check_libs=" -lgz "
7794 cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 /* Override any gcc2 internal prototype to avoid an error.  */
7798 /* We use char because int might match the return type of a gcc2
7799     builtin and then its argument prototype would still apply.  */
7800 char inflate();
7801
7802 int main() {
7803 inflate()
7804 ; return 0; }
7805 EOF
7806 if { (eval echo configure:7807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7807   rm -rf conftest*
7808   eval "ac_cv_lib_$ac_lib_var=yes"
7809 else
7810   echo "configure: failed program was:" >&5
7811   cat conftest.$ac_ext >&5
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=no"
7814 fi
7815 rm -f conftest*
7816 xe_check_libs=""
7817
7818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7819   echo "$ac_t""yes" 1>&6
7820   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7821 else
7822   echo "$ac_t""no" 1>&6
7823 fi
7824
7825
7826 fi
7827
7828
7829 fi
7830
7831
7832   fi
7833
7834     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7835 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7836 echo "configure:7837: checking for jpeglib.h" >&5
7837
7838 cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <jpeglib.h>
7842 EOF
7843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7844 { (eval echo configure:7845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7846 if test -z "$ac_err"; then
7847   rm -rf conftest*
7848   eval "ac_cv_header_$ac_safe=yes"
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   eval "ac_cv_header_$ac_safe=no"
7855 fi
7856 rm -f conftest*
7857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7858   echo "$ac_t""yes" 1>&6
7859   :
7860 else
7861   echo "$ac_t""no" 1>&6
7862 with_jpeg=no
7863 fi
7864  }
7865   test -z "$with_jpeg" && { 
7866 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7867 echo "configure:7868: checking for jpeg_destroy_decompress in -ljpeg" >&5
7868 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7869
7870 xe_check_libs=" -ljpeg "
7871 cat > conftest.$ac_ext <<EOF
7872 #line 7873 "configure"
7873 #include "confdefs.h"
7874 /* Override any gcc2 internal prototype to avoid an error.  */
7875 /* We use char because int might match the return type of a gcc2
7876     builtin and then its argument prototype would still apply.  */
7877 char jpeg_destroy_decompress();
7878
7879 int main() {
7880 jpeg_destroy_decompress()
7881 ; return 0; }
7882 EOF
7883 if { (eval echo configure:7884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7884   rm -rf conftest*
7885   eval "ac_cv_lib_$ac_lib_var=yes"
7886 else
7887   echo "configure: failed program was:" >&5
7888   cat conftest.$ac_ext >&5
7889   rm -rf conftest*
7890   eval "ac_cv_lib_$ac_lib_var=no"
7891 fi
7892 rm -f conftest*
7893 xe_check_libs=""
7894
7895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7896   echo "$ac_t""yes" 1>&6
7897   :
7898 else
7899   echo "$ac_t""no" 1>&6
7900 with_jpeg=no
7901 fi
7902
7903  }
7904   test -z "$with_jpeg" && with_jpeg=yes
7905   if test "$with_jpeg" = "yes"; then
7906     { test "$extra_verbose" = "yes" && cat << \EOF
7907     Defining HAVE_JPEG
7908 EOF
7909 cat >> confdefs.h <<\EOF
7910 #define HAVE_JPEG 1
7911 EOF
7912 }
7913
7914     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7915   fi
7916
7917     png_problem=""
7918   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7919 echo "configure:7920: checking for pow" >&5
7920
7921 cat > conftest.$ac_ext <<EOF
7922 #line 7923 "configure"
7923 #include "confdefs.h"
7924 /* System header to define __stub macros and hopefully few prototypes,
7925     which can conflict with char pow(); below.  */
7926 #include <assert.h>
7927 /* Override any gcc2 internal prototype to avoid an error.  */
7928 /* We use char because int might match the return type of a gcc2
7929     builtin and then its argument prototype would still apply.  */
7930 char pow();
7931
7932 int main() {
7933
7934 /* The GNU C library defines this for functions which it implements
7935     to always fail with ENOSYS.  Some functions are actually named
7936     something starting with __ and the normal name is an alias.  */
7937 #if defined (__stub_pow) || defined (__stub___pow)
7938 choke me
7939 #else
7940 pow();
7941 #endif
7942
7943 ; return 0; }
7944 EOF
7945 if { (eval echo configure:7946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7946   rm -rf conftest*
7947   eval "ac_cv_func_pow=yes"
7948 else
7949   echo "configure: failed program was:" >&5
7950   cat conftest.$ac_ext >&5
7951   rm -rf conftest*
7952   eval "ac_cv_func_pow=no"
7953 fi
7954 rm -f conftest*
7955
7956 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7957   echo "$ac_t""yes" 1>&6
7958   :
7959 else
7960   echo "$ac_t""no" 1>&6
7961 with_png=no
7962 fi
7963  }
7964   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7965 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7966 echo "configure:7967: checking for png.h" >&5
7967
7968 cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971 #include <png.h>
7972 EOF
7973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7974 { (eval echo configure:7975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7976 if test -z "$ac_err"; then
7977   rm -rf conftest*
7978   eval "ac_cv_header_$ac_safe=yes"
7979 else
7980   echo "$ac_err" >&5
7981   echo "configure: failed program was:" >&5
7982   cat conftest.$ac_ext >&5
7983   rm -rf conftest*
7984   eval "ac_cv_header_$ac_safe=no"
7985 fi
7986 rm -f conftest*
7987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7988   echo "$ac_t""yes" 1>&6
7989   :
7990 else
7991   echo "$ac_t""no" 1>&6
7992 with_png=no
7993 fi
7994  }
7995   test -z "$with_png" && { 
7996 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7997 echo "configure:7998: checking for png_read_image in -lpng" >&5
7998 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7999
8000 xe_check_libs=" -lpng "
8001 cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* Override any gcc2 internal prototype to avoid an error.  */
8005 /* We use char because int might match the return type of a gcc2
8006     builtin and then its argument prototype would still apply.  */
8007 char png_read_image();
8008
8009 int main() {
8010 png_read_image()
8011 ; return 0; }
8012 EOF
8013 if { (eval echo configure:8014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8014   rm -rf conftest*
8015   eval "ac_cv_lib_$ac_lib_var=yes"
8016 else
8017   echo "configure: failed program was:" >&5
8018   cat conftest.$ac_ext >&5
8019   rm -rf conftest*
8020   eval "ac_cv_lib_$ac_lib_var=no"
8021 fi
8022 rm -f conftest*
8023 xe_check_libs=""
8024
8025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8026   echo "$ac_t""yes" 1>&6
8027   :
8028 else
8029   echo "$ac_t""no" 1>&6
8030 with_png=no
8031 fi
8032
8033  }
8034   if test -z "$with_png"; then
8035     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8036 echo "configure:8037: checking for workable png version information" >&5
8037     xe_check_libs="-lpng -lz"
8038     cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 #include <png.h>
8042     int main(int c, char **v) {
8043     if (c == 1) return 0;
8044     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8045     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8048 then
8049   ./conftest dummy_arg; png_status=$?;
8050       if test "$png_status" = "0"; then
8051         with_png=yes;
8052       else
8053         with_png=no;
8054         if test "$png_status" = "1"; then
8055           png_problem="PNG library version and header file don't match!"
8056         elif test "$png_status" = "2"; then
8057           png_problem="PNG library version too old (pre 1.0.2)!"
8058         fi
8059         echo "
8060 *** WARNING *** $png_problem
8061   I'm not touching that with a 10-foot pole!
8062   If you really want to use the installed version of libPNG, rerun
8063   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8064     fi
8065 else
8066   conftest_rc="$?"
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -fr conftest*
8070   with_png=no
8071 fi
8072 rm -fr conftest*
8073     xe_check_libs=
8074     echo "$ac_t""$with_png" 1>&6
8075   fi
8076   if test "$with_png" = "yes"; then
8077     { test "$extra_verbose" = "yes" && cat << \EOF
8078     Defining HAVE_PNG
8079 EOF
8080 cat >> confdefs.h <<\EOF
8081 #define HAVE_PNG 1
8082 EOF
8083 }
8084
8085     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8086   fi
8087
8088     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8089 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8090 echo "configure:8091: checking for tiffio.h" >&5
8091
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 #include <tiffio.h>
8096 EOF
8097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8098 { (eval echo configure:8099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8100 if test -z "$ac_err"; then
8101   rm -rf conftest*
8102   eval "ac_cv_header_$ac_safe=yes"
8103 else
8104   echo "$ac_err" >&5
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_header_$ac_safe=no"
8109 fi
8110 rm -f conftest*
8111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8112   echo "$ac_t""yes" 1>&6
8113   :
8114 else
8115   echo "$ac_t""no" 1>&6
8116 with_tiff=no
8117 fi
8118  }
8119   test -z "$with_tiff" && { 
8120 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8121 echo "configure:8122: checking for TIFFClientOpen in -ltiff" >&5
8122 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8123
8124 xe_check_libs=" -ltiff "
8125 cat > conftest.$ac_ext <<EOF
8126 #line 8127 "configure"
8127 #include "confdefs.h"
8128 /* Override any gcc2 internal prototype to avoid an error.  */
8129 /* We use char because int might match the return type of a gcc2
8130     builtin and then its argument prototype would still apply.  */
8131 char TIFFClientOpen();
8132
8133 int main() {
8134 TIFFClientOpen()
8135 ; return 0; }
8136 EOF
8137 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=yes"
8140 else
8141   echo "configure: failed program was:" >&5
8142   cat conftest.$ac_ext >&5
8143   rm -rf conftest*
8144   eval "ac_cv_lib_$ac_lib_var=no"
8145 fi
8146 rm -f conftest*
8147 xe_check_libs=""
8148
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8150   echo "$ac_t""yes" 1>&6
8151   :
8152 else
8153   echo "$ac_t""no" 1>&6
8154 with_tiff=no
8155 fi
8156
8157  }
8158   test -z "$with_tiff" && with_tiff=yes
8159   if test "$with_tiff" = "yes"; then
8160     { test "$extra_verbose" = "yes" && cat << \EOF
8161     Defining HAVE_TIFF
8162 EOF
8163 cat >> confdefs.h <<\EOF
8164 #define HAVE_TIFF 1
8165 EOF
8166 }
8167
8168     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8169   fi
8170 fi
8171
8172
8173 if test "$with_x11" = "yes"; then
8174
8175   echo "checking for X11 graphics libraries" 1>&6
8176 echo "configure:8177: checking for X11 graphics libraries" >&5
8177
8178   echo "checking for the Athena widgets" 1>&6
8179 echo "configure:8180: checking for the Athena widgets" >&5
8180
8181     case "$with_athena" in
8182         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8183     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8184     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8185     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8186     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8187     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8188   esac
8189
8190     if test "$athena_3d" = "no"; then
8191     
8192 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8193 echo "configure:8194: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8194 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8195
8196 xe_check_libs=" -l$athena_variant "
8197 cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8200 /* Override any gcc2 internal prototype to avoid an error.  */
8201 /* We use char because int might match the return type of a gcc2
8202     builtin and then its argument prototype would still apply.  */
8203 char XawScrollbarSetThumb();
8204
8205 int main() {
8206 XawScrollbarSetThumb()
8207 ; return 0; }
8208 EOF
8209 if { (eval echo configure:8210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8210   rm -rf conftest*
8211   eval "ac_cv_lib_$ac_lib_var=yes"
8212 else
8213   echo "configure: failed program was:" >&5
8214   cat conftest.$ac_ext >&5
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=no"
8217 fi
8218 rm -f conftest*
8219 xe_check_libs=""
8220
8221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8222   echo "$ac_t""yes" 1>&6
8223           
8224 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8225 echo "configure:8226: checking for threeDClassRec in -l$athena_variant" >&5
8226 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8227
8228 xe_check_libs=" -l$athena_variant "
8229 cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 /* Override any gcc2 internal prototype to avoid an error.  */
8233 /* We use char because int might match the return type of a gcc2
8234     builtin and then its argument prototype would still apply.  */
8235 char threeDClassRec();
8236
8237 int main() {
8238 threeDClassRec()
8239 ; return 0; }
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8242   rm -rf conftest*
8243   eval "ac_cv_lib_$ac_lib_var=yes"
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   eval "ac_cv_lib_$ac_lib_var=no"
8249 fi
8250 rm -f conftest*
8251 xe_check_libs=""
8252
8253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8254   echo "$ac_t""yes" 1>&6
8255   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8256 else
8257   echo "$ac_t""no" 1>&6
8258 athena_lib=$athena_variant
8259 fi
8260
8261
8262       
8263 else
8264   echo "$ac_t""no" 1>&6
8265 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8266 fi
8267
8268
8269   else
8270         
8271 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8272 echo "configure:8273: checking for threeDClassRec in -l$athena_variant" >&5
8273 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8274
8275 xe_check_libs=" -l$athena_variant "
8276 cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char threeDClassRec();
8283
8284 int main() {
8285 threeDClassRec()
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_lib_$ac_lib_var=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_lib_$ac_lib_var=no"
8296 fi
8297 rm -f conftest*
8298 xe_check_libs=""
8299
8300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8301   echo "$ac_t""yes" 1>&6
8302   athena_lib=$athena_variant
8303 else
8304   echo "$ac_t""no" 1>&6
8305 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8306 echo "configure:8307: checking for threeDClassRec in -lXaw" >&5
8307 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8308
8309 xe_check_libs=" -lXaw "
8310 cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* Override any gcc2 internal prototype to avoid an error.  */
8314 /* We use char because int might match the return type of a gcc2
8315     builtin and then its argument prototype would still apply.  */
8316 char threeDClassRec();
8317
8318 int main() {
8319 threeDClassRec()
8320 ; return 0; }
8321 EOF
8322 if { (eval echo configure:8323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8323   rm -rf conftest*
8324   eval "ac_cv_lib_$ac_lib_var=yes"
8325 else
8326   echo "configure: failed program was:" >&5
8327   cat conftest.$ac_ext >&5
8328   rm -rf conftest*
8329   eval "ac_cv_lib_$ac_lib_var=no"
8330 fi
8331 rm -f conftest*
8332 xe_check_libs=""
8333
8334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8335   echo "$ac_t""yes" 1>&6
8336   athena_lib=Xaw;
8337           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8338         
8339 else
8340   echo "$ac_t""no" 1>&6
8341 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8342 fi
8343
8344
8345 fi
8346
8347
8348   fi
8349
8350     if test "$athena_3d" = "no"; then
8351     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8352 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8353 echo "configure:8354: checking for X11/Xaw/ThreeD.h" >&5
8354
8355 cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358 #include <X11/Xaw/ThreeD.h>
8359 EOF
8360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8361 { (eval echo configure:8362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8363 if test -z "$ac_err"; then
8364   rm -rf conftest*
8365   eval "ac_cv_header_$ac_safe=yes"
8366 else
8367   echo "$ac_err" >&5
8368   echo "configure: failed program was:" >&5
8369   cat conftest.$ac_ext >&5
8370   rm -rf conftest*
8371   eval "ac_cv_header_$ac_safe=no"
8372 fi
8373 rm -f conftest*
8374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8375   echo "$ac_t""yes" 1>&6
8376   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8377 else
8378   echo "$ac_t""no" 1>&6
8379 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8380 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8381 echo "configure:8382: checking for X11/Xaw/XawInit.h" >&5
8382
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 #include <X11/Xaw/XawInit.h>
8387 EOF
8388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8389 { (eval echo configure:8390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8391 if test -z "$ac_err"; then
8392   rm -rf conftest*
8393   eval "ac_cv_header_$ac_safe=yes"
8394 else
8395   echo "$ac_err" >&5
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   eval "ac_cv_header_$ac_safe=no"
8400 fi
8401 rm -f conftest*
8402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8403   echo "$ac_t""yes" 1>&6
8404   athena_h_path=X11/Xaw
8405 else
8406   echo "$ac_t""no" 1>&6
8407 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8408 fi
8409
8410 fi
8411
8412   else
8413             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8414 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8415 echo "configure:8416: checking for X11/$athena_variant/XawInit.h" >&5
8416
8417 cat > conftest.$ac_ext <<EOF
8418 #line 8419 "configure"
8419 #include "confdefs.h"
8420 #include <X11/$athena_variant/XawInit.h>
8421 EOF
8422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8423 { (eval echo configure:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8425 if test -z "$ac_err"; then
8426   rm -rf conftest*
8427   eval "ac_cv_header_$ac_safe=yes"
8428 else
8429   echo "$ac_err" >&5
8430   echo "configure: failed program was:" >&5
8431   cat conftest.$ac_ext >&5
8432   rm -rf conftest*
8433   eval "ac_cv_header_$ac_safe=no"
8434 fi
8435 rm -f conftest*
8436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8437   echo "$ac_t""yes" 1>&6
8438   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8439 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8440 echo "configure:8441: checking for X11/$athena_variant/ThreeD.h" >&5
8441
8442 cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 #include <X11/$athena_variant/ThreeD.h>
8446 EOF
8447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8448 { (eval echo configure:8449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8450 if test -z "$ac_err"; then
8451   rm -rf conftest*
8452   eval "ac_cv_header_$ac_safe=yes"
8453 else
8454   echo "$ac_err" >&5
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   eval "ac_cv_header_$ac_safe=no"
8459 fi
8460 rm -f conftest*
8461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8462   echo "$ac_t""yes" 1>&6
8463   athena_h_path=X11/$athena_variant
8464 else
8465   echo "$ac_t""no" 1>&6
8466 fi
8467
8468 else
8469   echo "$ac_t""no" 1>&6
8470 fi
8471
8472
8473         if test -z "$athena_h_path"; then
8474       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8475 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8476 echo "configure:8477: checking for $athena_variant/XawInit.h" >&5
8477
8478 cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 #include <$athena_variant/XawInit.h>
8482 EOF
8483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8484 { (eval echo configure:8485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8486 if test -z "$ac_err"; then
8487   rm -rf conftest*
8488   eval "ac_cv_header_$ac_safe=yes"
8489 else
8490   echo "$ac_err" >&5
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_header_$ac_safe=no"
8495 fi
8496 rm -f conftest*
8497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8498   echo "$ac_t""yes" 1>&6
8499   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8500 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8501 echo "configure:8502: checking for $athena_variant/ThreeD.h" >&5
8502
8503 cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 #include <$athena_variant/ThreeD.h>
8507 EOF
8508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8509 { (eval echo configure:8510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8511 if test -z "$ac_err"; then
8512   rm -rf conftest*
8513   eval "ac_cv_header_$ac_safe=yes"
8514 else
8515   echo "$ac_err" >&5
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -rf conftest*
8519   eval "ac_cv_header_$ac_safe=no"
8520 fi
8521 rm -f conftest*
8522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8523   echo "$ac_t""yes" 1>&6
8524   athena_h_path=$athena_variant
8525 else
8526   echo "$ac_t""no" 1>&6
8527 fi
8528
8529 else
8530   echo "$ac_t""no" 1>&6
8531 fi
8532
8533     fi
8534
8535         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8536       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8537 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8538 echo "configure:8539: checking for X11/Xaw3d/XawInit.h" >&5
8539
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <X11/Xaw3d/XawInit.h>
8544 EOF
8545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8546 { (eval echo configure:8547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8548 if test -z "$ac_err"; then
8549   rm -rf conftest*
8550   eval "ac_cv_header_$ac_safe=yes"
8551 else
8552   echo "$ac_err" >&5
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_header_$ac_safe=no"
8557 fi
8558 rm -f conftest*
8559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8560   echo "$ac_t""yes" 1>&6
8561   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8562 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8563 echo "configure:8564: checking for X11/Xaw3d/ThreeD.h" >&5
8564
8565 cat > conftest.$ac_ext <<EOF
8566 #line 8567 "configure"
8567 #include "confdefs.h"
8568 #include <X11/Xaw3d/ThreeD.h>
8569 EOF
8570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8571 { (eval echo configure:8572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8573 if test -z "$ac_err"; then
8574   rm -rf conftest*
8575   eval "ac_cv_header_$ac_safe=yes"
8576 else
8577   echo "$ac_err" >&5
8578   echo "configure: failed program was:" >&5
8579   cat conftest.$ac_ext >&5
8580   rm -rf conftest*
8581   eval "ac_cv_header_$ac_safe=no"
8582 fi
8583 rm -f conftest*
8584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8585   echo "$ac_t""yes" 1>&6
8586   
8587             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8588             athena_h_path=X11/Xaw3d
8589           
8590 else
8591   echo "$ac_t""no" 1>&6
8592 fi
8593
8594 else
8595   echo "$ac_t""no" 1>&6
8596 fi
8597
8598     fi
8599
8600         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8601       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8602 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8603 echo "configure:8604: checking for Xaw3d/XawInit.h" >&5
8604
8605 cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 #include <Xaw3d/XawInit.h>
8609 EOF
8610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8611 { (eval echo configure:8612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8613 if test -z "$ac_err"; then
8614   rm -rf conftest*
8615   eval "ac_cv_header_$ac_safe=yes"
8616 else
8617   echo "$ac_err" >&5
8618   echo "configure: failed program was:" >&5
8619   cat conftest.$ac_ext >&5
8620   rm -rf conftest*
8621   eval "ac_cv_header_$ac_safe=no"
8622 fi
8623 rm -f conftest*
8624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8625   echo "$ac_t""yes" 1>&6
8626   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8627 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8628 echo "configure:8629: checking for Xaw3d/ThreeD.h" >&5
8629
8630 cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 #include <Xaw3d/ThreeD.h>
8634 EOF
8635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8636 { (eval echo configure:8637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8638 if test -z "$ac_err"; then
8639   rm -rf conftest*
8640   eval "ac_cv_header_$ac_safe=yes"
8641 else
8642   echo "$ac_err" >&5
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   eval "ac_cv_header_$ac_safe=no"
8647 fi
8648 rm -f conftest*
8649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8650   echo "$ac_t""yes" 1>&6
8651   
8652             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8653             athena_h_path=Xaw3d
8654           
8655 else
8656   echo "$ac_t""no" 1>&6
8657 fi
8658
8659 else
8660   echo "$ac_t""no" 1>&6
8661 fi
8662
8663     fi
8664
8665             if test -z "$athena_h_path"; then
8666       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8667 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8668 echo "configure:8669: checking for X11/Xaw/ThreeD.h" >&5
8669
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <X11/Xaw/ThreeD.h>
8674 EOF
8675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8676 { (eval echo configure:8677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8678 if test -z "$ac_err"; then
8679   rm -rf conftest*
8680   eval "ac_cv_header_$ac_safe=yes"
8681 else
8682   echo "$ac_err" >&5
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   eval "ac_cv_header_$ac_safe=no"
8687 fi
8688 rm -f conftest*
8689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8690   echo "$ac_t""yes" 1>&6
8691   
8692           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8693           athena_h_path=X11/Xaw
8694         
8695 else
8696   echo "$ac_t""no" 1>&6
8697 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8698 fi
8699
8700     fi
8701   fi
8702
8703     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8704     have_xaw=yes
8705   else
8706     have_xaw=no
8707   fi
8708
8709     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8710 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8711 echo "configure:8712: checking for Xm/Xm.h" >&5
8712
8713 cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <Xm/Xm.h>
8717 EOF
8718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8719 { (eval echo configure:8720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8721 if test -z "$ac_err"; then
8722   rm -rf conftest*
8723   eval "ac_cv_header_$ac_safe=yes"
8724 else
8725   echo "$ac_err" >&5
8726   echo "configure: failed program was:" >&5
8727   cat conftest.$ac_ext >&5
8728   rm -rf conftest*
8729   eval "ac_cv_header_$ac_safe=no"
8730 fi
8731 rm -f conftest*
8732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8733   echo "$ac_t""yes" 1>&6
8734   
8735 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8736 echo "configure:8737: checking for XmStringFree in -lXm" >&5
8737 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8738
8739 xe_check_libs=" -lXm "
8740 cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 /* Override any gcc2 internal prototype to avoid an error.  */
8744 /* We use char because int might match the return type of a gcc2
8745     builtin and then its argument prototype would still apply.  */
8746 char XmStringFree();
8747
8748 int main() {
8749 XmStringFree()
8750 ; return 0; }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8753   rm -rf conftest*
8754   eval "ac_cv_lib_$ac_lib_var=yes"
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   eval "ac_cv_lib_$ac_lib_var=no"
8760 fi
8761 rm -f conftest*
8762 xe_check_libs=""
8763
8764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8765   echo "$ac_t""yes" 1>&6
8766   have_motif=yes
8767 else
8768   echo "$ac_t""no" 1>&6
8769 have_motif=no
8770 fi
8771
8772
8773 else
8774   echo "$ac_t""no" 1>&6
8775 have_motif=no
8776 fi
8777
8778
8779   if test "$have_motif" = "yes"; then
8780         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8781 echo "configure:8782: checking for Lesstif" >&5
8782     cat > conftest.$ac_ext <<EOF
8783 #line 8784 "configure"
8784 #include "confdefs.h"
8785 #include <Xm/Xm.h>
8786 #ifdef LESSTIF_VERSION
8787 yes
8788 #endif
8789
8790 EOF
8791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8792   egrep "yes" >/dev/null 2>&1; then
8793   rm -rf conftest*
8794   have_lesstif=yes
8795 else
8796   rm -rf conftest*
8797   have_lesstif=no
8798 fi
8799 rm -f conftest*
8800
8801   echo "$ac_t""$have_lesstif" 1>&6
8802   fi
8803
8804 fi 
8805
8806 case "$with_menubars" in "" | "yes" | "athena" )
8807   with_menubars="lucid" ;;
8808 esac
8809 case "$with_dialogs" in "" | "yes" | "lucid" )
8810   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8811   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8812   else with_dialogs=no
8813   fi ;;
8814 esac
8815 case "$with_scrollbars" in "" | "yes" )
8816   with_scrollbars="lucid" ;;
8817 esac
8818 case "$with_widgets" in "" | "yes" | "lucid")
8819   if   test "$have_motif" = "yes"; then with_widgets="motif"
8820   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8821   else with_widgets=no
8822   fi ;;
8823 esac
8824
8825 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8826
8827 case "$all_widgets" in
8828   *athena* )
8829     if test "$have_xaw" != "yes"; then
8830       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8831     fi
8832
8833         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8834
8835         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8836
8837                     { test "$extra_verbose" = "yes" && cat << EOF
8838     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8839 EOF
8840 cat >> confdefs.h <<EOF
8841 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8842 EOF
8843 }
8844
8845     { test "$extra_verbose" = "yes" && cat << EOF
8846     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8847 EOF
8848 cat >> confdefs.h <<EOF
8849 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8850 EOF
8851 }
8852
8853     { test "$extra_verbose" = "yes" && cat << EOF
8854     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8855 EOF
8856 cat >> confdefs.h <<EOF
8857 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8858 EOF
8859 }
8860
8861     { test "$extra_verbose" = "yes" && cat << EOF
8862     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8863 EOF
8864 cat >> confdefs.h <<EOF
8865 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8866 EOF
8867 }
8868
8869     { test "$extra_verbose" = "yes" && cat << EOF
8870     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8871 EOF
8872 cat >> confdefs.h <<EOF
8873 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8874 EOF
8875 }
8876
8877     { test "$extra_verbose" = "yes" && cat << EOF
8878     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8879 EOF
8880 cat >> confdefs.h <<EOF
8881 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8882 EOF
8883 }
8884
8885     { test "$extra_verbose" = "yes" && cat << EOF
8886     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8887 EOF
8888 cat >> confdefs.h <<EOF
8889 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8890 EOF
8891 }
8892
8893     { test "$extra_verbose" = "yes" && cat << EOF
8894     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8895 EOF
8896 cat >> confdefs.h <<EOF
8897 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8898 EOF
8899 }
8900
8901     { test "$extra_verbose" = "yes" && cat << EOF
8902     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8903 EOF
8904 cat >> confdefs.h <<EOF
8905 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8906 EOF
8907 }
8908
8909     { test "$extra_verbose" = "yes" && cat << EOF
8910     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8911 EOF
8912 cat >> confdefs.h <<EOF
8913 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8914 EOF
8915 }
8916
8917
8918     { test "$extra_verbose" = "yes" && cat << \EOF
8919     Defining LWLIB_USES_ATHENA
8920 EOF
8921 cat >> confdefs.h <<\EOF
8922 #define LWLIB_USES_ATHENA 1
8923 EOF
8924 }
8925
8926     { test "$extra_verbose" = "yes" && cat << \EOF
8927     Defining NEED_ATHENA
8928 EOF
8929 cat >> confdefs.h <<\EOF
8930 #define NEED_ATHENA 1
8931 EOF
8932 }
8933
8934     need_athena="yes"
8935
8936     if test "$athena_3d" = "yes"; then
8937       { test "$extra_verbose" = "yes" && cat << \EOF
8938     Defining HAVE_ATHENA_3D
8939 EOF
8940 cat >> confdefs.h <<\EOF
8941 #define HAVE_ATHENA_3D 1
8942 EOF
8943 }
8944
8945     fi
8946   ;;
8947 esac
8948
8949 case "$all_widgets" in *motif* )
8950   { test "$extra_verbose" = "yes" && cat << \EOF
8951     Defining LWLIB_USES_MOTIF
8952 EOF
8953 cat >> confdefs.h <<\EOF
8954 #define LWLIB_USES_MOTIF 1
8955 EOF
8956 }
8957
8958   { test "$extra_verbose" = "yes" && cat << \EOF
8959     Defining NEED_MOTIF
8960 EOF
8961 cat >> confdefs.h <<\EOF
8962 #define NEED_MOTIF 1
8963 EOF
8964 }
8965
8966   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8967   need_motif=yes ;;
8968 esac
8969
8970 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8971 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8972 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8973 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8974         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8975 case "$with_widgets" in athena* )
8976         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;;
8977 esac
8978 case "$all_widgets" in *lucid* )
8979   { test "$extra_verbose" = "yes" && cat << \EOF
8980     Defining NEED_LUCID
8981 EOF
8982 cat >> confdefs.h <<\EOF
8983 #define NEED_LUCID 1
8984 EOF
8985 }
8986
8987   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8988 esac
8989
8990
8991
8992 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8993     Defining LWLIB_SCROLLBARS_ATHENA
8994 EOF
8995 cat >> confdefs.h <<\EOF
8996 #define LWLIB_SCROLLBARS_ATHENA 1
8997 EOF
8998 }
8999
9000 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9001     Defining LWLIB_DIALOGS_ATHENA
9002 EOF
9003 cat >> confdefs.h <<\EOF
9004 #define LWLIB_DIALOGS_ATHENA 1
9005 EOF
9006 }
9007
9008
9009 if test "$athena_3d" = "yes"; then
9010   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9011     Defining LWLIB_SCROLLBARS_ATHENA3D
9012 EOF
9013 cat >> confdefs.h <<\EOF
9014 #define LWLIB_SCROLLBARS_ATHENA3D 1
9015 EOF
9016 }
9017
9018   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9019     Defining LWLIB_DIALOGS_ATHENA3D
9020 EOF
9021 cat >> confdefs.h <<\EOF
9022 #define LWLIB_DIALOGS_ATHENA3D 1
9023 EOF
9024 }
9025
9026 fi
9027
9028 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9029     Defining LWLIB_WIDGETS_ATHENA
9030 EOF
9031 cat >> confdefs.h <<\EOF
9032 #define LWLIB_WIDGETS_ATHENA 1
9033 EOF
9034 }
9035 ;; esac
9036 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9037         { test "$extra_verbose" = "yes" && cat << \EOF
9038     Defining LWLIB_TABS_LUCID
9039 EOF
9040 cat >> confdefs.h <<\EOF
9041 #define LWLIB_TABS_LUCID 1
9042 EOF
9043 }
9044
9045
9046 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9047     Defining HAVE_MENUBARS
9048 EOF
9049 cat >> confdefs.h <<\EOF
9050 #define HAVE_MENUBARS 1
9051 EOF
9052 }
9053
9054 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9055     Defining HAVE_SCROLLBARS
9056 EOF
9057 cat >> confdefs.h <<\EOF
9058 #define HAVE_SCROLLBARS 1
9059 EOF
9060 }
9061
9062 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9063     Defining HAVE_DIALOGS
9064 EOF
9065 cat >> confdefs.h <<\EOF
9066 #define HAVE_DIALOGS 1
9067 EOF
9068 }
9069
9070 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9071     Defining HAVE_TOOLBARS
9072 EOF
9073 cat >> confdefs.h <<\EOF
9074 #define HAVE_TOOLBARS 1
9075 EOF
9076 }
9077
9078 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9079     Defining HAVE_WIDGETS
9080 EOF
9081 cat >> confdefs.h <<\EOF
9082 #define HAVE_WIDGETS 1
9083 EOF
9084 }
9085
9086
9087 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9088     Defining LWLIB_MENUBARS_LUCID
9089 EOF
9090 cat >> confdefs.h <<\EOF
9091 #define LWLIB_MENUBARS_LUCID 1
9092 EOF
9093 }
9094
9095 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9096     Defining LWLIB_SCROLLBARS_LUCID
9097 EOF
9098 cat >> confdefs.h <<\EOF
9099 #define LWLIB_SCROLLBARS_LUCID 1
9100 EOF
9101 }
9102
9103
9104 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9105     Defining LWLIB_MENUBARS_MOTIF
9106 EOF
9107 cat >> confdefs.h <<\EOF
9108 #define LWLIB_MENUBARS_MOTIF 1
9109 EOF
9110 }
9111
9112 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9113     Defining LWLIB_SCROLLBARS_MOTIF
9114 EOF
9115 cat >> confdefs.h <<\EOF
9116 #define LWLIB_SCROLLBARS_MOTIF 1
9117 EOF
9118 }
9119
9120 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9121     Defining LWLIB_DIALOGS_MOTIF
9122 EOF
9123 cat >> confdefs.h <<\EOF
9124 #define LWLIB_DIALOGS_MOTIF 1
9125 EOF
9126 }
9127
9128 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9129     Defining LWLIB_WIDGETS_MOTIF
9130 EOF
9131 cat >> confdefs.h <<\EOF
9132 #define LWLIB_WIDGETS_MOTIF 1
9133 EOF
9134 }
9135
9136
9137 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9138    echo "    xemacs will be linked with \"menubar.o\""
9139  fi
9140 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9141    echo "    xemacs will be linked with \"scrollbar.o\""
9142  fi
9143 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9144    echo "    xemacs will be linked with \"dialog.o\""
9145  fi
9146 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9147    echo "    xemacs will be linked with \"toolbar.o\""
9148  fi
9149
9150 if test "$with_x11" = "yes"; then
9151   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9152    echo "    xemacs will be linked with \"menubar-x.o\""
9153  fi
9154   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9155    echo "    xemacs will be linked with \"scrollbar-x.o\""
9156  fi
9157   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9158    echo "    xemacs will be linked with \"dialog-x.o\""
9159  fi
9160   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9161    echo "    xemacs will be linked with \"toolbar-x.o\""
9162  fi
9163   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9164    echo "    xemacs will be linked with \"gui-x.o\""
9165  fi
9166 fi
9167
9168
9169 test -z "$with_mule" && with_mule=no
9170 test -z "$with_file_coding" && with_file_coding=no
9171
9172
9173 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9174   { test "$extra_verbose" = "yes" && cat << \EOF
9175     Defining FILE_CODING
9176 EOF
9177 cat >> confdefs.h <<\EOF
9178 #define FILE_CODING 1
9179 EOF
9180 }
9181
9182   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9183    echo "    xemacs will be linked with \"file-coding.o\""
9184  fi
9185 fi
9186
9187 if test "$with_mule" = "yes" ; then
9188   echo "checking for Mule-related features" 1>&6
9189 echo "configure:9190: checking for Mule-related features" >&5
9190   { test "$extra_verbose" = "yes" && cat << \EOF
9191     Defining MULE
9192 EOF
9193 cat >> confdefs.h <<\EOF
9194 #define MULE 1
9195 EOF
9196 }
9197
9198   { test "$extra_verbose" = "yes" && cat << \EOF
9199     Defining FILE_CODING
9200 EOF
9201 cat >> confdefs.h <<\EOF
9202 #define FILE_CODING 1
9203 EOF
9204 }
9205
9206   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9207    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9208  fi
9209
9210     for ac_hdr in libintl.h
9211 do
9212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9214 echo "configure:9215: checking for $ac_hdr" >&5
9215
9216 cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219 #include <$ac_hdr>
9220 EOF
9221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9222 { (eval echo configure:9223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9224 if test -z "$ac_err"; then
9225   rm -rf conftest*
9226   eval "ac_cv_header_$ac_safe=yes"
9227 else
9228   echo "$ac_err" >&5
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   eval "ac_cv_header_$ac_safe=no"
9233 fi
9234 rm -f conftest*
9235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9236   echo "$ac_t""yes" 1>&6
9237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9238   { test "$extra_verbose" = "yes" && cat << EOF
9239     Defining $ac_tr_hdr
9240 EOF
9241 cat >> confdefs.h <<EOF
9242 #define $ac_tr_hdr 1
9243 EOF
9244 }
9245  
9246 else
9247   echo "$ac_t""no" 1>&6
9248 fi
9249 done
9250
9251   
9252 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9253 echo "configure:9254: checking for strerror in -lintl" >&5
9254 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9255
9256 xe_check_libs=" -lintl "
9257 cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260 /* Override any gcc2 internal prototype to avoid an error.  */
9261 /* We use char because int might match the return type of a gcc2
9262     builtin and then its argument prototype would still apply.  */
9263 char strerror();
9264
9265 int main() {
9266 strerror()
9267 ; return 0; }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9270   rm -rf conftest*
9271   eval "ac_cv_lib_$ac_lib_var=yes"
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   eval "ac_cv_lib_$ac_lib_var=no"
9277 fi
9278 rm -f conftest*
9279 xe_check_libs=""
9280
9281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9282   echo "$ac_t""yes" 1>&6
9283     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9284     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9285   { test "$extra_verbose" = "yes" && cat << EOF
9286     Defining $ac_tr_lib
9287 EOF
9288 cat >> confdefs.h <<EOF
9289 #define $ac_tr_lib 1
9290 EOF
9291 }
9292
9293   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9294
9295 else
9296   echo "$ac_t""no" 1>&6
9297 fi
9298
9299
9300
9301   echo "checking for Mule input methods" 1>&6
9302 echo "configure:9303: checking for Mule input methods" >&5
9303         case "$with_xim" in "" | "yes" )
9304     echo "checking for XIM" 1>&6
9305 echo "configure:9306: checking for XIM" >&5
9306     
9307 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9308 echo "configure:9309: checking for XOpenIM in -lX11" >&5
9309 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9310
9311 xe_check_libs=" -lX11 "
9312 cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 /* Override any gcc2 internal prototype to avoid an error.  */
9316 /* We use char because int might match the return type of a gcc2
9317     builtin and then its argument prototype would still apply.  */
9318 char XOpenIM();
9319
9320 int main() {
9321 XOpenIM()
9322 ; return 0; }
9323 EOF
9324 if { (eval echo configure:9325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9325   rm -rf conftest*
9326   eval "ac_cv_lib_$ac_lib_var=yes"
9327 else
9328   echo "configure: failed program was:" >&5
9329   cat conftest.$ac_ext >&5
9330   rm -rf conftest*
9331   eval "ac_cv_lib_$ac_lib_var=no"
9332 fi
9333 rm -f conftest*
9334 xe_check_libs=""
9335
9336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9337   echo "$ac_t""yes" 1>&6
9338   with_xim=xlib
9339 else
9340   echo "$ac_t""no" 1>&6
9341 with_xim=no
9342 fi
9343
9344
9345         if test "$have_motif $have_lesstif" = "yes no"; then
9346       
9347 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9348 echo "configure:9349: checking for XmImMbLookupString in -lXm" >&5
9349 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9350
9351 xe_check_libs=" -lXm "
9352 cat > conftest.$ac_ext <<EOF
9353 #line 9354 "configure"
9354 #include "confdefs.h"
9355 /* Override any gcc2 internal prototype to avoid an error.  */
9356 /* We use char because int might match the return type of a gcc2
9357     builtin and then its argument prototype would still apply.  */
9358 char XmImMbLookupString();
9359
9360 int main() {
9361 XmImMbLookupString()
9362 ; return 0; }
9363 EOF
9364 if { (eval echo configure:9365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9365   rm -rf conftest*
9366   eval "ac_cv_lib_$ac_lib_var=yes"
9367 else
9368   echo "configure: failed program was:" >&5
9369   cat conftest.$ac_ext >&5
9370   rm -rf conftest*
9371   eval "ac_cv_lib_$ac_lib_var=no"
9372 fi
9373 rm -f conftest*
9374 xe_check_libs=""
9375
9376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9377   echo "$ac_t""yes" 1>&6
9378   with_xim=motif
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383
9384     fi ;;
9385   esac
9386   if test "$with_xim" != "no"; then
9387     { test "$extra_verbose" = "yes" && cat << \EOF
9388     Defining HAVE_XIM
9389 EOF
9390 cat >> confdefs.h <<\EOF
9391 #define HAVE_XIM 1
9392 EOF
9393 }
9394
9395     if test "$with_xim" = "xlib"; then
9396       { test "$extra_verbose" = "yes" && cat << \EOF
9397     Defining XIM_XLIB
9398 EOF
9399 cat >> confdefs.h <<\EOF
9400 #define XIM_XLIB 1
9401 EOF
9402 }
9403
9404       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9405    echo "    xemacs will be linked with \"input-method-xlib.o\""
9406  fi
9407     fi
9408     if test "$with_xim" = "motif"; then
9409       { test "$extra_verbose" = "yes" && cat << \EOF
9410     Defining XIM_MOTIF
9411 EOF
9412 cat >> confdefs.h <<\EOF
9413 #define XIM_MOTIF 1
9414 EOF
9415 }
9416
9417       need_motif=yes
9418       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9419    echo "    xemacs will be linked with \"input-method-motif.o\""
9420  fi
9421     fi
9422     if test "$with_xim" = "motif"; then
9423       with_xfs=no
9424     fi
9425   fi
9426
9427     if test "$with_xfs" = "yes" ; then
9428     echo "checking for XFontSet" 1>&6
9429 echo "configure:9430: checking for XFontSet" >&5
9430     
9431 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9432 echo "configure:9433: checking for XmbDrawString in -lX11" >&5
9433 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9434
9435 xe_check_libs=" -lX11 "
9436 cat > conftest.$ac_ext <<EOF
9437 #line 9438 "configure"
9438 #include "confdefs.h"
9439 /* Override any gcc2 internal prototype to avoid an error.  */
9440 /* We use char because int might match the return type of a gcc2
9441     builtin and then its argument prototype would still apply.  */
9442 char XmbDrawString();
9443
9444 int main() {
9445 XmbDrawString()
9446 ; return 0; }
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9449   rm -rf conftest*
9450   eval "ac_cv_lib_$ac_lib_var=yes"
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   eval "ac_cv_lib_$ac_lib_var=no"
9456 fi
9457 rm -f conftest*
9458 xe_check_libs=""
9459
9460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9461   echo "$ac_t""yes" 1>&6
9462   :
9463 else
9464   echo "$ac_t""no" 1>&6
9465 with_xfs=no
9466 fi
9467
9468
9469     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9470       { test "$extra_verbose" = "yes" && cat << \EOF
9471     Defining USE_XFONTSET
9472 EOF
9473 cat >> confdefs.h <<\EOF
9474 #define USE_XFONTSET 1
9475 EOF
9476 }
9477
9478       if test "$with_xim" = "no" ; then
9479         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9480    echo "    xemacs will be linked with \"input-method-xlib.o\""
9481  fi
9482       fi
9483     fi
9484   fi 
9485     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9486   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9487 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9488 echo "configure:9489: checking for wnn/jllib.h" >&5
9489
9490 cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 #include <wnn/jllib.h>
9494 EOF
9495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9496 { (eval echo configure:9497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9498 if test -z "$ac_err"; then
9499   rm -rf conftest*
9500   eval "ac_cv_header_$ac_safe=yes"
9501 else
9502   echo "$ac_err" >&5
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   eval "ac_cv_header_$ac_safe=no"
9507 fi
9508 rm -f conftest*
9509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9510   echo "$ac_t""yes" 1>&6
9511   :
9512 else
9513   echo "$ac_t""no" 1>&6
9514 with_wnn=no
9515 fi
9516  }
9517     if test "$with_wnn" != "no"; then
9518     for ac_func in crypt
9519 do
9520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9521 echo "configure:9522: checking for $ac_func" >&5
9522
9523 cat > conftest.$ac_ext <<EOF
9524 #line 9525 "configure"
9525 #include "confdefs.h"
9526 /* System header to define __stub macros and hopefully few prototypes,
9527     which can conflict with char $ac_func(); below.  */
9528 #include <assert.h>
9529 /* Override any gcc2 internal prototype to avoid an error.  */
9530 /* We use char because int might match the return type of a gcc2
9531     builtin and then its argument prototype would still apply.  */
9532 char $ac_func();
9533
9534 int main() {
9535
9536 /* The GNU C library defines this for functions which it implements
9537     to always fail with ENOSYS.  Some functions are actually named
9538     something starting with __ and the normal name is an alias.  */
9539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9540 choke me
9541 #else
9542 $ac_func();
9543 #endif
9544
9545 ; return 0; }
9546 EOF
9547 if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9548   rm -rf conftest*
9549   eval "ac_cv_func_$ac_func=yes"
9550 else
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -rf conftest*
9554   eval "ac_cv_func_$ac_func=no"
9555 fi
9556 rm -f conftest*
9557
9558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9559   echo "$ac_t""yes" 1>&6
9560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9561   { test "$extra_verbose" = "yes" && cat << EOF
9562     Defining $ac_tr_func
9563 EOF
9564 cat >> confdefs.h <<EOF
9565 #define $ac_tr_func 1
9566 EOF
9567 }
9568  
9569 else
9570   echo "$ac_t""no" 1>&6
9571 fi
9572 done
9573
9574     test "$ac_cv_func_crypt" != "yes" && { 
9575 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9576 echo "configure:9577: checking for crypt in -lcrypt" >&5
9577 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9578
9579 xe_check_libs=" -lcrypt "
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* Override any gcc2 internal prototype to avoid an error.  */
9584 /* We use char because int might match the return type of a gcc2
9585     builtin and then its argument prototype would still apply.  */
9586 char crypt();
9587
9588 int main() {
9589 crypt()
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9593   rm -rf conftest*
9594   eval "ac_cv_lib_$ac_lib_var=yes"
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_lib_$ac_lib_var=no"
9600 fi
9601 rm -f conftest*
9602 xe_check_libs=""
9603
9604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9605   echo "$ac_t""yes" 1>&6
9606     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9608   { test "$extra_verbose" = "yes" && cat << EOF
9609     Defining $ac_tr_lib
9610 EOF
9611 cat >> confdefs.h <<EOF
9612 #define $ac_tr_lib 1
9613 EOF
9614 }
9615
9616   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9617
9618 else
9619   echo "$ac_t""no" 1>&6
9620 fi
9621
9622  }
9623   fi
9624     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9625     
9626 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9627 echo "configure:9628: checking for jl_dic_list_e in -lwnn" >&5
9628 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9629
9630 xe_check_libs=" -lwnn "
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* Override any gcc2 internal prototype to avoid an error.  */
9635 /* We use char because int might match the return type of a gcc2
9636     builtin and then its argument prototype would still apply.  */
9637 char jl_dic_list_e();
9638
9639 int main() {
9640 jl_dic_list_e()
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9644   rm -rf conftest*
9645   eval "ac_cv_lib_$ac_lib_var=yes"
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649   rm -rf conftest*
9650   eval "ac_cv_lib_$ac_lib_var=no"
9651 fi
9652 rm -f conftest*
9653 xe_check_libs=""
9654
9655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9656   echo "$ac_t""yes" 1>&6
9657   libwnn=wnn
9658 else
9659   echo "$ac_t""no" 1>&6
9660 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9661 echo "configure:9662: checking for jl_dic_list_e in -lwnn4" >&5
9662 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9663
9664 xe_check_libs=" -lwnn4 "
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 /* Override any gcc2 internal prototype to avoid an error.  */
9669 /* We use char because int might match the return type of a gcc2
9670     builtin and then its argument prototype would still apply.  */
9671 char jl_dic_list_e();
9672
9673 int main() {
9674 jl_dic_list_e()
9675 ; return 0; }
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9678   rm -rf conftest*
9679   eval "ac_cv_lib_$ac_lib_var=yes"
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -rf conftest*
9684   eval "ac_cv_lib_$ac_lib_var=no"
9685 fi
9686 rm -f conftest*
9687 xe_check_libs=""
9688
9689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9690   echo "$ac_t""yes" 1>&6
9691   libwnn=wnn4
9692 else
9693   echo "$ac_t""no" 1>&6
9694 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9695 echo "configure:9696: checking for jl_dic_list_e in -lwnn6" >&5
9696 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9697
9698 xe_check_libs=" -lwnn6 "
9699 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 /* Override any gcc2 internal prototype to avoid an error.  */
9703 /* We use char because int might match the return type of a gcc2
9704     builtin and then its argument prototype would still apply.  */
9705 char jl_dic_list_e();
9706
9707 int main() {
9708 jl_dic_list_e()
9709 ; return 0; }
9710 EOF
9711 if { (eval echo configure:9712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9712   rm -rf conftest*
9713   eval "ac_cv_lib_$ac_lib_var=yes"
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717   rm -rf conftest*
9718   eval "ac_cv_lib_$ac_lib_var=no"
9719 fi
9720 rm -f conftest*
9721 xe_check_libs=""
9722
9723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9724   echo "$ac_t""yes" 1>&6
9725   libwnn=wnn6
9726 else
9727   echo "$ac_t""no" 1>&6
9728 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9729 echo "configure:9730: checking for dic_list_e in -lwnn6_fromsrc" >&5
9730 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9731
9732 xe_check_libs=" -lwnn6_fromsrc "
9733 cat > conftest.$ac_ext <<EOF
9734 #line 9735 "configure"
9735 #include "confdefs.h"
9736 /* Override any gcc2 internal prototype to avoid an error.  */
9737 /* We use char because int might match the return type of a gcc2
9738     builtin and then its argument prototype would still apply.  */
9739 char dic_list_e();
9740
9741 int main() {
9742 dic_list_e()
9743 ; return 0; }
9744 EOF
9745 if { (eval echo configure:9746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9746   rm -rf conftest*
9747   eval "ac_cv_lib_$ac_lib_var=yes"
9748 else
9749   echo "configure: failed program was:" >&5
9750   cat conftest.$ac_ext >&5
9751   rm -rf conftest*
9752   eval "ac_cv_lib_$ac_lib_var=no"
9753 fi
9754 rm -f conftest*
9755 xe_check_libs=""
9756
9757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9758   echo "$ac_t""yes" 1>&6
9759   libwnn=wnn6_fromsrc
9760 else
9761   echo "$ac_t""no" 1>&6
9762 with_wnn=no
9763 fi
9764
9765
9766 fi
9767
9768
9769 fi
9770
9771
9772 fi
9773
9774
9775   fi
9776   test -z "$with_wnn" && with_wnn=yes
9777   if test "$with_wnn" = "yes"; then
9778     { test "$extra_verbose" = "yes" && cat << \EOF
9779     Defining HAVE_WNN
9780 EOF
9781 cat >> confdefs.h <<\EOF
9782 #define HAVE_WNN 1
9783 EOF
9784 }
9785
9786     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9787     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9788    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9789  fi
9790     if test "$with_wnn6" != "no"; then
9791       
9792 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9793 echo "configure:9794: checking for jl_fi_dic_list in -l$libwnn" >&5
9794 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9795
9796 xe_check_libs=" -l$libwnn "
9797 cat > conftest.$ac_ext <<EOF
9798 #line 9799 "configure"
9799 #include "confdefs.h"
9800 /* Override any gcc2 internal prototype to avoid an error.  */
9801 /* We use char because int might match the return type of a gcc2
9802     builtin and then its argument prototype would still apply.  */
9803 char jl_fi_dic_list();
9804
9805 int main() {
9806 jl_fi_dic_list()
9807 ; return 0; }
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9810   rm -rf conftest*
9811   eval "ac_cv_lib_$ac_lib_var=yes"
9812 else
9813   echo "configure: failed program was:" >&5
9814   cat conftest.$ac_ext >&5
9815   rm -rf conftest*
9816   eval "ac_cv_lib_$ac_lib_var=no"
9817 fi
9818 rm -f conftest*
9819 xe_check_libs=""
9820
9821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9822   echo "$ac_t""yes" 1>&6
9823   with_wnn6=yes
9824 else
9825   echo "$ac_t""no" 1>&6
9826 fi
9827
9828
9829       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9830     Defining WNN6
9831 EOF
9832 cat >> confdefs.h <<\EOF
9833 #define WNN6 1
9834 EOF
9835 }
9836
9837     fi
9838   fi
9839
9840     canna_includes_found=no
9841   if test "$with_canna" != "no"; then
9842     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9843 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9844 echo "configure:9845: checking for canna/jrkanji.h" >&5
9845
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 #include <canna/jrkanji.h>
9850 EOF
9851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9852 { (eval echo configure:9853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9854 if test -z "$ac_err"; then
9855   rm -rf conftest*
9856   eval "ac_cv_header_$ac_safe=yes"
9857 else
9858   echo "$ac_err" >&5
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -rf conftest*
9862   eval "ac_cv_header_$ac_safe=no"
9863 fi
9864 rm -f conftest*
9865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9866   echo "$ac_t""yes" 1>&6
9867   canna_includes_found=yes
9868 else
9869   echo "$ac_t""no" 1>&6
9870 fi
9871
9872   fi
9873   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9874       -d "/usr/local/canna/include"; then
9875     save_c_switch_site="$c_switch_site"
9876     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9877     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9878 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9879 echo "configure:9880: checking for canna/jrkanji.h" >&5
9880
9881 cat > conftest.$ac_ext <<EOF
9882 #line 9883 "configure"
9883 #include "confdefs.h"
9884 #include <canna/jrkanji.h>
9885 EOF
9886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9887 { (eval echo configure:9888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9889 if test -z "$ac_err"; then
9890   rm -rf conftest*
9891   eval "ac_cv_header_$ac_safe=yes"
9892 else
9893   echo "$ac_err" >&5
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   eval "ac_cv_header_$ac_safe=no"
9898 fi
9899 rm -f conftest*
9900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9901   echo "$ac_t""yes" 1>&6
9902   canna_includes_found=yes
9903 else
9904   echo "$ac_t""no" 1>&6
9905 fi
9906
9907     if test "$canna_includes_found" != "yes"; then
9908       c_switch_site="$save_c_switch_site"
9909       with_canna="no"
9910     fi
9911   fi
9912
9913   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9914 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9915 echo "configure:9916: checking for canna/RK.h" >&5
9916
9917 cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 #include <canna/RK.h>
9921 EOF
9922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9923 { (eval echo configure:9924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9925 if test -z "$ac_err"; then
9926   rm -rf conftest*
9927   eval "ac_cv_header_$ac_safe=yes"
9928 else
9929   echo "$ac_err" >&5
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_header_$ac_safe=no"
9934 fi
9935 rm -f conftest*
9936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9937   echo "$ac_t""yes" 1>&6
9938   :
9939 else
9940   echo "$ac_t""no" 1>&6
9941 with_canna=no
9942 fi
9943  }
9944   test -z "$with_canna" && { 
9945 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9946 echo "configure:9947: checking for RkBgnBun in -lRKC" >&5
9947 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9948
9949 xe_check_libs=" -lRKC "
9950 cat > conftest.$ac_ext <<EOF
9951 #line 9952 "configure"
9952 #include "confdefs.h"
9953 /* Override any gcc2 internal prototype to avoid an error.  */
9954 /* We use char because int might match the return type of a gcc2
9955     builtin and then its argument prototype would still apply.  */
9956 char RkBgnBun();
9957
9958 int main() {
9959 RkBgnBun()
9960 ; return 0; }
9961 EOF
9962 if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9963   rm -rf conftest*
9964   eval "ac_cv_lib_$ac_lib_var=yes"
9965 else
9966   echo "configure: failed program was:" >&5
9967   cat conftest.$ac_ext >&5
9968   rm -rf conftest*
9969   eval "ac_cv_lib_$ac_lib_var=no"
9970 fi
9971 rm -f conftest*
9972 xe_check_libs=""
9973
9974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9975   echo "$ac_t""yes" 1>&6
9976   :
9977 else
9978   echo "$ac_t""no" 1>&6
9979 with_canna=no
9980 fi
9981
9982  }
9983   test -z "$with_canna" && { 
9984 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9985 echo "configure:9986: checking for jrKanjiControl in -lcanna" >&5
9986 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9987
9988 xe_check_libs=" -lcanna "
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char jrKanjiControl();
9996
9997 int main() {
9998 jrKanjiControl()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=yes"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   eval "ac_cv_lib_$ac_lib_var=no"
10009 fi
10010 rm -f conftest*
10011 xe_check_libs=""
10012
10013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10014   echo "$ac_t""yes" 1>&6
10015   :
10016 else
10017   echo "$ac_t""no" 1>&6
10018 with_canna=no
10019 fi
10020
10021  }
10022   test -z "$with_canna" && with_canna=yes
10023   if test "$with_canna" = "yes"; then
10024     { test "$extra_verbose" = "yes" && cat << \EOF
10025     Defining HAVE_CANNA
10026 EOF
10027 cat >> confdefs.h <<\EOF
10028 #define HAVE_CANNA 1
10029 EOF
10030 }
10031
10032     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10033     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10034    echo "    xemacs will be linked with \"mule-canna.o\""
10035  fi
10036   fi
10037
10038 else   for feature in xim canna wnn; do
10039     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10040       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10041     fi
10042     eval "with_${feature}=no"
10043   done
10044 fi 
10045
10046 if test "$need_motif" = "yes" ; then
10047   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10048     
10049 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10050 echo "configure:10051: checking for layout_object_getvalue in -li18n" >&5
10051 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10052
10053 xe_check_libs=" -li18n "
10054 cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057 /* Override any gcc2 internal prototype to avoid an error.  */
10058 /* We use char because int might match the return type of a gcc2
10059     builtin and then its argument prototype would still apply.  */
10060 char layout_object_getvalue();
10061
10062 int main() {
10063 layout_object_getvalue()
10064 ; return 0; }
10065 EOF
10066 if { (eval echo configure:10067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10067   rm -rf conftest*
10068   eval "ac_cv_lib_$ac_lib_var=yes"
10069 else
10070   echo "configure: failed program was:" >&5
10071   cat conftest.$ac_ext >&5
10072   rm -rf conftest*
10073   eval "ac_cv_lib_$ac_lib_var=no"
10074 fi
10075 rm -f conftest*
10076 xe_check_libs=""
10077
10078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10079   echo "$ac_t""yes" 1>&6
10080   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10081 else
10082   echo "$ac_t""no" 1>&6
10083 fi
10084
10085
10086   
10087 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10088     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10089   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10090   
10091         runpath="" runpath_dirs=""
10092   if test -n "$LD_RUN_PATH"; then
10093     runpath="$LD_RUN_PATH"
10094   elif test "$GCC" = "yes"; then
10095         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10096     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10097     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10098     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10099       case "$arg" in P,* | -L* | -R* )
10100         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10101           {
10102 xe_runpath_dir="$dir"
10103   test "$xe_runpath_dir" != "/lib"     -a \
10104         "$xe_runpath_dir" != "/usr/lib" -a \
10105         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10106   eval "$xe_add_unique_runpath_dir"
10107 }
10108         done ;;
10109       esac
10110     done
10111     ld_switch_run="$ld_switch_run_save"
10112     rm -f conftest*
10113   else
10114         for arg in $ld_switch_site $ld_switch_x_site; do
10115       case "$arg" in -L*) {
10116 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10117   test "$xe_runpath_dir" != "/lib"     -a \
10118         "$xe_runpath_dir" != "/usr/lib" -a \
10119         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10120   eval "$xe_add_unique_runpath_dir"
10121 };; esac
10122     done
10123         if test "$opsys $need_motif" = "sol2 yes"; then
10124       xe_runpath_dir="/opt/SUNWdt/lib";
10125       eval "$xe_add_unique_runpath_dir";
10126     fi
10127   fi 
10128   if test -n "$runpath"; then
10129     ld_switch_run="${dash_r}${runpath}"
10130     
10131 if test "$GCC" = "yes"; then
10132   set x $ld_switch_run; shift; ld_switch_run=""
10133   while test -n "$1"; do
10134     case $1 in
10135       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10136       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10137       -Xlinker* ) ;;
10138       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10139     esac
10140     shift
10141   done
10142 fi
10143     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10144   fi
10145 fi
10146
10147 fi
10148
10149 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10150 do
10151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10152 echo "configure:10153: checking for $ac_func" >&5
10153
10154 cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157 /* System header to define __stub macros and hopefully few prototypes,
10158     which can conflict with char $ac_func(); below.  */
10159 #include <assert.h>
10160 /* Override any gcc2 internal prototype to avoid an error.  */
10161 /* We use char because int might match the return type of a gcc2
10162     builtin and then its argument prototype would still apply.  */
10163 char $ac_func();
10164
10165 int main() {
10166
10167 /* The GNU C library defines this for functions which it implements
10168     to always fail with ENOSYS.  Some functions are actually named
10169     something starting with __ and the normal name is an alias.  */
10170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10171 choke me
10172 #else
10173 $ac_func();
10174 #endif
10175
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_func_$ac_func=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_func_$ac_func=no"
10186 fi
10187 rm -f conftest*
10188
10189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10192   { test "$extra_verbose" = "yes" && cat << EOF
10193     Defining $ac_tr_func
10194 EOF
10195 cat >> confdefs.h <<EOF
10196 #define $ac_tr_func 1
10197 EOF
10198 }
10199  
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203 done
10204
10205
10206 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10207 do
10208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10209 echo "configure:10210: checking for $ac_func" >&5
10210
10211 cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214 /* System header to define __stub macros and hopefully few prototypes,
10215     which can conflict with char $ac_func(); below.  */
10216 #include <assert.h>
10217 /* Override any gcc2 internal prototype to avoid an error.  */
10218 /* We use char because int might match the return type of a gcc2
10219     builtin and then its argument prototype would still apply.  */
10220 char $ac_func();
10221
10222 int main() {
10223
10224 /* The GNU C library defines this for functions which it implements
10225     to always fail with ENOSYS.  Some functions are actually named
10226     something starting with __ and the normal name is an alias.  */
10227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10228 choke me
10229 #else
10230 $ac_func();
10231 #endif
10232
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10236   rm -rf conftest*
10237   eval "ac_cv_func_$ac_func=yes"
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   eval "ac_cv_func_$ac_func=no"
10243 fi
10244 rm -f conftest*
10245
10246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10247   echo "$ac_t""yes" 1>&6
10248     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10249   { test "$extra_verbose" = "yes" && cat << EOF
10250     Defining $ac_tr_func
10251 EOF
10252 cat >> confdefs.h <<EOF
10253 #define $ac_tr_func 1
10254 EOF
10255 }
10256  
10257 else
10258   echo "$ac_t""no" 1>&6
10259 fi
10260 done
10261
10262
10263 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10264 echo "configure:10265: checking for openpty" >&5
10265
10266 cat > conftest.$ac_ext <<EOF
10267 #line 10268 "configure"
10268 #include "confdefs.h"
10269 /* System header to define __stub macros and hopefully few prototypes,
10270     which can conflict with char openpty(); below.  */
10271 #include <assert.h>
10272 /* Override any gcc2 internal prototype to avoid an error.  */
10273 /* We use char because int might match the return type of a gcc2
10274     builtin and then its argument prototype would still apply.  */
10275 char openpty();
10276
10277 int main() {
10278
10279 /* The GNU C library defines this for functions which it implements
10280     to always fail with ENOSYS.  Some functions are actually named
10281     something starting with __ and the normal name is an alias.  */
10282 #if defined (__stub_openpty) || defined (__stub___openpty)
10283 choke me
10284 #else
10285 openpty();
10286 #endif
10287
10288 ; return 0; }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10291   rm -rf conftest*
10292   eval "ac_cv_func_openpty=yes"
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -rf conftest*
10297   eval "ac_cv_func_openpty=no"
10298 fi
10299 rm -f conftest*
10300
10301 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10302   echo "$ac_t""yes" 1>&6
10303   have_openpty=yes
10304 else
10305   echo "$ac_t""no" 1>&6
10306
10307   
10308 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10309 echo "configure:10310: checking for openpty in -lutil" >&5
10310 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10311
10312 xe_check_libs=" -lutil "
10313 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 /* Override any gcc2 internal prototype to avoid an error.  */
10317 /* We use char because int might match the return type of a gcc2
10318     builtin and then its argument prototype would still apply.  */
10319 char openpty();
10320
10321 int main() {
10322 openpty()
10323 ; return 0; }
10324 EOF
10325 if { (eval echo configure:10326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10326   rm -rf conftest*
10327   eval "ac_cv_lib_$ac_lib_var=yes"
10328 else
10329   echo "configure: failed program was:" >&5
10330   cat conftest.$ac_ext >&5
10331   rm -rf conftest*
10332   eval "ac_cv_lib_$ac_lib_var=no"
10333 fi
10334 rm -f conftest*
10335 xe_check_libs=""
10336
10337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10338   echo "$ac_t""yes" 1>&6
10339   have_openpty=yes need_libutil=yes
10340 else
10341   echo "$ac_t""no" 1>&6
10342 fi
10343
10344
10345 fi
10346
10347 if test "$have_openpty" = "yes"; then
10348   { test "$extra_verbose" = "yes" && cat << \EOF
10349     Defining HAVE_OPENPTY
10350 EOF
10351 cat >> confdefs.h <<\EOF
10352 #define HAVE_OPENPTY 1
10353 EOF
10354 }
10355
10356   for ac_hdr in pty.h libutil.h
10357 do
10358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10360 echo "configure:10361: checking for $ac_hdr" >&5
10361
10362 cat > conftest.$ac_ext <<EOF
10363 #line 10364 "configure"
10364 #include "confdefs.h"
10365 #include <$ac_hdr>
10366 EOF
10367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10368 { (eval echo configure:10369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10370 if test -z "$ac_err"; then
10371   rm -rf conftest*
10372   eval "ac_cv_header_$ac_safe=yes"
10373 else
10374   echo "$ac_err" >&5
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   eval "ac_cv_header_$ac_safe=no"
10379 fi
10380 rm -f conftest*
10381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10382   echo "$ac_t""yes" 1>&6
10383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10384   { test "$extra_verbose" = "yes" && cat << EOF
10385     Defining $ac_tr_hdr
10386 EOF
10387 cat >> confdefs.h <<EOF
10388 #define $ac_tr_hdr 1
10389 EOF
10390 }
10391  
10392 else
10393   echo "$ac_t""no" 1>&6
10394 fi
10395 done
10396
10397   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10398 fi
10399
10400 for ac_hdr in stropts.h
10401 do
10402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10404 echo "configure:10405: checking for $ac_hdr" >&5
10405
10406 cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <$ac_hdr>
10410 EOF
10411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10412 { (eval echo configure:10413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10414 if test -z "$ac_err"; then
10415   rm -rf conftest*
10416   eval "ac_cv_header_$ac_safe=yes"
10417 else
10418   echo "$ac_err" >&5
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=no"
10423 fi
10424 rm -f conftest*
10425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10426   echo "$ac_t""yes" 1>&6
10427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10428   { test "$extra_verbose" = "yes" && cat << EOF
10429     Defining $ac_tr_hdr
10430 EOF
10431 cat >> confdefs.h <<EOF
10432 #define $ac_tr_hdr 1
10433 EOF
10434 }
10435  
10436 else
10437   echo "$ac_t""no" 1>&6
10438 fi
10439 done
10440
10441 if test "$ac_cv_header_stropts_h" = "yes"; then
10442   for ac_func in isastream
10443 do
10444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10445 echo "configure:10446: checking for $ac_func" >&5
10446
10447 cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 /* System header to define __stub macros and hopefully few prototypes,
10451     which can conflict with char $ac_func(); below.  */
10452 #include <assert.h>
10453 /* Override any gcc2 internal prototype to avoid an error.  */
10454 /* We use char because int might match the return type of a gcc2
10455     builtin and then its argument prototype would still apply.  */
10456 char $ac_func();
10457
10458 int main() {
10459
10460 /* The GNU C library defines this for functions which it implements
10461     to always fail with ENOSYS.  Some functions are actually named
10462     something starting with __ and the normal name is an alias.  */
10463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10464 choke me
10465 #else
10466 $ac_func();
10467 #endif
10468
10469 ; return 0; }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10472   rm -rf conftest*
10473   eval "ac_cv_func_$ac_func=yes"
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   eval "ac_cv_func_$ac_func=no"
10479 fi
10480 rm -f conftest*
10481
10482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10485   { test "$extra_verbose" = "yes" && cat << EOF
10486     Defining $ac_tr_func
10487 EOF
10488 cat >> confdefs.h <<EOF
10489 #define $ac_tr_func 1
10490 EOF
10491 }
10492  
10493 else
10494   echo "$ac_t""no" 1>&6
10495 fi
10496 done
10497
10498   for ac_hdr in strtio.h
10499 do
10500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10502 echo "configure:10503: checking for $ac_hdr" >&5
10503
10504 cat > conftest.$ac_ext <<EOF
10505 #line 10506 "configure"
10506 #include "confdefs.h"
10507 #include <$ac_hdr>
10508 EOF
10509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10510 { (eval echo configure:10511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10512 if test -z "$ac_err"; then
10513   rm -rf conftest*
10514   eval "ac_cv_header_$ac_safe=yes"
10515 else
10516   echo "$ac_err" >&5
10517   echo "configure: failed program was:" >&5
10518   cat conftest.$ac_ext >&5
10519   rm -rf conftest*
10520   eval "ac_cv_header_$ac_safe=no"
10521 fi
10522 rm -f conftest*
10523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10524   echo "$ac_t""yes" 1>&6
10525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10526   { test "$extra_verbose" = "yes" && cat << EOF
10527     Defining $ac_tr_hdr
10528 EOF
10529 cat >> confdefs.h <<EOF
10530 #define $ac_tr_hdr 1
10531 EOF
10532 }
10533  
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537 done
10538  fi
10539
10540 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10541    echo "    xemacs will be linked with \"realpath.o\""
10542  fi
10543
10544 for ac_func in getloadavg
10545 do
10546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10547 echo "configure:10548: checking for $ac_func" >&5
10548
10549 cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552 /* System header to define __stub macros and hopefully few prototypes,
10553     which can conflict with char $ac_func(); below.  */
10554 #include <assert.h>
10555 /* Override any gcc2 internal prototype to avoid an error.  */
10556 /* We use char because int might match the return type of a gcc2
10557     builtin and then its argument prototype would still apply.  */
10558 char $ac_func();
10559
10560 int main() {
10561
10562 /* The GNU C library defines this for functions which it implements
10563     to always fail with ENOSYS.  Some functions are actually named
10564     something starting with __ and the normal name is an alias.  */
10565 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10566 choke me
10567 #else
10568 $ac_func();
10569 #endif
10570
10571 ; return 0; }
10572 EOF
10573 if { (eval echo configure:10574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10574   rm -rf conftest*
10575   eval "ac_cv_func_$ac_func=yes"
10576 else
10577   echo "configure: failed program was:" >&5
10578   cat conftest.$ac_ext >&5
10579   rm -rf conftest*
10580   eval "ac_cv_func_$ac_func=no"
10581 fi
10582 rm -f conftest*
10583
10584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10587   { test "$extra_verbose" = "yes" && cat << EOF
10588     Defining $ac_tr_func
10589 EOF
10590 cat >> confdefs.h <<EOF
10591 #define $ac_tr_func 1
10592 EOF
10593 }
10594  
10595 else
10596   echo "$ac_t""no" 1>&6
10597 fi
10598 done
10599
10600
10601 if test "$ac_cv_func_getloadavg" = "yes"; then
10602         for ac_hdr in sys/loadavg.h
10603 do
10604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10606 echo "configure:10607: checking for $ac_hdr" >&5
10607
10608 cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 #include <$ac_hdr>
10612 EOF
10613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10614 { (eval echo configure:10615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10616 if test -z "$ac_err"; then
10617   rm -rf conftest*
10618   eval "ac_cv_header_$ac_safe=yes"
10619 else
10620   echo "$ac_err" >&5
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_header_$ac_safe=no"
10625 fi
10626 rm -f conftest*
10627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10630   { test "$extra_verbose" = "yes" && cat << EOF
10631     Defining $ac_tr_hdr
10632 EOF
10633 cat >> confdefs.h <<EOF
10634 #define $ac_tr_hdr 1
10635 EOF
10636 }
10637  
10638 else
10639   echo "$ac_t""no" 1>&6
10640 fi
10641 done
10642
10643 else
10644     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10645    echo "    xemacs will be linked with \"getloadavg.o\""
10646  fi
10647
10648     
10649 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10650 echo "configure:10651: checking for kstat_open in -lkstat" >&5
10651 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10652
10653 xe_check_libs=" -lkstat "
10654 cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 /* Override any gcc2 internal prototype to avoid an error.  */
10658 /* We use char because int might match the return type of a gcc2
10659     builtin and then its argument prototype would still apply.  */
10660 char kstat_open();
10661
10662 int main() {
10663 kstat_open()
10664 ; return 0; }
10665 EOF
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10667   rm -rf conftest*
10668   eval "ac_cv_lib_$ac_lib_var=yes"
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=no"
10674 fi
10675 rm -f conftest*
10676 xe_check_libs=""
10677
10678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10679   echo "$ac_t""yes" 1>&6
10680     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10681     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10682   { test "$extra_verbose" = "yes" && cat << EOF
10683     Defining $ac_tr_lib
10684 EOF
10685 cat >> confdefs.h <<EOF
10686 #define $ac_tr_lib 1
10687 EOF
10688 }
10689
10690   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10691
10692 else
10693   echo "$ac_t""no" 1>&6
10694 fi
10695
10696
10697   for ac_hdr in kstat.h
10698 do
10699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10701 echo "configure:10702: checking for $ac_hdr" >&5
10702
10703 cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706 #include <$ac_hdr>
10707 EOF
10708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10709 { (eval echo configure:10710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10711 if test -z "$ac_err"; then
10712   rm -rf conftest*
10713   eval "ac_cv_header_$ac_safe=yes"
10714 else
10715   echo "$ac_err" >&5
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_header_$ac_safe=no"
10720 fi
10721 rm -f conftest*
10722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10723   echo "$ac_t""yes" 1>&6
10724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10725   { test "$extra_verbose" = "yes" && cat << EOF
10726     Defining $ac_tr_hdr
10727 EOF
10728 cat >> confdefs.h <<EOF
10729 #define $ac_tr_hdr 1
10730 EOF
10731 }
10732  
10733 else
10734   echo "$ac_t""no" 1>&6
10735 fi
10736 done
10737
10738
10739     
10740 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10741 echo "configure:10742: checking for kvm_read in -lkvm" >&5
10742 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10743
10744 xe_check_libs=" -lkvm "
10745 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748 /* Override any gcc2 internal prototype to avoid an error.  */
10749 /* We use char because int might match the return type of a gcc2
10750     builtin and then its argument prototype would still apply.  */
10751 char kvm_read();
10752
10753 int main() {
10754 kvm_read()
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=yes"
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=no"
10765 fi
10766 rm -f conftest*
10767 xe_check_libs=""
10768
10769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10770   echo "$ac_t""yes" 1>&6
10771     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10772     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10773   { test "$extra_verbose" = "yes" && cat << EOF
10774     Defining $ac_tr_lib
10775 EOF
10776 cat >> confdefs.h <<EOF
10777 #define $ac_tr_lib 1
10778 EOF
10779 }
10780
10781   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10782
10783 else
10784   echo "$ac_t""no" 1>&6
10785 fi
10786
10787
10788 fi
10789
10790 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10791 echo "configure:10792: checking whether netdb declares h_errno" >&5
10792 cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795 #include <netdb.h>
10796 int main() {
10797 return h_errno;
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10801   rm -rf conftest*
10802   echo "$ac_t""yes" 1>&6
10803    { test "$extra_verbose" = "yes" && cat << \EOF
10804     Defining HAVE_H_ERRNO
10805 EOF
10806 cat >> confdefs.h <<\EOF
10807 #define HAVE_H_ERRNO 1
10808 EOF
10809 }
10810
10811 else
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   echo "$ac_t""no" 1>&6
10816 fi
10817 rm -f conftest*
10818
10819 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10820 echo "configure:10821: checking for sigsetjmp" >&5
10821 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 #include <setjmp.h>
10825 int main() {
10826 sigjmp_buf bar; sigsetjmp (bar, 0);
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10830   rm -rf conftest*
10831   echo "$ac_t""yes" 1>&6
10832    { test "$extra_verbose" = "yes" && cat << \EOF
10833     Defining HAVE_SIGSETJMP
10834 EOF
10835 cat >> confdefs.h <<\EOF
10836 #define HAVE_SIGSETJMP 1
10837 EOF
10838 }
10839
10840 else
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -rf conftest*
10844   echo "$ac_t""no" 1>&6
10845 fi
10846 rm -f conftest*
10847
10848 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10849 echo "configure:10850: checking whether localtime caches TZ" >&5
10850
10851 if test "$ac_cv_func_tzset" = "yes"; then
10852 cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <time.h>
10856 #if STDC_HEADERS
10857 # include <stdlib.h>
10858 #endif
10859 extern char **environ;
10860 unset_TZ ()
10861 {
10862   char **from, **to;
10863   for (to = from = environ; (*to = *from); from++)
10864     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10865       to++;
10866 }
10867 char TZ_GMT0[] = "TZ=GMT0";
10868 char TZ_PST8[] = "TZ=PST8";
10869 main()
10870 {
10871   time_t now = time ((time_t *) 0);
10872   int hour_GMT0, hour_unset;
10873   if (putenv (TZ_GMT0) != 0)
10874     exit (1);
10875   hour_GMT0 = localtime (&now)->tm_hour;
10876   unset_TZ ();
10877   hour_unset = localtime (&now)->tm_hour;
10878   if (putenv (TZ_PST8) != 0)
10879     exit (1);
10880   if (localtime (&now)->tm_hour == hour_GMT0)
10881     exit (1);
10882   unset_TZ ();
10883   if (localtime (&now)->tm_hour != hour_unset)
10884     exit (1);
10885   exit (0);
10886 }
10887 EOF
10888 if { (eval echo configure:10889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10889 then
10890   emacs_cv_localtime_cache=no
10891 else
10892   conftest_rc="$?"
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -fr conftest*
10896   emacs_cv_localtime_cache=yes
10897 fi
10898 rm -fr conftest*
10899 else
10900         # If we lack tzset, report that localtime does not cache TZ,
10901         # since we can't invalidate the cache if we don't have tzset.
10902         emacs_cv_localtime_cache=no
10903 fi
10904 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10905 if test $emacs_cv_localtime_cache = yes; then
10906   { test "$extra_verbose" = "yes" && cat << \EOF
10907     Defining LOCALTIME_CACHE
10908 EOF
10909 cat >> confdefs.h <<\EOF
10910 #define LOCALTIME_CACHE 1
10911 EOF
10912 }
10913
10914 fi
10915
10916 if test "$HAVE_TIMEVAL" = "yes"; then
10917 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10918 echo "configure:10919: checking whether gettimeofday accepts one or two arguments" >&5
10919 cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922
10923 #ifdef TIME_WITH_SYS_TIME
10924 #include <sys/time.h>
10925 #include <time.h>
10926 #else
10927 #ifdef HAVE_SYS_TIME_H
10928 #include <sys/time.h>
10929 #else
10930 #include <time.h>
10931 #endif
10932 #endif
10933   
10934 int main() {
10935
10936   struct timeval time;
10937   gettimeofday (&time, 0);
10938
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10942   rm -rf conftest*
10943   echo "$ac_t""two" 1>&6
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   echo "$ac_t""one" 1>&6
10949    { test "$extra_verbose" = "yes" && cat << \EOF
10950     Defining GETTIMEOFDAY_ONE_ARGUMENT
10951 EOF
10952 cat >> confdefs.h <<\EOF
10953 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10954 EOF
10955 }
10956
10957 fi
10958 rm -f conftest*
10959 fi
10960
10961
10962 echo $ac_n "checking for inline""... $ac_c" 1>&6
10963 echo "configure:10964: checking for inline" >&5
10964
10965 ac_cv_c_inline=no
10966 for ac_kw in inline __inline__ __inline; do
10967   cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970
10971 int main() {
10972 } $ac_kw foo() {
10973 ; return 0; }
10974 EOF
10975 if { (eval echo configure:10976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10976   rm -rf conftest*
10977   ac_cv_c_inline=$ac_kw; break
10978 else
10979   echo "configure: failed program was:" >&5
10980   cat conftest.$ac_ext >&5
10981 fi
10982 rm -f conftest*
10983 done
10984
10985
10986 echo "$ac_t""$ac_cv_c_inline" 1>&6
10987 case "$ac_cv_c_inline" in
10988   inline | yes) ;;
10989   no) { test "$extra_verbose" = "yes" && cat << \EOF
10990     Defining inline = 
10991 EOF
10992 cat >> confdefs.h <<\EOF
10993 #define inline 
10994 EOF
10995 }
10996  ;;
10997   *)  { test "$extra_verbose" = "yes" && cat << EOF
10998     Defining inline = $ac_cv_c_inline
10999 EOF
11000 cat >> confdefs.h <<EOF
11001 #define inline $ac_cv_c_inline
11002 EOF
11003 }
11004  ;;
11005 esac
11006
11007 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11008    echo "    xemacs will be linked with \"inline.o\""
11009  fi
11010
11011
11012 if test "$__DECC" != "yes"; then
11013   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11014 # for constant arguments.  Useless!
11015 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11016 echo "configure:11017: checking for working alloca.h" >&5
11017
11018 cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021 #include <alloca.h>
11022 int main() {
11023 char *p = alloca(2 * sizeof(int));
11024 ; return 0; }
11025 EOF
11026 if { (eval echo configure:11027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11027   rm -rf conftest*
11028   ac_cv_header_alloca_h=yes
11029 else
11030   echo "configure: failed program was:" >&5
11031   cat conftest.$ac_ext >&5
11032   rm -rf conftest*
11033   ac_cv_header_alloca_h=no
11034 fi
11035 rm -f conftest*
11036
11037 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11038 if test $ac_cv_header_alloca_h = yes; then
11039   { test "$extra_verbose" = "yes" && cat << \EOF
11040     Defining HAVE_ALLOCA_H
11041 EOF
11042 cat >> confdefs.h <<\EOF
11043 #define HAVE_ALLOCA_H 1
11044 EOF
11045 }
11046
11047 fi
11048
11049 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11050 echo "configure:11051: checking for alloca" >&5
11051
11052 cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055
11056 #ifdef __GNUC__
11057 # define alloca __builtin_alloca
11058 #else
11059 # ifdef _MSC_VER
11060 #  include <malloc.h>
11061 #  define alloca _alloca
11062 # else
11063 #  if HAVE_ALLOCA_H
11064 #   include <alloca.h>
11065 #  else
11066 #   ifdef _AIX
11067  #pragma alloca
11068 #   else
11069 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11070 char *alloca ();
11071 #    endif
11072 #   endif
11073 #  endif
11074 # endif
11075 #endif
11076
11077 int main() {
11078 char *p = (char *) alloca(1);
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   ac_cv_func_alloca_works=yes
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   ac_cv_func_alloca_works=no
11089 fi
11090 rm -f conftest*
11091
11092 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11093 if test $ac_cv_func_alloca_works = yes; then
11094   { test "$extra_verbose" = "yes" && cat << \EOF
11095     Defining HAVE_ALLOCA
11096 EOF
11097 cat >> confdefs.h <<\EOF
11098 #define HAVE_ALLOCA 1
11099 EOF
11100 }
11101
11102 fi
11103
11104 if test $ac_cv_func_alloca_works = no; then
11105   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11106   # that cause trouble.  Some versions do not even contain alloca or
11107   # contain a buggy version.  If you still want to use their alloca,
11108   # use ar to extract alloca.o from them instead of compiling alloca.c.
11109   ALLOCA=alloca.${ac_objext}
11110   { test "$extra_verbose" = "yes" && cat << \EOF
11111     Defining C_ALLOCA
11112 EOF
11113 cat >> confdefs.h <<\EOF
11114 #define C_ALLOCA 1
11115 EOF
11116 }
11117
11118
11119 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11120 echo "configure:11121: checking whether alloca needs Cray hooks" >&5
11121
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 #if defined(CRAY) && ! defined(CRAY2)
11126 webecray
11127 #else
11128 wenotbecray
11129 #endif
11130
11131 EOF
11132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11133   egrep "webecray" >/dev/null 2>&1; then
11134   rm -rf conftest*
11135   ac_cv_os_cray=yes
11136 else
11137   rm -rf conftest*
11138   ac_cv_os_cray=no
11139 fi
11140 rm -f conftest*
11141
11142
11143 echo "$ac_t""$ac_cv_os_cray" 1>&6
11144 if test $ac_cv_os_cray = yes; then
11145 for ac_func in _getb67 GETB67 getb67; do
11146   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11147 echo "configure:11148: checking for $ac_func" >&5
11148
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 /* System header to define __stub macros and hopefully few prototypes,
11153     which can conflict with char $ac_func(); below.  */
11154 #include <assert.h>
11155 /* Override any gcc2 internal prototype to avoid an error.  */
11156 /* We use char because int might match the return type of a gcc2
11157     builtin and then its argument prototype would still apply.  */
11158 char $ac_func();
11159
11160 int main() {
11161
11162 /* The GNU C library defines this for functions which it implements
11163     to always fail with ENOSYS.  Some functions are actually named
11164     something starting with __ and the normal name is an alias.  */
11165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11166 choke me
11167 #else
11168 $ac_func();
11169 #endif
11170
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_func_$ac_func=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_func_$ac_func=no"
11181 fi
11182 rm -f conftest*
11183
11184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11185   echo "$ac_t""yes" 1>&6
11186   { test "$extra_verbose" = "yes" && cat << EOF
11187     Defining CRAY_STACKSEG_END = $ac_func
11188 EOF
11189 cat >> confdefs.h <<EOF
11190 #define CRAY_STACKSEG_END $ac_func
11191 EOF
11192 }
11193
11194   break
11195 else
11196   echo "$ac_t""no" 1>&6
11197 fi
11198
11199 done
11200 fi
11201
11202 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11203 echo "configure:11204: checking stack direction for C alloca" >&5
11204
11205 cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208 find_stack_direction ()
11209 {
11210   static char *addr = 0;
11211   auto char dummy;
11212   if (addr == 0)
11213     {
11214       addr = &dummy;
11215       return find_stack_direction ();
11216     }
11217   else
11218     return (&dummy > addr) ? 1 : -1;
11219 }
11220 main ()
11221 {
11222   exit (find_stack_direction() < 0);
11223 }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11226 then
11227   ac_cv_c_stack_direction=1
11228 else
11229   conftest_rc="$?"
11230   echo "configure: failed program was:" >&5
11231   cat conftest.$ac_ext >&5
11232   rm -fr conftest*
11233   ac_cv_c_stack_direction=-1
11234 fi
11235 rm -fr conftest*
11236
11237 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11238 { test "$extra_verbose" = "yes" && cat << EOF
11239     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11240 EOF
11241 cat >> confdefs.h <<EOF
11242 #define STACK_DIRECTION $ac_cv_c_stack_direction
11243 EOF
11244 }
11245
11246 fi
11247
11248   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11249    echo "    xemacs will be linked with \"$ALLOCA\""
11250  fi
11251 fi
11252
11253 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11254 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11255 echo "configure:11256: checking for vfork.h" >&5
11256
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 #include <vfork.h>
11261 EOF
11262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11263 { (eval echo configure:11264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11265 if test -z "$ac_err"; then
11266   rm -rf conftest*
11267   eval "ac_cv_header_$ac_safe=yes"
11268 else
11269   echo "$ac_err" >&5
11270   echo "configure: failed program was:" >&5
11271   cat conftest.$ac_ext >&5
11272   rm -rf conftest*
11273   eval "ac_cv_header_$ac_safe=no"
11274 fi
11275 rm -f conftest*
11276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11277   echo "$ac_t""yes" 1>&6
11278   { test "$extra_verbose" = "yes" && cat << \EOF
11279     Defining HAVE_VFORK_H
11280 EOF
11281 cat >> confdefs.h <<\EOF
11282 #define HAVE_VFORK_H 1
11283 EOF
11284 }
11285
11286 else
11287   echo "$ac_t""no" 1>&6
11288 fi
11289
11290 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11291 echo "configure:11292: checking for working vfork" >&5
11292
11293 cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296 /* Thanks to Paul Eggert for this test.  */
11297 #include <stdio.h>
11298 #include <sys/types.h>
11299 #include <sys/stat.h>
11300 #ifdef HAVE_UNISTD_H
11301 #include <unistd.h>
11302 #endif
11303 #ifdef HAVE_VFORK_H
11304 #include <vfork.h>
11305 #endif
11306 /* On some sparc systems, changes by the child to local and incoming
11307    argument registers are propagated back to the parent.
11308    The compiler is told about this with #include <vfork.h>,
11309    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11310    Test for this by using a static variable whose address
11311    is put into a register that is clobbered by the vfork.  */
11312 static
11313 #ifdef __cplusplus
11314 sparc_address_test (int arg)
11315 #else
11316 sparc_address_test (arg) int arg;
11317 #endif
11318 {
11319   static pid_t child;
11320   if (!child) {
11321     child = vfork ();
11322     if (child < 0) {
11323       perror ("vfork");
11324       _exit(2);
11325     }
11326     if (!child) {
11327       arg = getpid();
11328       write(-1, "", 0);
11329       _exit (arg);
11330     }
11331   }
11332 }
11333 main() {
11334   pid_t parent = getpid ();
11335   pid_t child;
11336
11337   sparc_address_test ();
11338
11339   child = vfork ();
11340
11341   if (child == 0) {
11342     /* Here is another test for sparc vfork register problems.
11343        This test uses lots of local variables, at least
11344        as many local variables as main has allocated so far
11345        including compiler temporaries.  4 locals are enough for
11346        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11347        A buggy compiler should reuse the register of parent
11348        for one of the local variables, since it will think that
11349        parent can't possibly be used any more in this routine.
11350        Assigning to the local variable will thus munge parent
11351        in the parent process.  */
11352     pid_t
11353       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11354       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11355     /* Convince the compiler that p..p7 are live; otherwise, it might
11356        use the same hardware register for all 8 local variables.  */
11357     if (p != p1 || p != p2 || p != p3 || p != p4
11358         || p != p5 || p != p6 || p != p7)
11359       _exit(1);
11360
11361     /* On some systems (e.g. IRIX 3.3),
11362        vfork doesn't separate parent from child file descriptors.
11363        If the child closes a descriptor before it execs or exits,
11364        this munges the parent's descriptor as well.
11365        Test for this by closing stdout in the child.  */
11366     _exit(close(fileno(stdout)) != 0);
11367   } else {
11368     int status;
11369     struct stat st;
11370
11371     while (wait(&status) != child)
11372       ;
11373     exit(
11374          /* Was there some problem with vforking?  */
11375          child < 0
11376
11377          /* Did the child fail?  (This shouldn't happen.)  */
11378          || status
11379
11380          /* Did the vfork/compiler bug occur?  */
11381          || parent != getpid()
11382
11383          /* Did the file descriptor bug occur?  */
11384          || fstat(fileno(stdout), &st) != 0
11385          );
11386   }
11387 }
11388 EOF
11389 if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11390 then
11391   ac_cv_func_vfork_works=yes
11392 else
11393   conftest_rc="$?"
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -fr conftest*
11397   ac_cv_func_vfork_works=no
11398 fi
11399 rm -fr conftest*
11400
11401 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11402 if test $ac_cv_func_vfork_works = no; then
11403   { test "$extra_verbose" = "yes" && cat << \EOF
11404     Defining vfork = fork
11405 EOF
11406 cat >> confdefs.h <<\EOF
11407 #define vfork fork
11408 EOF
11409 }
11410
11411 fi
11412
11413
11414 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11415 echo "configure:11416: checking for working strcoll" >&5
11416
11417 cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420 #include <string.h>
11421 main ()
11422 {
11423   exit (strcoll ("abc", "def") >= 0 ||
11424         strcoll ("ABC", "DEF") >= 0 ||
11425         strcoll ("123", "456") >= 0);
11426 }
11427 EOF
11428 if { (eval echo configure:11429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11429 then
11430   ac_cv_func_strcoll_works=yes
11431 else
11432   conftest_rc="$?"
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -fr conftest*
11436   ac_cv_func_strcoll_works=no
11437 fi
11438 rm -fr conftest*
11439
11440 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11441 if test $ac_cv_func_strcoll_works = yes; then
11442   { test "$extra_verbose" = "yes" && cat << \EOF
11443     Defining HAVE_STRCOLL
11444 EOF
11445 cat >> confdefs.h <<\EOF
11446 #define HAVE_STRCOLL 1
11447 EOF
11448 }
11449
11450 fi
11451
11452
11453 for ac_func in getpgrp
11454 do
11455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11456 echo "configure:11457: checking for $ac_func" >&5
11457
11458 cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 /* System header to define __stub macros and hopefully few prototypes,
11462     which can conflict with char $ac_func(); below.  */
11463 #include <assert.h>
11464 /* Override any gcc2 internal prototype to avoid an error.  */
11465 /* We use char because int might match the return type of a gcc2
11466     builtin and then its argument prototype would still apply.  */
11467 char $ac_func();
11468
11469 int main() {
11470
11471 /* The GNU C library defines this for functions which it implements
11472     to always fail with ENOSYS.  Some functions are actually named
11473     something starting with __ and the normal name is an alias.  */
11474 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11475 choke me
11476 #else
11477 $ac_func();
11478 #endif
11479
11480 ; return 0; }
11481 EOF
11482 if { (eval echo configure:11483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11483   rm -rf conftest*
11484   eval "ac_cv_func_$ac_func=yes"
11485 else
11486   echo "configure: failed program was:" >&5
11487   cat conftest.$ac_ext >&5
11488   rm -rf conftest*
11489   eval "ac_cv_func_$ac_func=no"
11490 fi
11491 rm -f conftest*
11492
11493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11494   echo "$ac_t""yes" 1>&6
11495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11496   { test "$extra_verbose" = "yes" && cat << EOF
11497     Defining $ac_tr_func
11498 EOF
11499 cat >> confdefs.h <<EOF
11500 #define $ac_tr_func 1
11501 EOF
11502 }
11503  
11504 else
11505   echo "$ac_t""no" 1>&6
11506 fi
11507 done
11508
11509 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11510 echo "configure:11511: checking whether getpgrp takes no argument" >&5
11511
11512 cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515
11516 /*
11517  * If this system has a BSD-style getpgrp(),
11518  * which takes a pid argument, exit unsuccessfully.
11519  *
11520  * Snarfed from Chet Ramey's bash pgrp.c test program
11521  */
11522 #include <stdio.h>
11523 #include <sys/types.h>
11524
11525 int     pid;
11526 int     pg1, pg2, pg3, pg4;
11527 int     ng, np, s, child;
11528
11529 main()
11530 {
11531         pid = getpid();
11532         pg1 = getpgrp(0);
11533         pg2 = getpgrp();
11534         pg3 = getpgrp(pid);
11535         pg4 = getpgrp(1);
11536
11537         /*
11538          * If all of these values are the same, it's pretty sure that
11539          * we're on a system that ignores getpgrp's first argument.
11540          */
11541         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11542                 exit(0);
11543
11544         child = fork();
11545         if (child < 0)
11546                 exit(1);
11547         else if (child == 0) {
11548                 np = getpid();
11549                 /*
11550                  * If this is Sys V, this will not work; pgrp will be
11551                  * set to np because setpgrp just changes a pgrp to be
11552                  * the same as the pid.
11553                  */
11554                 setpgrp(np, pg1);
11555                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11556                 if (ng == pg1) {
11557                         exit(1);
11558                 } else {
11559                         exit(0);
11560                 }
11561         } else {
11562                 wait(&s);
11563                 exit(s>>8);
11564         }
11565 }
11566
11567 EOF
11568 if { (eval echo configure:11569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11569 then
11570   ac_cv_func_getpgrp_void=yes
11571 else
11572   conftest_rc="$?"
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -fr conftest*
11576   ac_cv_func_getpgrp_void=no
11577 fi
11578 rm -fr conftest*
11579
11580
11581 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11582 if test $ac_cv_func_getpgrp_void = yes; then
11583   { test "$extra_verbose" = "yes" && cat << \EOF
11584     Defining GETPGRP_VOID
11585 EOF
11586 cat >> confdefs.h <<\EOF
11587 #define GETPGRP_VOID 1
11588 EOF
11589 }
11590
11591 fi
11592
11593
11594 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11595 echo "configure:11596: checking for working mmap" >&5
11596 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11597 cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11600 #include <stdio.h>
11601 #include <unistd.h>
11602 #include <fcntl.h>
11603 #include <sys/mman.h>
11604
11605 #ifndef MAP_VARIABLE
11606 #define MAP_VARIABLE 0
11607 #endif
11608
11609 #ifndef MAP_FAILED
11610 #define MAP_FAILED -1
11611 #endif
11612
11613 int main (int argc, char *argv[])
11614 {
11615   int fd = -1;
11616   caddr_t p;
11617 #ifndef MAP_ANONYMOUS
11618   fd = open ("/dev/zero", O_RDWR);
11619   if (fd < 0)
11620     return 1;
11621 #define MAP_ANONYMOUS 0
11622 #endif
11623   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11624            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11625            fd, 0) != (void *) MAP_FAILED)
11626     return 0;
11627   perror ("conftest: mmap failed");
11628   return 1;
11629 }
11630 EOF
11631 if { (eval echo configure:11632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11632 then
11633   have_mmap=yes
11634 else
11635   conftest_rc="$?"
11636   echo "configure: failed program was:" >&5
11637   cat conftest.$ac_ext >&5
11638   rm -fr conftest*
11639   have_mmap=no
11640 fi
11641 rm -fr conftest* ;;
11642 esac
11643 echo "$ac_t""$have_mmap" 1>&6
11644 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11645     Defining HAVE_MMAP
11646 EOF
11647 cat >> confdefs.h <<\EOF
11648 #define HAVE_MMAP 1
11649 EOF
11650 }
11651
11652
11653 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11654 if test "$rel_alloc $have_mmap" = "default yes"; then
11655   if test "$doug_lea_malloc" = "yes"; then
11656         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11657 echo "configure:11658: checking for M_MMAP_THRESHOLD" >&5
11658     cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661 #include <malloc.h>
11662 int main() {
11663
11664 #ifndef M_MMAP_THRESHOLD
11665 #error No M_MMAP_THRESHOLD :-(
11666 !@+$%^&*_)(_ - unlikely to compile...
11667 #endif
11668
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11672   rm -rf conftest*
11673   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11679 fi
11680 rm -f conftest*
11681   else
11682     rel_alloc=yes
11683   fi
11684 fi
11685 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11686     Defining REL_ALLOC
11687 EOF
11688 cat >> confdefs.h <<\EOF
11689 #define REL_ALLOC 1
11690 EOF
11691 }
11692
11693
11694 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11695 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11696 echo "configure:11697: checking for termios.h" >&5
11697
11698 cat > conftest.$ac_ext <<EOF
11699 #line 11700 "configure"
11700 #include "confdefs.h"
11701 #include <termios.h>
11702 EOF
11703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11704 { (eval echo configure:11705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11706 if test -z "$ac_err"; then
11707   rm -rf conftest*
11708   eval "ac_cv_header_$ac_safe=yes"
11709 else
11710   echo "$ac_err" >&5
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713   rm -rf conftest*
11714   eval "ac_cv_header_$ac_safe=no"
11715 fi
11716 rm -f conftest*
11717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11718   echo "$ac_t""yes" 1>&6
11719   { test "$extra_verbose" = "yes" && cat << \EOF
11720     Defining HAVE_TERMIOS
11721 EOF
11722 cat >> confdefs.h <<\EOF
11723 #define HAVE_TERMIOS 1
11724 EOF
11725 }
11726
11727   { test "$extra_verbose" = "yes" && cat << \EOF
11728     Defining SIGNALS_VIA_CHARACTERS
11729 EOF
11730 cat >> confdefs.h <<\EOF
11731 #define SIGNALS_VIA_CHARACTERS 1
11732 EOF
11733 }
11734
11735   { test "$extra_verbose" = "yes" && cat << \EOF
11736     Defining NO_TERMIO
11737 EOF
11738 cat >> confdefs.h <<\EOF
11739 #define NO_TERMIO 1
11740 EOF
11741 }
11742
11743 else
11744   echo "$ac_t""no" 1>&6
11745 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11746 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11747 echo "configure:11748: checking for termio.h" >&5
11748
11749 cat > conftest.$ac_ext <<EOF
11750 #line 11751 "configure"
11751 #include "confdefs.h"
11752 #include <termio.h>
11753 EOF
11754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11755 { (eval echo configure:11756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11757 if test -z "$ac_err"; then
11758   rm -rf conftest*
11759   eval "ac_cv_header_$ac_safe=yes"
11760 else
11761   echo "$ac_err" >&5
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   eval "ac_cv_header_$ac_safe=no"
11766 fi
11767 rm -f conftest*
11768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11769   echo "$ac_t""yes" 1>&6
11770   { test "$extra_verbose" = "yes" && cat << \EOF
11771     Defining HAVE_TERMIO
11772 EOF
11773 cat >> confdefs.h <<\EOF
11774 #define HAVE_TERMIO 1
11775 EOF
11776 }
11777
11778 else
11779   echo "$ac_t""no" 1>&6
11780 fi
11781
11782 fi
11783
11784
11785
11786 echo $ac_n "checking for socket""... $ac_c" 1>&6
11787 echo "configure:11788: checking for socket" >&5
11788
11789 cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792 /* System header to define __stub macros and hopefully few prototypes,
11793     which can conflict with char socket(); below.  */
11794 #include <assert.h>
11795 /* Override any gcc2 internal prototype to avoid an error.  */
11796 /* We use char because int might match the return type of a gcc2
11797     builtin and then its argument prototype would still apply.  */
11798 char socket();
11799
11800 int main() {
11801
11802 /* The GNU C library defines this for functions which it implements
11803     to always fail with ENOSYS.  Some functions are actually named
11804     something starting with __ and the normal name is an alias.  */
11805 #if defined (__stub_socket) || defined (__stub___socket)
11806 choke me
11807 #else
11808 socket();
11809 #endif
11810
11811 ; return 0; }
11812 EOF
11813 if { (eval echo configure:11814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11814   rm -rf conftest*
11815   eval "ac_cv_func_socket=yes"
11816 else
11817   echo "configure: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   rm -rf conftest*
11820   eval "ac_cv_func_socket=no"
11821 fi
11822 rm -f conftest*
11823
11824 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11825   echo "$ac_t""yes" 1>&6
11826   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11827 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11828 echo "configure:11829: checking for netinet/in.h" >&5
11829
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #include <netinet/in.h>
11834 EOF
11835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11836 { (eval echo configure:11837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11838 if test -z "$ac_err"; then
11839   rm -rf conftest*
11840   eval "ac_cv_header_$ac_safe=yes"
11841 else
11842   echo "$ac_err" >&5
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   eval "ac_cv_header_$ac_safe=no"
11847 fi
11848 rm -f conftest*
11849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11850   echo "$ac_t""yes" 1>&6
11851   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11852 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11853 echo "configure:11854: checking for arpa/inet.h" >&5
11854
11855 cat > conftest.$ac_ext <<EOF
11856 #line 11857 "configure"
11857 #include "confdefs.h"
11858 #include <arpa/inet.h>
11859 EOF
11860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11861 { (eval echo configure:11862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11863 if test -z "$ac_err"; then
11864   rm -rf conftest*
11865   eval "ac_cv_header_$ac_safe=yes"
11866 else
11867   echo "$ac_err" >&5
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -rf conftest*
11871   eval "ac_cv_header_$ac_safe=no"
11872 fi
11873 rm -f conftest*
11874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11875   echo "$ac_t""yes" 1>&6
11876   
11877   { test "$extra_verbose" = "yes" && cat << \EOF
11878     Defining HAVE_SOCKETS
11879 EOF
11880 cat >> confdefs.h <<\EOF
11881 #define HAVE_SOCKETS 1
11882 EOF
11883 }
11884
11885       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11886 echo "configure:11887: checking "for sun_len member in struct sockaddr_un"" >&5
11887       cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890
11891 #include <sys/types.h>
11892 #include <sys/socket.h>
11893 #include <sys/un.h>
11894       
11895 int main() {
11896 static struct sockaddr_un x; x.sun_len = 1;
11897 ; return 0; }
11898 EOF
11899 if { (eval echo configure:11900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11900   rm -rf conftest*
11901   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11902     Defining HAVE_SOCKADDR_SUN_LEN
11903 EOF
11904 cat >> confdefs.h <<\EOF
11905 #define HAVE_SOCKADDR_SUN_LEN 1
11906 EOF
11907 }
11908
11909 else
11910   echo "configure: failed program was:" >&5
11911   cat conftest.$ac_ext >&5
11912   rm -rf conftest*
11913   echo "$ac_t""no" 1>&6
11914 fi
11915 rm -f conftest*
11916       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11917 echo "configure:11918: checking "for ip_mreq struct in netinet/in.h"" >&5
11918       cat > conftest.$ac_ext <<EOF
11919 #line 11920 "configure"
11920 #include "confdefs.h"
11921
11922 #include <sys/types.h>
11923 #include <netinet/in.h>
11924       
11925 int main() {
11926 static struct ip_mreq x;
11927 ; return 0; }
11928 EOF
11929 if { (eval echo configure:11930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11930   rm -rf conftest*
11931   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11932     Defining HAVE_MULTICAST
11933 EOF
11934 cat >> confdefs.h <<\EOF
11935 #define HAVE_MULTICAST 1
11936 EOF
11937 }
11938
11939 else
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   echo "$ac_t""no" 1>&6
11944 fi
11945 rm -f conftest*
11946 else
11947   echo "$ac_t""no" 1>&6
11948 fi
11949
11950 else
11951   echo "$ac_t""no" 1>&6
11952 fi
11953
11954 else
11955   echo "$ac_t""no" 1>&6
11956 fi
11957
11958
11959 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11960 echo "configure:11961: checking for msgget" >&5
11961
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 /* System header to define __stub macros and hopefully few prototypes,
11966     which can conflict with char msgget(); below.  */
11967 #include <assert.h>
11968 /* Override any gcc2 internal prototype to avoid an error.  */
11969 /* We use char because int might match the return type of a gcc2
11970     builtin and then its argument prototype would still apply.  */
11971 char msgget();
11972
11973 int main() {
11974
11975 /* The GNU C library defines this for functions which it implements
11976     to always fail with ENOSYS.  Some functions are actually named
11977     something starting with __ and the normal name is an alias.  */
11978 #if defined (__stub_msgget) || defined (__stub___msgget)
11979 choke me
11980 #else
11981 msgget();
11982 #endif
11983
11984 ; return 0; }
11985 EOF
11986 if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11987   rm -rf conftest*
11988   eval "ac_cv_func_msgget=yes"
11989 else
11990   echo "configure: failed program was:" >&5
11991   cat conftest.$ac_ext >&5
11992   rm -rf conftest*
11993   eval "ac_cv_func_msgget=no"
11994 fi
11995 rm -f conftest*
11996
11997 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11998   echo "$ac_t""yes" 1>&6
11999   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12000 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12001 echo "configure:12002: checking for sys/ipc.h" >&5
12002
12003 cat > conftest.$ac_ext <<EOF
12004 #line 12005 "configure"
12005 #include "confdefs.h"
12006 #include <sys/ipc.h>
12007 EOF
12008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12009 { (eval echo configure:12010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12011 if test -z "$ac_err"; then
12012   rm -rf conftest*
12013   eval "ac_cv_header_$ac_safe=yes"
12014 else
12015   echo "$ac_err" >&5
12016   echo "configure: failed program was:" >&5
12017   cat conftest.$ac_ext >&5
12018   rm -rf conftest*
12019   eval "ac_cv_header_$ac_safe=no"
12020 fi
12021 rm -f conftest*
12022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12023   echo "$ac_t""yes" 1>&6
12024   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12025 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12026 echo "configure:12027: checking for sys/msg.h" >&5
12027
12028 cat > conftest.$ac_ext <<EOF
12029 #line 12030 "configure"
12030 #include "confdefs.h"
12031 #include <sys/msg.h>
12032 EOF
12033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12034 { (eval echo configure:12035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12036 if test -z "$ac_err"; then
12037   rm -rf conftest*
12038   eval "ac_cv_header_$ac_safe=yes"
12039 else
12040   echo "$ac_err" >&5
12041   echo "configure: failed program was:" >&5
12042   cat conftest.$ac_ext >&5
12043   rm -rf conftest*
12044   eval "ac_cv_header_$ac_safe=no"
12045 fi
12046 rm -f conftest*
12047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12048   echo "$ac_t""yes" 1>&6
12049   { test "$extra_verbose" = "yes" && cat << \EOF
12050     Defining HAVE_SYSVIPC
12051 EOF
12052 cat >> confdefs.h <<\EOF
12053 #define HAVE_SYSVIPC 1
12054 EOF
12055 }
12056
12057 else
12058   echo "$ac_t""no" 1>&6
12059 fi
12060
12061 else
12062   echo "$ac_t""no" 1>&6
12063 fi
12064
12065 else
12066   echo "$ac_t""no" 1>&6
12067 fi
12068
12069
12070 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12071 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12072 echo "configure:12073: checking for dirent.h" >&5
12073
12074 cat > conftest.$ac_ext <<EOF
12075 #line 12076 "configure"
12076 #include "confdefs.h"
12077 #include <dirent.h>
12078 EOF
12079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12080 { (eval echo configure:12081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12082 if test -z "$ac_err"; then
12083   rm -rf conftest*
12084   eval "ac_cv_header_$ac_safe=yes"
12085 else
12086   echo "$ac_err" >&5
12087   echo "configure: failed program was:" >&5
12088   cat conftest.$ac_ext >&5
12089   rm -rf conftest*
12090   eval "ac_cv_header_$ac_safe=no"
12091 fi
12092 rm -f conftest*
12093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12094   echo "$ac_t""yes" 1>&6
12095   { test "$extra_verbose" = "yes" && cat << \EOF
12096     Defining SYSV_SYSTEM_DIR
12097 EOF
12098 cat >> confdefs.h <<\EOF
12099 #define SYSV_SYSTEM_DIR 1
12100 EOF
12101 }
12102
12103 else
12104   echo "$ac_t""no" 1>&6
12105 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12106 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12107 echo "configure:12108: checking for sys/dir.h" >&5
12108
12109 cat > conftest.$ac_ext <<EOF
12110 #line 12111 "configure"
12111 #include "confdefs.h"
12112 #include <sys/dir.h>
12113 EOF
12114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12115 { (eval echo configure:12116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12117 if test -z "$ac_err"; then
12118   rm -rf conftest*
12119   eval "ac_cv_header_$ac_safe=yes"
12120 else
12121   echo "$ac_err" >&5
12122   echo "configure: failed program was:" >&5
12123   cat conftest.$ac_ext >&5
12124   rm -rf conftest*
12125   eval "ac_cv_header_$ac_safe=no"
12126 fi
12127 rm -f conftest*
12128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12129   echo "$ac_t""yes" 1>&6
12130   :
12131 else
12132   echo "$ac_t""no" 1>&6
12133 { test "$extra_verbose" = "yes" && cat << \EOF
12134     Defining NONSYSTEM_DIR_LIBRARY
12135 EOF
12136 cat >> confdefs.h <<\EOF
12137 #define NONSYSTEM_DIR_LIBRARY 1
12138 EOF
12139 }
12140
12141 fi
12142
12143 fi
12144
12145
12146 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12147 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12148 echo "configure:12149: checking for nlist.h" >&5
12149
12150 cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 #include <nlist.h>
12154 EOF
12155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12156 { (eval echo configure:12157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12158 if test -z "$ac_err"; then
12159   rm -rf conftest*
12160   eval "ac_cv_header_$ac_safe=yes"
12161 else
12162   echo "$ac_err" >&5
12163   echo "configure: failed program was:" >&5
12164   cat conftest.$ac_ext >&5
12165   rm -rf conftest*
12166   eval "ac_cv_header_$ac_safe=no"
12167 fi
12168 rm -f conftest*
12169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12170   echo "$ac_t""yes" 1>&6
12171   { test "$extra_verbose" = "yes" && cat << \EOF
12172     Defining NLIST_STRUCT
12173 EOF
12174 cat >> confdefs.h <<\EOF
12175 #define NLIST_STRUCT 1
12176 EOF
12177 }
12178
12179 else
12180   echo "$ac_t""no" 1>&6
12181 fi
12182
12183
12184
12185 echo "checking "for sound support"" 1>&6
12186 echo "configure:12187: checking "for sound support"" >&5
12187 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12188
12189 if test "$with_native_sound" != "no"; then
12190     if test -n "$native_sound_lib"; then
12191     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12192 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12193 echo "configure:12194: checking for multimedia/audio_device.h" >&5
12194
12195 cat > conftest.$ac_ext <<EOF
12196 #line 12197 "configure"
12197 #include "confdefs.h"
12198 #include <multimedia/audio_device.h>
12199 EOF
12200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12201 { (eval echo configure:12202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12203 if test -z "$ac_err"; then
12204   rm -rf conftest*
12205   eval "ac_cv_header_$ac_safe=yes"
12206 else
12207   echo "$ac_err" >&5
12208   echo "configure: failed program was:" >&5
12209   cat conftest.$ac_ext >&5
12210   rm -rf conftest*
12211   eval "ac_cv_header_$ac_safe=no"
12212 fi
12213 rm -f conftest*
12214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12215   echo "$ac_t""yes" 1>&6
12216   sound_found=yes sound_cflags=""
12217       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12218    echo "    xemacs will be linked with \"sunplay.o\""
12219  fi
12220 else
12221   echo "$ac_t""no" 1>&6
12222 fi
12223
12224   fi
12225
12226     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12227     sound_found=yes
12228     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12229    echo "    xemacs will be linked with \"sunplay.o\""
12230  fi
12231     if test -d "/usr/demo/SOUND/include"
12232       then sound_cflags="-I/usr/demo/SOUND/include"
12233       else sound_cflags="-I/usr/demo/SOUND"
12234     fi
12235     if test -z "$native_sound_lib" ; then
12236       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12237         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12238         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12239       fi
12240     fi
12241   fi
12242
12243     if test -z "$sound_found"; then
12244     case "$canonical" in
12245     *-sgi-* )
12246       if test -z "$native_sound_lib"; then
12247         
12248 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12249 echo "configure:12250: checking for ALopenport in -laudio" >&5
12250 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12251
12252 xe_check_libs=" -laudio "
12253 cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256 /* Override any gcc2 internal prototype to avoid an error.  */
12257 /* We use char because int might match the return type of a gcc2
12258     builtin and then its argument prototype would still apply.  */
12259 char ALopenport();
12260
12261 int main() {
12262 ALopenport()
12263 ; return 0; }
12264 EOF
12265 if { (eval echo configure:12266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12266   rm -rf conftest*
12267   eval "ac_cv_lib_$ac_lib_var=yes"
12268 else
12269   echo "configure: failed program was:" >&5
12270   cat conftest.$ac_ext >&5
12271   rm -rf conftest*
12272   eval "ac_cv_lib_$ac_lib_var=no"
12273 fi
12274 rm -f conftest*
12275 xe_check_libs=""
12276
12277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12278   echo "$ac_t""yes" 1>&6
12279   native_sound_lib="-laudio"
12280 else
12281   echo "$ac_t""no" 1>&6
12282 fi
12283
12284
12285       fi
12286       if test -n "$native_sound_lib"; then
12287         sound_found=yes sound_cflags=""
12288         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12289    echo "    xemacs will be linked with \"sgiplay.o\""
12290  fi
12291       fi ;;
12292     hppa*-hp-hpux* )
12293       if test -z "$native_sound_lib"; then
12294         
12295 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12296 echo "configure:12297: checking for AOpenAudio in -lAlib" >&5
12297 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12298
12299 xe_check_libs=" -lAlib "
12300 cat > conftest.$ac_ext <<EOF
12301 #line 12302 "configure"
12302 #include "confdefs.h"
12303 /* Override any gcc2 internal prototype to avoid an error.  */
12304 /* We use char because int might match the return type of a gcc2
12305     builtin and then its argument prototype would still apply.  */
12306 char AOpenAudio();
12307
12308 int main() {
12309 AOpenAudio()
12310 ; return 0; }
12311 EOF
12312 if { (eval echo configure:12313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12313   rm -rf conftest*
12314   eval "ac_cv_lib_$ac_lib_var=yes"
12315 else
12316   echo "configure: failed program was:" >&5
12317   cat conftest.$ac_ext >&5
12318   rm -rf conftest*
12319   eval "ac_cv_lib_$ac_lib_var=no"
12320 fi
12321 rm -f conftest*
12322 xe_check_libs=""
12323
12324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12325   echo "$ac_t""yes" 1>&6
12326   native_sound_lib="-lAlib"
12327 else
12328   echo "$ac_t""no" 1>&6
12329 fi
12330
12331
12332       fi
12333       if test -n "$native_sound_lib"; then
12334         sound_found=yes
12335         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12336    echo "    xemacs will be linked with \"hpplay.o\""
12337  fi
12338         if test "$GCC" = "yes" # Kludge city
12339           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12340           else sound_cflags="+e -I/usr/audio/examples"
12341         fi
12342       fi ;;
12343     esac
12344   fi
12345
12346     if test -z "$sound_found"; then
12347     for dir in "machine" "sys" "linux"; do
12348       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12349 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12350 echo "configure:12351: checking for ${dir}/soundcard.h" >&5
12351
12352 cat > conftest.$ac_ext <<EOF
12353 #line 12354 "configure"
12354 #include "confdefs.h"
12355 #include <${dir}/soundcard.h>
12356 EOF
12357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12358 { (eval echo configure:12359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12360 if test -z "$ac_err"; then
12361   rm -rf conftest*
12362   eval "ac_cv_header_$ac_safe=yes"
12363 else
12364   echo "$ac_err" >&5
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -rf conftest*
12368   eval "ac_cv_header_$ac_safe=no"
12369 fi
12370 rm -f conftest*
12371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12372   echo "$ac_t""yes" 1>&6
12373   sound_found=yes
12374        need_miscplay=yes
12375         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12376    echo "    xemacs will be linked with \"linuxplay.o\""
12377  fi
12378         { test "$extra_verbose" = "yes" && cat << EOF
12379     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12380 EOF
12381 cat >> confdefs.h <<EOF
12382 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12383 EOF
12384 }
12385
12386         break
12387 else
12388   echo "$ac_t""no" 1>&6
12389 fi
12390
12391     done
12392   fi
12393
12394     if test -z "$sound_found"; then
12395     if test "$with_msw" = "yes"; then
12396     sound_found=yes
12397     native_sound_lib=
12398     fi
12399   fi
12400
12401   test "$sound_found" = "yes" && with_native_sound=yes
12402 fi
12403
12404 if test "$with_native_sound" = "yes"; then
12405   { test "$extra_verbose" = "yes" && cat << \EOF
12406     Defining HAVE_NATIVE_SOUND
12407 EOF
12408 cat >> confdefs.h <<\EOF
12409 #define HAVE_NATIVE_SOUND 1
12410 EOF
12411 }
12412
12413   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12414 fi
12415
12416 if test "$with_nas_sound" != "no"; then
12417   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12418 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12419 echo "configure:12420: checking for audio/audiolib.h" >&5
12420
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 #include <audio/audiolib.h>
12425 EOF
12426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12427 { (eval echo configure:12428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12429 if test -z "$ac_err"; then
12430   rm -rf conftest*
12431   eval "ac_cv_header_$ac_safe=yes"
12432 else
12433   echo "$ac_err" >&5
12434   echo "configure: failed program was:" >&5
12435   cat conftest.$ac_ext >&5
12436   rm -rf conftest*
12437   eval "ac_cv_header_$ac_safe=no"
12438 fi
12439 rm -f conftest*
12440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12441   echo "$ac_t""yes" 1>&6
12442   
12443     
12444 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12445 echo "configure:12446: checking for AuOpenServer in -laudio" >&5
12446 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12447
12448 xe_check_libs=" -laudio "
12449 cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452 /* Override any gcc2 internal prototype to avoid an error.  */
12453 /* We use char because int might match the return type of a gcc2
12454     builtin and then its argument prototype would still apply.  */
12455 char AuOpenServer();
12456
12457 int main() {
12458 AuOpenServer()
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   eval "ac_cv_lib_$ac_lib_var=yes"
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   eval "ac_cv_lib_$ac_lib_var=no"
12469 fi
12470 rm -f conftest*
12471 xe_check_libs=""
12472
12473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12474   echo "$ac_t""yes" 1>&6
12475   have_nas_sound=yes
12476 else
12477   echo "$ac_t""no" 1>&6
12478 fi
12479
12480
12481 else
12482   echo "$ac_t""no" 1>&6
12483 fi
12484
12485   if test "$have_nas_sound" = "yes"; then
12486     with_nas_sound=yes
12487     { test "$extra_verbose" = "yes" && cat << \EOF
12488     Defining HAVE_NAS_SOUND
12489 EOF
12490 cat >> confdefs.h <<\EOF
12491 #define HAVE_NAS_SOUND 1
12492 EOF
12493 }
12494
12495     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12496    echo "    xemacs will be linked with \"nas.o\""
12497  fi
12498     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12499             cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 #include <audio/Xtutil.h>
12503 EOF
12504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12505   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12506   :
12507 else
12508   rm -rf conftest*
12509   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12510     Defining NAS_NO_ERROR_JUMP
12511 EOF
12512 cat >> confdefs.h <<\EOF
12513 #define NAS_NO_ERROR_JUMP 1
12514 EOF
12515 }
12516
12517 fi
12518 rm -f conftest*
12519
12520   else
12521     test "$with_nas_sound" = "yes" && \
12522       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12523     with_nas_sound=no
12524   fi
12525 fi
12526
12527 if test "$with_esd_sound" != "no"; then
12528   # Extract the first word of "esd-config", so it can be a program name with args.
12529 set dummy esd-config; ac_word=$2
12530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12531 echo "configure:12532: checking for $ac_word" >&5
12532
12533 if test -n "$have_esd_config"; then
12534   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12535 else
12536   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12537   ac_dummy="$PATH"
12538   for ac_dir in $ac_dummy; do
12539     test -z "$ac_dir" && ac_dir=.
12540     if test -f $ac_dir/$ac_word; then
12541       ac_cv_prog_have_esd_config="yes"
12542       break
12543     fi
12544   done
12545   IFS="$ac_save_ifs"
12546   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12547 fi
12548 have_esd_config="$ac_cv_prog_have_esd_config"
12549 if test -n "$have_esd_config"; then
12550   echo "$ac_t""$have_esd_config" 1>&6
12551 else
12552   echo "$ac_t""no" 1>&6
12553 fi
12554
12555   if test "$have_esd_config" = "yes"; then
12556     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12557     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
12558     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12559     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12560 echo "configure:12561: checking for esd_play_stream" >&5
12561
12562 cat > conftest.$ac_ext <<EOF
12563 #line 12564 "configure"
12564 #include "confdefs.h"
12565 /* System header to define __stub macros and hopefully few prototypes,
12566     which can conflict with char esd_play_stream(); below.  */
12567 #include <assert.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 esd_play_stream();
12572
12573 int main() {
12574
12575 /* The GNU C library defines this for functions which it implements
12576     to always fail with ENOSYS.  Some functions are actually named
12577     something starting with __ and the normal name is an alias.  */
12578 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12579 choke me
12580 #else
12581 esd_play_stream();
12582 #endif
12583
12584 ; return 0; }
12585 EOF
12586 if { (eval echo configure:12587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12587   rm -rf conftest*
12588   eval "ac_cv_func_esd_play_stream=yes"
12589 else
12590   echo "configure: failed program was:" >&5
12591   cat conftest.$ac_ext >&5
12592   rm -rf conftest*
12593   eval "ac_cv_func_esd_play_stream=no"
12594 fi
12595 rm -f conftest*
12596
12597 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12598   echo "$ac_t""yes" 1>&6
12599   have_esd_sound=yes
12600 else
12601   echo "$ac_t""no" 1>&6
12602 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12603 fi
12604
12605   fi
12606
12607   if test "$have_esd_sound" = "yes"; then
12608     with_esd_sound=yes
12609     need_miscplay=yes
12610     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12611    echo "    xemacs will be linked with \"esd.o\""
12612  fi
12613     { test "$extra_verbose" = "yes" && cat << \EOF
12614     Defining HAVE_ESD_SOUND
12615 EOF
12616 cat >> confdefs.h <<\EOF
12617 #define HAVE_ESD_SOUND 1
12618 EOF
12619 }
12620
12621   else
12622     test "$with_esd_sound" = "yes" && \
12623       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12624     with_esd_sound=no
12625   fi
12626 fi
12627
12628 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12629    echo "    xemacs will be linked with \"miscplay.o\""
12630  fi
12631
12632
12633 test -z "$with_tty" && with_tty=yes
12634
12635 if test "$with_tty" = "yes"  ; then
12636   echo "checking for TTY-related features" 1>&6
12637 echo "configure:12638: checking for TTY-related features" >&5
12638   { test "$extra_verbose" = "yes" && cat << \EOF
12639     Defining HAVE_TTY
12640 EOF
12641 cat >> confdefs.h <<\EOF
12642 #define HAVE_TTY 1
12643 EOF
12644 }
12645
12646   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
12647    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\""
12648  fi
12649
12650     if test -z "$with_ncurses"; then
12651     
12652 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12653 echo "configure:12654: checking for tgetent in -lncurses" >&5
12654 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12655
12656 xe_check_libs=" -lncurses "
12657 cat > conftest.$ac_ext <<EOF
12658 #line 12659 "configure"
12659 #include "confdefs.h"
12660 /* Override any gcc2 internal prototype to avoid an error.  */
12661 /* We use char because int might match the return type of a gcc2
12662     builtin and then its argument prototype would still apply.  */
12663 char tgetent();
12664
12665 int main() {
12666 tgetent()
12667 ; return 0; }
12668 EOF
12669 if { (eval echo configure:12670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12670   rm -rf conftest*
12671   eval "ac_cv_lib_$ac_lib_var=yes"
12672 else
12673   echo "configure: failed program was:" >&5
12674   cat conftest.$ac_ext >&5
12675   rm -rf conftest*
12676   eval "ac_cv_lib_$ac_lib_var=no"
12677 fi
12678 rm -f conftest*
12679 xe_check_libs=""
12680
12681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12682   echo "$ac_t""yes" 1>&6
12683   with_ncurses=yes
12684 else
12685   echo "$ac_t""no" 1>&6
12686 with_ncurses=no
12687 fi
12688
12689
12690   fi
12691   if test "$with_ncurses" = "yes"; then
12692     { test "$extra_verbose" = "yes" && cat << \EOF
12693     Defining HAVE_NCURSES
12694 EOF
12695 cat >> confdefs.h <<\EOF
12696 #define HAVE_NCURSES 1
12697 EOF
12698 }
12699
12700     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12701 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12702 echo "configure:12703: checking for ncurses/curses.h" >&5
12703
12704 cat > conftest.$ac_ext <<EOF
12705 #line 12706 "configure"
12706 #include "confdefs.h"
12707 #include <ncurses/curses.h>
12708 EOF
12709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12710 { (eval echo configure:12711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12712 if test -z "$ac_err"; then
12713   rm -rf conftest*
12714   eval "ac_cv_header_$ac_safe=yes"
12715 else
12716   echo "$ac_err" >&5
12717   echo "configure: failed program was:" >&5
12718   cat conftest.$ac_ext >&5
12719   rm -rf conftest*
12720   eval "ac_cv_header_$ac_safe=no"
12721 fi
12722 rm -f conftest*
12723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12724   echo "$ac_t""yes" 1>&6
12725   curses_h_file=ncurses/curses.h
12726 else
12727   echo "$ac_t""no" 1>&6
12728 fi
12729
12730     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12731 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12732 echo "configure:12733: checking for ncurses/term.h" >&5
12733
12734 cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 #include <ncurses/term.h>
12738 EOF
12739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12740 { (eval echo configure:12741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12742 if test -z "$ac_err"; then
12743   rm -rf conftest*
12744   eval "ac_cv_header_$ac_safe=yes"
12745 else
12746   echo "$ac_err" >&5
12747   echo "configure: failed program was:" >&5
12748   cat conftest.$ac_ext >&5
12749   rm -rf conftest*
12750   eval "ac_cv_header_$ac_safe=no"
12751 fi
12752 rm -f conftest*
12753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12754   echo "$ac_t""yes" 1>&6
12755   term_h_file=ncurses/term.h
12756 else
12757   echo "$ac_t""no" 1>&6
12758 fi
12759
12760     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12761    echo "    xemacs will be linked with \"terminfo.o\""
12762  fi
12763     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12764
12765     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12766                         save_c_switch_site="$c_switch_site"
12767       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12768       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12769 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12770 echo "configure:12771: checking for ncurses/curses.h" >&5
12771
12772 cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 #include <ncurses/curses.h>
12776 EOF
12777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12778 { (eval echo configure:12779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12780 if test -z "$ac_err"; then
12781   rm -rf conftest*
12782   eval "ac_cv_header_$ac_safe=yes"
12783 else
12784   echo "$ac_err" >&5
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -rf conftest*
12788   eval "ac_cv_header_$ac_safe=no"
12789 fi
12790 rm -f conftest*
12791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12792   echo "$ac_t""yes" 1>&6
12793   curses_h_file=ncurses/curses.h
12794 else
12795   echo "$ac_t""no" 1>&6
12796 fi
12797
12798       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12799         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12800         else c_switch_site="$save_c_switch_site"
12801       fi
12802     fi
12803   else         if test "$have_terminfo" = "yes"; then
12804       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12805    echo "    xemacs will be linked with \"terminfo.o\""
12806  fi
12807       if test -n "$libs_termcap"; then
12808         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12809       else
12810         for lib in curses termlib termcap; do
12811           
12812 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12813 echo "configure:12814: checking for tgetent in -l$lib" >&5
12814 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12815
12816 xe_check_libs=" -l$lib "
12817 cat > conftest.$ac_ext <<EOF
12818 #line 12819 "configure"
12819 #include "confdefs.h"
12820 /* Override any gcc2 internal prototype to avoid an error.  */
12821 /* We use char because int might match the return type of a gcc2
12822     builtin and then its argument prototype would still apply.  */
12823 char tgetent();
12824
12825 int main() {
12826 tgetent()
12827 ; return 0; }
12828 EOF
12829 if { (eval echo configure:12830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12830   rm -rf conftest*
12831   eval "ac_cv_lib_$ac_lib_var=yes"
12832 else
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   eval "ac_cv_lib_$ac_lib_var=no"
12837 fi
12838 rm -f conftest*
12839 xe_check_libs=""
12840
12841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12842   echo "$ac_t""yes" 1>&6
12843   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12844 else
12845   echo "$ac_t""no" 1>&6
12846 fi
12847
12848
12849         done
12850       fi
12851     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12852    echo "    xemacs will be linked with \"tparam.o\""
12853  fi
12854                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12855       if test -n "$libs_termcap"; then
12856         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12857       else
12858         
12859 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12860 echo "configure:12861: checking for tgetent in -lcurses" >&5
12861 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12862
12863 xe_check_libs=" -lcurses "
12864 cat > conftest.$ac_ext <<EOF
12865 #line 12866 "configure"
12866 #include "confdefs.h"
12867 /* Override any gcc2 internal prototype to avoid an error.  */
12868 /* We use char because int might match the return type of a gcc2
12869     builtin and then its argument prototype would still apply.  */
12870 char tgetent();
12871
12872 int main() {
12873 tgetent()
12874 ; return 0; }
12875 EOF
12876 if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12877   rm -rf conftest*
12878   eval "ac_cv_lib_$ac_lib_var=yes"
12879 else
12880   echo "configure: failed program was:" >&5
12881   cat conftest.$ac_ext >&5
12882   rm -rf conftest*
12883   eval "ac_cv_lib_$ac_lib_var=no"
12884 fi
12885 rm -f conftest*
12886 xe_check_libs=""
12887
12888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12889   echo "$ac_t""yes" 1>&6
12890   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12891 else
12892   echo "$ac_t""no" 1>&6
12893 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12894 echo "configure:12895: checking for tgetent in -ltermcap" >&5
12895 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12896
12897 xe_check_libs=" -ltermcap "
12898 cat > conftest.$ac_ext <<EOF
12899 #line 12900 "configure"
12900 #include "confdefs.h"
12901 /* Override any gcc2 internal prototype to avoid an error.  */
12902 /* We use char because int might match the return type of a gcc2
12903     builtin and then its argument prototype would still apply.  */
12904 char tgetent();
12905
12906 int main() {
12907 tgetent()
12908 ; return 0; }
12909 EOF
12910 if { (eval echo configure:12911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12911   rm -rf conftest*
12912   eval "ac_cv_lib_$ac_lib_var=yes"
12913 else
12914   echo "configure: failed program was:" >&5
12915   cat conftest.$ac_ext >&5
12916   rm -rf conftest*
12917   eval "ac_cv_lib_$ac_lib_var=no"
12918 fi
12919 rm -f conftest*
12920 xe_check_libs=""
12921
12922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12923   echo "$ac_t""yes" 1>&6
12924   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12925 else
12926   echo "$ac_t""no" 1>&6
12927 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12928    echo "    xemacs will be linked with \"termcap.o\""
12929  fi
12930 fi
12931
12932
12933 fi
12934
12935
12936       fi
12937     fi
12938   fi
12939   { test "$extra_verbose" = "yes" && cat << EOF
12940     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12941 EOF
12942 cat >> confdefs.h <<EOF
12943 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12944 EOF
12945 }
12946
12947   { test "$extra_verbose" = "yes" && cat << EOF
12948     Defining TERM_H_FILE = "${term_h_file-term.h}"
12949 EOF
12950 cat >> confdefs.h <<EOF
12951 #define TERM_H_FILE "${term_h_file-term.h}"
12952 EOF
12953 }
12954
12955
12956     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12957 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12958 echo "configure:12959: checking for gpm.h" >&5
12959
12960 cat > conftest.$ac_ext <<EOF
12961 #line 12962 "configure"
12962 #include "confdefs.h"
12963 #include <gpm.h>
12964 EOF
12965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12966 { (eval echo configure:12967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12968 if test -z "$ac_err"; then
12969   rm -rf conftest*
12970   eval "ac_cv_header_$ac_safe=yes"
12971 else
12972   echo "$ac_err" >&5
12973   echo "configure: failed program was:" >&5
12974   cat conftest.$ac_ext >&5
12975   rm -rf conftest*
12976   eval "ac_cv_header_$ac_safe=no"
12977 fi
12978 rm -f conftest*
12979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12980   echo "$ac_t""yes" 1>&6
12981   :
12982 else
12983   echo "$ac_t""no" 1>&6
12984 with_gpm=no
12985 fi
12986  }
12987   test -z "$with_gpm" && { 
12988 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12989 echo "configure:12990: checking for Gpm_Open in -lgpm" >&5
12990 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12991
12992 xe_check_libs=" -lgpm "
12993 cat > conftest.$ac_ext <<EOF
12994 #line 12995 "configure"
12995 #include "confdefs.h"
12996 /* Override any gcc2 internal prototype to avoid an error.  */
12997 /* We use char because int might match the return type of a gcc2
12998     builtin and then its argument prototype would still apply.  */
12999 char Gpm_Open();
13000
13001 int main() {
13002 Gpm_Open()
13003 ; return 0; }
13004 EOF
13005 if { (eval echo configure:13006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13006   rm -rf conftest*
13007   eval "ac_cv_lib_$ac_lib_var=yes"
13008 else
13009   echo "configure: failed program was:" >&5
13010   cat conftest.$ac_ext >&5
13011   rm -rf conftest*
13012   eval "ac_cv_lib_$ac_lib_var=no"
13013 fi
13014 rm -f conftest*
13015 xe_check_libs=""
13016
13017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13018   echo "$ac_t""yes" 1>&6
13019   with_gpm=yes
13020 else
13021   echo "$ac_t""no" 1>&6
13022 with_gpm=no
13023 fi
13024
13025  }
13026   if test "$with_gpm" = "yes"; then
13027     { test "$extra_verbose" = "yes" && cat << \EOF
13028     Defining HAVE_GPM
13029 EOF
13030 cat >> confdefs.h <<\EOF
13031 #define HAVE_GPM 1
13032 EOF
13033 }
13034
13035     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13036    echo "    xemacs will be linked with \"gpmevent.o\""
13037  fi
13038     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13039   fi
13040
13041 else   for feature in ncurses gpm; do
13042     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13043       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13044     fi
13045     eval "with_${feature}=no"
13046   done
13047 fi 
13048 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13049    echo "    xemacs will be linked with \"event-unixoid.o\""
13050  fi
13051
13052
13053 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13054   != "no no no" && echo "checking for database support" 1>&6
13055 echo "configure:13056: checking for database support" >&5
13056
13057 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13058   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13059 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13060 echo "configure:13061: checking for ndbm.h" >&5
13061
13062 cat > conftest.$ac_ext <<EOF
13063 #line 13064 "configure"
13064 #include "confdefs.h"
13065 #include <ndbm.h>
13066 EOF
13067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13068 { (eval echo configure:13069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13070 if test -z "$ac_err"; then
13071   rm -rf conftest*
13072   eval "ac_cv_header_$ac_safe=yes"
13073 else
13074   echo "$ac_err" >&5
13075   echo "configure: failed program was:" >&5
13076   cat conftest.$ac_ext >&5
13077   rm -rf conftest*
13078   eval "ac_cv_header_$ac_safe=no"
13079 fi
13080 rm -f conftest*
13081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13082   echo "$ac_t""yes" 1>&6
13083   :
13084 else
13085   echo "$ac_t""no" 1>&6
13086
13087     test "$with_database_gdbm" = "yes" -o \
13088          "$with_database_dbm"  = "yes" && \
13089       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13090     with_database_gdbm=no with_database_dbm=no
13091 fi
13092
13093 fi
13094
13095 if test "$with_database_gdbm" != "no"; then
13096   
13097 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13098 echo "configure:13099: checking for dbm_open in -lgdbm" >&5
13099 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13100
13101 xe_check_libs=" -lgdbm "
13102 cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 /* Override any gcc2 internal prototype to avoid an error.  */
13106 /* We use char because int might match the return type of a gcc2
13107     builtin and then its argument prototype would still apply.  */
13108 char dbm_open();
13109
13110 int main() {
13111 dbm_open()
13112 ; return 0; }
13113 EOF
13114 if { (eval echo configure:13115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13115   rm -rf conftest*
13116   eval "ac_cv_lib_$ac_lib_var=yes"
13117 else
13118   echo "configure: failed program was:" >&5
13119   cat conftest.$ac_ext >&5
13120   rm -rf conftest*
13121   eval "ac_cv_lib_$ac_lib_var=no"
13122 fi
13123 rm -f conftest*
13124 xe_check_libs=""
13125
13126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13127   echo "$ac_t""yes" 1>&6
13128   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13129 else
13130   echo "$ac_t""no" 1>&6
13131 if test "$with_database_gdbm" = "yes"; then
13132      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13133    fi
13134    with_database_gdbm=no
13135 fi
13136
13137
13138 fi
13139
13140 if test "$with_database_dbm" != "no"; then
13141   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13142 echo "configure:13143: checking for dbm_open" >&5
13143
13144 cat > conftest.$ac_ext <<EOF
13145 #line 13146 "configure"
13146 #include "confdefs.h"
13147 /* System header to define __stub macros and hopefully few prototypes,
13148     which can conflict with char dbm_open(); below.  */
13149 #include <assert.h>
13150 /* Override any gcc2 internal prototype to avoid an error.  */
13151 /* We use char because int might match the return type of a gcc2
13152     builtin and then its argument prototype would still apply.  */
13153 char dbm_open();
13154
13155 int main() {
13156
13157 /* The GNU C library defines this for functions which it implements
13158     to always fail with ENOSYS.  Some functions are actually named
13159     something starting with __ and the normal name is an alias.  */
13160 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13161 choke me
13162 #else
13163 dbm_open();
13164 #endif
13165
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   eval "ac_cv_func_dbm_open=yes"
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   eval "ac_cv_func_dbm_open=no"
13176 fi
13177 rm -f conftest*
13178
13179 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13180   echo "$ac_t""yes" 1>&6
13181   with_database_dbm=yes libdbm=
13182 else
13183   echo "$ac_t""no" 1>&6
13184
13185     
13186 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13187 echo "configure:13188: checking for dbm_open in -ldbm" >&5
13188 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13189
13190 xe_check_libs=" -ldbm "
13191 cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 /* Override any gcc2 internal prototype to avoid an error.  */
13195 /* We use char because int might match the return type of a gcc2
13196     builtin and then its argument prototype would still apply.  */
13197 char dbm_open();
13198
13199 int main() {
13200 dbm_open()
13201 ; return 0; }
13202 EOF
13203 if { (eval echo configure:13204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13204   rm -rf conftest*
13205   eval "ac_cv_lib_$ac_lib_var=yes"
13206 else
13207   echo "configure: failed program was:" >&5
13208   cat conftest.$ac_ext >&5
13209   rm -rf conftest*
13210   eval "ac_cv_lib_$ac_lib_var=no"
13211 fi
13212 rm -f conftest*
13213 xe_check_libs=""
13214
13215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13216   echo "$ac_t""yes" 1>&6
13217   with_database_dbm=yes libdbm=-ldbm
13218 else
13219   echo "$ac_t""no" 1>&6
13220 test "$with_database_dbm" = "yes" && \
13221         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13222       with_database_dbm=no
13223 fi
13224
13225
13226 fi
13227
13228 fi
13229
13230 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13231 test "$with_database_gdbm" = "yes" -o \
13232      "$with_database_dbm"  = "yes" && \
13233   { test "$extra_verbose" = "yes" && cat << \EOF
13234     Defining HAVE_DBM
13235 EOF
13236 cat >> confdefs.h <<\EOF
13237 #define HAVE_DBM 1
13238 EOF
13239 }
13240
13241
13242 if test "$with_database_berkdb" != "no"; then
13243   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13244 echo "configure:13245: checking for Berkeley db.h" >&5
13245   for header in "db/db.h" "db.h"; do
13246     cat > conftest.$ac_ext <<EOF
13247 #line 13248 "configure"
13248 #include "confdefs.h"
13249
13250 #include <stdlib.h>
13251 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13252 #ifdef HAVE_INTTYPES_H
13253 #define __BIT_TYPES_DEFINED__
13254 #include <inttypes.h>
13255 typedef uint8_t  u_int8_t;
13256 typedef uint16_t u_int16_t;
13257 typedef uint32_t u_int32_t;
13258 #ifdef WE_DONT_NEED_QUADS
13259 typedef uint64_t u_int64_t;
13260 #endif
13261 #endif
13262 #endif
13263 #include <$header>
13264
13265 int main() {
13266
13267 ; return 0; }
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13270   rm -rf conftest*
13271   db_h_file="$header"; break
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275 fi
13276 rm -f conftest*
13277   done
13278   if test -z "$db_h_file"
13279   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13280   else echo "$ac_t""$db_h_file" 1>&6
13281   fi
13282
13283   if test "$with_database_berkdb" != "no"; then
13284     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13285 echo "configure:13286: checking for Berkeley DB version" >&5
13286     cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 #include <$db_h_file>
13290 #if DB_VERSION_MAJOR > 1
13291 yes
13292 #endif
13293
13294 EOF
13295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13296   egrep "yes" >/dev/null 2>&1; then
13297   rm -rf conftest*
13298   cat > conftest.$ac_ext <<EOF
13299 #line 13300 "configure"
13300 #include "confdefs.h"
13301 #include <$db_h_file>
13302 #if DB_VERSION_MAJOR > 2
13303 yes
13304 #endif
13305
13306 EOF
13307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13308   egrep "yes" >/dev/null 2>&1; then
13309   rm -rf conftest*
13310   echo "$ac_t""3" 1>&6; dbfunc=db_create
13311 else
13312   rm -rf conftest*
13313   
13314     echo "$ac_t""2" 1>&6; dbfunc=db_open
13315 fi
13316 rm -f conftest*
13317
13318 else
13319   rm -rf conftest*
13320   
13321     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13322 fi
13323 rm -f conftest*
13324
13325     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13326 echo "configure:13327: checking for $dbfunc" >&5
13327
13328 cat > conftest.$ac_ext <<EOF
13329 #line 13330 "configure"
13330 #include "confdefs.h"
13331 /* System header to define __stub macros and hopefully few prototypes,
13332     which can conflict with char $dbfunc(); below.  */
13333 #include <assert.h>
13334 /* Override any gcc2 internal prototype to avoid an error.  */
13335 /* We use char because int might match the return type of a gcc2
13336     builtin and then its argument prototype would still apply.  */
13337 char $dbfunc();
13338
13339 int main() {
13340
13341 /* The GNU C library defines this for functions which it implements
13342     to always fail with ENOSYS.  Some functions are actually named
13343     something starting with __ and the normal name is an alias.  */
13344 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13345 choke me
13346 #else
13347 $dbfunc();
13348 #endif
13349
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   eval "ac_cv_func_$dbfunc=yes"
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   eval "ac_cv_func_$dbfunc=no"
13360 fi
13361 rm -f conftest*
13362
13363 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13364   echo "$ac_t""yes" 1>&6
13365   with_database_berkdb=yes need_libdb=no
13366 else
13367   echo "$ac_t""no" 1>&6
13368
13369     
13370 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13371 echo "configure:13372: checking for $dbfunc in -ldb" >&5
13372 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13373
13374 xe_check_libs=" -ldb "
13375 cat > conftest.$ac_ext <<EOF
13376 #line 13377 "configure"
13377 #include "confdefs.h"
13378 /* Override any gcc2 internal prototype to avoid an error.  */
13379 /* We use char because int might match the return type of a gcc2
13380     builtin and then its argument prototype would still apply.  */
13381 char $dbfunc();
13382
13383 int main() {
13384 $dbfunc()
13385 ; return 0; }
13386 EOF
13387 if { (eval echo configure:13388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13388   rm -rf conftest*
13389   eval "ac_cv_lib_$ac_lib_var=yes"
13390 else
13391   echo "configure: failed program was:" >&5
13392   cat conftest.$ac_ext >&5
13393   rm -rf conftest*
13394   eval "ac_cv_lib_$ac_lib_var=no"
13395 fi
13396 rm -f conftest*
13397 xe_check_libs=""
13398
13399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13400   echo "$ac_t""yes" 1>&6
13401   with_database_berkdb=yes need_libdb=yes
13402 else
13403   echo "$ac_t""no" 1>&6
13404 fi
13405
13406
13407 fi
13408
13409   fi
13410
13411   if test "$with_database_berkdb" = "yes"; then
13412     { test "$extra_verbose" = "yes" && cat << EOF
13413     Defining DB_H_FILE = "$db_h_file"
13414 EOF
13415 cat >> confdefs.h <<EOF
13416 #define DB_H_FILE "$db_h_file"
13417 EOF
13418 }
13419
13420     { test "$extra_verbose" = "yes" && cat << \EOF
13421     Defining HAVE_BERKELEY_DB
13422 EOF
13423 cat >> confdefs.h <<\EOF
13424 #define HAVE_BERKELEY_DB 1
13425 EOF
13426 }
13427
13428     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13429   else with_database_berkdb=no
13430   fi
13431 fi
13432
13433 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13434      != "no no no"; then
13435   { test "$extra_verbose" = "yes" && cat << \EOF
13436     Defining HAVE_DATABASE
13437 EOF
13438 cat >> confdefs.h <<\EOF
13439 #define HAVE_DATABASE 1
13440 EOF
13441 }
13442
13443   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13444    echo "    xemacs will be linked with \"database.o\""
13445  fi
13446 fi
13447
13448 if test "$with_socks" = "yes"; then
13449   
13450 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13451 echo "configure:13452: checking for SOCKSinit in -lsocks" >&5
13452 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13453
13454 xe_check_libs=" -lsocks "
13455 cat > conftest.$ac_ext <<EOF
13456 #line 13457 "configure"
13457 #include "confdefs.h"
13458 /* Override any gcc2 internal prototype to avoid an error.  */
13459 /* We use char because int might match the return type of a gcc2
13460     builtin and then its argument prototype would still apply.  */
13461 char SOCKSinit();
13462
13463 int main() {
13464 SOCKSinit()
13465 ; return 0; }
13466 EOF
13467 if { (eval echo configure:13468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13468   rm -rf conftest*
13469   eval "ac_cv_lib_$ac_lib_var=yes"
13470 else
13471   echo "configure: failed program was:" >&5
13472   cat conftest.$ac_ext >&5
13473   rm -rf conftest*
13474   eval "ac_cv_lib_$ac_lib_var=no"
13475 fi
13476 rm -f conftest*
13477 xe_check_libs=""
13478
13479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13480   echo "$ac_t""yes" 1>&6
13481     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13482     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13483   { test "$extra_verbose" = "yes" && cat << EOF
13484     Defining $ac_tr_lib
13485 EOF
13486 cat >> confdefs.h <<EOF
13487 #define $ac_tr_lib 1
13488 EOF
13489 }
13490
13491   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13492
13493 else
13494   echo "$ac_t""no" 1>&6
13495 fi
13496
13497
13498   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13499     Defining HAVE_SOCKS
13500 EOF
13501 cat >> confdefs.h <<\EOF
13502 #define HAVE_SOCKS 1
13503 EOF
13504 }
13505
13506 fi
13507
13508 if test "$usage_tracking" = "yes"; then
13509   { test "$extra_verbose" = "yes" && cat << \EOF
13510     Defining USAGE_TRACKING
13511 EOF
13512 cat >> confdefs.h <<\EOF
13513 #define USAGE_TRACKING 1
13514 EOF
13515 }
13516
13517   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13518 fi
13519
13520 if test "$with_modules" != "no"; then
13521   echo "checking for module support" 1>&6
13522 echo "configure:13523: checking for module support" >&5
13523
13524     if test "$with_msw" = "yes"; then
13525     have_dl=yes;
13526   else
13527         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13528 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13529 echo "configure:13530: checking for dlfcn.h" >&5
13530
13531 cat > conftest.$ac_ext <<EOF
13532 #line 13533 "configure"
13533 #include "confdefs.h"
13534 #include <dlfcn.h>
13535 EOF
13536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13537 { (eval echo configure:13538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13539 if test -z "$ac_err"; then
13540   rm -rf conftest*
13541   eval "ac_cv_header_$ac_safe=yes"
13542 else
13543   echo "$ac_err" >&5
13544   echo "configure: failed program was:" >&5
13545   cat conftest.$ac_ext >&5
13546   rm -rf conftest*
13547   eval "ac_cv_header_$ac_safe=no"
13548 fi
13549 rm -f conftest*
13550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13551   echo "$ac_t""yes" 1>&6
13552   
13553       
13554 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13555 echo "configure:13556: checking for dlopen in -ldl" >&5
13556 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13557
13558 xe_check_libs=" -ldl "
13559 cat > conftest.$ac_ext <<EOF
13560 #line 13561 "configure"
13561 #include "confdefs.h"
13562 /* Override any gcc2 internal prototype to avoid an error.  */
13563 /* We use char because int might match the return type of a gcc2
13564     builtin and then its argument prototype would still apply.  */
13565 char dlopen();
13566
13567 int main() {
13568 dlopen()
13569 ; return 0; }
13570 EOF
13571 if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13572   rm -rf conftest*
13573   eval "ac_cv_lib_$ac_lib_var=yes"
13574 else
13575   echo "configure: failed program was:" >&5
13576   cat conftest.$ac_ext >&5
13577   rm -rf conftest*
13578   eval "ac_cv_lib_$ac_lib_var=no"
13579 fi
13580 rm -f conftest*
13581 xe_check_libs=""
13582
13583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13584   echo "$ac_t""yes" 1>&6
13585   have_dl=yes libdl=dl
13586 else
13587   echo "$ac_t""no" 1>&6
13588
13589 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13590 echo "configure:13591: checking for dlopen in -lc" >&5
13591 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13592
13593 xe_check_libs=" -lc "
13594 cat > conftest.$ac_ext <<EOF
13595 #line 13596 "configure"
13596 #include "confdefs.h"
13597 /* Override any gcc2 internal prototype to avoid an error.  */
13598 /* We use char because int might match the return type of a gcc2
13599     builtin and then its argument prototype would still apply.  */
13600 char dlopen();
13601
13602 int main() {
13603 dlopen()
13604 ; return 0; }
13605 EOF
13606 if { (eval echo configure:13607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13607   rm -rf conftest*
13608   eval "ac_cv_lib_$ac_lib_var=yes"
13609 else
13610   echo "configure: failed program was:" >&5
13611   cat conftest.$ac_ext >&5
13612   rm -rf conftest*
13613   eval "ac_cv_lib_$ac_lib_var=no"
13614 fi
13615 rm -f conftest*
13616 xe_check_libs=""
13617
13618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13619   echo "$ac_t""yes" 1>&6
13620   have_dl=yes 
13621 else
13622   echo "$ac_t""no" 1>&6
13623 fi
13624
13625
13626 fi
13627
13628
13629 else
13630   echo "$ac_t""no" 1>&6
13631 fi
13632
13633     if test -n "$have_dl"; then
13634       { test "$extra_verbose" = "yes" && cat << \EOF
13635     Defining HAVE_DLOPEN
13636 EOF
13637 cat >> confdefs.h <<\EOF
13638 #define HAVE_DLOPEN 1
13639 EOF
13640 }
13641
13642     else
13643       
13644 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13645 echo "configure:13646: checking for shl_load in -ldld" >&5
13646 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13647
13648 xe_check_libs=" -ldld "
13649 cat > conftest.$ac_ext <<EOF
13650 #line 13651 "configure"
13651 #include "confdefs.h"
13652 /* Override any gcc2 internal prototype to avoid an error.  */
13653 /* We use char because int might match the return type of a gcc2
13654     builtin and then its argument prototype would still apply.  */
13655 char shl_load();
13656
13657 int main() {
13658 shl_load()
13659 ; return 0; }
13660 EOF
13661 if { (eval echo configure:13662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13662   rm -rf conftest*
13663   eval "ac_cv_lib_$ac_lib_var=yes"
13664 else
13665   echo "configure: failed program was:" >&5
13666   cat conftest.$ac_ext >&5
13667   rm -rf conftest*
13668   eval "ac_cv_lib_$ac_lib_var=no"
13669 fi
13670 rm -f conftest*
13671 xe_check_libs=""
13672
13673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13674   echo "$ac_t""yes" 1>&6
13675   libdl=dld have_dl=yes;
13676         { test "$extra_verbose" = "yes" && cat << \EOF
13677     Defining HAVE_SHL_LOAD
13678 EOF
13679 cat >> confdefs.h <<\EOF
13680 #define HAVE_SHL_LOAD 1
13681 EOF
13682 }
13683
13684 else
13685   echo "$ac_t""no" 1>&6
13686
13687 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13688 echo "configure:13689: checking for dld_init in -ldld" >&5
13689 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13690
13691 xe_check_libs=" -ldld "
13692 cat > conftest.$ac_ext <<EOF
13693 #line 13694 "configure"
13694 #include "confdefs.h"
13695 /* Override any gcc2 internal prototype to avoid an error.  */
13696 /* We use char because int might match the return type of a gcc2
13697     builtin and then its argument prototype would still apply.  */
13698 char dld_init();
13699
13700 int main() {
13701 dld_init()
13702 ; return 0; }
13703 EOF
13704 if { (eval echo configure:13705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13705   rm -rf conftest*
13706   eval "ac_cv_lib_$ac_lib_var=yes"
13707 else
13708   echo "configure: failed program was:" >&5
13709   cat conftest.$ac_ext >&5
13710   rm -rf conftest*
13711   eval "ac_cv_lib_$ac_lib_var=no"
13712 fi
13713 rm -f conftest*
13714 xe_check_libs=""
13715
13716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13717   echo "$ac_t""yes" 1>&6
13718   libdl=dld have_dl=yes;
13719         { test "$extra_verbose" = "yes" && cat << \EOF
13720     Defining HAVE_DLD_INIT
13721 EOF
13722 cat >> confdefs.h <<\EOF
13723 #define HAVE_DLD_INIT 1
13724 EOF
13725 }
13726
13727 else
13728   echo "$ac_t""no" 1>&6
13729 fi
13730
13731
13732 fi
13733
13734
13735     fi
13736   fi 
13737   if test -n "$have_dl"; then
13738         
13739 dll_ld=
13740 dll_ldflags=
13741 dll_cflags=
13742 dll_post=
13743 dll_ldo="-o"
13744 ld_dynamic_link_flags=
13745 xehost=$canonical
13746 xealias=$internal_configuration
13747
13748 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13749 echo "configure:13750: checking how to build dynamic libraries for ${xehost}" >&5
13750 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13751 case "$xehost" in
13752 *-*-linux-gnu*) ;;
13753 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13754 esac
13755
13756 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13757 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13758 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13759
13760 case "$xehost_os" in
13761 aix3*)
13762   # AIX sometimes has problems with the GCC collect2 program.  For some
13763   # reason, if we set the COLLECT_NAMES environment variable, the problems
13764   # vanish in a puff of smoke.
13765   if test "${COLLECT_NAMES+set}" != set; then
13766     COLLECT_NAMES=
13767     export COLLECT_NAMES
13768   fi
13769   ;;
13770 esac
13771
13772 # Now see if the compiler is really GCC.
13773 if test "$GCC" = "yes"; then
13774   XEGCC=yes
13775 else
13776   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13777 echo "configure:13778: checking checking whether we are using GNU C" >&5
13778   cat > conftest.$ac_ext <<EOF
13779 #line 13780 "configure"
13780 #include "confdefs.h"
13781
13782 #ifdef __GNUC__
13783   yes;
13784 #endif
13785
13786 EOF
13787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13788   egrep "yes" >/dev/null 2>&1; then
13789   rm -rf conftest*
13790   XEGCC=yes
13791 else
13792   rm -rf conftest*
13793   XEGCC=no
13794 fi
13795 rm -f conftest*
13796
13797   echo "$ac_t""${XEGCC}" 1>&6
13798 fi
13799
13800 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13801 echo "configure:13802: checking how to produce PIC code" >&5
13802 wl=
13803
13804 can_build_shared=yes
13805 if test "$XEGCC" = yes; then
13806   wl='-Wl,'
13807
13808   case "$xehost_os" in
13809   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13810     # PIC is the default for these OSes.
13811     ;;
13812
13813   aix3* | aix4* | os2*)
13814     # We can build DLLs from non-PIC.
13815     ;;
13816   amigaos*)
13817     # FIXME: we need at least 68020 code to build shared libraries, but
13818     # adding the `-m68020' flag to GCC prevents building anything better,
13819     # like `-m68040'.
13820     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13821     ;;
13822   *cygwin* | *mingw* )
13823     # PIC is the default
13824     ;;
13825   *)
13826     dll_cflags='-fPIC'
13827     ;;
13828   esac
13829 else
13830   # PORTME Check for PIC flags for the system compiler.
13831   case "$xehost_os" in
13832   hpux9* | hpux1[0-9]*)
13833     # Is there a better link_static_flag that works with the bundled CC?
13834     wl='-Wl,'
13835     dll_cflags='+Z'
13836     ;;
13837
13838   irix5* | irix6*)
13839     wl='-Wl,'
13840     # PIC (with -KPIC) is the default.
13841     ;;
13842
13843   os2*)
13844     # We can build DLLs from non-PIC.
13845     ;;
13846
13847   osf3* | osf4*)
13848     # All OSF/1 code is PIC.
13849     wl='-Wl,'
13850     ;;
13851
13852   sco3.2v5*)
13853     dll_cflags='-belf -Kpic'
13854     wl='-Wl,'
13855     ;;
13856
13857   unixware*)
13858     dll_cflags="-KPIC"
13859     wl="-Wl,"
13860     ;;
13861
13862   sysv4*)
13863     dll_cflags="-KPIC"
13864     wl="-Wl,"
13865     ;;
13866
13867   sysv5*)
13868     dll_cflags="-KPIC"
13869     wl="-Wl,"
13870     ;;
13871
13872   solaris2*)
13873     dll_cflags='-KPIC'
13874     wl='-Wl,'
13875     ;;
13876
13877   sunos4*)
13878     dll_cflags='-PIC'
13879     wl='-Qoption ld '
13880     ;;
13881
13882   uts4*)
13883     dll_cflags='-pic'
13884     ;;
13885
13886   *)
13887     can_build_shared=no
13888     ;;
13889   esac
13890 fi
13891
13892 if test -n "$dll_cflags"; then
13893   echo "$ac_t""${dll_cflags}" 1>&6
13894
13895   # Check to make sure the dll_cflags actually works.
13896   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13897 echo "configure:13898: checking if PIC flag ${dll_cflags} really works" >&5
13898   save_CFLAGS="$CFLAGS"
13899   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13900   cat > conftest.$ac_ext <<EOF
13901 #line 13902 "configure"
13902 #include "confdefs.h"
13903
13904 int main() {
13905 int x=0;
13906 ; return 0; }
13907 EOF
13908 if { (eval echo configure:13909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13909   rm -rf conftest*
13910   
13911     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13912     # reports no error.  So, we need to grep stderr for (Bundled).
13913     if grep '(Bundled)' config.log >/dev/null; then
13914       echo "$ac_t""no" 1>&6
13915       can_build_shared=no
13916       dll_cflags=
13917     else
13918       echo "$ac_t""yes" 1>&6
13919     fi
13920 else
13921   echo "configure: failed program was:" >&5
13922   cat conftest.$ac_ext >&5
13923   rm -rf conftest*
13924   echo "$ac_t""no" 1>&6
13925     can_build_shared=no
13926     dll_cflags=
13927 fi
13928 rm -f conftest*
13929   CFLAGS="$save_CFLAGS"
13930 else
13931   echo "$ac_t""none" 1>&6
13932 fi
13933
13934 if test "$can_build_shared" = "yes"; then
13935 cc_produces_so=no
13936 xldf=
13937 xcldf=
13938 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13939 echo "configure:13940: checking if C compiler can produce shared libraries" >&5
13940 if test "$XEGCC" = yes; then
13941   xcldf="-shared"
13942   xldf="-shared"
13943 else # Not using GCC
13944   case "$xehost_os" in
13945     aix3* | aix4*)
13946       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13947       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13948       ;;
13949
13950     freebsd2* | netbsd* | openbsd*)
13951       xldf="-Bshareable"
13952       xcldf="${wl}-Bshareable"
13953       ;;
13954
13955     freebsd3*)
13956       xcldf="-shared"
13957       ;;
13958
13959     hpux*)
13960       xldf="-b +s"
13961       xcldf="${wl}-b ${wl}+s"
13962       ;;
13963
13964     irix5* | irix6* | osf3* | osf4*)
13965       xcldf="${wl}-shared"
13966       xldf="-shared"
13967       ;;
13968
13969     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13970       xcldf="-G"
13971       xldf="-G"
13972       ;;
13973
13974     sunos4*)
13975       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13976       xldf="-assert pure-text -Bstatic"
13977       ;;
13978   esac
13979 fi # End if if we are using gcc
13980
13981 if test -n "$xcldf"; then
13982   save_LDFLAGS=$LDFLAGS
13983   save_LIBS=$LIBS
13984   save_xe_libs=$xe_libs
13985   LDFLAGS="$xcldf $LDFLAGS"
13986   LIBS=
13987   xe_libs=
13988   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13989   cat > conftest.$ac_ext <<EOF
13990 #line 13991 "configure"
13991 #include "confdefs.h"
13992
13993 int main() {
13994 int x=0;
13995 ; return 0; }
13996 EOF
13997 if { (eval echo configure:13998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13998   rm -rf conftest*
13999   cc_produces_so=yes
14000 else
14001   echo "configure: failed program was:" >&5
14002   cat conftest.$ac_ext >&5
14003   rm -rf conftest*
14004   cc_produces_so=no
14005 fi
14006 rm -f conftest*
14007   LDFLAGS=$save_LDFLAGS
14008   LIBS=$save_LIBS
14009   xe_libs=$save_xe_libs
14010   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14011 else
14012   cc_produces_so=no
14013 fi
14014 echo "$ac_t""${cc_produces_so}" 1>&6
14015
14016 LTLD=$LD
14017 if test -z "$LTLD"; then
14018   ac_prog=ld
14019   if test "$XEGCC" = yes; then
14020     # Check if gcc -print-prog-name=ld gives a path.
14021     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14022 echo "configure:14023: checking for ld used by GCC" >&5
14023     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14024     case "$ac_prog" in
14025     # Accept absolute paths.
14026     /*)
14027       if test -z "$LTLD"; then
14028         case "$ac_prog" in
14029           *gcc-lib*) LTLD="$CC"
14030                      ;;
14031           *)         LTLD="$ac_prog"
14032                      ;;
14033         esac
14034       fi
14035       ;;
14036     "")
14037       # If it fails, then pretend we aren't using GCC.
14038       ac_prog=ld
14039       ;;
14040     *)
14041       # If it is relative, then search for the first ld in PATH.
14042       with_gnu_ld=unknown
14043       ;;
14044     esac
14045   else
14046     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14047 echo "configure:14048: checking for GNU ld" >&5
14048   fi
14049
14050   if test -z "$LTLD"; then
14051     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14052     for ac_dir in $PATH; do
14053       test -z "$ac_dir" && ac_dir=.
14054       if test -f "$ac_dir/$ac_prog"; then
14055         LTLD="$ac_dir/$ac_prog"
14056         # Check to see if the program is GNU ld.  I'd rather use --version,
14057         # but apparently some GNU ld's only accept -v.
14058         # Break only if it was the GNU/non-GNU ld that we prefer.
14059         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14060           xe_gnu_ld=yes
14061         else
14062           xe_gnu_ld=no
14063         fi
14064       fi
14065     done
14066     IFS="$ac_save_ifs"
14067   fi
14068
14069   if test -n "$LTLD"; then
14070     echo "$ac_t""${LTLD}" 1>&6
14071   else
14072     echo "$ac_t""no" 1>&6
14073   fi
14074
14075   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14076     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14077     exit 1
14078   fi
14079 fi
14080
14081 ld_dynamic_link_flags=
14082
14083 # Check to see if it really is or isn't GNU ld.
14084 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14085 echo "configure:14086: checking if the linker is GNU ld" >&5
14086 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14087 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14088   xe_gnu_ld=yes
14089 else
14090   xe_gnu_ld=no
14091 fi
14092 echo "$ac_t""${xe_gnu_ld}" 1>&6
14093
14094 case "$xehost_os" in
14095   amigaos* | sunos4*)
14096     # On these operating systems, we should treat GNU ld like the system ld.
14097     gnu_ld_acts_native=yes
14098     ;;
14099   *)
14100     gnu_ld_acts_native=no
14101     ;;
14102 esac
14103
14104 if test "$cc_produces_so" = "yes"; then
14105   dll_ld=$CC
14106   dll_ldflags=$xcldf
14107   can_build_shared=yes
14108   ld_shlibs=yes
14109 else
14110   # OK - only NOW do we futz about with ld.
14111   # See if the linker supports building shared libraries.
14112   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14113 echo "configure:14114: checking whether the linker supports shared libraries" >&5
14114   dll_ld=$CC
14115   dll_ldflags=$LDFLAGS
14116   ld_shlibs=yes
14117   can_build_shared=yes
14118   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14119     # See if GNU ld supports shared libraries.
14120     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14121       dll_ld=$CC
14122       dll_ldflags="-shared"
14123       ld_shlibs=yes
14124     else
14125       ld_shlibs=no
14126     fi
14127   else
14128     # PORTME fill in a description of your system's linker (not GNU ld)
14129     case "$xehost_os" in
14130     aix3*)
14131       dll_ld=$LTLD
14132       dll_ldflags=$xldf
14133       ;;
14134
14135     aix4*)
14136       dll_ldflags=$xcldf
14137       ;;
14138
14139     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14140     # support.  Future versions do this automatically, but an explicit c++rt0.o
14141     # doesn't break anything, and helps significantly (at the cost of a little
14142     # extra space).
14143     freebsd2.2*)
14144       dll_ld=$LTLD
14145       dll_ldflags=$xldf
14146       dll_post="/usr/lib/c++rt0.o"
14147       ;;
14148
14149     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14150     freebsd2*)
14151       dll_ld=$LTLD
14152       dll_ldflags="-Bshareable"
14153       ;;
14154
14155     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14156     freebsd3*)
14157       dll_ldflags="-shared"
14158       ;;
14159
14160     hpux*)
14161       dll_ld=$LTLD
14162       dll_ldflags=$xldf
14163       ;;
14164
14165     irix5* | irix6*)
14166       dll_ld=$LTLD
14167       dll_ldflags=$xldf
14168       ;;
14169
14170     netbsd*)
14171       # Tested with NetBSD 1.2 ld
14172       dll_ld=$LTLD
14173       dll_ldflags=$xldf
14174       ;;
14175
14176     openbsd*)
14177       dll_ld=$LTLD
14178       dll_ldflags=$xldf
14179       ;;
14180
14181     osf3* | osf4*)
14182       dll_ld=$LTLD
14183       dll_ldflags=$xldf
14184       ;;
14185
14186     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14187     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14188       dll_ld=$LTLD
14189       case "$dll_ld" in
14190         *gcc*) dll_ldflags="-shared"
14191                dll_ld=$CC
14192                ;;
14193         *)     dll_ldflags="-G"
14194                ;;
14195       esac
14196       ;;
14197
14198     sunos4*)
14199       if test "$XEGCC" = yes; then
14200         dll_ld=$CC
14201       else
14202         dll_ld=$LTLD
14203       fi
14204       dll_ldflags=$xldf
14205       ;;
14206
14207     uts4*)
14208       dll_ld=$LTLD
14209       dll_ldflags="-G"
14210       ;;
14211
14212     bsdi*)
14213       dll_ldflags="-r"
14214       dll_ld="shlicc2"
14215       ;;
14216
14217     *)
14218       ld_shlibs=no
14219       can_build_shared=no
14220       ;;
14221     esac
14222   fi
14223   echo "$ac_t""${ld_shlibs}" 1>&6
14224   if test "$ld_shlibs" = "no"; then
14225     can_build_shared=no
14226   fi
14227 fi # End of if cc_produces_so = no
14228
14229
14230 if test "$xe_gnu_ld" = yes; then
14231   if test "$ld_shlibs" = yes; then
14232     ld_dynamic_link_flags="${wl}-export-dynamic"
14233   fi
14234 fi
14235
14236 if test -z "$ld_dynamic_link_flags"; then
14237   case "$xehost_os" in
14238   aix3*)
14239     ld_dynamic_link_flags=
14240     ;;
14241
14242   aix4*)
14243     ld_dynamic_link_flags=
14244     ;;
14245
14246   freebsd2.2*)
14247     ld_dynamic_link_flags=
14248     ;;
14249
14250   freebsd2*)
14251     ld_dynamic_link_flags=
14252     ;;
14253
14254   freebsd3*)
14255     ld_dynamic_link_flags=
14256     ;;
14257
14258   hpux*)
14259     ld_dynamic_link_flags="${wl}-E"
14260     ;;
14261
14262   irix5* | irix6*)
14263     ld_dynamic_link_flags=
14264     ;;
14265
14266   netbsd*)
14267     ld_dynamic_link_flags=
14268     ;;
14269
14270   openbsd*)
14271     ld_dynamic_link_flags=
14272     ;;
14273
14274   osf3* | osf4*)
14275     ld_dynamic_link_flags=
14276     ;;
14277
14278   solaris2* | solaris7*)
14279     ld_dynamic_link_flags=
14280     ;;
14281
14282   sco3.2v5* | unixware* | sysv5* | sysv4*)
14283     ld_dynamic_link_flags="${wl}-Bexport"
14284     ;;
14285
14286   sunos4*)
14287     ld_dynamic_link_flags=
14288     ;;
14289
14290   uts4*)
14291     ld_dynamic_link_flags=
14292     ;;
14293
14294   bsdi*)
14295     ld_dynamic_link_flags=
14296     ;;
14297
14298   esac
14299 fi # End of if -z ld_dynamic_link_flags
14300 fi # End of if test "$can_build_shared" = "yes"
14301
14302
14303
14304
14305
14306
14307
14308
14309   fi
14310
14311   if test "$can_build_shared" = "yes"; then
14312     { test "$extra_verbose" = "yes" && cat << \EOF
14313     Defining HAVE_SHLIB
14314 EOF
14315 cat >> confdefs.h <<\EOF
14316 #define HAVE_SHLIB 1
14317 EOF
14318 }
14319
14320     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14321    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14322  fi
14323     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14324     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14325     for ac_func in dlerror _dlerror
14326 do
14327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14328 echo "configure:14329: checking for $ac_func" >&5
14329
14330 cat > conftest.$ac_ext <<EOF
14331 #line 14332 "configure"
14332 #include "confdefs.h"
14333 /* System header to define __stub macros and hopefully few prototypes,
14334     which can conflict with char $ac_func(); below.  */
14335 #include <assert.h>
14336 /* Override any gcc2 internal prototype to avoid an error.  */
14337 /* We use char because int might match the return type of a gcc2
14338     builtin and then its argument prototype would still apply.  */
14339 char $ac_func();
14340
14341 int main() {
14342
14343 /* The GNU C library defines this for functions which it implements
14344     to always fail with ENOSYS.  Some functions are actually named
14345     something starting with __ and the normal name is an alias.  */
14346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14347 choke me
14348 #else
14349 $ac_func();
14350 #endif
14351
14352 ; return 0; }
14353 EOF
14354 if { (eval echo configure:14355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14355   rm -rf conftest*
14356   eval "ac_cv_func_$ac_func=yes"
14357 else
14358   echo "configure: failed program was:" >&5
14359   cat conftest.$ac_ext >&5
14360   rm -rf conftest*
14361   eval "ac_cv_func_$ac_func=no"
14362 fi
14363 rm -f conftest*
14364
14365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14366   echo "$ac_t""yes" 1>&6
14367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14368   { test "$extra_verbose" = "yes" && cat << EOF
14369     Defining $ac_tr_func
14370 EOF
14371 cat >> confdefs.h <<EOF
14372 #define $ac_tr_func 1
14373 EOF
14374 }
14375  
14376 else
14377   echo "$ac_t""no" 1>&6
14378 fi
14379 done
14380
14381     with_modules=yes
14382   else
14383     if test "$with_modules" = "yes"; then
14384       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14385     else
14386       echo "configure: warning: "Module support cannot be provided."" 1>&2
14387     fi
14388     with_modules=no
14389   fi
14390 fi
14391
14392 cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395 int main(int c,char *v[]){return 0;}
14396 EOF
14397 if { (eval echo configure:14398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14398 then
14399   :
14400 else
14401   conftest_rc="$?"
14402   echo "configure: failed program was:" >&5
14403   cat conftest.$ac_ext >&5
14404   rm -fr conftest*
14405   
14406   echo ""
14407   echo "*** PANIC *** The C compiler can no longer build working executables."
14408   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14409   echo "*** PANIC *** The most likely reason for this problem is that configure"
14410   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14411   echo "*** PANIC *** found at run time."
14412   echo "*** PANIC ***"
14413   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14414   echo "*** PANIC *** On other systems, try telling configure where to find the"
14415   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14416   echo "*** PANIC ***"
14417   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14418   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14419   echo "*** PANIC *** on your system.  Don't do that."
14420   exit 1
14421 fi
14422 rm -fr conftest*
14423
14424 if test "$win32_processes" = "yes"; then
14425   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14426    echo "    xemacs will be linked with \"process-nt.o\""
14427  fi
14428 else
14429   { test "$extra_verbose" = "yes" && cat << \EOF
14430     Defining HAVE_UNIX_PROCESSES
14431 EOF
14432 cat >> confdefs.h <<\EOF
14433 #define HAVE_UNIX_PROCESSES 1
14434 EOF
14435 }
14436
14437   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14438    echo "    xemacs will be linked with \"process-unix.o\""
14439  fi
14440 fi
14441
14442
14443
14444 T=""
14445 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14446 CFLAGS="$T"
14447
14448
14449 T=""
14450 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14451 extra_objs="$T"
14452
14453
14454 T=""
14455 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
14456 c_switch_general="$T"
14457
14458
14459 T=""
14460 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14461 c_switch_window_system="$T"
14462
14463
14464 T=""
14465 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14466 c_switch_all="$T"
14467
14468
14469 T=""
14470 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
14471 ld_switch_general="$T"
14472
14473
14474 T=""
14475 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14476 ld_switch_window_system="$T"
14477
14478
14479 T=""
14480 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14481 ld_switch_all="$T"
14482
14483
14484 T=""
14485 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14486 ld_libs_general="$T"
14487
14488
14489 T=""
14490 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
14491 ld_libs_window_system="$T"
14492
14493
14494 T=""
14495 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14496 ld_libs_all="$T"
14497
14498
14499
14500 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14501 internal_makefile_list="Makefile.in"
14502 SUBDIR_MAKEFILES=''
14503 test -d lock || mkdir lock
14504 for dir in $MAKE_SUBDIR; do
14505   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14506         test -d "$d" || mkdir "$d"; cd "$d"
14507       done ) ;;
14508    * ) test -d "$dir" || mkdir "$dir" ;;
14509   esac
14510   
14511 T=""
14512 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14513 SUBDIR_MAKEFILES="$T"
14514
14515   
14516 T=""
14517 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14518 internal_makefile_list="$T"
14519
14520 done
14521
14522
14523
14524
14525 for dir in src/s src/m; do
14526   if test ! -d "$dir" ; then
14527     echo Making symbolic link to "$srcdir/$dir"
14528     ${LN_S} "$srcdir/$dir" "$dir"
14529   fi
14530 done
14531
14532 if test "$extra_verbose" = "yes"; then
14533   echo ""
14534   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
14535   echo ""
14536 fi
14537
14538
14539 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14540   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14541   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14542 fi
14543
14544 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14545   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14546   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14547 fi
14548
14549 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14550   test "$extra_verbose" = "yes" && echo "creating TAGS"
14551   echo "\f
14552 $srcdir/TAGS,include" > "TAGS"
14553 fi
14554
14555 if test "$__SUNPRO_C" = "yes"; then
14556   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14557   ( echo "# For use with Sun WorkShop's Source browser."
14558     echo "# See sbquery(1) and sbinit(4) for more information"
14559     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14560   ) > .sbinit
14561 fi
14562
14563 rm -f core
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583 PREFIX=$prefix
14584 while true; do
14585   case "$PREFIX" in
14586     *\$* ) eval "PREFIX=$PREFIX" ;;
14587     *) break ;;
14588   esac
14589 done
14590
14591
14592
14593
14594 EXEC_PREFIX=$exec_prefix
14595 while true; do
14596   case "$EXEC_PREFIX" in
14597     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14598     *) break ;;
14599   esac
14600 done
14601
14602
14603
14604
14605 INFODIR=$infodir
14606 while true; do
14607   case "$INFODIR" in
14608     *\$* ) eval "INFODIR=$INFODIR" ;;
14609     *) break ;;
14610   esac
14611 done
14612
14613
14614
14615
14616 INFOPATH=$infopath
14617 while true; do
14618   case "$INFOPATH" in
14619     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14620     *) break ;;
14621   esac
14622 done
14623
14624
14625
14626
14627 PACKAGE_PATH=$package_path
14628 while true; do
14629   case "$PACKAGE_PATH" in
14630     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14631     *) break ;;
14632   esac
14633 done
14634
14635
14636
14637
14638 LISPDIR=$lispdir
14639 while true; do
14640   case "$LISPDIR" in
14641     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14642     *) break ;;
14643   esac
14644 done
14645
14646
14647
14648
14649 MODULEDIR=$moduledir
14650 while true; do
14651   case "$MODULEDIR" in
14652     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14653     *) break ;;
14654   esac
14655 done
14656
14657
14658
14659
14660 SITELISPDIR=$sitelispdir
14661 while true; do
14662   case "$SITELISPDIR" in
14663     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14664     *) break ;;
14665   esac
14666 done
14667
14668
14669
14670
14671 SITEMODULEDIR=$sitemoduledir
14672 while true; do
14673   case "$SITEMODULEDIR" in
14674     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14675     *) break ;;
14676   esac
14677 done
14678
14679
14680
14681
14682 ETCDIR=$etcdir
14683 while true; do
14684   case "$ETCDIR" in
14685     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14686     *) break ;;
14687   esac
14688 done
14689
14690
14691
14692
14693 DOCDIR=$docdir
14694 while true; do
14695   case "$DOCDIR" in
14696     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14697     *) break ;;
14698   esac
14699 done
14700
14701
14702
14703
14704 ARCHLIBDIR=$archlibdir
14705 while true; do
14706   case "$ARCHLIBDIR" in
14707     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14708     *) break ;;
14709   esac
14710 done
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14732
14733
14734
14735
14736
14737
14738
14739 : ${XEMACS_CC:=$CC}
14740
14741
14742 if test "$with_prefix" = "yes"; then
14743   { test "$extra_verbose" = "yes" && cat << \EOF
14744     Defining PREFIX_USER_DEFINED
14745 EOF
14746 cat >> confdefs.h <<\EOF
14747 #define PREFIX_USER_DEFINED 1
14748 EOF
14749 }
14750
14751 fi
14752
14753 if test "$with_site_lisp" = "no"; then
14754   { test "$extra_verbose" = "yes" && cat << \EOF
14755     Defining INHIBIT_SITE_LISP
14756 EOF
14757 cat >> confdefs.h <<\EOF
14758 #define INHIBIT_SITE_LISP 1
14759 EOF
14760 }
14761
14762 fi
14763 if test "$with_site_modules" = "no"; then
14764   { test "$extra_verbose" = "yes" && cat << \EOF
14765     Defining INHIBIT_SITE_MODULES
14766 EOF
14767 cat >> confdefs.h <<\EOF
14768 #define INHIBIT_SITE_MODULES 1
14769 EOF
14770 }
14771
14772 fi
14773
14774
14775 T=""
14776 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14777 ac_configure_args="$T"
14778
14779 { test "$extra_verbose" = "yes" && cat << EOF
14780     Defining EMACS_CONFIGURATION = "$configuration"
14781 EOF
14782 cat >> confdefs.h <<EOF
14783 #define EMACS_CONFIGURATION "$configuration"
14784 EOF
14785 }
14786
14787 { test "$extra_verbose" = "yes" && cat << EOF
14788     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14789 EOF
14790 cat >> confdefs.h <<EOF
14791 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14792 EOF
14793 }
14794
14795
14796
14797 null_string=""
14798 { test "$extra_verbose" = "yes" && cat << EOF
14799     Defining LD_SWITCH_X_SITE = $null_string
14800 EOF
14801 cat >> confdefs.h <<EOF
14802 #define LD_SWITCH_X_SITE $null_string
14803 EOF
14804 }
14805
14806 { test "$extra_verbose" = "yes" && cat << EOF
14807     Defining LD_SWITCH_X_SITE_AUX = $null_string
14808 EOF
14809 cat >> confdefs.h <<EOF
14810 #define LD_SWITCH_X_SITE_AUX $null_string
14811 EOF
14812 }
14813
14814 { test "$extra_verbose" = "yes" && cat << EOF
14815     Defining C_SWITCH_X_SITE = $null_string
14816 EOF
14817 cat >> confdefs.h <<EOF
14818 #define C_SWITCH_X_SITE $null_string
14819 EOF
14820 }
14821
14822 { test "$extra_verbose" = "yes" && cat << EOF
14823     Defining LD_SWITCH_SITE = $null_string
14824 EOF
14825 cat >> confdefs.h <<EOF
14826 #define LD_SWITCH_SITE $null_string
14827 EOF
14828 }
14829
14830 { test "$extra_verbose" = "yes" && cat << EOF
14831     Defining C_SWITCH_SITE = $null_string
14832 EOF
14833 cat >> confdefs.h <<EOF
14834 #define C_SWITCH_SITE $null_string
14835 EOF
14836 }
14837
14838
14839
14840 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14841     Defining GNU_MALLOC
14842 EOF
14843 cat >> confdefs.h <<\EOF
14844 #define GNU_MALLOC 1
14845 EOF
14846 }
14847
14848 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14849     Defining USE_SYSTEM_MALLOC
14850 EOF
14851 cat >> confdefs.h <<\EOF
14852 #define USE_SYSTEM_MALLOC 1
14853 EOF
14854 }
14855
14856 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14857     Defining USE_DEBUG_MALLOC
14858 EOF
14859 cat >> confdefs.h <<\EOF
14860 #define USE_DEBUG_MALLOC 1
14861 EOF
14862 }
14863
14864                                               { test "$extra_verbose" = "yes" && cat << \EOF
14865     Defining USE_SYSTEM_MALLOC
14866 EOF
14867 cat >> confdefs.h <<\EOF
14868 #define USE_SYSTEM_MALLOC 1
14869 EOF
14870 }
14871
14872 fi
14873 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14874     Defining I18N3
14875 EOF
14876 cat >> confdefs.h <<\EOF
14877 #define I18N3 1
14878 EOF
14879 }
14880
14881 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14882     Defining USE_GCC
14883 EOF
14884 cat >> confdefs.h <<\EOF
14885 #define USE_GCC 1
14886 EOF
14887 }
14888
14889 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14890     Defining EXTERNAL_WIDGET
14891 EOF
14892 cat >> confdefs.h <<\EOF
14893 #define EXTERNAL_WIDGET 1
14894 EOF
14895 }
14896
14897 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14898     Defining QUICK_BUILD
14899 EOF
14900 cat >> confdefs.h <<\EOF
14901 #define QUICK_BUILD 1
14902 EOF
14903 }
14904
14905 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14906     Defining PURIFY
14907 EOF
14908 cat >> confdefs.h <<\EOF
14909 #define PURIFY 1
14910 EOF
14911 }
14912
14913 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14914     Defining QUANTIFY
14915 EOF
14916 cat >> confdefs.h <<\EOF
14917 #define QUANTIFY 1
14918 EOF
14919 }
14920
14921 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14922     Defining MAIL_USE_POP
14923 EOF
14924 cat >> confdefs.h <<\EOF
14925 #define MAIL_USE_POP 1
14926 EOF
14927 }
14928
14929 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14930     Defining KERBEROS
14931 EOF
14932 cat >> confdefs.h <<\EOF
14933 #define KERBEROS 1
14934 EOF
14935 }
14936
14937 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14938     Defining HESIOD
14939 EOF
14940 cat >> confdefs.h <<\EOF
14941 #define HESIOD 1
14942 EOF
14943 }
14944
14945 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14946     Defining USE_UNION_TYPE
14947 EOF
14948 cat >> confdefs.h <<\EOF
14949 #define USE_UNION_TYPE 1
14950 EOF
14951 }
14952
14953 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14954     Defining PDUMP
14955 EOF
14956 cat >> confdefs.h <<\EOF
14957 #define PDUMP 1
14958 EOF
14959 }
14960
14961
14962
14963 (
14964 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14965 else
14966   echo "uname -a: `uname -a`"
14967 fi
14968 echo ""
14969 echo "$0 $quoted_arguments"
14970 ) > Installation
14971
14972 if test ! -z ${emacs_beta_version} ; then
14973   if test -z "${emacs_is_beta}" ; then
14974         xemacs_betaname=".${emacs_beta_version}"
14975   else
14976         xemacs_betaname="-b${emacs_beta_version}"
14977   fi
14978 else
14979   xemacs_betaname=""
14980 fi
14981
14982 (
14983 echo "
14984
14985 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14986 "
14987 echo "
14988 Compilation / Installation:"
14989 echo "  Source code location:              $srcdir"
14990 echo "  Installation prefix:               $prefix"
14991 if test -n "$site_includes"; then
14992   echo "  Additional header files:           $site_includes"
14993 fi
14994 if test -n "$site_libraries"; then
14995   echo "  Additional libraries:              $site_libraries"
14996 fi
14997 if test -n "$site_prefixes"; then
14998   echo "  Additional prefixes:               $site_prefixes"
14999 fi
15000 if test -n "$runpath"; then
15001   echo "  Runtime library search path:       $runpath"
15002 fi
15003
15004 if test -n "$opsysfile"
15005 then echo "  Operating system description file: \`$opsysfile'"
15006 else echo "  Not using any operating system description file"
15007 fi
15008 if test -n "$machfile"
15009 then echo "  Machine description file:          \`$machfile'"
15010 else echo "  Not using any machine description file"
15011 fi
15012
15013 echo "  Compiler:                          $CC $CFLAGS"
15014 echo "  Relocating allocator for buffers:  $rel_alloc"
15015 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15016
15017 echo "
15018 Window System:"
15019 if test "$with_msw" = "yes"; then
15020   echo "  Compiling in support for the Microsoft window system."
15021 fi
15022 if test "$with_x11" = "yes"; then
15023   echo "  Compiling in support for the X window system:"
15024   echo "    - X Windows headers location:                 $x_includes"
15025   echo "    - X Windows libraries location:               $x_libraries"
15026   if test "$with_xauth" != yes; then
15027     echo "    - Xau (X authority) not available."
15028   fi
15029   if test "$with_xmu" != yes; then
15030     echo "    - Xmu library not available; substituting equivalent routines."
15031   fi
15032   if test "$with_wmcommand" != no; then
15033     echo "    - Handling WM_COMMAND properly."
15034   fi
15035 fi
15036 if test "$need_athena" = "yes"; then
15037   echo "  Compiling in support for the Athena widget set:"
15038   echo "    - Athena headers location:                    $athena_h_path"
15039   echo "    - Athena library to link:                     $athena_lib"
15040 fi
15041 case "$with_menubars" in
15042   lucid ) echo "  Using Lucid menubars." ;;
15043   motif ) echo "  Using Motif menubars."
15044           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15045           echo "             We recommend using the Lucid menubar instead."
15046           echo "             Re-run configure with --with-menubars='lucid'." ;;
15047     msw ) echo "  Using MS-Windows menubars." ;;
15048 esac
15049 case "$with_scrollbars" in
15050   lucid  ) echo "  Using Lucid scrollbars."      ;;
15051   motif  ) echo "  Using Motif scrollbars."      ;;
15052   athena ) echo "  Using Athena scrollbars."     ;;
15053      msw ) echo "  Using MS-Windows scrollbars." ;;
15054 esac
15055 case "$with_dialogs" in
15056   motif  ) echo "  Using Motif dialog boxes."
15057            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15058              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15059              echo "             We recommend using the Athena dialog boxes instead."
15060              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15061              echo "             Read the PROBLEMS file for more information."
15062            fi; fi ;;
15063   athena ) echo "  Using Athena dialog boxes."     ;;
15064      msw ) echo "  Using MS-Windows dialog boxes." ;;
15065 esac
15066 case "$with_widgets" in
15067   motif  ) echo "  Using Motif native widgets."      ;;
15068   athena ) echo "  Using Athena native widgets."     ;;
15069      msw ) echo "  Using MS-Windows native widgets." ;;
15070 esac
15071 if test "$with_dragndrop" = yes; then
15072   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15073   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15074 fi
15075
15076 echo "
15077 TTY:"
15078 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15079 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15080
15081 echo "
15082 Images:"
15083 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15084 if test "$with_xpm" = yes; then
15085   echo "  Compiling in support for XPM  images."
15086 elif test "$with_x11" = yes; then
15087   echo "  WARNING: -----------------------------------------------------------"
15088   echo "  WARNING: Compiling without XPM image support."
15089   if test "$xpm_problem" != ""; then
15090     echo "  Reason: $xpm_problem"
15091   fi
15092   echo "  WARNING: You should strongly consider installing XPM."
15093   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15094   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15095   echo "  WARNING: -----------------------------------------------------------"
15096 fi
15097 if test "$with_png" = yes; then
15098   echo "  Compiling in support for PNG  images."
15099 elif test "$window_system" != "none"; then
15100   echo "  WARNING: -----------------------------------------------------------"
15101   echo "  WARNING: Compiling without PNG image support."
15102   if test "$png_problem" != ""; then
15103     echo "  Reason: $png_problem"
15104   fi
15105   echo "  WARNING: You should strongly consider installing the PNG libraries."
15106   echo "  WARNING: Otherwise certain images and glyphs may not display."
15107   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15108   echo "  WARNING: -----------------------------------------------------------"
15109 fi
15110 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15111 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15112 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15113
15114 echo "
15115 Sound:"
15116 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15117 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15118 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15119 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15120
15121 echo "
15122 Databases:"
15123 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15124 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15125 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15126 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15127 if test "$with_postgresql" = yes; then
15128   echo "  Compiling in support for PostgreSQL."
15129   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15130   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15131 fi
15132
15133 echo "
15134 Internationalization:"
15135 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15136 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15137 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15138 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15139 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15140 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15141 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15142 if test "$with_wnn" = yes; then
15143   echo "  Compiling in support for the WNN input method on Mule."
15144   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15145 fi
15146 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15147
15148 echo "
15149 Mail:"
15150 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15151 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15152 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15153 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15154
15155 echo "
15156 Other Features:"
15157 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15158 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15159 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15160 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15161 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15162 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15163 test "$pdump" = yes && echo "  Using the new portable dumper."
15164 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15165 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15166 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15167   != "no no no no no no"; then
15168   echo "  WARNING: ---------------------------------------------------------"
15169   echo "  WARNING: Compiling in support for runtime error checking."
15170   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15171   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15172   echo "  WARNING: ---------------------------------------------------------"
15173 fi
15174 echo ""
15175 ) | tee -a Installation
15176 echo ""
15177
15178
15179 # Remove any trailing slashes in these variables.
15180 test -n "$prefix" &&
15181   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15182 test -n "$exec_prefix" &&
15183   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15184
15185
15186 for file in $internal_makefile_list; do
15187   test "$file" = src/Makefile.in && \
15188     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15189   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15190 done
15191 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15192 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
15193
15194 trap '' 1 2 15
15195
15196 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15197
15198 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15199 # Let make expand exec_prefix.
15200 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15201
15202 # Any assignment to VPATH causes Sun make to only execute
15203 # the first set of double-colon rules, so remove it if not needed.
15204 # If there is a colon in the path, we need to keep it.
15205 if test "x$srcdir" = x.; then
15206   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15207 fi
15208
15209 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15210
15211 DEFS=-DHAVE_CONFIG_H
15212
15213 # Without the "./", some shells look in PATH for config.status.
15214 : ${CONFIG_STATUS=./config.status}
15215
15216 echo creating $CONFIG_STATUS
15217 rm -f $CONFIG_STATUS
15218 cat > $CONFIG_STATUS <<EOF
15219 #! /bin/sh
15220 # Generated automatically by configure.
15221 # Run this file to recreate the current configuration.
15222 # This directory was configured as follows,
15223 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15224 #
15225 # $0 $ac_configure_args
15226 #
15227 # Compiler output produced by configure, useful for debugging
15228 # configure, is in ./config.log if it exists.
15229
15230 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15231 for ac_option
15232 do
15233   case "\$ac_option" in
15234   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15235     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15236     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15237   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15238     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15239     exit 0 ;;
15240   -help | --help | --hel | --he | --h)
15241     echo "\$ac_cs_usage"; exit 0 ;;
15242   *) echo "\$ac_cs_usage"; exit 1 ;;
15243   esac
15244 done
15245
15246 ac_given_srcdir=$srcdir
15247 ac_given_INSTALL="$INSTALL"
15248
15249 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15250 EOF
15251 cat >> $CONFIG_STATUS <<EOF
15252
15253 # Protect against being on the right side of a sed subst in config.status.
15254 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15255  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15256 $ac_vpsub
15257 $extrasub
15258 s%@SHELL@%$SHELL%g
15259 s%@CFLAGS@%$CFLAGS%g
15260 s%@CPPFLAGS@%$CPPFLAGS%g
15261 s%@CXXFLAGS@%$CXXFLAGS%g
15262 s%@FFLAGS@%$FFLAGS%g
15263 s%@DEFS@%$DEFS%g
15264 s%@LDFLAGS@%$LDFLAGS%g
15265 s%@LIBS@%$LIBS%g
15266 s%@exec_prefix@%$exec_prefix%g
15267 s%@prefix@%$prefix%g
15268 s%@program_transform_name@%$program_transform_name%g
15269 s%@bindir@%$bindir%g
15270 s%@sbindir@%$sbindir%g
15271 s%@libexecdir@%$libexecdir%g
15272 s%@datadir@%$datadir%g
15273 s%@sysconfdir@%$sysconfdir%g
15274 s%@sharedstatedir@%$sharedstatedir%g
15275 s%@localstatedir@%$localstatedir%g
15276 s%@libdir@%$libdir%g
15277 s%@includedir@%$includedir%g
15278 s%@oldincludedir@%$oldincludedir%g
15279 s%@infodir@%$infodir%g
15280 s%@mandir@%$mandir%g
15281 s%@LN_S@%$LN_S%g
15282 s%@blddir@%$blddir%g
15283 s%@CC@%$CC%g
15284 s%@CPP@%$CPP%g
15285 s%@start_flags@%$start_flags%g
15286 s%@ld_switch_shared@%$ld_switch_shared%g
15287 s%@start_files@%$start_files%g
15288 s%@ld@%$ld%g
15289 s%@lib_gcc@%$lib_gcc%g
15290 s%@RANLIB@%$RANLIB%g
15291 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15292 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15293 s%@INSTALL_DATA@%$INSTALL_DATA%g
15294 s%@YACC@%$YACC%g
15295 s%@SET_MAKE@%$SET_MAKE%g
15296 s%@X_CFLAGS@%$X_CFLAGS%g
15297 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15298 s%@X_LIBS@%$X_LIBS%g
15299 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15300 s%@install_pp@%$install_pp%g
15301 s%@libs_xauth@%$libs_xauth%g
15302 s%@dnd_objs@%$dnd_objs%g
15303 s%@lwlib_objs@%$lwlib_objs%g
15304 s%@ALLOCA@%$ALLOCA%g
15305 s%@have_esd_config@%$have_esd_config%g
15306 s%@dll_ld@%$dll_ld%g
15307 s%@dll_cflags@%$dll_cflags%g
15308 s%@dll_ldflags@%$dll_ldflags%g
15309 s%@dll_post@%$dll_post%g
15310 s%@dll_ldo@%$dll_ldo%g
15311 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15312 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15313 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15314 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15315 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15316 s%@PROGNAME@%$PROGNAME%g
15317 s%@version@%$version%g
15318 s%@configuration@%$configuration%g
15319 s%@canonical@%$canonical%g
15320 s%@inststaticdir@%$inststaticdir%g
15321 s%@instvardir@%$instvardir%g
15322 s%@srcdir@%$srcdir%g
15323 s%@pkgdir@%$pkgdir%g
15324 s%@statedir@%$statedir%g
15325 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15326 s%@PREFIX@%$PREFIX%g
15327 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15328 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15329 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15330 s%@INFODIR@%$INFODIR%g
15331 s%@infopath@%$infopath%g
15332 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15333 s%@INFOPATH@%$INFOPATH%g
15334 s%@package_path@%$package_path%g
15335 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15336 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15337 s%@lispdir@%$lispdir%g
15338 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15339 s%@LISPDIR@%$LISPDIR%g
15340 s%@moduledir@%$moduledir%g
15341 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15342 s%@MODULEDIR@%$MODULEDIR%g
15343 s%@sitelispdir@%$sitelispdir%g
15344 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15345 s%@SITELISPDIR@%$SITELISPDIR%g
15346 s%@sitemoduledir@%$sitemoduledir%g
15347 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15348 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15349 s%@etcdir@%$etcdir%g
15350 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15351 s%@ETCDIR@%$ETCDIR%g
15352 s%@docdir@%$docdir%g
15353 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15354 s%@DOCDIR@%$DOCDIR%g
15355 s%@archlibdir@%$archlibdir%g
15356 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15357 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15358 s%@bitmapdir@%$bitmapdir%g
15359 s%@extra_objs@%$extra_objs%g
15360 s%@machfile@%$machfile%g
15361 s%@opsysfile@%$opsysfile%g
15362 s%@c_switch_general@%$c_switch_general%g
15363 s%@c_switch_window_system@%$c_switch_window_system%g
15364 s%@c_switch_all@%$c_switch_all%g
15365 s%@ld_switch_general@%$ld_switch_general%g
15366 s%@ld_switch_window_system@%$ld_switch_window_system%g
15367 s%@ld_switch_all@%$ld_switch_all%g
15368 s%@ld_libs_general@%$ld_libs_general%g
15369 s%@ld_libs_window_system@%$ld_libs_window_system%g
15370 s%@ld_libs_all@%$ld_libs_all%g
15371 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15372 s%@native_sound_lib@%$native_sound_lib%g
15373 s%@sound_cflags@%$sound_cflags%g
15374 s%@dynodump_arch@%$dynodump_arch%g
15375 s%@XEMACS_CC@%$XEMACS_CC%g
15376 s%@internal_makefile_list@%$internal_makefile_list%g
15377
15378 CEOF
15379 EOF
15380
15381 cat >> $CONFIG_STATUS <<\EOF
15382
15383 # Split the substitutions into bite-sized pieces for seds with
15384 # small command number limits, like on Digital OSF/1 and HP-UX.
15385 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15386 ac_file=1 # Number of current file.
15387 ac_beg=1 # First line for current file.
15388 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15389 ac_more_lines=:
15390 ac_sed_cmds=""
15391 while $ac_more_lines; do
15392   if test $ac_beg -gt 1; then
15393     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15394   else
15395     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15396   fi
15397   if test ! -s conftest.s$ac_file; then
15398     ac_more_lines=false
15399     rm -f conftest.s$ac_file
15400   else
15401     if test -z "$ac_sed_cmds"; then
15402       ac_sed_cmds="sed -f conftest.s$ac_file"
15403     else
15404       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15405     fi
15406     ac_file=`expr $ac_file + 1`
15407     ac_beg=$ac_end
15408     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15409   fi
15410 done
15411 if test -z "$ac_sed_cmds"; then
15412   ac_sed_cmds=cat
15413 fi
15414 EOF
15415
15416 cat >> $CONFIG_STATUS <<EOF
15417
15418 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15419 EOF
15420 cat >> $CONFIG_STATUS <<\EOF
15421 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15422   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15423   case "$ac_file" in
15424   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15425        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15426   *) ac_file_in="${ac_file}.in" ;;
15427   esac
15428
15429   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15430
15431   # Remove last slash and all that follows it.  Not all systems have dirname.
15432   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15433   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15434     # The file is in a subdirectory.
15435     test ! -d "$ac_dir" && mkdir "$ac_dir"
15436     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15437     # A "../" for each directory in $ac_dir_suffix.
15438     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15439   else
15440     ac_dir_suffix= ac_dots=
15441   fi
15442
15443   case "$ac_given_srcdir" in
15444   .)  srcdir=.
15445       if test -z "$ac_dots"; then top_srcdir=.
15446       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15447   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15448   *) # Relative path.
15449     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15450     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15451   esac
15452
15453   case "$ac_given_INSTALL" in
15454   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15455   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15456   esac
15457
15458   echo creating "$ac_file"
15459   rm -f "$ac_file"
15460   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15461   case "$ac_file" in
15462   *Makefile*) ac_comsub="1i\\
15463 # $configure_input" ;;
15464   *) ac_comsub= ;;
15465   esac
15466
15467   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15468   sed -e "$ac_comsub
15469 s%@configure_input@%$configure_input%g
15470 s%@srcdir@%$srcdir%g
15471 s%@top_srcdir@%$top_srcdir%g
15472 s%@INSTALL@%$INSTALL%g
15473 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15474 fi; done
15475 rm -f conftest.s*
15476
15477 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15478 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15479 #
15480 # ac_d sets the value in "#define NAME VALUE" lines.
15481 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15482 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15483 ac_dC='\3'
15484 ac_dD='%g'
15485 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15486 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15487 ac_uB='\([      ]\)%\1#\2define\3'
15488 ac_uC=' '
15489 ac_uD='\4%g'
15490 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15491 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15492 ac_eB='$%\1#\2define\3'
15493 ac_eC=' '
15494 ac_eD='%g'
15495
15496 if test "${CONFIG_HEADERS+set}" != set; then
15497 EOF
15498 cat >> $CONFIG_STATUS <<EOF
15499   CONFIG_HEADERS="src/config.h lwlib/config.h"
15500 EOF
15501 cat >> $CONFIG_STATUS <<\EOF
15502 fi
15503 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15504   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15505   case "$ac_file" in
15506   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15507        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15508   *) ac_file_in="${ac_file}.in" ;;
15509   esac
15510
15511   echo creating $ac_file
15512
15513   rm -f conftest.frag conftest.in conftest.out
15514   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15515   cat $ac_file_inputs > conftest.in
15516
15517 EOF
15518
15519 # Transform confdefs.h into a sed script conftest.vals that substitutes
15520 # the proper values into config.h.in to produce config.h.  And first:
15521 # Protect against being on the right side of a sed subst in config.status.
15522 # Protect against being in an unquoted here document in config.status.
15523 rm -f conftest.vals
15524 cat > conftest.hdr <<\EOF
15525 s/[\\&%]/\\&/g
15526 s%[\\$`]%\\&%g
15527 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15528 s%ac_d%ac_u%gp
15529 s%ac_u%ac_e%gp
15530 EOF
15531 sed -n -f conftest.hdr confdefs.h > conftest.vals
15532 rm -f conftest.hdr
15533
15534 # This sed command replaces #undef with comments.  This is necessary, for
15535 # example, in the case of _POSIX_SOURCE, which is predefined and required
15536 # on some systems where configure will not decide to define it.
15537 cat >> conftest.vals <<\EOF
15538 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15539 EOF
15540
15541 # Break up conftest.vals because some shells have a limit on
15542 # the size of here documents, and old seds have small limits too.
15543
15544 rm -f conftest.tail
15545 while :
15546 do
15547   ac_lines=`grep -c . conftest.vals`
15548   # grep -c gives empty output for an empty file on some AIX systems.
15549   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15550   # Write a limited-size here document to conftest.frag.
15551   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15552   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15553   echo 'CEOF
15554   sed -f conftest.frag conftest.in > conftest.out
15555   rm -f conftest.in
15556   mv conftest.out conftest.in
15557 ' >> $CONFIG_STATUS
15558   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15559   rm -f conftest.vals
15560   mv conftest.tail conftest.vals
15561 done
15562 rm -f conftest.vals
15563
15564 cat >> $CONFIG_STATUS <<\EOF
15565   rm -f conftest.frag conftest.h
15566   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15567   cat conftest.in >> conftest.h
15568   rm -f conftest.in
15569   if cmp -s $ac_file conftest.h 2>/dev/null; then
15570     echo "$ac_file is unchanged"
15571     rm -f conftest.h
15572   else
15573     # Remove last slash and all that follows it.  Not all systems have dirname.
15574       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15575       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15576       # The file is in a subdirectory.
15577       test ! -d "$ac_dir" && mkdir "$ac_dir"
15578     fi
15579     rm -f $ac_file
15580     mv conftest.h $ac_file
15581   fi
15582 fi; done
15583
15584 EOF
15585 cat >> $CONFIG_STATUS <<EOF
15586 CPP="$CPP"
15587  top_srcdir="$srcdir"
15588  MAKE_SUBDIR="$MAKE_SUBDIR"
15589
15590 EOF
15591 cat >> $CONFIG_STATUS <<\EOF
15592 for dir in . $MAKE_SUBDIR; do
15593   (
15594     cd $dir
15595     rm -f junk.c
15596     < Makefile.in \
15597       sed -e '/^# Generated/d' \
15598           -e 's%/\*\*/#.*%%' \
15599           -e 's/^ *# */#/' \
15600           -e '/^##/d' \
15601           -e '/^#/ {
15602 p
15603 d
15604 }'        \
15605           -e '/./ {
15606 s/\([\"]\)/\\\1/g
15607 s/^/"/
15608 s/$/"/
15609 }'  > junk.c;
15610
15611
15612
15613     echo creating $dir/Makefile
15614 $CPP -I. -I${top_srcdir}/src  junk.c \
15615   | sed -e 's/^\#.*//'          \
15616         -e 's/^[        ][      ]*$//'\
15617         -e 's/^ /       /'              \
15618         -e '/^[ \f]*$/d' \
15619         -e '/^\"/ {
15620         s/\\\([\"]\)/\1/g
15621         s/^[    ]*\"//
15622         s/\"[   ]*$//
15623 }' > Makefile.new
15624     chmod 444 Makefile.new
15625     mv -f Makefile.new Makefile
15626
15627     echo creating $dir/GNUmakefile
15628 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15629   | sed -e 's/^\#.*//'          \
15630         -e 's/^[        ][      ]*$//'\
15631         -e 's/^ /       /'              \
15632         -e '/^[ \f]*$/d' \
15633         -e '/^\"/ {
15634         s/\\\([\"]\)/\1/g
15635         s/^[    ]*\"//
15636         s/\"[   ]*$//
15637 }' > Makefile.new
15638     chmod 444 Makefile.new
15639     mv -f Makefile.new GNUmakefile
15640
15641     rm -f junk.c
15642   )
15643 done
15644
15645 sed < config.status >> lib-src/config.values \
15646   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15647   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15648   -e 's/^\([^ ]*\) $/\1 ""/' \
15649   -e 's/ 1$/ t/'
15650
15651
15652 exit 0
15653 EOF
15654 chmod +x $CONFIG_STATUS
15655 rm -fr confdefs* $ac_clean_files
15656 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1