Sync up with r21-2-27.
[chise/xemacs-chise.git-] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 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.12 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 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 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
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
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
268
269
270
271 arguments="$@"
272
273 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
274 quoted_arguments=
275 for i in "$@"; do
276    case "$i" in
277    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
278    | --no-cr | --no-c) ;;
279    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
280    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
281    *)
282    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
283    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
284    esac
285 done
286
287 while test $# != 0; do
288   arg="$1"; shift
289   case "$arg" in
290     --no-create|--no-recursion) ;;
291         -* )
292             case "$arg" in
293         -*=*)
294           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
295           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
296           valomitted=no
297         ;;
298                                                                           -*)
299                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
300           val="yes" valomitted=yes
301         ;;
302       esac
303
304             optname="$opt"
305       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
306
307             case "${valomitted}-${opt}" in yes-without_* )
308         opt=`echo $opt | sed 's/without/with/'`
309         valomitted="no" val="no" ;;
310       esac
311
312             case "$opt" in
313
314         with_site_lisp  | \
315         with_prefix     | \
316         with_site_modules | \
317         with_x          | \
318         with_x11        | \
319         with_msw        | \
320         with_gcc        | \
321         dynamic         | \
322         with_ncurses    | \
323         with_dnet       | \
324         with_socks      | \
325         with_dragndrop  | \
326         with_cde        | \
327         with_offix      | \
328         with_gpm        | \
329         with_xpm        | \
330         with_xface      | \
331         with_gif        | \
332         with_jpeg       | \
333         with_png        | \
334         with_tiff       | \
335         with_wmcommand  | \
336         with_xmu        | \
337         with_purify     | \
338         with_quantify   | \
339         with_toolbars   | \
340         with_tty        | \
341         with_xfs        | \
342         with_i18n3      | \
343         with_mule       | \
344         with_utf_2000   | \
345         with_text_coding| \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         const_is_losing | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         no_doc_file )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 The default is to autodetect all sound support."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
477             elif test -n "$new_sdefault" ; then
478                 with_native_sound=$new_sdefault
479                 with_nas_sound=$new_sdefault
480                 with_esd_sound=$new_sdefault
481                 new_sdefault=   # reset this
482             fi
483             sound_notfirst=true
484           done
485         ;;
486
487                         "with_athena" )
488           case "$val" in
489             xa | xaw )                    val=xaw    ;;
490             3 | 3d | xaw3d )              val=3d     ;;
491                         ne | nex | next | naxtaw)     val=next   ;;
492                         9 | 95 | xaw95 )              val=95     ;;
493             xp | xpm | xawxpm )           val=xpm    ;;
494             * ) (echo "$progname: Usage error:"
495 echo " " "The \`--$optname' option must have one of these values:
496   \`xaw', \`3d', \`next', \`95', or \`xpm'."
497 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
498           esac
499           eval "$opt=\"$val\""
500         ;;
501
502                 "with_xim" )
503           case "$val" in
504             y | ye | yes )                val=yes   ;;
505             n | no | non | none )         val=no    ;;
506             x | xl | xli | xlib )         val=xlib  ;;
507             m | mo | mot | moti | motif ) val=motif ;;
508             * ) (echo "$progname: Usage error:"
509 echo " " "The \`--$optname' option must have one of these values:
510   \`motif', \`xlib', \`yes', or \`no'."
511 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
512           esac
513           eval "$opt=\"$val\""
514         ;;
515
516                 "mail_locking" )
517           case "$val" in
518             lockf )     val=lockf ;;
519             flock )     val=flock ;;
520             file | dot ) val=file  ;;
521             locking )   val=locking  ;;
522             * ) (echo "$progname: Usage error:"
523 echo " " "The \`--$optname' option must have one of these values:
524   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
526           esac
527           eval "$opt=\"$val\""
528         ;;
529
530                 "error_checking" )
531                           
532           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
533             case "$x" in
534                       n | no | non | none ) new_default=no ;;
535               a | al | all )        new_default=yes ;;
536
537               extents )       error_check_extents=yes ;;
538               noextents )     error_check_extents=no ;;
539
540               typecheck )     error_check_typecheck=yes ;;
541               notypecheck )   error_check_typecheck=no ;;
542
543               bufpos )        error_check_bufpos=yes ;;
544               nobufpos )      error_check_bufpos=no ;;
545
546               gc )            error_check_gc=yes ;;
547               nogc )          error_check_gc=no ;;
548
549               malloc )        error_check_malloc=yes ;;
550               nomalloc )      error_check_malloc=no ;;
551
552               byte_code )     error_check_byte_code=yes ;;
553               nobyte_code )   error_check_byte_code=no ;;
554
555               * ) bogus_error_check=yes ;;
556             esac
557             if test "$bogus_error_check" -o \
558                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
559                 if test "$error_check_default" = yes ; then
560                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
561                 else
562                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
563                 fi
564                 (echo "$progname: Usage error:"
565 echo " " "Valid types for the \`--$optname' option are:
566   $types."
567 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
568             elif test -n "$new_default" ; then
569                 error_check_extents=$new_default
570                 error_check_typecheck=$new_default
571                 error_check_bufpos=$new_default
572                 error_check_gc=$new_default
573                 error_check_malloc=$new_default
574                 error_check_byte_code=$new_default
575                 new_default=    # reset this
576             fi
577             echeck_notfirst=true
578           done
579         ;;
580
581                                 
582                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
583         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
584         archlibdir | docdir | package_path )
585                    if test "$valomitted" = "yes"; then
586              if test "$#" = 0; then
587                  (echo "$progname: Usage error:"
588 echo " " "The \`--$optname' option requires a value."
589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
590              fi
591              val="$1"; shift
592            fi
593            eval "$opt=\"$val\""
594
595                            case "$opt" in
596                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining EXEC_PREFIX_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define EXEC_PREFIX_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining LISPDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define LISPDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining SITELISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define SITELISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining MODULEDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define MODULEDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining ETCDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define ETCDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining INFODIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define INFODIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFOPATH_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFOPATH_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining PACKAGE_PATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define PACKAGE_PATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              datadir )
661                 { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining INFODIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define INFODIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining LISPDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define LISPDIR_USER_DEFINED 1
674 EOF
675 }
676
677             { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining MODULEDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define MODULEDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining ETCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define ETCDIR_USER_DEFINED 1
690 EOF
691 }
692  ;;
693              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining LOCKDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define LOCKDIR_USER_DEFINED 1
698 EOF
699 }
700  ;;
701              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining DOCDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define DOCDIR_USER_DEFINED 1
706 EOF
707 }
708  ;;
709              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining ARCHLIBDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define ARCHLIBDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717            esac
718         ;;
719
720                 "no_create" ) ;;
721
722                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
723
724                 "with_menubars"   | \
725         "with_scrollbars" | \
726         "with_dialogs" | \
727         "with_widgets" )
728           case "$val" in
729             l | lu | luc | luci | lucid )               val=lucid  ;;
730             m | mo | mot | moti | motif )               val=motif  ;;
731             a | at | ath | athe | athen | athena )      val=athena ;;
732             n | no | non | none )                       val=no ;;
733             * ) (echo "$progname: Usage error:"
734 echo " " "The \`--$optname' option must have one of these values:
735   \`lucid', \`motif', \`athena', or \`no'."
736 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
737           esac
738           eval "$opt=\"$val\""
739         ;;
740
741                 "use_minimal_tagbits" | \
742         "use_indexed_lrecord_implementation" | \
743         "run_in_place"  | \
744         "with_gnu_make" )
745           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
746         ;;
747
748                 * ) (echo "$progname: Usage error:"
749 echo " " "Unrecognized option: $arg"
750 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
751
752       esac
753     ;;
754
755         *-*-*) configuration="$arg" ;;
756
757         *) (echo "$progname: Usage error:"
758 echo " " "Unrecognized argument: $arg"
759 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
760
761   esac
762 done
763
764
765 test -n "$cpp"      && CPP="$cpp"
766 test -n "$cppflags" && CPPFLAGS="$cppflags"
767 test -n "$libs"     && LIBS="$libs"
768 test -n "$ldflags"  && LDFLAGS="$ldflags"
769
770 eval set x "$quoted_arguments"; shift
771
772 test "$extra_verbose" = "yes" && verbose=yes
773
774 test -n "$with_x" && with_x11="$with_x"
775
776 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
777   test "$with_system_malloc" = "default" && with_system_malloc=yes
778 fi
779
780
781
782 if test "$with_cde $with_tooltalk" = "yes no"; then
783   (echo "$progname: Usage error:"
784 echo " " "--with-cde requires --with-tooltalk"
785 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
786 elif test "$with_tooltalk" = "no" ; then with_cde=no
787 elif test "$with_cde" = "yes"; then with_tooltalk=yes
788 fi
789
790
791 case "$srcdir" in
792
793     "" )
794     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
795       if test -f "$dir/src/lisp.h" -a \
796               -f "$dir/lisp/version.el" ; then
797         srcdir="$dir"
798         break
799       fi
800     done
801     if test -z "$srcdir" ; then
802       (echo "$progname: Usage error:"
803 echo " " "Neither the current directory nor its parent seem to
804   contain the XEmacs sources.  If you do not want to build XEmacs in its
805   source tree, you should run \`$progname' in the directory in which
806   you wish to build XEmacs, using the \`--srcdir' option to say where the
807   sources may be found."
808 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
809     fi
810   ;;
811
812     * )
813     if test ! -f "$srcdir/src/lisp.h" -o \
814             ! -f "$srcdir/lisp/version.el" ; then
815       (echo "$progname: Usage error:"
816 echo " " "The directory specified with the \`--srcdir' option,
817   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
818   either run the \`$progname' script at the top of the XEmacs source
819   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
820 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
821     fi
822   ;;
823 esac
824
825 if test -z "$configuration"; then
826     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
827   if test -z "$configuration"; then
828     (echo "$progname: Usage error:"
829 echo " " "XEmacs has not been ported to this host type.
830 Try explicitly specifying the CONFIGURATION when rerunning configure."
831 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
832   fi
833 fi
834
835 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
836 echo "configure:837: checking whether ln -s works" >&5
837
838 rm -f conftestdata
839 if ln -s X conftestdata 2>/dev/null
840 then
841   rm -f conftestdata
842   ac_cv_prog_LN_S="ln -s"
843 else
844   ac_cv_prog_LN_S=ln
845 fi
846 LN_S="$ac_cv_prog_LN_S"
847 if test "$ac_cv_prog_LN_S" = "ln -s"; then
848   echo "$ac_t""yes" 1>&6
849 else
850   echo "$ac_t""no" 1>&6
851 fi
852
853
854 for dir in lisp etc man info tests; do
855   if test ! -d "$dir" ; then
856     echo Making symbolic link to "$srcdir/$dir"
857     ${LN_S} "$srcdir/$dir" "$dir"
858   fi
859 done
860
861
862 absolute_pwd="`pwd`";
863 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
864 then blddir="$PWD"
865 else blddir="$absolute_pwd"; if test -d "/net"; then
866   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
867   blddir=`echo "$blddir" | \
868    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
869 fi
870 fi
871
872
873 case "$srcdir" in
874   /* ) ;;
875   .  ) srcdir="$blddir" ;;
876   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
877   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
878   srcdir=`echo "$srcdir" | \
879    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
880 fi ;;
881 esac
882
883 if test `pwd` != `sh -c cd $srcdir && pwd`  \
884    && test -f "$srcdir/src/config.h"; then
885   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
886    echo "   as a build directory right now; it has been configured in its own"
887    echo "   right.  To configure in another directory as well, you MUST"
888    echo "   use GNU make.  If you do not have GNU make, then you must"
889    echo "   now do \`make distclean' in $srcdir,"
890    echo "   and then run $progname again.") >&2
891   extrasub='/^VPATH[     ]*=/c\
892 vpath %.c $(srcdir)\
893 vpath %.h $(srcdir)\
894 vpath %.y $(srcdir)\
895 vpath %.l $(srcdir)\
896 vpath %.s $(srcdir)\
897 vpath %.in $(srcdir)'
898 fi
899
900 . "$srcdir/version.sh" || exit 1;
901 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
902 : "${extra_verbose=$beta}"
903 version="${emacs_major_version}.${emacs_minor_version}"
904 { test "$extra_verbose" = "yes" && cat << EOF
905     Defining EMACS_MAJOR_VERSION = $emacs_major_version
906 EOF
907 cat >> confdefs.h <<EOF
908 #define EMACS_MAJOR_VERSION $emacs_major_version
909 EOF
910 }
911
912 { test "$extra_verbose" = "yes" && cat << EOF
913     Defining EMACS_MINOR_VERSION = $emacs_minor_version
914 EOF
915 cat >> confdefs.h <<EOF
916 #define EMACS_MINOR_VERSION $emacs_minor_version
917 EOF
918 }
919
920 if test -n "$emacs_beta_version" ; then
921   if test "$beta" = "yes"; then
922         version="${version}-b${emacs_beta_version}"
923         { test "$extra_verbose" = "yes" && cat << EOF
924     Defining EMACS_BETA_VERSION = $emacs_beta_version
925 EOF
926 cat >> confdefs.h <<EOF
927 #define EMACS_BETA_VERSION $emacs_beta_version
928 EOF
929 }
930
931   else
932         version="${version}.${emacs_beta_version}"
933         { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_PATCH_LEVEL $emacs_beta_version
938 EOF
939 }
940
941   fi
942 fi
943 { test "$extra_verbose" = "yes" && cat << EOF
944     Defining XEMACS_CODENAME = "$xemacs_codename"
945 EOF
946 cat >> confdefs.h <<EOF
947 #define XEMACS_CODENAME "$xemacs_codename"
948 EOF
949 }
950
951 { test "$extra_verbose" = "yes" && cat << EOF
952     Defining EMACS_VERSION = "$version"
953 EOF
954 cat >> confdefs.h <<EOF
955 #define EMACS_VERSION "$version"
956 EOF
957 }
958
959
960 if test "$with_infodock" = "yes"; then
961   if test ! -f ../../ID-INSTALL; then
962     echo "Cannot build InfoDock without InfoDock sources"
963     with_infodock=no
964   fi
965 fi
966
967 if test "$with_infodock" = "yes"; then
968       { test "$extra_verbose" = "yes" && cat << EOF
969     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
970 EOF
971 cat >> confdefs.h <<EOF
972 #define INFODOCK_MAJOR_VERSION $infodock_major_version
973 EOF
974 }
975
976   { test "$extra_verbose" = "yes" && cat << EOF
977     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
978 EOF
979 cat >> confdefs.h <<EOF
980 #define INFODOCK_MINOR_VERSION $infodock_minor_version
981 EOF
982 }
983
984   { test "$extra_verbose" = "yes" && cat << EOF
985     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
986 EOF
987 cat >> confdefs.h <<EOF
988 #define INFODOCK_BUILD_VERSION $infodock_build_version
989 EOF
990 }
991
992   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
993   PROGNAME=infodock
994   CPPFLAGS="$CPPFLAGS -DINFODOCK"
995 else
996   PROGNAME=xemacs
997 fi
998
999 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1000 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1001     Defining ERROR_CHECK_EXTENTS
1002 EOF
1003 cat >> confdefs.h <<\EOF
1004 #define ERROR_CHECK_EXTENTS 1
1005 EOF
1006 }
1007
1008 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1009     Defining ERROR_CHECK_TYPECHECK
1010 EOF
1011 cat >> confdefs.h <<\EOF
1012 #define ERROR_CHECK_TYPECHECK 1
1013 EOF
1014 }
1015
1016 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1017     Defining ERROR_CHECK_BUFPOS
1018 EOF
1019 cat >> confdefs.h <<\EOF
1020 #define ERROR_CHECK_BUFPOS 1
1021 EOF
1022 }
1023
1024 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_GC
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_GC 1
1029 EOF
1030 }
1031
1032 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_MALLOC
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_MALLOC 1
1037 EOF
1038 }
1039
1040 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_BYTE_CODE
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_BYTE_CODE 1
1045 EOF
1046 }
1047
1048 if test "${debug:=$beta}" = "yes"; then
1049   use_assertions=yes memory_usage_stats=yes
1050   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1051    echo "    xemacs will be linked with \"debug.o\""
1052  fi
1053   { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining DEBUG_XEMACS
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define DEBUG_XEMACS 1
1058 EOF
1059 }
1060
1061 fi
1062 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining USE_ASSERTIONS
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define USE_ASSERTIONS 1
1067 EOF
1068 }
1069
1070 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1071     Defining MEMORY_USAGE_STATS
1072 EOF
1073 cat >> confdefs.h <<\EOF
1074 #define MEMORY_USAGE_STATS 1
1075 EOF
1076 }
1077
1078
1079
1080 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1081 echo "configure:1082: checking "host system type"" >&5
1082 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1083 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1084 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1085 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1086 echo "$ac_t""$configuration" 1>&6
1087
1088
1089
1090
1091
1092 machine='' opsys=''
1093
1094 case "$canonical" in
1095   sparc-*-*        ) machine=sparc ;;
1096   alpha*-*-*       ) machine=alpha ;;
1097   vax-*-*          ) machine=vax ;;
1098   mips-dec-*       ) machine=pmax ;;
1099   mips-sgi-*       ) machine=iris4d ;;
1100   mips*-linux      ) machine=mips ;;
1101   romp-ibm-*       ) machine=ibmrt ;;
1102   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1103   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1104   powerpc*-*       ) machine=powerpc ;;
1105   hppa-*-*         ) machine=hp800 ;;
1106   m88k-dg-*        ) machine=aviion ;;
1107   m68*-sony-*      ) machine=news ;;
1108   mips-sony-*      ) machine=news-risc ;;
1109   clipper-*        ) machine=clipper ;;
1110   arm-*            ) machine=arm ;;
1111   ns32k-*          ) machine=ns32000 ;;
1112 esac
1113
1114 case "$canonical" in
1115   *-*-linux*    ) opsys=linux ;;
1116   *-*-netbsd*   ) opsys=netbsd ;;
1117   *-*-openbsd*  ) opsys=openbsd ;;
1118   *-*-nextstep* ) opsys=nextstep ;;
1119   *-*-vms       ) opsys=vms ;;
1120
1121     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1122   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1123   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1124   *-dec-osf3*                ) opsys=decosf3-1 ;;
1125   *-dec-osf4*                ) opsys=decosf4-0 ;;
1126
1127     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1128   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1129   *-*-ultrix* )         opsys=ultrix4-3 ;;
1130
1131     *-*-aix3.1*  ) opsys=aix3-1 ;;
1132   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1133   *-*-aix3*    ) opsys=aix3-2   ;;
1134   *-*-aix4.0*  ) opsys=aix4     ;;
1135   *-*-aix4.1*  ) opsys=aix4-1   ;;
1136   *-*-aix4*    ) opsys=aix4-2   ;;
1137
1138     *-gnu* )                    opsys=gnu    ;;
1139   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1140   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1141   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1142   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1143   *-*-aos*   )                  opsys=bsd4-3 ;;
1144   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1145   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1146   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1147   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1148   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1149   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1150         if test -z "$NON_GNU_CPP" ; then
1151           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1152             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1153           done
1154         fi
1155         opsys=usg5-4-2 ;;
1156     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1157     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1158 esac
1159
1160 case "$canonical" in
1161
1162     *-*-netbsd* )
1163     case "$canonical" in
1164       i[3-9]86-*-netbsd*) machine=intel386 ;;
1165       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1166                                             machine=hp9000s300 ;;
1167       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1168       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1169     esac
1170   ;;
1171
1172     *-*-openbsd* )
1173     case "${canonical}" in
1174       i386-*-openbsd*)          machine=intel386 ;;
1175       m68k-*-openbsd*)          machine=hp9000s300 ;;
1176       mipsel-*-openbsd*)        machine=pmax ;;
1177      esac
1178    ;;
1179
1180     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1181   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1182
1183     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1184   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1185
1186     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1187
1188     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1189
1190     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1191
1192     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1193
1194     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1195
1196     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1197   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1198   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1199
1200   
1201     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1202
1203     *-convex-bsd* | *-convex-convexos* )
1204     machine=convex opsys=bsd4-3
1205     NON_GNU_CPP="cc -E -P"
1206   ;;
1207
1208     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1209
1210     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1211   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1212   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1213   m88k-dg-dgux*                           ) opsys=dgux     ;;
1214
1215     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1216   m88k-motorola-sysv4* )
1217                     machine=delta88k opsys=usg5-4-2
1218   ;;
1219   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1220
1221     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1222   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1223
1224     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1225
1226     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1227   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1228   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1229
1230       m88k-harris-cxux* )
1231         case "`uname -r`" in
1232        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1233        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1234     esac
1235     NON_GNU_CPP="/lib/cpp"
1236   ;;
1237     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1238     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1239
1240     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1241
1242     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1243
1244     *-hp-hpux* )
1245         case "$canonical" in
1246       m68*  ) machine=hp9000s300 ;;
1247       hppa* ) machine=hp800      ;;
1248     esac
1249
1250     case "$canonical" in
1251       *-hp-hpux7*  )  opsys=hpux   ;;
1252       *-hp-hpux8*  )  opsys=hpux8  ;;
1253       *-hp-hpux9*  )  opsys=hpux9  ;;
1254       *-hp-hpux10* )  opsys=hpux10 ;;
1255       *-hp-hpux11* )  opsys=hpux11 ;;
1256       *            )  opsys=hpux   ;;
1257     esac
1258
1259         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1260    echo "    xemacs will be linked with \"strcat.o\""
1261  fi ;; esac
1262
1263     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1264         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1265     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1266
1267     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1268   ;;
1269
1270     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1271   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1272
1273     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1274   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1275   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1276   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1277   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1278   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1279
1280     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1281   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1282
1283     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1284
1285     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1286
1287     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1288
1289     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1290
1291       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1292
1293     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1294
1295     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1296
1297     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1298
1299     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1300
1301         mips-mips-usg* ) machine=mips4 ;;
1302   mips-mips-riscos4 )
1303     machine=mips4
1304     NON_GNU_CC="cc -systype bsd43"
1305     NON_GNU_CPP="cc -systype bsd43 -E"
1306     case "$canonical" in
1307       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1308       mips-mips-riscos5* ) opsys=riscos5 ;;
1309     esac
1310   ;;
1311   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1312   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1313
1314     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1315
1316     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1317
1318     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1319   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1320
1321     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1322
1323     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1324
1325     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1326
1327     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1328
1329     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1330   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1331
1332     mips-siemens-sysv* | mips-sni-sysv*)
1333     machine=mips-siemens opsys=usg5-4
1334     NON_GNU_CC=/usr/ccs/bin/cc
1335     NON_GNU_CPP=/usr/ccs/lib/cpp
1336   ;;
1337
1338     mips-nec-sysv*)
1339     machine=mips-nec
1340     NON_GNU_CC=/usr/ccs/bin/cc
1341     NON_GNU_CPP=/usr/ccs/lib/cpp
1342   ;;
1343
1344       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1345   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1346     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1347   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1348   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1349   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1350   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1351   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1352   mips-sgi-irix*      ) opsys=irix5-0 ;;
1353
1354     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1355   *-sony-news* ) opsys=newsos5 ;;
1356
1357     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1358
1359     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1360         case "$canonical" in
1361       m68*-sunos1* )             machine=sun1     ;;
1362       m68*-sunos2* )             machine=sun2     ;;
1363       m68* )                     machine=sun3     ;;
1364       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1365       i*86-*-* )                 machine=intel386 ;;
1366       rs6000* )                  machine=rs6000   ;;
1367     esac
1368
1369         case "$canonical" in *-sunos5*)
1370       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1371     esac
1372
1373                     case "$canonical" in
1374       *-sunos4* )
1375         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1376         : ;;
1377       *-solaris2* )
1378         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1379         RANLIB=':' ;;
1380     esac
1381
1382     case "$canonical" in
1383       *-solaris*          )
1384         opsys=sol2
1385         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1386         { test "$extra_verbose" = "yes" && cat << EOF
1387     Defining OS_RELEASE = $os_release
1388 EOF
1389 cat >> confdefs.h <<EOF
1390 #define OS_RELEASE $os_release
1391 EOF
1392 }
1393  ;;
1394
1395             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1396       *-sunos4.0*         ) opsys=sunos4-0      ;;
1397       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1398       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1399       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1400       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1401       *-mach*             ) opsys=mach-bsd4-3   ;;
1402       *                   ) opsys=bsd4-2        ;;
1403     esac
1404
1405     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1406
1407         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1408   ;;
1409
1410     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1411
1412     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1413   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1414
1415     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1416
1417     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1418
1419     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1420       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1421
1422     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1423
1424     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1425
1426     vax-dec-* )
1427     case "$canonical" in
1428       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1429       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1430       *-mach* )                         opsys=mach-bsd4-3 ;;
1431     esac
1432   ;;
1433
1434     ns16k-whitechapel-* ) machine=mg1 ;;
1435
1436     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1437
1438     i[3-9]86-*-* )
1439     machine=intel386
1440     case "$canonical" in
1441       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1442       *-isc2.2* )               opsys=isc2-2 ;;
1443       *-isc4.0* )               opsys=isc4-0 ;;
1444       *-isc4.* )                opsys=isc4-1
1445                                 GCC_TEST_OPTIONS=-posix
1446                                 NON_GCC_TEST_OPTIONS=-Xp
1447                                 ;;
1448       *-isc* )                  opsys=isc3-0 ;;
1449       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1450       *-esix* )                 opsys=esix ;;
1451       *-mach* )                 opsys=mach-bsd4-3 ;;
1452       *-xenix* )                opsys=xenix ;;
1453       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1454       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1455       *-bsdi4* )                opsys=bsdos4 ;;
1456       *-bsdi3* )                opsys=bsdos3 ;;
1457       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1458       *-bsdi2* )                opsys=bsdos2 ;;
1459       *-sco3.2v5* )             opsys=sco5 ;
1460                                                         if test "$dynamic" = "yes" ; then
1461                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1462         else
1463                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1464         fi ;;
1465       *-sysv5* )                opsys=sco7 ;;
1466       *-386bsd* )               opsys=386bsd ;;
1467       *-freebsd* )              opsys=freebsd ;;
1468       *-nextstep* )             opsys=nextstep ;;
1469       *-pc-cygwin* )            opsys=cygwin32 ;;
1470       *-pc-mingw* )             opsys=mingw32 ;
1471                                 test -z "$with_tty" && with_tty="no";;
1472           esac
1473   ;;
1474
1475     m68k-*-linux* ) machine=m68k opsys=linux ;;
1476
1477 esac
1478
1479 if test -z "$machine" -o -z "$opsys"; then
1480   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1481    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1482   ) >&2
1483   exit 1
1484 fi
1485
1486 if test -z "$dynamic"; then
1487   case "$opsys" in
1488     hpux* | sunos4* ) dynamic=no ;;
1489     *) dynamic=yes ;;
1490   esac
1491 fi
1492 if test "$dynamic" = "yes"; then
1493   case "$opsys" in
1494     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1495     decosf* ) ld_call_shared="-call_shared" ;;
1496   esac
1497 else   case "$opsys" in
1498     sol2 )
1499       echo "Static linking is not supported on Solaris 2."
1500       echo "Rerun configure without specifying --dynamic=no."
1501       exit 1 ;;
1502     linux   ) ld_call_shared="-Bstatic" ;;
1503     decosf* ) ld_call_shared="-non_shared" ;;
1504   esac
1505 fi
1506
1507 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1508
1509 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1510 { test "$extra_verbose" = "yes" && cat << EOF
1511     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1512 EOF
1513 cat >> confdefs.h <<EOF
1514 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1515 EOF
1516 }
1517
1518
1519 machfile="m/${machine}.h"
1520 opsysfile="s/${opsys}.h"
1521
1522
1523 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1524 if test "$with_workshop $with_tooltalk" = "yes no"; then
1525   (echo "$progname: Usage error:"
1526 echo " " "--with-workshop requires --with-tooltalk"
1527 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1528 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1529 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1530 fi
1531
1532 if test "$with_workshop" = "yes"; then
1533   { test "$extra_verbose" = "yes" && cat << \EOF
1534     Defining SUNPRO
1535 EOF
1536 cat >> confdefs.h <<\EOF
1537 #define SUNPRO 1
1538 EOF
1539 }
1540
1541   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1542    echo "    xemacs will be linked with \"sunpro.o\""
1543  fi
1544 fi
1545
1546 if test "$with_clash_detection" = "yes"; then
1547   { test "$extra_verbose" = "yes" && cat << \EOF
1548     Defining CLASH_DETECTION
1549 EOF
1550 cat >> confdefs.h <<\EOF
1551 #define CLASH_DETECTION 1
1552 EOF
1553 }
1554
1555   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1556    echo "    xemacs will be linked with \"filelock.o\""
1557  fi
1558 fi
1559
1560 test -n "$compiler" && CC="$compiler"
1561 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1562 fi
1563
1564 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1565 if test "${CFLAGS-unset}" != unset
1566   then cflags_specified=yes;
1567   else cflags_specified=no;
1568 fi
1569
1570 xe_save_CFLAGS="$CFLAGS"
1571
1572 # Extract the first word of "gcc", so it can be a program name with args.
1573 set dummy gcc; ac_word=$2
1574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1575 echo "configure:1576: checking for $ac_word" >&5
1576
1577 if test -n "$CC"; then
1578   ac_cv_prog_CC="$CC" # Let the user override the test.
1579 else
1580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1581   ac_dummy="$PATH"
1582   for ac_dir in $ac_dummy; do
1583     test -z "$ac_dir" && ac_dir=.
1584     if test -f $ac_dir/$ac_word; then
1585       ac_cv_prog_CC="gcc"
1586       break
1587     fi
1588   done
1589   IFS="$ac_save_ifs"
1590 fi
1591 CC="$ac_cv_prog_CC"
1592 if test -n "$CC"; then
1593   echo "$ac_t""$CC" 1>&6
1594 else
1595   echo "$ac_t""no" 1>&6
1596 fi
1597
1598 if test -z "$CC"; then
1599   # Extract the first word of "cc", so it can be a program name with args.
1600 set dummy cc; ac_word=$2
1601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1602 echo "configure:1603: checking for $ac_word" >&5
1603
1604 if test -n "$CC"; then
1605   ac_cv_prog_CC="$CC" # Let the user override the test.
1606 else
1607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1608   ac_prog_rejected=no
1609   ac_dummy="$PATH"
1610   for ac_dir in $ac_dummy; do
1611     test -z "$ac_dir" && ac_dir=.
1612     if test -f $ac_dir/$ac_word; then
1613       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1614         ac_prog_rejected=yes
1615         continue
1616       fi
1617       ac_cv_prog_CC="cc"
1618       break
1619     fi
1620   done
1621   IFS="$ac_save_ifs"
1622 if test $ac_prog_rejected = yes; then
1623   # We found a bogon in the path, so make sure we never use it.
1624   set dummy $ac_cv_prog_CC
1625   shift
1626   if test $# -gt 0; then
1627     # We chose a different compiler from the bogus one.
1628     # However, it has the same basename, so the bogon will be chosen
1629     # first if we set CC to just the basename; use the full file name.
1630     shift
1631     set dummy "$ac_dir/$ac_word" "$@"
1632     shift
1633     ac_cv_prog_CC="$@"
1634   fi
1635 fi
1636 fi
1637 CC="$ac_cv_prog_CC"
1638 if test -n "$CC"; then
1639   echo "$ac_t""$CC" 1>&6
1640 else
1641   echo "$ac_t""no" 1>&6
1642 fi
1643
1644   if test -z "$CC"; then
1645     case "`uname -s`" in
1646     *win32* | *WIN32*)
1647       # Extract the first word of "cl", so it can be a program name with args.
1648 set dummy cl; ac_word=$2
1649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1650 echo "configure:1651: checking for $ac_word" >&5
1651
1652 if test -n "$CC"; then
1653   ac_cv_prog_CC="$CC" # Let the user override the test.
1654 else
1655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1656   ac_dummy="$PATH"
1657   for ac_dir in $ac_dummy; do
1658     test -z "$ac_dir" && ac_dir=.
1659     if test -f $ac_dir/$ac_word; then
1660       ac_cv_prog_CC="cl"
1661       break
1662     fi
1663   done
1664   IFS="$ac_save_ifs"
1665 fi
1666 CC="$ac_cv_prog_CC"
1667 if test -n "$CC"; then
1668   echo "$ac_t""$CC" 1>&6
1669 else
1670   echo "$ac_t""no" 1>&6
1671 fi
1672  ;;
1673     esac
1674   fi
1675   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1676 fi
1677
1678 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1679 echo "configure:1680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1680
1681 ac_ext=c
1682 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1683 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1684 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1685 ac_cpp='$CPP '"$xe_cppflags"
1686 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1687 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1688 cross_compiling=no
1689
1690 cat > conftest.$ac_ext << EOF
1691
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694
1695 main(){return(0);}
1696 EOF
1697 if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1698   ac_cv_prog_cc_works=yes
1699   # If we can't run a trivial program, we are probably using a cross compiler.
1700   if (./conftest; exit) 2>/dev/null; then
1701     ac_cv_prog_cc_cross=no
1702   else
1703     ac_cv_prog_cc_cross=yes
1704   fi
1705 else
1706   echo "configure: failed program was:" >&5
1707   cat conftest.$ac_ext >&5
1708   ac_cv_prog_cc_works=no
1709 fi
1710 rm -fr conftest*
1711 ac_ext=c
1712 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1713 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1714 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1715 ac_cpp='$CPP '"$xe_cppflags"
1716 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1717 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1718 cross_compiling=no
1719
1720 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1721 if test $ac_cv_prog_cc_works = no; then
1722   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1723 fi
1724 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1725 echo "configure:1726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1726 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1727 cross_compiling=$ac_cv_prog_cc_cross
1728
1729 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1730 echo "configure:1731: checking whether we are using GNU C" >&5
1731
1732 cat > conftest.c <<EOF
1733 #ifdef __GNUC__
1734   yes;
1735 #endif
1736 EOF
1737 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1738   ac_cv_prog_gcc=yes
1739 else
1740   ac_cv_prog_gcc=no
1741 fi
1742
1743 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1744
1745 if test $ac_cv_prog_gcc = yes; then
1746   GCC=yes
1747 else
1748   GCC=
1749 fi
1750
1751 ac_test_CFLAGS="${CFLAGS+set}"
1752 ac_save_CFLAGS="$CFLAGS"
1753 CFLAGS=
1754 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1755 echo "configure:1756: checking whether ${CC-cc} accepts -g" >&5
1756
1757 echo 'void f(){}' > conftest.c
1758 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1759   ac_cv_prog_cc_g=yes
1760 else
1761   ac_cv_prog_cc_g=no
1762 fi
1763 rm -f conftest*
1764
1765
1766 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1767 if test "$ac_test_CFLAGS" = set; then
1768   CFLAGS="$ac_save_CFLAGS"
1769 elif test $ac_cv_prog_cc_g = yes; then
1770   if test "$GCC" = yes; then
1771     CFLAGS="-g -O2"
1772   else
1773     CFLAGS="-g"
1774   fi
1775 else
1776   if test "$GCC" = yes; then
1777     CFLAGS="-O2"
1778   else
1779     CFLAGS=
1780   fi
1781 fi
1782  
1783 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1784   CC=${NON_GNU_CC-cc}
1785   # Extract the first word of "gcc", so it can be a program name with args.
1786 set dummy gcc; ac_word=$2
1787 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1788 echo "configure:1789: checking for $ac_word" >&5
1789
1790 if test -n "$CC"; then
1791   ac_cv_prog_CC="$CC" # Let the user override the test.
1792 else
1793   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1794   ac_dummy="$PATH"
1795   for ac_dir in $ac_dummy; do
1796     test -z "$ac_dir" && ac_dir=.
1797     if test -f $ac_dir/$ac_word; then
1798       ac_cv_prog_CC="gcc"
1799       break
1800     fi
1801   done
1802   IFS="$ac_save_ifs"
1803 fi
1804 CC="$ac_cv_prog_CC"
1805 if test -n "$CC"; then
1806   echo "$ac_t""$CC" 1>&6
1807 else
1808   echo "$ac_t""no" 1>&6
1809 fi
1810
1811 if test -z "$CC"; then
1812   # Extract the first word of "cc", so it can be a program name with args.
1813 set dummy cc; ac_word=$2
1814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1815 echo "configure:1816: checking for $ac_word" >&5
1816
1817 if test -n "$CC"; then
1818   ac_cv_prog_CC="$CC" # Let the user override the test.
1819 else
1820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1821   ac_prog_rejected=no
1822   ac_dummy="$PATH"
1823   for ac_dir in $ac_dummy; do
1824     test -z "$ac_dir" && ac_dir=.
1825     if test -f $ac_dir/$ac_word; then
1826       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1827         ac_prog_rejected=yes
1828         continue
1829       fi
1830       ac_cv_prog_CC="cc"
1831       break
1832     fi
1833   done
1834   IFS="$ac_save_ifs"
1835 if test $ac_prog_rejected = yes; then
1836   # We found a bogon in the path, so make sure we never use it.
1837   set dummy $ac_cv_prog_CC
1838   shift
1839   if test $# -gt 0; then
1840     # We chose a different compiler from the bogus one.
1841     # However, it has the same basename, so the bogon will be chosen
1842     # first if we set CC to just the basename; use the full file name.
1843     shift
1844     set dummy "$ac_dir/$ac_word" "$@"
1845     shift
1846     ac_cv_prog_CC="$@"
1847   fi
1848 fi
1849 fi
1850 CC="$ac_cv_prog_CC"
1851 if test -n "$CC"; then
1852   echo "$ac_t""$CC" 1>&6
1853 else
1854   echo "$ac_t""no" 1>&6
1855 fi
1856
1857   if test -z "$CC"; then
1858     case "`uname -s`" in
1859     *win32* | *WIN32*)
1860       # Extract the first word of "cl", so it can be a program name with args.
1861 set dummy cl; ac_word=$2
1862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1863 echo "configure:1864: checking for $ac_word" >&5
1864
1865 if test -n "$CC"; then
1866   ac_cv_prog_CC="$CC" # Let the user override the test.
1867 else
1868   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1869   ac_dummy="$PATH"
1870   for ac_dir in $ac_dummy; do
1871     test -z "$ac_dir" && ac_dir=.
1872     if test -f $ac_dir/$ac_word; then
1873       ac_cv_prog_CC="cl"
1874       break
1875     fi
1876   done
1877   IFS="$ac_save_ifs"
1878 fi
1879 CC="$ac_cv_prog_CC"
1880 if test -n "$CC"; then
1881   echo "$ac_t""$CC" 1>&6
1882 else
1883   echo "$ac_t""no" 1>&6
1884 fi
1885  ;;
1886     esac
1887   fi
1888   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1889 fi
1890
1891 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1892 echo "configure:1893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1893
1894 ac_ext=c
1895 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1896 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1897 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1898 ac_cpp='$CPP '"$xe_cppflags"
1899 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1900 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1901 cross_compiling=no
1902
1903 cat > conftest.$ac_ext << EOF
1904
1905 #line 1906 "configure"
1906 #include "confdefs.h"
1907
1908 main(){return(0);}
1909 EOF
1910 if { (eval echo configure:1911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1911   ac_cv_prog_cc_works=yes
1912   # If we can't run a trivial program, we are probably using a cross compiler.
1913   if (./conftest; exit) 2>/dev/null; then
1914     ac_cv_prog_cc_cross=no
1915   else
1916     ac_cv_prog_cc_cross=yes
1917   fi
1918 else
1919   echo "configure: failed program was:" >&5
1920   cat conftest.$ac_ext >&5
1921   ac_cv_prog_cc_works=no
1922 fi
1923 rm -fr conftest*
1924 ac_ext=c
1925 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1926 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1927 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1928 ac_cpp='$CPP '"$xe_cppflags"
1929 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1930 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1931 cross_compiling=no
1932
1933 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1934 if test $ac_cv_prog_cc_works = no; then
1935   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1936 fi
1937 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1938 echo "configure:1939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1939 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1940 cross_compiling=$ac_cv_prog_cc_cross
1941
1942 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1943 echo "configure:1944: checking whether we are using GNU C" >&5
1944
1945 cat > conftest.c <<EOF
1946 #ifdef __GNUC__
1947   yes;
1948 #endif
1949 EOF
1950 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1951   ac_cv_prog_gcc=yes
1952 else
1953   ac_cv_prog_gcc=no
1954 fi
1955
1956 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1957
1958 if test $ac_cv_prog_gcc = yes; then
1959   GCC=yes
1960 else
1961   GCC=
1962 fi
1963
1964 ac_test_CFLAGS="${CFLAGS+set}"
1965 ac_save_CFLAGS="$CFLAGS"
1966 CFLAGS=
1967 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1968 echo "configure:1969: checking whether ${CC-cc} accepts -g" >&5
1969
1970 echo 'void f(){}' > conftest.c
1971 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1972   ac_cv_prog_cc_g=yes
1973 else
1974   ac_cv_prog_cc_g=no
1975 fi
1976 rm -f conftest*
1977
1978
1979 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1980 if test "$ac_test_CFLAGS" = set; then
1981   CFLAGS="$ac_save_CFLAGS"
1982 elif test $ac_cv_prog_cc_g = yes; then
1983   if test "$GCC" = yes; then
1984     CFLAGS="-g -O2"
1985   else
1986     CFLAGS="-g"
1987   fi
1988 else
1989   if test "$GCC" = yes; then
1990     CFLAGS="-O2"
1991   else
1992     CFLAGS=
1993   fi
1994 fi
1995
1996 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1997   CC=gcc
1998   # Extract the first word of "gcc", so it can be a program name with args.
1999 set dummy gcc; ac_word=$2
2000 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_word" >&5
2002
2003 if test -n "$CC"; then
2004   ac_cv_prog_CC="$CC" # Let the user override the test.
2005 else
2006   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2007   ac_dummy="$PATH"
2008   for ac_dir in $ac_dummy; do
2009     test -z "$ac_dir" && ac_dir=.
2010     if test -f $ac_dir/$ac_word; then
2011       ac_cv_prog_CC="gcc"
2012       break
2013     fi
2014   done
2015   IFS="$ac_save_ifs"
2016 fi
2017 CC="$ac_cv_prog_CC"
2018 if test -n "$CC"; then
2019   echo "$ac_t""$CC" 1>&6
2020 else
2021   echo "$ac_t""no" 1>&6
2022 fi
2023
2024 if test -z "$CC"; then
2025   # Extract the first word of "cc", so it can be a program name with args.
2026 set dummy cc; ac_word=$2
2027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2028 echo "configure:2029: checking for $ac_word" >&5
2029
2030 if test -n "$CC"; then
2031   ac_cv_prog_CC="$CC" # Let the user override the test.
2032 else
2033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2034   ac_prog_rejected=no
2035   ac_dummy="$PATH"
2036   for ac_dir in $ac_dummy; do
2037     test -z "$ac_dir" && ac_dir=.
2038     if test -f $ac_dir/$ac_word; then
2039       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2040         ac_prog_rejected=yes
2041         continue
2042       fi
2043       ac_cv_prog_CC="cc"
2044       break
2045     fi
2046   done
2047   IFS="$ac_save_ifs"
2048 if test $ac_prog_rejected = yes; then
2049   # We found a bogon in the path, so make sure we never use it.
2050   set dummy $ac_cv_prog_CC
2051   shift
2052   if test $# -gt 0; then
2053     # We chose a different compiler from the bogus one.
2054     # However, it has the same basename, so the bogon will be chosen
2055     # first if we set CC to just the basename; use the full file name.
2056     shift
2057     set dummy "$ac_dir/$ac_word" "$@"
2058     shift
2059     ac_cv_prog_CC="$@"
2060   fi
2061 fi
2062 fi
2063 CC="$ac_cv_prog_CC"
2064 if test -n "$CC"; then
2065   echo "$ac_t""$CC" 1>&6
2066 else
2067   echo "$ac_t""no" 1>&6
2068 fi
2069
2070   if test -z "$CC"; then
2071     case "`uname -s`" in
2072     *win32* | *WIN32*)
2073       # Extract the first word of "cl", so it can be a program name with args.
2074 set dummy cl; ac_word=$2
2075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2076 echo "configure:2077: checking for $ac_word" >&5
2077
2078 if test -n "$CC"; then
2079   ac_cv_prog_CC="$CC" # Let the user override the test.
2080 else
2081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2082   ac_dummy="$PATH"
2083   for ac_dir in $ac_dummy; do
2084     test -z "$ac_dir" && ac_dir=.
2085     if test -f $ac_dir/$ac_word; then
2086       ac_cv_prog_CC="cl"
2087       break
2088     fi
2089   done
2090   IFS="$ac_save_ifs"
2091 fi
2092 CC="$ac_cv_prog_CC"
2093 if test -n "$CC"; then
2094   echo "$ac_t""$CC" 1>&6
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098  ;;
2099     esac
2100   fi
2101   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2102 fi
2103
2104 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2105 echo "configure:2106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2106
2107 ac_ext=c
2108 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2109 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2110 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2111 ac_cpp='$CPP '"$xe_cppflags"
2112 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2113 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2114 cross_compiling=no
2115
2116 cat > conftest.$ac_ext << EOF
2117
2118 #line 2119 "configure"
2119 #include "confdefs.h"
2120
2121 main(){return(0);}
2122 EOF
2123 if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2124   ac_cv_prog_cc_works=yes
2125   # If we can't run a trivial program, we are probably using a cross compiler.
2126   if (./conftest; exit) 2>/dev/null; then
2127     ac_cv_prog_cc_cross=no
2128   else
2129     ac_cv_prog_cc_cross=yes
2130   fi
2131 else
2132   echo "configure: failed program was:" >&5
2133   cat conftest.$ac_ext >&5
2134   ac_cv_prog_cc_works=no
2135 fi
2136 rm -fr conftest*
2137 ac_ext=c
2138 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2139 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2140 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2141 ac_cpp='$CPP '"$xe_cppflags"
2142 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2143 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2144 cross_compiling=no
2145
2146 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2147 if test $ac_cv_prog_cc_works = no; then
2148   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2149 fi
2150 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2151 echo "configure:2152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2152 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2153 cross_compiling=$ac_cv_prog_cc_cross
2154
2155 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2156 echo "configure:2157: checking whether we are using GNU C" >&5
2157
2158 cat > conftest.c <<EOF
2159 #ifdef __GNUC__
2160   yes;
2161 #endif
2162 EOF
2163 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2164   ac_cv_prog_gcc=yes
2165 else
2166   ac_cv_prog_gcc=no
2167 fi
2168
2169 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2170
2171 if test $ac_cv_prog_gcc = yes; then
2172   GCC=yes
2173 else
2174   GCC=
2175 fi
2176
2177 ac_test_CFLAGS="${CFLAGS+set}"
2178 ac_save_CFLAGS="$CFLAGS"
2179 CFLAGS=
2180 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2181 echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
2182
2183 echo 'void f(){}' > conftest.c
2184 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2185   ac_cv_prog_cc_g=yes
2186 else
2187   ac_cv_prog_cc_g=no
2188 fi
2189 rm -f conftest*
2190
2191
2192 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2193 if test "$ac_test_CFLAGS" = set; then
2194   CFLAGS="$ac_save_CFLAGS"
2195 elif test $ac_cv_prog_cc_g = yes; then
2196   if test "$GCC" = yes; then
2197     CFLAGS="-g -O2"
2198   else
2199     CFLAGS="-g"
2200   fi
2201 else
2202   if test "$GCC" = yes; then
2203     CFLAGS="-O2"
2204   else
2205     CFLAGS=
2206   fi
2207 fi
2208
2209 fi
2210 CFLAGS="$xe_save_CFLAGS"
2211
2212
2213 test -n "$CPP" -a -d "$CPP" && CPP=
2214
2215 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2216
2217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2218 echo "configure:2219: checking how to run the C preprocessor" >&5
2219 # On Suns, sometimes $CPP names a directory.
2220 if test -n "$CPP" && test -d "$CPP"; then
2221   CPP=
2222 fi
2223 if test -z "$CPP"; then
2224
2225   # This must be in double quotes, not single quotes, because CPP may get
2226   # substituted into the Makefile and "${CC-cc}" will confuse make.
2227   CPP="${CC-cc} -E"
2228   # On the NeXT, cc -E runs the code through the compiler's parser,
2229   # not just through cpp.
2230   cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234 Syntax Error
2235 EOF
2236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2237 { (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2239 if test -z "$ac_err"; then
2240   :
2241 else
2242   echo "$ac_err" >&5
2243   echo "configure: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   rm -rf conftest*
2246   CPP="${CC-cc} -E -traditional-cpp"
2247   cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 #include <assert.h>
2251 Syntax Error
2252 EOF
2253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2254 { (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2256 if test -z "$ac_err"; then
2257   :
2258 else
2259   echo "$ac_err" >&5
2260   echo "configure: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   rm -rf conftest*
2263   CPP="${CC-cc} -nologo -E"
2264   cat > conftest.$ac_ext <<EOF
2265 #line 2266 "configure"
2266 #include "confdefs.h"
2267 #include <assert.h>
2268 Syntax Error
2269 EOF
2270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2271 { (eval echo configure:2272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2273 if test -z "$ac_err"; then
2274   :
2275 else
2276   echo "$ac_err" >&5
2277   echo "configure: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   rm -rf conftest*
2280   CPP=/lib/cpp
2281 fi
2282 rm -f conftest*
2283 fi
2284 rm -f conftest*
2285 fi
2286 rm -f conftest*
2287   ac_cv_prog_CPP="$CPP"
2288   CPP="$ac_cv_prog_CPP"
2289 else
2290   ac_cv_prog_CPP="$CPP"
2291 fi
2292 echo "$ac_t""$CPP" 1>&6
2293
2294
2295 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2296 echo "configure:2297: checking for AIX" >&5
2297 cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #ifdef _AIX
2301   yes
2302 #endif
2303
2304 EOF
2305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2306   egrep "yes" >/dev/null 2>&1; then
2307   rm -rf conftest*
2308   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2309     Defining _ALL_SOURCE
2310 EOF
2311 cat >> confdefs.h <<\EOF
2312 #define _ALL_SOURCE 1
2313 EOF
2314 }
2315
2316 else
2317   rm -rf conftest*
2318   echo "$ac_t""no" 1>&6
2319 fi
2320 rm -f conftest*
2321
2322
2323
2324 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2325 echo "configure:2326: checking for GNU libc" >&5
2326 cat > conftest.$ac_ext <<EOF
2327 #line 2328 "configure"
2328 #include "confdefs.h"
2329 #include <features.h>
2330 int main() {
2331
2332 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2333 #error Not a GNU libc system :-(
2334 ******* ======= ******** &&&&&&&&
2335 #endif
2336
2337 ; return 0; }
2338 EOF
2339 if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2340   rm -rf conftest*
2341   have_glibc=yes
2342 else
2343   echo "configure: failed program was:" >&5
2344   cat conftest.$ac_ext >&5
2345   rm -rf conftest*
2346   have_glibc=no
2347 fi
2348 rm -f conftest*
2349 echo "$ac_t""$have_glibc" 1>&6
2350 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2351     Defining _GNU_SOURCE
2352 EOF
2353 cat >> confdefs.h <<\EOF
2354 #define _GNU_SOURCE 1
2355 EOF
2356 }
2357
2358
2359
2360 cat > conftest.$ac_ext <<EOF
2361 #line 2362 "configure"
2362 #include "confdefs.h"
2363 int main () {
2364 #if defined __SUNPRO_C
2365 return 11;
2366 #elif defined __DECC
2367 return 12;
2368 #else
2369 return 0;
2370 #endif
2371 }
2372 EOF
2373 if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2374 then
2375   :
2376 else
2377   conftest_rc="$?"
2378   echo "configure: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   rm -fr conftest*
2381   case "$conftest_rc" in
2382   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2383   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2384 esac
2385 fi
2386 rm -fr conftest*
2387
2388
2389
2390
2391 echo "Extracting information from the machine- and system-dependent headers..."
2392
2393 tempcname="conftest.c"
2394
2395
2396
2397 cat > $tempcname <<EOF
2398 #define NOT_C_CODE
2399 #define C_SWITCH_SITE
2400 #define C_SWITCH_X_SITE
2401 #define LD_SWITCH_SITE
2402 #define LD_SWITCH_X_SITE
2403 #define LD_SWITCH_X_SITE_AUX
2404 #define OS_RELEASE $os_release
2405 #include "$srcdir/src/$opsysfile"
2406 #include "$srcdir/src/$machfile"
2407
2408 #ifndef LIBS_MACHINE
2409 #define LIBS_MACHINE
2410 #endif
2411 configure___ libs_machine=LIBS_MACHINE
2412
2413 #ifndef LIBS_SYSTEM
2414 #define LIBS_SYSTEM
2415 #endif
2416 configure___ libs_system=LIBS_SYSTEM
2417
2418 #ifndef LIBS_TERMCAP
2419 #define LIBS_TERMCAP
2420 #endif
2421 configure___ libs_termcap=LIBS_TERMCAP
2422
2423 #ifndef LIB_STANDARD
2424 #define LIB_STANDARD
2425 #endif
2426 configure___ libs_standard=LIB_STANDARD
2427
2428
2429 #ifndef OBJECTS_MACHINE
2430 #define OBJECTS_MACHINE
2431 #endif
2432 configure___ objects_machine=OBJECTS_MACHINE
2433
2434 #ifndef OBJECTS_SYSTEM
2435 #define OBJECTS_SYSTEM
2436 #endif
2437 configure___ objects_system=OBJECTS_SYSTEM
2438
2439
2440 #ifndef C_SWITCH_MACHINE
2441 #define C_SWITCH_MACHINE
2442 #endif
2443 configure___ c_switch_machine=C_SWITCH_MACHINE
2444
2445 #ifndef C_SWITCH_SYSTEM
2446 #define C_SWITCH_SYSTEM
2447 #endif
2448 configure___ c_switch_system=C_SWITCH_SYSTEM
2449
2450
2451 #ifndef LD_SWITCH_MACHINE
2452 #define LD_SWITCH_MACHINE
2453 #endif
2454 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2455
2456 #ifndef LD_SWITCH_SYSTEM
2457 #define LD_SWITCH_SYSTEM
2458 #endif
2459 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2460
2461
2462 #ifndef UNEXEC
2463 #define UNEXEC "unexec.o"
2464 #endif
2465 configure___ unexec=UNEXEC
2466
2467
2468 #ifndef LD_SWITCH_SHARED
2469 #define LD_SWITCH_SHARED "-c"
2470 #endif
2471 configure___ ld_switch_shared=LD_SWITCH_SHARED
2472
2473
2474 #ifdef ORDINARY_LINK
2475 #define LD "\$(CC) \$(CFLAGS)"
2476 #else /* no ORDINARY LINK */
2477 #ifdef COFF_ENCAPSULATE
2478 #define LD "\$(CC) -nostdlib"
2479 #else /* not COFF_ENCAPSULATE */
2480 #ifdef LINKER
2481 #define LD LINKER
2482 #else /* ! defined (LINKER) */
2483 #define LD "ld"
2484 #endif /* ! defined (LINKER) */
2485 #endif /* ! defined (COFF_ENCAPSULATE) */
2486 #endif /* not ORDINARY_LINK */
2487 configure___ ld=LD
2488
2489 #ifndef LIB_GCC
2490 #define LIB_GCC
2491 #endif
2492 configure___ lib_gcc=LIB_GCC
2493
2494 #ifndef LD_TEXT_START_ADDR
2495 #define LD_TEXT_START_ADDR
2496 #endif
2497 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2498
2499
2500 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2501 #ifdef NO_REMAP
2502 #ifdef COFF_ENCAPSULATE
2503 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2504 #else /* ! defined (COFF_ENCAPSULATE) */
2505 #define START_FILES "pre-crt0.o /lib/crt0.o"
2506 #endif /* ! defined (COFF_ENCAPSULATE) */
2507 #else /* ! defined (NO_REMAP) */
2508 #define START_FILES "ecrt0.o"
2509 #endif /* ! defined (NO_REMAP) */
2510 #endif /* no ORDINARY_LINK */
2511 #ifndef START_FILES
2512 #define START_FILES
2513 #endif
2514 configure___ start_files=START_FILES
2515
2516 #ifdef ORDINARY_LINK
2517 configure___ ordinary_link=yes
2518 #else
2519 configure___ ordinary_link=no
2520 #endif
2521
2522 #ifdef SYSTEM_MALLOC
2523 configure___ system_malloc=yes
2524 #else
2525 configure___ system_malloc=no
2526 #endif
2527
2528 #ifdef TERMINFO
2529 configure___ have_terminfo=yes
2530 #else
2531 configure___ have_terminfo=no
2532 #endif
2533
2534 #ifdef MAIL_USE_FLOCK
2535 configure___ mail_use_flock=yes
2536 #else
2537 configure___ mail_use_flock=no
2538 #endif
2539
2540 #ifdef MAIL_USE_LOCKF
2541 configure___ mail_use_lockf=yes
2542 #else
2543 configure___ mail_use_lockf=no
2544 #endif
2545
2546 #ifdef MAIL_USE_LOCKING
2547 configure___ mail_use_locking=yes
2548 #else
2549 configure___ mail_use_locking=no
2550 #endif
2551
2552 #ifdef HAVE_WIN32_PROCESSES
2553 configure___ win32_processes=yes
2554 #else
2555 configure___ win32_processes=no
2556 #endif
2557
2558 EOF
2559
2560 CPP=`eval "echo $CPP $CPPFLAGS"`
2561 eval `$CPP -Isrc $tempcname \
2562         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2563
2564 rm $tempcname
2565
2566 test "$extra_verbose" = "yes" && \
2567   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 ""
2568
2569 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2570         mingw_include=`eval "dirname $mingw_include"` ;
2571         mingw_include="-I$mingw_include/../include/mingw32" ;
2572         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2573 esac
2574
2575 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2576
2577 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2578
2579 if test "$cflags_specified" = "no"; then
2580       if   test "$GCC" = "yes"; then
2581     CFLAGS="-g -O3 -Wall -Wno-switch"
2582               elif test "$__SUNPRO_C" = "yes"; then
2583     case "$opsys" in
2584       sol2    ) CFLAGS="-v -xO4" ;;
2585       sunos4* ) CFLAGS="-xO2";;
2586     esac
2587   elif test "$__DECC" = "yes"; then
2588     CFLAGS="-O3"
2589   elif test "$CC" = "xlc"; then
2590     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2591     else
2592     CFLAGS="-O" ;  fi
2593 fi
2594
2595
2596 if test "$GCC" = "yes"; then
2597   set x $ld_switch_system; shift; ld_switch_system=""
2598   while test -n "$1"; do
2599     case $1 in
2600       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2601       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2602       -Xlinker* ) ;;
2603       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2604     esac
2605     shift
2606   done
2607 fi
2608
2609 if test "$GCC" = "yes"; then
2610   set x $ld_switch_machine; shift; ld_switch_machine=""
2611   while test -n "$1"; do
2612     case $1 in
2613       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2614       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2615       -Xlinker* ) ;;
2616       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2617     esac
2618     shift
2619   done
2620 fi
2621
2622 if test "$GCC" = "yes"; then
2623   set x $LDFLAGS; shift; LDFLAGS=""
2624   while test -n "$1"; do
2625     case $1 in
2626       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2627       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2628       -Xlinker* ) ;;
2629       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2630     esac
2631     shift
2632   done
2633 fi
2634
2635 if test "$GCC" = "yes"; then
2636   set x $ld_call_shared; shift; ld_call_shared=""
2637   while test -n "$1"; do
2638     case $1 in
2639       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2640       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2641       -Xlinker* ) ;;
2642       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2643     esac
2644     shift
2645   done
2646 fi
2647
2648 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2649    echo "    xemacs will be linked with \"$objects_machine\""
2650  fi
2651 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2652    echo "    xemacs will be linked with \"$objects_system\""
2653  fi
2654 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2655    echo "    xemacs will be linked with \"$unexec\""
2656  fi
2657
2658 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2659 echo "configure:2660: checking for dynodump" >&5
2660 if test "$unexec" != "unexsol2.o"; then
2661   echo "$ac_t""no" 1>&6
2662 else
2663   echo "$ac_t""yes" 1>&6
2664   { test "$extra_verbose" = "yes" && cat << \EOF
2665     Defining DYNODUMP
2666 EOF
2667 cat >> confdefs.h <<\EOF
2668 #define DYNODUMP 1
2669 EOF
2670 }
2671
2672   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2673   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2674   case "$machine" in
2675     sparc   ) dynodump_arch=sparc ;;
2676     *86*    ) dynodump_arch=i386  ;;
2677     powerpc ) dynodump_arch=ppc   ;;
2678   esac
2679     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
2680 fi
2681
2682
2683 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2684
2685 if test "$unexec" = "unexaix.o"; then
2686   if   test "$dynamic" = "no"; then
2687   start_flags="-Wl,-bnso,-bnodelcsect"
2688   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2689   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2690     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2691   done
2692   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2693     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2694   done
2695   
2696 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2697 echo "configure:2698: checking for terminateAndUnload in -lC" >&5
2698 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2699
2700 xe_check_libs=" -lC "
2701 cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704 /* Override any gcc2 internal prototype to avoid an error.  */
2705 /* We use char because int might match the return type of a gcc2
2706     builtin and then its argument prototype would still apply.  */
2707 char terminateAndUnload();
2708
2709 int main() {
2710 terminateAndUnload()
2711 ; return 0; }
2712 EOF
2713 if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2714   rm -rf conftest*
2715   eval "ac_cv_lib_$ac_lib_var=yes"
2716 else
2717   echo "configure: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   rm -rf conftest*
2720   eval "ac_cv_lib_$ac_lib_var=no"
2721 fi
2722 rm -f conftest*
2723 xe_check_libs=""
2724
2725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2726   echo "$ac_t""yes" 1>&6
2727   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732
2733   fi
2734 elif test -n "$ld_text_start_addr"; then
2735   start_flags="-T $ld_text_start_addr -e __start"
2736 fi
2737
2738
2739
2740
2741 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2742  test -z "$linker" &&  linker='$(CC) -nostdlib'
2743  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2744 fi
2745 test "$GCC" != "yes" && lib_gcc=
2746
2747
2748
2749
2750
2751 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2752 if test -n "$site_libraries"; then
2753   for arg in $site_libraries; do
2754     case "$arg" in
2755      -* ) ;;
2756      * ) test -d "$arg" || \
2757            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2758        arg="-L${arg}" ;;
2759     esac
2760     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2761   done
2762 fi
2763
2764 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2765 if test -n "$site_includes"; then
2766   for arg in $site_includes; do
2767     case "$arg" in
2768       -* ) ;;
2769       * ) test -d "$arg" || \
2770            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2771       arg="-I${arg}" ;;
2772     esac
2773     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2774   done
2775 fi
2776
2777 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2778 if test -n "$site_prefixes"; then
2779   for dir in $site_prefixes; do
2780     lib_dir="${dir}/lib"
2781     inc_dir="${dir}/include"
2782     if test ! -d "$dir"; then
2783       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2784     elif test ! -d "$lib_dir"; then
2785       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2786     else
2787       if test -d "$inc_dir"; then
2788         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
2789       fi
2790       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
2791     fi
2792   done
2793 fi
2794
2795
2796 for dir in "/usr/ccs/lib"; do
2797   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
2798 done
2799
2800 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2801 if test -n "$site_runtime_libraries"; then
2802   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2803   export LD_RUN_PATH
2804 fi
2805
2806
2807 if   test "$dynamic" = "no"; then add_runtime_path=no
2808 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2809 else case "$opsys" in
2810        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2811        * ) add_runtime_path=no ;;
2812      esac
2813 fi
2814
2815 if test "$add_runtime_path" = "yes"; then
2816       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2817 echo "configure:2818: checking "for runtime libraries flag"" >&5
2818   case "$opsys" in
2819     sol2 ) dash_r="-R" ;;
2820     decosf* | linux* | irix*) dash_r="-rpath " ;;
2821     *)
2822       dash_r=""
2823       for try_dash_r in "-R" "-R " "-rpath "; do
2824         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2825         
2826 if test "$GCC" = "yes"; then
2827   set x $xe_check_libs; shift; xe_check_libs=""
2828   while test -n "$1"; do
2829     case $1 in
2830       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2831       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2832       -Xlinker* ) ;;
2833       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2834     esac
2835     shift
2836   done
2837 fi
2838         cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841
2842 int main() {
2843
2844 ; return 0; }
2845 EOF
2846 if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2847   rm -rf conftest*
2848   dash_r="$try_dash_r"
2849 else
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852 fi
2853 rm -f conftest*
2854         xe_check_libs=""
2855         test -n "$dash_r" && break
2856       done ;;
2857   esac
2858   if test -n "$dash_r";
2859     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2860     else echo "$ac_t""NONE" 1>&6
2861   fi
2862 fi
2863
2864 xe_add_unique_runpath_dir='
2865   xe_add_p=yes
2866   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2867   done
2868   if test "$xe_add_p" = "yes"; then
2869     test -n "$runpath" && runpath="${runpath}:"
2870     runpath="${runpath}${xe_runpath_dir}"
2871     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2872   fi'
2873
2874
2875
2876
2877 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2878     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2879   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2880   
2881         runpath="" runpath_dirs=""
2882   if test -n "$LD_RUN_PATH"; then
2883     runpath="$LD_RUN_PATH"
2884   elif test "$GCC" = "yes"; then
2885         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2886     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2887     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2888     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2889       case "$arg" in P,* | -L* | -R* )
2890         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2891           {
2892 xe_runpath_dir="$dir"
2893   test "$xe_runpath_dir" != "/lib"     -a \
2894         "$xe_runpath_dir" != "/usr/lib" -a \
2895         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2896   eval "$xe_add_unique_runpath_dir"
2897 }
2898         done ;;
2899       esac
2900     done
2901     ld_switch_run="$ld_switch_run_save"
2902     rm -f conftest*
2903   else
2904         for arg in $ld_switch_site $ld_switch_x_site; do
2905       case "$arg" in -L*) {
2906 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2907   test "$xe_runpath_dir" != "/lib"     -a \
2908         "$xe_runpath_dir" != "/usr/lib" -a \
2909         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2910   eval "$xe_add_unique_runpath_dir"
2911 };; esac
2912     done
2913         if test "$opsys $need_motif" = "sol2 yes"; then
2914       xe_runpath_dir="/opt/SUNWdt/lib";
2915       eval "$xe_add_unique_runpath_dir";
2916     fi
2917   fi 
2918   if test -n "$runpath"; then
2919     ld_switch_run="${dash_r}${runpath}"
2920     
2921 if test "$GCC" = "yes"; then
2922   set x $ld_switch_run; shift; ld_switch_run=""
2923   while test -n "$1"; do
2924     case $1 in
2925       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2926       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2927       -Xlinker* ) ;;
2928       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2929     esac
2930     shift
2931   done
2932 fi
2933     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2934   fi
2935 fi
2936
2937
2938
2939
2940 GNU_MALLOC=yes
2941 if test "$with_dlmalloc" != "no"; then
2942         doug_lea_malloc=yes
2943 else
2944         doug_lea_malloc=no
2945 fi
2946 after_morecore_hook_exists=yes
2947 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2948 echo "configure:2949: checking for malloc_get_state" >&5
2949
2950 cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 /* System header to define __stub macros and hopefully few prototypes,
2954     which can conflict with char malloc_get_state(); below.  */
2955 #include <assert.h>
2956 /* Override any gcc2 internal prototype to avoid an error.  */
2957 /* We use char because int might match the return type of a gcc2
2958     builtin and then its argument prototype would still apply.  */
2959 char malloc_get_state();
2960
2961 int main() {
2962
2963 /* The GNU C library defines this for functions which it implements
2964     to always fail with ENOSYS.  Some functions are actually named
2965     something starting with __ and the normal name is an alias.  */
2966 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2967 choke me
2968 #else
2969 malloc_get_state();
2970 #endif
2971
2972 ; return 0; }
2973 EOF
2974 if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2975   rm -rf conftest*
2976   eval "ac_cv_func_malloc_get_state=yes"
2977 else
2978   echo "configure: failed program was:" >&5
2979   cat conftest.$ac_ext >&5
2980   rm -rf conftest*
2981   eval "ac_cv_func_malloc_get_state=no"
2982 fi
2983 rm -f conftest*
2984
2985 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2986   echo "$ac_t""yes" 1>&6
2987   :
2988 else
2989   echo "$ac_t""no" 1>&6
2990 doug_lea_malloc=no
2991 fi
2992
2993 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2994 echo "configure:2995: checking for malloc_set_state" >&5
2995
2996 cat > conftest.$ac_ext <<EOF
2997 #line 2998 "configure"
2998 #include "confdefs.h"
2999 /* System header to define __stub macros and hopefully few prototypes,
3000     which can conflict with char malloc_set_state(); below.  */
3001 #include <assert.h>
3002 /* Override any gcc2 internal prototype to avoid an error.  */
3003 /* We use char because int might match the return type of a gcc2
3004     builtin and then its argument prototype would still apply.  */
3005 char malloc_set_state();
3006
3007 int main() {
3008
3009 /* The GNU C library defines this for functions which it implements
3010     to always fail with ENOSYS.  Some functions are actually named
3011     something starting with __ and the normal name is an alias.  */
3012 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3013 choke me
3014 #else
3015 malloc_set_state();
3016 #endif
3017
3018 ; return 0; }
3019 EOF
3020 if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3021   rm -rf conftest*
3022   eval "ac_cv_func_malloc_set_state=yes"
3023 else
3024   echo "configure: failed program was:" >&5
3025   cat conftest.$ac_ext >&5
3026   rm -rf conftest*
3027   eval "ac_cv_func_malloc_set_state=no"
3028 fi
3029 rm -f conftest*
3030
3031 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3032   echo "$ac_t""yes" 1>&6
3033   :
3034 else
3035   echo "$ac_t""no" 1>&6
3036 doug_lea_malloc=no
3037 fi
3038
3039 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3040 echo "configure:3041: checking whether __after_morecore_hook exists" >&5
3041 cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 extern void (* __after_morecore_hook)();
3045 int main() {
3046 __after_morecore_hook = 0
3047 ; return 0; }
3048 EOF
3049 if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3050   rm -rf conftest*
3051   echo "$ac_t""yes" 1>&6
3052 else
3053   echo "configure: failed program was:" >&5
3054   cat conftest.$ac_ext >&5
3055   rm -rf conftest*
3056   echo "$ac_t""no" 1>&6
3057    after_morecore_hook_exists=no
3058 fi
3059 rm -f conftest*
3060 if test "$system_malloc" = "yes" ; then
3061   GNU_MALLOC=no
3062   GNU_MALLOC_reason="
3063   (The GNU allocators don't work with this system configuration)."
3064 elif test "$with_system_malloc" = "yes" ; then
3065   GNU_MALLOC=no
3066   GNU_MALLOC_reason="
3067   (User chose not to use GNU allocators)."
3068 elif test "$with_debug_malloc" = "yes" ; then
3069   GNU_MALLOC=no
3070   GNU_MALLOC_reason="
3071   (User chose to use Debugging Malloc)."
3072 fi
3073
3074 if test "$doug_lea_malloc" = "yes" ; then
3075   if test "$GNU_MALLOC" = yes ; then
3076     GNU_MALLOC_reason="
3077   (Using Doug Lea's new malloc from the GNU C Library.)"
3078   fi
3079   { test "$extra_verbose" = "yes" && cat << \EOF
3080     Defining DOUG_LEA_MALLOC
3081 EOF
3082 cat >> confdefs.h <<\EOF
3083 #define DOUG_LEA_MALLOC 1
3084 EOF
3085 }
3086
3087   if test "$after_morecore_hook_exists" = "no" ; then
3088     GNU_MALLOC_reason="
3089   (Using Doug Lea's new malloc from the Linux C Library.)"
3090     { test "$extra_verbose" = "yes" && cat << \EOF
3091     Defining _NO_MALLOC_WARNING_
3092 EOF
3093 cat >> confdefs.h <<\EOF
3094 #define _NO_MALLOC_WARNING_ 1
3095 EOF
3096 }
3097
3098   fi
3099   use_minimal_tagbits=yes
3100 fi
3101
3102
3103
3104
3105 # Extract the first word of "ranlib", so it can be a program name with args.
3106 set dummy ranlib; ac_word=$2
3107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3108 echo "configure:3109: checking for $ac_word" >&5
3109
3110 if test -n "$RANLIB"; then
3111   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3112 else
3113   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3114   ac_dummy="$PATH"
3115   for ac_dir in $ac_dummy; do
3116     test -z "$ac_dir" && ac_dir=.
3117     if test -f $ac_dir/$ac_word; then
3118       ac_cv_prog_RANLIB="ranlib"
3119       break
3120     fi
3121   done
3122   IFS="$ac_save_ifs"
3123   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3124 fi
3125 RANLIB="$ac_cv_prog_RANLIB"
3126 if test -n "$RANLIB"; then
3127   echo "$ac_t""$RANLIB" 1>&6
3128 else
3129   echo "$ac_t""no" 1>&6
3130 fi
3131
3132 ac_aux_dir=
3133 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3134   if test -f $ac_dir/install-sh; then
3135     ac_aux_dir=$ac_dir
3136     ac_install_sh="$ac_aux_dir/install-sh -c"
3137     break
3138   elif test -f $ac_dir/install.sh; then
3139     ac_aux_dir=$ac_dir
3140     ac_install_sh="$ac_aux_dir/install.sh -c"
3141     break
3142   fi
3143 done
3144 if test -z "$ac_aux_dir"; then
3145   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3146 fi
3147 ac_config_guess=$ac_aux_dir/config.guess
3148 ac_config_sub=$ac_aux_dir/config.sub
3149 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3150
3151 # Find a good install program.  We prefer a C program (faster),
3152 # so one script is as good as another.  But avoid the broken or
3153 # incompatible versions:
3154 # SysV /etc/install, /usr/sbin/install
3155 # SunOS /usr/etc/install
3156 # IRIX /sbin/install
3157 # AIX /bin/install
3158 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3159 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3160 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3161 # ./install, which can be erroneously created by make from ./install.sh.
3162 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3163 echo "configure:3164: checking for a BSD compatible install" >&5
3164 if test -z "$INSTALL"; then
3165
3166   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3167   for ac_dir in $PATH; do
3168     # Account for people who put trailing slashes in PATH elements.
3169     case "$ac_dir/" in
3170     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3171     *)
3172       # OSF1 and SCO ODT 3.0 have their own names for install.
3173       # Don't use installbsd from OSF since it installs stuff as root
3174       # by default.
3175       for ac_prog in ginstall scoinst install; do
3176         if test -f $ac_dir/$ac_prog; then
3177           if test $ac_prog = install &&
3178             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3179             # AIX install.  It has an incompatible calling convention.
3180             :
3181           else
3182             ac_cv_path_install="$ac_dir/$ac_prog -c"
3183             break 2
3184           fi
3185         fi
3186       done
3187       ;;
3188     esac
3189   done
3190   IFS="$ac_save_IFS"
3191
3192   if test "${ac_cv_path_install+set}" = set; then
3193     INSTALL="$ac_cv_path_install"
3194   else
3195     # As a last resort, use the slow shell script.  We don't cache a
3196     # path for INSTALL within a source directory, because that will
3197     # break other packages using the cache if that directory is
3198     # removed, or if the path is relative.
3199     INSTALL="$ac_install_sh"
3200   fi
3201 fi
3202 echo "$ac_t""$INSTALL" 1>&6
3203
3204 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3205 # It thinks the first close brace ends the variable substitution.
3206 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3207
3208 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3209
3210 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3211
3212 for ac_prog in 'bison -y' byacc
3213 do
3214 # Extract the first word of "$ac_prog", so it can be a program name with args.
3215 set dummy $ac_prog; ac_word=$2
3216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3217 echo "configure:3218: checking for $ac_word" >&5
3218
3219 if test -n "$YACC"; then
3220   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3221 else
3222   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3223   ac_dummy="$PATH"
3224   for ac_dir in $ac_dummy; do
3225     test -z "$ac_dir" && ac_dir=.
3226     if test -f $ac_dir/$ac_word; then
3227       ac_cv_prog_YACC="$ac_prog"
3228       break
3229     fi
3230   done
3231   IFS="$ac_save_ifs"
3232 fi
3233 YACC="$ac_cv_prog_YACC"
3234 if test -n "$YACC"; then
3235   echo "$ac_t""$YACC" 1>&6
3236 else
3237   echo "$ac_t""no" 1>&6
3238 fi
3239
3240 test -n "$YACC" && break
3241 done
3242 test -n "$YACC" || YACC="yacc"
3243
3244
3245 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3246 do
3247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3249 echo "configure:3250: checking for $ac_hdr" >&5
3250
3251 cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <$ac_hdr>
3255 EOF
3256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3257 { (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3259 if test -z "$ac_err"; then
3260   rm -rf conftest*
3261   eval "ac_cv_header_$ac_safe=yes"
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   eval "ac_cv_header_$ac_safe=no"
3268 fi
3269 rm -f conftest*
3270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3271   echo "$ac_t""yes" 1>&6
3272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3273   { test "$extra_verbose" = "yes" && cat << EOF
3274     Defining $ac_tr_hdr
3275 EOF
3276 cat >> confdefs.h <<EOF
3277 #define $ac_tr_hdr 1
3278 EOF
3279 }
3280  
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284 done
3285
3286 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3287 do
3288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3290 echo "configure:3291: checking for $ac_hdr" >&5
3291
3292 cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295 #include <$ac_hdr>
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   rm -rf conftest*
3302   eval "ac_cv_header_$ac_safe=yes"
3303 else
3304   echo "$ac_err" >&5
3305   echo "configure: failed program was:" >&5
3306   cat conftest.$ac_ext >&5
3307   rm -rf conftest*
3308   eval "ac_cv_header_$ac_safe=no"
3309 fi
3310 rm -f conftest*
3311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3312   echo "$ac_t""yes" 1>&6
3313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3314   { test "$extra_verbose" = "yes" && cat << EOF
3315     Defining $ac_tr_hdr
3316 EOF
3317 cat >> confdefs.h <<EOF
3318 #define $ac_tr_hdr 1
3319 EOF
3320 }
3321  
3322 else
3323   echo "$ac_t""no" 1>&6
3324 fi
3325 done
3326
3327 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3328 do
3329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3331 echo "configure:3332: checking for $ac_hdr" >&5
3332
3333 cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 #include <$ac_hdr>
3337 EOF
3338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3339 { (eval echo configure:3340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3341 if test -z "$ac_err"; then
3342   rm -rf conftest*
3343   eval "ac_cv_header_$ac_safe=yes"
3344 else
3345   echo "$ac_err" >&5
3346   echo "configure: failed program was:" >&5
3347   cat conftest.$ac_ext >&5
3348   rm -rf conftest*
3349   eval "ac_cv_header_$ac_safe=no"
3350 fi
3351 rm -f conftest*
3352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3353   echo "$ac_t""yes" 1>&6
3354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3355   { test "$extra_verbose" = "yes" && cat << EOF
3356     Defining $ac_tr_hdr
3357 EOF
3358 cat >> confdefs.h <<EOF
3359 #define $ac_tr_hdr 1
3360 EOF
3361 }
3362  
3363 else
3364   echo "$ac_t""no" 1>&6
3365 fi
3366 done
3367
3368 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3369 echo "configure:3370: checking for sys/wait.h that is POSIX.1 compatible" >&5
3370
3371 cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 #include <sys/types.h>
3375 #include <sys/wait.h>
3376 #ifndef WEXITSTATUS
3377 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3378 #endif
3379 #ifndef WIFEXITED
3380 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3381 #endif
3382 int main() {
3383 int s;
3384 wait (&s);
3385 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3386 ; return 0; }
3387 EOF
3388 if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3389   rm -rf conftest*
3390   ac_cv_header_sys_wait_h=yes
3391 else
3392   echo "configure: failed program was:" >&5
3393   cat conftest.$ac_ext >&5
3394   rm -rf conftest*
3395   ac_cv_header_sys_wait_h=no
3396 fi
3397 rm -f conftest*
3398
3399 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3400 if test $ac_cv_header_sys_wait_h = yes; then
3401   { test "$extra_verbose" = "yes" && cat << \EOF
3402     Defining HAVE_SYS_WAIT_H
3403 EOF
3404 cat >> confdefs.h <<\EOF
3405 #define HAVE_SYS_WAIT_H 1
3406 EOF
3407 }
3408
3409 fi
3410
3411 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3412 echo "configure:3413: checking for ANSI C header files" >&5
3413
3414 cat > conftest.$ac_ext <<EOF
3415 #line 3416 "configure"
3416 #include "confdefs.h"
3417 #include <stdlib.h>
3418 #include <stdarg.h>
3419 #include <string.h>
3420 #include <float.h>
3421 EOF
3422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3423 { (eval echo configure:3424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3425 if test -z "$ac_err"; then
3426   rm -rf conftest*
3427   ac_cv_header_stdc=yes
3428 else
3429   echo "$ac_err" >&5
3430   echo "configure: failed program was:" >&5
3431   cat conftest.$ac_ext >&5
3432   rm -rf conftest*
3433   ac_cv_header_stdc=no
3434 fi
3435 rm -f conftest*
3436
3437 if test $ac_cv_header_stdc = yes; then
3438   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3439 cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 #include <string.h>
3443 EOF
3444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3445   egrep "memchr" >/dev/null 2>&1; then
3446   :
3447 else
3448   rm -rf conftest*
3449   ac_cv_header_stdc=no
3450 fi
3451 rm -f conftest*
3452
3453 fi
3454
3455 if test $ac_cv_header_stdc = yes; then
3456   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3457 cat > conftest.$ac_ext <<EOF
3458 #line 3459 "configure"
3459 #include "confdefs.h"
3460 #include <stdlib.h>
3461 EOF
3462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3463   egrep "free" >/dev/null 2>&1; then
3464   :
3465 else
3466   rm -rf conftest*
3467   ac_cv_header_stdc=no
3468 fi
3469 rm -f conftest*
3470
3471 fi
3472
3473 if test $ac_cv_header_stdc = yes; then
3474   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3475 cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478 #include <ctype.h>
3479 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3480 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3481 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3482 int main () { int i; for (i = 0; i < 256; i++)
3483 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3484 exit (0); }
3485
3486 EOF
3487 if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3488 then
3489   :
3490 else
3491   conftest_rc="$?"
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -fr conftest*
3495   ac_cv_header_stdc=no
3496 fi
3497 rm -fr conftest*
3498 fi
3499
3500 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3501 if test $ac_cv_header_stdc = yes; then
3502   { test "$extra_verbose" = "yes" && cat << \EOF
3503     Defining STDC_HEADERS
3504 EOF
3505 cat >> confdefs.h <<\EOF
3506 #define STDC_HEADERS 1
3507 EOF
3508 }
3509
3510 fi
3511
3512 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether time.h and sys/time.h may both be included" >&5
3514
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518 #include <sys/types.h>
3519 #include <sys/time.h>
3520 #include <time.h>
3521 int main() {
3522 struct tm *tp;
3523 ; return 0; }
3524 EOF
3525 if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3526   rm -rf conftest*
3527   ac_cv_header_time=yes
3528 else
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -rf conftest*
3532   ac_cv_header_time=no
3533 fi
3534 rm -f conftest*
3535
3536 echo "$ac_t""$ac_cv_header_time" 1>&6
3537 if test $ac_cv_header_time = yes; then
3538   { test "$extra_verbose" = "yes" && cat << \EOF
3539     Defining TIME_WITH_SYS_TIME
3540 EOF
3541 cat >> confdefs.h <<\EOF
3542 #define TIME_WITH_SYS_TIME 1
3543 EOF
3544 }
3545
3546 fi
3547
3548 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3549 echo "configure:3550: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3550
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <sys/types.h>
3555 #include <signal.h>
3556 /* NetBSD declares sys_siglist in unistd.h.  */
3557 #ifdef HAVE_UNISTD_H
3558 #include <unistd.h>
3559 #endif
3560 int main() {
3561 char *msg = *(sys_siglist + 1);
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565   rm -rf conftest*
3566   ac_cv_decl_sys_siglist=yes
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   ac_cv_decl_sys_siglist=no
3572 fi
3573 rm -f conftest*
3574
3575 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3576 if test $ac_cv_decl_sys_siglist = yes; then
3577   { test "$extra_verbose" = "yes" && cat << \EOF
3578     Defining SYS_SIGLIST_DECLARED
3579 EOF
3580 cat >> confdefs.h <<\EOF
3581 #define SYS_SIGLIST_DECLARED 1
3582 EOF
3583 }
3584
3585 fi
3586
3587
3588 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3589 echo "configure:3590: checking for struct utimbuf" >&5
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3593 #ifdef TIME_WITH_SYS_TIME
3594 #include <sys/time.h>
3595 #include <time.h>
3596 #else
3597 #ifdef HAVE_SYS_TIME_H
3598 #include <sys/time.h>
3599 #else
3600 #include <time.h>
3601 #endif
3602 #endif
3603 #ifdef HAVE_UTIME_H
3604 #include <utime.h>
3605 #endif
3606 int main() {
3607 static struct utimbuf x; x.actime = x.modtime;
3608 ; return 0; }
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3611   rm -rf conftest*
3612   echo "$ac_t""yes" 1>&6
3613    { test "$extra_verbose" = "yes" && cat << \EOF
3614     Defining HAVE_STRUCT_UTIMBUF
3615 EOF
3616 cat >> confdefs.h <<\EOF
3617 #define HAVE_STRUCT_UTIMBUF 1
3618 EOF
3619 }
3620
3621 else
3622   echo "configure: failed program was:" >&5
3623   cat conftest.$ac_ext >&5
3624   rm -rf conftest*
3625   echo "$ac_t""no" 1>&6
3626 fi
3627 rm -f conftest*
3628
3629 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3630 echo "configure:3631: checking return type of signal handlers" >&5
3631
3632 cat > conftest.$ac_ext <<EOF
3633 #line 3634 "configure"
3634 #include "confdefs.h"
3635 #include <sys/types.h>
3636 #include <signal.h>
3637 #ifdef signal
3638 #undef signal
3639 #endif
3640 #ifdef __cplusplus
3641 extern "C" void (*signal (int, void (*)(int)))(int);
3642 #else
3643 void (*signal ()) ();
3644 #endif
3645
3646 int main() {
3647 int i;
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3651   rm -rf conftest*
3652   ac_cv_type_signal=void
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   ac_cv_type_signal=int
3658 fi
3659 rm -f conftest*
3660
3661 echo "$ac_t""$ac_cv_type_signal" 1>&6
3662 { test "$extra_verbose" = "yes" && cat << EOF
3663     Defining RETSIGTYPE = $ac_cv_type_signal
3664 EOF
3665 cat >> confdefs.h <<EOF
3666 #define RETSIGTYPE $ac_cv_type_signal
3667 EOF
3668 }
3669
3670
3671 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3672 echo "configure:3673: checking for size_t" >&5
3673
3674 cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <sys/types.h>
3678 #if STDC_HEADERS
3679 #include <stdlib.h>
3680 #include <stddef.h>
3681 #endif
3682 EOF
3683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3684   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3685   rm -rf conftest*
3686   ac_cv_type_size_t=yes
3687 else
3688   rm -rf conftest*
3689   ac_cv_type_size_t=no
3690 fi
3691 rm -f conftest*
3692
3693 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3694 if test $ac_cv_type_size_t = no; then
3695   { test "$extra_verbose" = "yes" && cat << \EOF
3696     Defining size_t = unsigned
3697 EOF
3698 cat >> confdefs.h <<\EOF
3699 #define size_t unsigned
3700 EOF
3701 }
3702
3703 fi
3704
3705 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3706 echo "configure:3707: checking for pid_t" >&5
3707
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <sys/types.h>
3712 #if STDC_HEADERS
3713 #include <stdlib.h>
3714 #include <stddef.h>
3715 #endif
3716 EOF
3717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3718   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3719   rm -rf conftest*
3720   ac_cv_type_pid_t=yes
3721 else
3722   rm -rf conftest*
3723   ac_cv_type_pid_t=no
3724 fi
3725 rm -f conftest*
3726
3727 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3728 if test $ac_cv_type_pid_t = no; then
3729   { test "$extra_verbose" = "yes" && cat << \EOF
3730     Defining pid_t = int
3731 EOF
3732 cat >> confdefs.h <<\EOF
3733 #define pid_t int
3734 EOF
3735 }
3736
3737 fi
3738
3739 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3740 echo "configure:3741: checking for uid_t in sys/types.h" >&5
3741
3742 cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <sys/types.h>
3746 EOF
3747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748   egrep "uid_t" >/dev/null 2>&1; then
3749   rm -rf conftest*
3750   ac_cv_type_uid_t=yes
3751 else
3752   rm -rf conftest*
3753   ac_cv_type_uid_t=no
3754 fi
3755 rm -f conftest*
3756
3757
3758 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3759 if test $ac_cv_type_uid_t = no; then
3760   { test "$extra_verbose" = "yes" && cat << \EOF
3761     Defining uid_t = int
3762 EOF
3763 cat >> confdefs.h <<\EOF
3764 #define uid_t int
3765 EOF
3766 }
3767
3768   { test "$extra_verbose" = "yes" && cat << \EOF
3769     Defining gid_t = int
3770 EOF
3771 cat >> confdefs.h <<\EOF
3772 #define gid_t int
3773 EOF
3774 }
3775
3776 fi
3777
3778 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3779 echo "configure:3780: checking for mode_t" >&5
3780
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 #include <sys/types.h>
3785 #if STDC_HEADERS
3786 #include <stdlib.h>
3787 #include <stddef.h>
3788 #endif
3789 EOF
3790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3791   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3792   rm -rf conftest*
3793   ac_cv_type_mode_t=yes
3794 else
3795   rm -rf conftest*
3796   ac_cv_type_mode_t=no
3797 fi
3798 rm -f conftest*
3799
3800 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3801 if test $ac_cv_type_mode_t = no; then
3802   { test "$extra_verbose" = "yes" && cat << \EOF
3803     Defining mode_t = int
3804 EOF
3805 cat >> confdefs.h <<\EOF
3806 #define mode_t int
3807 EOF
3808 }
3809
3810 fi
3811
3812 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3813 echo "configure:3814: checking for off_t" >&5
3814
3815 cat > conftest.$ac_ext <<EOF
3816 #line 3817 "configure"
3817 #include "confdefs.h"
3818 #include <sys/types.h>
3819 #if STDC_HEADERS
3820 #include <stdlib.h>
3821 #include <stddef.h>
3822 #endif
3823 EOF
3824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3825   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3826   rm -rf conftest*
3827   ac_cv_type_off_t=yes
3828 else
3829   rm -rf conftest*
3830   ac_cv_type_off_t=no
3831 fi
3832 rm -f conftest*
3833
3834 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3835 if test $ac_cv_type_off_t = no; then
3836   { test "$extra_verbose" = "yes" && cat << \EOF
3837     Defining off_t = long
3838 EOF
3839 cat >> confdefs.h <<\EOF
3840 #define off_t long
3841 EOF
3842 }
3843
3844 fi
3845
3846 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3847 echo "configure:3848: checking for ssize_t" >&5
3848
3849 cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852 #include <sys/types.h>
3853 #if STDC_HEADERS
3854 #include <stdlib.h>
3855 #include <stddef.h>
3856 #endif
3857 EOF
3858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3860   rm -rf conftest*
3861   ac_cv_type_ssize_t=yes
3862 else
3863   rm -rf conftest*
3864   ac_cv_type_ssize_t=no
3865 fi
3866 rm -f conftest*
3867
3868 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3869 if test $ac_cv_type_ssize_t = no; then
3870   { test "$extra_verbose" = "yes" && cat << \EOF
3871     Defining ssize_t = int
3872 EOF
3873 cat >> confdefs.h <<\EOF
3874 #define ssize_t int
3875 EOF
3876 }
3877
3878 fi
3879
3880
3881 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3882 echo "configure:3883: checking for struct timeval" >&5
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #ifdef TIME_WITH_SYS_TIME
3887 #include <sys/time.h>
3888 #include <time.h>
3889 #else
3890 #ifdef HAVE_SYS_TIME_H
3891 #include <sys/time.h>
3892 #else
3893 #include <time.h>
3894 #endif
3895 #endif
3896 int main() {
3897 static struct timeval x; x.tv_sec = x.tv_usec;
3898 ; return 0; }
3899 EOF
3900 if { (eval echo configure:3901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3901   rm -rf conftest*
3902   echo "$ac_t""yes" 1>&6
3903   HAVE_TIMEVAL=yes
3904   { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining HAVE_TIMEVAL
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define HAVE_TIMEVAL 1
3909 EOF
3910 }
3911
3912 else
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   echo "$ac_t""no" 1>&6
3917    HAVE_TIMEVAL=no
3918 fi
3919 rm -f conftest*
3920
3921 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3922 echo "configure:3923: checking whether struct tm is in sys/time.h or time.h" >&5
3923
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 #include <sys/types.h>
3928 #include <time.h>
3929 int main() {
3930 struct tm *tp; tp->tm_sec;
3931 ; return 0; }
3932 EOF
3933 if { (eval echo configure:3934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3934   rm -rf conftest*
3935   ac_cv_struct_tm=time.h
3936 else
3937   echo "configure: failed program was:" >&5
3938   cat conftest.$ac_ext >&5
3939   rm -rf conftest*
3940   ac_cv_struct_tm=sys/time.h
3941 fi
3942 rm -f conftest*
3943
3944 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3945 if test $ac_cv_struct_tm = sys/time.h; then
3946   { test "$extra_verbose" = "yes" && cat << \EOF
3947     Defining TM_IN_SYS_TIME
3948 EOF
3949 cat >> confdefs.h <<\EOF
3950 #define TM_IN_SYS_TIME 1
3951 EOF
3952 }
3953
3954 fi
3955
3956 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3957 echo "configure:3958: checking for tm_zone in struct tm" >&5
3958
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 #include <sys/types.h>
3963 #include <$ac_cv_struct_tm>
3964 int main() {
3965 struct tm tm; tm.tm_zone;
3966 ; return 0; }
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3969   rm -rf conftest*
3970   ac_cv_struct_tm_zone=yes
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -rf conftest*
3975   ac_cv_struct_tm_zone=no
3976 fi
3977 rm -f conftest*
3978
3979 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3980 if test "$ac_cv_struct_tm_zone" = yes; then
3981   { test "$extra_verbose" = "yes" && cat << \EOF
3982     Defining HAVE_TM_ZONE
3983 EOF
3984 cat >> confdefs.h <<\EOF
3985 #define HAVE_TM_ZONE 1
3986 EOF
3987 }
3988
3989 else
3990   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3991 echo "configure:3992: checking for tzname" >&5
3992
3993 cat > conftest.$ac_ext <<EOF
3994 #line 3995 "configure"
3995 #include "confdefs.h"
3996 #include <time.h>
3997 #ifndef tzname /* For SGI.  */
3998 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3999 #endif
4000 int main() {
4001 atoi(*tzname);
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   ac_cv_var_tzname=yes
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   ac_cv_var_tzname=no
4012 fi
4013 rm -f conftest*
4014
4015 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4016   if test $ac_cv_var_tzname = yes; then
4017     { test "$extra_verbose" = "yes" && cat << \EOF
4018     Defining HAVE_TZNAME
4019 EOF
4020 cat >> confdefs.h <<\EOF
4021 #define HAVE_TZNAME 1
4022 EOF
4023 }
4024
4025   fi
4026 fi
4027
4028
4029 echo $ac_n "checking for working const""... $ac_c" 1>&6
4030 echo "configure:4031: checking for working const" >&5
4031
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035
4036 int main() {
4037
4038 /* Ultrix mips cc rejects this.  */
4039 typedef int charset[2]; const charset x;
4040 /* SunOS 4.1.1 cc rejects this.  */
4041 char const *const *ccp;
4042 char **p;
4043 /* NEC SVR4.0.2 mips cc rejects this.  */
4044 struct point {int x, y;};
4045 static struct point const zero = {0,0};
4046 /* AIX XL C 1.02.0.0 rejects this.
4047    It does not let you subtract one const X* pointer from another in an arm
4048    of an if-expression whose if-part is not a constant expression */
4049 const char *g = "string";
4050 ccp = &g + (g ? g-g : 0);
4051 /* HPUX 7.0 cc rejects these. */
4052 ++ccp;
4053 p = (char**) ccp;
4054 ccp = (char const *const *) p;
4055 { /* SCO 3.2v4 cc rejects this.  */
4056   char *t;
4057   char const *s = 0 ? (char *) 0 : (char const *) 0;
4058
4059   *t++ = 0;
4060 }
4061 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4062   int x[] = {25, 17};
4063   const int *foo = &x[0];
4064   ++foo;
4065 }
4066 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4067   typedef const int *iptr;
4068   iptr p = 0;
4069   ++p;
4070 }
4071 { /* AIX XL C 1.02.0.0 rejects this saying
4072      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4073   struct s { int j; const int *ap[3]; };
4074   struct s *b; b->j = 5;
4075 }
4076 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4077   const int foo = 10;
4078 }
4079
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083   rm -rf conftest*
4084   ac_cv_c_const=yes
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   ac_cv_c_const=no
4090 fi
4091 rm -f conftest*
4092
4093 echo "$ac_t""$ac_cv_c_const" 1>&6
4094 if test $ac_cv_c_const = no; then
4095   { test "$extra_verbose" = "yes" && cat << \EOF
4096     Defining const = 
4097 EOF
4098 cat >> confdefs.h <<\EOF
4099 #define const 
4100 EOF
4101 }
4102
4103 fi
4104
4105
4106 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4107 echo "configure:4108: checking whether ${MAKE-make} sets \${MAKE}" >&5
4108 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4109
4110 cat > conftestmake <<\EOF
4111 all:
4112         @echo 'ac_maketemp="${MAKE}"'
4113 EOF
4114 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4115 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4116 if test -n "$ac_maketemp"; then
4117   eval ac_cv_prog_make_${ac_make}_set=yes
4118 else
4119   eval ac_cv_prog_make_${ac_make}_set=no
4120 fi
4121 rm -f conftestmake
4122 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4123   echo "$ac_t""yes" 1>&6
4124   SET_MAKE=
4125 else
4126   echo "$ac_t""no" 1>&6
4127   SET_MAKE="MAKE=${MAKE-make}"
4128 fi
4129
4130
4131 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4132 echo "configure:4133: checking whether byte ordering is bigendian" >&5
4133
4134 ac_cv_c_bigendian=unknown
4135 # See if sys/param.h defines the BYTE_ORDER macro.
4136 cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <sys/types.h>
4140 #include <sys/param.h>
4141 int main() {
4142
4143 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4144  bogus endian macros
4145 #endif
4146 ; return 0; }
4147 EOF
4148 if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4149   rm -rf conftest*
4150   # It does; now see whether it defined to BIG_ENDIAN or not.
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #include <sys/types.h>
4155 #include <sys/param.h>
4156 int main() {
4157
4158 #if BYTE_ORDER != BIG_ENDIAN
4159  not big endian
4160 #endif
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4164   rm -rf conftest*
4165   ac_cv_c_bigendian=yes
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ac_cv_c_bigendian=no
4171 fi
4172 rm -f conftest*
4173 else
4174   echo "configure: failed program was:" >&5
4175   cat conftest.$ac_ext >&5
4176 fi
4177 rm -f conftest*
4178 if test $ac_cv_c_bigendian = unknown; then
4179 cat > conftest.$ac_ext <<EOF
4180 #line 4181 "configure"
4181 #include "confdefs.h"
4182 main () {
4183   /* Are we little or big endian?  From Harbison&Steele.  */
4184   union
4185   {
4186     long l;
4187     char c[sizeof (long)];
4188   } u;
4189   u.l = 1;
4190   exit (u.c[sizeof (long) - 1] == 1);
4191 }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4194 then
4195   ac_cv_c_bigendian=no
4196 else
4197   conftest_rc="$?"
4198   echo "configure: failed program was:" >&5
4199   cat conftest.$ac_ext >&5
4200   rm -fr conftest*
4201   ac_cv_c_bigendian=yes
4202 fi
4203 rm -fr conftest*
4204 fi
4205
4206 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4207 if test $ac_cv_c_bigendian = yes; then
4208   { test "$extra_verbose" = "yes" && cat << \EOF
4209     Defining WORDS_BIGENDIAN
4210 EOF
4211 cat >> confdefs.h <<\EOF
4212 #define WORDS_BIGENDIAN 1
4213 EOF
4214 }
4215
4216 fi
4217
4218
4219 echo $ac_n "checking size of short""... $ac_c" 1>&6
4220 echo "configure:4221: checking size of short" >&5
4221
4222 cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <stdio.h>
4226 main()
4227 {
4228   FILE *f=fopen("conftestval", "w");
4229   if (!f) exit(1);
4230   fprintf(f, "%d\n", sizeof(short));
4231   exit(0);
4232 }
4233 EOF
4234 if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4235 then
4236   ac_cv_sizeof_short=`cat conftestval`
4237 else
4238   conftest_rc="$?"
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -fr conftest*
4242   ac_cv_sizeof_short=0
4243 fi
4244 rm -fr conftest*
4245 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4246 { test "$extra_verbose" = "yes" && cat << EOF
4247     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4248 EOF
4249 cat >> confdefs.h <<EOF
4250 #define SIZEOF_SHORT $ac_cv_sizeof_short
4251 EOF
4252 }
4253
4254
4255 if test "$ac_cv_sizeof_short" = 0; then
4256   echo ""
4257   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4258   echo "*** PANIC *** Please examine config.log for compilation errors."
4259   exit 1
4260 fi
4261 echo $ac_n "checking size of int""... $ac_c" 1>&6
4262 echo "configure:4263: checking size of int" >&5
4263
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include <stdio.h>
4268 main()
4269 {
4270   FILE *f=fopen("conftestval", "w");
4271   if (!f) exit(1);
4272   fprintf(f, "%d\n", sizeof(int));
4273   exit(0);
4274 }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4277 then
4278   ac_cv_sizeof_int=`cat conftestval`
4279 else
4280   conftest_rc="$?"
4281   echo "configure: failed program was:" >&5
4282   cat conftest.$ac_ext >&5
4283   rm -fr conftest*
4284   ac_cv_sizeof_int=0
4285 fi
4286 rm -fr conftest*
4287 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4288 { test "$extra_verbose" = "yes" && cat << EOF
4289     Defining SIZEOF_INT = $ac_cv_sizeof_int
4290 EOF
4291 cat >> confdefs.h <<EOF
4292 #define SIZEOF_INT $ac_cv_sizeof_int
4293 EOF
4294 }
4295
4296
4297 echo $ac_n "checking size of long""... $ac_c" 1>&6
4298 echo "configure:4299: checking size of long" >&5
4299
4300 cat > conftest.$ac_ext <<EOF
4301 #line 4302 "configure"
4302 #include "confdefs.h"
4303 #include <stdio.h>
4304 main()
4305 {
4306   FILE *f=fopen("conftestval", "w");
4307   if (!f) exit(1);
4308   fprintf(f, "%d\n", sizeof(long));
4309   exit(0);
4310 }
4311 EOF
4312 if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4313 then
4314   ac_cv_sizeof_long=`cat conftestval`
4315 else
4316   conftest_rc="$?"
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -fr conftest*
4320   ac_cv_sizeof_long=0
4321 fi
4322 rm -fr conftest*
4323 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4324 { test "$extra_verbose" = "yes" && cat << EOF
4325     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4326 EOF
4327 cat >> confdefs.h <<EOF
4328 #define SIZEOF_LONG $ac_cv_sizeof_long
4329 EOF
4330 }
4331
4332
4333 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4334 echo "configure:4335: checking size of long long" >&5
4335
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 #include <stdio.h>
4340 main()
4341 {
4342   FILE *f=fopen("conftestval", "w");
4343   if (!f) exit(1);
4344   fprintf(f, "%d\n", sizeof(long long));
4345   exit(0);
4346 }
4347 EOF
4348 if { (eval echo configure:4349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4349 then
4350   ac_cv_sizeof_long_long=`cat conftestval`
4351 else
4352   conftest_rc="$?"
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -fr conftest*
4356   ac_cv_sizeof_long_long=0
4357 fi
4358 rm -fr conftest*
4359 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4360 { test "$extra_verbose" = "yes" && cat << EOF
4361     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4362 EOF
4363 cat >> confdefs.h <<EOF
4364 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4365 EOF
4366 }
4367
4368
4369 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4370 echo "configure:4371: checking size of void *" >&5
4371
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 #include <stdio.h>
4376 main()
4377 {
4378   FILE *f=fopen("conftestval", "w");
4379   if (!f) exit(1);
4380   fprintf(f, "%d\n", sizeof(void *));
4381   exit(0);
4382 }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4385 then
4386   ac_cv_sizeof_void_p=`cat conftestval`
4387 else
4388   conftest_rc="$?"
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -fr conftest*
4392   ac_cv_sizeof_void_p=0
4393 fi
4394 rm -fr conftest*
4395 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4396 { test "$extra_verbose" = "yes" && cat << EOF
4397     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4398 EOF
4399 cat >> confdefs.h <<EOF
4400 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4401 EOF
4402 }
4403
4404
4405
4406 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4407 echo "configure:4408: checking for long file names" >&5
4408
4409 ac_cv_sys_long_file_names=yes
4410 # Test for long file names in all the places we know might matter:
4411 #      .                the current directory, where building will happen
4412 #      $prefix/lib      where we will be installing things
4413 #      $exec_prefix/lib likewise
4414 # eval it to expand exec_prefix.
4415 #      $TMPDIR          if set, where it might want to write temporary files
4416 # if $TMPDIR is not set:
4417 #      /tmp             where it might want to write temporary files
4418 #      /var/tmp         likewise
4419 #      /usr/tmp         likewise
4420 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4421   ac_tmpdirs="$TMPDIR"
4422 else
4423   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4424 fi
4425 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4426   test -d $ac_dir || continue
4427   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4428   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4429   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4430   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4431   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4432     ac_cv_sys_long_file_names=no
4433     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4434     break
4435   fi
4436   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4437 done
4438
4439 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4440 if test $ac_cv_sys_long_file_names = yes; then
4441   { test "$extra_verbose" = "yes" && cat << \EOF
4442     Defining HAVE_LONG_FILE_NAMES
4443 EOF
4444 cat >> confdefs.h <<\EOF
4445 #define HAVE_LONG_FILE_NAMES 1
4446 EOF
4447 }
4448
4449 fi
4450
4451
4452 echo $ac_n "checking for sin""... $ac_c" 1>&6
4453 echo "configure:4454: checking for sin" >&5
4454
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 /* System header to define __stub macros and hopefully few prototypes,
4459     which can conflict with char sin(); below.  */
4460 #include <assert.h>
4461 /* Override any gcc2 internal prototype to avoid an error.  */
4462 /* We use char because int might match the return type of a gcc2
4463     builtin and then its argument prototype would still apply.  */
4464 char sin();
4465
4466 int main() {
4467
4468 /* The GNU C library defines this for functions which it implements
4469     to always fail with ENOSYS.  Some functions are actually named
4470     something starting with __ and the normal name is an alias.  */
4471 #if defined (__stub_sin) || defined (__stub___sin)
4472 choke me
4473 #else
4474 sin();
4475 #endif
4476
4477 ; return 0; }
4478 EOF
4479 if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4480   rm -rf conftest*
4481   eval "ac_cv_func_sin=yes"
4482 else
4483   echo "configure: failed program was:" >&5
4484   cat conftest.$ac_ext >&5
4485   rm -rf conftest*
4486   eval "ac_cv_func_sin=no"
4487 fi
4488 rm -f conftest*
4489
4490 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4491   echo "$ac_t""yes" 1>&6
4492   :
4493 else
4494   echo "$ac_t""no" 1>&6
4495
4496 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4497 echo "configure:4498: checking for sin in -lm" >&5
4498 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4499
4500 xe_check_libs=" -lm "
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 /* Override any gcc2 internal prototype to avoid an error.  */
4505 /* We use char because int might match the return type of a gcc2
4506     builtin and then its argument prototype would still apply.  */
4507 char sin();
4508
4509 int main() {
4510 sin()
4511 ; return 0; }
4512 EOF
4513 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4514   rm -rf conftest*
4515   eval "ac_cv_lib_$ac_lib_var=yes"
4516 else
4517   echo "configure: failed program was:" >&5
4518   cat conftest.$ac_ext >&5
4519   rm -rf conftest*
4520   eval "ac_cv_lib_$ac_lib_var=no"
4521 fi
4522 rm -f conftest*
4523 xe_check_libs=""
4524
4525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4526   echo "$ac_t""yes" 1>&6
4527     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4529   { test "$extra_verbose" = "yes" && cat << EOF
4530     Defining $ac_tr_lib
4531 EOF
4532 cat >> confdefs.h <<EOF
4533 #define $ac_tr_lib 1
4534 EOF
4535 }
4536
4537   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4538
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542
4543
4544 fi
4545
4546
4547 { test "$extra_verbose" = "yes" && cat << \EOF
4548     Defining LISP_FLOAT_TYPE
4549 EOF
4550 cat >> confdefs.h <<\EOF
4551 #define LISP_FLOAT_TYPE 1
4552 EOF
4553 }
4554
4555
4556 cat > conftest.$ac_ext <<EOF
4557 #line 4558 "configure"
4558 #include "confdefs.h"
4559 #include <math.h>
4560 int main() {
4561 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   { test "$extra_verbose" = "yes" && cat << \EOF
4567     Defining HAVE_INVERSE_HYPERBOLIC
4568 EOF
4569 cat >> confdefs.h <<\EOF
4570 #define HAVE_INVERSE_HYPERBOLIC 1
4571 EOF
4572 }
4573
4574 else
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577 fi
4578 rm -f conftest*
4579
4580 echo "checking type of mail spool file locking" 1>&6
4581 echo "configure:4582: checking type of mail spool file locking" >&5
4582 for ac_func in lockf flock
4583 do
4584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4585 echo "configure:4586: checking for $ac_func" >&5
4586
4587 cat > conftest.$ac_ext <<EOF
4588 #line 4589 "configure"
4589 #include "confdefs.h"
4590 /* System header to define __stub macros and hopefully few prototypes,
4591     which can conflict with char $ac_func(); below.  */
4592 #include <assert.h>
4593 /* Override any gcc2 internal prototype to avoid an error.  */
4594 /* We use char because int might match the return type of a gcc2
4595     builtin and then its argument prototype would still apply.  */
4596 char $ac_func();
4597
4598 int main() {
4599
4600 /* The GNU C library defines this for functions which it implements
4601     to always fail with ENOSYS.  Some functions are actually named
4602     something starting with __ and the normal name is an alias.  */
4603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4604 choke me
4605 #else
4606 $ac_func();
4607 #endif
4608
4609 ; return 0; }
4610 EOF
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4612   rm -rf conftest*
4613   eval "ac_cv_func_$ac_func=yes"
4614 else
4615   echo "configure: failed program was:" >&5
4616   cat conftest.$ac_ext >&5
4617   rm -rf conftest*
4618   eval "ac_cv_func_$ac_func=no"
4619 fi
4620 rm -f conftest*
4621
4622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4623   echo "$ac_t""yes" 1>&6
4624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4625   { test "$extra_verbose" = "yes" && cat << EOF
4626     Defining $ac_tr_func
4627 EOF
4628 cat >> confdefs.h <<EOF
4629 #define $ac_tr_func 1
4630 EOF
4631 }
4632  
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636 done
4637
4638 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4639 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4640 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4641 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4642     Defining MAIL_LOCK_LOCKF
4643 EOF
4644 cat >> confdefs.h <<\EOF
4645 #define MAIL_LOCK_LOCKF 1
4646 EOF
4647 }
4648
4649 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4650     Defining MAIL_LOCK_FLOCK
4651 EOF
4652 cat >> confdefs.h <<\EOF
4653 #define MAIL_LOCK_FLOCK 1
4654 EOF
4655 }
4656
4657 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4658     Defining MAIL_LOCK_LOCKING
4659 EOF
4660 cat >> confdefs.h <<\EOF
4661 #define MAIL_LOCK_LOCKING 1
4662 EOF
4663 }
4664
4665 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4666     Defining MAIL_LOCK_DOT
4667 EOF
4668 cat >> confdefs.h <<\EOF
4669 #define MAIL_LOCK_DOT 1
4670 EOF
4671 }
4672
4673 fi
4674 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4675   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4676 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4677   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4678 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4679   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4680
4681 case "$opsys" in decosf*)
4682   
4683 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4684 echo "configure:4685: checking for cma_open in -lpthreads" >&5
4685 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4686
4687 xe_check_libs=" -lpthreads "
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 /* Override any gcc2 internal prototype to avoid an error.  */
4692 /* We use char because int might match the return type of a gcc2
4693     builtin and then its argument prototype would still apply.  */
4694 char cma_open();
4695
4696 int main() {
4697 cma_open()
4698 ; return 0; }
4699 EOF
4700 if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701   rm -rf conftest*
4702   eval "ac_cv_lib_$ac_lib_var=yes"
4703 else
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   eval "ac_cv_lib_$ac_lib_var=no"
4708 fi
4709 rm -f conftest*
4710 xe_check_libs=""
4711
4712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4713   echo "$ac_t""yes" 1>&6
4714     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4715     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4716   { test "$extra_verbose" = "yes" && cat << EOF
4717     Defining $ac_tr_lib
4718 EOF
4719 cat >> confdefs.h <<EOF
4720 #define $ac_tr_lib 1
4721 EOF
4722 }
4723
4724   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4725
4726 else
4727   echo "$ac_t""no" 1>&6
4728 fi
4729
4730
4731   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4732     c_switch_site="$c_switch_site -threads" ;;
4733 esac
4734
4735 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4736 echo "configure:4737: checking whether the -xildoff compiler flag is required" >&5
4737 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4738   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4739     then echo "$ac_t""no" 1>&6;
4740     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
4741   fi
4742   else echo "$ac_t""no" 1>&6
4743 fi
4744
4745 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4746   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4747 echo "configure:4748: checking for \"-z ignore\" linker flag" >&5
4748   case "`ld -h 2>&1`" in
4749     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4750       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4751     *) echo "$ac_t""no" 1>&6 ;;
4752   esac
4753 fi
4754
4755
4756 echo "checking "for specified window system"" 1>&6
4757 echo "configure:4758: checking "for specified window system"" >&5
4758
4759 if test "$with_x11" != "no"; then
4760     test "$x_includes $x_libraries" != "NONE NONE" && \
4761    window_system=x11 with_x11=yes
4762
4763         
4764       if test "$x_includes $x_libraries" = "NONE NONE" \
4765     -a -n "$OPENWINHOME" \
4766     -a "$OPENWINHOME" != "/usr/openwin" \
4767     -a -d "$OPENWINHOME"; then
4768       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4769       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4770       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4771   fi
4772
4773   if test "$x_includes" = "NONE"; then
4774                     for dir in "/usr/X11" "/usr/X11R6"; do
4775       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4776     done
4777   fi
4778
4779   if test "$x_libraries" = "NONE"; then
4780     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4781       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4782     done
4783   fi
4784
4785   # If we find X, set shell vars x_includes and x_libraries to the
4786 # paths, otherwise set no_x=yes.
4787 # Uses ac_ vars as temps to allow command line to override cache and checks.
4788 # --without-x overrides everything else, but does not touch the cache.
4789 echo $ac_n "checking for X""... $ac_c" 1>&6
4790 echo "configure:4791: checking for X" >&5
4791
4792 # Check whether --with-x or --without-x was given.
4793 if test "${with_x+set}" = set; then
4794   withval="$with_x"
4795   :
4796 fi
4797
4798 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4799 if test "x$with_x" = xno; then
4800   # The user explicitly disabled X.
4801   have_x=disabled
4802 else
4803   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4804     # Both variables are already set.
4805     have_x=yes
4806   else
4807
4808 # One or both of the vars are not set, and there is no cached value.
4809 ac_x_includes=NO ac_x_libraries=NO
4810 rm -fr conftestdir
4811 if mkdir conftestdir; then
4812   cd conftestdir
4813   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4814   cat > Imakefile <<'EOF'
4815 acfindx:
4816         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4817 EOF
4818   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4819     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4820     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4821     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4822     for ac_extension in a so sl; do
4823       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4824         test -f $ac_im_libdir/libX11.$ac_extension; then
4825         ac_im_usrlibdir=$ac_im_libdir; break
4826       fi
4827     done
4828     # Screen out bogus values from the imake configuration.  They are
4829     # bogus both because they are the default anyway, and because
4830     # using them would break gcc on systems where it needs fixed includes.
4831     case "$ac_im_incroot" in
4832         /usr/include) ;;
4833         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4834     esac
4835     case "$ac_im_usrlibdir" in
4836         /usr/lib | /lib) ;;
4837         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4838     esac
4839   fi
4840   cd ..
4841   rm -fr conftestdir
4842 fi
4843
4844 if test "$ac_x_includes" = NO; then
4845   # Guess where to find include files, by looking for this one X11 .h file.
4846   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4847
4848   # First, try using that file with no special directory specified.
4849 cat > conftest.$ac_ext <<EOF
4850 #line 4851 "configure"
4851 #include "confdefs.h"
4852 #include <$x_direct_test_include>
4853 EOF
4854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4855 { (eval echo configure:4856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4857 if test -z "$ac_err"; then
4858   rm -rf conftest*
4859   # We can compile using X headers with no special include directory.
4860 ac_x_includes=
4861 else
4862   echo "$ac_err" >&5
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   # Look for the header file in a standard set of common directories.
4867 # Check X11 before X11Rn because it is often a symlink to the current release.
4868   for ac_dir in               \
4869     /usr/X11/include          \
4870     /usr/X11R6/include        \
4871     /usr/X11R5/include        \
4872     /usr/X11R4/include        \
4873                               \
4874     /usr/include/X11          \
4875     /usr/include/X11R6        \
4876     /usr/include/X11R5        \
4877     /usr/include/X11R4        \
4878                               \
4879     /usr/local/X11/include    \
4880     /usr/local/X11R6/include  \
4881     /usr/local/X11R5/include  \
4882     /usr/local/X11R4/include  \
4883                               \
4884     /usr/local/include/X11    \
4885     /usr/local/include/X11R6  \
4886     /usr/local/include/X11R5  \
4887     /usr/local/include/X11R4  \
4888                               \
4889     /usr/X386/include         \
4890     /usr/x386/include         \
4891     /usr/XFree86/include/X11  \
4892                               \
4893     /usr/include              \
4894     /usr/local/include        \
4895     /usr/unsupported/include  \
4896     /usr/athena/include       \
4897     /usr/local/x11r5/include  \
4898     /usr/lpp/Xamples/include  \
4899                               \
4900     /usr/openwin/include      \
4901     /usr/openwin/share/include \
4902     ; \
4903   do
4904     if test -r "$ac_dir/$x_direct_test_include"; then
4905       ac_x_includes=$ac_dir
4906       break
4907     fi
4908   done
4909 fi
4910 rm -f conftest*
4911 fi # $ac_x_includes = NO
4912
4913 if test "$ac_x_libraries" = NO; then
4914   # Check for the libraries.
4915
4916   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4917   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4918
4919   # See if we find them without any special options.
4920   # Don't add to $LIBS permanently.
4921   ac_save_LIBS="$LIBS"
4922   LIBS="-l$x_direct_test_library $LIBS"
4923 cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4926
4927 int main() {
4928 ${x_direct_test_function}()
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   LIBS="$ac_save_LIBS"
4934 # We can link X programs with no special library path.
4935 ac_x_libraries=
4936 else
4937   echo "configure: failed program was:" >&5
4938   cat conftest.$ac_ext >&5
4939   rm -rf conftest*
4940   LIBS="$ac_save_LIBS"
4941 # First see if replacing the include by lib works.
4942 # Check X11 before X11Rn because it is often a symlink to the current release.
4943 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4944     /usr/X11/lib          \
4945     /usr/X11R6/lib        \
4946     /usr/X11R5/lib        \
4947     /usr/X11R4/lib        \
4948                           \
4949     /usr/lib/X11          \
4950     /usr/lib/X11R6        \
4951     /usr/lib/X11R5        \
4952     /usr/lib/X11R4        \
4953                           \
4954     /usr/local/X11/lib    \
4955     /usr/local/X11R6/lib  \
4956     /usr/local/X11R5/lib  \
4957     /usr/local/X11R4/lib  \
4958                           \
4959     /usr/local/lib/X11    \
4960     /usr/local/lib/X11R6  \
4961     /usr/local/lib/X11R5  \
4962     /usr/local/lib/X11R4  \
4963                           \
4964     /usr/X386/lib         \
4965     /usr/x386/lib         \
4966     /usr/XFree86/lib/X11  \
4967                           \
4968     /usr/lib              \
4969     /usr/local/lib        \
4970     /usr/unsupported/lib  \
4971     /usr/athena/lib       \
4972     /usr/local/x11r5/lib  \
4973     /usr/lpp/Xamples/lib  \
4974     /lib/usr/lib/X11      \
4975                           \
4976     /usr/openwin/lib      \
4977     /usr/openwin/share/lib \
4978     ; \
4979 do
4980   for ac_extension in a so sl; do
4981     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4982       ac_x_libraries=$ac_dir
4983       break 2
4984     fi
4985   done
4986 done
4987 fi
4988 rm -f conftest*
4989 fi # $ac_x_libraries = NO
4990
4991 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4992   # Didn't find X anywhere.  Cache the known absence of X.
4993   ac_cv_have_x="have_x=no"
4994 else
4995   # Record where we found X for the cache.
4996   ac_cv_have_x="have_x=yes \
4997                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4998 fi
4999   fi
5000   eval "$ac_cv_have_x"
5001 fi # $with_x != no
5002
5003 if test "$have_x" != yes; then
5004   echo "$ac_t""$have_x" 1>&6
5005   no_x=yes
5006 else
5007   # If each of the values was on the command line, it overrides each guess.
5008   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5009   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5010   # Update the cache value to reflect the command line values.
5011   ac_cv_have_x="have_x=yes \
5012                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5013   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5014 fi
5015
5016 if test "$no_x" = yes; then
5017   # Not all programs may use this symbol, but it does not hurt to define it.
5018   { test "$extra_verbose" = "yes" && cat << \EOF
5019     Defining X_DISPLAY_MISSING
5020 EOF
5021 cat >> confdefs.h <<\EOF
5022 #define X_DISPLAY_MISSING 1
5023 EOF
5024 }
5025
5026   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5027 else
5028   if test -n "$x_includes"; then
5029     X_CFLAGS="$X_CFLAGS -I$x_includes"
5030   fi
5031
5032   # It would also be nice to do this for all -L options, not just this one.
5033   if test -n "$x_libraries"; then
5034     X_LIBS="$X_LIBS -L$x_libraries"
5035     # For Solaris; some versions of Sun CC require a space after -R and
5036     # others require no space.  Words are not sufficient . . . .
5037     case "`(uname -sr) 2>/dev/null`" in
5038     "SunOS 5"*)
5039       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5040 echo "configure:5041: checking whether -R must be followed by a space" >&5
5041       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5042       cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045
5046 int main() {
5047
5048 ; return 0; }
5049 EOF
5050 if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5051   rm -rf conftest*
5052   ac_R_nospace=yes
5053 else
5054   echo "configure: failed program was:" >&5
5055   cat conftest.$ac_ext >&5
5056   rm -rf conftest*
5057   ac_R_nospace=no
5058 fi
5059 rm -f conftest*
5060       if test $ac_R_nospace = yes; then
5061         echo "$ac_t""no" 1>&6
5062         X_LIBS="$X_LIBS -R$x_libraries"
5063       else
5064         LIBS="$ac_xsave_LIBS -R $x_libraries"
5065         cat > conftest.$ac_ext <<EOF
5066 #line 5067 "configure"
5067 #include "confdefs.h"
5068
5069 int main() {
5070
5071 ; return 0; }
5072 EOF
5073 if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5074   rm -rf conftest*
5075   ac_R_space=yes
5076 else
5077   echo "configure: failed program was:" >&5
5078   cat conftest.$ac_ext >&5
5079   rm -rf conftest*
5080   ac_R_space=no
5081 fi
5082 rm -f conftest*
5083         if test $ac_R_space = yes; then
5084           echo "$ac_t""yes" 1>&6
5085           X_LIBS="$X_LIBS -R $x_libraries"
5086         else
5087           echo "$ac_t""neither works" 1>&6
5088         fi
5089       fi
5090       LIBS="$ac_xsave_LIBS"
5091     esac
5092   fi
5093
5094   # Check for system-dependent libraries X programs must link with.
5095   # Do this before checking for the system-independent R6 libraries
5096   # (-lICE), since we may need -lsocket or whatever for X linking.
5097
5098   if test "$ISC" = yes; then
5099     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5100   else
5101     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5102     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5103     # the Alpha needs dnet_stub (dnet does not exist).
5104     if test "$with_dnet" = "no" ; then
5105 ac_cv_lib_dnet_dnet_ntoa=no
5106 else
5107
5108 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5109 echo "configure:5110: checking for dnet_ntoa in -ldnet" >&5
5110 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5111
5112 xe_check_libs=" -ldnet "
5113 cat > conftest.$ac_ext <<EOF
5114 #line 5115 "configure"
5115 #include "confdefs.h"
5116 /* Override any gcc2 internal prototype to avoid an error.  */
5117 /* We use char because int might match the return type of a gcc2
5118     builtin and then its argument prototype would still apply.  */
5119 char dnet_ntoa();
5120
5121 int main() {
5122 dnet_ntoa()
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126   rm -rf conftest*
5127   eval "ac_cv_lib_$ac_lib_var=yes"
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131   rm -rf conftest*
5132   eval "ac_cv_lib_$ac_lib_var=no"
5133 fi
5134 rm -f conftest*
5135 xe_check_libs=""
5136
5137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5138   echo "$ac_t""yes" 1>&6
5139   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143
5144 fi
5145
5146     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5147       
5148 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5149 echo "configure:5150: checking for dnet_ntoa in -ldnet_stub" >&5
5150 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5151
5152 xe_check_libs=" -ldnet_stub "
5153 cat > conftest.$ac_ext <<EOF
5154 #line 5155 "configure"
5155 #include "confdefs.h"
5156 /* Override any gcc2 internal prototype to avoid an error.  */
5157 /* We use char because int might match the return type of a gcc2
5158     builtin and then its argument prototype would still apply.  */
5159 char dnet_ntoa();
5160
5161 int main() {
5162 dnet_ntoa()
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   eval "ac_cv_lib_$ac_lib_var=yes"
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=no"
5173 fi
5174 rm -f conftest*
5175 xe_check_libs=""
5176
5177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5178   echo "$ac_t""yes" 1>&6
5179   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5180 else
5181   echo "$ac_t""no" 1>&6
5182 fi
5183
5184
5185     fi
5186
5187     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5188     # to get the SysV transport functions.
5189     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5190     # needs -lnsl.
5191     # The nsl library prevents programs from opening the X display
5192     # on Irix 5.2, according to dickey@clark.net.
5193     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5194 echo "configure:5195: checking for gethostbyname" >&5
5195
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* System header to define __stub macros and hopefully few prototypes,
5200     which can conflict with char gethostbyname(); below.  */
5201 #include <assert.h>
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char gethostbyname();
5206
5207 int main() {
5208
5209 /* The GNU C library defines this for functions which it implements
5210     to always fail with ENOSYS.  Some functions are actually named
5211     something starting with __ and the normal name is an alias.  */
5212 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5213 choke me
5214 #else
5215 gethostbyname();
5216 #endif
5217
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_func_gethostbyname=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_func_gethostbyname=no"
5228 fi
5229 rm -f conftest*
5230
5231 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5232   echo "$ac_t""yes" 1>&6
5233   :
5234 else
5235   echo "$ac_t""no" 1>&6
5236 fi
5237
5238     if test $ac_cv_func_gethostbyname = no; then
5239       
5240 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5241 echo "configure:5242: checking for gethostbyname in -lnsl" >&5
5242 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5243
5244 xe_check_libs=" -lnsl "
5245 cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248 /* Override any gcc2 internal prototype to avoid an error.  */
5249 /* We use char because int might match the return type of a gcc2
5250     builtin and then its argument prototype would still apply.  */
5251 char gethostbyname();
5252
5253 int main() {
5254 gethostbyname()
5255 ; return 0; }
5256 EOF
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5258   rm -rf conftest*
5259   eval "ac_cv_lib_$ac_lib_var=yes"
5260 else
5261   echo "configure: failed program was:" >&5
5262   cat conftest.$ac_ext >&5
5263   rm -rf conftest*
5264   eval "ac_cv_lib_$ac_lib_var=no"
5265 fi
5266 rm -f conftest*
5267 xe_check_libs=""
5268
5269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5270   echo "$ac_t""yes" 1>&6
5271   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5272 else
5273   echo "$ac_t""no" 1>&6
5274 fi
5275
5276
5277     fi
5278
5279     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5280     # socket/setsockopt and other routines are undefined under SCO ODT
5281     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5282     # on later versions), says simon@lia.di.epfl.ch: it contains
5283     # gethostby* variants that don't use the nameserver (or something).
5284     # -lsocket must be given before -lnsl if both are needed.
5285     # We assume that if connect needs -lnsl, so does gethostbyname.
5286     echo $ac_n "checking for connect""... $ac_c" 1>&6
5287 echo "configure:5288: checking for connect" >&5
5288
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292 /* System header to define __stub macros and hopefully few prototypes,
5293     which can conflict with char connect(); below.  */
5294 #include <assert.h>
5295 /* Override any gcc2 internal prototype to avoid an error.  */
5296 /* We use char because int might match the return type of a gcc2
5297     builtin and then its argument prototype would still apply.  */
5298 char connect();
5299
5300 int main() {
5301
5302 /* The GNU C library defines this for functions which it implements
5303     to always fail with ENOSYS.  Some functions are actually named
5304     something starting with __ and the normal name is an alias.  */
5305 #if defined (__stub_connect) || defined (__stub___connect)
5306 choke me
5307 #else
5308 connect();
5309 #endif
5310
5311 ; return 0; }
5312 EOF
5313 if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5314   rm -rf conftest*
5315   eval "ac_cv_func_connect=yes"
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   eval "ac_cv_func_connect=no"
5321 fi
5322 rm -f conftest*
5323
5324 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5325   echo "$ac_t""yes" 1>&6
5326   :
5327 else
5328   echo "$ac_t""no" 1>&6
5329 fi
5330
5331     if test $ac_cv_func_connect = no; then
5332       
5333 xe_msg_checking="for connect in -lsocket"
5334 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5335 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5336 echo "configure:5337: checking "$xe_msg_checking"" >&5
5337 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5338
5339 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5340 cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 /* We use char because int might match the return type of a gcc2
5345     builtin and then its argument prototype would still apply.  */
5346 char connect();
5347
5348 int main() {
5349 connect()
5350 ; return 0; }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5353   rm -rf conftest*
5354   eval "ac_cv_lib_$ac_lib_var=yes"
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=no"
5360 fi
5361 rm -f conftest*
5362 xe_check_libs=""
5363
5364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5365   echo "$ac_t""yes" 1>&6
5366   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5367 else
5368   echo "$ac_t""no" 1>&6
5369 fi
5370
5371
5372     fi
5373
5374     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5375     echo $ac_n "checking for remove""... $ac_c" 1>&6
5376 echo "configure:5377: checking for remove" >&5
5377
5378 cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char remove(); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char remove();
5388
5389 int main() {
5390
5391 /* The GNU C library defines this for functions which it implements
5392     to always fail with ENOSYS.  Some functions are actually named
5393     something starting with __ and the normal name is an alias.  */
5394 #if defined (__stub_remove) || defined (__stub___remove)
5395 choke me
5396 #else
5397 remove();
5398 #endif
5399
5400 ; return 0; }
5401 EOF
5402 if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5403   rm -rf conftest*
5404   eval "ac_cv_func_remove=yes"
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408   rm -rf conftest*
5409   eval "ac_cv_func_remove=no"
5410 fi
5411 rm -f conftest*
5412
5413 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5414   echo "$ac_t""yes" 1>&6
5415   :
5416 else
5417   echo "$ac_t""no" 1>&6
5418 fi
5419
5420     if test $ac_cv_func_remove = no; then
5421       
5422 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5423 echo "configure:5424: checking for remove in -lposix" >&5
5424 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5425
5426 xe_check_libs=" -lposix "
5427 cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 /* We use char because int might match the return type of a gcc2
5432     builtin and then its argument prototype would still apply.  */
5433 char remove();
5434
5435 int main() {
5436 remove()
5437 ; return 0; }
5438 EOF
5439 if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=yes"
5442 else
5443   echo "configure: failed program was:" >&5
5444   cat conftest.$ac_ext >&5
5445   rm -rf conftest*
5446   eval "ac_cv_lib_$ac_lib_var=no"
5447 fi
5448 rm -f conftest*
5449 xe_check_libs=""
5450
5451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5452   echo "$ac_t""yes" 1>&6
5453   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5454 else
5455   echo "$ac_t""no" 1>&6
5456 fi
5457
5458
5459     fi
5460
5461     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5462     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5463 echo "configure:5464: checking for shmat" >&5
5464
5465 cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 /* System header to define __stub macros and hopefully few prototypes,
5469     which can conflict with char shmat(); below.  */
5470 #include <assert.h>
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char shmat();
5475
5476 int main() {
5477
5478 /* The GNU C library defines this for functions which it implements
5479     to always fail with ENOSYS.  Some functions are actually named
5480     something starting with __ and the normal name is an alias.  */
5481 #if defined (__stub_shmat) || defined (__stub___shmat)
5482 choke me
5483 #else
5484 shmat();
5485 #endif
5486
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_func_shmat=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_func_shmat=no"
5497 fi
5498 rm -f conftest*
5499
5500 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5501   echo "$ac_t""yes" 1>&6
5502   :
5503 else
5504   echo "$ac_t""no" 1>&6
5505 fi
5506
5507     if test $ac_cv_func_shmat = no; then
5508       
5509 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5510 echo "configure:5511: checking for shmat in -lipc" >&5
5511 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5512
5513 xe_check_libs=" -lipc "
5514 cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char shmat();
5521
5522 int main() {
5523 shmat()
5524 ; return 0; }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5527   rm -rf conftest*
5528   eval "ac_cv_lib_$ac_lib_var=yes"
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -rf conftest*
5533   eval "ac_cv_lib_$ac_lib_var=no"
5534 fi
5535 rm -f conftest*
5536 xe_check_libs=""
5537
5538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5539   echo "$ac_t""yes" 1>&6
5540   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5541 else
5542   echo "$ac_t""no" 1>&6
5543 fi
5544
5545
5546     fi
5547   fi
5548
5549   # Check for libraries that X11R6 Xt/Xaw programs need.
5550   ac_save_LDFLAGS="$LDFLAGS"
5551   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5552   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5553   # check for ICE first), but we must link in the order -lSM -lICE or
5554   # we get undefined symbols.  So assume we have SM if we have ICE.
5555   # These have to be linked with before -lX11, unlike the other
5556   # libraries we check for below, so use a different variable.
5557   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5558   
5559 xe_msg_checking="for IceConnectionNumber in -lICE"
5560 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5561 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5562 echo "configure:5563: checking "$xe_msg_checking"" >&5
5563 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5564
5565 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5566 cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569 /* Override any gcc2 internal prototype to avoid an error.  */
5570 /* We use char because int might match the return type of a gcc2
5571     builtin and then its argument prototype would still apply.  */
5572 char IceConnectionNumber();
5573
5574 int main() {
5575 IceConnectionNumber()
5576 ; return 0; }
5577 EOF
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5579   rm -rf conftest*
5580   eval "ac_cv_lib_$ac_lib_var=yes"
5581 else
5582   echo "configure: failed program was:" >&5
5583   cat conftest.$ac_ext >&5
5584   rm -rf conftest*
5585   eval "ac_cv_lib_$ac_lib_var=no"
5586 fi
5587 rm -f conftest*
5588 xe_check_libs=""
5589
5590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5591   echo "$ac_t""yes" 1>&6
5592   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5593 else
5594   echo "$ac_t""no" 1>&6
5595 fi
5596
5597
5598   LDFLAGS="$ac_save_LDFLAGS"
5599
5600 fi
5601  # Autoconf claims to find X library and include dirs for us.
5602   if test "$no_x" = "yes"
5603   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5604   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5605   fi
5606 fi
5607
5608 case "$with_x11" in
5609   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5610   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5611 esac
5612
5613 if test "$with_x11" = "yes"; then
5614   { test "$extra_verbose" = "yes" && cat << \EOF
5615     Defining HAVE_X_WINDOWS
5616 EOF
5617 cat >> confdefs.h <<\EOF
5618 #define HAVE_X_WINDOWS 1
5619 EOF
5620 }
5621
5622   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5623   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5624
5625       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5626     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5627     if test -d "$lib_dir" -a -d "$inc_dir"; then
5628       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5629         x_libraries="$lib_dir $x_libraries"
5630         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5631       esac
5632       case "$x_includes" in "$inc_dir"* ) ;; *)
5633         x_includes="$inc_dir $x_includes"
5634         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5635       esac
5636       break;       fi
5637   done
5638
5639     for rel in "X11R6" "X11R5" "X11R4"; do
5640     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5641     if test -d "$lib_dir" -a -d "$inc_dir"; then
5642       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5643         x_libraries="$x_libraries $lib_dir"
5644         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5645       esac
5646       case "$x_includes" in "$inc_dir"* ) ;; *)
5647         x_includes="$x_includes $inc_dir"
5648         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5649       esac
5650       break;     fi
5651   done
5652
5653     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
5654
5655   ld_switch_x_site="$X_LIBS"
5656
5657   
5658 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5659     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5660   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5661   
5662         runpath="" runpath_dirs=""
5663   if test -n "$LD_RUN_PATH"; then
5664     runpath="$LD_RUN_PATH"
5665   elif test "$GCC" = "yes"; then
5666         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5667     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5668     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5669     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5670       case "$arg" in P,* | -L* | -R* )
5671         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5672           {
5673 xe_runpath_dir="$dir"
5674   test "$xe_runpath_dir" != "/lib"     -a \
5675         "$xe_runpath_dir" != "/usr/lib" -a \
5676         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5677   eval "$xe_add_unique_runpath_dir"
5678 }
5679         done ;;
5680       esac
5681     done
5682     ld_switch_run="$ld_switch_run_save"
5683     rm -f conftest*
5684   else
5685         for arg in $ld_switch_site $ld_switch_x_site; do
5686       case "$arg" in -L*) {
5687 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5688   test "$xe_runpath_dir" != "/lib"     -a \
5689         "$xe_runpath_dir" != "/usr/lib" -a \
5690         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5691   eval "$xe_add_unique_runpath_dir"
5692 };; esac
5693     done
5694         if test "$opsys $need_motif" = "sol2 yes"; then
5695       xe_runpath_dir="/opt/SUNWdt/lib";
5696       eval "$xe_add_unique_runpath_dir";
5697     fi
5698   fi 
5699   if test -n "$runpath"; then
5700     ld_switch_run="${dash_r}${runpath}"
5701     
5702 if test "$GCC" = "yes"; then
5703   set x $ld_switch_run; shift; ld_switch_run=""
5704   while test -n "$1"; do
5705     case $1 in
5706       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5707       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5708       -Xlinker* ) ;;
5709       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5710     esac
5711     shift
5712   done
5713 fi
5714     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5715   fi
5716 fi
5717
5718
5719   if test "$extra_verbose" = "yes"; then
5720     echo; echo "X11 compilation variables:"
5721     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5722     echo
5723   fi
5724
5725             bitmapdirs=
5726   if test "$x_includes" != NONE; then
5727     for i in $x_includes; do
5728       if test -d "$i/bitmaps"; then
5729         bitmapdirs="$i/bitmaps:$bitmapdirs"
5730       fi
5731       if test -d "$i/X11/bitmaps"; then
5732         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5733       fi
5734     done
5735     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5736   fi
5737   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5738     Defining BITMAPDIR = "$bitmapdirs"
5739 EOF
5740 cat >> confdefs.h <<EOF
5741 #define BITMAPDIR "$bitmapdirs"
5742 EOF
5743 }
5744
5745
5746     echo "checking for X defines extracted by xmkmf" 1>&6
5747 echo "configure:5748: checking for X defines extracted by xmkmf" >&5
5748   rm -fr conftestdir
5749   if mkdir conftestdir; then
5750     cd conftestdir
5751     cat > Imakefile <<'EOF'
5752 xetest:
5753         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5754 EOF
5755     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5756       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5757       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5758     fi
5759     cd ..
5760     rm -fr conftestdir
5761     for word in $xmkmf_defines; do
5762       case "$word" in
5763         -D*=* ) ;;
5764         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5765               { test "$extra_verbose" = "yes" && cat << EOF
5766     Defining $word
5767 EOF
5768 cat >> confdefs.h <<EOF
5769 #define $word 1
5770 EOF
5771 }
5772  ;;
5773       esac
5774     done
5775   fi
5776
5777     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5778 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5779 echo "configure:5780: checking for X11/Intrinsic.h" >&5
5780
5781 cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 #include <X11/Intrinsic.h>
5785 EOF
5786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5787 { (eval echo configure:5788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5789 if test -z "$ac_err"; then
5790   rm -rf conftest*
5791   eval "ac_cv_header_$ac_safe=yes"
5792 else
5793   echo "$ac_err" >&5
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   eval "ac_cv_header_$ac_safe=no"
5798 fi
5799 rm -f conftest*
5800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5801   echo "$ac_t""yes" 1>&6
5802   :
5803 else
5804   echo "$ac_t""no" 1>&6
5805 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5806 fi
5807
5808
5809       
5810 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5811 echo "configure:5812: checking for XOpenDisplay in -lX11" >&5
5812 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5813
5814 xe_check_libs=" -lX11 "
5815 cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818 /* Override any gcc2 internal prototype to avoid an error.  */
5819 /* We use char because int might match the return type of a gcc2
5820     builtin and then its argument prototype would still apply.  */
5821 char XOpenDisplay();
5822
5823 int main() {
5824 XOpenDisplay()
5825 ; return 0; }
5826 EOF
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5828   rm -rf conftest*
5829   eval "ac_cv_lib_$ac_lib_var=yes"
5830 else
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   eval "ac_cv_lib_$ac_lib_var=no"
5835 fi
5836 rm -f conftest*
5837 xe_check_libs=""
5838
5839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5840   echo "$ac_t""yes" 1>&6
5841   have_lib_x11=yes
5842 else
5843   echo "$ac_t""no" 1>&6
5844 fi
5845
5846
5847   if test "$have_lib_x11" != "yes"; then
5848     
5849 xe_msg_checking="for XGetFontProperty in -lX11"
5850 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5851 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5852 echo "configure:5853: checking "$xe_msg_checking"" >&5
5853 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5854
5855 xe_check_libs=" -lX11 -b i486-linuxaout"
5856 cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 /* Override any gcc2 internal prototype to avoid an error.  */
5860 /* We use char because int might match the return type of a gcc2
5861     builtin and then its argument prototype would still apply.  */
5862 char XGetFontProperty();
5863
5864 int main() {
5865 XGetFontProperty()
5866 ; return 0; }
5867 EOF
5868 if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5869   rm -rf conftest*
5870   eval "ac_cv_lib_$ac_lib_var=yes"
5871 else
5872   echo "configure: failed program was:" >&5
5873   cat conftest.$ac_ext >&5
5874   rm -rf conftest*
5875   eval "ac_cv_lib_$ac_lib_var=no"
5876 fi
5877 rm -f conftest*
5878 xe_check_libs=""
5879
5880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5881   echo "$ac_t""yes" 1>&6
5882   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5883 else
5884   echo "$ac_t""no" 1>&6
5885 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5886 fi
5887
5888
5889   fi
5890   libs_x="-lX11"
5891   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5892
5893     
5894 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5895 echo "configure:5896: checking for XShapeSelectInput in -lXext" >&5
5896 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5897
5898 xe_check_libs=" -lXext "
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char XShapeSelectInput();
5906
5907 int main() {
5908 XShapeSelectInput()
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=no"
5919 fi
5920 rm -f conftest*
5921 xe_check_libs=""
5922
5923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5924   echo "$ac_t""yes" 1>&6
5925   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5926 else
5927   echo "$ac_t""no" 1>&6
5928 fi
5929
5930
5931
5932     
5933 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5934 echo "configure:5935: checking for XtOpenDisplay in -lXt" >&5
5935 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5936
5937 xe_check_libs=" -lXt "
5938 cat > conftest.$ac_ext <<EOF
5939 #line 5940 "configure"
5940 #include "confdefs.h"
5941 /* Override any gcc2 internal prototype to avoid an error.  */
5942 /* We use char because int might match the return type of a gcc2
5943     builtin and then its argument prototype would still apply.  */
5944 char XtOpenDisplay();
5945
5946 int main() {
5947 XtOpenDisplay()
5948 ; return 0; }
5949 EOF
5950 if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5951   rm -rf conftest*
5952   eval "ac_cv_lib_$ac_lib_var=yes"
5953 else
5954   echo "configure: failed program was:" >&5
5955   cat conftest.$ac_ext >&5
5956   rm -rf conftest*
5957   eval "ac_cv_lib_$ac_lib_var=no"
5958 fi
5959 rm -f conftest*
5960 xe_check_libs=""
5961
5962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5963   echo "$ac_t""yes" 1>&6
5964   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5965 else
5966   echo "$ac_t""no" 1>&6
5967 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5968 fi
5969
5970
5971
5972   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5973 echo "configure:5974: checking the version of X11 being used" >&5
5974   cat > conftest.$ac_ext <<EOF
5975 #line 5976 "configure"
5976 #include "confdefs.h"
5977 #include <X11/Intrinsic.h>
5978     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5979 EOF
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5981 then
5982   ./conftest foobar; x11_release=$?
5983 else
5984   conftest_rc="$?"
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -fr conftest*
5988   x11_release=4
5989 fi
5990 rm -fr conftest*
5991   echo "$ac_t""R${x11_release}" 1>&6
5992   { test "$extra_verbose" = "yes" && cat << EOF
5993     Defining THIS_IS_X11R${x11_release}
5994 EOF
5995 cat >> confdefs.h <<EOF
5996 #define THIS_IS_X11R${x11_release} 1
5997 EOF
5998 }
5999
6000
6001   for ac_hdr in X11/Xlocale.h
6002 do
6003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6005 echo "configure:6006: checking for $ac_hdr" >&5
6006
6007 cat > conftest.$ac_ext <<EOF
6008 #line 6009 "configure"
6009 #include "confdefs.h"
6010 #include <$ac_hdr>
6011 EOF
6012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6013 { (eval echo configure:6014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6015 if test -z "$ac_err"; then
6016   rm -rf conftest*
6017   eval "ac_cv_header_$ac_safe=yes"
6018 else
6019   echo "$ac_err" >&5
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_header_$ac_safe=no"
6024 fi
6025 rm -f conftest*
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029   { test "$extra_verbose" = "yes" && cat << EOF
6030     Defining $ac_tr_hdr
6031 EOF
6032 cat >> confdefs.h <<EOF
6033 #define $ac_tr_hdr 1
6034 EOF
6035 }
6036  
6037 else
6038   echo "$ac_t""no" 1>&6
6039 fi
6040 done
6041
6042
6043     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6044 echo "configure:6045: checking for XFree86" >&5
6045   if test -d "/usr/X386/include" -o \
6046           -f "/etc/XF86Config"    -o \
6047           -f "/etc/X11/XF86Config" -o \
6048           -f "/usr/X11R6/lib/X11/XF86Config"; then
6049     echo "$ac_t""yes" 1>&6
6050     { test "$extra_verbose" = "yes" && cat << \EOF
6051     Defining HAVE_XFREE386
6052 EOF
6053 cat >> confdefs.h <<\EOF
6054 #define HAVE_XFREE386 1
6055 EOF
6056 }
6057
6058   else
6059     echo "$ac_t""no" 1>&6
6060   fi
6061
6062     test -z "$with_xmu" && { 
6063 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6064 echo "configure:6065: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6065 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6066
6067 xe_check_libs=" -lXmu "
6068 cat > conftest.$ac_ext <<EOF
6069 #line 6070 "configure"
6070 #include "confdefs.h"
6071 /* Override any gcc2 internal prototype to avoid an error.  */
6072 /* We use char because int might match the return type of a gcc2
6073     builtin and then its argument prototype would still apply.  */
6074 char XmuReadBitmapDataFromFile();
6075
6076 int main() {
6077 XmuReadBitmapDataFromFile()
6078 ; return 0; }
6079 EOF
6080 if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6081   rm -rf conftest*
6082   eval "ac_cv_lib_$ac_lib_var=yes"
6083 else
6084   echo "configure: failed program was:" >&5
6085   cat conftest.$ac_ext >&5
6086   rm -rf conftest*
6087   eval "ac_cv_lib_$ac_lib_var=no"
6088 fi
6089 rm -f conftest*
6090 xe_check_libs=""
6091
6092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6093   echo "$ac_t""yes" 1>&6
6094   with_xmu=yes
6095 else
6096   echo "$ac_t""no" 1>&6
6097 with_xmu=no
6098 fi
6099
6100  }
6101   if test "$with_xmu" = "no"; then
6102     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6103    echo "    xemacs will be linked with \"xmu.o\""
6104  fi
6105   else
6106     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6107     { test "$extra_verbose" = "yes" && cat << \EOF
6108     Defining HAVE_XMU
6109 EOF
6110 cat >> confdefs.h <<\EOF
6111 #define HAVE_XMU 1
6112 EOF
6113 }
6114
6115   fi
6116
6117       
6118 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6119 echo "configure:6120: checking for main in -lXbsd" >&5
6120 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6121
6122 xe_check_libs=" -lXbsd "
6123 cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126
6127 int main() {
6128 main()
6129 ; return 0; }
6130 EOF
6131 if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6132   rm -rf conftest*
6133   eval "ac_cv_lib_$ac_lib_var=yes"
6134 else
6135   echo "configure: failed program was:" >&5
6136   cat conftest.$ac_ext >&5
6137   rm -rf conftest*
6138   eval "ac_cv_lib_$ac_lib_var=no"
6139 fi
6140 rm -f conftest*
6141 xe_check_libs=""
6142
6143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6144   echo "$ac_t""yes" 1>&6
6145   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6146 else
6147   echo "$ac_t""no" 1>&6
6148 fi
6149
6150
6151
6152     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6153         if test "$GCC" = "yes"; then
6154       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6155       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6156     else
6157       case "$CC" in
6158         "xlc" ) CC="xlc_r" ;;
6159         "xlC" ) CC="xlC_r" ;;
6160         "cc"  ) CC="cc_r" ;;
6161       esac
6162     fi
6163   fi
6164
6165 fi 
6166 if test "$with_msw" != "no"; then
6167   echo "checking for MS-Windows" 1>&6
6168 echo "configure:6169: checking for MS-Windows" >&5
6169   
6170 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6171 echo "configure:6172: checking for main in -lgdi32" >&5
6172 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6173
6174 xe_check_libs=" -lgdi32 "
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178
6179 int main() {
6180 main()
6181 ; return 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=yes"
6186 else
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   eval "ac_cv_lib_$ac_lib_var=no"
6191 fi
6192 rm -f conftest*
6193 xe_check_libs=""
6194
6195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6196   echo "$ac_t""yes" 1>&6
6197   with_msw=yes
6198 else
6199   echo "$ac_t""no" 1>&6
6200 fi
6201
6202
6203   if test "$with_msw" = "yes"; then
6204     { test "$extra_verbose" = "yes" && cat << \EOF
6205     Defining HAVE_MS_WINDOWS
6206 EOF
6207 cat >> confdefs.h <<\EOF
6208 #define HAVE_MS_WINDOWS 1
6209 EOF
6210 }
6211
6212     install_pp="$blddir/lib-src/installexe.sh"
6213     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6214     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6215     if test "$window_system" != x11; then
6216         window_system=msw
6217         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6218             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6219    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6220  fi
6221         test "$with_menubars"   != "no" && with_menubars=msw \
6222             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6223    echo "    xemacs will be linked with \"menubar-msw.o\""
6224  fi
6225         test "$with_toolbars"   != "no" && with_toolbars=msw \
6226             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6227    echo "    xemacs will be linked with \"toolbar-msw.o\""
6228  fi
6229         test "$with_dialogs"   != "no" && with_dialogs=msw \
6230             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6231    echo "    xemacs will be linked with \"dialog-msw.o\""
6232  fi
6233         test "$with_widgets"   != "no" && with_widgets=msw
6234     else
6235         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6236    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6237  fi
6238         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6239    echo "    xemacs will be linked with \"menubar-msw.o\""
6240  fi
6241         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6242    echo "    xemacs will be linked with \"toolbar-msw.o\""
6243  fi
6244         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6245    echo "    xemacs will be linked with \"dialog-msw.o\""
6246  fi
6247     fi
6248         cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251 #include <fcntl.h>
6252     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6253 EOF
6254 if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6255 then
6256   { test "$extra_verbose" = "yes" && cat << \EOF
6257     Defining HAVE_MSG_SELECT
6258 EOF
6259 cat >> confdefs.h <<\EOF
6260 #define HAVE_MSG_SELECT 1
6261 EOF
6262 }
6263
6264 else
6265   conftest_rc="$?"
6266   echo "configure: failed program was:" >&5
6267   cat conftest.$ac_ext >&5
6268 fi
6269 rm -fr conftest*
6270     const_is_losing=no
6271     with_file_coding=yes
6272     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
6273    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\""
6274  fi
6275   fi
6276 fi
6277
6278
6279
6280 test -z "$window_system" && window_system="none"
6281
6282 if test "$window_system" = "none"; then
6283   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6284   do
6285     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6286        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6287     fi
6288     eval "with_${feature}=no"
6289   done
6290 else
6291   test -z "$with_toolbars" && with_toolbars=yes
6292 fi
6293
6294 if test "$with_msw" != "yes"; then
6295   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6296   do
6297     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6298        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6299     fi
6300     eval "with_${feature}=no"
6301   done
6302 else
6303   :
6304 fi
6305
6306 if test "$with_x11" != "yes"; then
6307             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6308   do
6309     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6310        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6311     fi
6312     eval "with_${feature}=no"
6313   done
6314 fi
6315
6316 bitmapdir=
6317
6318 case "$window_system" in
6319   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6320   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6321   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6322 esac
6323
6324 case "$x_libraries" in *X11R4* )
6325   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6326   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6327 esac
6328
6329 echo "checking for WM_COMMAND option" 1>&6
6330 echo "configure:6331: checking for WM_COMMAND option" >&5;
6331 if test "$with_wmcommand" != "no"; then
6332   { test "$extra_verbose" = "yes" && cat << \EOF
6333     Defining HAVE_WMCOMMAND
6334 EOF
6335 cat >> confdefs.h <<\EOF
6336 #define HAVE_WMCOMMAND 1
6337 EOF
6338 }
6339
6340 fi
6341
6342 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6343 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6344 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6345 echo "configure:6346: checking for X11/Xauth.h" >&5
6346
6347 cat > conftest.$ac_ext <<EOF
6348 #line 6349 "configure"
6349 #include "confdefs.h"
6350 #include <X11/Xauth.h>
6351 EOF
6352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6353 { (eval echo configure:6354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6355 if test -z "$ac_err"; then
6356   rm -rf conftest*
6357   eval "ac_cv_header_$ac_safe=yes"
6358 else
6359   echo "$ac_err" >&5
6360   echo "configure: failed program was:" >&5
6361   cat conftest.$ac_ext >&5
6362   rm -rf conftest*
6363   eval "ac_cv_header_$ac_safe=no"
6364 fi
6365 rm -f conftest*
6366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6367   echo "$ac_t""yes" 1>&6
6368   :
6369 else
6370   echo "$ac_t""no" 1>&6
6371 with_xauth=no
6372 fi
6373  }
6374 test -z "$with_xauth" && { 
6375 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6376 echo "configure:6377: checking for XauGetAuthByAddr in -lXau" >&5
6377 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6378
6379 xe_check_libs=" -lXau "
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 /* Override any gcc2 internal prototype to avoid an error.  */
6384 /* We use char because int might match the return type of a gcc2
6385     builtin and then its argument prototype would still apply.  */
6386 char XauGetAuthByAddr();
6387
6388 int main() {
6389 XauGetAuthByAddr()
6390 ; return 0; }
6391 EOF
6392 if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6393   rm -rf conftest*
6394   eval "ac_cv_lib_$ac_lib_var=yes"
6395 else
6396   echo "configure: failed program was:" >&5
6397   cat conftest.$ac_ext >&5
6398   rm -rf conftest*
6399   eval "ac_cv_lib_$ac_lib_var=no"
6400 fi
6401 rm -f conftest*
6402 xe_check_libs=""
6403
6404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6405   echo "$ac_t""yes" 1>&6
6406   :
6407 else
6408   echo "$ac_t""no" 1>&6
6409 with_xauth=no
6410 fi
6411
6412  }
6413 test -z "$with_xauth" && with_xauth=yes
6414 if test "$with_xauth" = "yes"; then
6415   { test "$extra_verbose" = "yes" && cat << \EOF
6416     Defining HAVE_XAUTH
6417 EOF
6418 cat >> confdefs.h <<\EOF
6419 #define HAVE_XAUTH 1
6420 EOF
6421 }
6422
6423   
6424 T=""
6425 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
6426 libs_xauth="$T"
6427
6428 fi
6429
6430
6431
6432
6433 if test "$with_tooltalk" != "no" ; then
6434       for dir in "" "Tt/" "desktop/" ; do
6435     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6436 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6437 echo "configure:6438: checking for ${dir}tt_c.h" >&5
6438
6439 cat > conftest.$ac_ext <<EOF
6440 #line 6441 "configure"
6441 #include "confdefs.h"
6442 #include <${dir}tt_c.h>
6443 EOF
6444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6445 { (eval echo configure:6446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6447 if test -z "$ac_err"; then
6448   rm -rf conftest*
6449   eval "ac_cv_header_$ac_safe=yes"
6450 else
6451   echo "$ac_err" >&5
6452   echo "configure: failed program was:" >&5
6453   cat conftest.$ac_ext >&5
6454   rm -rf conftest*
6455   eval "ac_cv_header_$ac_safe=no"
6456 fi
6457 rm -f conftest*
6458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6459   echo "$ac_t""yes" 1>&6
6460   tt_c_h_path="${dir}tt_c.h"; break
6461 else
6462   echo "$ac_t""no" 1>&6
6463 fi
6464
6465   done
6466   if test -z "$tt_c_h_path"; then
6467     if test "$with_tooltalk" = "yes"; then
6468       (echo "$progname: Usage error:"
6469 echo " " "Unable to find required tooltalk header files."
6470 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6471     fi
6472     with_tooltalk=no
6473   fi
6474 fi
6475 if test "$with_tooltalk" != "no" ; then
6476   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6477     
6478 xe_msg_checking="for tt_message_create in -ltt"
6479 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6480 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6481 echo "configure:6482: checking "$xe_msg_checking"" >&5
6482 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6483
6484 xe_check_libs=" -ltt $extra_libs"
6485 cat > conftest.$ac_ext <<EOF
6486 #line 6487 "configure"
6487 #include "confdefs.h"
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char tt_message_create();
6492
6493 int main() {
6494 tt_message_create()
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498   rm -rf conftest*
6499   eval "ac_cv_lib_$ac_lib_var=yes"
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   eval "ac_cv_lib_$ac_lib_var=no"
6505 fi
6506 rm -f conftest*
6507 xe_check_libs=""
6508
6509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6510   echo "$ac_t""yes" 1>&6
6511   tt_libs="-ltt $extra_libs"; break
6512 else
6513   echo "$ac_t""no" 1>&6
6514 :
6515 fi
6516
6517
6518   done
6519   if test -z "$tt_libs"; then
6520     if test "$with_tooltalk" = "yes"; then
6521       (echo "$progname: Usage error:"
6522 echo " " "Unable to find required tooltalk libraries."
6523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6524     fi
6525     with_tooltalk=no
6526   fi
6527 fi
6528 test -z "$with_tooltalk" && with_tooltalk=yes
6529 if test "$with_tooltalk" = "yes"; then
6530   { test "$extra_verbose" = "yes" && cat << \EOF
6531     Defining TOOLTALK
6532 EOF
6533 cat >> confdefs.h <<\EOF
6534 #define TOOLTALK 1
6535 EOF
6536 }
6537
6538   { test "$extra_verbose" = "yes" && cat << EOF
6539     Defining TT_C_H_PATH = "$tt_c_h_path"
6540 EOF
6541 cat >> confdefs.h <<EOF
6542 #define TT_C_H_PATH "$tt_c_h_path"
6543 EOF
6544 }
6545
6546   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6547   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6548    echo "    xemacs will be linked with \"tooltalk.o\""
6549  fi
6550 fi
6551
6552 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6553 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6554 echo "configure:6555: checking for Dt/Dt.h" >&5
6555
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 #include <Dt/Dt.h>
6560 EOF
6561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6562 { (eval echo configure:6563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6564 if test -z "$ac_err"; then
6565   rm -rf conftest*
6566   eval "ac_cv_header_$ac_safe=yes"
6567 else
6568   echo "$ac_err" >&5
6569   echo "configure: failed program was:" >&5
6570   cat conftest.$ac_ext >&5
6571   rm -rf conftest*
6572   eval "ac_cv_header_$ac_safe=no"
6573 fi
6574 rm -f conftest*
6575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6576   echo "$ac_t""yes" 1>&6
6577   :
6578 else
6579   echo "$ac_t""no" 1>&6
6580 with_cde=no
6581 fi
6582  }
6583 test -z "$with_cde" && { 
6584 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6585 echo "configure:6586: checking for DtDndDragStart in -lDtSvc" >&5
6586 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6587
6588 xe_check_libs=" -lDtSvc "
6589 cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 /* Override any gcc2 internal prototype to avoid an error.  */
6593 /* We use char because int might match the return type of a gcc2
6594     builtin and then its argument prototype would still apply.  */
6595 char DtDndDragStart();
6596
6597 int main() {
6598 DtDndDragStart()
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=yes"
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   eval "ac_cv_lib_$ac_lib_var=no"
6609 fi
6610 rm -f conftest*
6611 xe_check_libs=""
6612
6613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6614   echo "$ac_t""yes" 1>&6
6615   :
6616 else
6617   echo "$ac_t""no" 1>&6
6618 with_cde=no
6619 fi
6620
6621  }
6622 test -z "$with_cde" && with_cde=yes
6623 if test "$with_dragndrop" = no; then
6624   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6625   with_cde=no
6626 fi
6627 if test "$with_cde" = "yes" ; then
6628   { test "$extra_verbose" = "yes" && cat << \EOF
6629     Defining HAVE_CDE
6630 EOF
6631 cat >> confdefs.h <<\EOF
6632 #define HAVE_CDE 1
6633 EOF
6634 }
6635
6636   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6637   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6638   with_tooltalk=yes # CDE requires Tooltalk
6639   need_motif=yes    # CDE requires Motif
6640 fi
6641
6642 test "$window_system" != "x11" && with_offix=no
6643 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6644   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6645   with_offix=no
6646 fi
6647 if test "$with_dragndrop" = no; then
6648   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6649   with_offix=no
6650 fi
6651 if test "$with_cde" = yes; then
6652   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6653   with_offix=no
6654 fi
6655 test -z "$with_offix" && with_offix=no
6656 if test "$with_offix" = "yes"; then
6657   { test "$extra_verbose" = "yes" && cat << \EOF
6658     Defining HAVE_OFFIX_DND
6659 EOF
6660 cat >> confdefs.h <<\EOF
6661 #define HAVE_OFFIX_DND 1
6662 EOF
6663 }
6664
6665   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6666   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6667 fi
6668
6669 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6670 echo "configure:6671: checking if drag and drop API is needed" >&5
6671 if test "$with_dragndrop" != "no" ; then
6672   if test -n "$dragndrop_proto" ; then
6673     with_dragndrop=yes
6674     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6675     { test "$extra_verbose" = "yes" && cat << \EOF
6676     Defining HAVE_DRAGNDROP
6677 EOF
6678 cat >> confdefs.h <<\EOF
6679 #define HAVE_DRAGNDROP 1
6680 EOF
6681 }
6682
6683     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6684   else
6685     with_dragndrop=no
6686     echo "$ac_t""no" 1>&6
6687   fi
6688 fi
6689
6690 echo "checking for LDAP" 1>&6
6691 echo "configure:6692: checking for LDAP" >&5
6692 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6693 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6694 echo "configure:6695: checking for ldap.h" >&5
6695
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 #include <ldap.h>
6700 EOF
6701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6702 { (eval echo configure:6703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6704 if test -z "$ac_err"; then
6705   rm -rf conftest*
6706   eval "ac_cv_header_$ac_safe=yes"
6707 else
6708   echo "$ac_err" >&5
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_header_$ac_safe=no"
6713 fi
6714 rm -f conftest*
6715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6716   echo "$ac_t""yes" 1>&6
6717   :
6718 else
6719   echo "$ac_t""no" 1>&6
6720 with_ldap=no
6721 fi
6722  }
6723 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6724 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6725 echo "configure:6726: checking for lber.h" >&5
6726
6727 cat > conftest.$ac_ext <<EOF
6728 #line 6729 "configure"
6729 #include "confdefs.h"
6730 #include <lber.h>
6731 EOF
6732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6733 { (eval echo configure:6734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6735 if test -z "$ac_err"; then
6736   rm -rf conftest*
6737   eval "ac_cv_header_$ac_safe=yes"
6738 else
6739   echo "$ac_err" >&5
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_header_$ac_safe=no"
6744 fi
6745 rm -f conftest*
6746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748   :
6749 else
6750   echo "$ac_t""no" 1>&6
6751 with_ldap=no
6752 fi
6753  }
6754 if test "$with_ldap" != "no"; then
6755   
6756 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6757 echo "configure:6758: checking for ldap_search in -lldap" >&5
6758 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6759
6760 xe_check_libs=" -lldap "
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char ldap_search();
6768
6769 int main() {
6770 ldap_search()
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=no"
6781 fi
6782 rm -f conftest*
6783 xe_check_libs=""
6784
6785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6786   echo "$ac_t""yes" 1>&6
6787   with_ldap_nolber=yes
6788 else
6789   echo "$ac_t""no" 1>&6
6790 with_ldap_nolber=no
6791 fi
6792
6793
6794   test "$with_ldap_nolber" = "no" && { 
6795 xe_msg_checking="for ldap_open in -lldap"
6796 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6797 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6798 echo "configure:6799: checking "$xe_msg_checking"" >&5
6799 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6800
6801 xe_check_libs=" -lldap -llber"
6802 cat > conftest.$ac_ext <<EOF
6803 #line 6804 "configure"
6804 #include "confdefs.h"
6805 /* Override any gcc2 internal prototype to avoid an error.  */
6806 /* We use char because int might match the return type of a gcc2
6807     builtin and then its argument prototype would still apply.  */
6808 char ldap_open();
6809
6810 int main() {
6811 ldap_open()
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=yes"
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_lib_$ac_lib_var=no"
6822 fi
6823 rm -f conftest*
6824 xe_check_libs=""
6825
6826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6827   echo "$ac_t""yes" 1>&6
6828   with_ldap_lber=yes
6829 else
6830   echo "$ac_t""no" 1>&6
6831 with_ldap_lber=no
6832 fi
6833
6834  }
6835   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6836 xe_msg_checking="for ldap_open in -lldap"
6837 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6838 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6839 echo "configure:6840: checking "$xe_msg_checking"" >&5
6840 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6841
6842 xe_check_libs=" -lldap -llber -lkrb"
6843 cat > conftest.$ac_ext <<EOF
6844 #line 6845 "configure"
6845 #include "confdefs.h"
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 /* We use char because int might match the return type of a gcc2
6848     builtin and then its argument prototype would still apply.  */
6849 char ldap_open();
6850
6851 int main() {
6852 ldap_open()
6853 ; return 0; }
6854 EOF
6855 if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6856   rm -rf conftest*
6857   eval "ac_cv_lib_$ac_lib_var=yes"
6858 else
6859   echo "configure: failed program was:" >&5
6860   cat conftest.$ac_ext >&5
6861   rm -rf conftest*
6862   eval "ac_cv_lib_$ac_lib_var=no"
6863 fi
6864 rm -f conftest*
6865 xe_check_libs=""
6866
6867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6868   echo "$ac_t""yes" 1>&6
6869   with_ldap_krb=yes
6870 else
6871   echo "$ac_t""no" 1>&6
6872 with_ldap_krb=no
6873 fi
6874
6875  }
6876   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6877 xe_msg_checking="for ldap_open in -lldap"
6878 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6879 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6880 echo "configure:6881: checking "$xe_msg_checking"" >&5
6881 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6882
6883 xe_check_libs=" -lldap -llber -lkrb -ldes"
6884 cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 /* Override any gcc2 internal prototype to avoid an error.  */
6888 /* We use char because int might match the return type of a gcc2
6889     builtin and then its argument prototype would still apply.  */
6890 char ldap_open();
6891
6892 int main() {
6893 ldap_open()
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=yes"
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_lib_$ac_lib_var=no"
6904 fi
6905 rm -f conftest*
6906 xe_check_libs=""
6907
6908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6909   echo "$ac_t""yes" 1>&6
6910   with_ldap_krbdes=yes
6911 else
6912   echo "$ac_t""no" 1>&6
6913 with_ldap_krbdes=no
6914 fi
6915
6916  }
6917   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
6918 fi
6919 if test "$with_ldap" = "yes"; then
6920   { test "$extra_verbose" = "yes" && cat << \EOF
6921     Defining HAVE_LDAP
6922 EOF
6923 cat >> confdefs.h <<\EOF
6924 #define HAVE_LDAP 1
6925 EOF
6926 }
6927
6928   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6929    echo "    xemacs will be linked with \"eldap.o\""
6930  fi
6931   if test "$with_ldap_nolber" = "yes" ; then
6932     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6933   else
6934     if test "$with_ldap_krb" = "yes" ; then
6935       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6936     fi
6937     if test "$with_ldap_krbdes" = "yes" ; then
6938       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6939       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6940     fi
6941     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6942     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6943   fi
6944   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6945 do
6946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6947 echo "configure:6948: checking for $ac_func" >&5
6948
6949 cat > conftest.$ac_ext <<EOF
6950 #line 6951 "configure"
6951 #include "confdefs.h"
6952 /* System header to define __stub macros and hopefully few prototypes,
6953     which can conflict with char $ac_func(); below.  */
6954 #include <assert.h>
6955 /* Override any gcc2 internal prototype to avoid an error.  */
6956 /* We use char because int might match the return type of a gcc2
6957     builtin and then its argument prototype would still apply.  */
6958 char $ac_func();
6959
6960 int main() {
6961
6962 /* The GNU C library defines this for functions which it implements
6963     to always fail with ENOSYS.  Some functions are actually named
6964     something starting with __ and the normal name is an alias.  */
6965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6966 choke me
6967 #else
6968 $ac_func();
6969 #endif
6970
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_func_$ac_func=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_func_$ac_func=no"
6981 fi
6982 rm -f conftest*
6983
6984 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6985   echo "$ac_t""yes" 1>&6
6986     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6987   { test "$extra_verbose" = "yes" && cat << EOF
6988     Defining $ac_tr_func
6989 EOF
6990 cat >> confdefs.h <<EOF
6991 #define $ac_tr_func 1
6992 EOF
6993 }
6994  
6995 else
6996   echo "$ac_t""no" 1>&6
6997 fi
6998 done
6999
7000 fi
7001
7002
7003 if test "$window_system" != "none"; then
7004   echo "checking for graphics libraries" 1>&6
7005 echo "configure:7006: checking for graphics libraries" >&5
7006
7007     xpm_problem=""
7008   if test -z "$with_xpm"; then
7009     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7010 echo "configure:7011: checking for Xpm - no older than 3.4f" >&5
7011     xe_check_libs=-lXpm
7012     cat > conftest.$ac_ext <<EOF
7013 #line 7014 "configure"
7014 #include "confdefs.h"
7015 #include <X11/xpm.h>
7016     int main(int c, char **v) {
7017     return c == 1 ? 0 :
7018       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7019       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7022 then
7023   ./conftest dummy_arg; xpm_status=$?;
7024       if test "$xpm_status" = "0"; then
7025         with_xpm=yes;
7026       else
7027         with_xpm=no;
7028         if test "$xpm_status" = "1"; then
7029           xpm_problem="Xpm library version and header file version don't match!"
7030         elif test "$xpm_status" = "2"; then
7031           xpm_problem="Xpm library version is too old!"
7032         else
7033           xpm_problem="Internal xpm detection logic error!"
7034         fi
7035         echo "
7036 *** WARNING *** $xpm_problem
7037   I'm not touching that with a 10-foot pole!
7038   If you really want to use the installed version of Xpm, rerun
7039   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7040     fi
7041 else
7042   conftest_rc="$?"
7043   echo "configure: failed program was:" >&5
7044   cat conftest.$ac_ext >&5
7045   rm -fr conftest*
7046   with_xpm=no
7047 fi
7048 rm -fr conftest*
7049     xe_check_libs=
7050     echo "$ac_t""$with_xpm" 1>&6
7051   fi
7052   if test "$with_xpm" = "yes"; then
7053     { test "$extra_verbose" = "yes" && cat << \EOF
7054     Defining HAVE_XPM
7055 EOF
7056 cat >> confdefs.h <<\EOF
7057 #define HAVE_XPM 1
7058 EOF
7059 }
7060
7061     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7062     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7063 echo "configure:7064: checking for \"FOR_MSW\" xpm" >&5
7064     xe_check_libs=-lXpm
7065     cat > conftest.$ac_ext <<EOF
7066 #line 7067 "configure"
7067 #include "confdefs.h"
7068
7069 int main() {
7070 XpmCreatePixmapFromData()
7071 ; return 0; }
7072 EOF
7073 if { (eval echo configure:7074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7074   rm -rf conftest*
7075   xpm_for_msw=no
7076 else
7077   echo "configure: failed program was:" >&5
7078   cat conftest.$ac_ext >&5
7079   rm -rf conftest*
7080   xpm_for_msw=yes
7081 fi
7082 rm -f conftest*
7083     xe_check_libs=
7084     echo "$ac_t""$xpm_for_msw" 1>&6
7085     if test "$xpm_for_msw" = "yes"; then
7086       { test "$extra_verbose" = "yes" && cat << \EOF
7087     Defining FOR_MSW
7088 EOF
7089 cat >> confdefs.h <<\EOF
7090 #define FOR_MSW 1
7091 EOF
7092 }
7093
7094     fi
7095   fi
7096
7097     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7098 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7099 echo "configure:7100: checking for compface.h" >&5
7100
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 #include <compface.h>
7105 EOF
7106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7107 { (eval echo configure:7108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7109 if test -z "$ac_err"; then
7110   rm -rf conftest*
7111   eval "ac_cv_header_$ac_safe=yes"
7112 else
7113   echo "$ac_err" >&5
7114   echo "configure: failed program was:" >&5
7115   cat conftest.$ac_ext >&5
7116   rm -rf conftest*
7117   eval "ac_cv_header_$ac_safe=no"
7118 fi
7119 rm -f conftest*
7120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7121   echo "$ac_t""yes" 1>&6
7122   :
7123 else
7124   echo "$ac_t""no" 1>&6
7125 with_xface=no
7126 fi
7127  }
7128   test -z "$with_xface" && { 
7129 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7130 echo "configure:7131: checking for UnGenFace in -lcompface" >&5
7131 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7132
7133 xe_check_libs=" -lcompface "
7134 cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char UnGenFace();
7141
7142 int main() {
7143 UnGenFace()
7144 ; return 0; }
7145 EOF
7146 if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7147   rm -rf conftest*
7148   eval "ac_cv_lib_$ac_lib_var=yes"
7149 else
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -rf conftest*
7153   eval "ac_cv_lib_$ac_lib_var=no"
7154 fi
7155 rm -f conftest*
7156 xe_check_libs=""
7157
7158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7159   echo "$ac_t""yes" 1>&6
7160   : 
7161 else
7162   echo "$ac_t""no" 1>&6
7163 with_xface=no
7164 fi
7165
7166  }
7167   test -z "$with_xface" && with_xface=yes
7168   if test "$with_xface" = "yes"; then
7169     { test "$extra_verbose" = "yes" && cat << \EOF
7170     Defining HAVE_XFACE
7171 EOF
7172 cat >> confdefs.h <<\EOF
7173 #define HAVE_XFACE 1
7174 EOF
7175 }
7176
7177     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7178   fi
7179
7180         if test "$with_gif" != "no"; then
7181     with_gif="yes"
7182     { test "$extra_verbose" = "yes" && cat << \EOF
7183     Defining HAVE_GIF
7184 EOF
7185 cat >> confdefs.h <<\EOF
7186 #define HAVE_GIF 1
7187 EOF
7188 }
7189
7190     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7191    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7192  fi
7193   fi
7194
7195       if test "$with_png $with_tiff" != "no no"; then
7196     
7197 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7198 echo "configure:7199: checking for inflate in -lc" >&5
7199 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7200
7201 xe_check_libs=" -lc "
7202 cat > conftest.$ac_ext <<EOF
7203 #line 7204 "configure"
7204 #include "confdefs.h"
7205 /* Override any gcc2 internal prototype to avoid an error.  */
7206 /* We use char because int might match the return type of a gcc2
7207     builtin and then its argument prototype would still apply.  */
7208 char inflate();
7209
7210 int main() {
7211 inflate()
7212 ; return 0; }
7213 EOF
7214 if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7215   rm -rf conftest*
7216   eval "ac_cv_lib_$ac_lib_var=yes"
7217 else
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221   eval "ac_cv_lib_$ac_lib_var=no"
7222 fi
7223 rm -f conftest*
7224 xe_check_libs=""
7225
7226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7227   echo "$ac_t""yes" 1>&6
7228   :
7229 else
7230   echo "$ac_t""no" 1>&6
7231
7232 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7233 echo "configure:7234: checking for inflate in -lz" >&5
7234 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7235
7236 xe_check_libs=" -lz "
7237 cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* Override any gcc2 internal prototype to avoid an error.  */
7241 /* We use char because int might match the return type of a gcc2
7242     builtin and then its argument prototype would still apply.  */
7243 char inflate();
7244
7245 int main() {
7246 inflate()
7247 ; return 0; }
7248 EOF
7249 if { (eval echo configure:7250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7250   rm -rf conftest*
7251   eval "ac_cv_lib_$ac_lib_var=yes"
7252 else
7253   echo "configure: failed program was:" >&5
7254   cat conftest.$ac_ext >&5
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=no"
7257 fi
7258 rm -f conftest*
7259 xe_check_libs=""
7260
7261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7262   echo "$ac_t""yes" 1>&6
7263   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7264 else
7265   echo "$ac_t""no" 1>&6
7266
7267 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7268 echo "configure:7269: checking for inflate in -lgz" >&5
7269 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7270
7271 xe_check_libs=" -lgz "
7272 cat > conftest.$ac_ext <<EOF
7273 #line 7274 "configure"
7274 #include "confdefs.h"
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 /* We use char because int might match the return type of a gcc2
7277     builtin and then its argument prototype would still apply.  */
7278 char inflate();
7279
7280 int main() {
7281 inflate()
7282 ; return 0; }
7283 EOF
7284 if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7285   rm -rf conftest*
7286   eval "ac_cv_lib_$ac_lib_var=yes"
7287 else
7288   echo "configure: failed program was:" >&5
7289   cat conftest.$ac_ext >&5
7290   rm -rf conftest*
7291   eval "ac_cv_lib_$ac_lib_var=no"
7292 fi
7293 rm -f conftest*
7294 xe_check_libs=""
7295
7296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7297   echo "$ac_t""yes" 1>&6
7298   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7299 else
7300   echo "$ac_t""no" 1>&6
7301 fi
7302
7303
7304 fi
7305
7306
7307 fi
7308
7309
7310   fi
7311
7312     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7313 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7314 echo "configure:7315: checking for jpeglib.h" >&5
7315
7316 cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 #include <jpeglib.h>
7320 EOF
7321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7322 { (eval echo configure:7323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7324 if test -z "$ac_err"; then
7325   rm -rf conftest*
7326   eval "ac_cv_header_$ac_safe=yes"
7327 else
7328   echo "$ac_err" >&5
7329   echo "configure: failed program was:" >&5
7330   cat conftest.$ac_ext >&5
7331   rm -rf conftest*
7332   eval "ac_cv_header_$ac_safe=no"
7333 fi
7334 rm -f conftest*
7335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337   :
7338 else
7339   echo "$ac_t""no" 1>&6
7340 with_jpeg=no
7341 fi
7342  }
7343   test -z "$with_jpeg" && { 
7344 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7345 echo "configure:7346: checking for jpeg_destroy_decompress in -ljpeg" >&5
7346 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7347
7348 xe_check_libs=" -ljpeg "
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 /* Override any gcc2 internal prototype to avoid an error.  */
7353 /* We use char because int might match the return type of a gcc2
7354     builtin and then its argument prototype would still apply.  */
7355 char jpeg_destroy_decompress();
7356
7357 int main() {
7358 jpeg_destroy_decompress()
7359 ; return 0; }
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7362   rm -rf conftest*
7363   eval "ac_cv_lib_$ac_lib_var=yes"
7364 else
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_lib_$ac_lib_var=no"
7369 fi
7370 rm -f conftest*
7371 xe_check_libs=""
7372
7373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7374   echo "$ac_t""yes" 1>&6
7375   :
7376 else
7377   echo "$ac_t""no" 1>&6
7378 with_jpeg=no
7379 fi
7380
7381  }
7382   test -z "$with_jpeg" && with_jpeg=yes
7383   if test "$with_jpeg" = "yes"; then
7384     { test "$extra_verbose" = "yes" && cat << \EOF
7385     Defining HAVE_JPEG
7386 EOF
7387 cat >> confdefs.h <<\EOF
7388 #define HAVE_JPEG 1
7389 EOF
7390 }
7391
7392     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7393   fi
7394
7395     png_problem=""
7396   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7397 echo "configure:7398: checking for pow" >&5
7398
7399 cat > conftest.$ac_ext <<EOF
7400 #line 7401 "configure"
7401 #include "confdefs.h"
7402 /* System header to define __stub macros and hopefully few prototypes,
7403     which can conflict with char pow(); below.  */
7404 #include <assert.h>
7405 /* Override any gcc2 internal prototype to avoid an error.  */
7406 /* We use char because int might match the return type of a gcc2
7407     builtin and then its argument prototype would still apply.  */
7408 char pow();
7409
7410 int main() {
7411
7412 /* The GNU C library defines this for functions which it implements
7413     to always fail with ENOSYS.  Some functions are actually named
7414     something starting with __ and the normal name is an alias.  */
7415 #if defined (__stub_pow) || defined (__stub___pow)
7416 choke me
7417 #else
7418 pow();
7419 #endif
7420
7421 ; return 0; }
7422 EOF
7423 if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7424   rm -rf conftest*
7425   eval "ac_cv_func_pow=yes"
7426 else
7427   echo "configure: failed program was:" >&5
7428   cat conftest.$ac_ext >&5
7429   rm -rf conftest*
7430   eval "ac_cv_func_pow=no"
7431 fi
7432 rm -f conftest*
7433
7434 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7435   echo "$ac_t""yes" 1>&6
7436   :
7437 else
7438   echo "$ac_t""no" 1>&6
7439 with_png=no
7440 fi
7441  }
7442   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7443 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7444 echo "configure:7445: checking for png.h" >&5
7445
7446 cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 #include <png.h>
7450 EOF
7451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7452 { (eval echo configure:7453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7454 if test -z "$ac_err"; then
7455   rm -rf conftest*
7456   eval "ac_cv_header_$ac_safe=yes"
7457 else
7458   echo "$ac_err" >&5
7459   echo "configure: failed program was:" >&5
7460   cat conftest.$ac_ext >&5
7461   rm -rf conftest*
7462   eval "ac_cv_header_$ac_safe=no"
7463 fi
7464 rm -f conftest*
7465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7466   echo "$ac_t""yes" 1>&6
7467   :
7468 else
7469   echo "$ac_t""no" 1>&6
7470 with_png=no
7471 fi
7472  }
7473   test -z "$with_png" && { 
7474 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7475 echo "configure:7476: checking for png_read_image in -lpng" >&5
7476 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7477
7478 xe_check_libs=" -lpng "
7479 cat > conftest.$ac_ext <<EOF
7480 #line 7481 "configure"
7481 #include "confdefs.h"
7482 /* Override any gcc2 internal prototype to avoid an error.  */
7483 /* We use char because int might match the return type of a gcc2
7484     builtin and then its argument prototype would still apply.  */
7485 char png_read_image();
7486
7487 int main() {
7488 png_read_image()
7489 ; return 0; }
7490 EOF
7491 if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7492   rm -rf conftest*
7493   eval "ac_cv_lib_$ac_lib_var=yes"
7494 else
7495   echo "configure: failed program was:" >&5
7496   cat conftest.$ac_ext >&5
7497   rm -rf conftest*
7498   eval "ac_cv_lib_$ac_lib_var=no"
7499 fi
7500 rm -f conftest*
7501 xe_check_libs=""
7502
7503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7504   echo "$ac_t""yes" 1>&6
7505   :
7506 else
7507   echo "$ac_t""no" 1>&6
7508 with_png=no
7509 fi
7510
7511  }
7512   if test -z "$with_png"; then
7513     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7514 echo "configure:7515: checking for workable png version information" >&5
7515     xe_check_libs="-lpng -lz"
7516     cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 #include <png.h>
7520     int main(int c, char **v) {
7521     if (c == 1) return 0;
7522     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7523     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7524 EOF
7525 if { (eval echo configure:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7526 then
7527   ./conftest dummy_arg; png_status=$?;
7528       if test "$png_status" = "0"; then
7529         with_png=yes;
7530       else
7531         with_png=no;
7532         if test "$png_status" = "1"; then
7533           png_problem="PNG library version and header file don't match!"
7534         elif test "$png_status" = "2"; then
7535           png_problem="PNG library version too old (pre 1.0.2)!"
7536         fi
7537         echo "
7538 *** WARNING *** $png_problem
7539   I'm not touching that with a 10-foot pole!
7540   If you really want to use the installed version of libPNG, rerun
7541   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7542     fi
7543 else
7544   conftest_rc="$?"
7545   echo "configure: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   rm -fr conftest*
7548   with_png=no
7549 fi
7550 rm -fr conftest*
7551     xe_check_libs=
7552     echo "$ac_t""$with_png" 1>&6
7553   fi
7554   if test "$with_png" = "yes"; then
7555     { test "$extra_verbose" = "yes" && cat << \EOF
7556     Defining HAVE_PNG
7557 EOF
7558 cat >> confdefs.h <<\EOF
7559 #define HAVE_PNG 1
7560 EOF
7561 }
7562
7563     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7564   fi
7565
7566     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7567 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7568 echo "configure:7569: checking for tiffio.h" >&5
7569
7570 cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573 #include <tiffio.h>
7574 EOF
7575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7576 { (eval echo configure:7577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7578 if test -z "$ac_err"; then
7579   rm -rf conftest*
7580   eval "ac_cv_header_$ac_safe=yes"
7581 else
7582   echo "$ac_err" >&5
7583   echo "configure: failed program was:" >&5
7584   cat conftest.$ac_ext >&5
7585   rm -rf conftest*
7586   eval "ac_cv_header_$ac_safe=no"
7587 fi
7588 rm -f conftest*
7589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7590   echo "$ac_t""yes" 1>&6
7591   :
7592 else
7593   echo "$ac_t""no" 1>&6
7594 with_tiff=no
7595 fi
7596  }
7597   test -z "$with_tiff" && { 
7598 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7599 echo "configure:7600: checking for TIFFClientOpen in -ltiff" >&5
7600 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7601
7602 xe_check_libs=" -ltiff "
7603 cat > conftest.$ac_ext <<EOF
7604 #line 7605 "configure"
7605 #include "confdefs.h"
7606 /* Override any gcc2 internal prototype to avoid an error.  */
7607 /* We use char because int might match the return type of a gcc2
7608     builtin and then its argument prototype would still apply.  */
7609 char TIFFClientOpen();
7610
7611 int main() {
7612 TIFFClientOpen()
7613 ; return 0; }
7614 EOF
7615 if { (eval echo configure:7616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7616   rm -rf conftest*
7617   eval "ac_cv_lib_$ac_lib_var=yes"
7618 else
7619   echo "configure: failed program was:" >&5
7620   cat conftest.$ac_ext >&5
7621   rm -rf conftest*
7622   eval "ac_cv_lib_$ac_lib_var=no"
7623 fi
7624 rm -f conftest*
7625 xe_check_libs=""
7626
7627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7628   echo "$ac_t""yes" 1>&6
7629   :
7630 else
7631   echo "$ac_t""no" 1>&6
7632 with_tiff=no
7633 fi
7634
7635  }
7636   test -z "$with_tiff" && with_tiff=yes
7637   if test "$with_tiff" = "yes"; then
7638     { test "$extra_verbose" = "yes" && cat << \EOF
7639     Defining HAVE_TIFF
7640 EOF
7641 cat >> confdefs.h <<\EOF
7642 #define HAVE_TIFF 1
7643 EOF
7644 }
7645
7646     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7647   fi
7648 fi
7649
7650
7651 if test "$with_x11" = "yes"; then
7652
7653   echo "checking for X11 graphics libraries" 1>&6
7654 echo "configure:7655: checking for X11 graphics libraries" >&5
7655
7656   echo "checking for the Athena widgets" 1>&6
7657 echo "configure:7658: checking for the Athena widgets" >&5
7658
7659     case "$with_athena" in
7660         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7661     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7662     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7663     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7664     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7665     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7666   esac
7667
7668     if test "$athena_3d" = "no"; then
7669     
7670 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7671 echo "configure:7672: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7672 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7673
7674 xe_check_libs=" -l$athena_variant "
7675 cat > conftest.$ac_ext <<EOF
7676 #line 7677 "configure"
7677 #include "confdefs.h"
7678 /* Override any gcc2 internal prototype to avoid an error.  */
7679 /* We use char because int might match the return type of a gcc2
7680     builtin and then its argument prototype would still apply.  */
7681 char XawScrollbarSetThumb();
7682
7683 int main() {
7684 XawScrollbarSetThumb()
7685 ; return 0; }
7686 EOF
7687 if { (eval echo configure:7688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7688   rm -rf conftest*
7689   eval "ac_cv_lib_$ac_lib_var=yes"
7690 else
7691   echo "configure: failed program was:" >&5
7692   cat conftest.$ac_ext >&5
7693   rm -rf conftest*
7694   eval "ac_cv_lib_$ac_lib_var=no"
7695 fi
7696 rm -f conftest*
7697 xe_check_libs=""
7698
7699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7700   echo "$ac_t""yes" 1>&6
7701           
7702 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7703 echo "configure:7704: checking for threeDClassRec in -l$athena_variant" >&5
7704 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7705
7706 xe_check_libs=" -l$athena_variant "
7707 cat > conftest.$ac_ext <<EOF
7708 #line 7709 "configure"
7709 #include "confdefs.h"
7710 /* Override any gcc2 internal prototype to avoid an error.  */
7711 /* We use char because int might match the return type of a gcc2
7712     builtin and then its argument prototype would still apply.  */
7713 char threeDClassRec();
7714
7715 int main() {
7716 threeDClassRec()
7717 ; return 0; }
7718 EOF
7719 if { (eval echo configure:7720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7720   rm -rf conftest*
7721   eval "ac_cv_lib_$ac_lib_var=yes"
7722 else
7723   echo "configure: failed program was:" >&5
7724   cat conftest.$ac_ext >&5
7725   rm -rf conftest*
7726   eval "ac_cv_lib_$ac_lib_var=no"
7727 fi
7728 rm -f conftest*
7729 xe_check_libs=""
7730
7731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7732   echo "$ac_t""yes" 1>&6
7733   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7734 else
7735   echo "$ac_t""no" 1>&6
7736 athena_lib=$athena_variant
7737 fi
7738
7739
7740       
7741 else
7742   echo "$ac_t""no" 1>&6
7743 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7744 fi
7745
7746
7747   else
7748         
7749 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7750 echo "configure:7751: checking for threeDClassRec in -l$athena_variant" >&5
7751 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7752
7753 xe_check_libs=" -l$athena_variant "
7754 cat > conftest.$ac_ext <<EOF
7755 #line 7756 "configure"
7756 #include "confdefs.h"
7757 /* Override any gcc2 internal prototype to avoid an error.  */
7758 /* We use char because int might match the return type of a gcc2
7759     builtin and then its argument prototype would still apply.  */
7760 char threeDClassRec();
7761
7762 int main() {
7763 threeDClassRec()
7764 ; return 0; }
7765 EOF
7766 if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7767   rm -rf conftest*
7768   eval "ac_cv_lib_$ac_lib_var=yes"
7769 else
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   eval "ac_cv_lib_$ac_lib_var=no"
7774 fi
7775 rm -f conftest*
7776 xe_check_libs=""
7777
7778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7779   echo "$ac_t""yes" 1>&6
7780   athena_lib=$athena_variant
7781 else
7782   echo "$ac_t""no" 1>&6
7783 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7784 echo "configure:7785: checking for threeDClassRec in -lXaw" >&5
7785 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7786
7787 xe_check_libs=" -lXaw "
7788 cat > conftest.$ac_ext <<EOF
7789 #line 7790 "configure"
7790 #include "confdefs.h"
7791 /* Override any gcc2 internal prototype to avoid an error.  */
7792 /* We use char because int might match the return type of a gcc2
7793     builtin and then its argument prototype would still apply.  */
7794 char threeDClassRec();
7795
7796 int main() {
7797 threeDClassRec()
7798 ; return 0; }
7799 EOF
7800 if { (eval echo configure:7801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7801   rm -rf conftest*
7802   eval "ac_cv_lib_$ac_lib_var=yes"
7803 else
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=no"
7808 fi
7809 rm -f conftest*
7810 xe_check_libs=""
7811
7812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7813   echo "$ac_t""yes" 1>&6
7814   athena_lib=Xaw;
7815           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7816         
7817 else
7818   echo "$ac_t""no" 1>&6
7819 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7820 fi
7821
7822
7823 fi
7824
7825
7826   fi
7827
7828     if test "$athena_3d" = "no"; then
7829     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7830 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7831 echo "configure:7832: checking for X11/Xaw/ThreeD.h" >&5
7832
7833 cat > conftest.$ac_ext <<EOF
7834 #line 7835 "configure"
7835 #include "confdefs.h"
7836 #include <X11/Xaw/ThreeD.h>
7837 EOF
7838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7839 { (eval echo configure:7840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7841 if test -z "$ac_err"; then
7842   rm -rf conftest*
7843   eval "ac_cv_header_$ac_safe=yes"
7844 else
7845   echo "$ac_err" >&5
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849   eval "ac_cv_header_$ac_safe=no"
7850 fi
7851 rm -f conftest*
7852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7853   echo "$ac_t""yes" 1>&6
7854   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7855 else
7856   echo "$ac_t""no" 1>&6
7857 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7858 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7859 echo "configure:7860: checking for X11/Xaw/XawInit.h" >&5
7860
7861 cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 #include <X11/Xaw/XawInit.h>
7865 EOF
7866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7867 { (eval echo configure:7868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7869 if test -z "$ac_err"; then
7870   rm -rf conftest*
7871   eval "ac_cv_header_$ac_safe=yes"
7872 else
7873   echo "$ac_err" >&5
7874   echo "configure: failed program was:" >&5
7875   cat conftest.$ac_ext >&5
7876   rm -rf conftest*
7877   eval "ac_cv_header_$ac_safe=no"
7878 fi
7879 rm -f conftest*
7880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7881   echo "$ac_t""yes" 1>&6
7882   athena_h_path=X11/Xaw
7883 else
7884   echo "$ac_t""no" 1>&6
7885 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7886 fi
7887
7888 fi
7889
7890   else
7891             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7892 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7893 echo "configure:7894: checking for X11/$athena_variant/XawInit.h" >&5
7894
7895 cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 #include <X11/$athena_variant/XawInit.h>
7899 EOF
7900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7901 { (eval echo configure:7902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7903 if test -z "$ac_err"; then
7904   rm -rf conftest*
7905   eval "ac_cv_header_$ac_safe=yes"
7906 else
7907   echo "$ac_err" >&5
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   eval "ac_cv_header_$ac_safe=no"
7912 fi
7913 rm -f conftest*
7914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7915   echo "$ac_t""yes" 1>&6
7916   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7917 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7918 echo "configure:7919: checking for X11/$athena_variant/ThreeD.h" >&5
7919
7920 cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923 #include <X11/$athena_variant/ThreeD.h>
7924 EOF
7925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7926 { (eval echo configure:7927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7928 if test -z "$ac_err"; then
7929   rm -rf conftest*
7930   eval "ac_cv_header_$ac_safe=yes"
7931 else
7932   echo "$ac_err" >&5
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_header_$ac_safe=no"
7937 fi
7938 rm -f conftest*
7939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7940   echo "$ac_t""yes" 1>&6
7941   athena_h_path=X11/$athena_variant
7942 else
7943   echo "$ac_t""no" 1>&6
7944 fi
7945
7946 else
7947   echo "$ac_t""no" 1>&6
7948 fi
7949
7950
7951         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
7952       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
7953 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
7954 echo "configure:7955: checking for X11/Xaw3d/XawInit.h" >&5
7955
7956 cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959 #include <X11/Xaw3d/XawInit.h>
7960 EOF
7961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7962 { (eval echo configure:7963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7964 if test -z "$ac_err"; then
7965   rm -rf conftest*
7966   eval "ac_cv_header_$ac_safe=yes"
7967 else
7968   echo "$ac_err" >&5
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   eval "ac_cv_header_$ac_safe=no"
7973 fi
7974 rm -f conftest*
7975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
7978 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
7979 echo "configure:7980: checking for X11/Xaw3d/ThreeD.h" >&5
7980
7981 cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 #include <X11/Xaw3d/ThreeD.h>
7985 EOF
7986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7987 { (eval echo configure:7988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7989 if test -z "$ac_err"; then
7990   rm -rf conftest*
7991   eval "ac_cv_header_$ac_safe=yes"
7992 else
7993   echo "$ac_err" >&5
7994   echo "configure: failed program was:" >&5
7995   cat conftest.$ac_ext >&5
7996   rm -rf conftest*
7997   eval "ac_cv_header_$ac_safe=no"
7998 fi
7999 rm -f conftest*
8000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8001   echo "$ac_t""yes" 1>&6
8002   
8003             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8004             athena_h_path=X11/Xaw3d
8005           
8006 else
8007   echo "$ac_t""no" 1>&6
8008 fi
8009
8010 else
8011   echo "$ac_t""no" 1>&6
8012 fi
8013
8014     fi
8015
8016             if test -z "$athena_h_path"; then
8017       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8018 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8019 echo "configure:8020: checking for X11/Xaw/ThreeD.h" >&5
8020
8021 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 #include <X11/Xaw/ThreeD.h>
8025 EOF
8026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8027 { (eval echo configure:8028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8029 if test -z "$ac_err"; then
8030   rm -rf conftest*
8031   eval "ac_cv_header_$ac_safe=yes"
8032 else
8033   echo "$ac_err" >&5
8034   echo "configure: failed program was:" >&5
8035   cat conftest.$ac_ext >&5
8036   rm -rf conftest*
8037   eval "ac_cv_header_$ac_safe=no"
8038 fi
8039 rm -f conftest*
8040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8041   echo "$ac_t""yes" 1>&6
8042   
8043           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8044           athena_h_path=X11/Xaw
8045         
8046 else
8047   echo "$ac_t""no" 1>&6
8048 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8049 fi
8050
8051     fi
8052   fi
8053
8054     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8055     have_xaw=yes
8056   else
8057     have_xaw=no
8058   fi
8059
8060     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8061 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8062 echo "configure:8063: checking for Xm/Xm.h" >&5
8063
8064 cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8067 #include <Xm/Xm.h>
8068 EOF
8069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8070 { (eval echo configure:8071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8072 if test -z "$ac_err"; then
8073   rm -rf conftest*
8074   eval "ac_cv_header_$ac_safe=yes"
8075 else
8076   echo "$ac_err" >&5
8077   echo "configure: failed program was:" >&5
8078   cat conftest.$ac_ext >&5
8079   rm -rf conftest*
8080   eval "ac_cv_header_$ac_safe=no"
8081 fi
8082 rm -f conftest*
8083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8084   echo "$ac_t""yes" 1>&6
8085   
8086 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8087 echo "configure:8088: checking for XmStringFree in -lXm" >&5
8088 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8089
8090 xe_check_libs=" -lXm "
8091 cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 /* Override any gcc2 internal prototype to avoid an error.  */
8095 /* We use char because int might match the return type of a gcc2
8096     builtin and then its argument prototype would still apply.  */
8097 char XmStringFree();
8098
8099 int main() {
8100 XmStringFree()
8101 ; return 0; }
8102 EOF
8103 if { (eval echo configure:8104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8104   rm -rf conftest*
8105   eval "ac_cv_lib_$ac_lib_var=yes"
8106 else
8107   echo "configure: failed program was:" >&5
8108   cat conftest.$ac_ext >&5
8109   rm -rf conftest*
8110   eval "ac_cv_lib_$ac_lib_var=no"
8111 fi
8112 rm -f conftest*
8113 xe_check_libs=""
8114
8115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8116   echo "$ac_t""yes" 1>&6
8117   have_motif=yes
8118 else
8119   echo "$ac_t""no" 1>&6
8120 have_motif=no
8121 fi
8122
8123
8124 else
8125   echo "$ac_t""no" 1>&6
8126 have_motif=no
8127 fi
8128
8129
8130   if test "$have_motif" = "yes"; then
8131         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8132 echo "configure:8133: checking for Lesstif" >&5
8133     cat > conftest.$ac_ext <<EOF
8134 #line 8135 "configure"
8135 #include "confdefs.h"
8136 #include <Xm/Xm.h>
8137 #ifdef LESSTIF_VERSION
8138 yes
8139 #endif
8140
8141 EOF
8142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8143   egrep "yes" >/dev/null 2>&1; then
8144   rm -rf conftest*
8145   have_lesstif=yes
8146 else
8147   rm -rf conftest*
8148   have_lesstif=no
8149 fi
8150 rm -f conftest*
8151
8152   echo "$ac_t""$have_lesstif" 1>&6
8153   fi
8154
8155 fi 
8156
8157 case "$with_menubars" in "" | "yes" | "athena" )
8158   with_menubars="lucid" ;;
8159 esac
8160 case "$with_dialogs" in "" | "yes" | "lucid" )
8161   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8162   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8163   else with_dialogs=no
8164   fi ;;
8165 esac
8166 case "$with_scrollbars" in "" | "yes" )
8167   with_scrollbars="lucid" ;;
8168 esac
8169 case "$with_widgets" in "" | "yes" | "lucid")
8170   if   test "$have_motif" = "yes"; then with_widgets="motif"
8171   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8172   else with_widgets=no
8173   fi ;;
8174 esac
8175
8176 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8177
8178 case "$all_widgets" in
8179   *athena* )
8180     if test "$have_xaw" != "yes"; then
8181       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8182     fi
8183
8184         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8185
8186         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8187
8188             { test "$extra_verbose" = "yes" && cat << EOF
8189     Defining ATHENA_H_PATH = $athena_h_path
8190 EOF
8191 cat >> confdefs.h <<EOF
8192 #define ATHENA_H_PATH $athena_h_path
8193 EOF
8194 }
8195
8196
8197     { test "$extra_verbose" = "yes" && cat << \EOF
8198     Defining LWLIB_USES_ATHENA
8199 EOF
8200 cat >> confdefs.h <<\EOF
8201 #define LWLIB_USES_ATHENA 1
8202 EOF
8203 }
8204
8205     { test "$extra_verbose" = "yes" && cat << \EOF
8206     Defining NEED_ATHENA
8207 EOF
8208 cat >> confdefs.h <<\EOF
8209 #define NEED_ATHENA 1
8210 EOF
8211 }
8212
8213
8214     if test "$athena_3d" = "yes"; then
8215       { test "$extra_verbose" = "yes" && cat << \EOF
8216     Defining HAVE_ATHENA_3D
8217 EOF
8218 cat >> confdefs.h <<\EOF
8219 #define HAVE_ATHENA_3D 1
8220 EOF
8221 }
8222
8223     fi
8224   ;;
8225 esac
8226
8227 case "$all_widgets" in *motif* )
8228   { test "$extra_verbose" = "yes" && cat << \EOF
8229     Defining LWLIB_USES_MOTIF
8230 EOF
8231 cat >> confdefs.h <<\EOF
8232 #define LWLIB_USES_MOTIF 1
8233 EOF
8234 }
8235
8236   { test "$extra_verbose" = "yes" && cat << \EOF
8237     Defining NEED_MOTIF
8238 EOF
8239 cat >> confdefs.h <<\EOF
8240 #define NEED_MOTIF 1
8241 EOF
8242 }
8243
8244   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8245   need_motif=yes ;;
8246 esac
8247
8248 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8249 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8250 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8251 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8252         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8253 case "$with_widgets" in athena* )
8254         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;;
8255 esac
8256 case "$all_widgets" in *lucid* )
8257   { test "$extra_verbose" = "yes" && cat << \EOF
8258     Defining NEED_LUCID
8259 EOF
8260 cat >> confdefs.h <<\EOF
8261 #define NEED_LUCID 1
8262 EOF
8263 }
8264
8265   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8266 esac
8267
8268
8269
8270 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8271     Defining LWLIB_SCROLLBARS_ATHENA
8272 EOF
8273 cat >> confdefs.h <<\EOF
8274 #define LWLIB_SCROLLBARS_ATHENA 1
8275 EOF
8276 }
8277
8278 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8279     Defining LWLIB_DIALOGS_ATHENA
8280 EOF
8281 cat >> confdefs.h <<\EOF
8282 #define LWLIB_DIALOGS_ATHENA 1
8283 EOF
8284 }
8285
8286
8287 if test "$athena_3d" = "yes"; then
8288   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8289     Defining LWLIB_SCROLLBARS_ATHENA3D
8290 EOF
8291 cat >> confdefs.h <<\EOF
8292 #define LWLIB_SCROLLBARS_ATHENA3D 1
8293 EOF
8294 }
8295
8296   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8297     Defining LWLIB_DIALOGS_ATHENA3D
8298 EOF
8299 cat >> confdefs.h <<\EOF
8300 #define LWLIB_DIALOGS_ATHENA3D 1
8301 EOF
8302 }
8303
8304 fi
8305
8306 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8307     Defining LWLIB_WIDGETS_ATHENA
8308 EOF
8309 cat >> confdefs.h <<\EOF
8310 #define LWLIB_WIDGETS_ATHENA 1
8311 EOF
8312 }
8313 ;; esac
8314 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8315         { test "$extra_verbose" = "yes" && cat << \EOF
8316     Defining LWLIB_TABS_LUCID
8317 EOF
8318 cat >> confdefs.h <<\EOF
8319 #define LWLIB_TABS_LUCID 1
8320 EOF
8321 }
8322
8323
8324 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8325     Defining HAVE_MENUBARS
8326 EOF
8327 cat >> confdefs.h <<\EOF
8328 #define HAVE_MENUBARS 1
8329 EOF
8330 }
8331
8332 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8333     Defining HAVE_SCROLLBARS
8334 EOF
8335 cat >> confdefs.h <<\EOF
8336 #define HAVE_SCROLLBARS 1
8337 EOF
8338 }
8339
8340 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8341     Defining HAVE_DIALOGS
8342 EOF
8343 cat >> confdefs.h <<\EOF
8344 #define HAVE_DIALOGS 1
8345 EOF
8346 }
8347
8348 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8349     Defining HAVE_TOOLBARS
8350 EOF
8351 cat >> confdefs.h <<\EOF
8352 #define HAVE_TOOLBARS 1
8353 EOF
8354 }
8355
8356 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8357     Defining HAVE_WIDGETS
8358 EOF
8359 cat >> confdefs.h <<\EOF
8360 #define HAVE_WIDGETS 1
8361 EOF
8362 }
8363
8364
8365 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8366     Defining LWLIB_MENUBARS_LUCID
8367 EOF
8368 cat >> confdefs.h <<\EOF
8369 #define LWLIB_MENUBARS_LUCID 1
8370 EOF
8371 }
8372
8373 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8374     Defining LWLIB_SCROLLBARS_LUCID
8375 EOF
8376 cat >> confdefs.h <<\EOF
8377 #define LWLIB_SCROLLBARS_LUCID 1
8378 EOF
8379 }
8380
8381
8382 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8383     Defining LWLIB_MENUBARS_MOTIF
8384 EOF
8385 cat >> confdefs.h <<\EOF
8386 #define LWLIB_MENUBARS_MOTIF 1
8387 EOF
8388 }
8389
8390 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8391     Defining LWLIB_SCROLLBARS_MOTIF
8392 EOF
8393 cat >> confdefs.h <<\EOF
8394 #define LWLIB_SCROLLBARS_MOTIF 1
8395 EOF
8396 }
8397
8398 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8399     Defining LWLIB_DIALOGS_MOTIF
8400 EOF
8401 cat >> confdefs.h <<\EOF
8402 #define LWLIB_DIALOGS_MOTIF 1
8403 EOF
8404 }
8405
8406 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8407     Defining LWLIB_WIDGETS_MOTIF
8408 EOF
8409 cat >> confdefs.h <<\EOF
8410 #define LWLIB_WIDGETS_MOTIF 1
8411 EOF
8412 }
8413
8414
8415 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8416    echo "    xemacs will be linked with \"menubar.o\""
8417  fi
8418 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8419    echo "    xemacs will be linked with \"scrollbar.o\""
8420  fi
8421 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8422    echo "    xemacs will be linked with \"dialog.o\""
8423  fi
8424 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8425    echo "    xemacs will be linked with \"toolbar.o\""
8426  fi
8427
8428 if test "$with_x11" = "yes"; then
8429   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8430    echo "    xemacs will be linked with \"menubar-x.o\""
8431  fi
8432   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8433    echo "    xemacs will be linked with \"scrollbar-x.o\""
8434  fi
8435   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8436    echo "    xemacs will be linked with \"dialog-x.o\""
8437  fi
8438   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8439    echo "    xemacs will be linked with \"toolbar-x.o\""
8440  fi
8441   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8442    echo "    xemacs will be linked with \"gui-x.o\""
8443  fi
8444 fi
8445
8446
8447 test -z "$with_mule" && with_mule=no
8448 test -z "$with_file_coding" && with_file_coding=no
8449
8450
8451 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8452   { test "$extra_verbose" = "yes" && cat << \EOF
8453     Defining FILE_CODING
8454 EOF
8455 cat >> confdefs.h <<\EOF
8456 #define FILE_CODING 1
8457 EOF
8458 }
8459
8460   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8461    echo "    xemacs will be linked with \"file-coding.o\""
8462  fi
8463 fi
8464
8465 if test "$with_mule" = "yes" ; then
8466   echo "checking for Mule-related features" 1>&6
8467 echo "configure:8468: checking for Mule-related features" >&5
8468   { test "$extra_verbose" = "yes" && cat << \EOF
8469     Defining MULE
8470 EOF
8471 cat >> confdefs.h <<\EOF
8472 #define MULE 1
8473 EOF
8474 }
8475
8476   { test "$extra_verbose" = "yes" && cat << \EOF
8477     Defining FILE_CODING
8478 EOF
8479 cat >> confdefs.h <<\EOF
8480 #define FILE_CODING 1
8481 EOF
8482 }
8483
8484   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
8485    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
8486  fi
8487   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
8488     { test "$extra_verbose" = "yes" && cat << \EOF
8489     Defining TEXT_CODING
8490 EOF
8491 cat >> confdefs.h <<\EOF
8492 #define TEXT_CODING 1
8493 EOF
8494 }
8495
8496     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
8497    echo "    xemacs will be linked with \"text-coding.o\""
8498  fi
8499   else
8500     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8501    echo "    xemacs will be linked with \"file-coding.o\""
8502  fi
8503   fi
8504     for ac_hdr in libintl.h
8505 do
8506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8508 echo "configure:8509: checking for $ac_hdr" >&5
8509
8510 cat > conftest.$ac_ext <<EOF
8511 #line 8512 "configure"
8512 #include "confdefs.h"
8513 #include <$ac_hdr>
8514 EOF
8515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8516 { (eval echo configure:8517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8518 if test -z "$ac_err"; then
8519   rm -rf conftest*
8520   eval "ac_cv_header_$ac_safe=yes"
8521 else
8522   echo "$ac_err" >&5
8523   echo "configure: failed program was:" >&5
8524   cat conftest.$ac_ext >&5
8525   rm -rf conftest*
8526   eval "ac_cv_header_$ac_safe=no"
8527 fi
8528 rm -f conftest*
8529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8532   { test "$extra_verbose" = "yes" && cat << EOF
8533     Defining $ac_tr_hdr
8534 EOF
8535 cat >> confdefs.h <<EOF
8536 #define $ac_tr_hdr 1
8537 EOF
8538 }
8539  
8540 else
8541   echo "$ac_t""no" 1>&6
8542 fi
8543 done
8544
8545   
8546 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8547 echo "configure:8548: checking for strerror in -lintl" >&5
8548 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8549
8550 xe_check_libs=" -lintl "
8551 cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* Override any gcc2 internal prototype to avoid an error.  */
8555 /* We use char because int might match the return type of a gcc2
8556     builtin and then its argument prototype would still apply.  */
8557 char strerror();
8558
8559 int main() {
8560 strerror()
8561 ; return 0; }
8562 EOF
8563 if { (eval echo configure:8564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8564   rm -rf conftest*
8565   eval "ac_cv_lib_$ac_lib_var=yes"
8566 else
8567   echo "configure: failed program was:" >&5
8568   cat conftest.$ac_ext >&5
8569   rm -rf conftest*
8570   eval "ac_cv_lib_$ac_lib_var=no"
8571 fi
8572 rm -f conftest*
8573 xe_check_libs=""
8574
8575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8576   echo "$ac_t""yes" 1>&6
8577     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8578     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8579   { test "$extra_verbose" = "yes" && cat << EOF
8580     Defining $ac_tr_lib
8581 EOF
8582 cat >> confdefs.h <<EOF
8583 #define $ac_tr_lib 1
8584 EOF
8585 }
8586
8587   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8588
8589 else
8590   echo "$ac_t""no" 1>&6
8591 fi
8592
8593
8594
8595   if test "$with_utf_2000" = "yes" ; then
8596     { test "$extra_verbose" = "yes" && cat << \EOF
8597     Defining CHAR_IS_UCS4
8598 EOF
8599 cat >> confdefs.h <<\EOF
8600 #define CHAR_IS_UCS4 1
8601 EOF
8602 }
8603
8604     { test "$extra_verbose" = "yes" && cat << \EOF
8605     Defining UTF2000
8606 EOF
8607 cat >> confdefs.h <<\EOF
8608 #define UTF2000 1
8609 EOF
8610 }
8611
8612   fi
8613
8614   echo "checking for Mule input methods" 1>&6
8615 echo "configure:8616: checking for Mule input methods" >&5
8616         case "$with_xim" in "" | "yes" )
8617     echo "checking for XIM" 1>&6
8618 echo "configure:8619: checking for XIM" >&5
8619     
8620 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8621 echo "configure:8622: checking for XOpenIM in -lX11" >&5
8622 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8623
8624 xe_check_libs=" -lX11 "
8625 cat > conftest.$ac_ext <<EOF
8626 #line 8627 "configure"
8627 #include "confdefs.h"
8628 /* Override any gcc2 internal prototype to avoid an error.  */
8629 /* We use char because int might match the return type of a gcc2
8630     builtin and then its argument prototype would still apply.  */
8631 char XOpenIM();
8632
8633 int main() {
8634 XOpenIM()
8635 ; return 0; }
8636 EOF
8637 if { (eval echo configure:8638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8638   rm -rf conftest*
8639   eval "ac_cv_lib_$ac_lib_var=yes"
8640 else
8641   echo "configure: failed program was:" >&5
8642   cat conftest.$ac_ext >&5
8643   rm -rf conftest*
8644   eval "ac_cv_lib_$ac_lib_var=no"
8645 fi
8646 rm -f conftest*
8647 xe_check_libs=""
8648
8649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8650   echo "$ac_t""yes" 1>&6
8651   with_xim=xlib
8652 else
8653   echo "$ac_t""no" 1>&6
8654 with_xim=no
8655 fi
8656
8657
8658         if test "$have_motif $have_lesstif" = "yes no"; then
8659       
8660 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8661 echo "configure:8662: checking for XmImMbLookupString in -lXm" >&5
8662 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8663
8664 xe_check_libs=" -lXm "
8665 cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 /* Override any gcc2 internal prototype to avoid an error.  */
8669 /* We use char because int might match the return type of a gcc2
8670     builtin and then its argument prototype would still apply.  */
8671 char XmImMbLookupString();
8672
8673 int main() {
8674 XmImMbLookupString()
8675 ; return 0; }
8676 EOF
8677 if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8678   rm -rf conftest*
8679   eval "ac_cv_lib_$ac_lib_var=yes"
8680 else
8681   echo "configure: failed program was:" >&5
8682   cat conftest.$ac_ext >&5
8683   rm -rf conftest*
8684   eval "ac_cv_lib_$ac_lib_var=no"
8685 fi
8686 rm -f conftest*
8687 xe_check_libs=""
8688
8689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8690   echo "$ac_t""yes" 1>&6
8691   with_xim=motif
8692 else
8693   echo "$ac_t""no" 1>&6
8694 fi
8695
8696
8697     fi ;;
8698   esac
8699   if test "$with_xim" != "no"; then
8700     { test "$extra_verbose" = "yes" && cat << \EOF
8701     Defining HAVE_XIM
8702 EOF
8703 cat >> confdefs.h <<\EOF
8704 #define HAVE_XIM 1
8705 EOF
8706 }
8707
8708     if test "$with_xim" = "xlib"; then
8709       { test "$extra_verbose" = "yes" && cat << \EOF
8710     Defining XIM_XLIB
8711 EOF
8712 cat >> confdefs.h <<\EOF
8713 #define XIM_XLIB 1
8714 EOF
8715 }
8716
8717       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8718    echo "    xemacs will be linked with \"input-method-xlib.o\""
8719  fi
8720     fi
8721     if test "$with_xim" = "motif"; then
8722       { test "$extra_verbose" = "yes" && cat << \EOF
8723     Defining XIM_MOTIF
8724 EOF
8725 cat >> confdefs.h <<\EOF
8726 #define XIM_MOTIF 1
8727 EOF
8728 }
8729
8730       need_motif=yes
8731       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8732    echo "    xemacs will be linked with \"input-method-motif.o\""
8733  fi
8734     fi
8735     if test "$with_xim" = "motif"; then
8736       with_xfs=no
8737     fi
8738   fi
8739
8740     if test "$with_xfs" = "yes" ; then
8741     echo "checking for XFontSet" 1>&6
8742 echo "configure:8743: checking for XFontSet" >&5
8743     
8744 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8745 echo "configure:8746: checking for XmbDrawString in -lX11" >&5
8746 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8747
8748 xe_check_libs=" -lX11 "
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 /* Override any gcc2 internal prototype to avoid an error.  */
8753 /* We use char because int might match the return type of a gcc2
8754     builtin and then its argument prototype would still apply.  */
8755 char XmbDrawString();
8756
8757 int main() {
8758 XmbDrawString()
8759 ; return 0; }
8760 EOF
8761 if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8762   rm -rf conftest*
8763   eval "ac_cv_lib_$ac_lib_var=yes"
8764 else
8765   echo "configure: failed program was:" >&5
8766   cat conftest.$ac_ext >&5
8767   rm -rf conftest*
8768   eval "ac_cv_lib_$ac_lib_var=no"
8769 fi
8770 rm -f conftest*
8771 xe_check_libs=""
8772
8773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8774   echo "$ac_t""yes" 1>&6
8775   :
8776 else
8777   echo "$ac_t""no" 1>&6
8778 with_xfs=no
8779 fi
8780
8781
8782     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8783       { test "$extra_verbose" = "yes" && cat << \EOF
8784     Defining USE_XFONTSET
8785 EOF
8786 cat >> confdefs.h <<\EOF
8787 #define USE_XFONTSET 1
8788 EOF
8789 }
8790
8791       if test "$with_xim" = "no" ; then
8792         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8793    echo "    xemacs will be linked with \"input-method-xfs.o\""
8794  fi
8795       fi
8796     fi
8797   fi 
8798     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8799   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8800 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8801 echo "configure:8802: checking for wnn/jllib.h" >&5
8802
8803 cat > conftest.$ac_ext <<EOF
8804 #line 8805 "configure"
8805 #include "confdefs.h"
8806 #include <wnn/jllib.h>
8807 EOF
8808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8809 { (eval echo configure:8810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8811 if test -z "$ac_err"; then
8812   rm -rf conftest*
8813   eval "ac_cv_header_$ac_safe=yes"
8814 else
8815   echo "$ac_err" >&5
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -rf conftest*
8819   eval "ac_cv_header_$ac_safe=no"
8820 fi
8821 rm -f conftest*
8822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8823   echo "$ac_t""yes" 1>&6
8824   :
8825 else
8826   echo "$ac_t""no" 1>&6
8827 with_wnn=no
8828 fi
8829  }
8830     if test "$with_wnn" != "no"; then
8831     for ac_func in crypt
8832 do
8833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8834 echo "configure:8835: checking for $ac_func" >&5
8835
8836 cat > conftest.$ac_ext <<EOF
8837 #line 8838 "configure"
8838 #include "confdefs.h"
8839 /* System header to define __stub macros and hopefully few prototypes,
8840     which can conflict with char $ac_func(); below.  */
8841 #include <assert.h>
8842 /* Override any gcc2 internal prototype to avoid an error.  */
8843 /* We use char because int might match the return type of a gcc2
8844     builtin and then its argument prototype would still apply.  */
8845 char $ac_func();
8846
8847 int main() {
8848
8849 /* The GNU C library defines this for functions which it implements
8850     to always fail with ENOSYS.  Some functions are actually named
8851     something starting with __ and the normal name is an alias.  */
8852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8853 choke me
8854 #else
8855 $ac_func();
8856 #endif
8857
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8861   rm -rf conftest*
8862   eval "ac_cv_func_$ac_func=yes"
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   eval "ac_cv_func_$ac_func=no"
8868 fi
8869 rm -f conftest*
8870
8871 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8872   echo "$ac_t""yes" 1>&6
8873     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8874   { test "$extra_verbose" = "yes" && cat << EOF
8875     Defining $ac_tr_func
8876 EOF
8877 cat >> confdefs.h <<EOF
8878 #define $ac_tr_func 1
8879 EOF
8880 }
8881  
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885 done
8886
8887     test "$ac_cv_func_crypt" != "yes" && { 
8888 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8889 echo "configure:8890: checking for crypt in -lcrypt" >&5
8890 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8891
8892 xe_check_libs=" -lcrypt "
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* Override any gcc2 internal prototype to avoid an error.  */
8897 /* We use char because int might match the return type of a gcc2
8898     builtin and then its argument prototype would still apply.  */
8899 char crypt();
8900
8901 int main() {
8902 crypt()
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=yes"
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=no"
8913 fi
8914 rm -f conftest*
8915 xe_check_libs=""
8916
8917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8918   echo "$ac_t""yes" 1>&6
8919     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8920     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8921   { test "$extra_verbose" = "yes" && cat << EOF
8922     Defining $ac_tr_lib
8923 EOF
8924 cat >> confdefs.h <<EOF
8925 #define $ac_tr_lib 1
8926 EOF
8927 }
8928
8929   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8930
8931 else
8932   echo "$ac_t""no" 1>&6
8933 fi
8934
8935  }
8936   fi
8937     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8938     
8939 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8940 echo "configure:8941: checking for jl_dic_list_e in -lwnn" >&5
8941 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8942
8943 xe_check_libs=" -lwnn "
8944 cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 /* Override any gcc2 internal prototype to avoid an error.  */
8948 /* We use char because int might match the return type of a gcc2
8949     builtin and then its argument prototype would still apply.  */
8950 char jl_dic_list_e();
8951
8952 int main() {
8953 jl_dic_list_e()
8954 ; return 0; }
8955 EOF
8956 if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=yes"
8959 else
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_lib_$ac_lib_var=no"
8964 fi
8965 rm -f conftest*
8966 xe_check_libs=""
8967
8968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8969   echo "$ac_t""yes" 1>&6
8970   libwnn=wnn
8971 else
8972   echo "$ac_t""no" 1>&6
8973 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8974 echo "configure:8975: checking for jl_dic_list_e in -lwnn4" >&5
8975 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8976
8977 xe_check_libs=" -lwnn4 "
8978 cat > conftest.$ac_ext <<EOF
8979 #line 8980 "configure"
8980 #include "confdefs.h"
8981 /* Override any gcc2 internal prototype to avoid an error.  */
8982 /* We use char because int might match the return type of a gcc2
8983     builtin and then its argument prototype would still apply.  */
8984 char jl_dic_list_e();
8985
8986 int main() {
8987 jl_dic_list_e()
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=yes"
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   eval "ac_cv_lib_$ac_lib_var=no"
8998 fi
8999 rm -f conftest*
9000 xe_check_libs=""
9001
9002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9003   echo "$ac_t""yes" 1>&6
9004   libwnn=wnn4
9005 else
9006   echo "$ac_t""no" 1>&6
9007 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9008 echo "configure:9009: checking for jl_dic_list_e in -lwnn6" >&5
9009 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9010
9011 xe_check_libs=" -lwnn6 "
9012 cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015 /* Override any gcc2 internal prototype to avoid an error.  */
9016 /* We use char because int might match the return type of a gcc2
9017     builtin and then its argument prototype would still apply.  */
9018 char jl_dic_list_e();
9019
9020 int main() {
9021 jl_dic_list_e()
9022 ; return 0; }
9023 EOF
9024 if { (eval echo configure:9025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=yes"
9027 else
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=no"
9032 fi
9033 rm -f conftest*
9034 xe_check_libs=""
9035
9036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9037   echo "$ac_t""yes" 1>&6
9038   libwnn=wnn6
9039 else
9040   echo "$ac_t""no" 1>&6
9041 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9042 echo "configure:9043: checking for dic_list_e in -lwnn6_fromsrc" >&5
9043 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9044
9045 xe_check_libs=" -lwnn6_fromsrc "
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 /* Override any gcc2 internal prototype to avoid an error.  */
9050 /* We use char because int might match the return type of a gcc2
9051     builtin and then its argument prototype would still apply.  */
9052 char dic_list_e();
9053
9054 int main() {
9055 dic_list_e()
9056 ; return 0; }
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9059   rm -rf conftest*
9060   eval "ac_cv_lib_$ac_lib_var=yes"
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=no"
9066 fi
9067 rm -f conftest*
9068 xe_check_libs=""
9069
9070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9071   echo "$ac_t""yes" 1>&6
9072   libwnn=wnn6_fromsrc
9073 else
9074   echo "$ac_t""no" 1>&6
9075 with_wnn=no
9076 fi
9077
9078
9079 fi
9080
9081
9082 fi
9083
9084
9085 fi
9086
9087
9088   fi
9089   test -z "$with_wnn" && with_wnn=yes
9090   if test "$with_wnn" = "yes"; then
9091     { test "$extra_verbose" = "yes" && cat << \EOF
9092     Defining HAVE_WNN
9093 EOF
9094 cat >> confdefs.h <<\EOF
9095 #define HAVE_WNN 1
9096 EOF
9097 }
9098
9099     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9100     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9101    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9102  fi
9103     if test "$with_wnn6" != "no"; then
9104       
9105 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9106 echo "configure:9107: checking for jl_fi_dic_list in -l$libwnn" >&5
9107 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9108
9109 xe_check_libs=" -l$libwnn "
9110 cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 /* Override any gcc2 internal prototype to avoid an error.  */
9114 /* We use char because int might match the return type of a gcc2
9115     builtin and then its argument prototype would still apply.  */
9116 char jl_fi_dic_list();
9117
9118 int main() {
9119 jl_fi_dic_list()
9120 ; return 0; }
9121 EOF
9122 if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9123   rm -rf conftest*
9124   eval "ac_cv_lib_$ac_lib_var=yes"
9125 else
9126   echo "configure: failed program was:" >&5
9127   cat conftest.$ac_ext >&5
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=no"
9130 fi
9131 rm -f conftest*
9132 xe_check_libs=""
9133
9134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9135   echo "$ac_t""yes" 1>&6
9136   with_wnn6=yes
9137 else
9138   echo "$ac_t""no" 1>&6
9139 fi
9140
9141
9142       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9143     Defining WNN6
9144 EOF
9145 cat >> confdefs.h <<\EOF
9146 #define WNN6 1
9147 EOF
9148 }
9149
9150     fi
9151   fi
9152
9153     canna_includes_found=no
9154   if test "$with_canna" != "no"; then
9155     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9156 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9157 echo "configure:9158: checking for canna/jrkanji.h" >&5
9158
9159 cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9162 #include <canna/jrkanji.h>
9163 EOF
9164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9165 { (eval echo configure:9166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9167 if test -z "$ac_err"; then
9168   rm -rf conftest*
9169   eval "ac_cv_header_$ac_safe=yes"
9170 else
9171   echo "$ac_err" >&5
9172   echo "configure: failed program was:" >&5
9173   cat conftest.$ac_ext >&5
9174   rm -rf conftest*
9175   eval "ac_cv_header_$ac_safe=no"
9176 fi
9177 rm -f conftest*
9178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180   canna_includes_found=yes
9181 else
9182   echo "$ac_t""no" 1>&6
9183 fi
9184
9185   fi
9186   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9187       -d "/usr/local/canna/include"; then
9188     save_c_switch_site="$c_switch_site"
9189     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9190     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9191 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9192 echo "configure:9193: checking for canna/jrkanji.h" >&5
9193
9194 cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 #include <canna/jrkanji.h>
9198 EOF
9199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9200 { (eval echo configure:9201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9202 if test -z "$ac_err"; then
9203   rm -rf conftest*
9204   eval "ac_cv_header_$ac_safe=yes"
9205 else
9206   echo "$ac_err" >&5
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_header_$ac_safe=no"
9211 fi
9212 rm -f conftest*
9213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9214   echo "$ac_t""yes" 1>&6
9215   canna_includes_found=yes
9216 else
9217   echo "$ac_t""no" 1>&6
9218 fi
9219
9220     if test "$canna_includes_found" != "yes"; then
9221       c_switch_site="$save_c_switch_site"
9222       with_canna="no"
9223     fi
9224   fi
9225
9226   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9227 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9228 echo "configure:9229: checking for canna/RK.h" >&5
9229
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <canna/RK.h>
9234 EOF
9235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9236 { (eval echo configure:9237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9238 if test -z "$ac_err"; then
9239   rm -rf conftest*
9240   eval "ac_cv_header_$ac_safe=yes"
9241 else
9242   echo "$ac_err" >&5
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -rf conftest*
9246   eval "ac_cv_header_$ac_safe=no"
9247 fi
9248 rm -f conftest*
9249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251   :
9252 else
9253   echo "$ac_t""no" 1>&6
9254 with_canna=no
9255 fi
9256  }
9257   test -z "$with_canna" && { 
9258 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9259 echo "configure:9260: checking for RkBgnBun in -lRKC" >&5
9260 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9261
9262 xe_check_libs=" -lRKC "
9263 cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 /* Override any gcc2 internal prototype to avoid an error.  */
9267 /* We use char because int might match the return type of a gcc2
9268     builtin and then its argument prototype would still apply.  */
9269 char RkBgnBun();
9270
9271 int main() {
9272 RkBgnBun()
9273 ; return 0; }
9274 EOF
9275 if { (eval echo configure:9276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=yes"
9278 else
9279   echo "configure: failed program was:" >&5
9280   cat conftest.$ac_ext >&5
9281   rm -rf conftest*
9282   eval "ac_cv_lib_$ac_lib_var=no"
9283 fi
9284 rm -f conftest*
9285 xe_check_libs=""
9286
9287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9288   echo "$ac_t""yes" 1>&6
9289   :
9290 else
9291   echo "$ac_t""no" 1>&6
9292 with_canna=no
9293 fi
9294
9295  }
9296   test -z "$with_canna" && { 
9297 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9298 echo "configure:9299: checking for jrKanjiControl in -lcanna" >&5
9299 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9300
9301 xe_check_libs=" -lcanna "
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305 /* Override any gcc2 internal prototype to avoid an error.  */
9306 /* We use char because int might match the return type of a gcc2
9307     builtin and then its argument prototype would still apply.  */
9308 char jrKanjiControl();
9309
9310 int main() {
9311 jrKanjiControl()
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   eval "ac_cv_lib_$ac_lib_var=yes"
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   eval "ac_cv_lib_$ac_lib_var=no"
9322 fi
9323 rm -f conftest*
9324 xe_check_libs=""
9325
9326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9327   echo "$ac_t""yes" 1>&6
9328   :
9329 else
9330   echo "$ac_t""no" 1>&6
9331 with_canna=no
9332 fi
9333
9334  }
9335   test -z "$with_canna" && with_canna=yes
9336   if test "$with_canna" = "yes"; then
9337     { test "$extra_verbose" = "yes" && cat << \EOF
9338     Defining HAVE_CANNA
9339 EOF
9340 cat >> confdefs.h <<\EOF
9341 #define HAVE_CANNA 1
9342 EOF
9343 }
9344
9345     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9346     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9347    echo "    xemacs will be linked with \"mule-canna.o\""
9348  fi
9349   fi
9350
9351 else   for feature in xim canna wnn; do
9352     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9353       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9354     fi
9355     eval "with_${feature}=no"
9356   done
9357 fi 
9358
9359 if test "$need_motif" = "yes" ; then
9360   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9361     
9362 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9363 echo "configure:9364: checking for layout_object_getvalue in -li18n" >&5
9364 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9365
9366 xe_check_libs=" -li18n "
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 /* Override any gcc2 internal prototype to avoid an error.  */
9371 /* We use char because int might match the return type of a gcc2
9372     builtin and then its argument prototype would still apply.  */
9373 char layout_object_getvalue();
9374
9375 int main() {
9376 layout_object_getvalue()
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=yes"
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=no"
9387 fi
9388 rm -f conftest*
9389 xe_check_libs=""
9390
9391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9392   echo "$ac_t""yes" 1>&6
9393   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9394 else
9395   echo "$ac_t""no" 1>&6
9396 fi
9397
9398
9399   
9400 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9401     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9402   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9403   
9404         runpath="" runpath_dirs=""
9405   if test -n "$LD_RUN_PATH"; then
9406     runpath="$LD_RUN_PATH"
9407   elif test "$GCC" = "yes"; then
9408         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9409     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9410     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9411     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9412       case "$arg" in P,* | -L* | -R* )
9413         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9414           {
9415 xe_runpath_dir="$dir"
9416   test "$xe_runpath_dir" != "/lib"     -a \
9417         "$xe_runpath_dir" != "/usr/lib" -a \
9418         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9419   eval "$xe_add_unique_runpath_dir"
9420 }
9421         done ;;
9422       esac
9423     done
9424     ld_switch_run="$ld_switch_run_save"
9425     rm -f conftest*
9426   else
9427         for arg in $ld_switch_site $ld_switch_x_site; do
9428       case "$arg" in -L*) {
9429 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9430   test "$xe_runpath_dir" != "/lib"     -a \
9431         "$xe_runpath_dir" != "/usr/lib" -a \
9432         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9433   eval "$xe_add_unique_runpath_dir"
9434 };; esac
9435     done
9436         if test "$opsys $need_motif" = "sol2 yes"; then
9437       xe_runpath_dir="/opt/SUNWdt/lib";
9438       eval "$xe_add_unique_runpath_dir";
9439     fi
9440   fi 
9441   if test -n "$runpath"; then
9442     ld_switch_run="${dash_r}${runpath}"
9443     
9444 if test "$GCC" = "yes"; then
9445   set x $ld_switch_run; shift; ld_switch_run=""
9446   while test -n "$1"; do
9447     case $1 in
9448       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9449       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9450       -Xlinker* ) ;;
9451       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9452     esac
9453     shift
9454   done
9455 fi
9456     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9457   fi
9458 fi
9459
9460 fi
9461
9462 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
9463 do
9464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9465 echo "configure:9466: checking for $ac_func" >&5
9466
9467 cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470 /* System header to define __stub macros and hopefully few prototypes,
9471     which can conflict with char $ac_func(); below.  */
9472 #include <assert.h>
9473 /* Override any gcc2 internal prototype to avoid an error.  */
9474 /* We use char because int might match the return type of a gcc2
9475     builtin and then its argument prototype would still apply.  */
9476 char $ac_func();
9477
9478 int main() {
9479
9480 /* The GNU C library defines this for functions which it implements
9481     to always fail with ENOSYS.  Some functions are actually named
9482     something starting with __ and the normal name is an alias.  */
9483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9484 choke me
9485 #else
9486 $ac_func();
9487 #endif
9488
9489 ; return 0; }
9490 EOF
9491 if { (eval echo configure:9492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9492   rm -rf conftest*
9493   eval "ac_cv_func_$ac_func=yes"
9494 else
9495   echo "configure: failed program was:" >&5
9496   cat conftest.$ac_ext >&5
9497   rm -rf conftest*
9498   eval "ac_cv_func_$ac_func=no"
9499 fi
9500 rm -f conftest*
9501
9502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9503   echo "$ac_t""yes" 1>&6
9504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9505   { test "$extra_verbose" = "yes" && cat << EOF
9506     Defining $ac_tr_func
9507 EOF
9508 cat >> confdefs.h <<EOF
9509 #define $ac_tr_func 1
9510 EOF
9511 }
9512  
9513 else
9514   echo "$ac_t""no" 1>&6
9515 fi
9516 done
9517
9518
9519
9520 case "$opsys" in
9521   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9522    echo "    xemacs will be linked with \"realpath.o\""
9523  fi ;;
9524   * )
9525     case "$canonical" in
9526       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9527    echo "    xemacs will be linked with \"realpath.o\""
9528  fi ;;
9529       * ) for ac_func in realpath
9530 do
9531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9532 echo "configure:9533: checking for $ac_func" >&5
9533
9534 cat > conftest.$ac_ext <<EOF
9535 #line 9536 "configure"
9536 #include "confdefs.h"
9537 /* System header to define __stub macros and hopefully few prototypes,
9538     which can conflict with char $ac_func(); below.  */
9539 #include <assert.h>
9540 /* Override any gcc2 internal prototype to avoid an error.  */
9541 /* We use char because int might match the return type of a gcc2
9542     builtin and then its argument prototype would still apply.  */
9543 char $ac_func();
9544
9545 int main() {
9546
9547 /* The GNU C library defines this for functions which it implements
9548     to always fail with ENOSYS.  Some functions are actually named
9549     something starting with __ and the normal name is an alias.  */
9550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9551 choke me
9552 #else
9553 $ac_func();
9554 #endif
9555
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9559   rm -rf conftest*
9560   eval "ac_cv_func_$ac_func=yes"
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   eval "ac_cv_func_$ac_func=no"
9566 fi
9567 rm -f conftest*
9568
9569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9570   echo "$ac_t""yes" 1>&6
9571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9572   { test "$extra_verbose" = "yes" && cat << EOF
9573     Defining $ac_tr_func
9574 EOF
9575 cat >> confdefs.h <<EOF
9576 #define $ac_tr_func 1
9577 EOF
9578 }
9579  
9580 else
9581   echo "$ac_t""no" 1>&6
9582 fi
9583 done
9584
9585           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9586    echo "    xemacs will be linked with \"realpath.o\""
9587  fi ;;
9588     esac ;;
9589 esac
9590
9591 for ac_func in getloadavg
9592 do
9593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9594 echo "configure:9595: checking for $ac_func" >&5
9595
9596 cat > conftest.$ac_ext <<EOF
9597 #line 9598 "configure"
9598 #include "confdefs.h"
9599 /* System header to define __stub macros and hopefully few prototypes,
9600     which can conflict with char $ac_func(); below.  */
9601 #include <assert.h>
9602 /* Override any gcc2 internal prototype to avoid an error.  */
9603 /* We use char because int might match the return type of a gcc2
9604     builtin and then its argument prototype would still apply.  */
9605 char $ac_func();
9606
9607 int main() {
9608
9609 /* The GNU C library defines this for functions which it implements
9610     to always fail with ENOSYS.  Some functions are actually named
9611     something starting with __ and the normal name is an alias.  */
9612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9613 choke me
9614 #else
9615 $ac_func();
9616 #endif
9617
9618 ; return 0; }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9621   rm -rf conftest*
9622   eval "ac_cv_func_$ac_func=yes"
9623 else
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   rm -rf conftest*
9627   eval "ac_cv_func_$ac_func=no"
9628 fi
9629 rm -f conftest*
9630
9631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9632   echo "$ac_t""yes" 1>&6
9633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9634   { test "$extra_verbose" = "yes" && cat << EOF
9635     Defining $ac_tr_func
9636 EOF
9637 cat >> confdefs.h <<EOF
9638 #define $ac_tr_func 1
9639 EOF
9640 }
9641  
9642 else
9643   echo "$ac_t""no" 1>&6
9644 fi
9645 done
9646
9647
9648 if test "$ac_cv_func_getloadavg" != "yes"
9649 then
9650   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9651    echo "    xemacs will be linked with \"getloadavg.o\""
9652  fi
9653
9654     
9655 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9656 echo "configure:9657: checking for kstat_open in -lkstat" >&5
9657 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9658
9659 xe_check_libs=" -lkstat "
9660 cat > conftest.$ac_ext <<EOF
9661 #line 9662 "configure"
9662 #include "confdefs.h"
9663 /* Override any gcc2 internal prototype to avoid an error.  */
9664 /* We use char because int might match the return type of a gcc2
9665     builtin and then its argument prototype would still apply.  */
9666 char kstat_open();
9667
9668 int main() {
9669 kstat_open()
9670 ; return 0; }
9671 EOF
9672 if { (eval echo configure:9673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9673   rm -rf conftest*
9674   eval "ac_cv_lib_$ac_lib_var=yes"
9675 else
9676   echo "configure: failed program was:" >&5
9677   cat conftest.$ac_ext >&5
9678   rm -rf conftest*
9679   eval "ac_cv_lib_$ac_lib_var=no"
9680 fi
9681 rm -f conftest*
9682 xe_check_libs=""
9683
9684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9685   echo "$ac_t""yes" 1>&6
9686     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9687     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9688   { test "$extra_verbose" = "yes" && cat << EOF
9689     Defining $ac_tr_lib
9690 EOF
9691 cat >> confdefs.h <<EOF
9692 #define $ac_tr_lib 1
9693 EOF
9694 }
9695
9696   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9697
9698 else
9699   echo "$ac_t""no" 1>&6
9700 fi
9701
9702
9703
9704     
9705 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9706 echo "configure:9707: checking for kvm_read in -lkvm" >&5
9707 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9708
9709 xe_check_libs=" -lkvm "
9710 cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 /* Override any gcc2 internal prototype to avoid an error.  */
9714 /* We use char because int might match the return type of a gcc2
9715     builtin and then its argument prototype would still apply.  */
9716 char kvm_read();
9717
9718 int main() {
9719 kvm_read()
9720 ; return 0; }
9721 EOF
9722 if { (eval echo configure:9723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9723   rm -rf conftest*
9724   eval "ac_cv_lib_$ac_lib_var=yes"
9725 else
9726   echo "configure: failed program was:" >&5
9727   cat conftest.$ac_ext >&5
9728   rm -rf conftest*
9729   eval "ac_cv_lib_$ac_lib_var=no"
9730 fi
9731 rm -f conftest*
9732 xe_check_libs=""
9733
9734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9735   echo "$ac_t""yes" 1>&6
9736     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9737     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9738   { test "$extra_verbose" = "yes" && cat << EOF
9739     Defining $ac_tr_lib
9740 EOF
9741 cat >> confdefs.h <<EOF
9742 #define $ac_tr_lib 1
9743 EOF
9744 }
9745
9746   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9747
9748 else
9749   echo "$ac_t""no" 1>&6
9750 fi
9751
9752
9753 fi
9754
9755 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9756 echo "configure:9757: checking whether netdb declares h_errno" >&5
9757 cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 #include <netdb.h>
9761 int main() {
9762 return h_errno;
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9766   rm -rf conftest*
9767   echo "$ac_t""yes" 1>&6
9768    { test "$extra_verbose" = "yes" && cat << \EOF
9769     Defining HAVE_H_ERRNO
9770 EOF
9771 cat >> confdefs.h <<\EOF
9772 #define HAVE_H_ERRNO 1
9773 EOF
9774 }
9775
9776 else
9777   echo "configure: failed program was:" >&5
9778   cat conftest.$ac_ext >&5
9779   rm -rf conftest*
9780   echo "$ac_t""no" 1>&6
9781 fi
9782 rm -f conftest*
9783
9784 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9785 echo "configure:9786: checking for sigsetjmp" >&5
9786 cat > conftest.$ac_ext <<EOF
9787 #line 9788 "configure"
9788 #include "confdefs.h"
9789 #include <setjmp.h>
9790 int main() {
9791 sigjmp_buf bar; sigsetjmp (bar, 0);
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9795   rm -rf conftest*
9796   echo "$ac_t""yes" 1>&6
9797    { test "$extra_verbose" = "yes" && cat << \EOF
9798     Defining HAVE_SIGSETJMP
9799 EOF
9800 cat >> confdefs.h <<\EOF
9801 #define HAVE_SIGSETJMP 1
9802 EOF
9803 }
9804
9805 else
9806   echo "configure: failed program was:" >&5
9807   cat conftest.$ac_ext >&5
9808   rm -rf conftest*
9809   echo "$ac_t""no" 1>&6
9810 fi
9811 rm -f conftest*
9812
9813 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9814 echo "configure:9815: checking whether localtime caches TZ" >&5
9815
9816 if test "$ac_cv_func_tzset" = "yes"; then
9817 cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 #include <time.h>
9821 #if STDC_HEADERS
9822 # include <stdlib.h>
9823 #endif
9824 extern char **environ;
9825 unset_TZ ()
9826 {
9827   char **from, **to;
9828   for (to = from = environ; (*to = *from); from++)
9829     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9830       to++;
9831 }
9832 char TZ_GMT0[] = "TZ=GMT0";
9833 char TZ_PST8[] = "TZ=PST8";
9834 main()
9835 {
9836   time_t now = time ((time_t *) 0);
9837   int hour_GMT0, hour_unset;
9838   if (putenv (TZ_GMT0) != 0)
9839     exit (1);
9840   hour_GMT0 = localtime (&now)->tm_hour;
9841   unset_TZ ();
9842   hour_unset = localtime (&now)->tm_hour;
9843   if (putenv (TZ_PST8) != 0)
9844     exit (1);
9845   if (localtime (&now)->tm_hour == hour_GMT0)
9846     exit (1);
9847   unset_TZ ();
9848   if (localtime (&now)->tm_hour != hour_unset)
9849     exit (1);
9850   exit (0);
9851 }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9854 then
9855   emacs_cv_localtime_cache=no
9856 else
9857   conftest_rc="$?"
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -fr conftest*
9861   emacs_cv_localtime_cache=yes
9862 fi
9863 rm -fr conftest*
9864 else
9865         # If we lack tzset, report that localtime does not cache TZ,
9866         # since we can't invalidate the cache if we don't have tzset.
9867         emacs_cv_localtime_cache=no
9868 fi
9869 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9870 if test $emacs_cv_localtime_cache = yes; then
9871   { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining LOCALTIME_CACHE
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define LOCALTIME_CACHE 1
9876 EOF
9877 }
9878
9879 fi
9880
9881 if test "$HAVE_TIMEVAL" = "yes"; then
9882 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9883 echo "configure:9884: checking whether gettimeofday accepts one or two arguments" >&5
9884 cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887
9888 #ifdef TIME_WITH_SYS_TIME
9889 #include <sys/time.h>
9890 #include <time.h>
9891 #else
9892 #ifdef HAVE_SYS_TIME_H
9893 #include <sys/time.h>
9894 #else
9895 #include <time.h>
9896 #endif
9897 #endif
9898   
9899 int main() {
9900
9901   struct timeval time;
9902   struct timezone dummy;
9903   gettimeofday (&time, &dummy);
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   echo "$ac_t""two" 1>&6
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   echo "$ac_t""one" 1>&6
9915    { test "$extra_verbose" = "yes" && cat << \EOF
9916     Defining GETTIMEOFDAY_ONE_ARGUMENT
9917 EOF
9918 cat >> confdefs.h <<\EOF
9919 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9920 EOF
9921 }
9922
9923 fi
9924 rm -f conftest*
9925 fi
9926
9927
9928 echo $ac_n "checking for inline""... $ac_c" 1>&6
9929 echo "configure:9930: checking for inline" >&5
9930
9931 ac_cv_c_inline=no
9932 for ac_kw in inline __inline__ __inline; do
9933   cat > conftest.$ac_ext <<EOF
9934 #line 9935 "configure"
9935 #include "confdefs.h"
9936
9937 int main() {
9938 } $ac_kw foo() {
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9942   rm -rf conftest*
9943   ac_cv_c_inline=$ac_kw; break
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947 fi
9948 rm -f conftest*
9949 done
9950
9951
9952 echo "$ac_t""$ac_cv_c_inline" 1>&6
9953 case "$ac_cv_c_inline" in
9954   inline | yes) ;;
9955   no) { test "$extra_verbose" = "yes" && cat << \EOF
9956     Defining inline = 
9957 EOF
9958 cat >> confdefs.h <<\EOF
9959 #define inline 
9960 EOF
9961 }
9962  ;;
9963   *)  { test "$extra_verbose" = "yes" && cat << EOF
9964     Defining inline = $ac_cv_c_inline
9965 EOF
9966 cat >> confdefs.h <<EOF
9967 #define inline $ac_cv_c_inline
9968 EOF
9969 }
9970  ;;
9971 esac
9972
9973 if test "$ac_cv_c_inline" != "no"; then
9974   { test "$extra_verbose" = "yes" && cat << \EOF
9975     Defining HAVE_INLINE
9976 EOF
9977 cat >> confdefs.h <<\EOF
9978 #define HAVE_INLINE 1
9979 EOF
9980 }
9981
9982   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9983    echo "    xemacs will be linked with \"inline.o\""
9984  fi
9985 fi
9986
9987
9988 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9989 # for constant arguments.  Useless!
9990 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9991 echo "configure:9992: checking for working alloca.h" >&5
9992
9993 cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996 #include <alloca.h>
9997 int main() {
9998 char *p = alloca(2 * sizeof(int));
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   ac_cv_header_alloca_h=yes
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   ac_cv_header_alloca_h=no
10009 fi
10010 rm -f conftest*
10011
10012 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10013 if test $ac_cv_header_alloca_h = yes; then
10014   { test "$extra_verbose" = "yes" && cat << \EOF
10015     Defining HAVE_ALLOCA_H
10016 EOF
10017 cat >> confdefs.h <<\EOF
10018 #define HAVE_ALLOCA_H 1
10019 EOF
10020 }
10021
10022 fi
10023
10024 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10025 echo "configure:10026: checking for alloca" >&5
10026
10027 cat > conftest.$ac_ext <<EOF
10028 #line 10029 "configure"
10029 #include "confdefs.h"
10030
10031 #ifdef __GNUC__
10032 # define alloca __builtin_alloca
10033 #else
10034 # ifdef _MSC_VER
10035 #  include <malloc.h>
10036 #  define alloca _alloca
10037 # else
10038 #  if HAVE_ALLOCA_H
10039 #   include <alloca.h>
10040 #  else
10041 #   ifdef _AIX
10042  #pragma alloca
10043 #   else
10044 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10045 char *alloca ();
10046 #    endif
10047 #   endif
10048 #  endif
10049 # endif
10050 #endif
10051
10052 int main() {
10053 char *p = (char *) alloca(1);
10054 ; return 0; }
10055 EOF
10056 if { (eval echo configure:10057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10057   rm -rf conftest*
10058   ac_cv_func_alloca_works=yes
10059 else
10060   echo "configure: failed program was:" >&5
10061   cat conftest.$ac_ext >&5
10062   rm -rf conftest*
10063   ac_cv_func_alloca_works=no
10064 fi
10065 rm -f conftest*
10066
10067 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10068 if test $ac_cv_func_alloca_works = yes; then
10069   { test "$extra_verbose" = "yes" && cat << \EOF
10070     Defining HAVE_ALLOCA
10071 EOF
10072 cat >> confdefs.h <<\EOF
10073 #define HAVE_ALLOCA 1
10074 EOF
10075 }
10076
10077 fi
10078
10079 if test $ac_cv_func_alloca_works = no; then
10080   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10081   # that cause trouble.  Some versions do not even contain alloca or
10082   # contain a buggy version.  If you still want to use their alloca,
10083   # use ar to extract alloca.o from them instead of compiling alloca.c.
10084   ALLOCA=alloca.${ac_objext}
10085   { test "$extra_verbose" = "yes" && cat << \EOF
10086     Defining C_ALLOCA
10087 EOF
10088 cat >> confdefs.h <<\EOF
10089 #define C_ALLOCA 1
10090 EOF
10091 }
10092
10093
10094 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10095 echo "configure:10096: checking whether alloca needs Cray hooks" >&5
10096
10097 cat > conftest.$ac_ext <<EOF
10098 #line 10099 "configure"
10099 #include "confdefs.h"
10100 #if defined(CRAY) && ! defined(CRAY2)
10101 webecray
10102 #else
10103 wenotbecray
10104 #endif
10105
10106 EOF
10107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10108   egrep "webecray" >/dev/null 2>&1; then
10109   rm -rf conftest*
10110   ac_cv_os_cray=yes
10111 else
10112   rm -rf conftest*
10113   ac_cv_os_cray=no
10114 fi
10115 rm -f conftest*
10116
10117
10118 echo "$ac_t""$ac_cv_os_cray" 1>&6
10119 if test $ac_cv_os_cray = yes; then
10120 for ac_func in _getb67 GETB67 getb67; do
10121   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10122 echo "configure:10123: checking for $ac_func" >&5
10123
10124 cat > conftest.$ac_ext <<EOF
10125 #line 10126 "configure"
10126 #include "confdefs.h"
10127 /* System header to define __stub macros and hopefully few prototypes,
10128     which can conflict with char $ac_func(); below.  */
10129 #include <assert.h>
10130 /* Override any gcc2 internal prototype to avoid an error.  */
10131 /* We use char because int might match the return type of a gcc2
10132     builtin and then its argument prototype would still apply.  */
10133 char $ac_func();
10134
10135 int main() {
10136
10137 /* The GNU C library defines this for functions which it implements
10138     to always fail with ENOSYS.  Some functions are actually named
10139     something starting with __ and the normal name is an alias.  */
10140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10141 choke me
10142 #else
10143 $ac_func();
10144 #endif
10145
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10149   rm -rf conftest*
10150   eval "ac_cv_func_$ac_func=yes"
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_func_$ac_func=no"
10156 fi
10157 rm -f conftest*
10158
10159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10160   echo "$ac_t""yes" 1>&6
10161   { test "$extra_verbose" = "yes" && cat << EOF
10162     Defining CRAY_STACKSEG_END = $ac_func
10163 EOF
10164 cat >> confdefs.h <<EOF
10165 #define CRAY_STACKSEG_END $ac_func
10166 EOF
10167 }
10168
10169   break
10170 else
10171   echo "$ac_t""no" 1>&6
10172 fi
10173
10174 done
10175 fi
10176
10177 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10178 echo "configure:10179: checking stack direction for C alloca" >&5
10179
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 find_stack_direction ()
10184 {
10185   static char *addr = 0;
10186   auto char dummy;
10187   if (addr == 0)
10188     {
10189       addr = &dummy;
10190       return find_stack_direction ();
10191     }
10192   else
10193     return (&dummy > addr) ? 1 : -1;
10194 }
10195 main ()
10196 {
10197   exit (find_stack_direction() < 0);
10198 }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10201 then
10202   ac_cv_c_stack_direction=1
10203 else
10204   conftest_rc="$?"
10205   echo "configure: failed program was:" >&5
10206   cat conftest.$ac_ext >&5
10207   rm -fr conftest*
10208   ac_cv_c_stack_direction=-1
10209 fi
10210 rm -fr conftest*
10211
10212 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10213 { test "$extra_verbose" = "yes" && cat << EOF
10214     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10215 EOF
10216 cat >> confdefs.h <<EOF
10217 #define STACK_DIRECTION $ac_cv_c_stack_direction
10218 EOF
10219 }
10220
10221 fi
10222
10223 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10224    echo "    xemacs will be linked with \"$ALLOCA\""
10225  fi
10226
10227 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10228 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10229 echo "configure:10230: checking for vfork.h" >&5
10230
10231 cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include <vfork.h>
10235 EOF
10236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10237 { (eval echo configure:10238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10239 if test -z "$ac_err"; then
10240   rm -rf conftest*
10241   eval "ac_cv_header_$ac_safe=yes"
10242 else
10243   echo "$ac_err" >&5
10244   echo "configure: failed program was:" >&5
10245   cat conftest.$ac_ext >&5
10246   rm -rf conftest*
10247   eval "ac_cv_header_$ac_safe=no"
10248 fi
10249 rm -f conftest*
10250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10251   echo "$ac_t""yes" 1>&6
10252   { test "$extra_verbose" = "yes" && cat << \EOF
10253     Defining HAVE_VFORK_H
10254 EOF
10255 cat >> confdefs.h <<\EOF
10256 #define HAVE_VFORK_H 1
10257 EOF
10258 }
10259
10260 else
10261   echo "$ac_t""no" 1>&6
10262 fi
10263
10264 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10265 echo "configure:10266: checking for working vfork" >&5
10266
10267 cat > conftest.$ac_ext <<EOF
10268 #line 10269 "configure"
10269 #include "confdefs.h"
10270 /* Thanks to Paul Eggert for this test.  */
10271 #include <stdio.h>
10272 #include <sys/types.h>
10273 #include <sys/stat.h>
10274 #ifdef HAVE_UNISTD_H
10275 #include <unistd.h>
10276 #endif
10277 #ifdef HAVE_VFORK_H
10278 #include <vfork.h>
10279 #endif
10280 /* On some sparc systems, changes by the child to local and incoming
10281    argument registers are propagated back to the parent.
10282    The compiler is told about this with #include <vfork.h>,
10283    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10284    Test for this by using a static variable whose address
10285    is put into a register that is clobbered by the vfork.  */
10286 static
10287 #ifdef __cplusplus
10288 sparc_address_test (int arg)
10289 #else
10290 sparc_address_test (arg) int arg;
10291 #endif
10292 {
10293   static pid_t child;
10294   if (!child) {
10295     child = vfork ();
10296     if (child < 0) {
10297       perror ("vfork");
10298       _exit(2);
10299     }
10300     if (!child) {
10301       arg = getpid();
10302       write(-1, "", 0);
10303       _exit (arg);
10304     }
10305   }
10306 }
10307 main() {
10308   pid_t parent = getpid ();
10309   pid_t child;
10310
10311   sparc_address_test ();
10312
10313   child = vfork ();
10314
10315   if (child == 0) {
10316     /* Here is another test for sparc vfork register problems.
10317        This test uses lots of local variables, at least
10318        as many local variables as main has allocated so far
10319        including compiler temporaries.  4 locals are enough for
10320        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10321        A buggy compiler should reuse the register of parent
10322        for one of the local variables, since it will think that
10323        parent can't possibly be used any more in this routine.
10324        Assigning to the local variable will thus munge parent
10325        in the parent process.  */
10326     pid_t
10327       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10328       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10329     /* Convince the compiler that p..p7 are live; otherwise, it might
10330        use the same hardware register for all 8 local variables.  */
10331     if (p != p1 || p != p2 || p != p3 || p != p4
10332         || p != p5 || p != p6 || p != p7)
10333       _exit(1);
10334
10335     /* On some systems (e.g. IRIX 3.3),
10336        vfork doesn't separate parent from child file descriptors.
10337        If the child closes a descriptor before it execs or exits,
10338        this munges the parent's descriptor as well.
10339        Test for this by closing stdout in the child.  */
10340     _exit(close(fileno(stdout)) != 0);
10341   } else {
10342     int status;
10343     struct stat st;
10344
10345     while (wait(&status) != child)
10346       ;
10347     exit(
10348          /* Was there some problem with vforking?  */
10349          child < 0
10350
10351          /* Did the child fail?  (This shouldn't happen.)  */
10352          || status
10353
10354          /* Did the vfork/compiler bug occur?  */
10355          || parent != getpid()
10356
10357          /* Did the file descriptor bug occur?  */
10358          || fstat(fileno(stdout), &st) != 0
10359          );
10360   }
10361 }
10362 EOF
10363 if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10364 then
10365   ac_cv_func_vfork_works=yes
10366 else
10367   conftest_rc="$?"
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -fr conftest*
10371   ac_cv_func_vfork_works=no
10372 fi
10373 rm -fr conftest*
10374
10375 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10376 if test $ac_cv_func_vfork_works = no; then
10377   { test "$extra_verbose" = "yes" && cat << \EOF
10378     Defining vfork = fork
10379 EOF
10380 cat >> confdefs.h <<\EOF
10381 #define vfork fork
10382 EOF
10383 }
10384
10385 fi
10386
10387
10388 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10389 echo "configure:10390: checking for working strcoll" >&5
10390
10391 cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394 #include <string.h>
10395 main ()
10396 {
10397   exit (strcoll ("abc", "def") >= 0 ||
10398         strcoll ("ABC", "DEF") >= 0 ||
10399         strcoll ("123", "456") >= 0);
10400 }
10401 EOF
10402 if { (eval echo configure:10403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10403 then
10404   ac_cv_func_strcoll_works=yes
10405 else
10406   conftest_rc="$?"
10407   echo "configure: failed program was:" >&5
10408   cat conftest.$ac_ext >&5
10409   rm -fr conftest*
10410   ac_cv_func_strcoll_works=no
10411 fi
10412 rm -fr conftest*
10413
10414 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10415 if test $ac_cv_func_strcoll_works = yes; then
10416   { test "$extra_verbose" = "yes" && cat << \EOF
10417     Defining HAVE_STRCOLL
10418 EOF
10419 cat >> confdefs.h <<\EOF
10420 #define HAVE_STRCOLL 1
10421 EOF
10422 }
10423
10424 fi
10425
10426
10427 for ac_func in getpgrp
10428 do
10429 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10430 echo "configure:10431: checking for $ac_func" >&5
10431
10432 cat > conftest.$ac_ext <<EOF
10433 #line 10434 "configure"
10434 #include "confdefs.h"
10435 /* System header to define __stub macros and hopefully few prototypes,
10436     which can conflict with char $ac_func(); below.  */
10437 #include <assert.h>
10438 /* Override any gcc2 internal prototype to avoid an error.  */
10439 /* We use char because int might match the return type of a gcc2
10440     builtin and then its argument prototype would still apply.  */
10441 char $ac_func();
10442
10443 int main() {
10444
10445 /* The GNU C library defines this for functions which it implements
10446     to always fail with ENOSYS.  Some functions are actually named
10447     something starting with __ and the normal name is an alias.  */
10448 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10449 choke me
10450 #else
10451 $ac_func();
10452 #endif
10453
10454 ; return 0; }
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10457   rm -rf conftest*
10458   eval "ac_cv_func_$ac_func=yes"
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_func_$ac_func=no"
10464 fi
10465 rm -f conftest*
10466
10467 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10468   echo "$ac_t""yes" 1>&6
10469     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10470   { test "$extra_verbose" = "yes" && cat << EOF
10471     Defining $ac_tr_func
10472 EOF
10473 cat >> confdefs.h <<EOF
10474 #define $ac_tr_func 1
10475 EOF
10476 }
10477  
10478 else
10479   echo "$ac_t""no" 1>&6
10480 fi
10481 done
10482
10483 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10484 echo "configure:10485: checking whether getpgrp takes no argument" >&5
10485
10486 cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489
10490 /*
10491  * If this system has a BSD-style getpgrp(),
10492  * which takes a pid argument, exit unsuccessfully.
10493  *
10494  * Snarfed from Chet Ramey's bash pgrp.c test program
10495  */
10496 #include <stdio.h>
10497 #include <sys/types.h>
10498
10499 int     pid;
10500 int     pg1, pg2, pg3, pg4;
10501 int     ng, np, s, child;
10502
10503 main()
10504 {
10505         pid = getpid();
10506         pg1 = getpgrp(0);
10507         pg2 = getpgrp();
10508         pg3 = getpgrp(pid);
10509         pg4 = getpgrp(1);
10510
10511         /*
10512          * If all of these values are the same, it's pretty sure that
10513          * we're on a system that ignores getpgrp's first argument.
10514          */
10515         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10516                 exit(0);
10517
10518         child = fork();
10519         if (child < 0)
10520                 exit(1);
10521         else if (child == 0) {
10522                 np = getpid();
10523                 /*
10524                  * If this is Sys V, this will not work; pgrp will be
10525                  * set to np because setpgrp just changes a pgrp to be
10526                  * the same as the pid.
10527                  */
10528                 setpgrp(np, pg1);
10529                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10530                 if (ng == pg1) {
10531                         exit(1);
10532                 } else {
10533                         exit(0);
10534                 }
10535         } else {
10536                 wait(&s);
10537                 exit(s>>8);
10538         }
10539 }
10540
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10543 then
10544   ac_cv_func_getpgrp_void=yes
10545 else
10546   conftest_rc="$?"
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -fr conftest*
10550   ac_cv_func_getpgrp_void=no
10551 fi
10552 rm -fr conftest*
10553
10554
10555 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10556 if test $ac_cv_func_getpgrp_void = yes; then
10557   { test "$extra_verbose" = "yes" && cat << \EOF
10558     Defining GETPGRP_VOID
10559 EOF
10560 cat >> confdefs.h <<\EOF
10561 #define GETPGRP_VOID 1
10562 EOF
10563 }
10564
10565 fi
10566
10567
10568 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10569 echo "configure:10570: checking for working mmap" >&5
10570 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10571 cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574 #include <stdio.h>
10575 #include <unistd.h>
10576 #include <fcntl.h>
10577 #include <sys/mman.h>
10578
10579 #ifndef MAP_VARIABLE
10580 #define MAP_VARIABLE 0
10581 #endif
10582
10583 #ifndef MAP_FAILED
10584 #define MAP_FAILED -1
10585 #endif
10586
10587 int main (int argc, char *argv[])
10588 {
10589   int fd = -1;
10590   caddr_t p;
10591 #ifndef MAP_ANONYMOUS
10592   fd = open ("/dev/zero", O_RDWR);
10593   if (fd < 0)
10594     return 1;
10595 #define MAP_ANONYMOUS 0
10596 #endif
10597   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10598            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10599            fd, 0) != (void *) MAP_FAILED)
10600     return 0;
10601   perror ("conftest: mmap failed");
10602   return 1;
10603 }
10604 EOF
10605 if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10606 then
10607   have_mmap=yes
10608 else
10609   conftest_rc="$?"
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -fr conftest*
10613   have_mmap=no
10614 fi
10615 rm -fr conftest* ;;
10616 esac
10617 echo "$ac_t""$have_mmap" 1>&6
10618 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10619     Defining HAVE_MMAP
10620 EOF
10621 cat >> confdefs.h <<\EOF
10622 #define HAVE_MMAP 1
10623 EOF
10624 }
10625
10626
10627 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10628 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10629 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10630     Defining REL_ALLOC
10631 EOF
10632 cat >> confdefs.h <<\EOF
10633 #define REL_ALLOC 1
10634 EOF
10635 }
10636
10637
10638 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10639 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10640 echo "configure:10641: checking for termios.h" >&5
10641
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 #include <termios.h>
10646 EOF
10647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10648 { (eval echo configure:10649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10650 if test -z "$ac_err"; then
10651   rm -rf conftest*
10652   eval "ac_cv_header_$ac_safe=yes"
10653 else
10654   echo "$ac_err" >&5
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   eval "ac_cv_header_$ac_safe=no"
10659 fi
10660 rm -f conftest*
10661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10662   echo "$ac_t""yes" 1>&6
10663   { test "$extra_verbose" = "yes" && cat << \EOF
10664     Defining HAVE_TERMIOS
10665 EOF
10666 cat >> confdefs.h <<\EOF
10667 #define HAVE_TERMIOS 1
10668 EOF
10669 }
10670
10671   { test "$extra_verbose" = "yes" && cat << \EOF
10672     Defining SIGNALS_VIA_CHARACTERS
10673 EOF
10674 cat >> confdefs.h <<\EOF
10675 #define SIGNALS_VIA_CHARACTERS 1
10676 EOF
10677 }
10678
10679   { test "$extra_verbose" = "yes" && cat << \EOF
10680     Defining NO_TERMIO
10681 EOF
10682 cat >> confdefs.h <<\EOF
10683 #define NO_TERMIO 1
10684 EOF
10685 }
10686
10687 else
10688   echo "$ac_t""no" 1>&6
10689 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10690 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10691 echo "configure:10692: checking for termio.h" >&5
10692
10693 cat > conftest.$ac_ext <<EOF
10694 #line 10695 "configure"
10695 #include "confdefs.h"
10696 #include <termio.h>
10697 EOF
10698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10699 { (eval echo configure:10700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10701 if test -z "$ac_err"; then
10702   rm -rf conftest*
10703   eval "ac_cv_header_$ac_safe=yes"
10704 else
10705   echo "$ac_err" >&5
10706   echo "configure: failed program was:" >&5
10707   cat conftest.$ac_ext >&5
10708   rm -rf conftest*
10709   eval "ac_cv_header_$ac_safe=no"
10710 fi
10711 rm -f conftest*
10712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10713   echo "$ac_t""yes" 1>&6
10714   { test "$extra_verbose" = "yes" && cat << \EOF
10715     Defining HAVE_TERMIO
10716 EOF
10717 cat >> confdefs.h <<\EOF
10718 #define HAVE_TERMIO 1
10719 EOF
10720 }
10721
10722 else
10723   echo "$ac_t""no" 1>&6
10724 fi
10725
10726 fi
10727
10728
10729
10730 echo $ac_n "checking for socket""... $ac_c" 1>&6
10731 echo "configure:10732: checking for socket" >&5
10732
10733 cat > conftest.$ac_ext <<EOF
10734 #line 10735 "configure"
10735 #include "confdefs.h"
10736 /* System header to define __stub macros and hopefully few prototypes,
10737     which can conflict with char socket(); below.  */
10738 #include <assert.h>
10739 /* Override any gcc2 internal prototype to avoid an error.  */
10740 /* We use char because int might match the return type of a gcc2
10741     builtin and then its argument prototype would still apply.  */
10742 char socket();
10743
10744 int main() {
10745
10746 /* The GNU C library defines this for functions which it implements
10747     to always fail with ENOSYS.  Some functions are actually named
10748     something starting with __ and the normal name is an alias.  */
10749 #if defined (__stub_socket) || defined (__stub___socket)
10750 choke me
10751 #else
10752 socket();
10753 #endif
10754
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_func_socket=yes"
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   eval "ac_cv_func_socket=no"
10765 fi
10766 rm -f conftest*
10767
10768 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10769   echo "$ac_t""yes" 1>&6
10770   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10771 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10772 echo "configure:10773: checking for netinet/in.h" >&5
10773
10774 cat > conftest.$ac_ext <<EOF
10775 #line 10776 "configure"
10776 #include "confdefs.h"
10777 #include <netinet/in.h>
10778 EOF
10779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10780 { (eval echo configure:10781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10782 if test -z "$ac_err"; then
10783   rm -rf conftest*
10784   eval "ac_cv_header_$ac_safe=yes"
10785 else
10786   echo "$ac_err" >&5
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   eval "ac_cv_header_$ac_safe=no"
10791 fi
10792 rm -f conftest*
10793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10794   echo "$ac_t""yes" 1>&6
10795   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10796 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10797 echo "configure:10798: checking for arpa/inet.h" >&5
10798
10799 cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 #include <arpa/inet.h>
10803 EOF
10804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10805 { (eval echo configure:10806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10807 if test -z "$ac_err"; then
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=yes"
10810 else
10811   echo "$ac_err" >&5
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_header_$ac_safe=no"
10816 fi
10817 rm -f conftest*
10818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10819   echo "$ac_t""yes" 1>&6
10820   
10821   { test "$extra_verbose" = "yes" && cat << \EOF
10822     Defining HAVE_SOCKETS
10823 EOF
10824 cat >> confdefs.h <<\EOF
10825 #define HAVE_SOCKETS 1
10826 EOF
10827 }
10828
10829       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10830 echo "configure:10831: checking "for sun_len member in struct sockaddr_un"" >&5
10831       cat > conftest.$ac_ext <<EOF
10832 #line 10833 "configure"
10833 #include "confdefs.h"
10834
10835 #include <sys/types.h>
10836 #include <sys/socket.h>
10837 #include <sys/un.h>
10838       
10839 int main() {
10840 static struct sockaddr_un x; x.sun_len = 1;
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10846     Defining HAVE_SOCKADDR_SUN_LEN
10847 EOF
10848 cat >> confdefs.h <<\EOF
10849 #define HAVE_SOCKADDR_SUN_LEN 1
10850 EOF
10851 }
10852
10853 else
10854   echo "configure: failed program was:" >&5
10855   cat conftest.$ac_ext >&5
10856   rm -rf conftest*
10857   echo "$ac_t""no" 1>&6
10858 fi
10859 rm -f conftest*
10860       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10861 echo "configure:10862: checking "for ip_mreq struct in netinet/in.h"" >&5
10862       cat > conftest.$ac_ext <<EOF
10863 #line 10864 "configure"
10864 #include "confdefs.h"
10865
10866 #include <sys/types.h>
10867 #include <netinet/in.h>
10868       
10869 int main() {
10870 static struct ip_mreq x;
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10874   rm -rf conftest*
10875   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10876     Defining HAVE_MULTICAST
10877 EOF
10878 cat >> confdefs.h <<\EOF
10879 #define HAVE_MULTICAST 1
10880 EOF
10881 }
10882
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 rm -f conftest*
10890 else
10891   echo "$ac_t""no" 1>&6
10892 fi
10893
10894 else
10895   echo "$ac_t""no" 1>&6
10896 fi
10897
10898 else
10899   echo "$ac_t""no" 1>&6
10900 fi
10901
10902
10903 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10904 echo "configure:10905: checking for msgget" >&5
10905
10906 cat > conftest.$ac_ext <<EOF
10907 #line 10908 "configure"
10908 #include "confdefs.h"
10909 /* System header to define __stub macros and hopefully few prototypes,
10910     which can conflict with char msgget(); below.  */
10911 #include <assert.h>
10912 /* Override any gcc2 internal prototype to avoid an error.  */
10913 /* We use char because int might match the return type of a gcc2
10914     builtin and then its argument prototype would still apply.  */
10915 char msgget();
10916
10917 int main() {
10918
10919 /* The GNU C library defines this for functions which it implements
10920     to always fail with ENOSYS.  Some functions are actually named
10921     something starting with __ and the normal name is an alias.  */
10922 #if defined (__stub_msgget) || defined (__stub___msgget)
10923 choke me
10924 #else
10925 msgget();
10926 #endif
10927
10928 ; return 0; }
10929 EOF
10930 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10931   rm -rf conftest*
10932   eval "ac_cv_func_msgget=yes"
10933 else
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -rf conftest*
10937   eval "ac_cv_func_msgget=no"
10938 fi
10939 rm -f conftest*
10940
10941 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10942   echo "$ac_t""yes" 1>&6
10943   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10944 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10945 echo "configure:10946: checking for sys/ipc.h" >&5
10946
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <sys/ipc.h>
10951 EOF
10952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10953 { (eval echo configure:10954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10955 if test -z "$ac_err"; then
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=yes"
10958 else
10959   echo "$ac_err" >&5
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=no"
10964 fi
10965 rm -f conftest*
10966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10969 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10970 echo "configure:10971: checking for sys/msg.h" >&5
10971
10972 cat > conftest.$ac_ext <<EOF
10973 #line 10974 "configure"
10974 #include "confdefs.h"
10975 #include <sys/msg.h>
10976 EOF
10977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10978 { (eval echo configure:10979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10980 if test -z "$ac_err"; then
10981   rm -rf conftest*
10982   eval "ac_cv_header_$ac_safe=yes"
10983 else
10984   echo "$ac_err" >&5
10985   echo "configure: failed program was:" >&5
10986   cat conftest.$ac_ext >&5
10987   rm -rf conftest*
10988   eval "ac_cv_header_$ac_safe=no"
10989 fi
10990 rm -f conftest*
10991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10992   echo "$ac_t""yes" 1>&6
10993   { test "$extra_verbose" = "yes" && cat << \EOF
10994     Defining HAVE_SYSVIPC
10995 EOF
10996 cat >> confdefs.h <<\EOF
10997 #define HAVE_SYSVIPC 1
10998 EOF
10999 }
11000
11001 else
11002   echo "$ac_t""no" 1>&6
11003 fi
11004
11005 else
11006   echo "$ac_t""no" 1>&6
11007 fi
11008
11009 else
11010   echo "$ac_t""no" 1>&6
11011 fi
11012
11013
11014 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11015 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11016 echo "configure:11017: checking for dirent.h" >&5
11017
11018 cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021 #include <dirent.h>
11022 EOF
11023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11024 { (eval echo configure:11025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11026 if test -z "$ac_err"; then
11027   rm -rf conftest*
11028   eval "ac_cv_header_$ac_safe=yes"
11029 else
11030   echo "$ac_err" >&5
11031   echo "configure: failed program was:" >&5
11032   cat conftest.$ac_ext >&5
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=no"
11035 fi
11036 rm -f conftest*
11037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11038   echo "$ac_t""yes" 1>&6
11039   { test "$extra_verbose" = "yes" && cat << \EOF
11040     Defining SYSV_SYSTEM_DIR
11041 EOF
11042 cat >> confdefs.h <<\EOF
11043 #define SYSV_SYSTEM_DIR 1
11044 EOF
11045 }
11046
11047 else
11048   echo "$ac_t""no" 1>&6
11049 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11050 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11051 echo "configure:11052: checking for sys/dir.h" >&5
11052
11053 cat > conftest.$ac_ext <<EOF
11054 #line 11055 "configure"
11055 #include "confdefs.h"
11056 #include <sys/dir.h>
11057 EOF
11058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11059 { (eval echo configure:11060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11061 if test -z "$ac_err"; then
11062   rm -rf conftest*
11063   eval "ac_cv_header_$ac_safe=yes"
11064 else
11065   echo "$ac_err" >&5
11066   echo "configure: failed program was:" >&5
11067   cat conftest.$ac_ext >&5
11068   rm -rf conftest*
11069   eval "ac_cv_header_$ac_safe=no"
11070 fi
11071 rm -f conftest*
11072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074   :
11075 else
11076   echo "$ac_t""no" 1>&6
11077 { test "$extra_verbose" = "yes" && cat << \EOF
11078     Defining NONSYSTEM_DIR_LIBRARY
11079 EOF
11080 cat >> confdefs.h <<\EOF
11081 #define NONSYSTEM_DIR_LIBRARY 1
11082 EOF
11083 }
11084
11085 fi
11086
11087 fi
11088
11089
11090 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11091 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11092 echo "configure:11093: checking for nlist.h" >&5
11093
11094 cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 #include <nlist.h>
11098 EOF
11099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11100 { (eval echo configure:11101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11102 if test -z "$ac_err"; then
11103   rm -rf conftest*
11104   eval "ac_cv_header_$ac_safe=yes"
11105 else
11106   echo "$ac_err" >&5
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_header_$ac_safe=no"
11111 fi
11112 rm -f conftest*
11113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115   { test "$extra_verbose" = "yes" && cat << \EOF
11116     Defining NLIST_STRUCT
11117 EOF
11118 cat >> confdefs.h <<\EOF
11119 #define NLIST_STRUCT 1
11120 EOF
11121 }
11122
11123 else
11124   echo "$ac_t""no" 1>&6
11125 fi
11126
11127
11128
11129 echo "checking "for sound support"" 1>&6
11130 echo "configure:11131: checking "for sound support"" >&5
11131 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11132
11133 if test "$with_native_sound" != "no"; then
11134     if test -n "$native_sound_lib"; then
11135     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11136 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11137 echo "configure:11138: checking for multimedia/audio_device.h" >&5
11138
11139 cat > conftest.$ac_ext <<EOF
11140 #line 11141 "configure"
11141 #include "confdefs.h"
11142 #include <multimedia/audio_device.h>
11143 EOF
11144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11145 { (eval echo configure:11146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11147 if test -z "$ac_err"; then
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=yes"
11150 else
11151   echo "$ac_err" >&5
11152   echo "configure: failed program was:" >&5
11153   cat conftest.$ac_ext >&5
11154   rm -rf conftest*
11155   eval "ac_cv_header_$ac_safe=no"
11156 fi
11157 rm -f conftest*
11158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11159   echo "$ac_t""yes" 1>&6
11160   sound_found=yes sound_cflags=""
11161       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11162    echo "    xemacs will be linked with \"sunplay.o\""
11163  fi
11164 else
11165   echo "$ac_t""no" 1>&6
11166 fi
11167
11168   fi
11169
11170     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11171     sound_found=yes
11172     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11173    echo "    xemacs will be linked with \"sunplay.o\""
11174  fi
11175     if test -d "/usr/demo/SOUND/include"
11176       then sound_cflags="-I/usr/demo/SOUND/include"
11177       else sound_cflags="-I/usr/demo/SOUND"
11178     fi
11179     if test -z "$native_sound_lib" ; then
11180       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11181         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11182         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11183       fi
11184     fi
11185   fi
11186
11187     if test -z "$sound_found"; then
11188     case "$canonical" in
11189     *-sgi-* )
11190       if test -z "$native_sound_lib"; then
11191         
11192 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11193 echo "configure:11194: checking for ALopenport in -laudio" >&5
11194 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11195
11196 xe_check_libs=" -laudio "
11197 cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 /* Override any gcc2 internal prototype to avoid an error.  */
11201 /* We use char because int might match the return type of a gcc2
11202     builtin and then its argument prototype would still apply.  */
11203 char ALopenport();
11204
11205 int main() {
11206 ALopenport()
11207 ; return 0; }
11208 EOF
11209 if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11210   rm -rf conftest*
11211   eval "ac_cv_lib_$ac_lib_var=yes"
11212 else
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   eval "ac_cv_lib_$ac_lib_var=no"
11217 fi
11218 rm -f conftest*
11219 xe_check_libs=""
11220
11221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11222   echo "$ac_t""yes" 1>&6
11223   native_sound_lib="-laudio"
11224 else
11225   echo "$ac_t""no" 1>&6
11226 fi
11227
11228
11229       fi
11230       if test -n "$native_sound_lib"; then
11231         sound_found=yes sound_cflags=""
11232         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11233    echo "    xemacs will be linked with \"sgiplay.o\""
11234  fi
11235       fi ;;
11236     hppa*-hp-hpux* )
11237       if test -z "$native_sound_lib"; then
11238         
11239 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11240 echo "configure:11241: checking for AOpenAudio in -lAlib" >&5
11241 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11242
11243 xe_check_libs=" -lAlib "
11244 cat > conftest.$ac_ext <<EOF
11245 #line 11246 "configure"
11246 #include "confdefs.h"
11247 /* Override any gcc2 internal prototype to avoid an error.  */
11248 /* We use char because int might match the return type of a gcc2
11249     builtin and then its argument prototype would still apply.  */
11250 char AOpenAudio();
11251
11252 int main() {
11253 AOpenAudio()
11254 ; return 0; }
11255 EOF
11256 if { (eval echo configure:11257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11257   rm -rf conftest*
11258   eval "ac_cv_lib_$ac_lib_var=yes"
11259 else
11260   echo "configure: failed program was:" >&5
11261   cat conftest.$ac_ext >&5
11262   rm -rf conftest*
11263   eval "ac_cv_lib_$ac_lib_var=no"
11264 fi
11265 rm -f conftest*
11266 xe_check_libs=""
11267
11268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11269   echo "$ac_t""yes" 1>&6
11270   native_sound_lib="-lAlib"
11271 else
11272   echo "$ac_t""no" 1>&6
11273 fi
11274
11275
11276       fi
11277       if test -n "$native_sound_lib"; then
11278         sound_found=yes
11279         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11280    echo "    xemacs will be linked with \"hpplay.o\""
11281  fi
11282         if test "$GCC" = "yes" # Kludge city
11283           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11284           else sound_cflags="+e -I/usr/audio/examples"
11285         fi
11286       fi ;;
11287     esac
11288   fi
11289
11290     if test -z "$sound_found"; then
11291     for dir in "machine" "sys" "linux"; do
11292       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11293 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11294 echo "configure:11295: checking for ${dir}/soundcard.h" >&5
11295
11296 cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299 #include <${dir}/soundcard.h>
11300 EOF
11301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11302 { (eval echo configure:11303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11304 if test -z "$ac_err"; then
11305   rm -rf conftest*
11306   eval "ac_cv_header_$ac_safe=yes"
11307 else
11308   echo "$ac_err" >&5
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   eval "ac_cv_header_$ac_safe=no"
11313 fi
11314 rm -f conftest*
11315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317   sound_found=yes
11318        need_miscplay=yes
11319         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11320    echo "    xemacs will be linked with \"linuxplay.o\""
11321  fi
11322         { test "$extra_verbose" = "yes" && cat << EOF
11323     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11324 EOF
11325 cat >> confdefs.h <<EOF
11326 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11327 EOF
11328 }
11329
11330         break
11331 else
11332   echo "$ac_t""no" 1>&6
11333 fi
11334
11335     done
11336   fi
11337
11338   test "$sound_found" = "yes" && with_native_sound=yes
11339 fi
11340
11341 if test "$with_native_sound" = "yes"; then
11342   { test "$extra_verbose" = "yes" && cat << \EOF
11343     Defining HAVE_NATIVE_SOUND
11344 EOF
11345 cat >> confdefs.h <<\EOF
11346 #define HAVE_NATIVE_SOUND 1
11347 EOF
11348 }
11349
11350   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11351 fi
11352
11353 if test "$with_nas_sound" != "no"; then
11354   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11355 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11356 echo "configure:11357: checking for audio/audiolib.h" >&5
11357
11358 cat > conftest.$ac_ext <<EOF
11359 #line 11360 "configure"
11360 #include "confdefs.h"
11361 #include <audio/audiolib.h>
11362 EOF
11363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11364 { (eval echo configure:11365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11366 if test -z "$ac_err"; then
11367   rm -rf conftest*
11368   eval "ac_cv_header_$ac_safe=yes"
11369 else
11370   echo "$ac_err" >&5
11371   echo "configure: failed program was:" >&5
11372   cat conftest.$ac_ext >&5
11373   rm -rf conftest*
11374   eval "ac_cv_header_$ac_safe=no"
11375 fi
11376 rm -f conftest*
11377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11378   echo "$ac_t""yes" 1>&6
11379   
11380     
11381 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11382 echo "configure:11383: checking for AuOpenServer in -laudio" >&5
11383 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11384
11385 xe_check_libs=" -laudio "
11386 cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 /* Override any gcc2 internal prototype to avoid an error.  */
11390 /* We use char because int might match the return type of a gcc2
11391     builtin and then its argument prototype would still apply.  */
11392 char AuOpenServer();
11393
11394 int main() {
11395 AuOpenServer()
11396 ; return 0; }
11397 EOF
11398 if { (eval echo configure:11399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11399   rm -rf conftest*
11400   eval "ac_cv_lib_$ac_lib_var=yes"
11401 else
11402   echo "configure: failed program was:" >&5
11403   cat conftest.$ac_ext >&5
11404   rm -rf conftest*
11405   eval "ac_cv_lib_$ac_lib_var=no"
11406 fi
11407 rm -f conftest*
11408 xe_check_libs=""
11409
11410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11411   echo "$ac_t""yes" 1>&6
11412   have_nas_sound=yes
11413 else
11414   echo "$ac_t""no" 1>&6
11415 fi
11416
11417
11418 else
11419   echo "$ac_t""no" 1>&6
11420 fi
11421
11422   if test "$have_nas_sound" = "yes"; then
11423     with_nas_sound=yes
11424     { test "$extra_verbose" = "yes" && cat << \EOF
11425     Defining HAVE_NAS_SOUND
11426 EOF
11427 cat >> confdefs.h <<\EOF
11428 #define HAVE_NAS_SOUND 1
11429 EOF
11430 }
11431
11432     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11433    echo "    xemacs will be linked with \"nas.o\""
11434  fi
11435     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11436             cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 #include <audio/Xtutil.h>
11440 EOF
11441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11442   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11443   :
11444 else
11445   rm -rf conftest*
11446   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11447     Defining NAS_NO_ERROR_JUMP
11448 EOF
11449 cat >> confdefs.h <<\EOF
11450 #define NAS_NO_ERROR_JUMP 1
11451 EOF
11452 }
11453
11454 fi
11455 rm -f conftest*
11456
11457   else
11458     test "$with_nas_sound" = "yes" && \
11459       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11460     with_nas_sound=no
11461   fi
11462 fi
11463
11464 if test "$with_esd_sound" != "no"; then
11465   # Extract the first word of "esd-config", so it can be a program name with args.
11466 set dummy esd-config; ac_word=$2
11467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11468 echo "configure:11469: checking for $ac_word" >&5
11469
11470 if test -n "$have_esd_config"; then
11471   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11472 else
11473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11474   ac_dummy="$PATH"
11475   for ac_dir in $ac_dummy; do
11476     test -z "$ac_dir" && ac_dir=.
11477     if test -f $ac_dir/$ac_word; then
11478       ac_cv_prog_have_esd_config="yes"
11479       break
11480     fi
11481   done
11482   IFS="$ac_save_ifs"
11483   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11484 fi
11485 have_esd_config="$ac_cv_prog_have_esd_config"
11486 if test -n "$have_esd_config"; then
11487   echo "$ac_t""$have_esd_config" 1>&6
11488 else
11489   echo "$ac_t""no" 1>&6
11490 fi
11491
11492   if test "$have_esd_config" = "yes"; then
11493     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11494     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
11495     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11496     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11497 echo "configure:11498: checking for esd_play_stream" >&5
11498
11499 cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502 /* System header to define __stub macros and hopefully few prototypes,
11503     which can conflict with char esd_play_stream(); below.  */
11504 #include <assert.h>
11505 /* Override any gcc2 internal prototype to avoid an error.  */
11506 /* We use char because int might match the return type of a gcc2
11507     builtin and then its argument prototype would still apply.  */
11508 char esd_play_stream();
11509
11510 int main() {
11511
11512 /* The GNU C library defines this for functions which it implements
11513     to always fail with ENOSYS.  Some functions are actually named
11514     something starting with __ and the normal name is an alias.  */
11515 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11516 choke me
11517 #else
11518 esd_play_stream();
11519 #endif
11520
11521 ; return 0; }
11522 EOF
11523 if { (eval echo configure:11524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11524   rm -rf conftest*
11525   eval "ac_cv_func_esd_play_stream=yes"
11526 else
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -rf conftest*
11530   eval "ac_cv_func_esd_play_stream=no"
11531 fi
11532 rm -f conftest*
11533
11534 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11535   echo "$ac_t""yes" 1>&6
11536   have_esd_sound=yes
11537 else
11538   echo "$ac_t""no" 1>&6
11539 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11540 fi
11541
11542   fi
11543
11544   if test "$have_esd_sound" = "yes"; then
11545     with_esd_sound=yes
11546     need_miscplay=yes
11547     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11548    echo "    xemacs will be linked with \"esd.o\""
11549  fi
11550     { test "$extra_verbose" = "yes" && cat << \EOF
11551     Defining HAVE_ESD_SOUND
11552 EOF
11553 cat >> confdefs.h <<\EOF
11554 #define HAVE_ESD_SOUND 1
11555 EOF
11556 }
11557
11558   else
11559     test "$with_esd_sound" = "yes" && \
11560       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11561     with_esd_sound=no
11562   fi
11563 fi
11564
11565 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11566    echo "    xemacs will be linked with \"miscplay.o\""
11567  fi
11568
11569
11570 test -z "$with_tty" && with_tty=yes
11571
11572 if test "$with_tty" = "yes"  ; then
11573   echo "checking for TTY-related features" 1>&6
11574 echo "configure:11575: checking for TTY-related features" >&5
11575   { test "$extra_verbose" = "yes" && cat << \EOF
11576     Defining HAVE_TTY
11577 EOF
11578 cat >> confdefs.h <<\EOF
11579 #define HAVE_TTY 1
11580 EOF
11581 }
11582
11583   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
11584    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\""
11585  fi
11586
11587     if test -z "$with_ncurses"; then
11588     
11589 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11590 echo "configure:11591: checking for tgetent in -lncurses" >&5
11591 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11592
11593 xe_check_libs=" -lncurses "
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 /* Override any gcc2 internal prototype to avoid an error.  */
11598 /* We use char because int might match the return type of a gcc2
11599     builtin and then its argument prototype would still apply.  */
11600 char tgetent();
11601
11602 int main() {
11603 tgetent()
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   eval "ac_cv_lib_$ac_lib_var=yes"
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   eval "ac_cv_lib_$ac_lib_var=no"
11614 fi
11615 rm -f conftest*
11616 xe_check_libs=""
11617
11618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11619   echo "$ac_t""yes" 1>&6
11620   with_ncurses=yes
11621 else
11622   echo "$ac_t""no" 1>&6
11623 with_ncurses=no
11624 fi
11625
11626
11627   fi
11628   if test "$with_ncurses" = "yes"; then
11629     { test "$extra_verbose" = "yes" && cat << \EOF
11630     Defining HAVE_NCURSES
11631 EOF
11632 cat >> confdefs.h <<\EOF
11633 #define HAVE_NCURSES 1
11634 EOF
11635 }
11636
11637     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11638 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11639 echo "configure:11640: checking for ncurses/curses.h" >&5
11640
11641 cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644 #include <ncurses/curses.h>
11645 EOF
11646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11647 { (eval echo configure:11648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11649 if test -z "$ac_err"; then
11650   rm -rf conftest*
11651   eval "ac_cv_header_$ac_safe=yes"
11652 else
11653   echo "$ac_err" >&5
11654   echo "configure: failed program was:" >&5
11655   cat conftest.$ac_ext >&5
11656   rm -rf conftest*
11657   eval "ac_cv_header_$ac_safe=no"
11658 fi
11659 rm -f conftest*
11660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11661   echo "$ac_t""yes" 1>&6
11662   curses_h_path=ncurses/curses.h
11663 else
11664   echo "$ac_t""no" 1>&6
11665 fi
11666
11667     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11668 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11669 echo "configure:11670: checking for ncurses/term.h" >&5
11670
11671 cat > conftest.$ac_ext <<EOF
11672 #line 11673 "configure"
11673 #include "confdefs.h"
11674 #include <ncurses/term.h>
11675 EOF
11676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11677 { (eval echo configure:11678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11679 if test -z "$ac_err"; then
11680   rm -rf conftest*
11681   eval "ac_cv_header_$ac_safe=yes"
11682 else
11683   echo "$ac_err" >&5
11684   echo "configure: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   rm -rf conftest*
11687   eval "ac_cv_header_$ac_safe=no"
11688 fi
11689 rm -f conftest*
11690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11691   echo "$ac_t""yes" 1>&6
11692   term_h_path=ncurses/term.h
11693 else
11694   echo "$ac_t""no" 1>&6
11695 fi
11696
11697     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11698    echo "    xemacs will be linked with \"terminfo.o\""
11699  fi
11700     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11701
11702     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11703                         save_c_switch_site="$c_switch_site"
11704       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11705       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11706 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11707 echo "configure:11708: checking for ncurses/curses.h" >&5
11708
11709 cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <ncurses/curses.h>
11713 EOF
11714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11715 { (eval echo configure:11716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11717 if test -z "$ac_err"; then
11718   rm -rf conftest*
11719   eval "ac_cv_header_$ac_safe=yes"
11720 else
11721   echo "$ac_err" >&5
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -rf conftest*
11725   eval "ac_cv_header_$ac_safe=no"
11726 fi
11727 rm -f conftest*
11728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11729   echo "$ac_t""yes" 1>&6
11730   curses_h_path=ncurses/curses.h
11731 else
11732   echo "$ac_t""no" 1>&6
11733 fi
11734
11735       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11736         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11737         else c_switch_site="$save_c_switch_site"
11738       fi
11739     fi
11740   else         if test "$have_terminfo" = "yes"; then
11741       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11742    echo "    xemacs will be linked with \"terminfo.o\""
11743  fi
11744       if test -n "$libs_termcap"; then
11745         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11746       else
11747         for lib in curses termlib termcap; do
11748           
11749 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11750 echo "configure:11751: checking for tgetent in -l$lib" >&5
11751 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11752
11753 xe_check_libs=" -l$lib "
11754 cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 /* Override any gcc2 internal prototype to avoid an error.  */
11758 /* We use char because int might match the return type of a gcc2
11759     builtin and then its argument prototype would still apply.  */
11760 char tgetent();
11761
11762 int main() {
11763 tgetent()
11764 ; return 0; }
11765 EOF
11766 if { (eval echo configure:11767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11767   rm -rf conftest*
11768   eval "ac_cv_lib_$ac_lib_var=yes"
11769 else
11770   echo "configure: failed program was:" >&5
11771   cat conftest.$ac_ext >&5
11772   rm -rf conftest*
11773   eval "ac_cv_lib_$ac_lib_var=no"
11774 fi
11775 rm -f conftest*
11776 xe_check_libs=""
11777
11778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11779   echo "$ac_t""yes" 1>&6
11780   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11781 else
11782   echo "$ac_t""no" 1>&6
11783 fi
11784
11785
11786         done
11787       fi
11788     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11789    echo "    xemacs will be linked with \"tparam.o\""
11790  fi
11791                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11792       if test -n "$libs_termcap"; then
11793         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11794       else
11795         
11796 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11797 echo "configure:11798: checking for tgetent in -lcurses" >&5
11798 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11799
11800 xe_check_libs=" -lcurses "
11801 cat > conftest.$ac_ext <<EOF
11802 #line 11803 "configure"
11803 #include "confdefs.h"
11804 /* Override any gcc2 internal prototype to avoid an error.  */
11805 /* We use char because int might match the return type of a gcc2
11806     builtin and then its argument prototype would still apply.  */
11807 char tgetent();
11808
11809 int main() {
11810 tgetent()
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_lib_$ac_lib_var=yes"
11816 else
11817   echo "configure: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   rm -rf conftest*
11820   eval "ac_cv_lib_$ac_lib_var=no"
11821 fi
11822 rm -f conftest*
11823 xe_check_libs=""
11824
11825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11826   echo "$ac_t""yes" 1>&6
11827   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11828 else
11829   echo "$ac_t""no" 1>&6
11830 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11831 echo "configure:11832: checking for tgetent in -ltermcap" >&5
11832 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11833
11834 xe_check_libs=" -ltermcap "
11835 cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 /* Override any gcc2 internal prototype to avoid an error.  */
11839 /* We use char because int might match the return type of a gcc2
11840     builtin and then its argument prototype would still apply.  */
11841 char tgetent();
11842
11843 int main() {
11844 tgetent()
11845 ; return 0; }
11846 EOF
11847 if { (eval echo configure:11848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11848   rm -rf conftest*
11849   eval "ac_cv_lib_$ac_lib_var=yes"
11850 else
11851   echo "configure: failed program was:" >&5
11852   cat conftest.$ac_ext >&5
11853   rm -rf conftest*
11854   eval "ac_cv_lib_$ac_lib_var=no"
11855 fi
11856 rm -f conftest*
11857 xe_check_libs=""
11858
11859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11860   echo "$ac_t""yes" 1>&6
11861   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11862 else
11863   echo "$ac_t""no" 1>&6
11864 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11865    echo "    xemacs will be linked with \"termcap.o\""
11866  fi
11867 fi
11868
11869
11870 fi
11871
11872
11873       fi
11874     fi
11875   fi
11876   { test "$extra_verbose" = "yes" && cat << EOF
11877     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11878 EOF
11879 cat >> confdefs.h <<EOF
11880 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11881 EOF
11882 }
11883
11884   { test "$extra_verbose" = "yes" && cat << EOF
11885     Defining TERM_H_PATH = "${term_h_path-term.h}"
11886 EOF
11887 cat >> confdefs.h <<EOF
11888 #define TERM_H_PATH "${term_h_path-term.h}"
11889 EOF
11890 }
11891
11892
11893     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11894 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11895 echo "configure:11896: checking for gpm.h" >&5
11896
11897 cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900 #include <gpm.h>
11901 EOF
11902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11903 { (eval echo configure:11904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11905 if test -z "$ac_err"; then
11906   rm -rf conftest*
11907   eval "ac_cv_header_$ac_safe=yes"
11908 else
11909   echo "$ac_err" >&5
11910   echo "configure: failed program was:" >&5
11911   cat conftest.$ac_ext >&5
11912   rm -rf conftest*
11913   eval "ac_cv_header_$ac_safe=no"
11914 fi
11915 rm -f conftest*
11916 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11917   echo "$ac_t""yes" 1>&6
11918   :
11919 else
11920   echo "$ac_t""no" 1>&6
11921 with_gpm=no
11922 fi
11923  }
11924   test -z "$with_gpm" && { 
11925 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11926 echo "configure:11927: checking for Gpm_Open in -lgpm" >&5
11927 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11928
11929 xe_check_libs=" -lgpm "
11930 cat > conftest.$ac_ext <<EOF
11931 #line 11932 "configure"
11932 #include "confdefs.h"
11933 /* Override any gcc2 internal prototype to avoid an error.  */
11934 /* We use char because int might match the return type of a gcc2
11935     builtin and then its argument prototype would still apply.  */
11936 char Gpm_Open();
11937
11938 int main() {
11939 Gpm_Open()
11940 ; return 0; }
11941 EOF
11942 if { (eval echo configure:11943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11943   rm -rf conftest*
11944   eval "ac_cv_lib_$ac_lib_var=yes"
11945 else
11946   echo "configure: failed program was:" >&5
11947   cat conftest.$ac_ext >&5
11948   rm -rf conftest*
11949   eval "ac_cv_lib_$ac_lib_var=no"
11950 fi
11951 rm -f conftest*
11952 xe_check_libs=""
11953
11954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11955   echo "$ac_t""yes" 1>&6
11956   with_gpm=yes
11957 else
11958   echo "$ac_t""no" 1>&6
11959 with_gpm=no
11960 fi
11961
11962  }
11963   if test "$with_gpm" = "yes"; then
11964     { test "$extra_verbose" = "yes" && cat << \EOF
11965     Defining HAVE_GPM
11966 EOF
11967 cat >> confdefs.h <<\EOF
11968 #define HAVE_GPM 1
11969 EOF
11970 }
11971
11972     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11973    echo "    xemacs will be linked with \"gpmevent.o\""
11974  fi
11975     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11976   fi
11977
11978 else   for feature in ncurses gpm; do
11979     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11980       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11981     fi
11982     eval "with_${feature}=no"
11983   done
11984 fi 
11985 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11986    echo "    xemacs will be linked with \"event-unixoid.o\""
11987  fi
11988
11989
11990 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11991   != "no no no" && echo "checking for database support" 1>&6
11992 echo "configure:11993: checking for database support" >&5
11993
11994 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11995   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11996 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11997 echo "configure:11998: checking for ndbm.h" >&5
11998
11999 cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 #include <ndbm.h>
12003 EOF
12004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12005 { (eval echo configure:12006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12007 if test -z "$ac_err"; then
12008   rm -rf conftest*
12009   eval "ac_cv_header_$ac_safe=yes"
12010 else
12011   echo "$ac_err" >&5
12012   echo "configure: failed program was:" >&5
12013   cat conftest.$ac_ext >&5
12014   rm -rf conftest*
12015   eval "ac_cv_header_$ac_safe=no"
12016 fi
12017 rm -f conftest*
12018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12019   echo "$ac_t""yes" 1>&6
12020   :
12021 else
12022   echo "$ac_t""no" 1>&6
12023
12024     test "$with_database_gdbm" = "yes" -o \
12025          "$with_database_dbm"  = "yes" && \
12026       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12027     with_database_gdbm=no with_database_dbm=no
12028 fi
12029
12030 fi
12031
12032 if test "$with_database_gdbm" != "no"; then
12033   
12034 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12035 echo "configure:12036: checking for dbm_open in -lgdbm" >&5
12036 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12037
12038 xe_check_libs=" -lgdbm "
12039 cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 /* Override any gcc2 internal prototype to avoid an error.  */
12043 /* We use char because int might match the return type of a gcc2
12044     builtin and then its argument prototype would still apply.  */
12045 char dbm_open();
12046
12047 int main() {
12048 dbm_open()
12049 ; return 0; }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12052   rm -rf conftest*
12053   eval "ac_cv_lib_$ac_lib_var=yes"
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   eval "ac_cv_lib_$ac_lib_var=no"
12059 fi
12060 rm -f conftest*
12061 xe_check_libs=""
12062
12063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12064   echo "$ac_t""yes" 1>&6
12065   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12066 else
12067   echo "$ac_t""no" 1>&6
12068 if test "$with_database_gdbm" = "yes"; then
12069      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12070    fi
12071    with_database_gdbm=no
12072 fi
12073
12074
12075 fi
12076
12077 if test "$with_database_dbm" != "no"; then
12078   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12079 echo "configure:12080: checking for dbm_open" >&5
12080
12081 cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* System header to define __stub macros and hopefully few prototypes,
12085     which can conflict with char dbm_open(); below.  */
12086 #include <assert.h>
12087 /* Override any gcc2 internal prototype to avoid an error.  */
12088 /* We use char because int might match the return type of a gcc2
12089     builtin and then its argument prototype would still apply.  */
12090 char dbm_open();
12091
12092 int main() {
12093
12094 /* The GNU C library defines this for functions which it implements
12095     to always fail with ENOSYS.  Some functions are actually named
12096     something starting with __ and the normal name is an alias.  */
12097 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12098 choke me
12099 #else
12100 dbm_open();
12101 #endif
12102
12103 ; return 0; }
12104 EOF
12105 if { (eval echo configure:12106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12106   rm -rf conftest*
12107   eval "ac_cv_func_dbm_open=yes"
12108 else
12109   echo "configure: failed program was:" >&5
12110   cat conftest.$ac_ext >&5
12111   rm -rf conftest*
12112   eval "ac_cv_func_dbm_open=no"
12113 fi
12114 rm -f conftest*
12115
12116 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12117   echo "$ac_t""yes" 1>&6
12118   with_database_dbm=yes libdbm=
12119 else
12120   echo "$ac_t""no" 1>&6
12121
12122     
12123 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12124 echo "configure:12125: checking for dbm_open in -ldbm" >&5
12125 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12126
12127 xe_check_libs=" -ldbm "
12128 cat > conftest.$ac_ext <<EOF
12129 #line 12130 "configure"
12130 #include "confdefs.h"
12131 /* Override any gcc2 internal prototype to avoid an error.  */
12132 /* We use char because int might match the return type of a gcc2
12133     builtin and then its argument prototype would still apply.  */
12134 char dbm_open();
12135
12136 int main() {
12137 dbm_open()
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   eval "ac_cv_lib_$ac_lib_var=yes"
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   eval "ac_cv_lib_$ac_lib_var=no"
12148 fi
12149 rm -f conftest*
12150 xe_check_libs=""
12151
12152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12153   echo "$ac_t""yes" 1>&6
12154   with_database_dbm=yes libdbm=-ldbm
12155 else
12156   echo "$ac_t""no" 1>&6
12157 test "$with_database_dbm" = "yes" && \
12158         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12159       with_database_dbm=no
12160 fi
12161
12162
12163 fi
12164
12165 fi
12166
12167 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12168 test "$with_database_gdbm" = "yes" -o \
12169      "$with_database_dbm"  = "yes" && \
12170   { test "$extra_verbose" = "yes" && cat << \EOF
12171     Defining HAVE_DBM
12172 EOF
12173 cat >> confdefs.h <<\EOF
12174 #define HAVE_DBM 1
12175 EOF
12176 }
12177
12178
12179 if test "$with_database_berkdb" != "no"; then
12180   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12181 echo "configure:12182: checking for Berkeley db.h" >&5
12182   for path in "db/db.h" "db.h"; do
12183     cat > conftest.$ac_ext <<EOF
12184 #line 12185 "configure"
12185 #include "confdefs.h"
12186 #ifdef HAVE_INTTYPES_H
12187 #define __BIT_TYPES_DEFINED__
12188 #include <inttypes.h>
12189 typedef uint8_t  u_int8_t;
12190 typedef uint16_t u_int16_t;
12191 typedef uint32_t u_int32_t;
12192 #ifdef WE_DONT_NEED_QUADS
12193 typedef uint64_t u_int64_t;
12194 #endif
12195 #endif
12196 #include <$path>
12197
12198 int main() {
12199
12200 ; return 0; }
12201 EOF
12202 if { (eval echo configure:12203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12203   rm -rf conftest*
12204   db_h_path="$path"; break
12205 else
12206   echo "configure: failed program was:" >&5
12207   cat conftest.$ac_ext >&5
12208 fi
12209 rm -f conftest*
12210   done
12211   if test -z "$db_h_path"
12212   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12213   else echo "$ac_t""$db_h_path" 1>&6
12214   fi
12215
12216   if test "$with_database_berkdb" != "no"; then
12217     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12218 echo "configure:12219: checking for Berkeley DB version" >&5
12219     cat > conftest.$ac_ext <<EOF
12220 #line 12221 "configure"
12221 #include "confdefs.h"
12222 #include <$db_h_path>
12223 #if DB_VERSION_MAJOR > 1
12224 yes
12225 #endif
12226
12227 EOF
12228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12229   egrep "yes" >/dev/null 2>&1; then
12230   rm -rf conftest*
12231   echo "$ac_t""2" 1>&6; dbfunc=db_open
12232 else
12233   rm -rf conftest*
12234   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12235 fi
12236 rm -f conftest*
12237
12238     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12239 echo "configure:12240: checking for $dbfunc" >&5
12240
12241 cat > conftest.$ac_ext <<EOF
12242 #line 12243 "configure"
12243 #include "confdefs.h"
12244 /* System header to define __stub macros and hopefully few prototypes,
12245     which can conflict with char $dbfunc(); below.  */
12246 #include <assert.h>
12247 /* Override any gcc2 internal prototype to avoid an error.  */
12248 /* We use char because int might match the return type of a gcc2
12249     builtin and then its argument prototype would still apply.  */
12250 char $dbfunc();
12251
12252 int main() {
12253
12254 /* The GNU C library defines this for functions which it implements
12255     to always fail with ENOSYS.  Some functions are actually named
12256     something starting with __ and the normal name is an alias.  */
12257 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12258 choke me
12259 #else
12260 $dbfunc();
12261 #endif
12262
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_func_$dbfunc=yes"
12268 else
12269   echo "configure: failed program was:" >&5
12270   cat conftest.$ac_ext >&5
12271   rm -rf conftest*
12272   eval "ac_cv_func_$dbfunc=no"
12273 fi
12274 rm -f conftest*
12275
12276 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12277   echo "$ac_t""yes" 1>&6
12278   with_database_berkdb=yes need_libdb=no
12279 else
12280   echo "$ac_t""no" 1>&6
12281
12282     
12283 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12284 echo "configure:12285: checking for $dbfunc in -ldb" >&5
12285 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12286
12287 xe_check_libs=" -ldb "
12288 cat > conftest.$ac_ext <<EOF
12289 #line 12290 "configure"
12290 #include "confdefs.h"
12291 /* Override any gcc2 internal prototype to avoid an error.  */
12292 /* We use char because int might match the return type of a gcc2
12293     builtin and then its argument prototype would still apply.  */
12294 char $dbfunc();
12295
12296 int main() {
12297 $dbfunc()
12298 ; return 0; }
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12301   rm -rf conftest*
12302   eval "ac_cv_lib_$ac_lib_var=yes"
12303 else
12304   echo "configure: failed program was:" >&5
12305   cat conftest.$ac_ext >&5
12306   rm -rf conftest*
12307   eval "ac_cv_lib_$ac_lib_var=no"
12308 fi
12309 rm -f conftest*
12310 xe_check_libs=""
12311
12312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12313   echo "$ac_t""yes" 1>&6
12314   with_database_berkdb=yes need_libdb=yes
12315 else
12316   echo "$ac_t""no" 1>&6
12317 fi
12318
12319
12320 fi
12321
12322   fi
12323
12324   if test "$with_database_berkdb" = "yes"; then
12325     { test "$extra_verbose" = "yes" && cat << EOF
12326     Defining DB_H_PATH = "$db_h_path"
12327 EOF
12328 cat >> confdefs.h <<EOF
12329 #define DB_H_PATH "$db_h_path"
12330 EOF
12331 }
12332
12333     { test "$extra_verbose" = "yes" && cat << \EOF
12334     Defining HAVE_BERKELEY_DB
12335 EOF
12336 cat >> confdefs.h <<\EOF
12337 #define HAVE_BERKELEY_DB 1
12338 EOF
12339 }
12340
12341     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12342   else with_database_berkdb=no
12343   fi
12344 fi
12345
12346 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12347      != "no no no"; then
12348   { test "$extra_verbose" = "yes" && cat << \EOF
12349     Defining HAVE_DATABASE
12350 EOF
12351 cat >> confdefs.h <<\EOF
12352 #define HAVE_DATABASE 1
12353 EOF
12354 }
12355
12356   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12357    echo "    xemacs will be linked with \"database.o\""
12358  fi
12359 fi
12360
12361 if test "$with_socks" = "yes"; then
12362   
12363 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12364 echo "configure:12365: checking for SOCKSinit in -lsocks" >&5
12365 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12366
12367 xe_check_libs=" -lsocks "
12368 cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 /* Override any gcc2 internal prototype to avoid an error.  */
12372 /* We use char because int might match the return type of a gcc2
12373     builtin and then its argument prototype would still apply.  */
12374 char SOCKSinit();
12375
12376 int main() {
12377 SOCKSinit()
12378 ; return 0; }
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12381   rm -rf conftest*
12382   eval "ac_cv_lib_$ac_lib_var=yes"
12383 else
12384   echo "configure: failed program was:" >&5
12385   cat conftest.$ac_ext >&5
12386   rm -rf conftest*
12387   eval "ac_cv_lib_$ac_lib_var=no"
12388 fi
12389 rm -f conftest*
12390 xe_check_libs=""
12391
12392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12393   echo "$ac_t""yes" 1>&6
12394     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12396   { test "$extra_verbose" = "yes" && cat << EOF
12397     Defining $ac_tr_lib
12398 EOF
12399 cat >> confdefs.h <<EOF
12400 #define $ac_tr_lib 1
12401 EOF
12402 }
12403
12404   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12405
12406 else
12407   echo "$ac_t""no" 1>&6
12408 fi
12409
12410
12411   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12412     Defining HAVE_SOCKS
12413 EOF
12414 cat >> confdefs.h <<\EOF
12415 #define HAVE_SOCKS 1
12416 EOF
12417 }
12418
12419 fi
12420
12421 if test "$usage_tracking" = "yes"; then
12422   { test "$extra_verbose" = "yes" && cat << \EOF
12423     Defining USAGE_TRACKING
12424 EOF
12425 cat >> confdefs.h <<\EOF
12426 #define USAGE_TRACKING 1
12427 EOF
12428 }
12429
12430   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12431 fi
12432
12433 if test "$with_modules" != "no"; then
12434   echo "checking for module support" 1>&6
12435 echo "configure:12436: checking for module support" >&5
12436
12437     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12438 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12439 echo "configure:12440: checking for dlfcn.h" >&5
12440
12441 cat > conftest.$ac_ext <<EOF
12442 #line 12443 "configure"
12443 #include "confdefs.h"
12444 #include <dlfcn.h>
12445 EOF
12446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12447 { (eval echo configure:12448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12449 if test -z "$ac_err"; then
12450   rm -rf conftest*
12451   eval "ac_cv_header_$ac_safe=yes"
12452 else
12453   echo "$ac_err" >&5
12454   echo "configure: failed program was:" >&5
12455   cat conftest.$ac_ext >&5
12456   rm -rf conftest*
12457   eval "ac_cv_header_$ac_safe=no"
12458 fi
12459 rm -f conftest*
12460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12461   echo "$ac_t""yes" 1>&6
12462   
12463     
12464 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12465 echo "configure:12466: checking for dlopen in -ldl" >&5
12466 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12467
12468 xe_check_libs=" -ldl "
12469 cat > conftest.$ac_ext <<EOF
12470 #line 12471 "configure"
12471 #include "confdefs.h"
12472 /* Override any gcc2 internal prototype to avoid an error.  */
12473 /* We use char because int might match the return type of a gcc2
12474     builtin and then its argument prototype would still apply.  */
12475 char dlopen();
12476
12477 int main() {
12478 dlopen()
12479 ; return 0; }
12480 EOF
12481 if { (eval echo configure:12482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12482   rm -rf conftest*
12483   eval "ac_cv_lib_$ac_lib_var=yes"
12484 else
12485   echo "configure: failed program was:" >&5
12486   cat conftest.$ac_ext >&5
12487   rm -rf conftest*
12488   eval "ac_cv_lib_$ac_lib_var=no"
12489 fi
12490 rm -f conftest*
12491 xe_check_libs=""
12492
12493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12494   echo "$ac_t""yes" 1>&6
12495   have_dl=yes libdl=dl
12496 else
12497   echo "$ac_t""no" 1>&6
12498
12499 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12500 echo "configure:12501: checking for dlopen in -lc" >&5
12501 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12502
12503 xe_check_libs=" -lc "
12504 cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 /* Override any gcc2 internal prototype to avoid an error.  */
12508 /* We use char because int might match the return type of a gcc2
12509     builtin and then its argument prototype would still apply.  */
12510 char dlopen();
12511
12512 int main() {
12513 dlopen()
12514 ; return 0; }
12515 EOF
12516 if { (eval echo configure:12517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12517   rm -rf conftest*
12518   eval "ac_cv_lib_$ac_lib_var=yes"
12519 else
12520   echo "configure: failed program was:" >&5
12521   cat conftest.$ac_ext >&5
12522   rm -rf conftest*
12523   eval "ac_cv_lib_$ac_lib_var=no"
12524 fi
12525 rm -f conftest*
12526 xe_check_libs=""
12527
12528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12529   echo "$ac_t""yes" 1>&6
12530   have_dl=yes 
12531 else
12532   echo "$ac_t""no" 1>&6
12533 fi
12534
12535
12536 fi
12537
12538
12539 else
12540   echo "$ac_t""no" 1>&6
12541 fi
12542
12543   if test -n "$have_dl"; then
12544     { test "$extra_verbose" = "yes" && cat << \EOF
12545     Defining HAVE_DLOPEN
12546 EOF
12547 cat >> confdefs.h <<\EOF
12548 #define HAVE_DLOPEN 1
12549 EOF
12550 }
12551
12552   else
12553     
12554 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12555 echo "configure:12556: checking for shl_load in -ldld" >&5
12556 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12557
12558 xe_check_libs=" -ldld "
12559 cat > conftest.$ac_ext <<EOF
12560 #line 12561 "configure"
12561 #include "confdefs.h"
12562 /* Override any gcc2 internal prototype to avoid an error.  */
12563 /* We use char because int might match the return type of a gcc2
12564     builtin and then its argument prototype would still apply.  */
12565 char shl_load();
12566
12567 int main() {
12568 shl_load()
12569 ; return 0; }
12570 EOF
12571 if { (eval echo configure:12572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12572   rm -rf conftest*
12573   eval "ac_cv_lib_$ac_lib_var=yes"
12574 else
12575   echo "configure: failed program was:" >&5
12576   cat conftest.$ac_ext >&5
12577   rm -rf conftest*
12578   eval "ac_cv_lib_$ac_lib_var=no"
12579 fi
12580 rm -f conftest*
12581 xe_check_libs=""
12582
12583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12584   echo "$ac_t""yes" 1>&6
12585   libdl=dld have_dl=yes;
12586       { test "$extra_verbose" = "yes" && cat << \EOF
12587     Defining HAVE_SHL_LOAD
12588 EOF
12589 cat >> confdefs.h <<\EOF
12590 #define HAVE_SHL_LOAD 1
12591 EOF
12592 }
12593
12594 else
12595   echo "$ac_t""no" 1>&6
12596
12597 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12598 echo "configure:12599: checking for dld_init in -ldld" >&5
12599 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12600
12601 xe_check_libs=" -ldld "
12602 cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 /* Override any gcc2 internal prototype to avoid an error.  */
12606 /* We use char because int might match the return type of a gcc2
12607     builtin and then its argument prototype would still apply.  */
12608 char dld_init();
12609
12610 int main() {
12611 dld_init()
12612 ; return 0; }
12613 EOF
12614 if { (eval echo configure:12615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12615   rm -rf conftest*
12616   eval "ac_cv_lib_$ac_lib_var=yes"
12617 else
12618   echo "configure: failed program was:" >&5
12619   cat conftest.$ac_ext >&5
12620   rm -rf conftest*
12621   eval "ac_cv_lib_$ac_lib_var=no"
12622 fi
12623 rm -f conftest*
12624 xe_check_libs=""
12625
12626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12627   echo "$ac_t""yes" 1>&6
12628   libdl=dld have_dl=yes;
12629       { test "$extra_verbose" = "yes" && cat << \EOF
12630     Defining HAVE_DLD_INIT
12631 EOF
12632 cat >> confdefs.h <<\EOF
12633 #define HAVE_DLD_INIT 1
12634 EOF
12635 }
12636
12637 else
12638   echo "$ac_t""no" 1>&6
12639 fi
12640
12641
12642 fi
12643
12644
12645   fi
12646
12647   if test -n "$have_dl"; then
12648         
12649 dll_ld=
12650 dll_ldflags=
12651 dll_cflags=
12652 dll_post=
12653 dll_ldo="-o"
12654 ld_dynamic_link_flags=
12655 xehost=$canonical
12656 xealias=$internal_configuration
12657
12658 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12659 echo "configure:12660: checking how to build dynamic libraries for ${xehost}" >&5
12660 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12661 case "$xehost" in
12662 *-*-linux-gnu*) ;;
12663 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12664 esac
12665
12666 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12667 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12668 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12669
12670 case "$xehost_os" in
12671 aix3*)
12672   # AIX sometimes has problems with the GCC collect2 program.  For some
12673   # reason, if we set the COLLECT_NAMES environment variable, the problems
12674   # vanish in a puff of smoke.
12675   if test "${COLLECT_NAMES+set}" != set; then
12676     COLLECT_NAMES=
12677     export COLLECT_NAMES
12678   fi
12679   ;;
12680 esac
12681
12682 # Now see if the compiler is really GCC.
12683 if test "$GCC" = "yes"; then
12684   XEGCC=yes
12685 else
12686   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12687 echo "configure:12688: checking checking whether we are using GNU C" >&5
12688   cat > conftest.$ac_ext <<EOF
12689 #line 12690 "configure"
12690 #include "confdefs.h"
12691
12692 #ifdef __GNUC__
12693   yes;
12694 #endif
12695
12696 EOF
12697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12698   egrep "yes" >/dev/null 2>&1; then
12699   rm -rf conftest*
12700   XEGCC=yes
12701 else
12702   rm -rf conftest*
12703   XEGCC=no
12704 fi
12705 rm -f conftest*
12706
12707   echo "$ac_t""${XEGCC}" 1>&6
12708 fi
12709
12710 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12711 echo "configure:12712: checking how to produce PIC code" >&5
12712 wl=
12713
12714 can_build_shared=yes
12715 if test "$XEGCC" = yes; then
12716   wl='-Wl,'
12717
12718   case "$xehost_os" in
12719   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12720     # PIC is the default for these OSes.
12721     ;;
12722
12723   os2*)
12724     # We can build DLLs from non-PIC.
12725     ;;
12726   amigaos*)
12727     # FIXME: we need at least 68020 code to build shared libraries, but
12728     # adding the `-m68020' flag to GCC prevents building anything better,
12729     # like `-m68040'.
12730     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12731     ;;
12732   *)
12733     dll_cflags='-fPIC'
12734     ;;
12735   esac
12736 else
12737   # PORTME Check for PIC flags for the system compiler.
12738   case "$xehost_os" in
12739   hpux9* | hpux1[0-9]*)
12740     # Is there a better link_static_flag that works with the bundled CC?
12741     wl='-Wl,'
12742     dll_cflags='+Z'
12743     ;;
12744
12745   irix5* | irix6*)
12746     wl='-Wl,'
12747     # PIC (with -KPIC) is the default.
12748     ;;
12749
12750   os2*)
12751     # We can build DLLs from non-PIC.
12752     ;;
12753
12754   osf3* | osf4*)
12755     # All OSF/1 code is PIC.
12756     wl='-Wl,'
12757     ;;
12758
12759   sco3.2v5*)
12760     dll_cflags='-belf -Kpic'
12761     wl='-Wl,'
12762     ;;
12763
12764   unixware*)
12765     dll_cflags="-KPIC"
12766     wl="-Wl,"
12767     ;;
12768
12769   sysv4*)
12770     dll_cflags="-KPIC"
12771     wl="-Wl,"
12772     ;;
12773
12774   sysv5*)
12775     dll_cflags="-KPIC"
12776     wl="-Wl,"
12777     ;;
12778
12779   solaris2*)
12780     dll_cflags='-KPIC'
12781     wl='-Wl,'
12782     ;;
12783
12784   sunos4*)
12785     dll_cflags='-PIC'
12786     wl='-Qoption ld '
12787     ;;
12788
12789   uts4*)
12790     dll_cflags='-pic'
12791     ;;
12792
12793   *)
12794     can_build_shared=no
12795     ;;
12796   esac
12797 fi
12798
12799 if test -n "$dll_cflags"; then
12800   echo "$ac_t""${dll_cflags}" 1>&6
12801   
12802   # Check to make sure the dll_cflags actually works.
12803   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12804 echo "configure:12805: checking if PIC flag ${dll_cflags} really works" >&5
12805   save_CFLAGS="$CFLAGS"
12806   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12807   cat > conftest.$ac_ext <<EOF
12808 #line 12809 "configure"
12809 #include "confdefs.h"
12810
12811 int main() {
12812 int x=0;
12813 ; return 0; }
12814 EOF
12815 if { (eval echo configure:12816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12816   rm -rf conftest*
12817   
12818     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12819     # reports no error.  So, we need to grep stderr for (Bundled).
12820     if grep '(Bundled)' config.log >/dev/null; then
12821       echo "$ac_t""no" 1>&6
12822       can_build_shared=no
12823       dll_cflags=
12824     else
12825       echo "$ac_t""yes" 1>&6
12826     fi
12827 else
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   echo "$ac_t""no" 1>&6
12832     can_build_shared=no
12833     dll_cflags=
12834 fi
12835 rm -f conftest*
12836   CFLAGS="$save_CFLAGS"
12837 else
12838   echo "$ac_t""none" 1>&6
12839 fi
12840
12841 if test "$can_build_shared" = "yes"; then
12842 cc_produces_so=no
12843 xldf=
12844 xcldf=
12845 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12846 echo "configure:12847: checking if C compiler can produce shared libraries" >&5
12847 if test "$XEGCC" = yes; then
12848   xcldf="-shared"
12849   xldf="-shared"
12850 else # Not using GCC
12851   case "$xehost_os" in
12852     aix3* | aix4*)
12853       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12854       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12855       ;;
12856
12857     freebsd2* | netbsd* | openbsd*)
12858       xldf="-Bshareable"
12859       xcldf="${wl}-Bshareable"
12860       ;;
12861
12862     freebsd3*)
12863       xcldf="-shared"
12864       ;;
12865
12866     hpux*)
12867       xldf="-b +s"
12868       xcldf="${wl}-b ${wl}+s"
12869       ;;
12870
12871     irix5* | irix6* | osf3* | osf4*)
12872       xcldf="${wl}-shared"
12873       xldf="-shared"
12874       ;;
12875
12876     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12877       xcldf="-G"
12878       xldf="-G"
12879       ;;
12880
12881     sunos4*)
12882       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12883       xldf="-assert pure-text -Bstatic"
12884       ;;
12885   esac
12886 fi # End if if we are using gcc
12887
12888 if test -n "$xcldf"; then
12889   save_LDFLAGS=$LDFLAGS
12890   save_LIBS=$LIBS
12891   save_xe_libs=$xe_libs
12892   LDFLAGS="$xcldf $LDFLAGS"
12893   LIBS=
12894   xe_libs=
12895   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12896   cat > conftest.$ac_ext <<EOF
12897 #line 12898 "configure"
12898 #include "confdefs.h"
12899
12900 int main() {
12901 int x=0;
12902 ; return 0; }
12903 EOF
12904 if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12905   rm -rf conftest*
12906   cc_produces_so=yes
12907 else
12908   echo "configure: failed program was:" >&5
12909   cat conftest.$ac_ext >&5
12910   rm -rf conftest*
12911   cc_produces_so=no
12912 fi
12913 rm -f conftest*
12914   LDFLAGS=$save_LDFLAGS
12915   LIBS=$save_LIBS
12916   xe_libs=$save_xe_libs
12917   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12918 else
12919   cc_produces_so=no
12920 fi
12921 echo "$ac_t""${cc_produces_so}" 1>&6
12922
12923 LTLD=$LD
12924 if test -z "$LTLD"; then
12925   ac_prog=ld
12926   if test "$XEGCC" = yes; then
12927     # Check if gcc -print-prog-name=ld gives a path.
12928     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12929 echo "configure:12930: checking for ld used by GCC" >&5
12930     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12931     case "$ac_prog" in
12932     # Accept absolute paths.
12933     /*)
12934       if test -z "$LTLD"; then
12935         case "$ac_prog" in
12936           *gcc-lib*) LTLD="$CC"
12937                      ;;
12938           *)         LTLD="$ac_prog"
12939                      ;;
12940         esac
12941       fi
12942       ;;
12943     "")
12944       # If it fails, then pretend we aren't using GCC.
12945       ac_prog=ld
12946       ;;
12947     *)
12948       # If it is relative, then search for the first ld in PATH.
12949       with_gnu_ld=unknown
12950       ;;
12951     esac
12952   else
12953     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12954 echo "configure:12955: checking for GNU ld" >&5
12955   fi
12956
12957   if test -z "$LTLD"; then
12958     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12959     for ac_dir in $PATH; do
12960       test -z "$ac_dir" && ac_dir=.
12961       if test -f "$ac_dir/$ac_prog"; then
12962         LTLD="$ac_dir/$ac_prog"
12963         # Check to see if the program is GNU ld.  I'd rather use --version,
12964         # but apparently some GNU ld's only accept -v.
12965         # Break only if it was the GNU/non-GNU ld that we prefer.
12966         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12967           xe_gnu_ld=yes
12968         else
12969           xe_gnu_ld=no
12970         fi
12971       fi
12972     done
12973     IFS="$ac_save_ifs"
12974   fi
12975
12976   if test -n "$LTLD"; then
12977     echo "$ac_t""${LTLD}" 1>&6
12978   else
12979     echo "$ac_t""no" 1>&6
12980   fi
12981
12982   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12983     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12984     exit 1
12985   fi
12986 fi
12987
12988 ld_dynamic_link_flags=
12989
12990 # Check to see if it really is or isn't GNU ld.
12991 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12992 echo "configure:12993: checking if the linker is GNU ld" >&5
12993 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12994 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12995   xe_gnu_ld=yes
12996 else
12997   xe_gnu_ld=no
12998 fi
12999 echo "$ac_t""${xe_gnu_ld}" 1>&6
13000
13001 case "$xehost_os" in
13002   amigaos* | sunos4*)
13003     # On these operating systems, we should treat GNU ld like the system ld.
13004     gnu_ld_acts_native=yes
13005     ;;
13006   *)
13007     gnu_ld_acts_native=no
13008     ;;
13009 esac
13010
13011 if test "$cc_produces_so" = "yes"; then
13012   dll_ld=$CC
13013   dll_ldflags=$xcldf
13014   can_build_shared=yes
13015 else
13016   # OK - only NOW do we futz about with ld.
13017   # See if the linker supports building shared libraries.
13018   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13019 echo "configure:13020: checking whether the linker supports shared libraries" >&5
13020   dll_ld=$CC
13021   dll_ldflags=$LDFLAGS
13022   ld_shlibs=yes
13023   can_build_shared=yes
13024   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13025     # See if GNU ld supports shared libraries.
13026     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13027       dll_ld=$CC
13028       dll_ldflags="-shared"
13029       ld_shlibs=yes
13030     else
13031       ld_shlibs=no
13032     fi
13033   else
13034     # PORTME fill in a description of your system's linker (not GNU ld)
13035     case "$xehost_os" in
13036     aix3*)
13037       dll_ld=$LTLD
13038       dll_ldflags=$xldf
13039       ;;
13040
13041     aix4*)
13042       dll_ldflags=$xcldf
13043       ;;
13044
13045     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13046     # support.  Future versions do this automatically, but an explicit c++rt0.o
13047     # doesn't break anything, and helps significantly (at the cost of a little
13048     # extra space).
13049     freebsd2.2*)
13050       dll_ld=$LTLD
13051       dll_ldflags=$xldf
13052       dll_post="/usr/lib/c++rt0.o"
13053       ;;
13054
13055     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13056     freebsd2*)
13057       dll_ld=$LTLD
13058       dll_ldflags="-Bshareable"
13059       ;;
13060
13061     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13062     freebsd3*)
13063       dll_ldflags="-shared"
13064       ;;
13065
13066     hpux*)
13067       dll_ld=$LTLD
13068       dll_ldflags=$xldf
13069       ;;
13070
13071     irix5* | irix6*)
13072       dll_ld=$LTLD
13073       dll_ldflags=$xldf
13074       ;;
13075
13076     netbsd*)
13077       # Tested with NetBSD 1.2 ld
13078       dll_ld=$LTLD
13079       dll_ldflags=$xldf
13080       ;;
13081
13082     openbsd*)
13083       dll_ld=$LTLD
13084       dll_ldflags=$xldf
13085       ;;
13086
13087     osf3* | osf4*)
13088       dll_ld=$LTLD
13089       dll_ldflags=$xldf
13090       ;;
13091
13092     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13093     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13094       dll_ld=$LTLD
13095       case "$dll_ld" in
13096         *gcc*) dll_ldflags="-shared"
13097                dll_ld=$CC
13098                ;;
13099         *)     dll_ldflags="-G"
13100                ;;
13101       esac
13102       ;;
13103
13104     sunos4*)
13105       if test "$XEGCC" = yes; then
13106         dll_ld=$CC
13107       else
13108         dll_ld=$LTLD
13109       fi
13110       dll_ldflags=$xldf
13111       ;;
13112
13113     uts4*)
13114       dll_ld=$LTLD
13115       dll_ldflags="-G"
13116       ;;
13117
13118     bsdi*)
13119       dll_ldflags="-r"
13120       dll_ld="shlicc2"
13121       ;;
13122
13123     *)
13124       ld_shlibs=no
13125       can_build_shared=no
13126       ;;
13127     esac
13128   fi
13129   echo "$ac_t""${ld_shlibs}" 1>&6
13130   if test "$ld_shlibs" = "no"; then
13131     can_build_shared=no
13132   fi
13133 fi # End of if cc_produces_so = no
13134
13135
13136 if test "$xe_gnu_ld" = yes; then
13137   if test "$ld_shlibs" = yes; then
13138     ld_dynamic_link_flags="${wl}-export-dynamic"
13139   fi
13140 fi
13141
13142 if test -z "$ld_dynamic_link_flags"; then
13143   case "$xehost_os" in
13144   aix3*)
13145     ld_dynamic_link_flags=
13146     ;;
13147
13148   aix4*)
13149     ld_dynamic_link_flags=
13150     ;;
13151
13152   freebsd2.2*)
13153     ld_dynamic_link_flags=
13154     ;;
13155
13156   freebsd2*)
13157     ld_dynamic_link_flags=
13158     ;;
13159
13160   freebsd3*)
13161     ld_dynamic_link_flags=
13162     ;;
13163
13164   hpux*)
13165     ld_dynamic_link_flags="${wl}-E"
13166     ;;
13167
13168   irix5* | irix6*)
13169     ld_dynamic_link_flags=
13170     ;;
13171
13172   netbsd*)
13173     ld_dynamic_link_flags=
13174     ;;
13175
13176   openbsd*)
13177     ld_dynamic_link_flags=
13178     ;;
13179
13180   osf3* | osf4*)
13181     ld_dynamic_link_flags=
13182     ;;
13183
13184   solaris2* | solaris7*)
13185     ld_dynamic_link_flags=
13186     ;;
13187
13188   sco3.2v5* | unixware* | sysv5* | sysv4*)
13189     ld_dynamic_link_flags="${wl}-Bexport"
13190     ;;
13191
13192   sunos4*)
13193     ld_dynamic_link_flags=
13194     ;;
13195
13196   uts4*)
13197     ld_dynamic_link_flags=
13198     ;;
13199
13200   bsdi*)
13201     ld_dynamic_link_flags=
13202     ;;
13203
13204   esac
13205 fi # End of if -z ld_dynamic_link_flags
13206 fi # End of if test "$can_build_shared" = "yes"
13207
13208
13209
13210
13211
13212
13213
13214
13215   fi
13216
13217   if test "$can_build_shared" = "yes"; then
13218     { test "$extra_verbose" = "yes" && cat << \EOF
13219     Defining HAVE_SHLIB
13220 EOF
13221 cat >> confdefs.h <<\EOF
13222 #define HAVE_SHLIB 1
13223 EOF
13224 }
13225
13226     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13227    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13228  fi
13229     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13230     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13231     for ac_func in dlerror _dlerror
13232 do
13233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13234 echo "configure:13235: checking for $ac_func" >&5
13235
13236 cat > conftest.$ac_ext <<EOF
13237 #line 13238 "configure"
13238 #include "confdefs.h"
13239 /* System header to define __stub macros and hopefully few prototypes,
13240     which can conflict with char $ac_func(); below.  */
13241 #include <assert.h>
13242 /* Override any gcc2 internal prototype to avoid an error.  */
13243 /* We use char because int might match the return type of a gcc2
13244     builtin and then its argument prototype would still apply.  */
13245 char $ac_func();
13246
13247 int main() {
13248
13249 /* The GNU C library defines this for functions which it implements
13250     to always fail with ENOSYS.  Some functions are actually named
13251     something starting with __ and the normal name is an alias.  */
13252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13253 choke me
13254 #else
13255 $ac_func();
13256 #endif
13257
13258 ; return 0; }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13261   rm -rf conftest*
13262   eval "ac_cv_func_$ac_func=yes"
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -rf conftest*
13267   eval "ac_cv_func_$ac_func=no"
13268 fi
13269 rm -f conftest*
13270
13271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13272   echo "$ac_t""yes" 1>&6
13273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13274   { test "$extra_verbose" = "yes" && cat << EOF
13275     Defining $ac_tr_func
13276 EOF
13277 cat >> confdefs.h <<EOF
13278 #define $ac_tr_func 1
13279 EOF
13280 }
13281  
13282 else
13283   echo "$ac_t""no" 1>&6
13284 fi
13285 done
13286
13287     with_modules=yes
13288   else
13289     if test "$with_modules" = "yes"; then
13290       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13291     else
13292       echo "configure: warning: "Module support cannot be provided."" 1>&2
13293     fi
13294     with_modules=no
13295   fi
13296 fi
13297
13298 cat > conftest.$ac_ext <<EOF
13299 #line 13300 "configure"
13300 #include "confdefs.h"
13301 int main(int c,char *v[]){return 0;}
13302 EOF
13303 if { (eval echo configure:13304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13304 then
13305   :
13306 else
13307   conftest_rc="$?"
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -fr conftest*
13311   
13312   echo ""
13313   echo "*** PANIC *** The C compiler can no longer build working executables."
13314   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13315   echo "*** PANIC *** The most likely reason for this problem is that configure"
13316   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13317   echo "*** PANIC *** found at run time."
13318   echo "*** PANIC ***"
13319   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13320   echo "*** PANIC *** On other systems, try telling configure where to find the"
13321   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13322   echo "*** PANIC ***"
13323   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13324   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13325   echo "*** PANIC *** on your system.  Don't do that."
13326   exit 1
13327 fi
13328 rm -fr conftest*
13329
13330 if test "$win32_processes" = "yes"; then
13331   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13332    echo "    xemacs will be linked with \"process-nt.o\""
13333  fi
13334 else
13335   { test "$extra_verbose" = "yes" && cat << \EOF
13336     Defining HAVE_UNIX_PROCESSES
13337 EOF
13338 cat >> confdefs.h <<\EOF
13339 #define HAVE_UNIX_PROCESSES 1
13340 EOF
13341 }
13342
13343   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13344    echo "    xemacs will be linked with \"process-unix.o\""
13345  fi
13346 fi
13347
13348
13349
13350 T=""
13351 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13352 CFLAGS="$T"
13353
13354
13355 T=""
13356 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13357 extra_objs="$T"
13358
13359
13360 T=""
13361 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
13362 c_switch_general="$T"
13363
13364
13365 T=""
13366 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13367 c_switch_window_system="$T"
13368
13369
13370 T=""
13371 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13372 c_switch_all="$T"
13373
13374
13375 T=""
13376 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
13377 ld_switch_general="$T"
13378
13379
13380 T=""
13381 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13382 ld_switch_window_system="$T"
13383
13384
13385 T=""
13386 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13387 ld_switch_all="$T"
13388
13389
13390 T=""
13391 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13392 ld_libs_general="$T"
13393
13394
13395 T=""
13396 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
13397 ld_libs_window_system="$T"
13398
13399
13400 T=""
13401 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13402 ld_libs_all="$T"
13403
13404
13405
13406 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13407 internal_makefile_list="Makefile.in"
13408 SUBDIR_MAKEFILES=''
13409 test -d lock || mkdir lock
13410 for dir in $MAKE_SUBDIR; do
13411   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13412         test -d "$d" || mkdir "$d"; cd "$d"
13413       done ) ;;
13414    * ) test -d "$dir" || mkdir "$dir" ;;
13415   esac
13416   
13417 T=""
13418 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13419 SUBDIR_MAKEFILES="$T"
13420
13421   
13422 T=""
13423 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13424 internal_makefile_list="$T"
13425
13426 done
13427
13428
13429
13430
13431 for dir in src/s src/m; do
13432   if test ! -d "$dir" ; then
13433     echo Making symbolic link to "$srcdir/$dir"
13434     ${LN_S} "$srcdir/$dir" "$dir"
13435   fi
13436 done
13437
13438 if test "$extra_verbose" = "yes"; then
13439   echo ""
13440   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
13441   echo ""
13442 fi
13443
13444
13445 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13446   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13447   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13448 fi
13449
13450 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13451   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13452   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13453 fi
13454
13455 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13456   test "$extra_verbose" = "yes" && echo "creating TAGS"
13457   echo "\f
13458 $srcdir/TAGS,include" > "TAGS"
13459 fi
13460
13461 if test "$__SUNPRO_C" = "yes"; then
13462   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13463   ( echo "# For use with Sun WorkShop's Source browser."
13464     echo "# See sbquery(1) and sbinit(4) for more information"
13465     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13466   ) > .sbinit
13467 fi
13468
13469 rm -f core
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489 PREFIX=$prefix
13490 while true; do
13491   case "$PREFIX" in
13492     *\$* ) eval "PREFIX=$PREFIX" ;;
13493     *) break ;;
13494   esac
13495 done
13496
13497
13498
13499
13500 EXEC_PREFIX=$exec_prefix
13501 while true; do
13502   case "$EXEC_PREFIX" in
13503     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13504     *) break ;;
13505   esac
13506 done
13507
13508
13509
13510
13511 INFODIR=$infodir
13512 while true; do
13513   case "$INFODIR" in
13514     *\$* ) eval "INFODIR=$INFODIR" ;;
13515     *) break ;;
13516   esac
13517 done
13518
13519
13520
13521
13522 INFOPATH=$infopath
13523 while true; do
13524   case "$INFOPATH" in
13525     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13526     *) break ;;
13527   esac
13528 done
13529
13530
13531
13532
13533 PACKAGE_PATH=$package_path
13534 while true; do
13535   case "$PACKAGE_PATH" in
13536     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13537     *) break ;;
13538   esac
13539 done
13540
13541
13542
13543
13544 LISPDIR=$lispdir
13545 while true; do
13546   case "$LISPDIR" in
13547     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13548     *) break ;;
13549   esac
13550 done
13551
13552
13553
13554
13555 MODULEDIR=$moduledir
13556 while true; do
13557   case "$MODULEDIR" in
13558     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13559     *) break ;;
13560   esac
13561 done
13562
13563
13564
13565
13566 SITELISPDIR=$sitelispdir
13567 while true; do
13568   case "$SITELISPDIR" in
13569     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13570     *) break ;;
13571   esac
13572 done
13573
13574
13575
13576
13577 SITEMODULEDIR=$sitemoduledir
13578 while true; do
13579   case "$SITEMODULEDIR" in
13580     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13581     *) break ;;
13582   esac
13583 done
13584
13585
13586
13587
13588 ETCDIR=$etcdir
13589 while true; do
13590   case "$ETCDIR" in
13591     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13592     *) break ;;
13593   esac
13594 done
13595
13596
13597
13598
13599 LOCKDIR=$lockdir
13600 while true; do
13601   case "$LOCKDIR" in
13602     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13603     *) break ;;
13604   esac
13605 done
13606
13607
13608
13609
13610 DOCDIR=$docdir
13611 while true; do
13612   case "$DOCDIR" in
13613     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13614     *) break ;;
13615   esac
13616 done
13617
13618
13619
13620
13621 ARCHLIBDIR=$archlibdir
13622 while true; do
13623   case "$ARCHLIBDIR" in
13624     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13625     *) break ;;
13626   esac
13627 done
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13649
13650
13651
13652
13653
13654
13655
13656 : ${XEMACS_CC:=$CC}
13657
13658
13659 if test "$with_prefix" = "yes"; then
13660   { test "$extra_verbose" = "yes" && cat << \EOF
13661     Defining PREFIX_USER_DEFINED
13662 EOF
13663 cat >> confdefs.h <<\EOF
13664 #define PREFIX_USER_DEFINED 1
13665 EOF
13666 }
13667
13668 fi
13669
13670 if test "$with_site_lisp" = "no"; then
13671   { test "$extra_verbose" = "yes" && cat << \EOF
13672     Defining INHIBIT_SITE_LISP
13673 EOF
13674 cat >> confdefs.h <<\EOF
13675 #define INHIBIT_SITE_LISP 1
13676 EOF
13677 }
13678
13679 fi
13680 if test "$with_site_modules" = "no"; then
13681   { test "$extra_verbose" = "yes" && cat << \EOF
13682     Defining INHIBIT_SITE_MODULES
13683 EOF
13684 cat >> confdefs.h <<\EOF
13685 #define INHIBIT_SITE_MODULES 1
13686 EOF
13687 }
13688
13689 fi
13690
13691
13692 T=""
13693 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13694 ac_configure_args="$T"
13695
13696 { test "$extra_verbose" = "yes" && cat << EOF
13697     Defining EMACS_CONFIGURATION = "$configuration"
13698 EOF
13699 cat >> confdefs.h <<EOF
13700 #define EMACS_CONFIGURATION "$configuration"
13701 EOF
13702 }
13703
13704 { test "$extra_verbose" = "yes" && cat << EOF
13705     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13706 EOF
13707 cat >> confdefs.h <<EOF
13708 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13709 EOF
13710 }
13711
13712 { test "$extra_verbose" = "yes" && cat << EOF
13713     Defining config_machfile = "$machfile"
13714 EOF
13715 cat >> confdefs.h <<EOF
13716 #define config_machfile "$machfile"
13717 EOF
13718 }
13719
13720 { test "$extra_verbose" = "yes" && cat << EOF
13721     Defining config_opsysfile = "$opsysfile"
13722 EOF
13723 cat >> confdefs.h <<EOF
13724 #define config_opsysfile "$opsysfile"
13725 EOF
13726 }
13727
13728
13729
13730 null_string=""
13731 { test "$extra_verbose" = "yes" && cat << EOF
13732     Defining LD_SWITCH_X_SITE = $null_string
13733 EOF
13734 cat >> confdefs.h <<EOF
13735 #define LD_SWITCH_X_SITE $null_string
13736 EOF
13737 }
13738
13739 { test "$extra_verbose" = "yes" && cat << EOF
13740     Defining LD_SWITCH_X_SITE_AUX = $null_string
13741 EOF
13742 cat >> confdefs.h <<EOF
13743 #define LD_SWITCH_X_SITE_AUX $null_string
13744 EOF
13745 }
13746
13747 { test "$extra_verbose" = "yes" && cat << EOF
13748     Defining C_SWITCH_X_SITE = $null_string
13749 EOF
13750 cat >> confdefs.h <<EOF
13751 #define C_SWITCH_X_SITE $null_string
13752 EOF
13753 }
13754
13755 { test "$extra_verbose" = "yes" && cat << EOF
13756     Defining LD_SWITCH_SITE = $null_string
13757 EOF
13758 cat >> confdefs.h <<EOF
13759 #define LD_SWITCH_SITE $null_string
13760 EOF
13761 }
13762
13763 { test "$extra_verbose" = "yes" && cat << EOF
13764     Defining C_SWITCH_SITE = $null_string
13765 EOF
13766 cat >> confdefs.h <<EOF
13767 #define C_SWITCH_SITE $null_string
13768 EOF
13769 }
13770
13771
13772
13773 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13774     Defining GNU_MALLOC
13775 EOF
13776 cat >> confdefs.h <<\EOF
13777 #define GNU_MALLOC 1
13778 EOF
13779 }
13780
13781 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13782     Defining USE_SYSTEM_MALLOC
13783 EOF
13784 cat >> confdefs.h <<\EOF
13785 #define USE_SYSTEM_MALLOC 1
13786 EOF
13787 }
13788
13789 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13790     Defining USE_DEBUG_MALLOC
13791 EOF
13792 cat >> confdefs.h <<\EOF
13793 #define USE_DEBUG_MALLOC 1
13794 EOF
13795 }
13796
13797                                               { test "$extra_verbose" = "yes" && cat << \EOF
13798     Defining USE_SYSTEM_MALLOC
13799 EOF
13800 cat >> confdefs.h <<\EOF
13801 #define USE_SYSTEM_MALLOC 1
13802 EOF
13803 }
13804
13805 fi
13806 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13807     Defining I18N3
13808 EOF
13809 cat >> confdefs.h <<\EOF
13810 #define I18N3 1
13811 EOF
13812 }
13813
13814 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13815     Defining USE_GCC
13816 EOF
13817 cat >> confdefs.h <<\EOF
13818 #define USE_GCC 1
13819 EOF
13820 }
13821
13822 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13823     Defining EXTERNAL_WIDGET
13824 EOF
13825 cat >> confdefs.h <<\EOF
13826 #define EXTERNAL_WIDGET 1
13827 EOF
13828 }
13829
13830 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13831     Defining NO_DOC_FILE
13832 EOF
13833 cat >> confdefs.h <<\EOF
13834 #define NO_DOC_FILE 1
13835 EOF
13836 }
13837
13838 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13839     Defining PURIFY
13840 EOF
13841 cat >> confdefs.h <<\EOF
13842 #define PURIFY 1
13843 EOF
13844 }
13845
13846 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13847     Defining QUANTIFY
13848 EOF
13849 cat >> confdefs.h <<\EOF
13850 #define QUANTIFY 1
13851 EOF
13852 }
13853
13854 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13855     Defining MAIL_USE_POP
13856 EOF
13857 cat >> confdefs.h <<\EOF
13858 #define MAIL_USE_POP 1
13859 EOF
13860 }
13861
13862 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13863     Defining KERBEROS
13864 EOF
13865 cat >> confdefs.h <<\EOF
13866 #define KERBEROS 1
13867 EOF
13868 }
13869
13870 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13871     Defining HESIOD
13872 EOF
13873 cat >> confdefs.h <<\EOF
13874 #define HESIOD 1
13875 EOF
13876 }
13877
13878 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13879     Defining USE_UNION_TYPE
13880 EOF
13881 cat >> confdefs.h <<\EOF
13882 #define USE_UNION_TYPE 1
13883 EOF
13884 }
13885
13886 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13887     Defining PDUMP
13888 EOF
13889 cat >> confdefs.h <<\EOF
13890 #define PDUMP 1
13891 EOF
13892 }
13893
13894
13895
13896 (
13897 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13898 else
13899   echo "uname -a: `uname -a`"
13900 fi
13901 echo ""
13902 echo "$0 $quoted_arguments"
13903 ) > Installation
13904
13905 if test ! -z ${emacs_beta_version} ; then
13906   if test -z "${emacs_is_beta}" ; then
13907         xemacs_betaname=".${emacs_beta_version}"
13908   else
13909         xemacs_betaname="-b${emacs_beta_version}"
13910   fi
13911 else
13912   xemacs_betaname=""
13913 fi
13914
13915 (
13916 echo "
13917
13918 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13919
13920   Where should the build process find the source code?    $srcdir
13921   What installation prefix should install use?            $prefix
13922   What operating system and machine description files should XEmacs use?
13923         \`$opsysfile' and \`$machfile'
13924   What compiler should XEmacs be built with?              $CC $CFLAGS
13925   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13926   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13927   What window system should XEmacs use?                   ${window_system}"
13928 if test "$with_x11" = "yes"; then
13929   echo "  Where do we find X Windows header files?                $x_includes"
13930   echo "  Where do we find X Windows libraries?                   $x_libraries"
13931 fi
13932 if test -n "$site_includes"; then
13933   echo "  Additional header files:                                $site_includes"
13934 fi
13935 if test -n "$site_libraries"; then
13936   echo "  Additional libraries:                                   $site_libraries"
13937 fi
13938 if test -n "$site_prefixes"; then
13939   echo "  Additional prefixes:                                    $site_prefixes"
13940 fi
13941 if test -n "$runpath"; then
13942   echo "  Runtime library search path:                            $runpath"
13943 fi
13944 if test "$have_xaw" = "yes"; then
13945   echo "  Athena library to link:                                 $athena_lib"
13946   echo "  Athena header include path:                             $athena_h_path"
13947 fi
13948 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13949 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13950 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13951 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13952   echo "  No Xmu; substituting equivalent routines."
13953 fi
13954
13955 if test "$with_xpm" = yes; then
13956   echo "  Compiling in support for XPM images."
13957 elif test "$with_x11" = yes; then
13958   echo "  --------------------------------------------------------------------"
13959   echo "  WARNING: Compiling without XPM support."
13960   if test "$xpm_problem" != ""; then
13961     echo "  Reason: $xpm_problem"
13962   fi
13963   echo "  WARNING: You should strongly consider installing XPM."
13964   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13965   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13966   echo "  --------------------------------------------------------------------"
13967 fi
13968 if test "$with_png" = yes; then
13969   echo "  Compiling in support for PNG image handling."
13970 elif test "$window_system" != "none"; then
13971   echo "  --------------------------------------------------------------------"
13972   echo "  WARNING: Compiling without PNG image support."
13973   if test "$png_problem" != ""; then
13974     echo "  Reason: $png_problem"
13975   fi
13976   echo "  WARNING: You should strongly consider installing the PNG libraries."
13977   echo "  WARNING: Otherwise certain images and glyphs may not display."
13978   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13979   echo "  --------------------------------------------------------------------"
13980 fi
13981 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13982 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13983 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13984 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13985
13986 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13987 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13988 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13989 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13990
13991 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13992 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13993 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13994
13995 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13996
13997 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13998 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13999
14000 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14001 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
14002 test "$with_text_coding"     = yes && echo "  Compiling in Text coding support."
14003 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14004 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14005 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14006 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14007 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14008 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14009 if test "$with_wnn" = yes; then
14010   echo "  Compiling in support for the WNN input method on Mule."
14011   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14012 fi
14013 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14014
14015 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14016 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14017 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14018 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14019 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14020 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14021 case "$with_menubars" in
14022   lucid ) echo "  Using Lucid menubars." ;;
14023   motif ) echo "  Using Motif menubars."
14024           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14025           echo "             We recommend using the Lucid menubar instead."
14026           echo "             Re-run configure with --with-menubars='lucid'." ;;
14027   msw ) echo "  Using MS-Windows menubars." ;;
14028 esac
14029 case "$with_scrollbars" in
14030   lucid    ) echo "  Using Lucid scrollbars."     ;;
14031   motif    ) echo "  Using Motif scrollbars."     ;;
14032   athena   ) echo "  Using Athena scrollbars."    ;;
14033   msw ) echo "  Using MS-Windows scrollbars." ;;
14034 esac
14035 case "$with_widgets" in
14036   motif    ) echo "  Using Motif native widgets."     ;;
14037   athena   ) echo "  Using Athena native widgets."    ;;
14038   msw ) echo "  Using MS-Windows native widgets." ;;
14039 esac
14040 case "$with_dialogs" in
14041   motif    )
14042     echo "  Using Motif dialog boxes."
14043     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14044       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14045       echo "             We recommend using the Athena dialog boxes instead."
14046       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14047       echo "             Read the PROBLEMS file for more information."
14048     fi; fi
14049     ;;
14050   athena   ) echo "  Using Athena dialog boxes."    ;;
14051   msw ) echo "  Using MS-Windows dialog boxes." ;;
14052 esac
14053 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14054 test "$with_clash_detection" = yes && \
14055   echo "  Clash detection will use \"$lockdir\" for locking files."
14056 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14057 test "$with_pop"        = yes && echo "  Using POP for mail access."
14058 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14059 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14060 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14061 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14062 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14063 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14064 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14065   != "no no no no no"; then
14066   echo "  WARNING: ---------------------------------------------------------"
14067   echo "  WARNING: Compiling in support for runtime error checking."
14068   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14069   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14070   echo "  WARNING: ---------------------------------------------------------"
14071 fi
14072 echo ""
14073 ) | tee -a Installation
14074 echo ""
14075
14076
14077 # Remove any trailing slashes in these variables.
14078 test -n "$prefix" &&
14079   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14080 test -n "$exec_prefix" &&
14081   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14082
14083
14084 for file in $internal_makefile_list; do
14085   test "$file" = src/Makefile.in && \
14086     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14087   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14088 done
14089 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14090 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
14091
14092 trap '' 1 2 15
14093
14094 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14095
14096 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14097 # Let make expand exec_prefix.
14098 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14099
14100 # Any assignment to VPATH causes Sun make to only execute
14101 # the first set of double-colon rules, so remove it if not needed.
14102 # If there is a colon in the path, we need to keep it.
14103 if test "x$srcdir" = x.; then
14104   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14105 fi
14106
14107 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14108
14109 DEFS=-DHAVE_CONFIG_H
14110
14111 # Without the "./", some shells look in PATH for config.status.
14112 : ${CONFIG_STATUS=./config.status}
14113
14114 echo creating $CONFIG_STATUS
14115 rm -f $CONFIG_STATUS
14116 cat > $CONFIG_STATUS <<EOF
14117 #! /bin/sh
14118 # Generated automatically by configure.
14119 # Run this file to recreate the current configuration.
14120 # This directory was configured as follows,
14121 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14122 #
14123 # $0 $ac_configure_args
14124 #
14125 # Compiler output produced by configure, useful for debugging
14126 # configure, is in ./config.log if it exists.
14127
14128 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14129 for ac_option
14130 do
14131   case "\$ac_option" in
14132   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14133     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14134     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14135   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14136     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14137     exit 0 ;;
14138   -help | --help | --hel | --he | --h)
14139     echo "\$ac_cs_usage"; exit 0 ;;
14140   *) echo "\$ac_cs_usage"; exit 1 ;;
14141   esac
14142 done
14143
14144 ac_given_srcdir=$srcdir
14145 ac_given_INSTALL="$INSTALL"
14146
14147 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14148 EOF
14149 cat >> $CONFIG_STATUS <<EOF
14150
14151 # Protect against being on the right side of a sed subst in config.status.
14152 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14153  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14154 $ac_vpsub
14155 $extrasub
14156 s%@SHELL@%$SHELL%g
14157 s%@CFLAGS@%$CFLAGS%g
14158 s%@CPPFLAGS@%$CPPFLAGS%g
14159 s%@CXXFLAGS@%$CXXFLAGS%g
14160 s%@FFLAGS@%$FFLAGS%g
14161 s%@DEFS@%$DEFS%g
14162 s%@LDFLAGS@%$LDFLAGS%g
14163 s%@LIBS@%$LIBS%g
14164 s%@exec_prefix@%$exec_prefix%g
14165 s%@prefix@%$prefix%g
14166 s%@program_transform_name@%$program_transform_name%g
14167 s%@bindir@%$bindir%g
14168 s%@sbindir@%$sbindir%g
14169 s%@libexecdir@%$libexecdir%g
14170 s%@datadir@%$datadir%g
14171 s%@sysconfdir@%$sysconfdir%g
14172 s%@sharedstatedir@%$sharedstatedir%g
14173 s%@localstatedir@%$localstatedir%g
14174 s%@libdir@%$libdir%g
14175 s%@includedir@%$includedir%g
14176 s%@oldincludedir@%$oldincludedir%g
14177 s%@infodir@%$infodir%g
14178 s%@mandir@%$mandir%g
14179 s%@LN_S@%$LN_S%g
14180 s%@blddir@%$blddir%g
14181 s%@CC@%$CC%g
14182 s%@CPP@%$CPP%g
14183 s%@start_flags@%$start_flags%g
14184 s%@ld_switch_shared@%$ld_switch_shared%g
14185 s%@start_files@%$start_files%g
14186 s%@ld@%$ld%g
14187 s%@lib_gcc@%$lib_gcc%g
14188 s%@RANLIB@%$RANLIB%g
14189 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14190 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14191 s%@INSTALL_DATA@%$INSTALL_DATA%g
14192 s%@YACC@%$YACC%g
14193 s%@SET_MAKE@%$SET_MAKE%g
14194 s%@X_CFLAGS@%$X_CFLAGS%g
14195 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14196 s%@X_LIBS@%$X_LIBS%g
14197 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14198 s%@install_pp@%$install_pp%g
14199 s%@libs_xauth@%$libs_xauth%g
14200 s%@dnd_objs@%$dnd_objs%g
14201 s%@lwlib_objs@%$lwlib_objs%g
14202 s%@ALLOCA@%$ALLOCA%g
14203 s%@have_esd_config@%$have_esd_config%g
14204 s%@dll_ld@%$dll_ld%g
14205 s%@dll_cflags@%$dll_cflags%g
14206 s%@dll_ldflags@%$dll_ldflags%g
14207 s%@dll_post@%$dll_post%g
14208 s%@dll_ldo@%$dll_ldo%g
14209 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14210 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14211 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14212 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14213 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14214 s%@PROGNAME@%$PROGNAME%g
14215 s%@version@%$version%g
14216 s%@configuration@%$configuration%g
14217 s%@canonical@%$canonical%g
14218 s%@inststaticdir@%$inststaticdir%g
14219 s%@instvardir@%$instvardir%g
14220 s%@srcdir@%$srcdir%g
14221 s%@pkgdir@%$pkgdir%g
14222 s%@statedir@%$statedir%g
14223 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14224 s%@PREFIX@%$PREFIX%g
14225 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14226 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14227 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14228 s%@INFODIR@%$INFODIR%g
14229 s%@infopath@%$infopath%g
14230 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14231 s%@INFOPATH@%$INFOPATH%g
14232 s%@package_path@%$package_path%g
14233 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14234 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14235 s%@lispdir@%$lispdir%g
14236 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14237 s%@LISPDIR@%$LISPDIR%g
14238 s%@moduledir@%$moduledir%g
14239 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14240 s%@MODULEDIR@%$MODULEDIR%g
14241 s%@sitelispdir@%$sitelispdir%g
14242 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14243 s%@SITELISPDIR@%$SITELISPDIR%g
14244 s%@sitemoduledir@%$sitemoduledir%g
14245 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14246 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14247 s%@etcdir@%$etcdir%g
14248 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14249 s%@ETCDIR@%$ETCDIR%g
14250 s%@lockdir@%$lockdir%g
14251 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14252 s%@LOCKDIR@%$LOCKDIR%g
14253 s%@docdir@%$docdir%g
14254 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14255 s%@DOCDIR@%$DOCDIR%g
14256 s%@archlibdir@%$archlibdir%g
14257 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14258 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14259 s%@bitmapdir@%$bitmapdir%g
14260 s%@extra_objs@%$extra_objs%g
14261 s%@machfile@%$machfile%g
14262 s%@opsysfile@%$opsysfile%g
14263 s%@c_switch_general@%$c_switch_general%g
14264 s%@c_switch_window_system@%$c_switch_window_system%g
14265 s%@c_switch_all@%$c_switch_all%g
14266 s%@ld_switch_general@%$ld_switch_general%g
14267 s%@ld_switch_window_system@%$ld_switch_window_system%g
14268 s%@ld_switch_all@%$ld_switch_all%g
14269 s%@ld_libs_general@%$ld_libs_general%g
14270 s%@ld_libs_window_system@%$ld_libs_window_system%g
14271 s%@ld_libs_all@%$ld_libs_all%g
14272 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14273 s%@native_sound_lib@%$native_sound_lib%g
14274 s%@sound_cflags@%$sound_cflags%g
14275 s%@dynodump_arch@%$dynodump_arch%g
14276 s%@XEMACS_CC@%$XEMACS_CC%g
14277 s%@internal_makefile_list@%$internal_makefile_list%g
14278
14279 CEOF
14280 EOF
14281
14282 cat >> $CONFIG_STATUS <<\EOF
14283
14284 # Split the substitutions into bite-sized pieces for seds with
14285 # small command number limits, like on Digital OSF/1 and HP-UX.
14286 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14287 ac_file=1 # Number of current file.
14288 ac_beg=1 # First line for current file.
14289 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14290 ac_more_lines=:
14291 ac_sed_cmds=""
14292 while $ac_more_lines; do
14293   if test $ac_beg -gt 1; then
14294     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14295   else
14296     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14297   fi
14298   if test ! -s conftest.s$ac_file; then
14299     ac_more_lines=false
14300     rm -f conftest.s$ac_file
14301   else
14302     if test -z "$ac_sed_cmds"; then
14303       ac_sed_cmds="sed -f conftest.s$ac_file"
14304     else
14305       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14306     fi
14307     ac_file=`expr $ac_file + 1`
14308     ac_beg=$ac_end
14309     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14310   fi
14311 done
14312 if test -z "$ac_sed_cmds"; then
14313   ac_sed_cmds=cat
14314 fi
14315 EOF
14316
14317 cat >> $CONFIG_STATUS <<EOF
14318
14319 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14320 EOF
14321 cat >> $CONFIG_STATUS <<\EOF
14322 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14323   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14324   case "$ac_file" in
14325   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14326        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14327   *) ac_file_in="${ac_file}.in" ;;
14328   esac
14329
14330   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14331
14332   # Remove last slash and all that follows it.  Not all systems have dirname.
14333   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14334   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14335     # The file is in a subdirectory.
14336     test ! -d "$ac_dir" && mkdir "$ac_dir"
14337     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14338     # A "../" for each directory in $ac_dir_suffix.
14339     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14340   else
14341     ac_dir_suffix= ac_dots=
14342   fi
14343
14344   case "$ac_given_srcdir" in
14345   .)  srcdir=.
14346       if test -z "$ac_dots"; then top_srcdir=.
14347       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14348   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14349   *) # Relative path.
14350     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14351     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14352   esac
14353
14354   case "$ac_given_INSTALL" in
14355   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14356   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14357   esac
14358
14359   echo creating "$ac_file"
14360   rm -f "$ac_file"
14361   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14362   case "$ac_file" in
14363   *Makefile*) ac_comsub="1i\\
14364 # $configure_input" ;;
14365   *) ac_comsub= ;;
14366   esac
14367
14368   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14369   sed -e "$ac_comsub
14370 s%@configure_input@%$configure_input%g
14371 s%@srcdir@%$srcdir%g
14372 s%@top_srcdir@%$top_srcdir%g
14373 s%@INSTALL@%$INSTALL%g
14374 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14375 fi; done
14376 rm -f conftest.s*
14377
14378 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14379 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14380 #
14381 # ac_d sets the value in "#define NAME VALUE" lines.
14382 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14383 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14384 ac_dC='\3'
14385 ac_dD='%g'
14386 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14387 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14388 ac_uB='\([      ]\)%\1#\2define\3'
14389 ac_uC=' '
14390 ac_uD='\4%g'
14391 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14392 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14393 ac_eB='$%\1#\2define\3'
14394 ac_eC=' '
14395 ac_eD='%g'
14396
14397 if test "${CONFIG_HEADERS+set}" != set; then
14398 EOF
14399 cat >> $CONFIG_STATUS <<EOF
14400   CONFIG_HEADERS="src/config.h lwlib/config.h"
14401 EOF
14402 cat >> $CONFIG_STATUS <<\EOF
14403 fi
14404 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14405   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14406   case "$ac_file" in
14407   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14408        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14409   *) ac_file_in="${ac_file}.in" ;;
14410   esac
14411
14412   echo creating $ac_file
14413
14414   rm -f conftest.frag conftest.in conftest.out
14415   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14416   cat $ac_file_inputs > conftest.in
14417
14418 EOF
14419
14420 # Transform confdefs.h into a sed script conftest.vals that substitutes
14421 # the proper values into config.h.in to produce config.h.  And first:
14422 # Protect against being on the right side of a sed subst in config.status.
14423 # Protect against being in an unquoted here document in config.status.
14424 rm -f conftest.vals
14425 cat > conftest.hdr <<\EOF
14426 s/[\\&%]/\\&/g
14427 s%[\\$`]%\\&%g
14428 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14429 s%ac_d%ac_u%gp
14430 s%ac_u%ac_e%gp
14431 EOF
14432 sed -n -f conftest.hdr confdefs.h > conftest.vals
14433 rm -f conftest.hdr
14434
14435 # This sed command replaces #undef with comments.  This is necessary, for
14436 # example, in the case of _POSIX_SOURCE, which is predefined and required
14437 # on some systems where configure will not decide to define it.
14438 cat >> conftest.vals <<\EOF
14439 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14440 EOF
14441
14442 # Break up conftest.vals because some shells have a limit on
14443 # the size of here documents, and old seds have small limits too.
14444
14445 rm -f conftest.tail
14446 while :
14447 do
14448   ac_lines=`grep -c . conftest.vals`
14449   # grep -c gives empty output for an empty file on some AIX systems.
14450   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14451   # Write a limited-size here document to conftest.frag.
14452   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14453   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14454   echo 'CEOF
14455   sed -f conftest.frag conftest.in > conftest.out
14456   rm -f conftest.in
14457   mv conftest.out conftest.in
14458 ' >> $CONFIG_STATUS
14459   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14460   rm -f conftest.vals
14461   mv conftest.tail conftest.vals
14462 done
14463 rm -f conftest.vals
14464
14465 cat >> $CONFIG_STATUS <<\EOF
14466   rm -f conftest.frag conftest.h
14467   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14468   cat conftest.in >> conftest.h
14469   rm -f conftest.in
14470   if cmp -s $ac_file conftest.h 2>/dev/null; then
14471     echo "$ac_file is unchanged"
14472     rm -f conftest.h
14473   else
14474     # Remove last slash and all that follows it.  Not all systems have dirname.
14475       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14476       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14477       # The file is in a subdirectory.
14478       test ! -d "$ac_dir" && mkdir "$ac_dir"
14479     fi
14480     rm -f $ac_file
14481     mv conftest.h $ac_file
14482   fi
14483 fi; done
14484
14485 EOF
14486 cat >> $CONFIG_STATUS <<EOF
14487 CPP="$CPP"
14488  top_srcdir="$srcdir"
14489  MAKE_SUBDIR="$MAKE_SUBDIR"
14490
14491 EOF
14492 cat >> $CONFIG_STATUS <<\EOF
14493 for dir in . $MAKE_SUBDIR; do
14494   (
14495     cd $dir
14496     rm -f junk.c
14497     < Makefile.in \
14498       sed -e '/^# Generated/d' \
14499           -e 's%/\*\*/#.*%%' \
14500           -e 's/^ *# */#/' \
14501           -e '/^##/d' \
14502           -e '/^#/ {
14503 p
14504 d
14505 }'        \
14506           -e '/./ {
14507 s/\([\"]\)/\\\1/g
14508 s/^/"/
14509 s/$/"/
14510 }'  > junk.c;
14511
14512
14513
14514     echo creating $dir/Makefile
14515 $CPP -I. -I${top_srcdir}/src  junk.c \
14516   | sed -e 's/^\#.*//'          \
14517         -e 's/^[        ][      ]*$//'\
14518         -e 's/^ /       /'              \
14519   | sed -n -e '/^..*$/p'        \
14520   | sed '/^\"/ {
14521         s/\\\([\"]\)/\1/g
14522         s/^[    ]*\"//
14523         s/\"[   ]*$//
14524 }' > Makefile.new
14525     chmod 444 Makefile.new
14526     mv -f Makefile.new Makefile
14527
14528     echo creating $dir/GNUmakefile
14529 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14530   | sed -e 's/^\#.*//'          \
14531         -e 's/^[        ][      ]*$//'\
14532         -e 's/^ /       /'              \
14533   | sed -n -e '/^..*$/p'        \
14534   | sed '/^\"/ {
14535         s/\\\([\"]\)/\1/g
14536         s/^[    ]*\"//
14537         s/\"[   ]*$//
14538 }' > Makefile.new
14539     chmod 444 Makefile.new
14540     mv -f Makefile.new GNUmakefile
14541
14542     rm -f junk.c
14543   )
14544 done
14545
14546 sed < config.status >> lib-src/config.values \
14547   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14548   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14549   -e 's/^\([^ ]*\) $/\1 ""/' \
14550   -e 's/ 1$/ t/'
14551
14552
14553 exit 0
14554 EOF
14555 chmod +x $CONFIG_STATUS
14556 rm -fr confdefs* $ac_clean_files
14557 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1