XEmacs 21.2.27 "Hera".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.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_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         external_widget | \
358         verbose         | \
359         extra_verbose   | \
360         const_is_losing | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         no_doc_file )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 The default is to autodetect all sound support."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
475             elif test -n "$new_sdefault" ; then
476                 with_native_sound=$new_sdefault
477                 with_nas_sound=$new_sdefault
478                 with_esd_sound=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                         "with_athena" )
486           case "$val" in
487             xa | xaw )                    val=xaw    ;;
488             3 | 3d | xaw3d )              val=3d     ;;
489                         ne | nex | next | naxtaw)     val=next   ;;
490                         9 | 95 | xaw95 )              val=95     ;;
491             xp | xpm | xawxpm )           val=xpm    ;;
492             * ) (echo "$progname: Usage error:"
493 echo " " "The \`--$optname' option must have one of these values:
494   \`xaw', \`3d', \`next', \`95', or \`xpm'."
495 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
496           esac
497           eval "$opt=\"$val\""
498         ;;
499
500                 "with_xim" )
501           case "$val" in
502             y | ye | yes )                val=yes   ;;
503             n | no | non | none )         val=no    ;;
504             x | xl | xli | xlib )         val=xlib  ;;
505             m | mo | mot | moti | motif ) val=motif ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`motif', \`xlib', \`yes', or \`no'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "mail_locking" )
515           case "$val" in
516             lockf )     val=lockf ;;
517             flock )     val=flock ;;
518             file | dot ) val=file  ;;
519             locking )   val=locking  ;;
520             * ) (echo "$progname: Usage error:"
521 echo " " "The \`--$optname' option must have one of these values:
522   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
524           esac
525           eval "$opt=\"$val\""
526         ;;
527
528                 "error_checking" )
529                           
530           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
531             case "$x" in
532                       n | no | non | none ) new_default=no ;;
533               a | al | all )        new_default=yes ;;
534
535               extents )       error_check_extents=yes ;;
536               noextents )     error_check_extents=no ;;
537
538               typecheck )     error_check_typecheck=yes ;;
539               notypecheck )   error_check_typecheck=no ;;
540
541               bufpos )        error_check_bufpos=yes ;;
542               nobufpos )      error_check_bufpos=no ;;
543
544               gc )            error_check_gc=yes ;;
545               nogc )          error_check_gc=no ;;
546
547               malloc )        error_check_malloc=yes ;;
548               nomalloc )      error_check_malloc=no ;;
549
550               byte_code )     error_check_byte_code=yes ;;
551               nobyte_code )   error_check_byte_code=no ;;
552
553               * ) bogus_error_check=yes ;;
554             esac
555             if test "$bogus_error_check" -o \
556                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
557                 if test "$error_check_default" = yes ; then
558                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
559                 else
560                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
561                 fi
562                 (echo "$progname: Usage error:"
563 echo " " "Valid types for the \`--$optname' option are:
564   $types."
565 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
566             elif test -n "$new_default" ; then
567                 error_check_extents=$new_default
568                 error_check_typecheck=$new_default
569                 error_check_bufpos=$new_default
570                 error_check_gc=$new_default
571                 error_check_malloc=$new_default
572                 error_check_byte_code=$new_default
573                 new_default=    # reset this
574             fi
575             echeck_notfirst=true
576           done
577         ;;
578
579                                 
580                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
581         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
582         archlibdir | docdir | package_path )
583                    if test "$valomitted" = "yes"; then
584              if test "$#" = 0; then
585                  (echo "$progname: Usage error:"
586 echo " " "The \`--$optname' option requires a value."
587 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
588              fi
589              val="$1"; shift
590            fi
591            eval "$opt=\"$val\""
592
593                            case "$opt" in
594                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining EXEC_PREFIX_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define EXEC_PREFIX_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining LISPDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define LISPDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining SITELISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define SITELISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining MODULEDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define MODULEDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining ETCDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define ETCDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining INFODIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define INFODIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFOPATH_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFOPATH_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining PACKAGE_PATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define PACKAGE_PATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              datadir )
659                 { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining INFODIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define INFODIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining LISPDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define LISPDIR_USER_DEFINED 1
672 EOF
673 }
674
675             { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining MODULEDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define MODULEDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining ETCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define ETCDIR_USER_DEFINED 1
688 EOF
689 }
690  ;;
691              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining LOCKDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define LOCKDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715            esac
716         ;;
717
718                 "no_create" ) ;;
719
720                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
721
722                 "with_menubars"   | \
723         "with_scrollbars" | \
724         "with_dialogs" | \
725         "with_widgets" )
726           case "$val" in
727             l | lu | luc | luci | lucid )               val=lucid  ;;
728             m | mo | mot | moti | motif )               val=motif  ;;
729             a | at | ath | athe | athen | athena )      val=athena ;;
730             n | no | non | none )                       val=no ;;
731             * ) (echo "$progname: Usage error:"
732 echo " " "The \`--$optname' option must have one of these values:
733   \`lucid', \`motif', \`athena', or \`no'."
734 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
735           esac
736           eval "$opt=\"$val\""
737         ;;
738
739                 "use_minimal_tagbits" | \
740         "use_indexed_lrecord_implementation" | \
741         "run_in_place"  | \
742         "with_gnu_make" )
743           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
744         ;;
745
746                 * ) (echo "$progname: Usage error:"
747 echo " " "Unrecognized option: $arg"
748 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
749
750       esac
751     ;;
752
753         *-*-*) configuration="$arg" ;;
754
755         *) (echo "$progname: Usage error:"
756 echo " " "Unrecognized argument: $arg"
757 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
758
759   esac
760 done
761
762
763 test -n "$cpp"      && CPP="$cpp"
764 test -n "$cppflags" && CPPFLAGS="$cppflags"
765 test -n "$libs"     && LIBS="$libs"
766 test -n "$ldflags"  && LDFLAGS="$ldflags"
767
768 eval set x "$quoted_arguments"; shift
769
770 test "$extra_verbose" = "yes" && verbose=yes
771
772 test -n "$with_x" && with_x11="$with_x"
773
774 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
775   test "$with_system_malloc" = "default" && with_system_malloc=yes
776 fi
777
778
779
780 if test "$with_cde $with_tooltalk" = "yes no"; then
781   (echo "$progname: Usage error:"
782 echo " " "--with-cde requires --with-tooltalk"
783 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
784 elif test "$with_tooltalk" = "no" ; then with_cde=no
785 elif test "$with_cde" = "yes"; then with_tooltalk=yes
786 fi
787
788
789 case "$srcdir" in
790
791     "" )
792     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
793       if test -f "$dir/src/lisp.h" -a \
794               -f "$dir/lisp/version.el" ; then
795         srcdir="$dir"
796         break
797       fi
798     done
799     if test -z "$srcdir" ; then
800       (echo "$progname: Usage error:"
801 echo " " "Neither the current directory nor its parent seem to
802   contain the XEmacs sources.  If you do not want to build XEmacs in its
803   source tree, you should run \`$progname' in the directory in which
804   you wish to build XEmacs, using the \`--srcdir' option to say where the
805   sources may be found."
806 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
807     fi
808   ;;
809
810     * )
811     if test ! -f "$srcdir/src/lisp.h" -o \
812             ! -f "$srcdir/lisp/version.el" ; then
813       (echo "$progname: Usage error:"
814 echo " " "The directory specified with the \`--srcdir' option,
815   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
816   either run the \`$progname' script at the top of the XEmacs source
817   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
818 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
819     fi
820   ;;
821 esac
822
823 if test -z "$configuration"; then
824     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
825   if test -z "$configuration"; then
826     (echo "$progname: Usage error:"
827 echo " " "XEmacs has not been ported to this host type.
828 Try explicitly specifying the CONFIGURATION when rerunning configure."
829 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
830   fi
831 fi
832
833 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
834 echo "configure:835: checking whether ln -s works" >&5
835
836 rm -f conftestdata
837 if ln -s X conftestdata 2>/dev/null
838 then
839   rm -f conftestdata
840   ac_cv_prog_LN_S="ln -s"
841 else
842   ac_cv_prog_LN_S=ln
843 fi
844 LN_S="$ac_cv_prog_LN_S"
845 if test "$ac_cv_prog_LN_S" = "ln -s"; then
846   echo "$ac_t""yes" 1>&6
847 else
848   echo "$ac_t""no" 1>&6
849 fi
850
851
852 for dir in lisp etc man info tests; do
853   if test ! -d "$dir" ; then
854     echo Making symbolic link to "$srcdir/$dir"
855     ${LN_S} "$srcdir/$dir" "$dir"
856   fi
857 done
858
859
860 absolute_pwd="`pwd`";
861 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
862 then blddir="$PWD"
863 else blddir="$absolute_pwd"; if test -d "/net"; then
864   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
865   blddir=`echo "$blddir" | \
866    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
867 fi
868 fi
869
870
871 case "$srcdir" in
872   /* ) ;;
873   .  ) srcdir="$blddir" ;;
874   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
875   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
876   srcdir=`echo "$srcdir" | \
877    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
878 fi ;;
879 esac
880
881 if test `pwd` != `sh -c cd $srcdir && pwd`  \
882    && test -f "$srcdir/src/config.h"; then
883   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
884    echo "   as a build directory right now; it has been configured in its own"
885    echo "   right.  To configure in another directory as well, you MUST"
886    echo "   use GNU make.  If you do not have GNU make, then you must"
887    echo "   now do \`make distclean' in $srcdir,"
888    echo "   and then run $progname again.") >&2
889   extrasub='/^VPATH[     ]*=/c\
890 vpath %.c $(srcdir)\
891 vpath %.h $(srcdir)\
892 vpath %.y $(srcdir)\
893 vpath %.l $(srcdir)\
894 vpath %.s $(srcdir)\
895 vpath %.in $(srcdir)'
896 fi
897
898 . "$srcdir/version.sh" || exit 1;
899 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
900 : "${extra_verbose=$beta}"
901 version="${emacs_major_version}.${emacs_minor_version}"
902 { test "$extra_verbose" = "yes" && cat << EOF
903     Defining EMACS_MAJOR_VERSION = $emacs_major_version
904 EOF
905 cat >> confdefs.h <<EOF
906 #define EMACS_MAJOR_VERSION $emacs_major_version
907 EOF
908 }
909
910 { test "$extra_verbose" = "yes" && cat << EOF
911     Defining EMACS_MINOR_VERSION = $emacs_minor_version
912 EOF
913 cat >> confdefs.h <<EOF
914 #define EMACS_MINOR_VERSION $emacs_minor_version
915 EOF
916 }
917
918 if test -n "$emacs_beta_version" ; then
919   if test "$beta" = "yes"; then
920         version="${version}-b${emacs_beta_version}"
921         { test "$extra_verbose" = "yes" && cat << EOF
922     Defining EMACS_BETA_VERSION = $emacs_beta_version
923 EOF
924 cat >> confdefs.h <<EOF
925 #define EMACS_BETA_VERSION $emacs_beta_version
926 EOF
927 }
928
929   else
930         version="${version}.${emacs_beta_version}"
931         { test "$extra_verbose" = "yes" && cat << EOF
932     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
933 EOF
934 cat >> confdefs.h <<EOF
935 #define EMACS_PATCH_LEVEL $emacs_beta_version
936 EOF
937 }
938
939   fi
940 fi
941 { test "$extra_verbose" = "yes" && cat << EOF
942     Defining XEMACS_CODENAME = "$xemacs_codename"
943 EOF
944 cat >> confdefs.h <<EOF
945 #define XEMACS_CODENAME "$xemacs_codename"
946 EOF
947 }
948
949 { test "$extra_verbose" = "yes" && cat << EOF
950     Defining EMACS_VERSION = "$version"
951 EOF
952 cat >> confdefs.h <<EOF
953 #define EMACS_VERSION "$version"
954 EOF
955 }
956
957
958 if test "$with_infodock" = "yes"; then
959   if test ! -f ../../ID-INSTALL; then
960     echo "Cannot build InfoDock without InfoDock sources"
961     with_infodock=no
962   fi
963 fi
964
965 if test "$with_infodock" = "yes"; then
966       { test "$extra_verbose" = "yes" && cat << EOF
967     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
968 EOF
969 cat >> confdefs.h <<EOF
970 #define INFODOCK_MAJOR_VERSION $infodock_major_version
971 EOF
972 }
973
974   { test "$extra_verbose" = "yes" && cat << EOF
975     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
976 EOF
977 cat >> confdefs.h <<EOF
978 #define INFODOCK_MINOR_VERSION $infodock_minor_version
979 EOF
980 }
981
982   { test "$extra_verbose" = "yes" && cat << EOF
983     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
984 EOF
985 cat >> confdefs.h <<EOF
986 #define INFODOCK_BUILD_VERSION $infodock_build_version
987 EOF
988 }
989
990   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
991   PROGNAME=infodock
992   CPPFLAGS="$CPPFLAGS -DINFODOCK"
993 else
994   PROGNAME=xemacs
995 fi
996
997 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
998 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
999     Defining ERROR_CHECK_EXTENTS
1000 EOF
1001 cat >> confdefs.h <<\EOF
1002 #define ERROR_CHECK_EXTENTS 1
1003 EOF
1004 }
1005
1006 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1007     Defining ERROR_CHECK_TYPECHECK
1008 EOF
1009 cat >> confdefs.h <<\EOF
1010 #define ERROR_CHECK_TYPECHECK 1
1011 EOF
1012 }
1013
1014 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining ERROR_CHECK_BUFPOS
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define ERROR_CHECK_BUFPOS 1
1019 EOF
1020 }
1021
1022 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1023     Defining ERROR_CHECK_GC
1024 EOF
1025 cat >> confdefs.h <<\EOF
1026 #define ERROR_CHECK_GC 1
1027 EOF
1028 }
1029
1030 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_MALLOC
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_MALLOC 1
1035 EOF
1036 }
1037
1038 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_BYTE_CODE
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_BYTE_CODE 1
1043 EOF
1044 }
1045
1046 if test "${debug:=$beta}" = "yes"; then
1047   use_assertions=yes memory_usage_stats=yes
1048   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1049    echo "    xemacs will be linked with \"debug.o\""
1050  fi
1051   { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining DEBUG_XEMACS
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define DEBUG_XEMACS 1
1056 EOF
1057 }
1058
1059 fi
1060 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1061     Defining USE_ASSERTIONS
1062 EOF
1063 cat >> confdefs.h <<\EOF
1064 #define USE_ASSERTIONS 1
1065 EOF
1066 }
1067
1068 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1069     Defining MEMORY_USAGE_STATS
1070 EOF
1071 cat >> confdefs.h <<\EOF
1072 #define MEMORY_USAGE_STATS 1
1073 EOF
1074 }
1075
1076
1077
1078 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1079 echo "configure:1080: checking "host system type"" >&5
1080 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1081 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1082 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1083 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1084 echo "$ac_t""$configuration" 1>&6
1085
1086
1087
1088
1089
1090 machine='' opsys=''
1091
1092 case "$canonical" in
1093   sparc-*-*        ) machine=sparc ;;
1094   alpha*-*-*       ) machine=alpha ;;
1095   vax-*-*          ) machine=vax ;;
1096   mips-dec-*       ) machine=pmax ;;
1097   mips-sgi-*       ) machine=iris4d ;;
1098   mips*-linux      ) machine=mips ;;
1099   romp-ibm-*       ) machine=ibmrt ;;
1100   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1101   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1102   powerpc*-*       ) machine=powerpc ;;
1103   hppa-*-*         ) machine=hp800 ;;
1104   m88k-dg-*        ) machine=aviion ;;
1105   m68*-sony-*      ) machine=news ;;
1106   mips-sony-*      ) machine=news-risc ;;
1107   clipper-*        ) machine=clipper ;;
1108   arm-*            ) machine=arm ;;
1109   ns32k-*          ) machine=ns32000 ;;
1110 esac
1111
1112 case "$canonical" in
1113   *-*-linux*    ) opsys=linux ;;
1114   *-*-netbsd*   ) opsys=netbsd ;;
1115   *-*-openbsd*  ) opsys=openbsd ;;
1116   *-*-nextstep* ) opsys=nextstep ;;
1117   *-*-vms       ) opsys=vms ;;
1118
1119     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1120   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1121   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1122   *-dec-osf3*                ) opsys=decosf3-1 ;;
1123   *-dec-osf4*                ) opsys=decosf4-0 ;;
1124
1125     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1126   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1127   *-*-ultrix* )         opsys=ultrix4-3 ;;
1128
1129     *-*-aix3.1*  ) opsys=aix3-1 ;;
1130   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1131   *-*-aix3*    ) opsys=aix3-2   ;;
1132   *-*-aix4.0*  ) opsys=aix4     ;;
1133   *-*-aix4.1*  ) opsys=aix4-1   ;;
1134   *-*-aix4*    ) opsys=aix4-2   ;;
1135
1136     *-gnu* )                    opsys=gnu    ;;
1137   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1138   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1139   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1140   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1141   *-*-aos*   )                  opsys=bsd4-3 ;;
1142   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1143   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1144   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1145   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1146   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1147   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1148         if test -z "$NON_GNU_CPP" ; then
1149           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1150             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1151           done
1152         fi
1153         opsys=usg5-4-2 ;;
1154     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1155     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1156 esac
1157
1158 case "$canonical" in
1159
1160     *-*-netbsd* )
1161     case "$canonical" in
1162       i[3-9]86-*-netbsd*) machine=intel386 ;;
1163       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1164                                             machine=hp9000s300 ;;
1165       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1166       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1167     esac
1168   ;;
1169
1170     *-*-openbsd* )
1171     case "${canonical}" in
1172       i386-*-openbsd*)          machine=intel386 ;;
1173       m68k-*-openbsd*)          machine=hp9000s300 ;;
1174       mipsel-*-openbsd*)        machine=pmax ;;
1175      esac
1176    ;;
1177
1178     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1179   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1180
1181     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1182   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1183
1184     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1185
1186     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1187
1188     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1189
1190     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1191
1192     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1193
1194     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1195   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1196   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1197
1198   
1199     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1200
1201     *-convex-bsd* | *-convex-convexos* )
1202     machine=convex opsys=bsd4-3
1203     NON_GNU_CPP="cc -E -P"
1204   ;;
1205
1206     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1207
1208     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1209   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1210   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1211   m88k-dg-dgux*                           ) opsys=dgux     ;;
1212
1213     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1214   m88k-motorola-sysv4* )
1215                     machine=delta88k opsys=usg5-4-2
1216   ;;
1217   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1218
1219     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1220   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1221
1222     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1223
1224     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1225   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1226   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1227
1228       m88k-harris-cxux* )
1229         case "`uname -r`" in
1230        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1231        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1232     esac
1233     NON_GNU_CPP="/lib/cpp"
1234   ;;
1235     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1236     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1237
1238     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1239
1240     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1241
1242     *-hp-hpux* )
1243         case "$canonical" in
1244       m68*  ) machine=hp9000s300 ;;
1245       hppa* ) machine=hp800      ;;
1246     esac
1247
1248     case "$canonical" in
1249       *-hp-hpux7*  )  opsys=hpux   ;;
1250       *-hp-hpux8*  )  opsys=hpux8  ;;
1251       *-hp-hpux9*  )  opsys=hpux9  ;;
1252       *-hp-hpux10* )  opsys=hpux10 ;;
1253       *-hp-hpux11* )  opsys=hpux11 ;;
1254       *            )  opsys=hpux   ;;
1255     esac
1256
1257         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1258    echo "    xemacs will be linked with \"strcat.o\""
1259  fi ;; esac
1260
1261     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1262         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1263     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1264
1265     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1266   ;;
1267
1268     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1269   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1270
1271     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1272   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1273   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1274   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1275   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1276   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1277
1278     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1279   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1280
1281     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1282
1283     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1284
1285     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1286
1287     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1288
1289       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1290
1291     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1292
1293     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1294
1295     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1296
1297     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1298
1299         mips-mips-usg* ) machine=mips4 ;;
1300   mips-mips-riscos4 )
1301     machine=mips4
1302     NON_GNU_CC="cc -systype bsd43"
1303     NON_GNU_CPP="cc -systype bsd43 -E"
1304     case "$canonical" in
1305       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1306       mips-mips-riscos5* ) opsys=riscos5 ;;
1307     esac
1308   ;;
1309   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1310   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1311
1312     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1313
1314     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1315
1316     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1317   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1318
1319     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1320
1321     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1322
1323     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1324
1325     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1326
1327     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1328   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1329
1330     mips-siemens-sysv* | mips-sni-sysv*)
1331     machine=mips-siemens opsys=usg5-4
1332     NON_GNU_CC=/usr/ccs/bin/cc
1333     NON_GNU_CPP=/usr/ccs/lib/cpp
1334   ;;
1335
1336     mips-nec-sysv*)
1337     machine=mips-nec
1338     NON_GNU_CC=/usr/ccs/bin/cc
1339     NON_GNU_CPP=/usr/ccs/lib/cpp
1340   ;;
1341
1342       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1343   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1344     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1345   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1346   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1347   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1348   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1349   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1350   mips-sgi-irix*      ) opsys=irix5-0 ;;
1351
1352     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1353   *-sony-news* ) opsys=newsos5 ;;
1354
1355     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1356
1357     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1358         case "$canonical" in
1359       m68*-sunos1* )             machine=sun1     ;;
1360       m68*-sunos2* )             machine=sun2     ;;
1361       m68* )                     machine=sun3     ;;
1362       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1363       i*86-*-* )                 machine=intel386 ;;
1364       rs6000* )                  machine=rs6000   ;;
1365     esac
1366
1367         case "$canonical" in *-sunos5*)
1368       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1369     esac
1370
1371                     case "$canonical" in
1372       *-sunos4* )
1373         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1374         : ;;
1375       *-solaris2* )
1376         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1377         RANLIB=':' ;;
1378     esac
1379
1380     case "$canonical" in
1381       *-solaris*          )
1382         opsys=sol2
1383         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1384         { test "$extra_verbose" = "yes" && cat << EOF
1385     Defining OS_RELEASE = $os_release
1386 EOF
1387 cat >> confdefs.h <<EOF
1388 #define OS_RELEASE $os_release
1389 EOF
1390 }
1391  ;;
1392
1393             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1394       *-sunos4.0*         ) opsys=sunos4-0      ;;
1395       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1396       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1397       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1398       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1399       *-mach*             ) opsys=mach-bsd4-3   ;;
1400       *                   ) opsys=bsd4-2        ;;
1401     esac
1402
1403     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1404
1405         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1406   ;;
1407
1408     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1409
1410     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1411   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1412
1413     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1414
1415     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1416
1417     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1418       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1419
1420     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1421
1422     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1423
1424     vax-dec-* )
1425     case "$canonical" in
1426       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1427       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1428       *-mach* )                         opsys=mach-bsd4-3 ;;
1429     esac
1430   ;;
1431
1432     ns16k-whitechapel-* ) machine=mg1 ;;
1433
1434     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1435
1436     i[3-9]86-*-* )
1437     machine=intel386
1438     case "$canonical" in
1439       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1440       *-isc2.2* )               opsys=isc2-2 ;;
1441       *-isc4.0* )               opsys=isc4-0 ;;
1442       *-isc4.* )                opsys=isc4-1
1443                                 GCC_TEST_OPTIONS=-posix
1444                                 NON_GCC_TEST_OPTIONS=-Xp
1445                                 ;;
1446       *-isc* )                  opsys=isc3-0 ;;
1447       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1448       *-esix* )                 opsys=esix ;;
1449       *-mach* )                 opsys=mach-bsd4-3 ;;
1450       *-xenix* )                opsys=xenix ;;
1451       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1452       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1453       *-bsdi4* )                opsys=bsdos4 ;;
1454       *-bsdi3* )                opsys=bsdos3 ;;
1455       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1456       *-bsdi2* )                opsys=bsdos2 ;;
1457       *-sco3.2v5* )             opsys=sco5 ;
1458                                                         if test "$dynamic" = "yes" ; then
1459                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1460         else
1461                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1462         fi ;;
1463       *-sysv5* )                opsys=sco7 ;;
1464       *-386bsd* )               opsys=386bsd ;;
1465       *-freebsd* )              opsys=freebsd ;;
1466       *-nextstep* )             opsys=nextstep ;;
1467       *-pc-cygwin* )            opsys=cygwin32 ;;
1468       *-pc-mingw* )             opsys=mingw32 ;
1469                                 test -z "$with_tty" && with_tty="no";;
1470           esac
1471   ;;
1472
1473     m68k-*-linux* ) machine=m68k opsys=linux ;;
1474
1475 esac
1476
1477 if test -z "$machine" -o -z "$opsys"; then
1478   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1479    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1480   ) >&2
1481   exit 1
1482 fi
1483
1484 if test -z "$dynamic"; then
1485   case "$opsys" in
1486     hpux* | sunos4* ) dynamic=no ;;
1487     *) dynamic=yes ;;
1488   esac
1489 fi
1490 if test "$dynamic" = "yes"; then
1491   case "$opsys" in
1492     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1493     decosf* ) ld_call_shared="-call_shared" ;;
1494   esac
1495 else   case "$opsys" in
1496     sol2 )
1497       echo "Static linking is not supported on Solaris 2."
1498       echo "Rerun configure without specifying --dynamic=no."
1499       exit 1 ;;
1500     linux   ) ld_call_shared="-Bstatic" ;;
1501     decosf* ) ld_call_shared="-non_shared" ;;
1502   esac
1503 fi
1504
1505 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1506
1507 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1508 { test "$extra_verbose" = "yes" && cat << EOF
1509     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1510 EOF
1511 cat >> confdefs.h <<EOF
1512 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1513 EOF
1514 }
1515
1516
1517 machfile="m/${machine}.h"
1518 opsysfile="s/${opsys}.h"
1519
1520
1521 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1522 if test "$with_workshop $with_tooltalk" = "yes no"; then
1523   (echo "$progname: Usage error:"
1524 echo " " "--with-workshop requires --with-tooltalk"
1525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1526 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1527 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1528 fi
1529
1530 if test "$with_workshop" = "yes"; then
1531   { test "$extra_verbose" = "yes" && cat << \EOF
1532     Defining SUNPRO
1533 EOF
1534 cat >> confdefs.h <<\EOF
1535 #define SUNPRO 1
1536 EOF
1537 }
1538
1539   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1540    echo "    xemacs will be linked with \"sunpro.o\""
1541  fi
1542 fi
1543
1544 if test "$with_clash_detection" = "yes"; then
1545   { test "$extra_verbose" = "yes" && cat << \EOF
1546     Defining CLASH_DETECTION
1547 EOF
1548 cat >> confdefs.h <<\EOF
1549 #define CLASH_DETECTION 1
1550 EOF
1551 }
1552
1553   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1554    echo "    xemacs will be linked with \"filelock.o\""
1555  fi
1556 fi
1557
1558 test -n "$compiler" && CC="$compiler"
1559 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1560 fi
1561
1562 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1563 if test "${CFLAGS-unset}" != unset
1564   then cflags_specified=yes;
1565   else cflags_specified=no;
1566 fi
1567
1568 xe_save_CFLAGS="$CFLAGS"
1569
1570 # Extract the first word of "gcc", so it can be a program name with args.
1571 set dummy gcc; ac_word=$2
1572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1573 echo "configure:1574: checking for $ac_word" >&5
1574
1575 if test -n "$CC"; then
1576   ac_cv_prog_CC="$CC" # Let the user override the test.
1577 else
1578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1579   ac_dummy="$PATH"
1580   for ac_dir in $ac_dummy; do
1581     test -z "$ac_dir" && ac_dir=.
1582     if test -f $ac_dir/$ac_word; then
1583       ac_cv_prog_CC="gcc"
1584       break
1585     fi
1586   done
1587   IFS="$ac_save_ifs"
1588 fi
1589 CC="$ac_cv_prog_CC"
1590 if test -n "$CC"; then
1591   echo "$ac_t""$CC" 1>&6
1592 else
1593   echo "$ac_t""no" 1>&6
1594 fi
1595
1596 if test -z "$CC"; then
1597   # Extract the first word of "cc", so it can be a program name with args.
1598 set dummy cc; ac_word=$2
1599 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1600 echo "configure:1601: checking for $ac_word" >&5
1601
1602 if test -n "$CC"; then
1603   ac_cv_prog_CC="$CC" # Let the user override the test.
1604 else
1605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1606   ac_prog_rejected=no
1607   ac_dummy="$PATH"
1608   for ac_dir in $ac_dummy; do
1609     test -z "$ac_dir" && ac_dir=.
1610     if test -f $ac_dir/$ac_word; then
1611       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1612         ac_prog_rejected=yes
1613         continue
1614       fi
1615       ac_cv_prog_CC="cc"
1616       break
1617     fi
1618   done
1619   IFS="$ac_save_ifs"
1620 if test $ac_prog_rejected = yes; then
1621   # We found a bogon in the path, so make sure we never use it.
1622   set dummy $ac_cv_prog_CC
1623   shift
1624   if test $# -gt 0; then
1625     # We chose a different compiler from the bogus one.
1626     # However, it has the same basename, so the bogon will be chosen
1627     # first if we set CC to just the basename; use the full file name.
1628     shift
1629     set dummy "$ac_dir/$ac_word" "$@"
1630     shift
1631     ac_cv_prog_CC="$@"
1632   fi
1633 fi
1634 fi
1635 CC="$ac_cv_prog_CC"
1636 if test -n "$CC"; then
1637   echo "$ac_t""$CC" 1>&6
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642   if test -z "$CC"; then
1643     case "`uname -s`" in
1644     *win32* | *WIN32*)
1645       # Extract the first word of "cl", so it can be a program name with args.
1646 set dummy cl; ac_word=$2
1647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1648 echo "configure:1649: checking for $ac_word" >&5
1649
1650 if test -n "$CC"; then
1651   ac_cv_prog_CC="$CC" # Let the user override the test.
1652 else
1653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1654   ac_dummy="$PATH"
1655   for ac_dir in $ac_dummy; do
1656     test -z "$ac_dir" && ac_dir=.
1657     if test -f $ac_dir/$ac_word; then
1658       ac_cv_prog_CC="cl"
1659       break
1660     fi
1661   done
1662   IFS="$ac_save_ifs"
1663 fi
1664 CC="$ac_cv_prog_CC"
1665 if test -n "$CC"; then
1666   echo "$ac_t""$CC" 1>&6
1667 else
1668   echo "$ac_t""no" 1>&6
1669 fi
1670  ;;
1671     esac
1672   fi
1673   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1674 fi
1675
1676 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1677 echo "configure:1678: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1678
1679 ac_ext=c
1680 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1681 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1682 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1683 ac_cpp='$CPP '"$xe_cppflags"
1684 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1685 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1686 cross_compiling=no
1687
1688 cat > conftest.$ac_ext << EOF
1689
1690 #line 1691 "configure"
1691 #include "confdefs.h"
1692
1693 main(){return(0);}
1694 EOF
1695 if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1696   ac_cv_prog_cc_works=yes
1697   # If we can't run a trivial program, we are probably using a cross compiler.
1698   if (./conftest; exit) 2>/dev/null; then
1699     ac_cv_prog_cc_cross=no
1700   else
1701     ac_cv_prog_cc_cross=yes
1702   fi
1703 else
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   ac_cv_prog_cc_works=no
1707 fi
1708 rm -fr conftest*
1709 ac_ext=c
1710 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1711 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1712 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1713 ac_cpp='$CPP '"$xe_cppflags"
1714 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1715 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1716 cross_compiling=no
1717
1718 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1719 if test $ac_cv_prog_cc_works = no; then
1720   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1721 fi
1722 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1723 echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1724 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1725 cross_compiling=$ac_cv_prog_cc_cross
1726
1727 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1728 echo "configure:1729: checking whether we are using GNU C" >&5
1729
1730 cat > conftest.c <<EOF
1731 #ifdef __GNUC__
1732   yes;
1733 #endif
1734 EOF
1735 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1736   ac_cv_prog_gcc=yes
1737 else
1738   ac_cv_prog_gcc=no
1739 fi
1740
1741 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1742
1743 if test $ac_cv_prog_gcc = yes; then
1744   GCC=yes
1745 else
1746   GCC=
1747 fi
1748
1749 ac_test_CFLAGS="${CFLAGS+set}"
1750 ac_save_CFLAGS="$CFLAGS"
1751 CFLAGS=
1752 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1753 echo "configure:1754: checking whether ${CC-cc} accepts -g" >&5
1754
1755 echo 'void f(){}' > conftest.c
1756 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1757   ac_cv_prog_cc_g=yes
1758 else
1759   ac_cv_prog_cc_g=no
1760 fi
1761 rm -f conftest*
1762
1763
1764 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1765 if test "$ac_test_CFLAGS" = set; then
1766   CFLAGS="$ac_save_CFLAGS"
1767 elif test $ac_cv_prog_cc_g = yes; then
1768   if test "$GCC" = yes; then
1769     CFLAGS="-g -O2"
1770   else
1771     CFLAGS="-g"
1772   fi
1773 else
1774   if test "$GCC" = yes; then
1775     CFLAGS="-O2"
1776   else
1777     CFLAGS=
1778   fi
1779 fi
1780  
1781 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1782   CC=${NON_GNU_CC-cc}
1783   # Extract the first word of "gcc", so it can be a program name with args.
1784 set dummy gcc; ac_word=$2
1785 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1786 echo "configure:1787: checking for $ac_word" >&5
1787
1788 if test -n "$CC"; then
1789   ac_cv_prog_CC="$CC" # Let the user override the test.
1790 else
1791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1792   ac_dummy="$PATH"
1793   for ac_dir in $ac_dummy; do
1794     test -z "$ac_dir" && ac_dir=.
1795     if test -f $ac_dir/$ac_word; then
1796       ac_cv_prog_CC="gcc"
1797       break
1798     fi
1799   done
1800   IFS="$ac_save_ifs"
1801 fi
1802 CC="$ac_cv_prog_CC"
1803 if test -n "$CC"; then
1804   echo "$ac_t""$CC" 1>&6
1805 else
1806   echo "$ac_t""no" 1>&6
1807 fi
1808
1809 if test -z "$CC"; then
1810   # Extract the first word of "cc", so it can be a program name with args.
1811 set dummy cc; ac_word=$2
1812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1813 echo "configure:1814: checking for $ac_word" >&5
1814
1815 if test -n "$CC"; then
1816   ac_cv_prog_CC="$CC" # Let the user override the test.
1817 else
1818   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1819   ac_prog_rejected=no
1820   ac_dummy="$PATH"
1821   for ac_dir in $ac_dummy; do
1822     test -z "$ac_dir" && ac_dir=.
1823     if test -f $ac_dir/$ac_word; then
1824       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1825         ac_prog_rejected=yes
1826         continue
1827       fi
1828       ac_cv_prog_CC="cc"
1829       break
1830     fi
1831   done
1832   IFS="$ac_save_ifs"
1833 if test $ac_prog_rejected = yes; then
1834   # We found a bogon in the path, so make sure we never use it.
1835   set dummy $ac_cv_prog_CC
1836   shift
1837   if test $# -gt 0; then
1838     # We chose a different compiler from the bogus one.
1839     # However, it has the same basename, so the bogon will be chosen
1840     # first if we set CC to just the basename; use the full file name.
1841     shift
1842     set dummy "$ac_dir/$ac_word" "$@"
1843     shift
1844     ac_cv_prog_CC="$@"
1845   fi
1846 fi
1847 fi
1848 CC="$ac_cv_prog_CC"
1849 if test -n "$CC"; then
1850   echo "$ac_t""$CC" 1>&6
1851 else
1852   echo "$ac_t""no" 1>&6
1853 fi
1854
1855   if test -z "$CC"; then
1856     case "`uname -s`" in
1857     *win32* | *WIN32*)
1858       # Extract the first word of "cl", so it can be a program name with args.
1859 set dummy cl; ac_word=$2
1860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1861 echo "configure:1862: checking for $ac_word" >&5
1862
1863 if test -n "$CC"; then
1864   ac_cv_prog_CC="$CC" # Let the user override the test.
1865 else
1866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1867   ac_dummy="$PATH"
1868   for ac_dir in $ac_dummy; do
1869     test -z "$ac_dir" && ac_dir=.
1870     if test -f $ac_dir/$ac_word; then
1871       ac_cv_prog_CC="cl"
1872       break
1873     fi
1874   done
1875   IFS="$ac_save_ifs"
1876 fi
1877 CC="$ac_cv_prog_CC"
1878 if test -n "$CC"; then
1879   echo "$ac_t""$CC" 1>&6
1880 else
1881   echo "$ac_t""no" 1>&6
1882 fi
1883  ;;
1884     esac
1885   fi
1886   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1887 fi
1888
1889 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1890 echo "configure:1891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1891
1892 ac_ext=c
1893 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1894 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1895 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1896 ac_cpp='$CPP '"$xe_cppflags"
1897 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1898 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1899 cross_compiling=no
1900
1901 cat > conftest.$ac_ext << EOF
1902
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905
1906 main(){return(0);}
1907 EOF
1908 if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1909   ac_cv_prog_cc_works=yes
1910   # If we can't run a trivial program, we are probably using a cross compiler.
1911   if (./conftest; exit) 2>/dev/null; then
1912     ac_cv_prog_cc_cross=no
1913   else
1914     ac_cv_prog_cc_cross=yes
1915   fi
1916 else
1917   echo "configure: failed program was:" >&5
1918   cat conftest.$ac_ext >&5
1919   ac_cv_prog_cc_works=no
1920 fi
1921 rm -fr conftest*
1922 ac_ext=c
1923 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1924 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1925 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1926 ac_cpp='$CPP '"$xe_cppflags"
1927 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1928 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1929 cross_compiling=no
1930
1931 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1932 if test $ac_cv_prog_cc_works = no; then
1933   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1934 fi
1935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1936 echo "configure:1937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1937 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1938 cross_compiling=$ac_cv_prog_cc_cross
1939
1940 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1941 echo "configure:1942: checking whether we are using GNU C" >&5
1942
1943 cat > conftest.c <<EOF
1944 #ifdef __GNUC__
1945   yes;
1946 #endif
1947 EOF
1948 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1949   ac_cv_prog_gcc=yes
1950 else
1951   ac_cv_prog_gcc=no
1952 fi
1953
1954 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1955
1956 if test $ac_cv_prog_gcc = yes; then
1957   GCC=yes
1958 else
1959   GCC=
1960 fi
1961
1962 ac_test_CFLAGS="${CFLAGS+set}"
1963 ac_save_CFLAGS="$CFLAGS"
1964 CFLAGS=
1965 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1966 echo "configure:1967: checking whether ${CC-cc} accepts -g" >&5
1967
1968 echo 'void f(){}' > conftest.c
1969 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1970   ac_cv_prog_cc_g=yes
1971 else
1972   ac_cv_prog_cc_g=no
1973 fi
1974 rm -f conftest*
1975
1976
1977 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1978 if test "$ac_test_CFLAGS" = set; then
1979   CFLAGS="$ac_save_CFLAGS"
1980 elif test $ac_cv_prog_cc_g = yes; then
1981   if test "$GCC" = yes; then
1982     CFLAGS="-g -O2"
1983   else
1984     CFLAGS="-g"
1985   fi
1986 else
1987   if test "$GCC" = yes; then
1988     CFLAGS="-O2"
1989   else
1990     CFLAGS=
1991   fi
1992 fi
1993
1994 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1995   CC=gcc
1996   # Extract the first word of "gcc", so it can be a program name with args.
1997 set dummy gcc; ac_word=$2
1998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1999 echo "configure:2000: checking for $ac_word" >&5
2000
2001 if test -n "$CC"; then
2002   ac_cv_prog_CC="$CC" # Let the user override the test.
2003 else
2004   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2005   ac_dummy="$PATH"
2006   for ac_dir in $ac_dummy; do
2007     test -z "$ac_dir" && ac_dir=.
2008     if test -f $ac_dir/$ac_word; then
2009       ac_cv_prog_CC="gcc"
2010       break
2011     fi
2012   done
2013   IFS="$ac_save_ifs"
2014 fi
2015 CC="$ac_cv_prog_CC"
2016 if test -n "$CC"; then
2017   echo "$ac_t""$CC" 1>&6
2018 else
2019   echo "$ac_t""no" 1>&6
2020 fi
2021
2022 if test -z "$CC"; then
2023   # Extract the first word of "cc", so it can be a program name with args.
2024 set dummy cc; ac_word=$2
2025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2026 echo "configure:2027: checking for $ac_word" >&5
2027
2028 if test -n "$CC"; then
2029   ac_cv_prog_CC="$CC" # Let the user override the test.
2030 else
2031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2032   ac_prog_rejected=no
2033   ac_dummy="$PATH"
2034   for ac_dir in $ac_dummy; do
2035     test -z "$ac_dir" && ac_dir=.
2036     if test -f $ac_dir/$ac_word; then
2037       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2038         ac_prog_rejected=yes
2039         continue
2040       fi
2041       ac_cv_prog_CC="cc"
2042       break
2043     fi
2044   done
2045   IFS="$ac_save_ifs"
2046 if test $ac_prog_rejected = yes; then
2047   # We found a bogon in the path, so make sure we never use it.
2048   set dummy $ac_cv_prog_CC
2049   shift
2050   if test $# -gt 0; then
2051     # We chose a different compiler from the bogus one.
2052     # However, it has the same basename, so the bogon will be chosen
2053     # first if we set CC to just the basename; use the full file name.
2054     shift
2055     set dummy "$ac_dir/$ac_word" "$@"
2056     shift
2057     ac_cv_prog_CC="$@"
2058   fi
2059 fi
2060 fi
2061 CC="$ac_cv_prog_CC"
2062 if test -n "$CC"; then
2063   echo "$ac_t""$CC" 1>&6
2064 else
2065   echo "$ac_t""no" 1>&6
2066 fi
2067
2068   if test -z "$CC"; then
2069     case "`uname -s`" in
2070     *win32* | *WIN32*)
2071       # Extract the first word of "cl", so it can be a program name with args.
2072 set dummy cl; ac_word=$2
2073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2074 echo "configure:2075: checking for $ac_word" >&5
2075
2076 if test -n "$CC"; then
2077   ac_cv_prog_CC="$CC" # Let the user override the test.
2078 else
2079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2080   ac_dummy="$PATH"
2081   for ac_dir in $ac_dummy; do
2082     test -z "$ac_dir" && ac_dir=.
2083     if test -f $ac_dir/$ac_word; then
2084       ac_cv_prog_CC="cl"
2085       break
2086     fi
2087   done
2088   IFS="$ac_save_ifs"
2089 fi
2090 CC="$ac_cv_prog_CC"
2091 if test -n "$CC"; then
2092   echo "$ac_t""$CC" 1>&6
2093 else
2094   echo "$ac_t""no" 1>&6
2095 fi
2096  ;;
2097     esac
2098   fi
2099   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2100 fi
2101
2102 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2103 echo "configure:2104: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2104
2105 ac_ext=c
2106 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2107 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2108 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2109 ac_cpp='$CPP '"$xe_cppflags"
2110 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2111 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2112 cross_compiling=no
2113
2114 cat > conftest.$ac_ext << EOF
2115
2116 #line 2117 "configure"
2117 #include "confdefs.h"
2118
2119 main(){return(0);}
2120 EOF
2121 if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2122   ac_cv_prog_cc_works=yes
2123   # If we can't run a trivial program, we are probably using a cross compiler.
2124   if (./conftest; exit) 2>/dev/null; then
2125     ac_cv_prog_cc_cross=no
2126   else
2127     ac_cv_prog_cc_cross=yes
2128   fi
2129 else
2130   echo "configure: failed program was:" >&5
2131   cat conftest.$ac_ext >&5
2132   ac_cv_prog_cc_works=no
2133 fi
2134 rm -fr conftest*
2135 ac_ext=c
2136 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2137 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2138 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2139 ac_cpp='$CPP '"$xe_cppflags"
2140 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2141 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2142 cross_compiling=no
2143
2144 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2145 if test $ac_cv_prog_cc_works = no; then
2146   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2147 fi
2148 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2150 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2151 cross_compiling=$ac_cv_prog_cc_cross
2152
2153 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2154 echo "configure:2155: checking whether we are using GNU C" >&5
2155
2156 cat > conftest.c <<EOF
2157 #ifdef __GNUC__
2158   yes;
2159 #endif
2160 EOF
2161 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2162   ac_cv_prog_gcc=yes
2163 else
2164   ac_cv_prog_gcc=no
2165 fi
2166
2167 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2168
2169 if test $ac_cv_prog_gcc = yes; then
2170   GCC=yes
2171 else
2172   GCC=
2173 fi
2174
2175 ac_test_CFLAGS="${CFLAGS+set}"
2176 ac_save_CFLAGS="$CFLAGS"
2177 CFLAGS=
2178 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2179 echo "configure:2180: checking whether ${CC-cc} accepts -g" >&5
2180
2181 echo 'void f(){}' > conftest.c
2182 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2183   ac_cv_prog_cc_g=yes
2184 else
2185   ac_cv_prog_cc_g=no
2186 fi
2187 rm -f conftest*
2188
2189
2190 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2191 if test "$ac_test_CFLAGS" = set; then
2192   CFLAGS="$ac_save_CFLAGS"
2193 elif test $ac_cv_prog_cc_g = yes; then
2194   if test "$GCC" = yes; then
2195     CFLAGS="-g -O2"
2196   else
2197     CFLAGS="-g"
2198   fi
2199 else
2200   if test "$GCC" = yes; then
2201     CFLAGS="-O2"
2202   else
2203     CFLAGS=
2204   fi
2205 fi
2206
2207 fi
2208 CFLAGS="$xe_save_CFLAGS"
2209
2210
2211 test -n "$CPP" -a -d "$CPP" && CPP=
2212
2213 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2214
2215 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2216 echo "configure:2217: checking how to run the C preprocessor" >&5
2217 # On Suns, sometimes $CPP names a directory.
2218 if test -n "$CPP" && test -d "$CPP"; then
2219   CPP=
2220 fi
2221 if test -z "$CPP"; then
2222
2223   # This must be in double quotes, not single quotes, because CPP may get
2224   # substituted into the Makefile and "${CC-cc}" will confuse make.
2225   CPP="${CC-cc} -E"
2226   # On the NeXT, cc -E runs the code through the compiler's parser,
2227   # not just through cpp.
2228   cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #include <assert.h>
2232 Syntax Error
2233 EOF
2234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2235 { (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2237 if test -z "$ac_err"; then
2238   :
2239 else
2240   echo "$ac_err" >&5
2241   echo "configure: failed program was:" >&5
2242   cat conftest.$ac_ext >&5
2243   rm -rf conftest*
2244   CPP="${CC-cc} -E -traditional-cpp"
2245   cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <assert.h>
2249 Syntax Error
2250 EOF
2251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2252 { (eval echo configure:2253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2254 if test -z "$ac_err"; then
2255   :
2256 else
2257   echo "$ac_err" >&5
2258   echo "configure: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   rm -rf conftest*
2261   CPP="${CC-cc} -nologo -E"
2262   cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 #include "confdefs.h"
2265 #include <assert.h>
2266 Syntax Error
2267 EOF
2268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2269 { (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2271 if test -z "$ac_err"; then
2272   :
2273 else
2274   echo "$ac_err" >&5
2275   echo "configure: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   rm -rf conftest*
2278   CPP=/lib/cpp
2279 fi
2280 rm -f conftest*
2281 fi
2282 rm -f conftest*
2283 fi
2284 rm -f conftest*
2285   ac_cv_prog_CPP="$CPP"
2286   CPP="$ac_cv_prog_CPP"
2287 else
2288   ac_cv_prog_CPP="$CPP"
2289 fi
2290 echo "$ac_t""$CPP" 1>&6
2291
2292
2293 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2294 echo "configure:2295: checking for AIX" >&5
2295 cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298 #ifdef _AIX
2299   yes
2300 #endif
2301
2302 EOF
2303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2304   egrep "yes" >/dev/null 2>&1; then
2305   rm -rf conftest*
2306   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2307     Defining _ALL_SOURCE
2308 EOF
2309 cat >> confdefs.h <<\EOF
2310 #define _ALL_SOURCE 1
2311 EOF
2312 }
2313
2314 else
2315   rm -rf conftest*
2316   echo "$ac_t""no" 1>&6
2317 fi
2318 rm -f conftest*
2319
2320
2321
2322 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2323 echo "configure:2324: checking for GNU libc" >&5
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <features.h>
2328 int main() {
2329
2330 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2331 #error Not a GNU libc system :-(
2332 ******* ======= ******** &&&&&&&&
2333 #endif
2334
2335 ; return 0; }
2336 EOF
2337 if { (eval echo configure:2338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2338   rm -rf conftest*
2339   have_glibc=yes
2340 else
2341   echo "configure: failed program was:" >&5
2342   cat conftest.$ac_ext >&5
2343   rm -rf conftest*
2344   have_glibc=no
2345 fi
2346 rm -f conftest*
2347 echo "$ac_t""$have_glibc" 1>&6
2348 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2349     Defining _GNU_SOURCE
2350 EOF
2351 cat >> confdefs.h <<\EOF
2352 #define _GNU_SOURCE 1
2353 EOF
2354 }
2355
2356
2357
2358 cat > conftest.$ac_ext <<EOF
2359 #line 2360 "configure"
2360 #include "confdefs.h"
2361 int main () {
2362 #if defined __SUNPRO_C
2363 return 11;
2364 #elif defined __DECC
2365 return 12;
2366 #else
2367 return 0;
2368 #endif
2369 }
2370 EOF
2371 if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2372 then
2373   :
2374 else
2375   conftest_rc="$?"
2376   echo "configure: failed program was:" >&5
2377   cat conftest.$ac_ext >&5
2378   rm -fr conftest*
2379   case "$conftest_rc" in
2380   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2381   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2382 esac
2383 fi
2384 rm -fr conftest*
2385
2386
2387
2388
2389 echo "Extracting information from the machine- and system-dependent headers..."
2390
2391 tempcname="conftest.c"
2392
2393
2394
2395 cat > $tempcname <<EOF
2396 #define NOT_C_CODE
2397 #define C_SWITCH_SITE
2398 #define C_SWITCH_X_SITE
2399 #define LD_SWITCH_SITE
2400 #define LD_SWITCH_X_SITE
2401 #define LD_SWITCH_X_SITE_AUX
2402 #define OS_RELEASE $os_release
2403 #include "$srcdir/src/$opsysfile"
2404 #include "$srcdir/src/$machfile"
2405
2406 #ifndef LIBS_MACHINE
2407 #define LIBS_MACHINE
2408 #endif
2409 configure___ libs_machine=LIBS_MACHINE
2410
2411 #ifndef LIBS_SYSTEM
2412 #define LIBS_SYSTEM
2413 #endif
2414 configure___ libs_system=LIBS_SYSTEM
2415
2416 #ifndef LIBS_TERMCAP
2417 #define LIBS_TERMCAP
2418 #endif
2419 configure___ libs_termcap=LIBS_TERMCAP
2420
2421 #ifndef LIB_STANDARD
2422 #define LIB_STANDARD
2423 #endif
2424 configure___ libs_standard=LIB_STANDARD
2425
2426
2427 #ifndef OBJECTS_MACHINE
2428 #define OBJECTS_MACHINE
2429 #endif
2430 configure___ objects_machine=OBJECTS_MACHINE
2431
2432 #ifndef OBJECTS_SYSTEM
2433 #define OBJECTS_SYSTEM
2434 #endif
2435 configure___ objects_system=OBJECTS_SYSTEM
2436
2437
2438 #ifndef C_SWITCH_MACHINE
2439 #define C_SWITCH_MACHINE
2440 #endif
2441 configure___ c_switch_machine=C_SWITCH_MACHINE
2442
2443 #ifndef C_SWITCH_SYSTEM
2444 #define C_SWITCH_SYSTEM
2445 #endif
2446 configure___ c_switch_system=C_SWITCH_SYSTEM
2447
2448
2449 #ifndef LD_SWITCH_MACHINE
2450 #define LD_SWITCH_MACHINE
2451 #endif
2452 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2453
2454 #ifndef LD_SWITCH_SYSTEM
2455 #define LD_SWITCH_SYSTEM
2456 #endif
2457 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2458
2459
2460 #ifndef UNEXEC
2461 #define UNEXEC "unexec.o"
2462 #endif
2463 configure___ unexec=UNEXEC
2464
2465
2466 #ifndef LD_SWITCH_SHARED
2467 #define LD_SWITCH_SHARED "-c"
2468 #endif
2469 configure___ ld_switch_shared=LD_SWITCH_SHARED
2470
2471
2472 #ifdef ORDINARY_LINK
2473 #define LD "\$(CC) \$(CFLAGS)"
2474 #else /* no ORDINARY LINK */
2475 #ifdef COFF_ENCAPSULATE
2476 #define LD "\$(CC) -nostdlib"
2477 #else /* not COFF_ENCAPSULATE */
2478 #ifdef LINKER
2479 #define LD LINKER
2480 #else /* ! defined (LINKER) */
2481 #define LD "ld"
2482 #endif /* ! defined (LINKER) */
2483 #endif /* ! defined (COFF_ENCAPSULATE) */
2484 #endif /* not ORDINARY_LINK */
2485 configure___ ld=LD
2486
2487 #ifndef LIB_GCC
2488 #define LIB_GCC
2489 #endif
2490 configure___ lib_gcc=LIB_GCC
2491
2492 #ifndef LD_TEXT_START_ADDR
2493 #define LD_TEXT_START_ADDR
2494 #endif
2495 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2496
2497
2498 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2499 #ifdef NO_REMAP
2500 #ifdef COFF_ENCAPSULATE
2501 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2502 #else /* ! defined (COFF_ENCAPSULATE) */
2503 #define START_FILES "pre-crt0.o /lib/crt0.o"
2504 #endif /* ! defined (COFF_ENCAPSULATE) */
2505 #else /* ! defined (NO_REMAP) */
2506 #define START_FILES "ecrt0.o"
2507 #endif /* ! defined (NO_REMAP) */
2508 #endif /* no ORDINARY_LINK */
2509 #ifndef START_FILES
2510 #define START_FILES
2511 #endif
2512 configure___ start_files=START_FILES
2513
2514 #ifdef ORDINARY_LINK
2515 configure___ ordinary_link=yes
2516 #else
2517 configure___ ordinary_link=no
2518 #endif
2519
2520 #ifdef SYSTEM_MALLOC
2521 configure___ system_malloc=yes
2522 #else
2523 configure___ system_malloc=no
2524 #endif
2525
2526 #ifdef TERMINFO
2527 configure___ have_terminfo=yes
2528 #else
2529 configure___ have_terminfo=no
2530 #endif
2531
2532 #ifdef MAIL_USE_FLOCK
2533 configure___ mail_use_flock=yes
2534 #else
2535 configure___ mail_use_flock=no
2536 #endif
2537
2538 #ifdef MAIL_USE_LOCKF
2539 configure___ mail_use_lockf=yes
2540 #else
2541 configure___ mail_use_lockf=no
2542 #endif
2543
2544 #ifdef MAIL_USE_LOCKING
2545 configure___ mail_use_locking=yes
2546 #else
2547 configure___ mail_use_locking=no
2548 #endif
2549
2550 #ifdef HAVE_WIN32_PROCESSES
2551 configure___ win32_processes=yes
2552 #else
2553 configure___ win32_processes=no
2554 #endif
2555
2556 EOF
2557
2558 CPP=`eval "echo $CPP $CPPFLAGS"`
2559 eval `$CPP -Isrc $tempcname \
2560         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2561
2562 rm $tempcname
2563
2564 test "$extra_verbose" = "yes" && \
2565   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 ""
2566
2567 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2568         mingw_include=`eval "dirname $mingw_include"` ;
2569         mingw_include="-I$mingw_include/../include/mingw32" ;
2570         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2571 esac
2572
2573 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2574
2575 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2576
2577 if test "$cflags_specified" = "no"; then
2578       if   test "$GCC" = "yes"; then
2579     CFLAGS="-g -O3 -Wall -Wno-switch"
2580               elif test "$__SUNPRO_C" = "yes"; then
2581     case "$opsys" in
2582       sol2    ) CFLAGS="-v -xO4" ;;
2583       sunos4* ) CFLAGS="-xO2";;
2584     esac
2585   elif test "$__DECC" = "yes"; then
2586     CFLAGS="-O3"
2587   elif test "$CC" = "xlc"; then
2588     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2589     else
2590     CFLAGS="-O" ;  fi
2591 fi
2592
2593
2594 if test "$GCC" = "yes"; then
2595   set x $ld_switch_system; shift; ld_switch_system=""
2596   while test -n "$1"; do
2597     case $1 in
2598       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2599       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2600       -Xlinker* ) ;;
2601       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2602     esac
2603     shift
2604   done
2605 fi
2606
2607 if test "$GCC" = "yes"; then
2608   set x $ld_switch_machine; shift; ld_switch_machine=""
2609   while test -n "$1"; do
2610     case $1 in
2611       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2612       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2613       -Xlinker* ) ;;
2614       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2615     esac
2616     shift
2617   done
2618 fi
2619
2620 if test "$GCC" = "yes"; then
2621   set x $LDFLAGS; shift; LDFLAGS=""
2622   while test -n "$1"; do
2623     case $1 in
2624       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2625       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2626       -Xlinker* ) ;;
2627       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2628     esac
2629     shift
2630   done
2631 fi
2632
2633 if test "$GCC" = "yes"; then
2634   set x $ld_call_shared; shift; ld_call_shared=""
2635   while test -n "$1"; do
2636     case $1 in
2637       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2638       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2639       -Xlinker* ) ;;
2640       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2641     esac
2642     shift
2643   done
2644 fi
2645
2646 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2647    echo "    xemacs will be linked with \"$objects_machine\""
2648  fi
2649 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2650    echo "    xemacs will be linked with \"$objects_system\""
2651  fi
2652 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2653    echo "    xemacs will be linked with \"$unexec\""
2654  fi
2655
2656 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2657 echo "configure:2658: checking for dynodump" >&5
2658 if test "$unexec" != "unexsol2.o"; then
2659   echo "$ac_t""no" 1>&6
2660 else
2661   echo "$ac_t""yes" 1>&6
2662   { test "$extra_verbose" = "yes" && cat << \EOF
2663     Defining DYNODUMP
2664 EOF
2665 cat >> confdefs.h <<\EOF
2666 #define DYNODUMP 1
2667 EOF
2668 }
2669
2670   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2671   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2672   case "$machine" in
2673     sparc   ) dynodump_arch=sparc ;;
2674     *86*    ) dynodump_arch=i386  ;;
2675     powerpc ) dynodump_arch=ppc   ;;
2676   esac
2677     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
2678 fi
2679
2680
2681 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2682
2683 if test "$unexec" = "unexaix.o"; then
2684   if   test "$dynamic" = "no"; then
2685   start_flags="-Wl,-bnso,-bnodelcsect"
2686   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2687   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2688     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2689   done
2690   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2691     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2692   done
2693   
2694 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2695 echo "configure:2696: checking for terminateAndUnload in -lC" >&5
2696 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2697
2698 xe_check_libs=" -lC "
2699 cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 /* Override any gcc2 internal prototype to avoid an error.  */
2703 /* We use char because int might match the return type of a gcc2
2704     builtin and then its argument prototype would still apply.  */
2705 char terminateAndUnload();
2706
2707 int main() {
2708 terminateAndUnload()
2709 ; return 0; }
2710 EOF
2711 if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2712   rm -rf conftest*
2713   eval "ac_cv_lib_$ac_lib_var=yes"
2714 else
2715   echo "configure: failed program was:" >&5
2716   cat conftest.$ac_ext >&5
2717   rm -rf conftest*
2718   eval "ac_cv_lib_$ac_lib_var=no"
2719 fi
2720 rm -f conftest*
2721 xe_check_libs=""
2722
2723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2724   echo "$ac_t""yes" 1>&6
2725   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2726 else
2727   echo "$ac_t""no" 1>&6
2728 fi
2729
2730
2731   fi
2732 elif test -n "$ld_text_start_addr"; then
2733   start_flags="-T $ld_text_start_addr -e __start"
2734 fi
2735
2736
2737
2738
2739 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2740  test -z "$linker" &&  linker='$(CC) -nostdlib'
2741  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2742 fi
2743 test "$GCC" != "yes" && lib_gcc=
2744
2745
2746
2747
2748
2749 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2750 if test -n "$site_libraries"; then
2751   for arg in $site_libraries; do
2752     case "$arg" in
2753      -* ) ;;
2754      * ) test -d "$arg" || \
2755            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2756        arg="-L${arg}" ;;
2757     esac
2758     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2759   done
2760 fi
2761
2762 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2763 if test -n "$site_includes"; then
2764   for arg in $site_includes; do
2765     case "$arg" in
2766       -* ) ;;
2767       * ) test -d "$arg" || \
2768            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2769       arg="-I${arg}" ;;
2770     esac
2771     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2772   done
2773 fi
2774
2775 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2776 if test -n "$site_prefixes"; then
2777   for dir in $site_prefixes; do
2778     lib_dir="${dir}/lib"
2779     inc_dir="${dir}/include"
2780     if test ! -d "$dir"; then
2781       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2782     elif test ! -d "$lib_dir"; then
2783       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2784     else
2785       if test -d "$inc_dir"; then
2786         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
2787       fi
2788       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
2789     fi
2790   done
2791 fi
2792
2793
2794 for dir in "/usr/ccs/lib"; do
2795   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
2796 done
2797
2798 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2799 if test -n "$site_runtime_libraries"; then
2800   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2801   export LD_RUN_PATH
2802 fi
2803
2804
2805 if   test "$dynamic" = "no"; then add_runtime_path=no
2806 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2807 else case "$opsys" in
2808        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2809        * ) add_runtime_path=no ;;
2810      esac
2811 fi
2812
2813 if test "$add_runtime_path" = "yes"; then
2814       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2815 echo "configure:2816: checking "for runtime libraries flag"" >&5
2816   case "$opsys" in
2817     sol2 ) dash_r="-R" ;;
2818     decosf* | linux* | irix*) dash_r="-rpath " ;;
2819     *)
2820       dash_r=""
2821       for try_dash_r in "-R" "-R " "-rpath "; do
2822         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2823         
2824 if test "$GCC" = "yes"; then
2825   set x $xe_check_libs; shift; xe_check_libs=""
2826   while test -n "$1"; do
2827     case $1 in
2828       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2829       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2830       -Xlinker* ) ;;
2831       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2832     esac
2833     shift
2834   done
2835 fi
2836         cat > conftest.$ac_ext <<EOF
2837 #line 2838 "configure"
2838 #include "confdefs.h"
2839
2840 int main() {
2841
2842 ; return 0; }
2843 EOF
2844 if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2845   rm -rf conftest*
2846   dash_r="$try_dash_r"
2847 else
2848   echo "configure: failed program was:" >&5
2849   cat conftest.$ac_ext >&5
2850 fi
2851 rm -f conftest*
2852         xe_check_libs=""
2853         test -n "$dash_r" && break
2854       done ;;
2855   esac
2856   if test -n "$dash_r";
2857     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2858     else echo "$ac_t""NONE" 1>&6
2859   fi
2860 fi
2861
2862 xe_add_unique_runpath_dir='
2863   xe_add_p=yes
2864   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2865   done
2866   if test "$xe_add_p" = "yes"; then
2867     test -n "$runpath" && runpath="${runpath}:"
2868     runpath="${runpath}${xe_runpath_dir}"
2869     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2870   fi'
2871
2872
2873
2874
2875 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2876     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2877   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2878   
2879         runpath="" runpath_dirs=""
2880   if test -n "$LD_RUN_PATH"; then
2881     runpath="$LD_RUN_PATH"
2882   elif test "$GCC" = "yes"; then
2883         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2884     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2885     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2886     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2887       case "$arg" in P,* | -L* | -R* )
2888         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2889           {
2890 xe_runpath_dir="$dir"
2891   test "$xe_runpath_dir" != "/lib"     -a \
2892         "$xe_runpath_dir" != "/usr/lib" -a \
2893         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2894   eval "$xe_add_unique_runpath_dir"
2895 }
2896         done ;;
2897       esac
2898     done
2899     ld_switch_run="$ld_switch_run_save"
2900     rm -f conftest*
2901   else
2902         for arg in $ld_switch_site $ld_switch_x_site; do
2903       case "$arg" in -L*) {
2904 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2905   test "$xe_runpath_dir" != "/lib"     -a \
2906         "$xe_runpath_dir" != "/usr/lib" -a \
2907         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2908   eval "$xe_add_unique_runpath_dir"
2909 };; esac
2910     done
2911         if test "$opsys $need_motif" = "sol2 yes"; then
2912       xe_runpath_dir="/opt/SUNWdt/lib";
2913       eval "$xe_add_unique_runpath_dir";
2914     fi
2915   fi 
2916   if test -n "$runpath"; then
2917     ld_switch_run="${dash_r}${runpath}"
2918     
2919 if test "$GCC" = "yes"; then
2920   set x $ld_switch_run; shift; ld_switch_run=""
2921   while test -n "$1"; do
2922     case $1 in
2923       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2924       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2925       -Xlinker* ) ;;
2926       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2927     esac
2928     shift
2929   done
2930 fi
2931     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2932   fi
2933 fi
2934
2935
2936
2937
2938 GNU_MALLOC=yes
2939 if test "$with_dlmalloc" != "no"; then
2940         doug_lea_malloc=yes
2941 else
2942         doug_lea_malloc=no
2943 fi
2944 after_morecore_hook_exists=yes
2945 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2946 echo "configure:2947: checking for malloc_get_state" >&5
2947
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 /* System header to define __stub macros and hopefully few prototypes,
2952     which can conflict with char malloc_get_state(); below.  */
2953 #include <assert.h>
2954 /* Override any gcc2 internal prototype to avoid an error.  */
2955 /* We use char because int might match the return type of a gcc2
2956     builtin and then its argument prototype would still apply.  */
2957 char malloc_get_state();
2958
2959 int main() {
2960
2961 /* The GNU C library defines this for functions which it implements
2962     to always fail with ENOSYS.  Some functions are actually named
2963     something starting with __ and the normal name is an alias.  */
2964 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2965 choke me
2966 #else
2967 malloc_get_state();
2968 #endif
2969
2970 ; return 0; }
2971 EOF
2972 if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2973   rm -rf conftest*
2974   eval "ac_cv_func_malloc_get_state=yes"
2975 else
2976   echo "configure: failed program was:" >&5
2977   cat conftest.$ac_ext >&5
2978   rm -rf conftest*
2979   eval "ac_cv_func_malloc_get_state=no"
2980 fi
2981 rm -f conftest*
2982
2983 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2984   echo "$ac_t""yes" 1>&6
2985   :
2986 else
2987   echo "$ac_t""no" 1>&6
2988 doug_lea_malloc=no
2989 fi
2990
2991 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2992 echo "configure:2993: checking for malloc_set_state" >&5
2993
2994 cat > conftest.$ac_ext <<EOF
2995 #line 2996 "configure"
2996 #include "confdefs.h"
2997 /* System header to define __stub macros and hopefully few prototypes,
2998     which can conflict with char malloc_set_state(); below.  */
2999 #include <assert.h>
3000 /* Override any gcc2 internal prototype to avoid an error.  */
3001 /* We use char because int might match the return type of a gcc2
3002     builtin and then its argument prototype would still apply.  */
3003 char malloc_set_state();
3004
3005 int main() {
3006
3007 /* The GNU C library defines this for functions which it implements
3008     to always fail with ENOSYS.  Some functions are actually named
3009     something starting with __ and the normal name is an alias.  */
3010 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3011 choke me
3012 #else
3013 malloc_set_state();
3014 #endif
3015
3016 ; return 0; }
3017 EOF
3018 if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3019   rm -rf conftest*
3020   eval "ac_cv_func_malloc_set_state=yes"
3021 else
3022   echo "configure: failed program was:" >&5
3023   cat conftest.$ac_ext >&5
3024   rm -rf conftest*
3025   eval "ac_cv_func_malloc_set_state=no"
3026 fi
3027 rm -f conftest*
3028
3029 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3030   echo "$ac_t""yes" 1>&6
3031   :
3032 else
3033   echo "$ac_t""no" 1>&6
3034 doug_lea_malloc=no
3035 fi
3036
3037 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3038 echo "configure:3039: checking whether __after_morecore_hook exists" >&5
3039 cat > conftest.$ac_ext <<EOF
3040 #line 3041 "configure"
3041 #include "confdefs.h"
3042 extern void (* __after_morecore_hook)();
3043 int main() {
3044 __after_morecore_hook = 0
3045 ; return 0; }
3046 EOF
3047 if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3048   rm -rf conftest*
3049   echo "$ac_t""yes" 1>&6
3050 else
3051   echo "configure: failed program was:" >&5
3052   cat conftest.$ac_ext >&5
3053   rm -rf conftest*
3054   echo "$ac_t""no" 1>&6
3055    after_morecore_hook_exists=no
3056 fi
3057 rm -f conftest*
3058 if test "$system_malloc" = "yes" ; then
3059   GNU_MALLOC=no
3060   GNU_MALLOC_reason="
3061   (The GNU allocators don't work with this system configuration)."
3062 elif test "$with_system_malloc" = "yes" ; then
3063   GNU_MALLOC=no
3064   GNU_MALLOC_reason="
3065   (User chose not to use GNU allocators)."
3066 elif test "$with_debug_malloc" = "yes" ; then
3067   GNU_MALLOC=no
3068   GNU_MALLOC_reason="
3069   (User chose to use Debugging Malloc)."
3070 fi
3071
3072 if test "$doug_lea_malloc" = "yes" ; then
3073   if test "$GNU_MALLOC" = yes ; then
3074     GNU_MALLOC_reason="
3075   (Using Doug Lea's new malloc from the GNU C Library.)"
3076   fi
3077   { test "$extra_verbose" = "yes" && cat << \EOF
3078     Defining DOUG_LEA_MALLOC
3079 EOF
3080 cat >> confdefs.h <<\EOF
3081 #define DOUG_LEA_MALLOC 1
3082 EOF
3083 }
3084
3085   if test "$after_morecore_hook_exists" = "no" ; then
3086     GNU_MALLOC_reason="
3087   (Using Doug Lea's new malloc from the Linux C Library.)"
3088     { test "$extra_verbose" = "yes" && cat << \EOF
3089     Defining _NO_MALLOC_WARNING_
3090 EOF
3091 cat >> confdefs.h <<\EOF
3092 #define _NO_MALLOC_WARNING_ 1
3093 EOF
3094 }
3095
3096   fi
3097   use_minimal_tagbits=yes
3098 fi
3099
3100
3101
3102
3103 # Extract the first word of "ranlib", so it can be a program name with args.
3104 set dummy ranlib; ac_word=$2
3105 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3106 echo "configure:3107: checking for $ac_word" >&5
3107
3108 if test -n "$RANLIB"; then
3109   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3110 else
3111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3112   ac_dummy="$PATH"
3113   for ac_dir in $ac_dummy; do
3114     test -z "$ac_dir" && ac_dir=.
3115     if test -f $ac_dir/$ac_word; then
3116       ac_cv_prog_RANLIB="ranlib"
3117       break
3118     fi
3119   done
3120   IFS="$ac_save_ifs"
3121   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3122 fi
3123 RANLIB="$ac_cv_prog_RANLIB"
3124 if test -n "$RANLIB"; then
3125   echo "$ac_t""$RANLIB" 1>&6
3126 else
3127   echo "$ac_t""no" 1>&6
3128 fi
3129
3130 ac_aux_dir=
3131 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3132   if test -f $ac_dir/install-sh; then
3133     ac_aux_dir=$ac_dir
3134     ac_install_sh="$ac_aux_dir/install-sh -c"
3135     break
3136   elif test -f $ac_dir/install.sh; then
3137     ac_aux_dir=$ac_dir
3138     ac_install_sh="$ac_aux_dir/install.sh -c"
3139     break
3140   fi
3141 done
3142 if test -z "$ac_aux_dir"; then
3143   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3144 fi
3145 ac_config_guess=$ac_aux_dir/config.guess
3146 ac_config_sub=$ac_aux_dir/config.sub
3147 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3148
3149 # Find a good install program.  We prefer a C program (faster),
3150 # so one script is as good as another.  But avoid the broken or
3151 # incompatible versions:
3152 # SysV /etc/install, /usr/sbin/install
3153 # SunOS /usr/etc/install
3154 # IRIX /sbin/install
3155 # AIX /bin/install
3156 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3157 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3158 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3159 # ./install, which can be erroneously created by make from ./install.sh.
3160 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3161 echo "configure:3162: checking for a BSD compatible install" >&5
3162 if test -z "$INSTALL"; then
3163
3164   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3165   for ac_dir in $PATH; do
3166     # Account for people who put trailing slashes in PATH elements.
3167     case "$ac_dir/" in
3168     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3169     *)
3170       # OSF1 and SCO ODT 3.0 have their own names for install.
3171       # Don't use installbsd from OSF since it installs stuff as root
3172       # by default.
3173       for ac_prog in ginstall scoinst install; do
3174         if test -f $ac_dir/$ac_prog; then
3175           if test $ac_prog = install &&
3176             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3177             # AIX install.  It has an incompatible calling convention.
3178             :
3179           else
3180             ac_cv_path_install="$ac_dir/$ac_prog -c"
3181             break 2
3182           fi
3183         fi
3184       done
3185       ;;
3186     esac
3187   done
3188   IFS="$ac_save_IFS"
3189
3190   if test "${ac_cv_path_install+set}" = set; then
3191     INSTALL="$ac_cv_path_install"
3192   else
3193     # As a last resort, use the slow shell script.  We don't cache a
3194     # path for INSTALL within a source directory, because that will
3195     # break other packages using the cache if that directory is
3196     # removed, or if the path is relative.
3197     INSTALL="$ac_install_sh"
3198   fi
3199 fi
3200 echo "$ac_t""$INSTALL" 1>&6
3201
3202 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3203 # It thinks the first close brace ends the variable substitution.
3204 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3205
3206 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3207
3208 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3209
3210 for ac_prog in 'bison -y' byacc
3211 do
3212 # Extract the first word of "$ac_prog", so it can be a program name with args.
3213 set dummy $ac_prog; ac_word=$2
3214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3215 echo "configure:3216: checking for $ac_word" >&5
3216
3217 if test -n "$YACC"; then
3218   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3219 else
3220   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3221   ac_dummy="$PATH"
3222   for ac_dir in $ac_dummy; do
3223     test -z "$ac_dir" && ac_dir=.
3224     if test -f $ac_dir/$ac_word; then
3225       ac_cv_prog_YACC="$ac_prog"
3226       break
3227     fi
3228   done
3229   IFS="$ac_save_ifs"
3230 fi
3231 YACC="$ac_cv_prog_YACC"
3232 if test -n "$YACC"; then
3233   echo "$ac_t""$YACC" 1>&6
3234 else
3235   echo "$ac_t""no" 1>&6
3236 fi
3237
3238 test -n "$YACC" && break
3239 done
3240 test -n "$YACC" || YACC="yacc"
3241
3242
3243 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3244 do
3245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3247 echo "configure:3248: checking for $ac_hdr" >&5
3248
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <$ac_hdr>
3253 EOF
3254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3255 { (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3257 if test -z "$ac_err"; then
3258   rm -rf conftest*
3259   eval "ac_cv_header_$ac_safe=yes"
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   eval "ac_cv_header_$ac_safe=no"
3266 fi
3267 rm -f conftest*
3268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3269   echo "$ac_t""yes" 1>&6
3270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3271   { test "$extra_verbose" = "yes" && cat << EOF
3272     Defining $ac_tr_hdr
3273 EOF
3274 cat >> confdefs.h <<EOF
3275 #define $ac_tr_hdr 1
3276 EOF
3277 }
3278  
3279 else
3280   echo "$ac_t""no" 1>&6
3281 fi
3282 done
3283
3284 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3285 do
3286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3288 echo "configure:3289: checking for $ac_hdr" >&5
3289
3290 cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293 #include <$ac_hdr>
3294 EOF
3295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3296 { (eval echo configure:3297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3298 if test -z "$ac_err"; then
3299   rm -rf conftest*
3300   eval "ac_cv_header_$ac_safe=yes"
3301 else
3302   echo "$ac_err" >&5
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   eval "ac_cv_header_$ac_safe=no"
3307 fi
3308 rm -f conftest*
3309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3310   echo "$ac_t""yes" 1>&6
3311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3312   { test "$extra_verbose" = "yes" && cat << EOF
3313     Defining $ac_tr_hdr
3314 EOF
3315 cat >> confdefs.h <<EOF
3316 #define $ac_tr_hdr 1
3317 EOF
3318 }
3319  
3320 else
3321   echo "$ac_t""no" 1>&6
3322 fi
3323 done
3324
3325 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3326 do
3327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3329 echo "configure:3330: checking for $ac_hdr" >&5
3330
3331 cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334 #include <$ac_hdr>
3335 EOF
3336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3337 { (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3339 if test -z "$ac_err"; then
3340   rm -rf conftest*
3341   eval "ac_cv_header_$ac_safe=yes"
3342 else
3343   echo "$ac_err" >&5
3344   echo "configure: failed program was:" >&5
3345   cat conftest.$ac_ext >&5
3346   rm -rf conftest*
3347   eval "ac_cv_header_$ac_safe=no"
3348 fi
3349 rm -f conftest*
3350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3351   echo "$ac_t""yes" 1>&6
3352     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3353   { test "$extra_verbose" = "yes" && cat << EOF
3354     Defining $ac_tr_hdr
3355 EOF
3356 cat >> confdefs.h <<EOF
3357 #define $ac_tr_hdr 1
3358 EOF
3359 }
3360  
3361 else
3362   echo "$ac_t""no" 1>&6
3363 fi
3364 done
3365
3366 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3367 echo "configure:3368: checking for sys/wait.h that is POSIX.1 compatible" >&5
3368
3369 cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3372 #include <sys/types.h>
3373 #include <sys/wait.h>
3374 #ifndef WEXITSTATUS
3375 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3376 #endif
3377 #ifndef WIFEXITED
3378 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3379 #endif
3380 int main() {
3381 int s;
3382 wait (&s);
3383 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3384 ; return 0; }
3385 EOF
3386 if { (eval echo configure:3387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3387   rm -rf conftest*
3388   ac_cv_header_sys_wait_h=yes
3389 else
3390   echo "configure: failed program was:" >&5
3391   cat conftest.$ac_ext >&5
3392   rm -rf conftest*
3393   ac_cv_header_sys_wait_h=no
3394 fi
3395 rm -f conftest*
3396
3397 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3398 if test $ac_cv_header_sys_wait_h = yes; then
3399   { test "$extra_verbose" = "yes" && cat << \EOF
3400     Defining HAVE_SYS_WAIT_H
3401 EOF
3402 cat >> confdefs.h <<\EOF
3403 #define HAVE_SYS_WAIT_H 1
3404 EOF
3405 }
3406
3407 fi
3408
3409 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3410 echo "configure:3411: checking for ANSI C header files" >&5
3411
3412 cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <stdlib.h>
3416 #include <stdarg.h>
3417 #include <string.h>
3418 #include <float.h>
3419 EOF
3420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3421 { (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3423 if test -z "$ac_err"; then
3424   rm -rf conftest*
3425   ac_cv_header_stdc=yes
3426 else
3427   echo "$ac_err" >&5
3428   echo "configure: failed program was:" >&5
3429   cat conftest.$ac_ext >&5
3430   rm -rf conftest*
3431   ac_cv_header_stdc=no
3432 fi
3433 rm -f conftest*
3434
3435 if test $ac_cv_header_stdc = yes; then
3436   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3437 cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <string.h>
3441 EOF
3442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3443   egrep "memchr" >/dev/null 2>&1; then
3444   :
3445 else
3446   rm -rf conftest*
3447   ac_cv_header_stdc=no
3448 fi
3449 rm -f conftest*
3450
3451 fi
3452
3453 if test $ac_cv_header_stdc = yes; then
3454   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3455 cat > conftest.$ac_ext <<EOF
3456 #line 3457 "configure"
3457 #include "confdefs.h"
3458 #include <stdlib.h>
3459 EOF
3460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3461   egrep "free" >/dev/null 2>&1; then
3462   :
3463 else
3464   rm -rf conftest*
3465   ac_cv_header_stdc=no
3466 fi
3467 rm -f conftest*
3468
3469 fi
3470
3471 if test $ac_cv_header_stdc = yes; then
3472   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3473 cat > conftest.$ac_ext <<EOF
3474 #line 3475 "configure"
3475 #include "confdefs.h"
3476 #include <ctype.h>
3477 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3478 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3479 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3480 int main () { int i; for (i = 0; i < 256; i++)
3481 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3482 exit (0); }
3483
3484 EOF
3485 if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3486 then
3487   :
3488 else
3489   conftest_rc="$?"
3490   echo "configure: failed program was:" >&5
3491   cat conftest.$ac_ext >&5
3492   rm -fr conftest*
3493   ac_cv_header_stdc=no
3494 fi
3495 rm -fr conftest*
3496 fi
3497
3498 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3499 if test $ac_cv_header_stdc = yes; then
3500   { test "$extra_verbose" = "yes" && cat << \EOF
3501     Defining STDC_HEADERS
3502 EOF
3503 cat >> confdefs.h <<\EOF
3504 #define STDC_HEADERS 1
3505 EOF
3506 }
3507
3508 fi
3509
3510 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3511 echo "configure:3512: checking whether time.h and sys/time.h may both be included" >&5
3512
3513 cat > conftest.$ac_ext <<EOF
3514 #line 3515 "configure"
3515 #include "confdefs.h"
3516 #include <sys/types.h>
3517 #include <sys/time.h>
3518 #include <time.h>
3519 int main() {
3520 struct tm *tp;
3521 ; return 0; }
3522 EOF
3523 if { (eval echo configure:3524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3524   rm -rf conftest*
3525   ac_cv_header_time=yes
3526 else
3527   echo "configure: failed program was:" >&5
3528   cat conftest.$ac_ext >&5
3529   rm -rf conftest*
3530   ac_cv_header_time=no
3531 fi
3532 rm -f conftest*
3533
3534 echo "$ac_t""$ac_cv_header_time" 1>&6
3535 if test $ac_cv_header_time = yes; then
3536   { test "$extra_verbose" = "yes" && cat << \EOF
3537     Defining TIME_WITH_SYS_TIME
3538 EOF
3539 cat >> confdefs.h <<\EOF
3540 #define TIME_WITH_SYS_TIME 1
3541 EOF
3542 }
3543
3544 fi
3545
3546 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3547 echo "configure:3548: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3548
3549 cat > conftest.$ac_ext <<EOF
3550 #line 3551 "configure"
3551 #include "confdefs.h"
3552 #include <sys/types.h>
3553 #include <signal.h>
3554 /* NetBSD declares sys_siglist in unistd.h.  */
3555 #ifdef HAVE_UNISTD_H
3556 #include <unistd.h>
3557 #endif
3558 int main() {
3559 char *msg = *(sys_siglist + 1);
3560 ; return 0; }
3561 EOF
3562 if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3563   rm -rf conftest*
3564   ac_cv_decl_sys_siglist=yes
3565 else
3566   echo "configure: failed program was:" >&5
3567   cat conftest.$ac_ext >&5
3568   rm -rf conftest*
3569   ac_cv_decl_sys_siglist=no
3570 fi
3571 rm -f conftest*
3572
3573 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3574 if test $ac_cv_decl_sys_siglist = yes; then
3575   { test "$extra_verbose" = "yes" && cat << \EOF
3576     Defining SYS_SIGLIST_DECLARED
3577 EOF
3578 cat >> confdefs.h <<\EOF
3579 #define SYS_SIGLIST_DECLARED 1
3580 EOF
3581 }
3582
3583 fi
3584
3585
3586 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3587 echo "configure:3588: checking for struct utimbuf" >&5
3588 cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 #ifdef TIME_WITH_SYS_TIME
3592 #include <sys/time.h>
3593 #include <time.h>
3594 #else
3595 #ifdef HAVE_SYS_TIME_H
3596 #include <sys/time.h>
3597 #else
3598 #include <time.h>
3599 #endif
3600 #endif
3601 #ifdef HAVE_UTIME_H
3602 #include <utime.h>
3603 #endif
3604 int main() {
3605 static struct utimbuf x; x.actime = x.modtime;
3606 ; return 0; }
3607 EOF
3608 if { (eval echo configure:3609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3609   rm -rf conftest*
3610   echo "$ac_t""yes" 1>&6
3611    { test "$extra_verbose" = "yes" && cat << \EOF
3612     Defining HAVE_STRUCT_UTIMBUF
3613 EOF
3614 cat >> confdefs.h <<\EOF
3615 #define HAVE_STRUCT_UTIMBUF 1
3616 EOF
3617 }
3618
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   echo "$ac_t""no" 1>&6
3624 fi
3625 rm -f conftest*
3626
3627 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3628 echo "configure:3629: checking return type of signal handlers" >&5
3629
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 #include <sys/types.h>
3634 #include <signal.h>
3635 #ifdef signal
3636 #undef signal
3637 #endif
3638 #ifdef __cplusplus
3639 extern "C" void (*signal (int, void (*)(int)))(int);
3640 #else
3641 void (*signal ()) ();
3642 #endif
3643
3644 int main() {
3645 int i;
3646 ; return 0; }
3647 EOF
3648 if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3649   rm -rf conftest*
3650   ac_cv_type_signal=void
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -rf conftest*
3655   ac_cv_type_signal=int
3656 fi
3657 rm -f conftest*
3658
3659 echo "$ac_t""$ac_cv_type_signal" 1>&6
3660 { test "$extra_verbose" = "yes" && cat << EOF
3661     Defining RETSIGTYPE = $ac_cv_type_signal
3662 EOF
3663 cat >> confdefs.h <<EOF
3664 #define RETSIGTYPE $ac_cv_type_signal
3665 EOF
3666 }
3667
3668
3669 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3670 echo "configure:3671: checking for size_t" >&5
3671
3672 cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <sys/types.h>
3676 #if STDC_HEADERS
3677 #include <stdlib.h>
3678 #include <stddef.h>
3679 #endif
3680 EOF
3681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3682   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3683   rm -rf conftest*
3684   ac_cv_type_size_t=yes
3685 else
3686   rm -rf conftest*
3687   ac_cv_type_size_t=no
3688 fi
3689 rm -f conftest*
3690
3691 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3692 if test $ac_cv_type_size_t = no; then
3693   { test "$extra_verbose" = "yes" && cat << \EOF
3694     Defining size_t = unsigned
3695 EOF
3696 cat >> confdefs.h <<\EOF
3697 #define size_t unsigned
3698 EOF
3699 }
3700
3701 fi
3702
3703 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3704 echo "configure:3705: checking for pid_t" >&5
3705
3706 cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709 #include <sys/types.h>
3710 #if STDC_HEADERS
3711 #include <stdlib.h>
3712 #include <stddef.h>
3713 #endif
3714 EOF
3715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3716   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3717   rm -rf conftest*
3718   ac_cv_type_pid_t=yes
3719 else
3720   rm -rf conftest*
3721   ac_cv_type_pid_t=no
3722 fi
3723 rm -f conftest*
3724
3725 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3726 if test $ac_cv_type_pid_t = no; then
3727   { test "$extra_verbose" = "yes" && cat << \EOF
3728     Defining pid_t = int
3729 EOF
3730 cat >> confdefs.h <<\EOF
3731 #define pid_t int
3732 EOF
3733 }
3734
3735 fi
3736
3737 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3738 echo "configure:3739: checking for uid_t in sys/types.h" >&5
3739
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <sys/types.h>
3744 EOF
3745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3746   egrep "uid_t" >/dev/null 2>&1; then
3747   rm -rf conftest*
3748   ac_cv_type_uid_t=yes
3749 else
3750   rm -rf conftest*
3751   ac_cv_type_uid_t=no
3752 fi
3753 rm -f conftest*
3754
3755
3756 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3757 if test $ac_cv_type_uid_t = no; then
3758   { test "$extra_verbose" = "yes" && cat << \EOF
3759     Defining uid_t = int
3760 EOF
3761 cat >> confdefs.h <<\EOF
3762 #define uid_t int
3763 EOF
3764 }
3765
3766   { test "$extra_verbose" = "yes" && cat << \EOF
3767     Defining gid_t = int
3768 EOF
3769 cat >> confdefs.h <<\EOF
3770 #define gid_t int
3771 EOF
3772 }
3773
3774 fi
3775
3776 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3777 echo "configure:3778: checking for mode_t" >&5
3778
3779 cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3782 #include <sys/types.h>
3783 #if STDC_HEADERS
3784 #include <stdlib.h>
3785 #include <stddef.h>
3786 #endif
3787 EOF
3788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3789   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3790   rm -rf conftest*
3791   ac_cv_type_mode_t=yes
3792 else
3793   rm -rf conftest*
3794   ac_cv_type_mode_t=no
3795 fi
3796 rm -f conftest*
3797
3798 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3799 if test $ac_cv_type_mode_t = no; then
3800   { test "$extra_verbose" = "yes" && cat << \EOF
3801     Defining mode_t = int
3802 EOF
3803 cat >> confdefs.h <<\EOF
3804 #define mode_t int
3805 EOF
3806 }
3807
3808 fi
3809
3810 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3811 echo "configure:3812: checking for off_t" >&5
3812
3813 cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 #include <sys/types.h>
3817 #if STDC_HEADERS
3818 #include <stdlib.h>
3819 #include <stddef.h>
3820 #endif
3821 EOF
3822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3823   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3824   rm -rf conftest*
3825   ac_cv_type_off_t=yes
3826 else
3827   rm -rf conftest*
3828   ac_cv_type_off_t=no
3829 fi
3830 rm -f conftest*
3831
3832 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3833 if test $ac_cv_type_off_t = no; then
3834   { test "$extra_verbose" = "yes" && cat << \EOF
3835     Defining off_t = long
3836 EOF
3837 cat >> confdefs.h <<\EOF
3838 #define off_t long
3839 EOF
3840 }
3841
3842 fi
3843
3844 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3845 echo "configure:3846: checking for ssize_t" >&5
3846
3847 cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <sys/types.h>
3851 #if STDC_HEADERS
3852 #include <stdlib.h>
3853 #include <stddef.h>
3854 #endif
3855 EOF
3856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3858   rm -rf conftest*
3859   ac_cv_type_ssize_t=yes
3860 else
3861   rm -rf conftest*
3862   ac_cv_type_ssize_t=no
3863 fi
3864 rm -f conftest*
3865
3866 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3867 if test $ac_cv_type_ssize_t = no; then
3868   { test "$extra_verbose" = "yes" && cat << \EOF
3869     Defining ssize_t = int
3870 EOF
3871 cat >> confdefs.h <<\EOF
3872 #define ssize_t int
3873 EOF
3874 }
3875
3876 fi
3877
3878
3879 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3880 echo "configure:3881: checking for struct timeval" >&5
3881 cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #ifdef TIME_WITH_SYS_TIME
3885 #include <sys/time.h>
3886 #include <time.h>
3887 #else
3888 #ifdef HAVE_SYS_TIME_H
3889 #include <sys/time.h>
3890 #else
3891 #include <time.h>
3892 #endif
3893 #endif
3894 int main() {
3895 static struct timeval x; x.tv_sec = x.tv_usec;
3896 ; return 0; }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3899   rm -rf conftest*
3900   echo "$ac_t""yes" 1>&6
3901   HAVE_TIMEVAL=yes
3902   { test "$extra_verbose" = "yes" && cat << \EOF
3903     Defining HAVE_TIMEVAL
3904 EOF
3905 cat >> confdefs.h <<\EOF
3906 #define HAVE_TIMEVAL 1
3907 EOF
3908 }
3909
3910 else
3911   echo "configure: failed program was:" >&5
3912   cat conftest.$ac_ext >&5
3913   rm -rf conftest*
3914   echo "$ac_t""no" 1>&6
3915    HAVE_TIMEVAL=no
3916 fi
3917 rm -f conftest*
3918
3919 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3920 echo "configure:3921: checking whether struct tm is in sys/time.h or time.h" >&5
3921
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <sys/types.h>
3926 #include <time.h>
3927 int main() {
3928 struct tm *tp; tp->tm_sec;
3929 ; return 0; }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3932   rm -rf conftest*
3933   ac_cv_struct_tm=time.h
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   ac_cv_struct_tm=sys/time.h
3939 fi
3940 rm -f conftest*
3941
3942 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3943 if test $ac_cv_struct_tm = sys/time.h; then
3944   { test "$extra_verbose" = "yes" && cat << \EOF
3945     Defining TM_IN_SYS_TIME
3946 EOF
3947 cat >> confdefs.h <<\EOF
3948 #define TM_IN_SYS_TIME 1
3949 EOF
3950 }
3951
3952 fi
3953
3954 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3955 echo "configure:3956: checking for tm_zone in struct tm" >&5
3956
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 #include <sys/types.h>
3961 #include <$ac_cv_struct_tm>
3962 int main() {
3963 struct tm tm; tm.tm_zone;
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3967   rm -rf conftest*
3968   ac_cv_struct_tm_zone=yes
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   ac_cv_struct_tm_zone=no
3974 fi
3975 rm -f conftest*
3976
3977 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3978 if test "$ac_cv_struct_tm_zone" = yes; then
3979   { test "$extra_verbose" = "yes" && cat << \EOF
3980     Defining HAVE_TM_ZONE
3981 EOF
3982 cat >> confdefs.h <<\EOF
3983 #define HAVE_TM_ZONE 1
3984 EOF
3985 }
3986
3987 else
3988   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3989 echo "configure:3990: checking for tzname" >&5
3990
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <time.h>
3995 #ifndef tzname /* For SGI.  */
3996 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3997 #endif
3998 int main() {
3999 atoi(*tzname);
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003   rm -rf conftest*
4004   ac_cv_var_tzname=yes
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   ac_cv_var_tzname=no
4010 fi
4011 rm -f conftest*
4012
4013 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4014   if test $ac_cv_var_tzname = yes; then
4015     { test "$extra_verbose" = "yes" && cat << \EOF
4016     Defining HAVE_TZNAME
4017 EOF
4018 cat >> confdefs.h <<\EOF
4019 #define HAVE_TZNAME 1
4020 EOF
4021 }
4022
4023   fi
4024 fi
4025
4026
4027 echo $ac_n "checking for working const""... $ac_c" 1>&6
4028 echo "configure:4029: checking for working const" >&5
4029
4030 cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033
4034 int main() {
4035
4036 /* Ultrix mips cc rejects this.  */
4037 typedef int charset[2]; const charset x;
4038 /* SunOS 4.1.1 cc rejects this.  */
4039 char const *const *ccp;
4040 char **p;
4041 /* NEC SVR4.0.2 mips cc rejects this.  */
4042 struct point {int x, y;};
4043 static struct point const zero = {0,0};
4044 /* AIX XL C 1.02.0.0 rejects this.
4045    It does not let you subtract one const X* pointer from another in an arm
4046    of an if-expression whose if-part is not a constant expression */
4047 const char *g = "string";
4048 ccp = &g + (g ? g-g : 0);
4049 /* HPUX 7.0 cc rejects these. */
4050 ++ccp;
4051 p = (char**) ccp;
4052 ccp = (char const *const *) p;
4053 { /* SCO 3.2v4 cc rejects this.  */
4054   char *t;
4055   char const *s = 0 ? (char *) 0 : (char const *) 0;
4056
4057   *t++ = 0;
4058 }
4059 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4060   int x[] = {25, 17};
4061   const int *foo = &x[0];
4062   ++foo;
4063 }
4064 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4065   typedef const int *iptr;
4066   iptr p = 0;
4067   ++p;
4068 }
4069 { /* AIX XL C 1.02.0.0 rejects this saying
4070      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4071   struct s { int j; const int *ap[3]; };
4072   struct s *b; b->j = 5;
4073 }
4074 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4075   const int foo = 10;
4076 }
4077
4078 ; return 0; }
4079 EOF
4080 if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4081   rm -rf conftest*
4082   ac_cv_c_const=yes
4083 else
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086   rm -rf conftest*
4087   ac_cv_c_const=no
4088 fi
4089 rm -f conftest*
4090
4091 echo "$ac_t""$ac_cv_c_const" 1>&6
4092 if test $ac_cv_c_const = no; then
4093   { test "$extra_verbose" = "yes" && cat << \EOF
4094     Defining const = 
4095 EOF
4096 cat >> confdefs.h <<\EOF
4097 #define const 
4098 EOF
4099 }
4100
4101 fi
4102
4103
4104 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4105 echo "configure:4106: checking whether ${MAKE-make} sets \${MAKE}" >&5
4106 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4107
4108 cat > conftestmake <<\EOF
4109 all:
4110         @echo 'ac_maketemp="${MAKE}"'
4111 EOF
4112 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4113 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4114 if test -n "$ac_maketemp"; then
4115   eval ac_cv_prog_make_${ac_make}_set=yes
4116 else
4117   eval ac_cv_prog_make_${ac_make}_set=no
4118 fi
4119 rm -f conftestmake
4120 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4121   echo "$ac_t""yes" 1>&6
4122   SET_MAKE=
4123 else
4124   echo "$ac_t""no" 1>&6
4125   SET_MAKE="MAKE=${MAKE-make}"
4126 fi
4127
4128
4129 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4130 echo "configure:4131: checking whether byte ordering is bigendian" >&5
4131
4132 ac_cv_c_bigendian=unknown
4133 # See if sys/param.h defines the BYTE_ORDER macro.
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <sys/types.h>
4138 #include <sys/param.h>
4139 int main() {
4140
4141 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4142  bogus endian macros
4143 #endif
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   # It does; now see whether it defined to BIG_ENDIAN or not.
4149 cat > conftest.$ac_ext <<EOF
4150 #line 4151 "configure"
4151 #include "confdefs.h"
4152 #include <sys/types.h>
4153 #include <sys/param.h>
4154 int main() {
4155
4156 #if BYTE_ORDER != BIG_ENDIAN
4157  not big endian
4158 #endif
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4162   rm -rf conftest*
4163   ac_cv_c_bigendian=yes
4164 else
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   ac_cv_c_bigendian=no
4169 fi
4170 rm -f conftest*
4171 else
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174 fi
4175 rm -f conftest*
4176 if test $ac_cv_c_bigendian = unknown; then
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 main () {
4181   /* Are we little or big endian?  From Harbison&Steele.  */
4182   union
4183   {
4184     long l;
4185     char c[sizeof (long)];
4186   } u;
4187   u.l = 1;
4188   exit (u.c[sizeof (long) - 1] == 1);
4189 }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4192 then
4193   ac_cv_c_bigendian=no
4194 else
4195   conftest_rc="$?"
4196   echo "configure: failed program was:" >&5
4197   cat conftest.$ac_ext >&5
4198   rm -fr conftest*
4199   ac_cv_c_bigendian=yes
4200 fi
4201 rm -fr conftest*
4202 fi
4203
4204 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4205 if test $ac_cv_c_bigendian = yes; then
4206   { test "$extra_verbose" = "yes" && cat << \EOF
4207     Defining WORDS_BIGENDIAN
4208 EOF
4209 cat >> confdefs.h <<\EOF
4210 #define WORDS_BIGENDIAN 1
4211 EOF
4212 }
4213
4214 fi
4215
4216
4217 echo $ac_n "checking size of short""... $ac_c" 1>&6
4218 echo "configure:4219: checking size of short" >&5
4219
4220 cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <stdio.h>
4224 main()
4225 {
4226   FILE *f=fopen("conftestval", "w");
4227   if (!f) exit(1);
4228   fprintf(f, "%d\n", sizeof(short));
4229   exit(0);
4230 }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4233 then
4234   ac_cv_sizeof_short=`cat conftestval`
4235 else
4236   conftest_rc="$?"
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -fr conftest*
4240   ac_cv_sizeof_short=0
4241 fi
4242 rm -fr conftest*
4243 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4244 { test "$extra_verbose" = "yes" && cat << EOF
4245     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4246 EOF
4247 cat >> confdefs.h <<EOF
4248 #define SIZEOF_SHORT $ac_cv_sizeof_short
4249 EOF
4250 }
4251
4252
4253 if test "$ac_cv_sizeof_short" = 0; then
4254   echo ""
4255   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4256   echo "*** PANIC *** Please examine config.log for compilation errors."
4257   exit 1
4258 fi
4259 echo $ac_n "checking size of int""... $ac_c" 1>&6
4260 echo "configure:4261: checking size of int" >&5
4261
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 #include <stdio.h>
4266 main()
4267 {
4268   FILE *f=fopen("conftestval", "w");
4269   if (!f) exit(1);
4270   fprintf(f, "%d\n", sizeof(int));
4271   exit(0);
4272 }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4275 then
4276   ac_cv_sizeof_int=`cat conftestval`
4277 else
4278   conftest_rc="$?"
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -fr conftest*
4282   ac_cv_sizeof_int=0
4283 fi
4284 rm -fr conftest*
4285 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4286 { test "$extra_verbose" = "yes" && cat << EOF
4287     Defining SIZEOF_INT = $ac_cv_sizeof_int
4288 EOF
4289 cat >> confdefs.h <<EOF
4290 #define SIZEOF_INT $ac_cv_sizeof_int
4291 EOF
4292 }
4293
4294
4295 echo $ac_n "checking size of long""... $ac_c" 1>&6
4296 echo "configure:4297: checking size of long" >&5
4297
4298 cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4301 #include <stdio.h>
4302 main()
4303 {
4304   FILE *f=fopen("conftestval", "w");
4305   if (!f) exit(1);
4306   fprintf(f, "%d\n", sizeof(long));
4307   exit(0);
4308 }
4309 EOF
4310 if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4311 then
4312   ac_cv_sizeof_long=`cat conftestval`
4313 else
4314   conftest_rc="$?"
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -fr conftest*
4318   ac_cv_sizeof_long=0
4319 fi
4320 rm -fr conftest*
4321 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4322 { test "$extra_verbose" = "yes" && cat << EOF
4323     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4324 EOF
4325 cat >> confdefs.h <<EOF
4326 #define SIZEOF_LONG $ac_cv_sizeof_long
4327 EOF
4328 }
4329
4330
4331 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4332 echo "configure:4333: checking size of long long" >&5
4333
4334 cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 #include <stdio.h>
4338 main()
4339 {
4340   FILE *f=fopen("conftestval", "w");
4341   if (!f) exit(1);
4342   fprintf(f, "%d\n", sizeof(long long));
4343   exit(0);
4344 }
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4347 then
4348   ac_cv_sizeof_long_long=`cat conftestval`
4349 else
4350   conftest_rc="$?"
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353   rm -fr conftest*
4354   ac_cv_sizeof_long_long=0
4355 fi
4356 rm -fr conftest*
4357 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4358 { test "$extra_verbose" = "yes" && cat << EOF
4359     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4360 EOF
4361 cat >> confdefs.h <<EOF
4362 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4363 EOF
4364 }
4365
4366
4367 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4368 echo "configure:4369: checking size of void *" >&5
4369
4370 cat > conftest.$ac_ext <<EOF
4371 #line 4372 "configure"
4372 #include "confdefs.h"
4373 #include <stdio.h>
4374 main()
4375 {
4376   FILE *f=fopen("conftestval", "w");
4377   if (!f) exit(1);
4378   fprintf(f, "%d\n", sizeof(void *));
4379   exit(0);
4380 }
4381 EOF
4382 if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4383 then
4384   ac_cv_sizeof_void_p=`cat conftestval`
4385 else
4386   conftest_rc="$?"
4387   echo "configure: failed program was:" >&5
4388   cat conftest.$ac_ext >&5
4389   rm -fr conftest*
4390   ac_cv_sizeof_void_p=0
4391 fi
4392 rm -fr conftest*
4393 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4394 { test "$extra_verbose" = "yes" && cat << EOF
4395     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4396 EOF
4397 cat >> confdefs.h <<EOF
4398 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4399 EOF
4400 }
4401
4402
4403
4404 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4405 echo "configure:4406: checking for long file names" >&5
4406
4407 ac_cv_sys_long_file_names=yes
4408 # Test for long file names in all the places we know might matter:
4409 #      .                the current directory, where building will happen
4410 #      $prefix/lib      where we will be installing things
4411 #      $exec_prefix/lib likewise
4412 # eval it to expand exec_prefix.
4413 #      $TMPDIR          if set, where it might want to write temporary files
4414 # if $TMPDIR is not set:
4415 #      /tmp             where it might want to write temporary files
4416 #      /var/tmp         likewise
4417 #      /usr/tmp         likewise
4418 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4419   ac_tmpdirs="$TMPDIR"
4420 else
4421   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4422 fi
4423 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4424   test -d $ac_dir || continue
4425   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4426   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4427   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4428   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4429   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4430     ac_cv_sys_long_file_names=no
4431     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4432     break
4433   fi
4434   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4435 done
4436
4437 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4438 if test $ac_cv_sys_long_file_names = yes; then
4439   { test "$extra_verbose" = "yes" && cat << \EOF
4440     Defining HAVE_LONG_FILE_NAMES
4441 EOF
4442 cat >> confdefs.h <<\EOF
4443 #define HAVE_LONG_FILE_NAMES 1
4444 EOF
4445 }
4446
4447 fi
4448
4449
4450 echo $ac_n "checking for sin""... $ac_c" 1>&6
4451 echo "configure:4452: checking for sin" >&5
4452
4453 cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456 /* System header to define __stub macros and hopefully few prototypes,
4457     which can conflict with char sin(); below.  */
4458 #include <assert.h>
4459 /* Override any gcc2 internal prototype to avoid an error.  */
4460 /* We use char because int might match the return type of a gcc2
4461     builtin and then its argument prototype would still apply.  */
4462 char sin();
4463
4464 int main() {
4465
4466 /* The GNU C library defines this for functions which it implements
4467     to always fail with ENOSYS.  Some functions are actually named
4468     something starting with __ and the normal name is an alias.  */
4469 #if defined (__stub_sin) || defined (__stub___sin)
4470 choke me
4471 #else
4472 sin();
4473 #endif
4474
4475 ; return 0; }
4476 EOF
4477 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4478   rm -rf conftest*
4479   eval "ac_cv_func_sin=yes"
4480 else
4481   echo "configure: failed program was:" >&5
4482   cat conftest.$ac_ext >&5
4483   rm -rf conftest*
4484   eval "ac_cv_func_sin=no"
4485 fi
4486 rm -f conftest*
4487
4488 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4489   echo "$ac_t""yes" 1>&6
4490   :
4491 else
4492   echo "$ac_t""no" 1>&6
4493
4494 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4495 echo "configure:4496: checking for sin in -lm" >&5
4496 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4497
4498 xe_check_libs=" -lm "
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 /* Override any gcc2 internal prototype to avoid an error.  */
4503 /* We use char because int might match the return type of a gcc2
4504     builtin and then its argument prototype would still apply.  */
4505 char sin();
4506
4507 int main() {
4508 sin()
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=yes"
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=no"
4519 fi
4520 rm -f conftest*
4521 xe_check_libs=""
4522
4523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4524   echo "$ac_t""yes" 1>&6
4525     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4526     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4527   { test "$extra_verbose" = "yes" && cat << EOF
4528     Defining $ac_tr_lib
4529 EOF
4530 cat >> confdefs.h <<EOF
4531 #define $ac_tr_lib 1
4532 EOF
4533 }
4534
4535   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4536
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540
4541
4542 fi
4543
4544
4545 { test "$extra_verbose" = "yes" && cat << \EOF
4546     Defining LISP_FLOAT_TYPE
4547 EOF
4548 cat >> confdefs.h <<\EOF
4549 #define LISP_FLOAT_TYPE 1
4550 EOF
4551 }
4552
4553
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 #include <math.h>
4558 int main() {
4559 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4560 ; return 0; }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4563   rm -rf conftest*
4564   { test "$extra_verbose" = "yes" && cat << \EOF
4565     Defining HAVE_INVERSE_HYPERBOLIC
4566 EOF
4567 cat >> confdefs.h <<\EOF
4568 #define HAVE_INVERSE_HYPERBOLIC 1
4569 EOF
4570 }
4571
4572 else
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575 fi
4576 rm -f conftest*
4577
4578 echo "checking type of mail spool file locking" 1>&6
4579 echo "configure:4580: checking type of mail spool file locking" >&5
4580 for ac_func in lockf flock
4581 do
4582 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4583 echo "configure:4584: checking for $ac_func" >&5
4584
4585 cat > conftest.$ac_ext <<EOF
4586 #line 4587 "configure"
4587 #include "confdefs.h"
4588 /* System header to define __stub macros and hopefully few prototypes,
4589     which can conflict with char $ac_func(); below.  */
4590 #include <assert.h>
4591 /* Override any gcc2 internal prototype to avoid an error.  */
4592 /* We use char because int might match the return type of a gcc2
4593     builtin and then its argument prototype would still apply.  */
4594 char $ac_func();
4595
4596 int main() {
4597
4598 /* The GNU C library defines this for functions which it implements
4599     to always fail with ENOSYS.  Some functions are actually named
4600     something starting with __ and the normal name is an alias.  */
4601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4602 choke me
4603 #else
4604 $ac_func();
4605 #endif
4606
4607 ; return 0; }
4608 EOF
4609 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4610   rm -rf conftest*
4611   eval "ac_cv_func_$ac_func=yes"
4612 else
4613   echo "configure: failed program was:" >&5
4614   cat conftest.$ac_ext >&5
4615   rm -rf conftest*
4616   eval "ac_cv_func_$ac_func=no"
4617 fi
4618 rm -f conftest*
4619
4620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4621   echo "$ac_t""yes" 1>&6
4622     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4623   { test "$extra_verbose" = "yes" && cat << EOF
4624     Defining $ac_tr_func
4625 EOF
4626 cat >> confdefs.h <<EOF
4627 #define $ac_tr_func 1
4628 EOF
4629 }
4630  
4631 else
4632   echo "$ac_t""no" 1>&6
4633 fi
4634 done
4635
4636 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4637 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4638 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4639 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4640     Defining MAIL_LOCK_LOCKF
4641 EOF
4642 cat >> confdefs.h <<\EOF
4643 #define MAIL_LOCK_LOCKF 1
4644 EOF
4645 }
4646
4647 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4648     Defining MAIL_LOCK_FLOCK
4649 EOF
4650 cat >> confdefs.h <<\EOF
4651 #define MAIL_LOCK_FLOCK 1
4652 EOF
4653 }
4654
4655 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4656     Defining MAIL_LOCK_LOCKING
4657 EOF
4658 cat >> confdefs.h <<\EOF
4659 #define MAIL_LOCK_LOCKING 1
4660 EOF
4661 }
4662
4663 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4664     Defining MAIL_LOCK_DOT
4665 EOF
4666 cat >> confdefs.h <<\EOF
4667 #define MAIL_LOCK_DOT 1
4668 EOF
4669 }
4670
4671 fi
4672 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4673   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4674 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4675   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4676 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4677   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4678
4679 case "$opsys" in decosf*)
4680   
4681 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4682 echo "configure:4683: checking for cma_open in -lpthreads" >&5
4683 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4684
4685 xe_check_libs=" -lpthreads "
4686 cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4689 /* Override any gcc2 internal prototype to avoid an error.  */
4690 /* We use char because int might match the return type of a gcc2
4691     builtin and then its argument prototype would still apply.  */
4692 char cma_open();
4693
4694 int main() {
4695 cma_open()
4696 ; return 0; }
4697 EOF
4698 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4699   rm -rf conftest*
4700   eval "ac_cv_lib_$ac_lib_var=yes"
4701 else
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -rf conftest*
4705   eval "ac_cv_lib_$ac_lib_var=no"
4706 fi
4707 rm -f conftest*
4708 xe_check_libs=""
4709
4710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4711   echo "$ac_t""yes" 1>&6
4712     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4714   { test "$extra_verbose" = "yes" && cat << EOF
4715     Defining $ac_tr_lib
4716 EOF
4717 cat >> confdefs.h <<EOF
4718 #define $ac_tr_lib 1
4719 EOF
4720 }
4721
4722   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4723
4724 else
4725   echo "$ac_t""no" 1>&6
4726 fi
4727
4728
4729   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4730     c_switch_site="$c_switch_site -threads" ;;
4731 esac
4732
4733 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4734 echo "configure:4735: checking whether the -xildoff compiler flag is required" >&5
4735 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4736   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4737     then echo "$ac_t""no" 1>&6;
4738     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
4739   fi
4740   else echo "$ac_t""no" 1>&6
4741 fi
4742
4743 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4744   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4745 echo "configure:4746: checking for \"-z ignore\" linker flag" >&5
4746   case "`ld -h 2>&1`" in
4747     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4748       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4749     *) echo "$ac_t""no" 1>&6 ;;
4750   esac
4751 fi
4752
4753
4754 echo "checking "for specified window system"" 1>&6
4755 echo "configure:4756: checking "for specified window system"" >&5
4756
4757 if test "$with_x11" != "no"; then
4758     test "$x_includes $x_libraries" != "NONE NONE" && \
4759    window_system=x11 with_x11=yes
4760
4761         
4762       if test "$x_includes $x_libraries" = "NONE NONE" \
4763     -a -n "$OPENWINHOME" \
4764     -a "$OPENWINHOME" != "/usr/openwin" \
4765     -a -d "$OPENWINHOME"; then
4766       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4767       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4768       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4769   fi
4770
4771   if test "$x_includes" = "NONE"; then
4772                     for dir in "/usr/X11" "/usr/X11R6"; do
4773       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4774     done
4775   fi
4776
4777   if test "$x_libraries" = "NONE"; then
4778     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4779       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4780     done
4781   fi
4782
4783   # If we find X, set shell vars x_includes and x_libraries to the
4784 # paths, otherwise set no_x=yes.
4785 # Uses ac_ vars as temps to allow command line to override cache and checks.
4786 # --without-x overrides everything else, but does not touch the cache.
4787 echo $ac_n "checking for X""... $ac_c" 1>&6
4788 echo "configure:4789: checking for X" >&5
4789
4790 # Check whether --with-x or --without-x was given.
4791 if test "${with_x+set}" = set; then
4792   withval="$with_x"
4793   :
4794 fi
4795
4796 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4797 if test "x$with_x" = xno; then
4798   # The user explicitly disabled X.
4799   have_x=disabled
4800 else
4801   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4802     # Both variables are already set.
4803     have_x=yes
4804   else
4805
4806 # One or both of the vars are not set, and there is no cached value.
4807 ac_x_includes=NO ac_x_libraries=NO
4808 rm -fr conftestdir
4809 if mkdir conftestdir; then
4810   cd conftestdir
4811   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4812   cat > Imakefile <<'EOF'
4813 acfindx:
4814         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4815 EOF
4816   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4817     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4818     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4819     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4820     for ac_extension in a so sl; do
4821       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4822         test -f $ac_im_libdir/libX11.$ac_extension; then
4823         ac_im_usrlibdir=$ac_im_libdir; break
4824       fi
4825     done
4826     # Screen out bogus values from the imake configuration.  They are
4827     # bogus both because they are the default anyway, and because
4828     # using them would break gcc on systems where it needs fixed includes.
4829     case "$ac_im_incroot" in
4830         /usr/include) ;;
4831         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4832     esac
4833     case "$ac_im_usrlibdir" in
4834         /usr/lib | /lib) ;;
4835         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4836     esac
4837   fi
4838   cd ..
4839   rm -fr conftestdir
4840 fi
4841
4842 if test "$ac_x_includes" = NO; then
4843   # Guess where to find include files, by looking for this one X11 .h file.
4844   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4845
4846   # First, try using that file with no special directory specified.
4847 cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4850 #include <$x_direct_test_include>
4851 EOF
4852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4853 { (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4855 if test -z "$ac_err"; then
4856   rm -rf conftest*
4857   # We can compile using X headers with no special include directory.
4858 ac_x_includes=
4859 else
4860   echo "$ac_err" >&5
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   # Look for the header file in a standard set of common directories.
4865 # Check X11 before X11Rn because it is often a symlink to the current release.
4866   for ac_dir in               \
4867     /usr/X11/include          \
4868     /usr/X11R6/include        \
4869     /usr/X11R5/include        \
4870     /usr/X11R4/include        \
4871                               \
4872     /usr/include/X11          \
4873     /usr/include/X11R6        \
4874     /usr/include/X11R5        \
4875     /usr/include/X11R4        \
4876                               \
4877     /usr/local/X11/include    \
4878     /usr/local/X11R6/include  \
4879     /usr/local/X11R5/include  \
4880     /usr/local/X11R4/include  \
4881                               \
4882     /usr/local/include/X11    \
4883     /usr/local/include/X11R6  \
4884     /usr/local/include/X11R5  \
4885     /usr/local/include/X11R4  \
4886                               \
4887     /usr/X386/include         \
4888     /usr/x386/include         \
4889     /usr/XFree86/include/X11  \
4890                               \
4891     /usr/include              \
4892     /usr/local/include        \
4893     /usr/unsupported/include  \
4894     /usr/athena/include       \
4895     /usr/local/x11r5/include  \
4896     /usr/lpp/Xamples/include  \
4897                               \
4898     /usr/openwin/include      \
4899     /usr/openwin/share/include \
4900     ; \
4901   do
4902     if test -r "$ac_dir/$x_direct_test_include"; then
4903       ac_x_includes=$ac_dir
4904       break
4905     fi
4906   done
4907 fi
4908 rm -f conftest*
4909 fi # $ac_x_includes = NO
4910
4911 if test "$ac_x_libraries" = NO; then
4912   # Check for the libraries.
4913
4914   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4915   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4916
4917   # See if we find them without any special options.
4918   # Don't add to $LIBS permanently.
4919   ac_save_LIBS="$LIBS"
4920   LIBS="-l$x_direct_test_library $LIBS"
4921 cat > conftest.$ac_ext <<EOF
4922 #line 4923 "configure"
4923 #include "confdefs.h"
4924
4925 int main() {
4926 ${x_direct_test_function}()
4927 ; return 0; }
4928 EOF
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4930   rm -rf conftest*
4931   LIBS="$ac_save_LIBS"
4932 # We can link X programs with no special library path.
4933 ac_x_libraries=
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   LIBS="$ac_save_LIBS"
4939 # First see if replacing the include by lib works.
4940 # Check X11 before X11Rn because it is often a symlink to the current release.
4941 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4942     /usr/X11/lib          \
4943     /usr/X11R6/lib        \
4944     /usr/X11R5/lib        \
4945     /usr/X11R4/lib        \
4946                           \
4947     /usr/lib/X11          \
4948     /usr/lib/X11R6        \
4949     /usr/lib/X11R5        \
4950     /usr/lib/X11R4        \
4951                           \
4952     /usr/local/X11/lib    \
4953     /usr/local/X11R6/lib  \
4954     /usr/local/X11R5/lib  \
4955     /usr/local/X11R4/lib  \
4956                           \
4957     /usr/local/lib/X11    \
4958     /usr/local/lib/X11R6  \
4959     /usr/local/lib/X11R5  \
4960     /usr/local/lib/X11R4  \
4961                           \
4962     /usr/X386/lib         \
4963     /usr/x386/lib         \
4964     /usr/XFree86/lib/X11  \
4965                           \
4966     /usr/lib              \
4967     /usr/local/lib        \
4968     /usr/unsupported/lib  \
4969     /usr/athena/lib       \
4970     /usr/local/x11r5/lib  \
4971     /usr/lpp/Xamples/lib  \
4972     /lib/usr/lib/X11      \
4973                           \
4974     /usr/openwin/lib      \
4975     /usr/openwin/share/lib \
4976     ; \
4977 do
4978   for ac_extension in a so sl; do
4979     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4980       ac_x_libraries=$ac_dir
4981       break 2
4982     fi
4983   done
4984 done
4985 fi
4986 rm -f conftest*
4987 fi # $ac_x_libraries = NO
4988
4989 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4990   # Didn't find X anywhere.  Cache the known absence of X.
4991   ac_cv_have_x="have_x=no"
4992 else
4993   # Record where we found X for the cache.
4994   ac_cv_have_x="have_x=yes \
4995                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4996 fi
4997   fi
4998   eval "$ac_cv_have_x"
4999 fi # $with_x != no
5000
5001 if test "$have_x" != yes; then
5002   echo "$ac_t""$have_x" 1>&6
5003   no_x=yes
5004 else
5005   # If each of the values was on the command line, it overrides each guess.
5006   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5007   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5008   # Update the cache value to reflect the command line values.
5009   ac_cv_have_x="have_x=yes \
5010                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5011   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5012 fi
5013
5014 if test "$no_x" = yes; then
5015   # Not all programs may use this symbol, but it does not hurt to define it.
5016   { test "$extra_verbose" = "yes" && cat << \EOF
5017     Defining X_DISPLAY_MISSING
5018 EOF
5019 cat >> confdefs.h <<\EOF
5020 #define X_DISPLAY_MISSING 1
5021 EOF
5022 }
5023
5024   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5025 else
5026   if test -n "$x_includes"; then
5027     X_CFLAGS="$X_CFLAGS -I$x_includes"
5028   fi
5029
5030   # It would also be nice to do this for all -L options, not just this one.
5031   if test -n "$x_libraries"; then
5032     X_LIBS="$X_LIBS -L$x_libraries"
5033     # For Solaris; some versions of Sun CC require a space after -R and
5034     # others require no space.  Words are not sufficient . . . .
5035     case "`(uname -sr) 2>/dev/null`" in
5036     "SunOS 5"*)
5037       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5038 echo "configure:5039: checking whether -R must be followed by a space" >&5
5039       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5040       cat > conftest.$ac_ext <<EOF
5041 #line 5042 "configure"
5042 #include "confdefs.h"
5043
5044 int main() {
5045
5046 ; return 0; }
5047 EOF
5048 if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5049   rm -rf conftest*
5050   ac_R_nospace=yes
5051 else
5052   echo "configure: failed program was:" >&5
5053   cat conftest.$ac_ext >&5
5054   rm -rf conftest*
5055   ac_R_nospace=no
5056 fi
5057 rm -f conftest*
5058       if test $ac_R_nospace = yes; then
5059         echo "$ac_t""no" 1>&6
5060         X_LIBS="$X_LIBS -R$x_libraries"
5061       else
5062         LIBS="$ac_xsave_LIBS -R $x_libraries"
5063         cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066
5067 int main() {
5068
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   ac_R_space=yes
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   ac_R_space=no
5079 fi
5080 rm -f conftest*
5081         if test $ac_R_space = yes; then
5082           echo "$ac_t""yes" 1>&6
5083           X_LIBS="$X_LIBS -R $x_libraries"
5084         else
5085           echo "$ac_t""neither works" 1>&6
5086         fi
5087       fi
5088       LIBS="$ac_xsave_LIBS"
5089     esac
5090   fi
5091
5092   # Check for system-dependent libraries X programs must link with.
5093   # Do this before checking for the system-independent R6 libraries
5094   # (-lICE), since we may need -lsocket or whatever for X linking.
5095
5096   if test "$ISC" = yes; then
5097     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5098   else
5099     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5100     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5101     # the Alpha needs dnet_stub (dnet does not exist).
5102     if test "$with_dnet" = "no" ; then
5103 ac_cv_lib_dnet_dnet_ntoa=no
5104 else
5105
5106 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5107 echo "configure:5108: checking for dnet_ntoa in -ldnet" >&5
5108 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5109
5110 xe_check_libs=" -ldnet "
5111 cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114 /* Override any gcc2 internal prototype to avoid an error.  */
5115 /* We use char because int might match the return type of a gcc2
5116     builtin and then its argument prototype would still apply.  */
5117 char dnet_ntoa();
5118
5119 int main() {
5120 dnet_ntoa()
5121 ; return 0; }
5122 EOF
5123 if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5124   rm -rf conftest*
5125   eval "ac_cv_lib_$ac_lib_var=yes"
5126 else
5127   echo "configure: failed program was:" >&5
5128   cat conftest.$ac_ext >&5
5129   rm -rf conftest*
5130   eval "ac_cv_lib_$ac_lib_var=no"
5131 fi
5132 rm -f conftest*
5133 xe_check_libs=""
5134
5135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5136   echo "$ac_t""yes" 1>&6
5137   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5138 else
5139   echo "$ac_t""no" 1>&6
5140 fi
5141
5142 fi
5143
5144     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5145       
5146 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5147 echo "configure:5148: checking for dnet_ntoa in -ldnet_stub" >&5
5148 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5149
5150 xe_check_libs=" -ldnet_stub "
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 /* Override any gcc2 internal prototype to avoid an error.  */
5155 /* We use char because int might match the return type of a gcc2
5156     builtin and then its argument prototype would still apply.  */
5157 char dnet_ntoa();
5158
5159 int main() {
5160 dnet_ntoa()
5161 ; return 0; }
5162 EOF
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164   rm -rf conftest*
5165   eval "ac_cv_lib_$ac_lib_var=yes"
5166 else
5167   echo "configure: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   rm -rf conftest*
5170   eval "ac_cv_lib_$ac_lib_var=no"
5171 fi
5172 rm -f conftest*
5173 xe_check_libs=""
5174
5175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5176   echo "$ac_t""yes" 1>&6
5177   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5178 else
5179   echo "$ac_t""no" 1>&6
5180 fi
5181
5182
5183     fi
5184
5185     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5186     # to get the SysV transport functions.
5187     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5188     # needs -lnsl.
5189     # The nsl library prevents programs from opening the X display
5190     # on Irix 5.2, according to dickey@clark.net.
5191     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5192 echo "configure:5193: checking for gethostbyname" >&5
5193
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197 /* System header to define __stub macros and hopefully few prototypes,
5198     which can conflict with char gethostbyname(); below.  */
5199 #include <assert.h>
5200 /* Override any gcc2 internal prototype to avoid an error.  */
5201 /* We use char because int might match the return type of a gcc2
5202     builtin and then its argument prototype would still apply.  */
5203 char gethostbyname();
5204
5205 int main() {
5206
5207 /* The GNU C library defines this for functions which it implements
5208     to always fail with ENOSYS.  Some functions are actually named
5209     something starting with __ and the normal name is an alias.  */
5210 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5211 choke me
5212 #else
5213 gethostbyname();
5214 #endif
5215
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219   rm -rf conftest*
5220   eval "ac_cv_func_gethostbyname=yes"
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_func_gethostbyname=no"
5226 fi
5227 rm -f conftest*
5228
5229 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5230   echo "$ac_t""yes" 1>&6
5231   :
5232 else
5233   echo "$ac_t""no" 1>&6
5234 fi
5235
5236     if test $ac_cv_func_gethostbyname = no; then
5237       
5238 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5239 echo "configure:5240: checking for gethostbyname in -lnsl" >&5
5240 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5241
5242 xe_check_libs=" -lnsl "
5243 cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* Override any gcc2 internal prototype to avoid an error.  */
5247 /* We use char because int might match the return type of a gcc2
5248     builtin and then its argument prototype would still apply.  */
5249 char gethostbyname();
5250
5251 int main() {
5252 gethostbyname()
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   eval "ac_cv_lib_$ac_lib_var=yes"
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_lib_$ac_lib_var=no"
5263 fi
5264 rm -f conftest*
5265 xe_check_libs=""
5266
5267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5268   echo "$ac_t""yes" 1>&6
5269   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5270 else
5271   echo "$ac_t""no" 1>&6
5272 fi
5273
5274
5275     fi
5276
5277     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5278     # socket/setsockopt and other routines are undefined under SCO ODT
5279     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5280     # on later versions), says simon@lia.di.epfl.ch: it contains
5281     # gethostby* variants that don't use the nameserver (or something).
5282     # -lsocket must be given before -lnsl if both are needed.
5283     # We assume that if connect needs -lnsl, so does gethostbyname.
5284     echo $ac_n "checking for connect""... $ac_c" 1>&6
5285 echo "configure:5286: checking for connect" >&5
5286
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* System header to define __stub macros and hopefully few prototypes,
5291     which can conflict with char connect(); below.  */
5292 #include <assert.h>
5293 /* Override any gcc2 internal prototype to avoid an error.  */
5294 /* We use char because int might match the return type of a gcc2
5295     builtin and then its argument prototype would still apply.  */
5296 char connect();
5297
5298 int main() {
5299
5300 /* The GNU C library defines this for functions which it implements
5301     to always fail with ENOSYS.  Some functions are actually named
5302     something starting with __ and the normal name is an alias.  */
5303 #if defined (__stub_connect) || defined (__stub___connect)
5304 choke me
5305 #else
5306 connect();
5307 #endif
5308
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5312   rm -rf conftest*
5313   eval "ac_cv_func_connect=yes"
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   eval "ac_cv_func_connect=no"
5319 fi
5320 rm -f conftest*
5321
5322 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324   :
5325 else
5326   echo "$ac_t""no" 1>&6
5327 fi
5328
5329     if test $ac_cv_func_connect = no; then
5330       
5331 xe_msg_checking="for connect in -lsocket"
5332 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5333 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5334 echo "configure:5335: checking "$xe_msg_checking"" >&5
5335 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5336
5337 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5338 cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 /* We use char because int might match the return type of a gcc2
5343     builtin and then its argument prototype would still apply.  */
5344 char connect();
5345
5346 int main() {
5347 connect()
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_lib_$ac_lib_var=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=no"
5358 fi
5359 rm -f conftest*
5360 xe_check_libs=""
5361
5362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5363   echo "$ac_t""yes" 1>&6
5364   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5365 else
5366   echo "$ac_t""no" 1>&6
5367 fi
5368
5369
5370     fi
5371
5372     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5373     echo $ac_n "checking for remove""... $ac_c" 1>&6
5374 echo "configure:5375: checking for remove" >&5
5375
5376 cat > conftest.$ac_ext <<EOF
5377 #line 5378 "configure"
5378 #include "confdefs.h"
5379 /* System header to define __stub macros and hopefully few prototypes,
5380     which can conflict with char remove(); below.  */
5381 #include <assert.h>
5382 /* Override any gcc2 internal prototype to avoid an error.  */
5383 /* We use char because int might match the return type of a gcc2
5384     builtin and then its argument prototype would still apply.  */
5385 char remove();
5386
5387 int main() {
5388
5389 /* The GNU C library defines this for functions which it implements
5390     to always fail with ENOSYS.  Some functions are actually named
5391     something starting with __ and the normal name is an alias.  */
5392 #if defined (__stub_remove) || defined (__stub___remove)
5393 choke me
5394 #else
5395 remove();
5396 #endif
5397
5398 ; return 0; }
5399 EOF
5400 if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5401   rm -rf conftest*
5402   eval "ac_cv_func_remove=yes"
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406   rm -rf conftest*
5407   eval "ac_cv_func_remove=no"
5408 fi
5409 rm -f conftest*
5410
5411 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5412   echo "$ac_t""yes" 1>&6
5413   :
5414 else
5415   echo "$ac_t""no" 1>&6
5416 fi
5417
5418     if test $ac_cv_func_remove = no; then
5419       
5420 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5421 echo "configure:5422: checking for remove in -lposix" >&5
5422 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5423
5424 xe_check_libs=" -lposix "
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428 /* Override any gcc2 internal prototype to avoid an error.  */
5429 /* We use char because int might match the return type of a gcc2
5430     builtin and then its argument prototype would still apply.  */
5431 char remove();
5432
5433 int main() {
5434 remove()
5435 ; return 0; }
5436 EOF
5437 if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5438   rm -rf conftest*
5439   eval "ac_cv_lib_$ac_lib_var=yes"
5440 else
5441   echo "configure: failed program was:" >&5
5442   cat conftest.$ac_ext >&5
5443   rm -rf conftest*
5444   eval "ac_cv_lib_$ac_lib_var=no"
5445 fi
5446 rm -f conftest*
5447 xe_check_libs=""
5448
5449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5450   echo "$ac_t""yes" 1>&6
5451   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5452 else
5453   echo "$ac_t""no" 1>&6
5454 fi
5455
5456
5457     fi
5458
5459     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5460     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5461 echo "configure:5462: checking for shmat" >&5
5462
5463 cat > conftest.$ac_ext <<EOF
5464 #line 5465 "configure"
5465 #include "confdefs.h"
5466 /* System header to define __stub macros and hopefully few prototypes,
5467     which can conflict with char shmat(); below.  */
5468 #include <assert.h>
5469 /* Override any gcc2 internal prototype to avoid an error.  */
5470 /* We use char because int might match the return type of a gcc2
5471     builtin and then its argument prototype would still apply.  */
5472 char shmat();
5473
5474 int main() {
5475
5476 /* The GNU C library defines this for functions which it implements
5477     to always fail with ENOSYS.  Some functions are actually named
5478     something starting with __ and the normal name is an alias.  */
5479 #if defined (__stub_shmat) || defined (__stub___shmat)
5480 choke me
5481 #else
5482 shmat();
5483 #endif
5484
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   eval "ac_cv_func_shmat=yes"
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493   rm -rf conftest*
5494   eval "ac_cv_func_shmat=no"
5495 fi
5496 rm -f conftest*
5497
5498 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5499   echo "$ac_t""yes" 1>&6
5500   :
5501 else
5502   echo "$ac_t""no" 1>&6
5503 fi
5504
5505     if test $ac_cv_func_shmat = no; then
5506       
5507 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5508 echo "configure:5509: checking for shmat in -lipc" >&5
5509 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5510
5511 xe_check_libs=" -lipc "
5512 cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 /* Override any gcc2 internal prototype to avoid an error.  */
5516 /* We use char because int might match the return type of a gcc2
5517     builtin and then its argument prototype would still apply.  */
5518 char shmat();
5519
5520 int main() {
5521 shmat()
5522 ; return 0; }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525   rm -rf conftest*
5526   eval "ac_cv_lib_$ac_lib_var=yes"
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -rf conftest*
5531   eval "ac_cv_lib_$ac_lib_var=no"
5532 fi
5533 rm -f conftest*
5534 xe_check_libs=""
5535
5536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5537   echo "$ac_t""yes" 1>&6
5538   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5539 else
5540   echo "$ac_t""no" 1>&6
5541 fi
5542
5543
5544     fi
5545   fi
5546
5547   # Check for libraries that X11R6 Xt/Xaw programs need.
5548   ac_save_LDFLAGS="$LDFLAGS"
5549   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5550   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5551   # check for ICE first), but we must link in the order -lSM -lICE or
5552   # we get undefined symbols.  So assume we have SM if we have ICE.
5553   # These have to be linked with before -lX11, unlike the other
5554   # libraries we check for below, so use a different variable.
5555   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5556   
5557 xe_msg_checking="for IceConnectionNumber in -lICE"
5558 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5559 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5560 echo "configure:5561: checking "$xe_msg_checking"" >&5
5561 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5562
5563 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5564 cat > conftest.$ac_ext <<EOF
5565 #line 5566 "configure"
5566 #include "confdefs.h"
5567 /* Override any gcc2 internal prototype to avoid an error.  */
5568 /* We use char because int might match the return type of a gcc2
5569     builtin and then its argument prototype would still apply.  */
5570 char IceConnectionNumber();
5571
5572 int main() {
5573 IceConnectionNumber()
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   eval "ac_cv_lib_$ac_lib_var=yes"
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   eval "ac_cv_lib_$ac_lib_var=no"
5584 fi
5585 rm -f conftest*
5586 xe_check_libs=""
5587
5588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5589   echo "$ac_t""yes" 1>&6
5590   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5591 else
5592   echo "$ac_t""no" 1>&6
5593 fi
5594
5595
5596   LDFLAGS="$ac_save_LDFLAGS"
5597
5598 fi
5599  # Autoconf claims to find X library and include dirs for us.
5600   if test "$no_x" = "yes"
5601   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5602   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5603   fi
5604 fi
5605
5606 case "$with_x11" in
5607   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5608   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5609 esac
5610
5611 if test "$with_x11" = "yes"; then
5612   { test "$extra_verbose" = "yes" && cat << \EOF
5613     Defining HAVE_X_WINDOWS
5614 EOF
5615 cat >> confdefs.h <<\EOF
5616 #define HAVE_X_WINDOWS 1
5617 EOF
5618 }
5619
5620   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5621   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5622
5623       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5624     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5625     if test -d "$lib_dir" -a -d "$inc_dir"; then
5626       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5627         x_libraries="$lib_dir $x_libraries"
5628         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5629       esac
5630       case "$x_includes" in "$inc_dir"* ) ;; *)
5631         x_includes="$inc_dir $x_includes"
5632         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5633       esac
5634       break;       fi
5635   done
5636
5637     for rel in "X11R6" "X11R5" "X11R4"; do
5638     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5639     if test -d "$lib_dir" -a -d "$inc_dir"; then
5640       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5641         x_libraries="$x_libraries $lib_dir"
5642         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5643       esac
5644       case "$x_includes" in "$inc_dir"* ) ;; *)
5645         x_includes="$x_includes $inc_dir"
5646         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5647       esac
5648       break;     fi
5649   done
5650
5651     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
5652
5653   ld_switch_x_site="$X_LIBS"
5654
5655   
5656 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5657     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5658   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5659   
5660         runpath="" runpath_dirs=""
5661   if test -n "$LD_RUN_PATH"; then
5662     runpath="$LD_RUN_PATH"
5663   elif test "$GCC" = "yes"; then
5664         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5665     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5666     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5667     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5668       case "$arg" in P,* | -L* | -R* )
5669         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5670           {
5671 xe_runpath_dir="$dir"
5672   test "$xe_runpath_dir" != "/lib"     -a \
5673         "$xe_runpath_dir" != "/usr/lib" -a \
5674         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5675   eval "$xe_add_unique_runpath_dir"
5676 }
5677         done ;;
5678       esac
5679     done
5680     ld_switch_run="$ld_switch_run_save"
5681     rm -f conftest*
5682   else
5683         for arg in $ld_switch_site $ld_switch_x_site; do
5684       case "$arg" in -L*) {
5685 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5686   test "$xe_runpath_dir" != "/lib"     -a \
5687         "$xe_runpath_dir" != "/usr/lib" -a \
5688         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5689   eval "$xe_add_unique_runpath_dir"
5690 };; esac
5691     done
5692         if test "$opsys $need_motif" = "sol2 yes"; then
5693       xe_runpath_dir="/opt/SUNWdt/lib";
5694       eval "$xe_add_unique_runpath_dir";
5695     fi
5696   fi 
5697   if test -n "$runpath"; then
5698     ld_switch_run="${dash_r}${runpath}"
5699     
5700 if test "$GCC" = "yes"; then
5701   set x $ld_switch_run; shift; ld_switch_run=""
5702   while test -n "$1"; do
5703     case $1 in
5704       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5705       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5706       -Xlinker* ) ;;
5707       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5708     esac
5709     shift
5710   done
5711 fi
5712     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5713   fi
5714 fi
5715
5716
5717   if test "$extra_verbose" = "yes"; then
5718     echo; echo "X11 compilation variables:"
5719     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5720     echo
5721   fi
5722
5723             bitmapdirs=
5724   if test "$x_includes" != NONE; then
5725     for i in $x_includes; do
5726       if test -d "$i/bitmaps"; then
5727         bitmapdirs="$i/bitmaps:$bitmapdirs"
5728       fi
5729       if test -d "$i/X11/bitmaps"; then
5730         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5731       fi
5732     done
5733     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5734   fi
5735   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5736     Defining BITMAPDIR = "$bitmapdirs"
5737 EOF
5738 cat >> confdefs.h <<EOF
5739 #define BITMAPDIR "$bitmapdirs"
5740 EOF
5741 }
5742
5743
5744     echo "checking for X defines extracted by xmkmf" 1>&6
5745 echo "configure:5746: checking for X defines extracted by xmkmf" >&5
5746   rm -fr conftestdir
5747   if mkdir conftestdir; then
5748     cd conftestdir
5749     cat > Imakefile <<'EOF'
5750 xetest:
5751         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5752 EOF
5753     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5754       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5755       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5756     fi
5757     cd ..
5758     rm -fr conftestdir
5759     for word in $xmkmf_defines; do
5760       case "$word" in
5761         -D*=* ) ;;
5762         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5763               { test "$extra_verbose" = "yes" && cat << EOF
5764     Defining $word
5765 EOF
5766 cat >> confdefs.h <<EOF
5767 #define $word 1
5768 EOF
5769 }
5770  ;;
5771       esac
5772     done
5773   fi
5774
5775     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5776 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5777 echo "configure:5778: checking for X11/Intrinsic.h" >&5
5778
5779 cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 #include <X11/Intrinsic.h>
5783 EOF
5784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5785 { (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5787 if test -z "$ac_err"; then
5788   rm -rf conftest*
5789   eval "ac_cv_header_$ac_safe=yes"
5790 else
5791   echo "$ac_err" >&5
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_header_$ac_safe=no"
5796 fi
5797 rm -f conftest*
5798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5799   echo "$ac_t""yes" 1>&6
5800   :
5801 else
5802   echo "$ac_t""no" 1>&6
5803 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5804 fi
5805
5806
5807       
5808 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5809 echo "configure:5810: checking for XOpenDisplay in -lX11" >&5
5810 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5811
5812 xe_check_libs=" -lX11 "
5813 cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816 /* Override any gcc2 internal prototype to avoid an error.  */
5817 /* We use char because int might match the return type of a gcc2
5818     builtin and then its argument prototype would still apply.  */
5819 char XOpenDisplay();
5820
5821 int main() {
5822 XOpenDisplay()
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=yes"
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_lib_$ac_lib_var=no"
5833 fi
5834 rm -f conftest*
5835 xe_check_libs=""
5836
5837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5838   echo "$ac_t""yes" 1>&6
5839   have_lib_x11=yes
5840 else
5841   echo "$ac_t""no" 1>&6
5842 fi
5843
5844
5845   if test "$have_lib_x11" != "yes"; then
5846     
5847 xe_msg_checking="for XGetFontProperty in -lX11"
5848 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5849 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5850 echo "configure:5851: checking "$xe_msg_checking"" >&5
5851 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5852
5853 xe_check_libs=" -lX11 -b i486-linuxaout"
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* Override any gcc2 internal prototype to avoid an error.  */
5858 /* We use char because int might match the return type of a gcc2
5859     builtin and then its argument prototype would still apply.  */
5860 char XGetFontProperty();
5861
5862 int main() {
5863 XGetFontProperty()
5864 ; return 0; }
5865 EOF
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5867   rm -rf conftest*
5868   eval "ac_cv_lib_$ac_lib_var=yes"
5869 else
5870   echo "configure: failed program was:" >&5
5871   cat conftest.$ac_ext >&5
5872   rm -rf conftest*
5873   eval "ac_cv_lib_$ac_lib_var=no"
5874 fi
5875 rm -f conftest*
5876 xe_check_libs=""
5877
5878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5879   echo "$ac_t""yes" 1>&6
5880   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5881 else
5882   echo "$ac_t""no" 1>&6
5883 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5884 fi
5885
5886
5887   fi
5888   libs_x="-lX11"
5889   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5890
5891     
5892 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5893 echo "configure:5894: checking for XShapeSelectInput in -lXext" >&5
5894 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5895
5896 xe_check_libs=" -lXext "
5897 cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char XShapeSelectInput();
5904
5905 int main() {
5906 XShapeSelectInput()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 xe_check_libs=""
5920
5921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5922   echo "$ac_t""yes" 1>&6
5923   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5924 else
5925   echo "$ac_t""no" 1>&6
5926 fi
5927
5928
5929
5930     
5931 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5932 echo "configure:5933: checking for XtOpenDisplay in -lXt" >&5
5933 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5934
5935 xe_check_libs=" -lXt "
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 /* We use char because int might match the return type of a gcc2
5941     builtin and then its argument prototype would still apply.  */
5942 char XtOpenDisplay();
5943
5944 int main() {
5945 XtOpenDisplay()
5946 ; return 0; }
5947 EOF
5948 if { (eval echo configure:5949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5949   rm -rf conftest*
5950   eval "ac_cv_lib_$ac_lib_var=yes"
5951 else
5952   echo "configure: failed program was:" >&5
5953   cat conftest.$ac_ext >&5
5954   rm -rf conftest*
5955   eval "ac_cv_lib_$ac_lib_var=no"
5956 fi
5957 rm -f conftest*
5958 xe_check_libs=""
5959
5960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5961   echo "$ac_t""yes" 1>&6
5962   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5963 else
5964   echo "$ac_t""no" 1>&6
5965 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5966 fi
5967
5968
5969
5970   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5971 echo "configure:5972: checking the version of X11 being used" >&5
5972   cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 #include <X11/Intrinsic.h>
5976     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5979 then
5980   ./conftest foobar; x11_release=$?
5981 else
5982   conftest_rc="$?"
5983   echo "configure: failed program was:" >&5
5984   cat conftest.$ac_ext >&5
5985   rm -fr conftest*
5986   x11_release=4
5987 fi
5988 rm -fr conftest*
5989   echo "$ac_t""R${x11_release}" 1>&6
5990   { test "$extra_verbose" = "yes" && cat << EOF
5991     Defining THIS_IS_X11R${x11_release}
5992 EOF
5993 cat >> confdefs.h <<EOF
5994 #define THIS_IS_X11R${x11_release} 1
5995 EOF
5996 }
5997
5998
5999   for ac_hdr in X11/Xlocale.h
6000 do
6001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6003 echo "configure:6004: checking for $ac_hdr" >&5
6004
6005 cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 #include <$ac_hdr>
6009 EOF
6010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6011 { (eval echo configure:6012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6013 if test -z "$ac_err"; then
6014   rm -rf conftest*
6015   eval "ac_cv_header_$ac_safe=yes"
6016 else
6017   echo "$ac_err" >&5
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_header_$ac_safe=no"
6022 fi
6023 rm -f conftest*
6024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6025   echo "$ac_t""yes" 1>&6
6026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6027   { test "$extra_verbose" = "yes" && cat << EOF
6028     Defining $ac_tr_hdr
6029 EOF
6030 cat >> confdefs.h <<EOF
6031 #define $ac_tr_hdr 1
6032 EOF
6033 }
6034  
6035 else
6036   echo "$ac_t""no" 1>&6
6037 fi
6038 done
6039
6040
6041     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6042 echo "configure:6043: checking for XFree86" >&5
6043   if test -d "/usr/X386/include" -o \
6044           -f "/etc/XF86Config"    -o \
6045           -f "/etc/X11/XF86Config" -o \
6046           -f "/usr/X11R6/lib/X11/XF86Config"; then
6047     echo "$ac_t""yes" 1>&6
6048     { test "$extra_verbose" = "yes" && cat << \EOF
6049     Defining HAVE_XFREE386
6050 EOF
6051 cat >> confdefs.h <<\EOF
6052 #define HAVE_XFREE386 1
6053 EOF
6054 }
6055
6056   else
6057     echo "$ac_t""no" 1>&6
6058   fi
6059
6060     test -z "$with_xmu" && { 
6061 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6062 echo "configure:6063: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6063 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6064
6065 xe_check_libs=" -lXmu "
6066 cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069 /* Override any gcc2 internal prototype to avoid an error.  */
6070 /* We use char because int might match the return type of a gcc2
6071     builtin and then its argument prototype would still apply.  */
6072 char XmuReadBitmapDataFromFile();
6073
6074 int main() {
6075 XmuReadBitmapDataFromFile()
6076 ; return 0; }
6077 EOF
6078 if { (eval echo configure:6079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6079   rm -rf conftest*
6080   eval "ac_cv_lib_$ac_lib_var=yes"
6081 else
6082   echo "configure: failed program was:" >&5
6083   cat conftest.$ac_ext >&5
6084   rm -rf conftest*
6085   eval "ac_cv_lib_$ac_lib_var=no"
6086 fi
6087 rm -f conftest*
6088 xe_check_libs=""
6089
6090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6091   echo "$ac_t""yes" 1>&6
6092   with_xmu=yes
6093 else
6094   echo "$ac_t""no" 1>&6
6095 with_xmu=no
6096 fi
6097
6098  }
6099   if test "$with_xmu" = "no"; then
6100     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6101    echo "    xemacs will be linked with \"xmu.o\""
6102  fi
6103   else
6104     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6105     { test "$extra_verbose" = "yes" && cat << \EOF
6106     Defining HAVE_XMU
6107 EOF
6108 cat >> confdefs.h <<\EOF
6109 #define HAVE_XMU 1
6110 EOF
6111 }
6112
6113   fi
6114
6115       
6116 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6117 echo "configure:6118: checking for main in -lXbsd" >&5
6118 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6119
6120 xe_check_libs=" -lXbsd "
6121 cat > conftest.$ac_ext <<EOF
6122 #line 6123 "configure"
6123 #include "confdefs.h"
6124
6125 int main() {
6126 main()
6127 ; return 0; }
6128 EOF
6129 if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6130   rm -rf conftest*
6131   eval "ac_cv_lib_$ac_lib_var=yes"
6132 else
6133   echo "configure: failed program was:" >&5
6134   cat conftest.$ac_ext >&5
6135   rm -rf conftest*
6136   eval "ac_cv_lib_$ac_lib_var=no"
6137 fi
6138 rm -f conftest*
6139 xe_check_libs=""
6140
6141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6142   echo "$ac_t""yes" 1>&6
6143   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147
6148
6149
6150     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6151         if test "$GCC" = "yes"; then
6152       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6153       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6154     else
6155       case "$CC" in
6156         "xlc" ) CC="xlc_r" ;;
6157         "xlC" ) CC="xlC_r" ;;
6158         "cc"  ) CC="cc_r" ;;
6159       esac
6160     fi
6161   fi
6162
6163 fi 
6164 if test "$with_msw" != "no"; then
6165   echo "checking for MS-Windows" 1>&6
6166 echo "configure:6167: checking for MS-Windows" >&5
6167   
6168 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6169 echo "configure:6170: checking for main in -lgdi32" >&5
6170 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6171
6172 xe_check_libs=" -lgdi32 "
6173 cat > conftest.$ac_ext <<EOF
6174 #line 6175 "configure"
6175 #include "confdefs.h"
6176
6177 int main() {
6178 main()
6179 ; return 0; }
6180 EOF
6181 if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6182   rm -rf conftest*
6183   eval "ac_cv_lib_$ac_lib_var=yes"
6184 else
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -rf conftest*
6188   eval "ac_cv_lib_$ac_lib_var=no"
6189 fi
6190 rm -f conftest*
6191 xe_check_libs=""
6192
6193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6194   echo "$ac_t""yes" 1>&6
6195   with_msw=yes
6196 else
6197   echo "$ac_t""no" 1>&6
6198 fi
6199
6200
6201   if test "$with_msw" = "yes"; then
6202     { test "$extra_verbose" = "yes" && cat << \EOF
6203     Defining HAVE_MS_WINDOWS
6204 EOF
6205 cat >> confdefs.h <<\EOF
6206 #define HAVE_MS_WINDOWS 1
6207 EOF
6208 }
6209
6210     install_pp="$blddir/lib-src/installexe.sh"
6211     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6212     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6213     if test "$window_system" != x11; then
6214         window_system=msw
6215         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6216             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6217    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6218  fi
6219         test "$with_menubars"   != "no" && with_menubars=msw \
6220             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6221    echo "    xemacs will be linked with \"menubar-msw.o\""
6222  fi
6223         test "$with_toolbars"   != "no" && with_toolbars=msw \
6224             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6225    echo "    xemacs will be linked with \"toolbar-msw.o\""
6226  fi
6227         test "$with_dialogs"   != "no" && with_dialogs=msw \
6228             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6229    echo "    xemacs will be linked with \"dialog-msw.o\""
6230  fi
6231         test "$with_widgets"   != "no" && with_widgets=msw
6232     else
6233         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6234    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6235  fi
6236         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6237    echo "    xemacs will be linked with \"menubar-msw.o\""
6238  fi
6239         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6240    echo "    xemacs will be linked with \"toolbar-msw.o\""
6241  fi
6242         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6243    echo "    xemacs will be linked with \"dialog-msw.o\""
6244  fi
6245     fi
6246         cat > conftest.$ac_ext <<EOF
6247 #line 6248 "configure"
6248 #include "confdefs.h"
6249 #include <fcntl.h>
6250     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6251 EOF
6252 if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6253 then
6254   { test "$extra_verbose" = "yes" && cat << \EOF
6255     Defining HAVE_MSG_SELECT
6256 EOF
6257 cat >> confdefs.h <<\EOF
6258 #define HAVE_MSG_SELECT 1
6259 EOF
6260 }
6261
6262 else
6263   conftest_rc="$?"
6264   echo "configure: failed program was:" >&5
6265   cat conftest.$ac_ext >&5
6266 fi
6267 rm -fr conftest*
6268     const_is_losing=no
6269     with_file_coding=yes
6270     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
6271    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\""
6272  fi
6273   fi
6274 fi
6275
6276
6277
6278 test -z "$window_system" && window_system="none"
6279
6280 if test "$window_system" = "none"; then
6281   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6282   do
6283     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6284        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6285     fi
6286     eval "with_${feature}=no"
6287   done
6288 else
6289   test -z "$with_toolbars" && with_toolbars=yes
6290 fi
6291
6292 if test "$with_msw" != "yes"; then
6293   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6294   do
6295     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6296        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6297     fi
6298     eval "with_${feature}=no"
6299   done
6300 else
6301   :
6302 fi
6303
6304 if test "$with_x11" != "yes"; then
6305             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6306   do
6307     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6308        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6309     fi
6310     eval "with_${feature}=no"
6311   done
6312 fi
6313
6314 bitmapdir=
6315
6316 case "$window_system" in
6317   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6318   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6319   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6320 esac
6321
6322 case "$x_libraries" in *X11R4* )
6323   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6324   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6325 esac
6326
6327 echo "checking for WM_COMMAND option" 1>&6
6328 echo "configure:6329: checking for WM_COMMAND option" >&5;
6329 if test "$with_wmcommand" != "no"; then
6330   { test "$extra_verbose" = "yes" && cat << \EOF
6331     Defining HAVE_WMCOMMAND
6332 EOF
6333 cat >> confdefs.h <<\EOF
6334 #define HAVE_WMCOMMAND 1
6335 EOF
6336 }
6337
6338 fi
6339
6340 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6341 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6342 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6343 echo "configure:6344: checking for X11/Xauth.h" >&5
6344
6345 cat > conftest.$ac_ext <<EOF
6346 #line 6347 "configure"
6347 #include "confdefs.h"
6348 #include <X11/Xauth.h>
6349 EOF
6350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6351 { (eval echo configure:6352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6353 if test -z "$ac_err"; then
6354   rm -rf conftest*
6355   eval "ac_cv_header_$ac_safe=yes"
6356 else
6357   echo "$ac_err" >&5
6358   echo "configure: failed program was:" >&5
6359   cat conftest.$ac_ext >&5
6360   rm -rf conftest*
6361   eval "ac_cv_header_$ac_safe=no"
6362 fi
6363 rm -f conftest*
6364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366   :
6367 else
6368   echo "$ac_t""no" 1>&6
6369 with_xauth=no
6370 fi
6371  }
6372 test -z "$with_xauth" && { 
6373 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6374 echo "configure:6375: checking for XauGetAuthByAddr in -lXau" >&5
6375 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6376
6377 xe_check_libs=" -lXau "
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381 /* Override any gcc2 internal prototype to avoid an error.  */
6382 /* We use char because int might match the return type of a gcc2
6383     builtin and then its argument prototype would still apply.  */
6384 char XauGetAuthByAddr();
6385
6386 int main() {
6387 XauGetAuthByAddr()
6388 ; return 0; }
6389 EOF
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6391   rm -rf conftest*
6392   eval "ac_cv_lib_$ac_lib_var=yes"
6393 else
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_lib_$ac_lib_var=no"
6398 fi
6399 rm -f conftest*
6400 xe_check_libs=""
6401
6402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6403   echo "$ac_t""yes" 1>&6
6404   :
6405 else
6406   echo "$ac_t""no" 1>&6
6407 with_xauth=no
6408 fi
6409
6410  }
6411 test -z "$with_xauth" && with_xauth=yes
6412 if test "$with_xauth" = "yes"; then
6413   { test "$extra_verbose" = "yes" && cat << \EOF
6414     Defining HAVE_XAUTH
6415 EOF
6416 cat >> confdefs.h <<\EOF
6417 #define HAVE_XAUTH 1
6418 EOF
6419 }
6420
6421   
6422 T=""
6423 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
6424 libs_xauth="$T"
6425
6426 fi
6427
6428
6429
6430
6431 if test "$with_tooltalk" != "no" ; then
6432       for dir in "" "Tt/" "desktop/" ; do
6433     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6434 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6435 echo "configure:6436: checking for ${dir}tt_c.h" >&5
6436
6437 cat > conftest.$ac_ext <<EOF
6438 #line 6439 "configure"
6439 #include "confdefs.h"
6440 #include <${dir}tt_c.h>
6441 EOF
6442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6443 { (eval echo configure:6444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6445 if test -z "$ac_err"; then
6446   rm -rf conftest*
6447   eval "ac_cv_header_$ac_safe=yes"
6448 else
6449   echo "$ac_err" >&5
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   eval "ac_cv_header_$ac_safe=no"
6454 fi
6455 rm -f conftest*
6456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6457   echo "$ac_t""yes" 1>&6
6458   tt_c_h_path="${dir}tt_c.h"; break
6459 else
6460   echo "$ac_t""no" 1>&6
6461 fi
6462
6463   done
6464   if test -z "$tt_c_h_path"; then
6465     if test "$with_tooltalk" = "yes"; then
6466       (echo "$progname: Usage error:"
6467 echo " " "Unable to find required tooltalk header files."
6468 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6469     fi
6470     with_tooltalk=no
6471   fi
6472 fi
6473 if test "$with_tooltalk" != "no" ; then
6474   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6475     
6476 xe_msg_checking="for tt_message_create in -ltt"
6477 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6478 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6479 echo "configure:6480: checking "$xe_msg_checking"" >&5
6480 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6481
6482 xe_check_libs=" -ltt $extra_libs"
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 /* Override any gcc2 internal prototype to avoid an error.  */
6487 /* We use char because int might match the return type of a gcc2
6488     builtin and then its argument prototype would still apply.  */
6489 char tt_message_create();
6490
6491 int main() {
6492 tt_message_create()
6493 ; return 0; }
6494 EOF
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6496   rm -rf conftest*
6497   eval "ac_cv_lib_$ac_lib_var=yes"
6498 else
6499   echo "configure: failed program was:" >&5
6500   cat conftest.$ac_ext >&5
6501   rm -rf conftest*
6502   eval "ac_cv_lib_$ac_lib_var=no"
6503 fi
6504 rm -f conftest*
6505 xe_check_libs=""
6506
6507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6508   echo "$ac_t""yes" 1>&6
6509   tt_libs="-ltt $extra_libs"; break
6510 else
6511   echo "$ac_t""no" 1>&6
6512 :
6513 fi
6514
6515
6516   done
6517   if test -z "$tt_libs"; then
6518     if test "$with_tooltalk" = "yes"; then
6519       (echo "$progname: Usage error:"
6520 echo " " "Unable to find required tooltalk libraries."
6521 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6522     fi
6523     with_tooltalk=no
6524   fi
6525 fi
6526 test -z "$with_tooltalk" && with_tooltalk=yes
6527 if test "$with_tooltalk" = "yes"; then
6528   { test "$extra_verbose" = "yes" && cat << \EOF
6529     Defining TOOLTALK
6530 EOF
6531 cat >> confdefs.h <<\EOF
6532 #define TOOLTALK 1
6533 EOF
6534 }
6535
6536   { test "$extra_verbose" = "yes" && cat << EOF
6537     Defining TT_C_H_PATH = "$tt_c_h_path"
6538 EOF
6539 cat >> confdefs.h <<EOF
6540 #define TT_C_H_PATH "$tt_c_h_path"
6541 EOF
6542 }
6543
6544   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6545   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6546    echo "    xemacs will be linked with \"tooltalk.o\""
6547  fi
6548 fi
6549
6550 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6551 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6552 echo "configure:6553: checking for Dt/Dt.h" >&5
6553
6554 cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 #include <Dt/Dt.h>
6558 EOF
6559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6560 { (eval echo configure:6561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6562 if test -z "$ac_err"; then
6563   rm -rf conftest*
6564   eval "ac_cv_header_$ac_safe=yes"
6565 else
6566   echo "$ac_err" >&5
6567   echo "configure: failed program was:" >&5
6568   cat conftest.$ac_ext >&5
6569   rm -rf conftest*
6570   eval "ac_cv_header_$ac_safe=no"
6571 fi
6572 rm -f conftest*
6573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6574   echo "$ac_t""yes" 1>&6
6575   :
6576 else
6577   echo "$ac_t""no" 1>&6
6578 with_cde=no
6579 fi
6580  }
6581 test -z "$with_cde" && { 
6582 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6583 echo "configure:6584: checking for DtDndDragStart in -lDtSvc" >&5
6584 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6585
6586 xe_check_libs=" -lDtSvc "
6587 cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 /* We use char because int might match the return type of a gcc2
6592     builtin and then its argument prototype would still apply.  */
6593 char DtDndDragStart();
6594
6595 int main() {
6596 DtDndDragStart()
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=yes"
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   eval "ac_cv_lib_$ac_lib_var=no"
6607 fi
6608 rm -f conftest*
6609 xe_check_libs=""
6610
6611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6612   echo "$ac_t""yes" 1>&6
6613   :
6614 else
6615   echo "$ac_t""no" 1>&6
6616 with_cde=no
6617 fi
6618
6619  }
6620 test -z "$with_cde" && with_cde=yes
6621 if test "$with_dragndrop" = no; then
6622   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6623   with_cde=no
6624 fi
6625 if test "$with_cde" = "yes" ; then
6626   { test "$extra_verbose" = "yes" && cat << \EOF
6627     Defining HAVE_CDE
6628 EOF
6629 cat >> confdefs.h <<\EOF
6630 #define HAVE_CDE 1
6631 EOF
6632 }
6633
6634   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6635   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6636   with_tooltalk=yes # CDE requires Tooltalk
6637   need_motif=yes    # CDE requires Motif
6638 fi
6639
6640 test "$window_system" != "x11" && with_offix=no
6641 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6642   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6643   with_offix=no
6644 fi
6645 if test "$with_dragndrop" = no; then
6646   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6647   with_offix=no
6648 fi
6649 if test "$with_cde" = yes; then
6650   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6651   with_offix=no
6652 fi
6653 test -z "$with_offix" && with_offix=no
6654 if test "$with_offix" = "yes"; then
6655   { test "$extra_verbose" = "yes" && cat << \EOF
6656     Defining HAVE_OFFIX_DND
6657 EOF
6658 cat >> confdefs.h <<\EOF
6659 #define HAVE_OFFIX_DND 1
6660 EOF
6661 }
6662
6663   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6664   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6665 fi
6666
6667 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6668 echo "configure:6669: checking if drag and drop API is needed" >&5
6669 if test "$with_dragndrop" != "no" ; then
6670   if test -n "$dragndrop_proto" ; then
6671     with_dragndrop=yes
6672     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6673     { test "$extra_verbose" = "yes" && cat << \EOF
6674     Defining HAVE_DRAGNDROP
6675 EOF
6676 cat >> confdefs.h <<\EOF
6677 #define HAVE_DRAGNDROP 1
6678 EOF
6679 }
6680
6681     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6682   else
6683     with_dragndrop=no
6684     echo "$ac_t""no" 1>&6
6685   fi
6686 fi
6687
6688 echo "checking for LDAP" 1>&6
6689 echo "configure:6690: checking for LDAP" >&5
6690 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6691 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6692 echo "configure:6693: checking for ldap.h" >&5
6693
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 #include <ldap.h>
6698 EOF
6699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6700 { (eval echo configure:6701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6702 if test -z "$ac_err"; then
6703   rm -rf conftest*
6704   eval "ac_cv_header_$ac_safe=yes"
6705 else
6706   echo "$ac_err" >&5
6707   echo "configure: failed program was:" >&5
6708   cat conftest.$ac_ext >&5
6709   rm -rf conftest*
6710   eval "ac_cv_header_$ac_safe=no"
6711 fi
6712 rm -f conftest*
6713 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6714   echo "$ac_t""yes" 1>&6
6715   :
6716 else
6717   echo "$ac_t""no" 1>&6
6718 with_ldap=no
6719 fi
6720  }
6721 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6722 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6723 echo "configure:6724: checking for lber.h" >&5
6724
6725 cat > conftest.$ac_ext <<EOF
6726 #line 6727 "configure"
6727 #include "confdefs.h"
6728 #include <lber.h>
6729 EOF
6730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6731 { (eval echo configure:6732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6733 if test -z "$ac_err"; then
6734   rm -rf conftest*
6735   eval "ac_cv_header_$ac_safe=yes"
6736 else
6737   echo "$ac_err" >&5
6738   echo "configure: failed program was:" >&5
6739   cat conftest.$ac_ext >&5
6740   rm -rf conftest*
6741   eval "ac_cv_header_$ac_safe=no"
6742 fi
6743 rm -f conftest*
6744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746   :
6747 else
6748   echo "$ac_t""no" 1>&6
6749 with_ldap=no
6750 fi
6751  }
6752 if test "$with_ldap" != "no"; then
6753   
6754 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6755 echo "configure:6756: checking for ldap_search in -lldap" >&5
6756 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6757
6758 xe_check_libs=" -lldap "
6759 cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 /* We use char because int might match the return type of a gcc2
6764     builtin and then its argument prototype would still apply.  */
6765 char ldap_search();
6766
6767 int main() {
6768 ldap_search()
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_lib_$ac_lib_var=no"
6779 fi
6780 rm -f conftest*
6781 xe_check_libs=""
6782
6783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6784   echo "$ac_t""yes" 1>&6
6785   with_ldap_nolber=yes
6786 else
6787   echo "$ac_t""no" 1>&6
6788 with_ldap_nolber=no
6789 fi
6790
6791
6792   test "$with_ldap_nolber" = "no" && { 
6793 xe_msg_checking="for ldap_open in -lldap"
6794 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6795 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6796 echo "configure:6797: checking "$xe_msg_checking"" >&5
6797 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6798
6799 xe_check_libs=" -lldap -llber"
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char ldap_open();
6807
6808 int main() {
6809 ldap_open()
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=no"
6820 fi
6821 rm -f conftest*
6822 xe_check_libs=""
6823
6824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6825   echo "$ac_t""yes" 1>&6
6826   with_ldap_lber=yes
6827 else
6828   echo "$ac_t""no" 1>&6
6829 with_ldap_lber=no
6830 fi
6831
6832  }
6833   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6834 xe_msg_checking="for ldap_open in -lldap"
6835 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6836 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6837 echo "configure:6838: checking "$xe_msg_checking"" >&5
6838 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6839
6840 xe_check_libs=" -lldap -llber -lkrb"
6841 cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844 /* Override any gcc2 internal prototype to avoid an error.  */
6845 /* We use char because int might match the return type of a gcc2
6846     builtin and then its argument prototype would still apply.  */
6847 char ldap_open();
6848
6849 int main() {
6850 ldap_open()
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6854   rm -rf conftest*
6855   eval "ac_cv_lib_$ac_lib_var=yes"
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_lib_$ac_lib_var=no"
6861 fi
6862 rm -f conftest*
6863 xe_check_libs=""
6864
6865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6866   echo "$ac_t""yes" 1>&6
6867   with_ldap_krb=yes
6868 else
6869   echo "$ac_t""no" 1>&6
6870 with_ldap_krb=no
6871 fi
6872
6873  }
6874   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6875 xe_msg_checking="for ldap_open in -lldap"
6876 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6877 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6878 echo "configure:6879: checking "$xe_msg_checking"" >&5
6879 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6880
6881 xe_check_libs=" -lldap -llber -lkrb -ldes"
6882 cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885 /* Override any gcc2 internal prototype to avoid an error.  */
6886 /* We use char because int might match the return type of a gcc2
6887     builtin and then its argument prototype would still apply.  */
6888 char ldap_open();
6889
6890 int main() {
6891 ldap_open()
6892 ; return 0; }
6893 EOF
6894 if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6895   rm -rf conftest*
6896   eval "ac_cv_lib_$ac_lib_var=yes"
6897 else
6898   echo "configure: failed program was:" >&5
6899   cat conftest.$ac_ext >&5
6900   rm -rf conftest*
6901   eval "ac_cv_lib_$ac_lib_var=no"
6902 fi
6903 rm -f conftest*
6904 xe_check_libs=""
6905
6906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6907   echo "$ac_t""yes" 1>&6
6908   with_ldap_krbdes=yes
6909 else
6910   echo "$ac_t""no" 1>&6
6911 with_ldap_krbdes=no
6912 fi
6913
6914  }
6915   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
6916 fi
6917 if test "$with_ldap" = "yes"; then
6918   { test "$extra_verbose" = "yes" && cat << \EOF
6919     Defining HAVE_LDAP
6920 EOF
6921 cat >> confdefs.h <<\EOF
6922 #define HAVE_LDAP 1
6923 EOF
6924 }
6925
6926   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6927    echo "    xemacs will be linked with \"eldap.o\""
6928  fi
6929   if test "$with_ldap_nolber" = "yes" ; then
6930     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6931   else
6932     if test "$with_ldap_krb" = "yes" ; then
6933       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6934     fi
6935     if test "$with_ldap_krbdes" = "yes" ; then
6936       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6937       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6938     fi
6939     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6940     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6941   fi
6942   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6943 do
6944 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6945 echo "configure:6946: checking for $ac_func" >&5
6946
6947 cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 /* System header to define __stub macros and hopefully few prototypes,
6951     which can conflict with char $ac_func(); below.  */
6952 #include <assert.h>
6953 /* Override any gcc2 internal prototype to avoid an error.  */
6954 /* We use char because int might match the return type of a gcc2
6955     builtin and then its argument prototype would still apply.  */
6956 char $ac_func();
6957
6958 int main() {
6959
6960 /* The GNU C library defines this for functions which it implements
6961     to always fail with ENOSYS.  Some functions are actually named
6962     something starting with __ and the normal name is an alias.  */
6963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6964 choke me
6965 #else
6966 $ac_func();
6967 #endif
6968
6969 ; return 0; }
6970 EOF
6971 if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6972   rm -rf conftest*
6973   eval "ac_cv_func_$ac_func=yes"
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977   rm -rf conftest*
6978   eval "ac_cv_func_$ac_func=no"
6979 fi
6980 rm -f conftest*
6981
6982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6983   echo "$ac_t""yes" 1>&6
6984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6985   { test "$extra_verbose" = "yes" && cat << EOF
6986     Defining $ac_tr_func
6987 EOF
6988 cat >> confdefs.h <<EOF
6989 #define $ac_tr_func 1
6990 EOF
6991 }
6992  
6993 else
6994   echo "$ac_t""no" 1>&6
6995 fi
6996 done
6997
6998 fi
6999
7000
7001 if test "$window_system" != "none"; then
7002   echo "checking for graphics libraries" 1>&6
7003 echo "configure:7004: checking for graphics libraries" >&5
7004
7005     xpm_problem=""
7006   if test -z "$with_xpm"; then
7007     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7008 echo "configure:7009: checking for Xpm - no older than 3.4f" >&5
7009     xe_check_libs=-lXpm
7010     cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013 #include <X11/xpm.h>
7014     int main(int c, char **v) {
7015     return c == 1 ? 0 :
7016       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7017       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7020 then
7021   ./conftest dummy_arg; xpm_status=$?;
7022       if test "$xpm_status" = "0"; then
7023         with_xpm=yes;
7024       else
7025         with_xpm=no;
7026         if test "$xpm_status" = "1"; then
7027           xpm_problem="Xpm library version and header file version don't match!"
7028         elif test "$xpm_status" = "2"; then
7029           xpm_problem="Xpm library version is too old!"
7030         else
7031           xpm_problem="Internal xpm detection logic error!"
7032         fi
7033         echo "
7034 *** WARNING *** $xpm_problem
7035   I'm not touching that with a 10-foot pole!
7036   If you really want to use the installed version of Xpm, rerun
7037   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7038     fi
7039 else
7040   conftest_rc="$?"
7041   echo "configure: failed program was:" >&5
7042   cat conftest.$ac_ext >&5
7043   rm -fr conftest*
7044   with_xpm=no
7045 fi
7046 rm -fr conftest*
7047     xe_check_libs=
7048     echo "$ac_t""$with_xpm" 1>&6
7049   fi
7050   if test "$with_xpm" = "yes"; then
7051     { test "$extra_verbose" = "yes" && cat << \EOF
7052     Defining HAVE_XPM
7053 EOF
7054 cat >> confdefs.h <<\EOF
7055 #define HAVE_XPM 1
7056 EOF
7057 }
7058
7059     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7060     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7061 echo "configure:7062: checking for \"FOR_MSW\" xpm" >&5
7062     xe_check_libs=-lXpm
7063     cat > conftest.$ac_ext <<EOF
7064 #line 7065 "configure"
7065 #include "confdefs.h"
7066
7067 int main() {
7068 XpmCreatePixmapFromData()
7069 ; return 0; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7072   rm -rf conftest*
7073   xpm_for_msw=no
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -rf conftest*
7078   xpm_for_msw=yes
7079 fi
7080 rm -f conftest*
7081     xe_check_libs=
7082     echo "$ac_t""$xpm_for_msw" 1>&6
7083     if test "$xpm_for_msw" = "yes"; then
7084       { test "$extra_verbose" = "yes" && cat << \EOF
7085     Defining FOR_MSW
7086 EOF
7087 cat >> confdefs.h <<\EOF
7088 #define FOR_MSW 1
7089 EOF
7090 }
7091
7092     fi
7093   fi
7094
7095     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7096 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7097 echo "configure:7098: checking for compface.h" >&5
7098
7099 cat > conftest.$ac_ext <<EOF
7100 #line 7101 "configure"
7101 #include "confdefs.h"
7102 #include <compface.h>
7103 EOF
7104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7105 { (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7107 if test -z "$ac_err"; then
7108   rm -rf conftest*
7109   eval "ac_cv_header_$ac_safe=yes"
7110 else
7111   echo "$ac_err" >&5
7112   echo "configure: failed program was:" >&5
7113   cat conftest.$ac_ext >&5
7114   rm -rf conftest*
7115   eval "ac_cv_header_$ac_safe=no"
7116 fi
7117 rm -f conftest*
7118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7119   echo "$ac_t""yes" 1>&6
7120   :
7121 else
7122   echo "$ac_t""no" 1>&6
7123 with_xface=no
7124 fi
7125  }
7126   test -z "$with_xface" && { 
7127 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7128 echo "configure:7129: checking for UnGenFace in -lcompface" >&5
7129 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7130
7131 xe_check_libs=" -lcompface "
7132 cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char UnGenFace();
7139
7140 int main() {
7141 UnGenFace()
7142 ; return 0; }
7143 EOF
7144 if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7145   rm -rf conftest*
7146   eval "ac_cv_lib_$ac_lib_var=yes"
7147 else
7148   echo "configure: failed program was:" >&5
7149   cat conftest.$ac_ext >&5
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=no"
7152 fi
7153 rm -f conftest*
7154 xe_check_libs=""
7155
7156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7157   echo "$ac_t""yes" 1>&6
7158   : 
7159 else
7160   echo "$ac_t""no" 1>&6
7161 with_xface=no
7162 fi
7163
7164  }
7165   test -z "$with_xface" && with_xface=yes
7166   if test "$with_xface" = "yes"; then
7167     { test "$extra_verbose" = "yes" && cat << \EOF
7168     Defining HAVE_XFACE
7169 EOF
7170 cat >> confdefs.h <<\EOF
7171 #define HAVE_XFACE 1
7172 EOF
7173 }
7174
7175     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7176   fi
7177
7178         if test "$with_gif" != "no"; then
7179     with_gif="yes"
7180     { test "$extra_verbose" = "yes" && cat << \EOF
7181     Defining HAVE_GIF
7182 EOF
7183 cat >> confdefs.h <<\EOF
7184 #define HAVE_GIF 1
7185 EOF
7186 }
7187
7188     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7189    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7190  fi
7191   fi
7192
7193       if test "$with_png $with_tiff" != "no no"; then
7194     
7195 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7196 echo "configure:7197: checking for inflate in -lc" >&5
7197 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7198
7199 xe_check_libs=" -lc "
7200 cat > conftest.$ac_ext <<EOF
7201 #line 7202 "configure"
7202 #include "confdefs.h"
7203 /* Override any gcc2 internal prototype to avoid an error.  */
7204 /* We use char because int might match the return type of a gcc2
7205     builtin and then its argument prototype would still apply.  */
7206 char inflate();
7207
7208 int main() {
7209 inflate()
7210 ; return 0; }
7211 EOF
7212 if { (eval echo configure:7213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7213   rm -rf conftest*
7214   eval "ac_cv_lib_$ac_lib_var=yes"
7215 else
7216   echo "configure: failed program was:" >&5
7217   cat conftest.$ac_ext >&5
7218   rm -rf conftest*
7219   eval "ac_cv_lib_$ac_lib_var=no"
7220 fi
7221 rm -f conftest*
7222 xe_check_libs=""
7223
7224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7225   echo "$ac_t""yes" 1>&6
7226   :
7227 else
7228   echo "$ac_t""no" 1>&6
7229
7230 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7231 echo "configure:7232: checking for inflate in -lz" >&5
7232 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7233
7234 xe_check_libs=" -lz "
7235 cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 /* Override any gcc2 internal prototype to avoid an error.  */
7239 /* We use char because int might match the return type of a gcc2
7240     builtin and then its argument prototype would still apply.  */
7241 char inflate();
7242
7243 int main() {
7244 inflate()
7245 ; return 0; }
7246 EOF
7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7248   rm -rf conftest*
7249   eval "ac_cv_lib_$ac_lib_var=yes"
7250 else
7251   echo "configure: failed program was:" >&5
7252   cat conftest.$ac_ext >&5
7253   rm -rf conftest*
7254   eval "ac_cv_lib_$ac_lib_var=no"
7255 fi
7256 rm -f conftest*
7257 xe_check_libs=""
7258
7259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7260   echo "$ac_t""yes" 1>&6
7261   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7262 else
7263   echo "$ac_t""no" 1>&6
7264
7265 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7266 echo "configure:7267: checking for inflate in -lgz" >&5
7267 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7268
7269 xe_check_libs=" -lgz "
7270 cat > conftest.$ac_ext <<EOF
7271 #line 7272 "configure"
7272 #include "confdefs.h"
7273 /* Override any gcc2 internal prototype to avoid an error.  */
7274 /* We use char because int might match the return type of a gcc2
7275     builtin and then its argument prototype would still apply.  */
7276 char inflate();
7277
7278 int main() {
7279 inflate()
7280 ; return 0; }
7281 EOF
7282 if { (eval echo configure:7283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7283   rm -rf conftest*
7284   eval "ac_cv_lib_$ac_lib_var=yes"
7285 else
7286   echo "configure: failed program was:" >&5
7287   cat conftest.$ac_ext >&5
7288   rm -rf conftest*
7289   eval "ac_cv_lib_$ac_lib_var=no"
7290 fi
7291 rm -f conftest*
7292 xe_check_libs=""
7293
7294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7295   echo "$ac_t""yes" 1>&6
7296   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7297 else
7298   echo "$ac_t""no" 1>&6
7299 fi
7300
7301
7302 fi
7303
7304
7305 fi
7306
7307
7308   fi
7309
7310     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7311 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7312 echo "configure:7313: checking for jpeglib.h" >&5
7313
7314 cat > conftest.$ac_ext <<EOF
7315 #line 7316 "configure"
7316 #include "confdefs.h"
7317 #include <jpeglib.h>
7318 EOF
7319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7320 { (eval echo configure:7321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7322 if test -z "$ac_err"; then
7323   rm -rf conftest*
7324   eval "ac_cv_header_$ac_safe=yes"
7325 else
7326   echo "$ac_err" >&5
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   eval "ac_cv_header_$ac_safe=no"
7331 fi
7332 rm -f conftest*
7333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7334   echo "$ac_t""yes" 1>&6
7335   :
7336 else
7337   echo "$ac_t""no" 1>&6
7338 with_jpeg=no
7339 fi
7340  }
7341   test -z "$with_jpeg" && { 
7342 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7343 echo "configure:7344: checking for jpeg_destroy_decompress in -ljpeg" >&5
7344 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7345
7346 xe_check_libs=" -ljpeg "
7347 cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 /* Override any gcc2 internal prototype to avoid an error.  */
7351 /* We use char because int might match the return type of a gcc2
7352     builtin and then its argument prototype would still apply.  */
7353 char jpeg_destroy_decompress();
7354
7355 int main() {
7356 jpeg_destroy_decompress()
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_lib_$ac_lib_var=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_lib_$ac_lib_var=no"
7367 fi
7368 rm -f conftest*
7369 xe_check_libs=""
7370
7371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7372   echo "$ac_t""yes" 1>&6
7373   :
7374 else
7375   echo "$ac_t""no" 1>&6
7376 with_jpeg=no
7377 fi
7378
7379  }
7380   test -z "$with_jpeg" && with_jpeg=yes
7381   if test "$with_jpeg" = "yes"; then
7382     { test "$extra_verbose" = "yes" && cat << \EOF
7383     Defining HAVE_JPEG
7384 EOF
7385 cat >> confdefs.h <<\EOF
7386 #define HAVE_JPEG 1
7387 EOF
7388 }
7389
7390     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7391   fi
7392
7393     png_problem=""
7394   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7395 echo "configure:7396: checking for pow" >&5
7396
7397 cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 /* System header to define __stub macros and hopefully few prototypes,
7401     which can conflict with char pow(); below.  */
7402 #include <assert.h>
7403 /* Override any gcc2 internal prototype to avoid an error.  */
7404 /* We use char because int might match the return type of a gcc2
7405     builtin and then its argument prototype would still apply.  */
7406 char pow();
7407
7408 int main() {
7409
7410 /* The GNU C library defines this for functions which it implements
7411     to always fail with ENOSYS.  Some functions are actually named
7412     something starting with __ and the normal name is an alias.  */
7413 #if defined (__stub_pow) || defined (__stub___pow)
7414 choke me
7415 #else
7416 pow();
7417 #endif
7418
7419 ; return 0; }
7420 EOF
7421 if { (eval echo configure:7422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7422   rm -rf conftest*
7423   eval "ac_cv_func_pow=yes"
7424 else
7425   echo "configure: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   rm -rf conftest*
7428   eval "ac_cv_func_pow=no"
7429 fi
7430 rm -f conftest*
7431
7432 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434   :
7435 else
7436   echo "$ac_t""no" 1>&6
7437 with_png=no
7438 fi
7439  }
7440   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7441 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7442 echo "configure:7443: checking for png.h" >&5
7443
7444 cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 #include <png.h>
7448 EOF
7449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7450 { (eval echo configure:7451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7452 if test -z "$ac_err"; then
7453   rm -rf conftest*
7454   eval "ac_cv_header_$ac_safe=yes"
7455 else
7456   echo "$ac_err" >&5
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -rf conftest*
7460   eval "ac_cv_header_$ac_safe=no"
7461 fi
7462 rm -f conftest*
7463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7464   echo "$ac_t""yes" 1>&6
7465   :
7466 else
7467   echo "$ac_t""no" 1>&6
7468 with_png=no
7469 fi
7470  }
7471   test -z "$with_png" && { 
7472 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7473 echo "configure:7474: checking for png_read_image in -lpng" >&5
7474 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7475
7476 xe_check_libs=" -lpng "
7477 cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 /* Override any gcc2 internal prototype to avoid an error.  */
7481 /* We use char because int might match the return type of a gcc2
7482     builtin and then its argument prototype would still apply.  */
7483 char png_read_image();
7484
7485 int main() {
7486 png_read_image()
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   eval "ac_cv_lib_$ac_lib_var=yes"
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   eval "ac_cv_lib_$ac_lib_var=no"
7497 fi
7498 rm -f conftest*
7499 xe_check_libs=""
7500
7501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7502   echo "$ac_t""yes" 1>&6
7503   :
7504 else
7505   echo "$ac_t""no" 1>&6
7506 with_png=no
7507 fi
7508
7509  }
7510   if test -z "$with_png"; then
7511     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7512 echo "configure:7513: checking for workable png version information" >&5
7513     xe_check_libs="-lpng -lz"
7514     cat > conftest.$ac_ext <<EOF
7515 #line 7516 "configure"
7516 #include "confdefs.h"
7517 #include <png.h>
7518     int main(int c, char **v) {
7519     if (c == 1) return 0;
7520     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7521     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7522 EOF
7523 if { (eval echo configure:7524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7524 then
7525   ./conftest dummy_arg; png_status=$?;
7526       if test "$png_status" = "0"; then
7527         with_png=yes;
7528       else
7529         with_png=no;
7530         if test "$png_status" = "1"; then
7531           png_problem="PNG library version and header file don't match!"
7532         elif test "$png_status" = "2"; then
7533           png_problem="PNG library version too old (pre 1.0.2)!"
7534         fi
7535         echo "
7536 *** WARNING *** $png_problem
7537   I'm not touching that with a 10-foot pole!
7538   If you really want to use the installed version of libPNG, rerun
7539   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7540     fi
7541 else
7542   conftest_rc="$?"
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -fr conftest*
7546   with_png=no
7547 fi
7548 rm -fr conftest*
7549     xe_check_libs=
7550     echo "$ac_t""$with_png" 1>&6
7551   fi
7552   if test "$with_png" = "yes"; then
7553     { test "$extra_verbose" = "yes" && cat << \EOF
7554     Defining HAVE_PNG
7555 EOF
7556 cat >> confdefs.h <<\EOF
7557 #define HAVE_PNG 1
7558 EOF
7559 }
7560
7561     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7562   fi
7563
7564     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7565 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7566 echo "configure:7567: checking for tiffio.h" >&5
7567
7568 cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 #include <tiffio.h>
7572 EOF
7573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7574 { (eval echo configure:7575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7576 if test -z "$ac_err"; then
7577   rm -rf conftest*
7578   eval "ac_cv_header_$ac_safe=yes"
7579 else
7580   echo "$ac_err" >&5
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_header_$ac_safe=no"
7585 fi
7586 rm -f conftest*
7587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7588   echo "$ac_t""yes" 1>&6
7589   :
7590 else
7591   echo "$ac_t""no" 1>&6
7592 with_tiff=no
7593 fi
7594  }
7595   test -z "$with_tiff" && { 
7596 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7597 echo "configure:7598: checking for TIFFClientOpen in -ltiff" >&5
7598 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7599
7600 xe_check_libs=" -ltiff "
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604 /* Override any gcc2 internal prototype to avoid an error.  */
7605 /* We use char because int might match the return type of a gcc2
7606     builtin and then its argument prototype would still apply.  */
7607 char TIFFClientOpen();
7608
7609 int main() {
7610 TIFFClientOpen()
7611 ; return 0; }
7612 EOF
7613 if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7614   rm -rf conftest*
7615   eval "ac_cv_lib_$ac_lib_var=yes"
7616 else
7617   echo "configure: failed program was:" >&5
7618   cat conftest.$ac_ext >&5
7619   rm -rf conftest*
7620   eval "ac_cv_lib_$ac_lib_var=no"
7621 fi
7622 rm -f conftest*
7623 xe_check_libs=""
7624
7625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7626   echo "$ac_t""yes" 1>&6
7627   :
7628 else
7629   echo "$ac_t""no" 1>&6
7630 with_tiff=no
7631 fi
7632
7633  }
7634   test -z "$with_tiff" && with_tiff=yes
7635   if test "$with_tiff" = "yes"; then
7636     { test "$extra_verbose" = "yes" && cat << \EOF
7637     Defining HAVE_TIFF
7638 EOF
7639 cat >> confdefs.h <<\EOF
7640 #define HAVE_TIFF 1
7641 EOF
7642 }
7643
7644     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7645   fi
7646 fi
7647
7648
7649 if test "$with_x11" = "yes"; then
7650
7651   echo "checking for X11 graphics libraries" 1>&6
7652 echo "configure:7653: checking for X11 graphics libraries" >&5
7653
7654   echo "checking for the Athena widgets" 1>&6
7655 echo "configure:7656: checking for the Athena widgets" >&5
7656
7657     case "$with_athena" in
7658         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7659     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7660     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7661     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7662     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7663     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7664   esac
7665
7666     if test "$athena_3d" = "no"; then
7667     
7668 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7669 echo "configure:7670: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7670 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7671
7672 xe_check_libs=" -l$athena_variant "
7673 cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7676 /* Override any gcc2 internal prototype to avoid an error.  */
7677 /* We use char because int might match the return type of a gcc2
7678     builtin and then its argument prototype would still apply.  */
7679 char XawScrollbarSetThumb();
7680
7681 int main() {
7682 XawScrollbarSetThumb()
7683 ; return 0; }
7684 EOF
7685 if { (eval echo configure:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7686   rm -rf conftest*
7687   eval "ac_cv_lib_$ac_lib_var=yes"
7688 else
7689   echo "configure: failed program was:" >&5
7690   cat conftest.$ac_ext >&5
7691   rm -rf conftest*
7692   eval "ac_cv_lib_$ac_lib_var=no"
7693 fi
7694 rm -f conftest*
7695 xe_check_libs=""
7696
7697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7698   echo "$ac_t""yes" 1>&6
7699           
7700 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7701 echo "configure:7702: checking for threeDClassRec in -l$athena_variant" >&5
7702 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7703
7704 xe_check_libs=" -l$athena_variant "
7705 cat > conftest.$ac_ext <<EOF
7706 #line 7707 "configure"
7707 #include "confdefs.h"
7708 /* Override any gcc2 internal prototype to avoid an error.  */
7709 /* We use char because int might match the return type of a gcc2
7710     builtin and then its argument prototype would still apply.  */
7711 char threeDClassRec();
7712
7713 int main() {
7714 threeDClassRec()
7715 ; return 0; }
7716 EOF
7717 if { (eval echo configure:7718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7718   rm -rf conftest*
7719   eval "ac_cv_lib_$ac_lib_var=yes"
7720 else
7721   echo "configure: failed program was:" >&5
7722   cat conftest.$ac_ext >&5
7723   rm -rf conftest*
7724   eval "ac_cv_lib_$ac_lib_var=no"
7725 fi
7726 rm -f conftest*
7727 xe_check_libs=""
7728
7729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7730   echo "$ac_t""yes" 1>&6
7731   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7732 else
7733   echo "$ac_t""no" 1>&6
7734 athena_lib=$athena_variant
7735 fi
7736
7737
7738       
7739 else
7740   echo "$ac_t""no" 1>&6
7741 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7742 fi
7743
7744
7745   else
7746         
7747 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7748 echo "configure:7749: checking for threeDClassRec in -l$athena_variant" >&5
7749 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7750
7751 xe_check_libs=" -l$athena_variant "
7752 cat > conftest.$ac_ext <<EOF
7753 #line 7754 "configure"
7754 #include "confdefs.h"
7755 /* Override any gcc2 internal prototype to avoid an error.  */
7756 /* We use char because int might match the return type of a gcc2
7757     builtin and then its argument prototype would still apply.  */
7758 char threeDClassRec();
7759
7760 int main() {
7761 threeDClassRec()
7762 ; return 0; }
7763 EOF
7764 if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7765   rm -rf conftest*
7766   eval "ac_cv_lib_$ac_lib_var=yes"
7767 else
7768   echo "configure: failed program was:" >&5
7769   cat conftest.$ac_ext >&5
7770   rm -rf conftest*
7771   eval "ac_cv_lib_$ac_lib_var=no"
7772 fi
7773 rm -f conftest*
7774 xe_check_libs=""
7775
7776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7777   echo "$ac_t""yes" 1>&6
7778   athena_lib=$athena_variant
7779 else
7780   echo "$ac_t""no" 1>&6
7781 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7782 echo "configure:7783: checking for threeDClassRec in -lXaw" >&5
7783 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7784
7785 xe_check_libs=" -lXaw "
7786 cat > conftest.$ac_ext <<EOF
7787 #line 7788 "configure"
7788 #include "confdefs.h"
7789 /* Override any gcc2 internal prototype to avoid an error.  */
7790 /* We use char because int might match the return type of a gcc2
7791     builtin and then its argument prototype would still apply.  */
7792 char threeDClassRec();
7793
7794 int main() {
7795 threeDClassRec()
7796 ; return 0; }
7797 EOF
7798 if { (eval echo configure:7799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7799   rm -rf conftest*
7800   eval "ac_cv_lib_$ac_lib_var=yes"
7801 else
7802   echo "configure: failed program was:" >&5
7803   cat conftest.$ac_ext >&5
7804   rm -rf conftest*
7805   eval "ac_cv_lib_$ac_lib_var=no"
7806 fi
7807 rm -f conftest*
7808 xe_check_libs=""
7809
7810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7811   echo "$ac_t""yes" 1>&6
7812   athena_lib=Xaw;
7813           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7814         
7815 else
7816   echo "$ac_t""no" 1>&6
7817 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7818 fi
7819
7820
7821 fi
7822
7823
7824   fi
7825
7826     if test "$athena_3d" = "no"; then
7827     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7828 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7829 echo "configure:7830: checking for X11/Xaw/ThreeD.h" >&5
7830
7831 cat > conftest.$ac_ext <<EOF
7832 #line 7833 "configure"
7833 #include "confdefs.h"
7834 #include <X11/Xaw/ThreeD.h>
7835 EOF
7836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7837 { (eval echo configure:7838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7839 if test -z "$ac_err"; then
7840   rm -rf conftest*
7841   eval "ac_cv_header_$ac_safe=yes"
7842 else
7843   echo "$ac_err" >&5
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   eval "ac_cv_header_$ac_safe=no"
7848 fi
7849 rm -f conftest*
7850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7851   echo "$ac_t""yes" 1>&6
7852   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7853 else
7854   echo "$ac_t""no" 1>&6
7855 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7856 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7857 echo "configure:7858: checking for X11/Xaw/XawInit.h" >&5
7858
7859 cat > conftest.$ac_ext <<EOF
7860 #line 7861 "configure"
7861 #include "confdefs.h"
7862 #include <X11/Xaw/XawInit.h>
7863 EOF
7864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7865 { (eval echo configure:7866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7867 if test -z "$ac_err"; then
7868   rm -rf conftest*
7869   eval "ac_cv_header_$ac_safe=yes"
7870 else
7871   echo "$ac_err" >&5
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   eval "ac_cv_header_$ac_safe=no"
7876 fi
7877 rm -f conftest*
7878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7879   echo "$ac_t""yes" 1>&6
7880   athena_h_path=X11/Xaw
7881 else
7882   echo "$ac_t""no" 1>&6
7883 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7884 fi
7885
7886 fi
7887
7888   else
7889             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7890 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7891 echo "configure:7892: checking for X11/$athena_variant/XawInit.h" >&5
7892
7893 cat > conftest.$ac_ext <<EOF
7894 #line 7895 "configure"
7895 #include "confdefs.h"
7896 #include <X11/$athena_variant/XawInit.h>
7897 EOF
7898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7899 { (eval echo configure:7900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7901 if test -z "$ac_err"; then
7902   rm -rf conftest*
7903   eval "ac_cv_header_$ac_safe=yes"
7904 else
7905   echo "$ac_err" >&5
7906   echo "configure: failed program was:" >&5
7907   cat conftest.$ac_ext >&5
7908   rm -rf conftest*
7909   eval "ac_cv_header_$ac_safe=no"
7910 fi
7911 rm -f conftest*
7912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7913   echo "$ac_t""yes" 1>&6
7914   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7915 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7916 echo "configure:7917: checking for X11/$athena_variant/ThreeD.h" >&5
7917
7918 cat > conftest.$ac_ext <<EOF
7919 #line 7920 "configure"
7920 #include "confdefs.h"
7921 #include <X11/$athena_variant/ThreeD.h>
7922 EOF
7923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7924 { (eval echo configure:7925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7926 if test -z "$ac_err"; then
7927   rm -rf conftest*
7928   eval "ac_cv_header_$ac_safe=yes"
7929 else
7930   echo "$ac_err" >&5
7931   echo "configure: failed program was:" >&5
7932   cat conftest.$ac_ext >&5
7933   rm -rf conftest*
7934   eval "ac_cv_header_$ac_safe=no"
7935 fi
7936 rm -f conftest*
7937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7938   echo "$ac_t""yes" 1>&6
7939   athena_h_path=X11/$athena_variant
7940 else
7941   echo "$ac_t""no" 1>&6
7942 fi
7943
7944 else
7945   echo "$ac_t""no" 1>&6
7946 fi
7947
7948
7949         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
7950       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
7951 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
7952 echo "configure:7953: checking for X11/Xaw3d/XawInit.h" >&5
7953
7954 cat > conftest.$ac_ext <<EOF
7955 #line 7956 "configure"
7956 #include "confdefs.h"
7957 #include <X11/Xaw3d/XawInit.h>
7958 EOF
7959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7960 { (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7962 if test -z "$ac_err"; then
7963   rm -rf conftest*
7964   eval "ac_cv_header_$ac_safe=yes"
7965 else
7966   echo "$ac_err" >&5
7967   echo "configure: failed program was:" >&5
7968   cat conftest.$ac_ext >&5
7969   rm -rf conftest*
7970   eval "ac_cv_header_$ac_safe=no"
7971 fi
7972 rm -f conftest*
7973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
7976 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
7977 echo "configure:7978: checking for X11/Xaw3d/ThreeD.h" >&5
7978
7979 cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <X11/Xaw3d/ThreeD.h>
7983 EOF
7984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7985 { (eval echo configure:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7987 if test -z "$ac_err"; then
7988   rm -rf conftest*
7989   eval "ac_cv_header_$ac_safe=yes"
7990 else
7991   echo "$ac_err" >&5
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995   eval "ac_cv_header_$ac_safe=no"
7996 fi
7997 rm -f conftest*
7998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7999   echo "$ac_t""yes" 1>&6
8000   
8001             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8002             athena_h_path=X11/Xaw3d
8003           
8004 else
8005   echo "$ac_t""no" 1>&6
8006 fi
8007
8008 else
8009   echo "$ac_t""no" 1>&6
8010 fi
8011
8012     fi
8013
8014             if test -z "$athena_h_path"; then
8015       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8016 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8017 echo "configure:8018: checking for X11/Xaw/ThreeD.h" >&5
8018
8019 cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 #include <X11/Xaw/ThreeD.h>
8023 EOF
8024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8025 { (eval echo configure:8026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8027 if test -z "$ac_err"; then
8028   rm -rf conftest*
8029   eval "ac_cv_header_$ac_safe=yes"
8030 else
8031   echo "$ac_err" >&5
8032   echo "configure: failed program was:" >&5
8033   cat conftest.$ac_ext >&5
8034   rm -rf conftest*
8035   eval "ac_cv_header_$ac_safe=no"
8036 fi
8037 rm -f conftest*
8038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8039   echo "$ac_t""yes" 1>&6
8040   
8041           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8042           athena_h_path=X11/Xaw
8043         
8044 else
8045   echo "$ac_t""no" 1>&6
8046 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8047 fi
8048
8049     fi
8050   fi
8051
8052     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8053     have_xaw=yes
8054   else
8055     have_xaw=no
8056   fi
8057
8058     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8059 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8060 echo "configure:8061: checking for Xm/Xm.h" >&5
8061
8062 cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 #include <Xm/Xm.h>
8066 EOF
8067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8068 { (eval echo configure:8069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8070 if test -z "$ac_err"; then
8071   rm -rf conftest*
8072   eval "ac_cv_header_$ac_safe=yes"
8073 else
8074   echo "$ac_err" >&5
8075   echo "configure: failed program was:" >&5
8076   cat conftest.$ac_ext >&5
8077   rm -rf conftest*
8078   eval "ac_cv_header_$ac_safe=no"
8079 fi
8080 rm -f conftest*
8081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8082   echo "$ac_t""yes" 1>&6
8083   
8084 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8085 echo "configure:8086: checking for XmStringFree in -lXm" >&5
8086 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8087
8088 xe_check_libs=" -lXm "
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 /* Override any gcc2 internal prototype to avoid an error.  */
8093 /* We use char because int might match the return type of a gcc2
8094     builtin and then its argument prototype would still apply.  */
8095 char XmStringFree();
8096
8097 int main() {
8098 XmStringFree()
8099 ; return 0; }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=yes"
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=no"
8109 fi
8110 rm -f conftest*
8111 xe_check_libs=""
8112
8113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8114   echo "$ac_t""yes" 1>&6
8115   have_motif=yes
8116 else
8117   echo "$ac_t""no" 1>&6
8118 have_motif=no
8119 fi
8120
8121
8122 else
8123   echo "$ac_t""no" 1>&6
8124 have_motif=no
8125 fi
8126
8127
8128   if test "$have_motif" = "yes"; then
8129         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8130 echo "configure:8131: checking for Lesstif" >&5
8131     cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 #include <Xm/Xm.h>
8135 #ifdef LESSTIF_VERSION
8136 yes
8137 #endif
8138
8139 EOF
8140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8141   egrep "yes" >/dev/null 2>&1; then
8142   rm -rf conftest*
8143   have_lesstif=yes
8144 else
8145   rm -rf conftest*
8146   have_lesstif=no
8147 fi
8148 rm -f conftest*
8149
8150   echo "$ac_t""$have_lesstif" 1>&6
8151   fi
8152
8153 fi 
8154
8155 case "$with_menubars" in "" | "yes" | "athena" )
8156   with_menubars="lucid" ;;
8157 esac
8158 case "$with_dialogs" in "" | "yes" | "lucid" )
8159   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8160   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8161   else with_dialogs=no
8162   fi ;;
8163 esac
8164 case "$with_scrollbars" in "" | "yes" )
8165   with_scrollbars="lucid" ;;
8166 esac
8167 case "$with_widgets" in "" | "yes" | "lucid")
8168   if   test "$have_motif" = "yes"; then with_widgets="motif"
8169   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8170   else with_widgets=no
8171   fi ;;
8172 esac
8173
8174 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8175
8176 case "$all_widgets" in
8177   *athena* )
8178     if test "$have_xaw" != "yes"; then
8179       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8180     fi
8181
8182         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8183
8184         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8185
8186             { test "$extra_verbose" = "yes" && cat << EOF
8187     Defining ATHENA_H_PATH = $athena_h_path
8188 EOF
8189 cat >> confdefs.h <<EOF
8190 #define ATHENA_H_PATH $athena_h_path
8191 EOF
8192 }
8193
8194
8195     { test "$extra_verbose" = "yes" && cat << \EOF
8196     Defining LWLIB_USES_ATHENA
8197 EOF
8198 cat >> confdefs.h <<\EOF
8199 #define LWLIB_USES_ATHENA 1
8200 EOF
8201 }
8202
8203     { test "$extra_verbose" = "yes" && cat << \EOF
8204     Defining NEED_ATHENA
8205 EOF
8206 cat >> confdefs.h <<\EOF
8207 #define NEED_ATHENA 1
8208 EOF
8209 }
8210
8211
8212     if test "$athena_3d" = "yes"; then
8213       { test "$extra_verbose" = "yes" && cat << \EOF
8214     Defining HAVE_ATHENA_3D
8215 EOF
8216 cat >> confdefs.h <<\EOF
8217 #define HAVE_ATHENA_3D 1
8218 EOF
8219 }
8220
8221     fi
8222   ;;
8223 esac
8224
8225 case "$all_widgets" in *motif* )
8226   { test "$extra_verbose" = "yes" && cat << \EOF
8227     Defining LWLIB_USES_MOTIF
8228 EOF
8229 cat >> confdefs.h <<\EOF
8230 #define LWLIB_USES_MOTIF 1
8231 EOF
8232 }
8233
8234   { test "$extra_verbose" = "yes" && cat << \EOF
8235     Defining NEED_MOTIF
8236 EOF
8237 cat >> confdefs.h <<\EOF
8238 #define NEED_MOTIF 1
8239 EOF
8240 }
8241
8242   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8243   need_motif=yes ;;
8244 esac
8245
8246 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8247 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8248 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8249 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8250         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8251 case "$with_widgets" in athena* )
8252         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;;
8253 esac
8254 case "$all_widgets" in *lucid* )
8255   { test "$extra_verbose" = "yes" && cat << \EOF
8256     Defining NEED_LUCID
8257 EOF
8258 cat >> confdefs.h <<\EOF
8259 #define NEED_LUCID 1
8260 EOF
8261 }
8262
8263   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8264 esac
8265
8266
8267
8268 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8269     Defining LWLIB_SCROLLBARS_ATHENA
8270 EOF
8271 cat >> confdefs.h <<\EOF
8272 #define LWLIB_SCROLLBARS_ATHENA 1
8273 EOF
8274 }
8275
8276 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8277     Defining LWLIB_DIALOGS_ATHENA
8278 EOF
8279 cat >> confdefs.h <<\EOF
8280 #define LWLIB_DIALOGS_ATHENA 1
8281 EOF
8282 }
8283
8284
8285 if test "$athena_3d" = "yes"; then
8286   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8287     Defining LWLIB_SCROLLBARS_ATHENA3D
8288 EOF
8289 cat >> confdefs.h <<\EOF
8290 #define LWLIB_SCROLLBARS_ATHENA3D 1
8291 EOF
8292 }
8293
8294   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8295     Defining LWLIB_DIALOGS_ATHENA3D
8296 EOF
8297 cat >> confdefs.h <<\EOF
8298 #define LWLIB_DIALOGS_ATHENA3D 1
8299 EOF
8300 }
8301
8302 fi
8303
8304 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8305     Defining LWLIB_WIDGETS_ATHENA
8306 EOF
8307 cat >> confdefs.h <<\EOF
8308 #define LWLIB_WIDGETS_ATHENA 1
8309 EOF
8310 }
8311 ;; esac
8312 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8313         { test "$extra_verbose" = "yes" && cat << \EOF
8314     Defining LWLIB_TABS_LUCID
8315 EOF
8316 cat >> confdefs.h <<\EOF
8317 #define LWLIB_TABS_LUCID 1
8318 EOF
8319 }
8320
8321
8322 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8323     Defining HAVE_MENUBARS
8324 EOF
8325 cat >> confdefs.h <<\EOF
8326 #define HAVE_MENUBARS 1
8327 EOF
8328 }
8329
8330 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8331     Defining HAVE_SCROLLBARS
8332 EOF
8333 cat >> confdefs.h <<\EOF
8334 #define HAVE_SCROLLBARS 1
8335 EOF
8336 }
8337
8338 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8339     Defining HAVE_DIALOGS
8340 EOF
8341 cat >> confdefs.h <<\EOF
8342 #define HAVE_DIALOGS 1
8343 EOF
8344 }
8345
8346 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8347     Defining HAVE_TOOLBARS
8348 EOF
8349 cat >> confdefs.h <<\EOF
8350 #define HAVE_TOOLBARS 1
8351 EOF
8352 }
8353
8354 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8355     Defining HAVE_WIDGETS
8356 EOF
8357 cat >> confdefs.h <<\EOF
8358 #define HAVE_WIDGETS 1
8359 EOF
8360 }
8361
8362
8363 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8364     Defining LWLIB_MENUBARS_LUCID
8365 EOF
8366 cat >> confdefs.h <<\EOF
8367 #define LWLIB_MENUBARS_LUCID 1
8368 EOF
8369 }
8370
8371 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8372     Defining LWLIB_SCROLLBARS_LUCID
8373 EOF
8374 cat >> confdefs.h <<\EOF
8375 #define LWLIB_SCROLLBARS_LUCID 1
8376 EOF
8377 }
8378
8379
8380 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8381     Defining LWLIB_MENUBARS_MOTIF
8382 EOF
8383 cat >> confdefs.h <<\EOF
8384 #define LWLIB_MENUBARS_MOTIF 1
8385 EOF
8386 }
8387
8388 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8389     Defining LWLIB_SCROLLBARS_MOTIF
8390 EOF
8391 cat >> confdefs.h <<\EOF
8392 #define LWLIB_SCROLLBARS_MOTIF 1
8393 EOF
8394 }
8395
8396 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8397     Defining LWLIB_DIALOGS_MOTIF
8398 EOF
8399 cat >> confdefs.h <<\EOF
8400 #define LWLIB_DIALOGS_MOTIF 1
8401 EOF
8402 }
8403
8404 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8405     Defining LWLIB_WIDGETS_MOTIF
8406 EOF
8407 cat >> confdefs.h <<\EOF
8408 #define LWLIB_WIDGETS_MOTIF 1
8409 EOF
8410 }
8411
8412
8413 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8414    echo "    xemacs will be linked with \"menubar.o\""
8415  fi
8416 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8417    echo "    xemacs will be linked with \"scrollbar.o\""
8418  fi
8419 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8420    echo "    xemacs will be linked with \"dialog.o\""
8421  fi
8422 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8423    echo "    xemacs will be linked with \"toolbar.o\""
8424  fi
8425
8426 if test "$with_x11" = "yes"; then
8427   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8428    echo "    xemacs will be linked with \"menubar-x.o\""
8429  fi
8430   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8431    echo "    xemacs will be linked with \"scrollbar-x.o\""
8432  fi
8433   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8434    echo "    xemacs will be linked with \"dialog-x.o\""
8435  fi
8436   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8437    echo "    xemacs will be linked with \"toolbar-x.o\""
8438  fi
8439   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8440    echo "    xemacs will be linked with \"gui-x.o\""
8441  fi
8442 fi
8443
8444
8445 test -z "$with_mule" && with_mule=no
8446 test -z "$with_file_coding" && with_file_coding=no
8447
8448
8449 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8450   { test "$extra_verbose" = "yes" && cat << \EOF
8451     Defining FILE_CODING
8452 EOF
8453 cat >> confdefs.h <<\EOF
8454 #define FILE_CODING 1
8455 EOF
8456 }
8457
8458   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8459    echo "    xemacs will be linked with \"file-coding.o\""
8460  fi
8461 fi
8462
8463 if test "$with_mule" = "yes" ; then
8464   echo "checking for Mule-related features" 1>&6
8465 echo "configure:8466: checking for Mule-related features" >&5
8466   { test "$extra_verbose" = "yes" && cat << \EOF
8467     Defining MULE
8468 EOF
8469 cat >> confdefs.h <<\EOF
8470 #define MULE 1
8471 EOF
8472 }
8473
8474   { test "$extra_verbose" = "yes" && cat << \EOF
8475     Defining FILE_CODING
8476 EOF
8477 cat >> confdefs.h <<\EOF
8478 #define FILE_CODING 1
8479 EOF
8480 }
8481
8482   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8483    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8484  fi
8485
8486     for ac_hdr in libintl.h
8487 do
8488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8490 echo "configure:8491: checking for $ac_hdr" >&5
8491
8492 cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <$ac_hdr>
8496 EOF
8497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8498 { (eval echo configure:8499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8500 if test -z "$ac_err"; then
8501   rm -rf conftest*
8502   eval "ac_cv_header_$ac_safe=yes"
8503 else
8504   echo "$ac_err" >&5
8505   echo "configure: failed program was:" >&5
8506   cat conftest.$ac_ext >&5
8507   rm -rf conftest*
8508   eval "ac_cv_header_$ac_safe=no"
8509 fi
8510 rm -f conftest*
8511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8512   echo "$ac_t""yes" 1>&6
8513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8514   { test "$extra_verbose" = "yes" && cat << EOF
8515     Defining $ac_tr_hdr
8516 EOF
8517 cat >> confdefs.h <<EOF
8518 #define $ac_tr_hdr 1
8519 EOF
8520 }
8521  
8522 else
8523   echo "$ac_t""no" 1>&6
8524 fi
8525 done
8526
8527   
8528 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8529 echo "configure:8530: checking for strerror in -lintl" >&5
8530 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8531
8532 xe_check_libs=" -lintl "
8533 cat > conftest.$ac_ext <<EOF
8534 #line 8535 "configure"
8535 #include "confdefs.h"
8536 /* Override any gcc2 internal prototype to avoid an error.  */
8537 /* We use char because int might match the return type of a gcc2
8538     builtin and then its argument prototype would still apply.  */
8539 char strerror();
8540
8541 int main() {
8542 strerror()
8543 ; return 0; }
8544 EOF
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8546   rm -rf conftest*
8547   eval "ac_cv_lib_$ac_lib_var=yes"
8548 else
8549   echo "configure: failed program was:" >&5
8550   cat conftest.$ac_ext >&5
8551   rm -rf conftest*
8552   eval "ac_cv_lib_$ac_lib_var=no"
8553 fi
8554 rm -f conftest*
8555 xe_check_libs=""
8556
8557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8558   echo "$ac_t""yes" 1>&6
8559     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8560     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8561   { test "$extra_verbose" = "yes" && cat << EOF
8562     Defining $ac_tr_lib
8563 EOF
8564 cat >> confdefs.h <<EOF
8565 #define $ac_tr_lib 1
8566 EOF
8567 }
8568
8569   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8570
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574
8575
8576
8577   echo "checking for Mule input methods" 1>&6
8578 echo "configure:8579: checking for Mule input methods" >&5
8579         case "$with_xim" in "" | "yes" )
8580     echo "checking for XIM" 1>&6
8581 echo "configure:8582: checking for XIM" >&5
8582     
8583 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8584 echo "configure:8585: checking for XOpenIM in -lX11" >&5
8585 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8586
8587 xe_check_libs=" -lX11 "
8588 cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 /* Override any gcc2 internal prototype to avoid an error.  */
8592 /* We use char because int might match the return type of a gcc2
8593     builtin and then its argument prototype would still apply.  */
8594 char XOpenIM();
8595
8596 int main() {
8597 XOpenIM()
8598 ; return 0; }
8599 EOF
8600 if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8601   rm -rf conftest*
8602   eval "ac_cv_lib_$ac_lib_var=yes"
8603 else
8604   echo "configure: failed program was:" >&5
8605   cat conftest.$ac_ext >&5
8606   rm -rf conftest*
8607   eval "ac_cv_lib_$ac_lib_var=no"
8608 fi
8609 rm -f conftest*
8610 xe_check_libs=""
8611
8612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8613   echo "$ac_t""yes" 1>&6
8614   with_xim=xlib
8615 else
8616   echo "$ac_t""no" 1>&6
8617 with_xim=no
8618 fi
8619
8620
8621         if test "$have_motif $have_lesstif" = "yes no"; then
8622       
8623 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8624 echo "configure:8625: checking for XmImMbLookupString in -lXm" >&5
8625 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8626
8627 xe_check_libs=" -lXm "
8628 cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 /* Override any gcc2 internal prototype to avoid an error.  */
8632 /* We use char because int might match the return type of a gcc2
8633     builtin and then its argument prototype would still apply.  */
8634 char XmImMbLookupString();
8635
8636 int main() {
8637 XmImMbLookupString()
8638 ; return 0; }
8639 EOF
8640 if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8641   rm -rf conftest*
8642   eval "ac_cv_lib_$ac_lib_var=yes"
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=no"
8648 fi
8649 rm -f conftest*
8650 xe_check_libs=""
8651
8652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8653   echo "$ac_t""yes" 1>&6
8654   with_xim=motif
8655 else
8656   echo "$ac_t""no" 1>&6
8657 fi
8658
8659
8660     fi ;;
8661   esac
8662   if test "$with_xim" != "no"; then
8663     { test "$extra_verbose" = "yes" && cat << \EOF
8664     Defining HAVE_XIM
8665 EOF
8666 cat >> confdefs.h <<\EOF
8667 #define HAVE_XIM 1
8668 EOF
8669 }
8670
8671     if test "$with_xim" = "xlib"; then
8672       { test "$extra_verbose" = "yes" && cat << \EOF
8673     Defining XIM_XLIB
8674 EOF
8675 cat >> confdefs.h <<\EOF
8676 #define XIM_XLIB 1
8677 EOF
8678 }
8679
8680       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8681    echo "    xemacs will be linked with \"input-method-xlib.o\""
8682  fi
8683     fi
8684     if test "$with_xim" = "motif"; then
8685       { test "$extra_verbose" = "yes" && cat << \EOF
8686     Defining XIM_MOTIF
8687 EOF
8688 cat >> confdefs.h <<\EOF
8689 #define XIM_MOTIF 1
8690 EOF
8691 }
8692
8693       need_motif=yes
8694       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8695    echo "    xemacs will be linked with \"input-method-motif.o\""
8696  fi
8697     fi
8698     if test "$with_xim" = "motif"; then
8699       with_xfs=no
8700     fi
8701   fi
8702
8703     if test "$with_xfs" = "yes" ; then
8704     echo "checking for XFontSet" 1>&6
8705 echo "configure:8706: checking for XFontSet" >&5
8706     
8707 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8708 echo "configure:8709: checking for XmbDrawString in -lX11" >&5
8709 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8710
8711 xe_check_libs=" -lX11 "
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 /* Override any gcc2 internal prototype to avoid an error.  */
8716 /* We use char because int might match the return type of a gcc2
8717     builtin and then its argument prototype would still apply.  */
8718 char XmbDrawString();
8719
8720 int main() {
8721 XmbDrawString()
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   eval "ac_cv_lib_$ac_lib_var=yes"
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   eval "ac_cv_lib_$ac_lib_var=no"
8732 fi
8733 rm -f conftest*
8734 xe_check_libs=""
8735
8736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8737   echo "$ac_t""yes" 1>&6
8738   :
8739 else
8740   echo "$ac_t""no" 1>&6
8741 with_xfs=no
8742 fi
8743
8744
8745     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8746       { test "$extra_verbose" = "yes" && cat << \EOF
8747     Defining USE_XFONTSET
8748 EOF
8749 cat >> confdefs.h <<\EOF
8750 #define USE_XFONTSET 1
8751 EOF
8752 }
8753
8754       if test "$with_xim" = "no" ; then
8755         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8756    echo "    xemacs will be linked with \"input-method-xfs.o\""
8757  fi
8758       fi
8759     fi
8760   fi 
8761     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8762   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8763 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8764 echo "configure:8765: checking for wnn/jllib.h" >&5
8765
8766 cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <wnn/jllib.h>
8770 EOF
8771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8772 { (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8774 if test -z "$ac_err"; then
8775   rm -rf conftest*
8776   eval "ac_cv_header_$ac_safe=yes"
8777 else
8778   echo "$ac_err" >&5
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   eval "ac_cv_header_$ac_safe=no"
8783 fi
8784 rm -f conftest*
8785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8786   echo "$ac_t""yes" 1>&6
8787   :
8788 else
8789   echo "$ac_t""no" 1>&6
8790 with_wnn=no
8791 fi
8792  }
8793     if test "$with_wnn" != "no"; then
8794     for ac_func in crypt
8795 do
8796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8797 echo "configure:8798: checking for $ac_func" >&5
8798
8799 cat > conftest.$ac_ext <<EOF
8800 #line 8801 "configure"
8801 #include "confdefs.h"
8802 /* System header to define __stub macros and hopefully few prototypes,
8803     which can conflict with char $ac_func(); below.  */
8804 #include <assert.h>
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char $ac_func();
8809
8810 int main() {
8811
8812 /* The GNU C library defines this for functions which it implements
8813     to always fail with ENOSYS.  Some functions are actually named
8814     something starting with __ and the normal name is an alias.  */
8815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8816 choke me
8817 #else
8818 $ac_func();
8819 #endif
8820
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   eval "ac_cv_func_$ac_func=yes"
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_func_$ac_func=no"
8831 fi
8832 rm -f conftest*
8833
8834 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8837   { test "$extra_verbose" = "yes" && cat << EOF
8838     Defining $ac_tr_func
8839 EOF
8840 cat >> confdefs.h <<EOF
8841 #define $ac_tr_func 1
8842 EOF
8843 }
8844  
8845 else
8846   echo "$ac_t""no" 1>&6
8847 fi
8848 done
8849
8850     test "$ac_cv_func_crypt" != "yes" && { 
8851 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8852 echo "configure:8853: checking for crypt in -lcrypt" >&5
8853 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8854
8855 xe_check_libs=" -lcrypt "
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* Override any gcc2 internal prototype to avoid an error.  */
8860 /* We use char because int might match the return type of a gcc2
8861     builtin and then its argument prototype would still apply.  */
8862 char crypt();
8863
8864 int main() {
8865 crypt()
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   eval "ac_cv_lib_$ac_lib_var=yes"
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_lib_$ac_lib_var=no"
8876 fi
8877 rm -f conftest*
8878 xe_check_libs=""
8879
8880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8881   echo "$ac_t""yes" 1>&6
8882     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8883     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8884   { test "$extra_verbose" = "yes" && cat << EOF
8885     Defining $ac_tr_lib
8886 EOF
8887 cat >> confdefs.h <<EOF
8888 #define $ac_tr_lib 1
8889 EOF
8890 }
8891
8892   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8893
8894 else
8895   echo "$ac_t""no" 1>&6
8896 fi
8897
8898  }
8899   fi
8900     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8901     
8902 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8903 echo "configure:8904: checking for jl_dic_list_e in -lwnn" >&5
8904 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8905
8906 xe_check_libs=" -lwnn "
8907 cat > conftest.$ac_ext <<EOF
8908 #line 8909 "configure"
8909 #include "confdefs.h"
8910 /* Override any gcc2 internal prototype to avoid an error.  */
8911 /* We use char because int might match the return type of a gcc2
8912     builtin and then its argument prototype would still apply.  */
8913 char jl_dic_list_e();
8914
8915 int main() {
8916 jl_dic_list_e()
8917 ; return 0; }
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8920   rm -rf conftest*
8921   eval "ac_cv_lib_$ac_lib_var=yes"
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -rf conftest*
8926   eval "ac_cv_lib_$ac_lib_var=no"
8927 fi
8928 rm -f conftest*
8929 xe_check_libs=""
8930
8931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8932   echo "$ac_t""yes" 1>&6
8933   libwnn=wnn
8934 else
8935   echo "$ac_t""no" 1>&6
8936 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8937 echo "configure:8938: checking for jl_dic_list_e in -lwnn4" >&5
8938 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8939
8940 xe_check_libs=" -lwnn4 "
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 /* Override any gcc2 internal prototype to avoid an error.  */
8945 /* We use char because int might match the return type of a gcc2
8946     builtin and then its argument prototype would still apply.  */
8947 char jl_dic_list_e();
8948
8949 int main() {
8950 jl_dic_list_e()
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8954   rm -rf conftest*
8955   eval "ac_cv_lib_$ac_lib_var=yes"
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   eval "ac_cv_lib_$ac_lib_var=no"
8961 fi
8962 rm -f conftest*
8963 xe_check_libs=""
8964
8965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8966   echo "$ac_t""yes" 1>&6
8967   libwnn=wnn4
8968 else
8969   echo "$ac_t""no" 1>&6
8970 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8971 echo "configure:8972: checking for jl_dic_list_e in -lwnn6" >&5
8972 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8973
8974 xe_check_libs=" -lwnn6 "
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 /* Override any gcc2 internal prototype to avoid an error.  */
8979 /* We use char because int might match the return type of a gcc2
8980     builtin and then its argument prototype would still apply.  */
8981 char jl_dic_list_e();
8982
8983 int main() {
8984 jl_dic_list_e()
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   eval "ac_cv_lib_$ac_lib_var=yes"
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   eval "ac_cv_lib_$ac_lib_var=no"
8995 fi
8996 rm -f conftest*
8997 xe_check_libs=""
8998
8999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9000   echo "$ac_t""yes" 1>&6
9001   libwnn=wnn6
9002 else
9003   echo "$ac_t""no" 1>&6
9004 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9005 echo "configure:9006: checking for dic_list_e in -lwnn6_fromsrc" >&5
9006 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9007
9008 xe_check_libs=" -lwnn6_fromsrc "
9009 cat > conftest.$ac_ext <<EOF
9010 #line 9011 "configure"
9011 #include "confdefs.h"
9012 /* Override any gcc2 internal prototype to avoid an error.  */
9013 /* We use char because int might match the return type of a gcc2
9014     builtin and then its argument prototype would still apply.  */
9015 char dic_list_e();
9016
9017 int main() {
9018 dic_list_e()
9019 ; return 0; }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9022   rm -rf conftest*
9023   eval "ac_cv_lib_$ac_lib_var=yes"
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   eval "ac_cv_lib_$ac_lib_var=no"
9029 fi
9030 rm -f conftest*
9031 xe_check_libs=""
9032
9033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9034   echo "$ac_t""yes" 1>&6
9035   libwnn=wnn6_fromsrc
9036 else
9037   echo "$ac_t""no" 1>&6
9038 with_wnn=no
9039 fi
9040
9041
9042 fi
9043
9044
9045 fi
9046
9047
9048 fi
9049
9050
9051   fi
9052   test -z "$with_wnn" && with_wnn=yes
9053   if test "$with_wnn" = "yes"; then
9054     { test "$extra_verbose" = "yes" && cat << \EOF
9055     Defining HAVE_WNN
9056 EOF
9057 cat >> confdefs.h <<\EOF
9058 #define HAVE_WNN 1
9059 EOF
9060 }
9061
9062     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9063     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9064    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9065  fi
9066     if test "$with_wnn6" != "no"; then
9067       
9068 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9069 echo "configure:9070: checking for jl_fi_dic_list in -l$libwnn" >&5
9070 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9071
9072 xe_check_libs=" -l$libwnn "
9073 cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9076 /* Override any gcc2 internal prototype to avoid an error.  */
9077 /* We use char because int might match the return type of a gcc2
9078     builtin and then its argument prototype would still apply.  */
9079 char jl_fi_dic_list();
9080
9081 int main() {
9082 jl_fi_dic_list()
9083 ; return 0; }
9084 EOF
9085 if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9086   rm -rf conftest*
9087   eval "ac_cv_lib_$ac_lib_var=yes"
9088 else
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -rf conftest*
9092   eval "ac_cv_lib_$ac_lib_var=no"
9093 fi
9094 rm -f conftest*
9095 xe_check_libs=""
9096
9097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9098   echo "$ac_t""yes" 1>&6
9099   with_wnn6=yes
9100 else
9101   echo "$ac_t""no" 1>&6
9102 fi
9103
9104
9105       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9106     Defining WNN6
9107 EOF
9108 cat >> confdefs.h <<\EOF
9109 #define WNN6 1
9110 EOF
9111 }
9112
9113     fi
9114   fi
9115
9116     canna_includes_found=no
9117   if test "$with_canna" != "no"; then
9118     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9119 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9120 echo "configure:9121: checking for canna/jrkanji.h" >&5
9121
9122 cat > conftest.$ac_ext <<EOF
9123 #line 9124 "configure"
9124 #include "confdefs.h"
9125 #include <canna/jrkanji.h>
9126 EOF
9127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9128 { (eval echo configure:9129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9130 if test -z "$ac_err"; then
9131   rm -rf conftest*
9132   eval "ac_cv_header_$ac_safe=yes"
9133 else
9134   echo "$ac_err" >&5
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   eval "ac_cv_header_$ac_safe=no"
9139 fi
9140 rm -f conftest*
9141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   canna_includes_found=yes
9144 else
9145   echo "$ac_t""no" 1>&6
9146 fi
9147
9148   fi
9149   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9150       -d "/usr/local/canna/include"; then
9151     save_c_switch_site="$c_switch_site"
9152     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9153     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9154 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9155 echo "configure:9156: checking for canna/jrkanji.h" >&5
9156
9157 cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 #include <canna/jrkanji.h>
9161 EOF
9162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9163 { (eval echo configure:9164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9165 if test -z "$ac_err"; then
9166   rm -rf conftest*
9167   eval "ac_cv_header_$ac_safe=yes"
9168 else
9169   echo "$ac_err" >&5
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_header_$ac_safe=no"
9174 fi
9175 rm -f conftest*
9176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9177   echo "$ac_t""yes" 1>&6
9178   canna_includes_found=yes
9179 else
9180   echo "$ac_t""no" 1>&6
9181 fi
9182
9183     if test "$canna_includes_found" != "yes"; then
9184       c_switch_site="$save_c_switch_site"
9185       with_canna="no"
9186     fi
9187   fi
9188
9189   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9190 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9191 echo "configure:9192: checking for canna/RK.h" >&5
9192
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <canna/RK.h>
9197 EOF
9198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9199 { (eval echo configure:9200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9201 if test -z "$ac_err"; then
9202   rm -rf conftest*
9203   eval "ac_cv_header_$ac_safe=yes"
9204 else
9205   echo "$ac_err" >&5
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   eval "ac_cv_header_$ac_safe=no"
9210 fi
9211 rm -f conftest*
9212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214   :
9215 else
9216   echo "$ac_t""no" 1>&6
9217 with_canna=no
9218 fi
9219  }
9220   test -z "$with_canna" && { 
9221 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9222 echo "configure:9223: checking for RkBgnBun in -lRKC" >&5
9223 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9224
9225 xe_check_libs=" -lRKC "
9226 cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* Override any gcc2 internal prototype to avoid an error.  */
9230 /* We use char because int might match the return type of a gcc2
9231     builtin and then its argument prototype would still apply.  */
9232 char RkBgnBun();
9233
9234 int main() {
9235 RkBgnBun()
9236 ; return 0; }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9239   rm -rf conftest*
9240   eval "ac_cv_lib_$ac_lib_var=yes"
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=no"
9246 fi
9247 rm -f conftest*
9248 xe_check_libs=""
9249
9250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9251   echo "$ac_t""yes" 1>&6
9252   :
9253 else
9254   echo "$ac_t""no" 1>&6
9255 with_canna=no
9256 fi
9257
9258  }
9259   test -z "$with_canna" && { 
9260 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9261 echo "configure:9262: checking for jrKanjiControl in -lcanna" >&5
9262 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9263
9264 xe_check_libs=" -lcanna "
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9268 /* Override any gcc2 internal prototype to avoid an error.  */
9269 /* We use char because int might match the return type of a gcc2
9270     builtin and then its argument prototype would still apply.  */
9271 char jrKanjiControl();
9272
9273 int main() {
9274 jrKanjiControl()
9275 ; return 0; }
9276 EOF
9277 if { (eval echo configure:9278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9278   rm -rf conftest*
9279   eval "ac_cv_lib_$ac_lib_var=yes"
9280 else
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   eval "ac_cv_lib_$ac_lib_var=no"
9285 fi
9286 rm -f conftest*
9287 xe_check_libs=""
9288
9289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9290   echo "$ac_t""yes" 1>&6
9291   :
9292 else
9293   echo "$ac_t""no" 1>&6
9294 with_canna=no
9295 fi
9296
9297  }
9298   test -z "$with_canna" && with_canna=yes
9299   if test "$with_canna" = "yes"; then
9300     { test "$extra_verbose" = "yes" && cat << \EOF
9301     Defining HAVE_CANNA
9302 EOF
9303 cat >> confdefs.h <<\EOF
9304 #define HAVE_CANNA 1
9305 EOF
9306 }
9307
9308     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9309     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9310    echo "    xemacs will be linked with \"mule-canna.o\""
9311  fi
9312   fi
9313
9314 else   for feature in xim canna wnn; do
9315     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9316       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9317     fi
9318     eval "with_${feature}=no"
9319   done
9320 fi 
9321
9322 if test "$need_motif" = "yes" ; then
9323   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9324     
9325 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9326 echo "configure:9327: checking for layout_object_getvalue in -li18n" >&5
9327 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9328
9329 xe_check_libs=" -li18n "
9330 cat > conftest.$ac_ext <<EOF
9331 #line 9332 "configure"
9332 #include "confdefs.h"
9333 /* Override any gcc2 internal prototype to avoid an error.  */
9334 /* We use char because int might match the return type of a gcc2
9335     builtin and then its argument prototype would still apply.  */
9336 char layout_object_getvalue();
9337
9338 int main() {
9339 layout_object_getvalue()
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_lib_$ac_lib_var=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=no"
9350 fi
9351 rm -f conftest*
9352 xe_check_libs=""
9353
9354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9355   echo "$ac_t""yes" 1>&6
9356   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360
9361
9362   
9363 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9364     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9365   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9366   
9367         runpath="" runpath_dirs=""
9368   if test -n "$LD_RUN_PATH"; then
9369     runpath="$LD_RUN_PATH"
9370   elif test "$GCC" = "yes"; then
9371         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9372     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9373     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9374     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9375       case "$arg" in P,* | -L* | -R* )
9376         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9377           {
9378 xe_runpath_dir="$dir"
9379   test "$xe_runpath_dir" != "/lib"     -a \
9380         "$xe_runpath_dir" != "/usr/lib" -a \
9381         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9382   eval "$xe_add_unique_runpath_dir"
9383 }
9384         done ;;
9385       esac
9386     done
9387     ld_switch_run="$ld_switch_run_save"
9388     rm -f conftest*
9389   else
9390         for arg in $ld_switch_site $ld_switch_x_site; do
9391       case "$arg" in -L*) {
9392 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9393   test "$xe_runpath_dir" != "/lib"     -a \
9394         "$xe_runpath_dir" != "/usr/lib" -a \
9395         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9396   eval "$xe_add_unique_runpath_dir"
9397 };; esac
9398     done
9399         if test "$opsys $need_motif" = "sol2 yes"; then
9400       xe_runpath_dir="/opt/SUNWdt/lib";
9401       eval "$xe_add_unique_runpath_dir";
9402     fi
9403   fi 
9404   if test -n "$runpath"; then
9405     ld_switch_run="${dash_r}${runpath}"
9406     
9407 if test "$GCC" = "yes"; then
9408   set x $ld_switch_run; shift; ld_switch_run=""
9409   while test -n "$1"; do
9410     case $1 in
9411       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9412       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9413       -Xlinker* ) ;;
9414       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9415     esac
9416     shift
9417   done
9418 fi
9419     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9420   fi
9421 fi
9422
9423 fi
9424
9425 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
9426 do
9427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9428 echo "configure:9429: checking for $ac_func" >&5
9429
9430 cat > conftest.$ac_ext <<EOF
9431 #line 9432 "configure"
9432 #include "confdefs.h"
9433 /* System header to define __stub macros and hopefully few prototypes,
9434     which can conflict with char $ac_func(); below.  */
9435 #include <assert.h>
9436 /* Override any gcc2 internal prototype to avoid an error.  */
9437 /* We use char because int might match the return type of a gcc2
9438     builtin and then its argument prototype would still apply.  */
9439 char $ac_func();
9440
9441 int main() {
9442
9443 /* The GNU C library defines this for functions which it implements
9444     to always fail with ENOSYS.  Some functions are actually named
9445     something starting with __ and the normal name is an alias.  */
9446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9447 choke me
9448 #else
9449 $ac_func();
9450 #endif
9451
9452 ; return 0; }
9453 EOF
9454 if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9455   rm -rf conftest*
9456   eval "ac_cv_func_$ac_func=yes"
9457 else
9458   echo "configure: failed program was:" >&5
9459   cat conftest.$ac_ext >&5
9460   rm -rf conftest*
9461   eval "ac_cv_func_$ac_func=no"
9462 fi
9463 rm -f conftest*
9464
9465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9466   echo "$ac_t""yes" 1>&6
9467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9468   { test "$extra_verbose" = "yes" && cat << EOF
9469     Defining $ac_tr_func
9470 EOF
9471 cat >> confdefs.h <<EOF
9472 #define $ac_tr_func 1
9473 EOF
9474 }
9475  
9476 else
9477   echo "$ac_t""no" 1>&6
9478 fi
9479 done
9480
9481
9482
9483 case "$opsys" in
9484   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9485    echo "    xemacs will be linked with \"realpath.o\""
9486  fi ;;
9487   * )
9488     case "$canonical" in
9489       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9490    echo "    xemacs will be linked with \"realpath.o\""
9491  fi ;;
9492       * ) for ac_func in realpath
9493 do
9494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9495 echo "configure:9496: checking for $ac_func" >&5
9496
9497 cat > conftest.$ac_ext <<EOF
9498 #line 9499 "configure"
9499 #include "confdefs.h"
9500 /* System header to define __stub macros and hopefully few prototypes,
9501     which can conflict with char $ac_func(); below.  */
9502 #include <assert.h>
9503 /* Override any gcc2 internal prototype to avoid an error.  */
9504 /* We use char because int might match the return type of a gcc2
9505     builtin and then its argument prototype would still apply.  */
9506 char $ac_func();
9507
9508 int main() {
9509
9510 /* The GNU C library defines this for functions which it implements
9511     to always fail with ENOSYS.  Some functions are actually named
9512     something starting with __ and the normal name is an alias.  */
9513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9514 choke me
9515 #else
9516 $ac_func();
9517 #endif
9518
9519 ; return 0; }
9520 EOF
9521 if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9522   rm -rf conftest*
9523   eval "ac_cv_func_$ac_func=yes"
9524 else
9525   echo "configure: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   rm -rf conftest*
9528   eval "ac_cv_func_$ac_func=no"
9529 fi
9530 rm -f conftest*
9531
9532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9533   echo "$ac_t""yes" 1>&6
9534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9535   { test "$extra_verbose" = "yes" && cat << EOF
9536     Defining $ac_tr_func
9537 EOF
9538 cat >> confdefs.h <<EOF
9539 #define $ac_tr_func 1
9540 EOF
9541 }
9542  
9543 else
9544   echo "$ac_t""no" 1>&6
9545 fi
9546 done
9547
9548           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9549    echo "    xemacs will be linked with \"realpath.o\""
9550  fi ;;
9551     esac ;;
9552 esac
9553
9554 for ac_func in getloadavg
9555 do
9556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9557 echo "configure:9558: checking for $ac_func" >&5
9558
9559 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 /* System header to define __stub macros and hopefully few prototypes,
9563     which can conflict with char $ac_func(); below.  */
9564 #include <assert.h>
9565 /* Override any gcc2 internal prototype to avoid an error.  */
9566 /* We use char because int might match the return type of a gcc2
9567     builtin and then its argument prototype would still apply.  */
9568 char $ac_func();
9569
9570 int main() {
9571
9572 /* The GNU C library defines this for functions which it implements
9573     to always fail with ENOSYS.  Some functions are actually named
9574     something starting with __ and the normal name is an alias.  */
9575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9576 choke me
9577 #else
9578 $ac_func();
9579 #endif
9580
9581 ; return 0; }
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9584   rm -rf conftest*
9585   eval "ac_cv_func_$ac_func=yes"
9586 else
9587   echo "configure: failed program was:" >&5
9588   cat conftest.$ac_ext >&5
9589   rm -rf conftest*
9590   eval "ac_cv_func_$ac_func=no"
9591 fi
9592 rm -f conftest*
9593
9594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9595   echo "$ac_t""yes" 1>&6
9596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9597   { test "$extra_verbose" = "yes" && cat << EOF
9598     Defining $ac_tr_func
9599 EOF
9600 cat >> confdefs.h <<EOF
9601 #define $ac_tr_func 1
9602 EOF
9603 }
9604  
9605 else
9606   echo "$ac_t""no" 1>&6
9607 fi
9608 done
9609
9610
9611 if test "$ac_cv_func_getloadavg" != "yes"
9612 then
9613   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9614    echo "    xemacs will be linked with \"getloadavg.o\""
9615  fi
9616
9617     
9618 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9619 echo "configure:9620: checking for kstat_open in -lkstat" >&5
9620 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9621
9622 xe_check_libs=" -lkstat "
9623 cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626 /* Override any gcc2 internal prototype to avoid an error.  */
9627 /* We use char because int might match the return type of a gcc2
9628     builtin and then its argument prototype would still apply.  */
9629 char kstat_open();
9630
9631 int main() {
9632 kstat_open()
9633 ; return 0; }
9634 EOF
9635 if { (eval echo configure:9636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9636   rm -rf conftest*
9637   eval "ac_cv_lib_$ac_lib_var=yes"
9638 else
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -rf conftest*
9642   eval "ac_cv_lib_$ac_lib_var=no"
9643 fi
9644 rm -f conftest*
9645 xe_check_libs=""
9646
9647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9648   echo "$ac_t""yes" 1>&6
9649     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9650     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9651   { test "$extra_verbose" = "yes" && cat << EOF
9652     Defining $ac_tr_lib
9653 EOF
9654 cat >> confdefs.h <<EOF
9655 #define $ac_tr_lib 1
9656 EOF
9657 }
9658
9659   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9660
9661 else
9662   echo "$ac_t""no" 1>&6
9663 fi
9664
9665
9666
9667     
9668 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9669 echo "configure:9670: checking for kvm_read in -lkvm" >&5
9670 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9671
9672 xe_check_libs=" -lkvm "
9673 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 /* We use char because int might match the return type of a gcc2
9678     builtin and then its argument prototype would still apply.  */
9679 char kvm_read();
9680
9681 int main() {
9682 kvm_read()
9683 ; return 0; }
9684 EOF
9685 if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9686   rm -rf conftest*
9687   eval "ac_cv_lib_$ac_lib_var=yes"
9688 else
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691   rm -rf conftest*
9692   eval "ac_cv_lib_$ac_lib_var=no"
9693 fi
9694 rm -f conftest*
9695 xe_check_libs=""
9696
9697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9698   echo "$ac_t""yes" 1>&6
9699     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9701   { test "$extra_verbose" = "yes" && cat << EOF
9702     Defining $ac_tr_lib
9703 EOF
9704 cat >> confdefs.h <<EOF
9705 #define $ac_tr_lib 1
9706 EOF
9707 }
9708
9709   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9710
9711 else
9712   echo "$ac_t""no" 1>&6
9713 fi
9714
9715
9716 fi
9717
9718 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9719 echo "configure:9720: checking whether netdb declares h_errno" >&5
9720 cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 #include <netdb.h>
9724 int main() {
9725 return h_errno;
9726 ; return 0; }
9727 EOF
9728 if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9729   rm -rf conftest*
9730   echo "$ac_t""yes" 1>&6
9731    { test "$extra_verbose" = "yes" && cat << \EOF
9732     Defining HAVE_H_ERRNO
9733 EOF
9734 cat >> confdefs.h <<\EOF
9735 #define HAVE_H_ERRNO 1
9736 EOF
9737 }
9738
9739 else
9740   echo "configure: failed program was:" >&5
9741   cat conftest.$ac_ext >&5
9742   rm -rf conftest*
9743   echo "$ac_t""no" 1>&6
9744 fi
9745 rm -f conftest*
9746
9747 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9748 echo "configure:9749: checking for sigsetjmp" >&5
9749 cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 #include <setjmp.h>
9753 int main() {
9754 sigjmp_buf bar; sigsetjmp (bar, 0);
9755 ; return 0; }
9756 EOF
9757 if { (eval echo configure:9758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9758   rm -rf conftest*
9759   echo "$ac_t""yes" 1>&6
9760    { test "$extra_verbose" = "yes" && cat << \EOF
9761     Defining HAVE_SIGSETJMP
9762 EOF
9763 cat >> confdefs.h <<\EOF
9764 #define HAVE_SIGSETJMP 1
9765 EOF
9766 }
9767
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   echo "$ac_t""no" 1>&6
9773 fi
9774 rm -f conftest*
9775
9776 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9777 echo "configure:9778: checking whether localtime caches TZ" >&5
9778
9779 if test "$ac_cv_func_tzset" = "yes"; then
9780 cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 #include <time.h>
9784 #if STDC_HEADERS
9785 # include <stdlib.h>
9786 #endif
9787 extern char **environ;
9788 unset_TZ ()
9789 {
9790   char **from, **to;
9791   for (to = from = environ; (*to = *from); from++)
9792     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9793       to++;
9794 }
9795 char TZ_GMT0[] = "TZ=GMT0";
9796 char TZ_PST8[] = "TZ=PST8";
9797 main()
9798 {
9799   time_t now = time ((time_t *) 0);
9800   int hour_GMT0, hour_unset;
9801   if (putenv (TZ_GMT0) != 0)
9802     exit (1);
9803   hour_GMT0 = localtime (&now)->tm_hour;
9804   unset_TZ ();
9805   hour_unset = localtime (&now)->tm_hour;
9806   if (putenv (TZ_PST8) != 0)
9807     exit (1);
9808   if (localtime (&now)->tm_hour == hour_GMT0)
9809     exit (1);
9810   unset_TZ ();
9811   if (localtime (&now)->tm_hour != hour_unset)
9812     exit (1);
9813   exit (0);
9814 }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9817 then
9818   emacs_cv_localtime_cache=no
9819 else
9820   conftest_rc="$?"
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -fr conftest*
9824   emacs_cv_localtime_cache=yes
9825 fi
9826 rm -fr conftest*
9827 else
9828         # If we lack tzset, report that localtime does not cache TZ,
9829         # since we can't invalidate the cache if we don't have tzset.
9830         emacs_cv_localtime_cache=no
9831 fi
9832 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9833 if test $emacs_cv_localtime_cache = yes; then
9834   { test "$extra_verbose" = "yes" && cat << \EOF
9835     Defining LOCALTIME_CACHE
9836 EOF
9837 cat >> confdefs.h <<\EOF
9838 #define LOCALTIME_CACHE 1
9839 EOF
9840 }
9841
9842 fi
9843
9844 if test "$HAVE_TIMEVAL" = "yes"; then
9845 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9846 echo "configure:9847: checking whether gettimeofday accepts one or two arguments" >&5
9847 cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850
9851 #ifdef TIME_WITH_SYS_TIME
9852 #include <sys/time.h>
9853 #include <time.h>
9854 #else
9855 #ifdef HAVE_SYS_TIME_H
9856 #include <sys/time.h>
9857 #else
9858 #include <time.h>
9859 #endif
9860 #endif
9861   
9862 int main() {
9863
9864   struct timeval time;
9865   struct timezone dummy;
9866   gettimeofday (&time, &dummy);
9867
9868 ; return 0; }
9869 EOF
9870 if { (eval echo configure:9871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9871   rm -rf conftest*
9872   echo "$ac_t""two" 1>&6
9873 else
9874   echo "configure: failed program was:" >&5
9875   cat conftest.$ac_ext >&5
9876   rm -rf conftest*
9877   echo "$ac_t""one" 1>&6
9878    { test "$extra_verbose" = "yes" && cat << \EOF
9879     Defining GETTIMEOFDAY_ONE_ARGUMENT
9880 EOF
9881 cat >> confdefs.h <<\EOF
9882 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9883 EOF
9884 }
9885
9886 fi
9887 rm -f conftest*
9888 fi
9889
9890
9891 echo $ac_n "checking for inline""... $ac_c" 1>&6
9892 echo "configure:9893: checking for inline" >&5
9893
9894 ac_cv_c_inline=no
9895 for ac_kw in inline __inline__ __inline; do
9896   cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899
9900 int main() {
9901 } $ac_kw foo() {
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9905   rm -rf conftest*
9906   ac_cv_c_inline=$ac_kw; break
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910 fi
9911 rm -f conftest*
9912 done
9913
9914
9915 echo "$ac_t""$ac_cv_c_inline" 1>&6
9916 case "$ac_cv_c_inline" in
9917   inline | yes) ;;
9918   no) { test "$extra_verbose" = "yes" && cat << \EOF
9919     Defining inline = 
9920 EOF
9921 cat >> confdefs.h <<\EOF
9922 #define inline 
9923 EOF
9924 }
9925  ;;
9926   *)  { test "$extra_verbose" = "yes" && cat << EOF
9927     Defining inline = $ac_cv_c_inline
9928 EOF
9929 cat >> confdefs.h <<EOF
9930 #define inline $ac_cv_c_inline
9931 EOF
9932 }
9933  ;;
9934 esac
9935
9936 if test "$ac_cv_c_inline" != "no"; then
9937   { test "$extra_verbose" = "yes" && cat << \EOF
9938     Defining HAVE_INLINE
9939 EOF
9940 cat >> confdefs.h <<\EOF
9941 #define HAVE_INLINE 1
9942 EOF
9943 }
9944
9945   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9946    echo "    xemacs will be linked with \"inline.o\""
9947  fi
9948 fi
9949
9950
9951 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9952 # for constant arguments.  Useless!
9953 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9954 echo "configure:9955: checking for working alloca.h" >&5
9955
9956 cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 #include <alloca.h>
9960 int main() {
9961 char *p = alloca(2 * sizeof(int));
9962 ; return 0; }
9963 EOF
9964 if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9965   rm -rf conftest*
9966   ac_cv_header_alloca_h=yes
9967 else
9968   echo "configure: failed program was:" >&5
9969   cat conftest.$ac_ext >&5
9970   rm -rf conftest*
9971   ac_cv_header_alloca_h=no
9972 fi
9973 rm -f conftest*
9974
9975 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9976 if test $ac_cv_header_alloca_h = yes; then
9977   { test "$extra_verbose" = "yes" && cat << \EOF
9978     Defining HAVE_ALLOCA_H
9979 EOF
9980 cat >> confdefs.h <<\EOF
9981 #define HAVE_ALLOCA_H 1
9982 EOF
9983 }
9984
9985 fi
9986
9987 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9988 echo "configure:9989: checking for alloca" >&5
9989
9990 cat > conftest.$ac_ext <<EOF
9991 #line 9992 "configure"
9992 #include "confdefs.h"
9993
9994 #ifdef __GNUC__
9995 # define alloca __builtin_alloca
9996 #else
9997 # ifdef _MSC_VER
9998 #  include <malloc.h>
9999 #  define alloca _alloca
10000 # else
10001 #  if HAVE_ALLOCA_H
10002 #   include <alloca.h>
10003 #  else
10004 #   ifdef _AIX
10005  #pragma alloca
10006 #   else
10007 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10008 char *alloca ();
10009 #    endif
10010 #   endif
10011 #  endif
10012 # endif
10013 #endif
10014
10015 int main() {
10016 char *p = (char *) alloca(1);
10017 ; return 0; }
10018 EOF
10019 if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10020   rm -rf conftest*
10021   ac_cv_func_alloca_works=yes
10022 else
10023   echo "configure: failed program was:" >&5
10024   cat conftest.$ac_ext >&5
10025   rm -rf conftest*
10026   ac_cv_func_alloca_works=no
10027 fi
10028 rm -f conftest*
10029
10030 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10031 if test $ac_cv_func_alloca_works = yes; then
10032   { test "$extra_verbose" = "yes" && cat << \EOF
10033     Defining HAVE_ALLOCA
10034 EOF
10035 cat >> confdefs.h <<\EOF
10036 #define HAVE_ALLOCA 1
10037 EOF
10038 }
10039
10040 fi
10041
10042 if test $ac_cv_func_alloca_works = no; then
10043   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10044   # that cause trouble.  Some versions do not even contain alloca or
10045   # contain a buggy version.  If you still want to use their alloca,
10046   # use ar to extract alloca.o from them instead of compiling alloca.c.
10047   ALLOCA=alloca.${ac_objext}
10048   { test "$extra_verbose" = "yes" && cat << \EOF
10049     Defining C_ALLOCA
10050 EOF
10051 cat >> confdefs.h <<\EOF
10052 #define C_ALLOCA 1
10053 EOF
10054 }
10055
10056
10057 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10058 echo "configure:10059: checking whether alloca needs Cray hooks" >&5
10059
10060 cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 #if defined(CRAY) && ! defined(CRAY2)
10064 webecray
10065 #else
10066 wenotbecray
10067 #endif
10068
10069 EOF
10070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10071   egrep "webecray" >/dev/null 2>&1; then
10072   rm -rf conftest*
10073   ac_cv_os_cray=yes
10074 else
10075   rm -rf conftest*
10076   ac_cv_os_cray=no
10077 fi
10078 rm -f conftest*
10079
10080
10081 echo "$ac_t""$ac_cv_os_cray" 1>&6
10082 if test $ac_cv_os_cray = yes; then
10083 for ac_func in _getb67 GETB67 getb67; do
10084   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10085 echo "configure:10086: checking for $ac_func" >&5
10086
10087 cat > conftest.$ac_ext <<EOF
10088 #line 10089 "configure"
10089 #include "confdefs.h"
10090 /* System header to define __stub macros and hopefully few prototypes,
10091     which can conflict with char $ac_func(); below.  */
10092 #include <assert.h>
10093 /* Override any gcc2 internal prototype to avoid an error.  */
10094 /* We use char because int might match the return type of a gcc2
10095     builtin and then its argument prototype would still apply.  */
10096 char $ac_func();
10097
10098 int main() {
10099
10100 /* The GNU C library defines this for functions which it implements
10101     to always fail with ENOSYS.  Some functions are actually named
10102     something starting with __ and the normal name is an alias.  */
10103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10104 choke me
10105 #else
10106 $ac_func();
10107 #endif
10108
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_func_$ac_func=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_func_$ac_func=no"
10119 fi
10120 rm -f conftest*
10121
10122 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10123   echo "$ac_t""yes" 1>&6
10124   { test "$extra_verbose" = "yes" && cat << EOF
10125     Defining CRAY_STACKSEG_END = $ac_func
10126 EOF
10127 cat >> confdefs.h <<EOF
10128 #define CRAY_STACKSEG_END $ac_func
10129 EOF
10130 }
10131
10132   break
10133 else
10134   echo "$ac_t""no" 1>&6
10135 fi
10136
10137 done
10138 fi
10139
10140 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10141 echo "configure:10142: checking stack direction for C alloca" >&5
10142
10143 cat > conftest.$ac_ext <<EOF
10144 #line 10145 "configure"
10145 #include "confdefs.h"
10146 find_stack_direction ()
10147 {
10148   static char *addr = 0;
10149   auto char dummy;
10150   if (addr == 0)
10151     {
10152       addr = &dummy;
10153       return find_stack_direction ();
10154     }
10155   else
10156     return (&dummy > addr) ? 1 : -1;
10157 }
10158 main ()
10159 {
10160   exit (find_stack_direction() < 0);
10161 }
10162 EOF
10163 if { (eval echo configure:10164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10164 then
10165   ac_cv_c_stack_direction=1
10166 else
10167   conftest_rc="$?"
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -fr conftest*
10171   ac_cv_c_stack_direction=-1
10172 fi
10173 rm -fr conftest*
10174
10175 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10176 { test "$extra_verbose" = "yes" && cat << EOF
10177     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10178 EOF
10179 cat >> confdefs.h <<EOF
10180 #define STACK_DIRECTION $ac_cv_c_stack_direction
10181 EOF
10182 }
10183
10184 fi
10185
10186 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10187    echo "    xemacs will be linked with \"$ALLOCA\""
10188  fi
10189
10190 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10191 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10192 echo "configure:10193: checking for vfork.h" >&5
10193
10194 cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 #include <vfork.h>
10198 EOF
10199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10200 { (eval echo configure:10201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10202 if test -z "$ac_err"; then
10203   rm -rf conftest*
10204   eval "ac_cv_header_$ac_safe=yes"
10205 else
10206   echo "$ac_err" >&5
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   eval "ac_cv_header_$ac_safe=no"
10211 fi
10212 rm -f conftest*
10213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10214   echo "$ac_t""yes" 1>&6
10215   { test "$extra_verbose" = "yes" && cat << \EOF
10216     Defining HAVE_VFORK_H
10217 EOF
10218 cat >> confdefs.h <<\EOF
10219 #define HAVE_VFORK_H 1
10220 EOF
10221 }
10222
10223 else
10224   echo "$ac_t""no" 1>&6
10225 fi
10226
10227 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10228 echo "configure:10229: checking for working vfork" >&5
10229
10230 cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233 /* Thanks to Paul Eggert for this test.  */
10234 #include <stdio.h>
10235 #include <sys/types.h>
10236 #include <sys/stat.h>
10237 #ifdef HAVE_UNISTD_H
10238 #include <unistd.h>
10239 #endif
10240 #ifdef HAVE_VFORK_H
10241 #include <vfork.h>
10242 #endif
10243 /* On some sparc systems, changes by the child to local and incoming
10244    argument registers are propagated back to the parent.
10245    The compiler is told about this with #include <vfork.h>,
10246    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10247    Test for this by using a static variable whose address
10248    is put into a register that is clobbered by the vfork.  */
10249 static
10250 #ifdef __cplusplus
10251 sparc_address_test (int arg)
10252 #else
10253 sparc_address_test (arg) int arg;
10254 #endif
10255 {
10256   static pid_t child;
10257   if (!child) {
10258     child = vfork ();
10259     if (child < 0) {
10260       perror ("vfork");
10261       _exit(2);
10262     }
10263     if (!child) {
10264       arg = getpid();
10265       write(-1, "", 0);
10266       _exit (arg);
10267     }
10268   }
10269 }
10270 main() {
10271   pid_t parent = getpid ();
10272   pid_t child;
10273
10274   sparc_address_test ();
10275
10276   child = vfork ();
10277
10278   if (child == 0) {
10279     /* Here is another test for sparc vfork register problems.
10280        This test uses lots of local variables, at least
10281        as many local variables as main has allocated so far
10282        including compiler temporaries.  4 locals are enough for
10283        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10284        A buggy compiler should reuse the register of parent
10285        for one of the local variables, since it will think that
10286        parent can't possibly be used any more in this routine.
10287        Assigning to the local variable will thus munge parent
10288        in the parent process.  */
10289     pid_t
10290       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10291       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10292     /* Convince the compiler that p..p7 are live; otherwise, it might
10293        use the same hardware register for all 8 local variables.  */
10294     if (p != p1 || p != p2 || p != p3 || p != p4
10295         || p != p5 || p != p6 || p != p7)
10296       _exit(1);
10297
10298     /* On some systems (e.g. IRIX 3.3),
10299        vfork doesn't separate parent from child file descriptors.
10300        If the child closes a descriptor before it execs or exits,
10301        this munges the parent's descriptor as well.
10302        Test for this by closing stdout in the child.  */
10303     _exit(close(fileno(stdout)) != 0);
10304   } else {
10305     int status;
10306     struct stat st;
10307
10308     while (wait(&status) != child)
10309       ;
10310     exit(
10311          /* Was there some problem with vforking?  */
10312          child < 0
10313
10314          /* Did the child fail?  (This shouldn't happen.)  */
10315          || status
10316
10317          /* Did the vfork/compiler bug occur?  */
10318          || parent != getpid()
10319
10320          /* Did the file descriptor bug occur?  */
10321          || fstat(fileno(stdout), &st) != 0
10322          );
10323   }
10324 }
10325 EOF
10326 if { (eval echo configure:10327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10327 then
10328   ac_cv_func_vfork_works=yes
10329 else
10330   conftest_rc="$?"
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -fr conftest*
10334   ac_cv_func_vfork_works=no
10335 fi
10336 rm -fr conftest*
10337
10338 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10339 if test $ac_cv_func_vfork_works = no; then
10340   { test "$extra_verbose" = "yes" && cat << \EOF
10341     Defining vfork = fork
10342 EOF
10343 cat >> confdefs.h <<\EOF
10344 #define vfork fork
10345 EOF
10346 }
10347
10348 fi
10349
10350
10351 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10352 echo "configure:10353: checking for working strcoll" >&5
10353
10354 cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 #include <string.h>
10358 main ()
10359 {
10360   exit (strcoll ("abc", "def") >= 0 ||
10361         strcoll ("ABC", "DEF") >= 0 ||
10362         strcoll ("123", "456") >= 0);
10363 }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10366 then
10367   ac_cv_func_strcoll_works=yes
10368 else
10369   conftest_rc="$?"
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -fr conftest*
10373   ac_cv_func_strcoll_works=no
10374 fi
10375 rm -fr conftest*
10376
10377 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10378 if test $ac_cv_func_strcoll_works = yes; then
10379   { test "$extra_verbose" = "yes" && cat << \EOF
10380     Defining HAVE_STRCOLL
10381 EOF
10382 cat >> confdefs.h <<\EOF
10383 #define HAVE_STRCOLL 1
10384 EOF
10385 }
10386
10387 fi
10388
10389
10390 for ac_func in getpgrp
10391 do
10392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10393 echo "configure:10394: checking for $ac_func" >&5
10394
10395 cat > conftest.$ac_ext <<EOF
10396 #line 10397 "configure"
10397 #include "confdefs.h"
10398 /* System header to define __stub macros and hopefully few prototypes,
10399     which can conflict with char $ac_func(); below.  */
10400 #include <assert.h>
10401 /* Override any gcc2 internal prototype to avoid an error.  */
10402 /* We use char because int might match the return type of a gcc2
10403     builtin and then its argument prototype would still apply.  */
10404 char $ac_func();
10405
10406 int main() {
10407
10408 /* The GNU C library defines this for functions which it implements
10409     to always fail with ENOSYS.  Some functions are actually named
10410     something starting with __ and the normal name is an alias.  */
10411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10412 choke me
10413 #else
10414 $ac_func();
10415 #endif
10416
10417 ; return 0; }
10418 EOF
10419 if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10420   rm -rf conftest*
10421   eval "ac_cv_func_$ac_func=yes"
10422 else
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -rf conftest*
10426   eval "ac_cv_func_$ac_func=no"
10427 fi
10428 rm -f conftest*
10429
10430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10433   { test "$extra_verbose" = "yes" && cat << EOF
10434     Defining $ac_tr_func
10435 EOF
10436 cat >> confdefs.h <<EOF
10437 #define $ac_tr_func 1
10438 EOF
10439 }
10440  
10441 else
10442   echo "$ac_t""no" 1>&6
10443 fi
10444 done
10445
10446 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10447 echo "configure:10448: checking whether getpgrp takes no argument" >&5
10448
10449 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452
10453 /*
10454  * If this system has a BSD-style getpgrp(),
10455  * which takes a pid argument, exit unsuccessfully.
10456  *
10457  * Snarfed from Chet Ramey's bash pgrp.c test program
10458  */
10459 #include <stdio.h>
10460 #include <sys/types.h>
10461
10462 int     pid;
10463 int     pg1, pg2, pg3, pg4;
10464 int     ng, np, s, child;
10465
10466 main()
10467 {
10468         pid = getpid();
10469         pg1 = getpgrp(0);
10470         pg2 = getpgrp();
10471         pg3 = getpgrp(pid);
10472         pg4 = getpgrp(1);
10473
10474         /*
10475          * If all of these values are the same, it's pretty sure that
10476          * we're on a system that ignores getpgrp's first argument.
10477          */
10478         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10479                 exit(0);
10480
10481         child = fork();
10482         if (child < 0)
10483                 exit(1);
10484         else if (child == 0) {
10485                 np = getpid();
10486                 /*
10487                  * If this is Sys V, this will not work; pgrp will be
10488                  * set to np because setpgrp just changes a pgrp to be
10489                  * the same as the pid.
10490                  */
10491                 setpgrp(np, pg1);
10492                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10493                 if (ng == pg1) {
10494                         exit(1);
10495                 } else {
10496                         exit(0);
10497                 }
10498         } else {
10499                 wait(&s);
10500                 exit(s>>8);
10501         }
10502 }
10503
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10506 then
10507   ac_cv_func_getpgrp_void=yes
10508 else
10509   conftest_rc="$?"
10510   echo "configure: failed program was:" >&5
10511   cat conftest.$ac_ext >&5
10512   rm -fr conftest*
10513   ac_cv_func_getpgrp_void=no
10514 fi
10515 rm -fr conftest*
10516
10517
10518 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10519 if test $ac_cv_func_getpgrp_void = yes; then
10520   { test "$extra_verbose" = "yes" && cat << \EOF
10521     Defining GETPGRP_VOID
10522 EOF
10523 cat >> confdefs.h <<\EOF
10524 #define GETPGRP_VOID 1
10525 EOF
10526 }
10527
10528 fi
10529
10530
10531 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10532 echo "configure:10533: checking for working mmap" >&5
10533 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10534 cat > conftest.$ac_ext <<EOF
10535 #line 10536 "configure"
10536 #include "confdefs.h"
10537 #include <stdio.h>
10538 #include <unistd.h>
10539 #include <fcntl.h>
10540 #include <sys/mman.h>
10541
10542 #ifndef MAP_VARIABLE
10543 #define MAP_VARIABLE 0
10544 #endif
10545
10546 #ifndef MAP_FAILED
10547 #define MAP_FAILED -1
10548 #endif
10549
10550 int main (int argc, char *argv[])
10551 {
10552   int fd = -1;
10553   caddr_t p;
10554 #ifndef MAP_ANONYMOUS
10555   fd = open ("/dev/zero", O_RDWR);
10556   if (fd < 0)
10557     return 1;
10558 #define MAP_ANONYMOUS 0
10559 #endif
10560   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10561            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10562            fd, 0) != (void *) MAP_FAILED)
10563     return 0;
10564   perror ("conftest: mmap failed");
10565   return 1;
10566 }
10567 EOF
10568 if { (eval echo configure:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10569 then
10570   have_mmap=yes
10571 else
10572   conftest_rc="$?"
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -fr conftest*
10576   have_mmap=no
10577 fi
10578 rm -fr conftest* ;;
10579 esac
10580 echo "$ac_t""$have_mmap" 1>&6
10581 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10582     Defining HAVE_MMAP
10583 EOF
10584 cat >> confdefs.h <<\EOF
10585 #define HAVE_MMAP 1
10586 EOF
10587 }
10588
10589
10590 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10591 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10592 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10593     Defining REL_ALLOC
10594 EOF
10595 cat >> confdefs.h <<\EOF
10596 #define REL_ALLOC 1
10597 EOF
10598 }
10599
10600
10601 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10602 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10603 echo "configure:10604: checking for termios.h" >&5
10604
10605 cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 #include <termios.h>
10609 EOF
10610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10611 { (eval echo configure:10612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10613 if test -z "$ac_err"; then
10614   rm -rf conftest*
10615   eval "ac_cv_header_$ac_safe=yes"
10616 else
10617   echo "$ac_err" >&5
10618   echo "configure: failed program was:" >&5
10619   cat conftest.$ac_ext >&5
10620   rm -rf conftest*
10621   eval "ac_cv_header_$ac_safe=no"
10622 fi
10623 rm -f conftest*
10624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626   { test "$extra_verbose" = "yes" && cat << \EOF
10627     Defining HAVE_TERMIOS
10628 EOF
10629 cat >> confdefs.h <<\EOF
10630 #define HAVE_TERMIOS 1
10631 EOF
10632 }
10633
10634   { test "$extra_verbose" = "yes" && cat << \EOF
10635     Defining SIGNALS_VIA_CHARACTERS
10636 EOF
10637 cat >> confdefs.h <<\EOF
10638 #define SIGNALS_VIA_CHARACTERS 1
10639 EOF
10640 }
10641
10642   { test "$extra_verbose" = "yes" && cat << \EOF
10643     Defining NO_TERMIO
10644 EOF
10645 cat >> confdefs.h <<\EOF
10646 #define NO_TERMIO 1
10647 EOF
10648 }
10649
10650 else
10651   echo "$ac_t""no" 1>&6
10652 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10653 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10654 echo "configure:10655: checking for termio.h" >&5
10655
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 #include <termio.h>
10660 EOF
10661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10662 { (eval echo configure:10663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10664 if test -z "$ac_err"; then
10665   rm -rf conftest*
10666   eval "ac_cv_header_$ac_safe=yes"
10667 else
10668   echo "$ac_err" >&5
10669   echo "configure: failed program was:" >&5
10670   cat conftest.$ac_ext >&5
10671   rm -rf conftest*
10672   eval "ac_cv_header_$ac_safe=no"
10673 fi
10674 rm -f conftest*
10675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10676   echo "$ac_t""yes" 1>&6
10677   { test "$extra_verbose" = "yes" && cat << \EOF
10678     Defining HAVE_TERMIO
10679 EOF
10680 cat >> confdefs.h <<\EOF
10681 #define HAVE_TERMIO 1
10682 EOF
10683 }
10684
10685 else
10686   echo "$ac_t""no" 1>&6
10687 fi
10688
10689 fi
10690
10691
10692
10693 echo $ac_n "checking for socket""... $ac_c" 1>&6
10694 echo "configure:10695: checking for socket" >&5
10695
10696 cat > conftest.$ac_ext <<EOF
10697 #line 10698 "configure"
10698 #include "confdefs.h"
10699 /* System header to define __stub macros and hopefully few prototypes,
10700     which can conflict with char socket(); below.  */
10701 #include <assert.h>
10702 /* Override any gcc2 internal prototype to avoid an error.  */
10703 /* We use char because int might match the return type of a gcc2
10704     builtin and then its argument prototype would still apply.  */
10705 char socket();
10706
10707 int main() {
10708
10709 /* The GNU C library defines this for functions which it implements
10710     to always fail with ENOSYS.  Some functions are actually named
10711     something starting with __ and the normal name is an alias.  */
10712 #if defined (__stub_socket) || defined (__stub___socket)
10713 choke me
10714 #else
10715 socket();
10716 #endif
10717
10718 ; return 0; }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10721   rm -rf conftest*
10722   eval "ac_cv_func_socket=yes"
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   eval "ac_cv_func_socket=no"
10728 fi
10729 rm -f conftest*
10730
10731 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10732   echo "$ac_t""yes" 1>&6
10733   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10734 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10735 echo "configure:10736: checking for netinet/in.h" >&5
10736
10737 cat > conftest.$ac_ext <<EOF
10738 #line 10739 "configure"
10739 #include "confdefs.h"
10740 #include <netinet/in.h>
10741 EOF
10742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10743 { (eval echo configure:10744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10745 if test -z "$ac_err"; then
10746   rm -rf conftest*
10747   eval "ac_cv_header_$ac_safe=yes"
10748 else
10749   echo "$ac_err" >&5
10750   echo "configure: failed program was:" >&5
10751   cat conftest.$ac_ext >&5
10752   rm -rf conftest*
10753   eval "ac_cv_header_$ac_safe=no"
10754 fi
10755 rm -f conftest*
10756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10757   echo "$ac_t""yes" 1>&6
10758   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10759 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10760 echo "configure:10761: checking for arpa/inet.h" >&5
10761
10762 cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 #include <arpa/inet.h>
10766 EOF
10767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10768 { (eval echo configure:10769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10770 if test -z "$ac_err"; then
10771   rm -rf conftest*
10772   eval "ac_cv_header_$ac_safe=yes"
10773 else
10774   echo "$ac_err" >&5
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   eval "ac_cv_header_$ac_safe=no"
10779 fi
10780 rm -f conftest*
10781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10782   echo "$ac_t""yes" 1>&6
10783   
10784   { test "$extra_verbose" = "yes" && cat << \EOF
10785     Defining HAVE_SOCKETS
10786 EOF
10787 cat >> confdefs.h <<\EOF
10788 #define HAVE_SOCKETS 1
10789 EOF
10790 }
10791
10792       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10793 echo "configure:10794: checking "for sun_len member in struct sockaddr_un"" >&5
10794       cat > conftest.$ac_ext <<EOF
10795 #line 10796 "configure"
10796 #include "confdefs.h"
10797
10798 #include <sys/types.h>
10799 #include <sys/socket.h>
10800 #include <sys/un.h>
10801       
10802 int main() {
10803 static struct sockaddr_un x; x.sun_len = 1;
10804 ; return 0; }
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10807   rm -rf conftest*
10808   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10809     Defining HAVE_SOCKADDR_SUN_LEN
10810 EOF
10811 cat >> confdefs.h <<\EOF
10812 #define HAVE_SOCKADDR_SUN_LEN 1
10813 EOF
10814 }
10815
10816 else
10817   echo "configure: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   rm -rf conftest*
10820   echo "$ac_t""no" 1>&6
10821 fi
10822 rm -f conftest*
10823       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10824 echo "configure:10825: checking "for ip_mreq struct in netinet/in.h"" >&5
10825       cat > conftest.$ac_ext <<EOF
10826 #line 10827 "configure"
10827 #include "confdefs.h"
10828
10829 #include <sys/types.h>
10830 #include <netinet/in.h>
10831       
10832 int main() {
10833 static struct ip_mreq x;
10834 ; return 0; }
10835 EOF
10836 if { (eval echo configure:10837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10837   rm -rf conftest*
10838   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10839     Defining HAVE_MULTICAST
10840 EOF
10841 cat >> confdefs.h <<\EOF
10842 #define HAVE_MULTICAST 1
10843 EOF
10844 }
10845
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   echo "$ac_t""no" 1>&6
10851 fi
10852 rm -f conftest*
10853 else
10854   echo "$ac_t""no" 1>&6
10855 fi
10856
10857 else
10858   echo "$ac_t""no" 1>&6
10859 fi
10860
10861 else
10862   echo "$ac_t""no" 1>&6
10863 fi
10864
10865
10866 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10867 echo "configure:10868: checking for msgget" >&5
10868
10869 cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872 /* System header to define __stub macros and hopefully few prototypes,
10873     which can conflict with char msgget(); below.  */
10874 #include <assert.h>
10875 /* Override any gcc2 internal prototype to avoid an error.  */
10876 /* We use char because int might match the return type of a gcc2
10877     builtin and then its argument prototype would still apply.  */
10878 char msgget();
10879
10880 int main() {
10881
10882 /* The GNU C library defines this for functions which it implements
10883     to always fail with ENOSYS.  Some functions are actually named
10884     something starting with __ and the normal name is an alias.  */
10885 #if defined (__stub_msgget) || defined (__stub___msgget)
10886 choke me
10887 #else
10888 msgget();
10889 #endif
10890
10891 ; return 0; }
10892 EOF
10893 if { (eval echo configure:10894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10894   rm -rf conftest*
10895   eval "ac_cv_func_msgget=yes"
10896 else
10897   echo "configure: failed program was:" >&5
10898   cat conftest.$ac_ext >&5
10899   rm -rf conftest*
10900   eval "ac_cv_func_msgget=no"
10901 fi
10902 rm -f conftest*
10903
10904 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10905   echo "$ac_t""yes" 1>&6
10906   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10907 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10908 echo "configure:10909: checking for sys/ipc.h" >&5
10909
10910 cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 #include <sys/ipc.h>
10914 EOF
10915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10916 { (eval echo configure:10917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10918 if test -z "$ac_err"; then
10919   rm -rf conftest*
10920   eval "ac_cv_header_$ac_safe=yes"
10921 else
10922   echo "$ac_err" >&5
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_header_$ac_safe=no"
10927 fi
10928 rm -f conftest*
10929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10930   echo "$ac_t""yes" 1>&6
10931   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10932 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10933 echo "configure:10934: checking for sys/msg.h" >&5
10934
10935 cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938 #include <sys/msg.h>
10939 EOF
10940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10941 { (eval echo configure:10942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10943 if test -z "$ac_err"; then
10944   rm -rf conftest*
10945   eval "ac_cv_header_$ac_safe=yes"
10946 else
10947   echo "$ac_err" >&5
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_header_$ac_safe=no"
10952 fi
10953 rm -f conftest*
10954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10955   echo "$ac_t""yes" 1>&6
10956   { test "$extra_verbose" = "yes" && cat << \EOF
10957     Defining HAVE_SYSVIPC
10958 EOF
10959 cat >> confdefs.h <<\EOF
10960 #define HAVE_SYSVIPC 1
10961 EOF
10962 }
10963
10964 else
10965   echo "$ac_t""no" 1>&6
10966 fi
10967
10968 else
10969   echo "$ac_t""no" 1>&6
10970 fi
10971
10972 else
10973   echo "$ac_t""no" 1>&6
10974 fi
10975
10976
10977 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10978 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10979 echo "configure:10980: checking for dirent.h" >&5
10980
10981 cat > conftest.$ac_ext <<EOF
10982 #line 10983 "configure"
10983 #include "confdefs.h"
10984 #include <dirent.h>
10985 EOF
10986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10987 { (eval echo configure:10988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10989 if test -z "$ac_err"; then
10990   rm -rf conftest*
10991   eval "ac_cv_header_$ac_safe=yes"
10992 else
10993   echo "$ac_err" >&5
10994   echo "configure: failed program was:" >&5
10995   cat conftest.$ac_ext >&5
10996   rm -rf conftest*
10997   eval "ac_cv_header_$ac_safe=no"
10998 fi
10999 rm -f conftest*
11000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11001   echo "$ac_t""yes" 1>&6
11002   { test "$extra_verbose" = "yes" && cat << \EOF
11003     Defining SYSV_SYSTEM_DIR
11004 EOF
11005 cat >> confdefs.h <<\EOF
11006 #define SYSV_SYSTEM_DIR 1
11007 EOF
11008 }
11009
11010 else
11011   echo "$ac_t""no" 1>&6
11012 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11013 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11014 echo "configure:11015: checking for sys/dir.h" >&5
11015
11016 cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <sys/dir.h>
11020 EOF
11021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11022 { (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11024 if test -z "$ac_err"; then
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=yes"
11027 else
11028   echo "$ac_err" >&5
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=no"
11033 fi
11034 rm -f conftest*
11035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11036   echo "$ac_t""yes" 1>&6
11037   :
11038 else
11039   echo "$ac_t""no" 1>&6
11040 { test "$extra_verbose" = "yes" && cat << \EOF
11041     Defining NONSYSTEM_DIR_LIBRARY
11042 EOF
11043 cat >> confdefs.h <<\EOF
11044 #define NONSYSTEM_DIR_LIBRARY 1
11045 EOF
11046 }
11047
11048 fi
11049
11050 fi
11051
11052
11053 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11054 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11055 echo "configure:11056: checking for nlist.h" >&5
11056
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 #include <nlist.h>
11061 EOF
11062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11063 { (eval echo configure:11064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11065 if test -z "$ac_err"; then
11066   rm -rf conftest*
11067   eval "ac_cv_header_$ac_safe=yes"
11068 else
11069   echo "$ac_err" >&5
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -rf conftest*
11073   eval "ac_cv_header_$ac_safe=no"
11074 fi
11075 rm -f conftest*
11076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11077   echo "$ac_t""yes" 1>&6
11078   { test "$extra_verbose" = "yes" && cat << \EOF
11079     Defining NLIST_STRUCT
11080 EOF
11081 cat >> confdefs.h <<\EOF
11082 #define NLIST_STRUCT 1
11083 EOF
11084 }
11085
11086 else
11087   echo "$ac_t""no" 1>&6
11088 fi
11089
11090
11091
11092 echo "checking "for sound support"" 1>&6
11093 echo "configure:11094: checking "for sound support"" >&5
11094 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11095
11096 if test "$with_native_sound" != "no"; then
11097     if test -n "$native_sound_lib"; then
11098     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11099 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11100 echo "configure:11101: checking for multimedia/audio_device.h" >&5
11101
11102 cat > conftest.$ac_ext <<EOF
11103 #line 11104 "configure"
11104 #include "confdefs.h"
11105 #include <multimedia/audio_device.h>
11106 EOF
11107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11108 { (eval echo configure:11109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11110 if test -z "$ac_err"; then
11111   rm -rf conftest*
11112   eval "ac_cv_header_$ac_safe=yes"
11113 else
11114   echo "$ac_err" >&5
11115   echo "configure: failed program was:" >&5
11116   cat conftest.$ac_ext >&5
11117   rm -rf conftest*
11118   eval "ac_cv_header_$ac_safe=no"
11119 fi
11120 rm -f conftest*
11121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11122   echo "$ac_t""yes" 1>&6
11123   sound_found=yes sound_cflags=""
11124       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11125    echo "    xemacs will be linked with \"sunplay.o\""
11126  fi
11127 else
11128   echo "$ac_t""no" 1>&6
11129 fi
11130
11131   fi
11132
11133     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11134     sound_found=yes
11135     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11136    echo "    xemacs will be linked with \"sunplay.o\""
11137  fi
11138     if test -d "/usr/demo/SOUND/include"
11139       then sound_cflags="-I/usr/demo/SOUND/include"
11140       else sound_cflags="-I/usr/demo/SOUND"
11141     fi
11142     if test -z "$native_sound_lib" ; then
11143       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11144         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11145         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11146       fi
11147     fi
11148   fi
11149
11150     if test -z "$sound_found"; then
11151     case "$canonical" in
11152     *-sgi-* )
11153       if test -z "$native_sound_lib"; then
11154         
11155 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11156 echo "configure:11157: checking for ALopenport in -laudio" >&5
11157 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11158
11159 xe_check_libs=" -laudio "
11160 cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char ALopenport();
11167
11168 int main() {
11169 ALopenport()
11170 ; return 0; }
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=yes"
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=no"
11180 fi
11181 rm -f conftest*
11182 xe_check_libs=""
11183
11184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11185   echo "$ac_t""yes" 1>&6
11186   native_sound_lib="-laudio"
11187 else
11188   echo "$ac_t""no" 1>&6
11189 fi
11190
11191
11192       fi
11193       if test -n "$native_sound_lib"; then
11194         sound_found=yes sound_cflags=""
11195         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11196    echo "    xemacs will be linked with \"sgiplay.o\""
11197  fi
11198       fi ;;
11199     hppa*-hp-hpux* )
11200       if test -z "$native_sound_lib"; then
11201         
11202 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11203 echo "configure:11204: checking for AOpenAudio in -lAlib" >&5
11204 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11205
11206 xe_check_libs=" -lAlib "
11207 cat > conftest.$ac_ext <<EOF
11208 #line 11209 "configure"
11209 #include "confdefs.h"
11210 /* Override any gcc2 internal prototype to avoid an error.  */
11211 /* We use char because int might match the return type of a gcc2
11212     builtin and then its argument prototype would still apply.  */
11213 char AOpenAudio();
11214
11215 int main() {
11216 AOpenAudio()
11217 ; return 0; }
11218 EOF
11219 if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11220   rm -rf conftest*
11221   eval "ac_cv_lib_$ac_lib_var=yes"
11222 else
11223   echo "configure: failed program was:" >&5
11224   cat conftest.$ac_ext >&5
11225   rm -rf conftest*
11226   eval "ac_cv_lib_$ac_lib_var=no"
11227 fi
11228 rm -f conftest*
11229 xe_check_libs=""
11230
11231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11232   echo "$ac_t""yes" 1>&6
11233   native_sound_lib="-lAlib"
11234 else
11235   echo "$ac_t""no" 1>&6
11236 fi
11237
11238
11239       fi
11240       if test -n "$native_sound_lib"; then
11241         sound_found=yes
11242         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11243    echo "    xemacs will be linked with \"hpplay.o\""
11244  fi
11245         if test "$GCC" = "yes" # Kludge city
11246           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11247           else sound_cflags="+e -I/usr/audio/examples"
11248         fi
11249       fi ;;
11250     esac
11251   fi
11252
11253     if test -z "$sound_found"; then
11254     for dir in "machine" "sys" "linux"; do
11255       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11256 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11257 echo "configure:11258: checking for ${dir}/soundcard.h" >&5
11258
11259 cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 #include <${dir}/soundcard.h>
11263 EOF
11264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11265 { (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11267 if test -z "$ac_err"; then
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=yes"
11270 else
11271   echo "$ac_err" >&5
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_header_$ac_safe=no"
11276 fi
11277 rm -f conftest*
11278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11279   echo "$ac_t""yes" 1>&6
11280   sound_found=yes
11281        need_miscplay=yes
11282         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11283    echo "    xemacs will be linked with \"linuxplay.o\""
11284  fi
11285         { test "$extra_verbose" = "yes" && cat << EOF
11286     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11287 EOF
11288 cat >> confdefs.h <<EOF
11289 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11290 EOF
11291 }
11292
11293         break
11294 else
11295   echo "$ac_t""no" 1>&6
11296 fi
11297
11298     done
11299   fi
11300
11301   test "$sound_found" = "yes" && with_native_sound=yes
11302 fi
11303
11304 if test "$with_native_sound" = "yes"; then
11305   { test "$extra_verbose" = "yes" && cat << \EOF
11306     Defining HAVE_NATIVE_SOUND
11307 EOF
11308 cat >> confdefs.h <<\EOF
11309 #define HAVE_NATIVE_SOUND 1
11310 EOF
11311 }
11312
11313   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11314 fi
11315
11316 if test "$with_nas_sound" != "no"; then
11317   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11318 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11319 echo "configure:11320: checking for audio/audiolib.h" >&5
11320
11321 cat > conftest.$ac_ext <<EOF
11322 #line 11323 "configure"
11323 #include "confdefs.h"
11324 #include <audio/audiolib.h>
11325 EOF
11326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11327 { (eval echo configure:11328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11329 if test -z "$ac_err"; then
11330   rm -rf conftest*
11331   eval "ac_cv_header_$ac_safe=yes"
11332 else
11333   echo "$ac_err" >&5
11334   echo "configure: failed program was:" >&5
11335   cat conftest.$ac_ext >&5
11336   rm -rf conftest*
11337   eval "ac_cv_header_$ac_safe=no"
11338 fi
11339 rm -f conftest*
11340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11341   echo "$ac_t""yes" 1>&6
11342   
11343     
11344 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11345 echo "configure:11346: checking for AuOpenServer in -laudio" >&5
11346 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11347
11348 xe_check_libs=" -laudio "
11349 cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352 /* Override any gcc2 internal prototype to avoid an error.  */
11353 /* We use char because int might match the return type of a gcc2
11354     builtin and then its argument prototype would still apply.  */
11355 char AuOpenServer();
11356
11357 int main() {
11358 AuOpenServer()
11359 ; return 0; }
11360 EOF
11361 if { (eval echo configure:11362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11362   rm -rf conftest*
11363   eval "ac_cv_lib_$ac_lib_var=yes"
11364 else
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   eval "ac_cv_lib_$ac_lib_var=no"
11369 fi
11370 rm -f conftest*
11371 xe_check_libs=""
11372
11373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11374   echo "$ac_t""yes" 1>&6
11375   have_nas_sound=yes
11376 else
11377   echo "$ac_t""no" 1>&6
11378 fi
11379
11380
11381 else
11382   echo "$ac_t""no" 1>&6
11383 fi
11384
11385   if test "$have_nas_sound" = "yes"; then
11386     with_nas_sound=yes
11387     { test "$extra_verbose" = "yes" && cat << \EOF
11388     Defining HAVE_NAS_SOUND
11389 EOF
11390 cat >> confdefs.h <<\EOF
11391 #define HAVE_NAS_SOUND 1
11392 EOF
11393 }
11394
11395     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11396    echo "    xemacs will be linked with \"nas.o\""
11397  fi
11398     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11399             cat > conftest.$ac_ext <<EOF
11400 #line 11401 "configure"
11401 #include "confdefs.h"
11402 #include <audio/Xtutil.h>
11403 EOF
11404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11406   :
11407 else
11408   rm -rf conftest*
11409   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11410     Defining NAS_NO_ERROR_JUMP
11411 EOF
11412 cat >> confdefs.h <<\EOF
11413 #define NAS_NO_ERROR_JUMP 1
11414 EOF
11415 }
11416
11417 fi
11418 rm -f conftest*
11419
11420   else
11421     test "$with_nas_sound" = "yes" && \
11422       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11423     with_nas_sound=no
11424   fi
11425 fi
11426
11427 if test "$with_esd_sound" != "no"; then
11428   # Extract the first word of "esd-config", so it can be a program name with args.
11429 set dummy esd-config; ac_word=$2
11430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11431 echo "configure:11432: checking for $ac_word" >&5
11432
11433 if test -n "$have_esd_config"; then
11434   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11435 else
11436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11437   ac_dummy="$PATH"
11438   for ac_dir in $ac_dummy; do
11439     test -z "$ac_dir" && ac_dir=.
11440     if test -f $ac_dir/$ac_word; then
11441       ac_cv_prog_have_esd_config="yes"
11442       break
11443     fi
11444   done
11445   IFS="$ac_save_ifs"
11446   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11447 fi
11448 have_esd_config="$ac_cv_prog_have_esd_config"
11449 if test -n "$have_esd_config"; then
11450   echo "$ac_t""$have_esd_config" 1>&6
11451 else
11452   echo "$ac_t""no" 1>&6
11453 fi
11454
11455   if test "$have_esd_config" = "yes"; then
11456     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11457     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
11458     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11459     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11460 echo "configure:11461: checking for esd_play_stream" >&5
11461
11462 cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465 /* System header to define __stub macros and hopefully few prototypes,
11466     which can conflict with char esd_play_stream(); below.  */
11467 #include <assert.h>
11468 /* Override any gcc2 internal prototype to avoid an error.  */
11469 /* We use char because int might match the return type of a gcc2
11470     builtin and then its argument prototype would still apply.  */
11471 char esd_play_stream();
11472
11473 int main() {
11474
11475 /* The GNU C library defines this for functions which it implements
11476     to always fail with ENOSYS.  Some functions are actually named
11477     something starting with __ and the normal name is an alias.  */
11478 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11479 choke me
11480 #else
11481 esd_play_stream();
11482 #endif
11483
11484 ; return 0; }
11485 EOF
11486 if { (eval echo configure:11487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11487   rm -rf conftest*
11488   eval "ac_cv_func_esd_play_stream=yes"
11489 else
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -rf conftest*
11493   eval "ac_cv_func_esd_play_stream=no"
11494 fi
11495 rm -f conftest*
11496
11497 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11498   echo "$ac_t""yes" 1>&6
11499   have_esd_sound=yes
11500 else
11501   echo "$ac_t""no" 1>&6
11502 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11503 fi
11504
11505   fi
11506
11507   if test "$have_esd_sound" = "yes"; then
11508     with_esd_sound=yes
11509     need_miscplay=yes
11510     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11511    echo "    xemacs will be linked with \"esd.o\""
11512  fi
11513     { test "$extra_verbose" = "yes" && cat << \EOF
11514     Defining HAVE_ESD_SOUND
11515 EOF
11516 cat >> confdefs.h <<\EOF
11517 #define HAVE_ESD_SOUND 1
11518 EOF
11519 }
11520
11521   else
11522     test "$with_esd_sound" = "yes" && \
11523       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11524     with_esd_sound=no
11525   fi
11526 fi
11527
11528 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11529    echo "    xemacs will be linked with \"miscplay.o\""
11530  fi
11531
11532
11533 test -z "$with_tty" && with_tty=yes
11534
11535 if test "$with_tty" = "yes"  ; then
11536   echo "checking for TTY-related features" 1>&6
11537 echo "configure:11538: checking for TTY-related features" >&5
11538   { test "$extra_verbose" = "yes" && cat << \EOF
11539     Defining HAVE_TTY
11540 EOF
11541 cat >> confdefs.h <<\EOF
11542 #define HAVE_TTY 1
11543 EOF
11544 }
11545
11546   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
11547    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\""
11548  fi
11549
11550     if test -z "$with_ncurses"; then
11551     
11552 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11553 echo "configure:11554: checking for tgetent in -lncurses" >&5
11554 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11555
11556 xe_check_libs=" -lncurses "
11557 cat > conftest.$ac_ext <<EOF
11558 #line 11559 "configure"
11559 #include "confdefs.h"
11560 /* Override any gcc2 internal prototype to avoid an error.  */
11561 /* We use char because int might match the return type of a gcc2
11562     builtin and then its argument prototype would still apply.  */
11563 char tgetent();
11564
11565 int main() {
11566 tgetent()
11567 ; return 0; }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11570   rm -rf conftest*
11571   eval "ac_cv_lib_$ac_lib_var=yes"
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   eval "ac_cv_lib_$ac_lib_var=no"
11577 fi
11578 rm -f conftest*
11579 xe_check_libs=""
11580
11581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11582   echo "$ac_t""yes" 1>&6
11583   with_ncurses=yes
11584 else
11585   echo "$ac_t""no" 1>&6
11586 with_ncurses=no
11587 fi
11588
11589
11590   fi
11591   if test "$with_ncurses" = "yes"; then
11592     { test "$extra_verbose" = "yes" && cat << \EOF
11593     Defining HAVE_NCURSES
11594 EOF
11595 cat >> confdefs.h <<\EOF
11596 #define HAVE_NCURSES 1
11597 EOF
11598 }
11599
11600     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11601 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11602 echo "configure:11603: checking for ncurses/curses.h" >&5
11603
11604 cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 #include <ncurses/curses.h>
11608 EOF
11609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11610 { (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11612 if test -z "$ac_err"; then
11613   rm -rf conftest*
11614   eval "ac_cv_header_$ac_safe=yes"
11615 else
11616   echo "$ac_err" >&5
11617   echo "configure: failed program was:" >&5
11618   cat conftest.$ac_ext >&5
11619   rm -rf conftest*
11620   eval "ac_cv_header_$ac_safe=no"
11621 fi
11622 rm -f conftest*
11623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625   curses_h_path=ncurses/curses.h
11626 else
11627   echo "$ac_t""no" 1>&6
11628 fi
11629
11630     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11631 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11632 echo "configure:11633: checking for ncurses/term.h" >&5
11633
11634 cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637 #include <ncurses/term.h>
11638 EOF
11639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11640 { (eval echo configure:11641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11642 if test -z "$ac_err"; then
11643   rm -rf conftest*
11644   eval "ac_cv_header_$ac_safe=yes"
11645 else
11646   echo "$ac_err" >&5
11647   echo "configure: failed program was:" >&5
11648   cat conftest.$ac_ext >&5
11649   rm -rf conftest*
11650   eval "ac_cv_header_$ac_safe=no"
11651 fi
11652 rm -f conftest*
11653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11654   echo "$ac_t""yes" 1>&6
11655   term_h_path=ncurses/term.h
11656 else
11657   echo "$ac_t""no" 1>&6
11658 fi
11659
11660     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11661    echo "    xemacs will be linked with \"terminfo.o\""
11662  fi
11663     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11664
11665     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11666                         save_c_switch_site="$c_switch_site"
11667       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11668       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11669 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11670 echo "configure:11671: checking for ncurses/curses.h" >&5
11671
11672 cat > conftest.$ac_ext <<EOF
11673 #line 11674 "configure"
11674 #include "confdefs.h"
11675 #include <ncurses/curses.h>
11676 EOF
11677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11678 { (eval echo configure:11679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11680 if test -z "$ac_err"; then
11681   rm -rf conftest*
11682   eval "ac_cv_header_$ac_safe=yes"
11683 else
11684   echo "$ac_err" >&5
11685   echo "configure: failed program was:" >&5
11686   cat conftest.$ac_ext >&5
11687   rm -rf conftest*
11688   eval "ac_cv_header_$ac_safe=no"
11689 fi
11690 rm -f conftest*
11691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11692   echo "$ac_t""yes" 1>&6
11693   curses_h_path=ncurses/curses.h
11694 else
11695   echo "$ac_t""no" 1>&6
11696 fi
11697
11698       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11699         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11700         else c_switch_site="$save_c_switch_site"
11701       fi
11702     fi
11703   else         if test "$have_terminfo" = "yes"; then
11704       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11705    echo "    xemacs will be linked with \"terminfo.o\""
11706  fi
11707       if test -n "$libs_termcap"; then
11708         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11709       else
11710         for lib in curses termlib termcap; do
11711           
11712 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11713 echo "configure:11714: checking for tgetent in -l$lib" >&5
11714 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11715
11716 xe_check_libs=" -l$lib "
11717 cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720 /* Override any gcc2 internal prototype to avoid an error.  */
11721 /* We use char because int might match the return type of a gcc2
11722     builtin and then its argument prototype would still apply.  */
11723 char tgetent();
11724
11725 int main() {
11726 tgetent()
11727 ; return 0; }
11728 EOF
11729 if { (eval echo configure:11730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11730   rm -rf conftest*
11731   eval "ac_cv_lib_$ac_lib_var=yes"
11732 else
11733   echo "configure: failed program was:" >&5
11734   cat conftest.$ac_ext >&5
11735   rm -rf conftest*
11736   eval "ac_cv_lib_$ac_lib_var=no"
11737 fi
11738 rm -f conftest*
11739 xe_check_libs=""
11740
11741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11742   echo "$ac_t""yes" 1>&6
11743   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11744 else
11745   echo "$ac_t""no" 1>&6
11746 fi
11747
11748
11749         done
11750       fi
11751     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11752    echo "    xemacs will be linked with \"tparam.o\""
11753  fi
11754                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11755       if test -n "$libs_termcap"; then
11756         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11757       else
11758         
11759 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11760 echo "configure:11761: checking for tgetent in -lcurses" >&5
11761 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11762
11763 xe_check_libs=" -lcurses "
11764 cat > conftest.$ac_ext <<EOF
11765 #line 11766 "configure"
11766 #include "confdefs.h"
11767 /* Override any gcc2 internal prototype to avoid an error.  */
11768 /* We use char because int might match the return type of a gcc2
11769     builtin and then its argument prototype would still apply.  */
11770 char tgetent();
11771
11772 int main() {
11773 tgetent()
11774 ; return 0; }
11775 EOF
11776 if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11777   rm -rf conftest*
11778   eval "ac_cv_lib_$ac_lib_var=yes"
11779 else
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -rf conftest*
11783   eval "ac_cv_lib_$ac_lib_var=no"
11784 fi
11785 rm -f conftest*
11786 xe_check_libs=""
11787
11788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11789   echo "$ac_t""yes" 1>&6
11790   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11791 else
11792   echo "$ac_t""no" 1>&6
11793 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11794 echo "configure:11795: checking for tgetent in -ltermcap" >&5
11795 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11796
11797 xe_check_libs=" -ltermcap "
11798 cat > conftest.$ac_ext <<EOF
11799 #line 11800 "configure"
11800 #include "confdefs.h"
11801 /* Override any gcc2 internal prototype to avoid an error.  */
11802 /* We use char because int might match the return type of a gcc2
11803     builtin and then its argument prototype would still apply.  */
11804 char tgetent();
11805
11806 int main() {
11807 tgetent()
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   eval "ac_cv_lib_$ac_lib_var=yes"
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   eval "ac_cv_lib_$ac_lib_var=no"
11818 fi
11819 rm -f conftest*
11820 xe_check_libs=""
11821
11822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11823   echo "$ac_t""yes" 1>&6
11824   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11825 else
11826   echo "$ac_t""no" 1>&6
11827 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11828    echo "    xemacs will be linked with \"termcap.o\""
11829  fi
11830 fi
11831
11832
11833 fi
11834
11835
11836       fi
11837     fi
11838   fi
11839   { test "$extra_verbose" = "yes" && cat << EOF
11840     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11841 EOF
11842 cat >> confdefs.h <<EOF
11843 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11844 EOF
11845 }
11846
11847   { test "$extra_verbose" = "yes" && cat << EOF
11848     Defining TERM_H_PATH = "${term_h_path-term.h}"
11849 EOF
11850 cat >> confdefs.h <<EOF
11851 #define TERM_H_PATH "${term_h_path-term.h}"
11852 EOF
11853 }
11854
11855
11856     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11857 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11858 echo "configure:11859: checking for gpm.h" >&5
11859
11860 cat > conftest.$ac_ext <<EOF
11861 #line 11862 "configure"
11862 #include "confdefs.h"
11863 #include <gpm.h>
11864 EOF
11865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11866 { (eval echo configure:11867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11868 if test -z "$ac_err"; then
11869   rm -rf conftest*
11870   eval "ac_cv_header_$ac_safe=yes"
11871 else
11872   echo "$ac_err" >&5
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   eval "ac_cv_header_$ac_safe=no"
11877 fi
11878 rm -f conftest*
11879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11880   echo "$ac_t""yes" 1>&6
11881   :
11882 else
11883   echo "$ac_t""no" 1>&6
11884 with_gpm=no
11885 fi
11886  }
11887   test -z "$with_gpm" && { 
11888 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11889 echo "configure:11890: checking for Gpm_Open in -lgpm" >&5
11890 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11891
11892 xe_check_libs=" -lgpm "
11893 cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 /* Override any gcc2 internal prototype to avoid an error.  */
11897 /* We use char because int might match the return type of a gcc2
11898     builtin and then its argument prototype would still apply.  */
11899 char Gpm_Open();
11900
11901 int main() {
11902 Gpm_Open()
11903 ; return 0; }
11904 EOF
11905 if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11906   rm -rf conftest*
11907   eval "ac_cv_lib_$ac_lib_var=yes"
11908 else
11909   echo "configure: failed program was:" >&5
11910   cat conftest.$ac_ext >&5
11911   rm -rf conftest*
11912   eval "ac_cv_lib_$ac_lib_var=no"
11913 fi
11914 rm -f conftest*
11915 xe_check_libs=""
11916
11917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11918   echo "$ac_t""yes" 1>&6
11919   with_gpm=yes
11920 else
11921   echo "$ac_t""no" 1>&6
11922 with_gpm=no
11923 fi
11924
11925  }
11926   if test "$with_gpm" = "yes"; then
11927     { test "$extra_verbose" = "yes" && cat << \EOF
11928     Defining HAVE_GPM
11929 EOF
11930 cat >> confdefs.h <<\EOF
11931 #define HAVE_GPM 1
11932 EOF
11933 }
11934
11935     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11936    echo "    xemacs will be linked with \"gpmevent.o\""
11937  fi
11938     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11939   fi
11940
11941 else   for feature in ncurses gpm; do
11942     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11943       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11944     fi
11945     eval "with_${feature}=no"
11946   done
11947 fi 
11948 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11949    echo "    xemacs will be linked with \"event-unixoid.o\""
11950  fi
11951
11952
11953 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11954   != "no no no" && echo "checking for database support" 1>&6
11955 echo "configure:11956: checking for database support" >&5
11956
11957 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11958   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11959 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11960 echo "configure:11961: checking for ndbm.h" >&5
11961
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 #include <ndbm.h>
11966 EOF
11967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11968 { (eval echo configure:11969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11970 if test -z "$ac_err"; then
11971   rm -rf conftest*
11972   eval "ac_cv_header_$ac_safe=yes"
11973 else
11974   echo "$ac_err" >&5
11975   echo "configure: failed program was:" >&5
11976   cat conftest.$ac_ext >&5
11977   rm -rf conftest*
11978   eval "ac_cv_header_$ac_safe=no"
11979 fi
11980 rm -f conftest*
11981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11982   echo "$ac_t""yes" 1>&6
11983   :
11984 else
11985   echo "$ac_t""no" 1>&6
11986
11987     test "$with_database_gdbm" = "yes" -o \
11988          "$with_database_dbm"  = "yes" && \
11989       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11990     with_database_gdbm=no with_database_dbm=no
11991 fi
11992
11993 fi
11994
11995 if test "$with_database_gdbm" != "no"; then
11996   
11997 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11998 echo "configure:11999: checking for dbm_open in -lgdbm" >&5
11999 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12000
12001 xe_check_libs=" -lgdbm "
12002 cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 /* Override any gcc2 internal prototype to avoid an error.  */
12006 /* We use char because int might match the return type of a gcc2
12007     builtin and then its argument prototype would still apply.  */
12008 char dbm_open();
12009
12010 int main() {
12011 dbm_open()
12012 ; return 0; }
12013 EOF
12014 if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12015   rm -rf conftest*
12016   eval "ac_cv_lib_$ac_lib_var=yes"
12017 else
12018   echo "configure: failed program was:" >&5
12019   cat conftest.$ac_ext >&5
12020   rm -rf conftest*
12021   eval "ac_cv_lib_$ac_lib_var=no"
12022 fi
12023 rm -f conftest*
12024 xe_check_libs=""
12025
12026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12027   echo "$ac_t""yes" 1>&6
12028   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12029 else
12030   echo "$ac_t""no" 1>&6
12031 if test "$with_database_gdbm" = "yes"; then
12032      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12033    fi
12034    with_database_gdbm=no
12035 fi
12036
12037
12038 fi
12039
12040 if test "$with_database_dbm" != "no"; then
12041   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12042 echo "configure:12043: checking for dbm_open" >&5
12043
12044 cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047 /* System header to define __stub macros and hopefully few prototypes,
12048     which can conflict with char dbm_open(); below.  */
12049 #include <assert.h>
12050 /* Override any gcc2 internal prototype to avoid an error.  */
12051 /* We use char because int might match the return type of a gcc2
12052     builtin and then its argument prototype would still apply.  */
12053 char dbm_open();
12054
12055 int main() {
12056
12057 /* The GNU C library defines this for functions which it implements
12058     to always fail with ENOSYS.  Some functions are actually named
12059     something starting with __ and the normal name is an alias.  */
12060 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12061 choke me
12062 #else
12063 dbm_open();
12064 #endif
12065
12066 ; return 0; }
12067 EOF
12068 if { (eval echo configure:12069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12069   rm -rf conftest*
12070   eval "ac_cv_func_dbm_open=yes"
12071 else
12072   echo "configure: failed program was:" >&5
12073   cat conftest.$ac_ext >&5
12074   rm -rf conftest*
12075   eval "ac_cv_func_dbm_open=no"
12076 fi
12077 rm -f conftest*
12078
12079 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12080   echo "$ac_t""yes" 1>&6
12081   with_database_dbm=yes libdbm=
12082 else
12083   echo "$ac_t""no" 1>&6
12084
12085     
12086 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12087 echo "configure:12088: checking for dbm_open in -ldbm" >&5
12088 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12089
12090 xe_check_libs=" -ldbm "
12091 cat > conftest.$ac_ext <<EOF
12092 #line 12093 "configure"
12093 #include "confdefs.h"
12094 /* Override any gcc2 internal prototype to avoid an error.  */
12095 /* We use char because int might match the return type of a gcc2
12096     builtin and then its argument prototype would still apply.  */
12097 char dbm_open();
12098
12099 int main() {
12100 dbm_open()
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12104   rm -rf conftest*
12105   eval "ac_cv_lib_$ac_lib_var=yes"
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   eval "ac_cv_lib_$ac_lib_var=no"
12111 fi
12112 rm -f conftest*
12113 xe_check_libs=""
12114
12115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12116   echo "$ac_t""yes" 1>&6
12117   with_database_dbm=yes libdbm=-ldbm
12118 else
12119   echo "$ac_t""no" 1>&6
12120 test "$with_database_dbm" = "yes" && \
12121         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12122       with_database_dbm=no
12123 fi
12124
12125
12126 fi
12127
12128 fi
12129
12130 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12131 test "$with_database_gdbm" = "yes" -o \
12132      "$with_database_dbm"  = "yes" && \
12133   { test "$extra_verbose" = "yes" && cat << \EOF
12134     Defining HAVE_DBM
12135 EOF
12136 cat >> confdefs.h <<\EOF
12137 #define HAVE_DBM 1
12138 EOF
12139 }
12140
12141
12142 if test "$with_database_berkdb" != "no"; then
12143   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12144 echo "configure:12145: checking for Berkeley db.h" >&5
12145   for path in "db/db.h" "db.h"; do
12146     cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149 #ifdef HAVE_INTTYPES_H
12150 #define __BIT_TYPES_DEFINED__
12151 #include <inttypes.h>
12152 typedef uint8_t  u_int8_t;
12153 typedef uint16_t u_int16_t;
12154 typedef uint32_t u_int32_t;
12155 #ifdef WE_DONT_NEED_QUADS
12156 typedef uint64_t u_int64_t;
12157 #endif
12158 #endif
12159 #include <$path>
12160
12161 int main() {
12162
12163 ; return 0; }
12164 EOF
12165 if { (eval echo configure:12166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12166   rm -rf conftest*
12167   db_h_path="$path"; break
12168 else
12169   echo "configure: failed program was:" >&5
12170   cat conftest.$ac_ext >&5
12171 fi
12172 rm -f conftest*
12173   done
12174   if test -z "$db_h_path"
12175   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12176   else echo "$ac_t""$db_h_path" 1>&6
12177   fi
12178
12179   if test "$with_database_berkdb" != "no"; then
12180     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12181 echo "configure:12182: checking for Berkeley DB version" >&5
12182     cat > conftest.$ac_ext <<EOF
12183 #line 12184 "configure"
12184 #include "confdefs.h"
12185 #include <$db_h_path>
12186 #if DB_VERSION_MAJOR > 1
12187 yes
12188 #endif
12189
12190 EOF
12191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12192   egrep "yes" >/dev/null 2>&1; then
12193   rm -rf conftest*
12194   echo "$ac_t""2" 1>&6; dbfunc=db_open
12195 else
12196   rm -rf conftest*
12197   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12198 fi
12199 rm -f conftest*
12200
12201     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12202 echo "configure:12203: checking for $dbfunc" >&5
12203
12204 cat > conftest.$ac_ext <<EOF
12205 #line 12206 "configure"
12206 #include "confdefs.h"
12207 /* System header to define __stub macros and hopefully few prototypes,
12208     which can conflict with char $dbfunc(); below.  */
12209 #include <assert.h>
12210 /* Override any gcc2 internal prototype to avoid an error.  */
12211 /* We use char because int might match the return type of a gcc2
12212     builtin and then its argument prototype would still apply.  */
12213 char $dbfunc();
12214
12215 int main() {
12216
12217 /* The GNU C library defines this for functions which it implements
12218     to always fail with ENOSYS.  Some functions are actually named
12219     something starting with __ and the normal name is an alias.  */
12220 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12221 choke me
12222 #else
12223 $dbfunc();
12224 #endif
12225
12226 ; return 0; }
12227 EOF
12228 if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12229   rm -rf conftest*
12230   eval "ac_cv_func_$dbfunc=yes"
12231 else
12232   echo "configure: failed program was:" >&5
12233   cat conftest.$ac_ext >&5
12234   rm -rf conftest*
12235   eval "ac_cv_func_$dbfunc=no"
12236 fi
12237 rm -f conftest*
12238
12239 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12240   echo "$ac_t""yes" 1>&6
12241   with_database_berkdb=yes need_libdb=no
12242 else
12243   echo "$ac_t""no" 1>&6
12244
12245     
12246 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12247 echo "configure:12248: checking for $dbfunc in -ldb" >&5
12248 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12249
12250 xe_check_libs=" -ldb "
12251 cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254 /* Override any gcc2 internal prototype to avoid an error.  */
12255 /* We use char because int might match the return type of a gcc2
12256     builtin and then its argument prototype would still apply.  */
12257 char $dbfunc();
12258
12259 int main() {
12260 $dbfunc()
12261 ; return 0; }
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12264   rm -rf conftest*
12265   eval "ac_cv_lib_$ac_lib_var=yes"
12266 else
12267   echo "configure: failed program was:" >&5
12268   cat conftest.$ac_ext >&5
12269   rm -rf conftest*
12270   eval "ac_cv_lib_$ac_lib_var=no"
12271 fi
12272 rm -f conftest*
12273 xe_check_libs=""
12274
12275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12276   echo "$ac_t""yes" 1>&6
12277   with_database_berkdb=yes need_libdb=yes
12278 else
12279   echo "$ac_t""no" 1>&6
12280 fi
12281
12282
12283 fi
12284
12285   fi
12286
12287   if test "$with_database_berkdb" = "yes"; then
12288     { test "$extra_verbose" = "yes" && cat << EOF
12289     Defining DB_H_PATH = "$db_h_path"
12290 EOF
12291 cat >> confdefs.h <<EOF
12292 #define DB_H_PATH "$db_h_path"
12293 EOF
12294 }
12295
12296     { test "$extra_verbose" = "yes" && cat << \EOF
12297     Defining HAVE_BERKELEY_DB
12298 EOF
12299 cat >> confdefs.h <<\EOF
12300 #define HAVE_BERKELEY_DB 1
12301 EOF
12302 }
12303
12304     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12305   else with_database_berkdb=no
12306   fi
12307 fi
12308
12309 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12310      != "no no no"; then
12311   { test "$extra_verbose" = "yes" && cat << \EOF
12312     Defining HAVE_DATABASE
12313 EOF
12314 cat >> confdefs.h <<\EOF
12315 #define HAVE_DATABASE 1
12316 EOF
12317 }
12318
12319   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12320    echo "    xemacs will be linked with \"database.o\""
12321  fi
12322 fi
12323
12324 if test "$with_socks" = "yes"; then
12325   
12326 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12327 echo "configure:12328: checking for SOCKSinit in -lsocks" >&5
12328 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12329
12330 xe_check_libs=" -lsocks "
12331 cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* Override any gcc2 internal prototype to avoid an error.  */
12335 /* We use char because int might match the return type of a gcc2
12336     builtin and then its argument prototype would still apply.  */
12337 char SOCKSinit();
12338
12339 int main() {
12340 SOCKSinit()
12341 ; return 0; }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12344   rm -rf conftest*
12345   eval "ac_cv_lib_$ac_lib_var=yes"
12346 else
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -rf conftest*
12350   eval "ac_cv_lib_$ac_lib_var=no"
12351 fi
12352 rm -f conftest*
12353 xe_check_libs=""
12354
12355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12356   echo "$ac_t""yes" 1>&6
12357     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12358     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12359   { test "$extra_verbose" = "yes" && cat << EOF
12360     Defining $ac_tr_lib
12361 EOF
12362 cat >> confdefs.h <<EOF
12363 #define $ac_tr_lib 1
12364 EOF
12365 }
12366
12367   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12368
12369 else
12370   echo "$ac_t""no" 1>&6
12371 fi
12372
12373
12374   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12375     Defining HAVE_SOCKS
12376 EOF
12377 cat >> confdefs.h <<\EOF
12378 #define HAVE_SOCKS 1
12379 EOF
12380 }
12381
12382 fi
12383
12384 if test "$usage_tracking" = "yes"; then
12385   { test "$extra_verbose" = "yes" && cat << \EOF
12386     Defining USAGE_TRACKING
12387 EOF
12388 cat >> confdefs.h <<\EOF
12389 #define USAGE_TRACKING 1
12390 EOF
12391 }
12392
12393   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12394 fi
12395
12396 if test "$with_modules" != "no"; then
12397   echo "checking for module support" 1>&6
12398 echo "configure:12399: checking for module support" >&5
12399
12400     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12401 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12402 echo "configure:12403: checking for dlfcn.h" >&5
12403
12404 cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 #include <dlfcn.h>
12408 EOF
12409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12410 { (eval echo configure:12411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12412 if test -z "$ac_err"; then
12413   rm -rf conftest*
12414   eval "ac_cv_header_$ac_safe=yes"
12415 else
12416   echo "$ac_err" >&5
12417   echo "configure: failed program was:" >&5
12418   cat conftest.$ac_ext >&5
12419   rm -rf conftest*
12420   eval "ac_cv_header_$ac_safe=no"
12421 fi
12422 rm -f conftest*
12423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12424   echo "$ac_t""yes" 1>&6
12425   
12426     
12427 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12428 echo "configure:12429: checking for dlopen in -ldl" >&5
12429 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12430
12431 xe_check_libs=" -ldl "
12432 cat > conftest.$ac_ext <<EOF
12433 #line 12434 "configure"
12434 #include "confdefs.h"
12435 /* Override any gcc2 internal prototype to avoid an error.  */
12436 /* We use char because int might match the return type of a gcc2
12437     builtin and then its argument prototype would still apply.  */
12438 char dlopen();
12439
12440 int main() {
12441 dlopen()
12442 ; return 0; }
12443 EOF
12444 if { (eval echo configure:12445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12445   rm -rf conftest*
12446   eval "ac_cv_lib_$ac_lib_var=yes"
12447 else
12448   echo "configure: failed program was:" >&5
12449   cat conftest.$ac_ext >&5
12450   rm -rf conftest*
12451   eval "ac_cv_lib_$ac_lib_var=no"
12452 fi
12453 rm -f conftest*
12454 xe_check_libs=""
12455
12456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12457   echo "$ac_t""yes" 1>&6
12458   have_dl=yes libdl=dl
12459 else
12460   echo "$ac_t""no" 1>&6
12461
12462 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12463 echo "configure:12464: checking for dlopen in -lc" >&5
12464 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12465
12466 xe_check_libs=" -lc "
12467 cat > conftest.$ac_ext <<EOF
12468 #line 12469 "configure"
12469 #include "confdefs.h"
12470 /* Override any gcc2 internal prototype to avoid an error.  */
12471 /* We use char because int might match the return type of a gcc2
12472     builtin and then its argument prototype would still apply.  */
12473 char dlopen();
12474
12475 int main() {
12476 dlopen()
12477 ; return 0; }
12478 EOF
12479 if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12480   rm -rf conftest*
12481   eval "ac_cv_lib_$ac_lib_var=yes"
12482 else
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -rf conftest*
12486   eval "ac_cv_lib_$ac_lib_var=no"
12487 fi
12488 rm -f conftest*
12489 xe_check_libs=""
12490
12491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12492   echo "$ac_t""yes" 1>&6
12493   have_dl=yes 
12494 else
12495   echo "$ac_t""no" 1>&6
12496 fi
12497
12498
12499 fi
12500
12501
12502 else
12503   echo "$ac_t""no" 1>&6
12504 fi
12505
12506   if test -n "$have_dl"; then
12507     { test "$extra_verbose" = "yes" && cat << \EOF
12508     Defining HAVE_DLOPEN
12509 EOF
12510 cat >> confdefs.h <<\EOF
12511 #define HAVE_DLOPEN 1
12512 EOF
12513 }
12514
12515   else
12516     
12517 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12518 echo "configure:12519: checking for shl_load in -ldld" >&5
12519 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12520
12521 xe_check_libs=" -ldld "
12522 cat > conftest.$ac_ext <<EOF
12523 #line 12524 "configure"
12524 #include "confdefs.h"
12525 /* Override any gcc2 internal prototype to avoid an error.  */
12526 /* We use char because int might match the return type of a gcc2
12527     builtin and then its argument prototype would still apply.  */
12528 char shl_load();
12529
12530 int main() {
12531 shl_load()
12532 ; return 0; }
12533 EOF
12534 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12535   rm -rf conftest*
12536   eval "ac_cv_lib_$ac_lib_var=yes"
12537 else
12538   echo "configure: failed program was:" >&5
12539   cat conftest.$ac_ext >&5
12540   rm -rf conftest*
12541   eval "ac_cv_lib_$ac_lib_var=no"
12542 fi
12543 rm -f conftest*
12544 xe_check_libs=""
12545
12546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12547   echo "$ac_t""yes" 1>&6
12548   libdl=dld have_dl=yes;
12549       { test "$extra_verbose" = "yes" && cat << \EOF
12550     Defining HAVE_SHL_LOAD
12551 EOF
12552 cat >> confdefs.h <<\EOF
12553 #define HAVE_SHL_LOAD 1
12554 EOF
12555 }
12556
12557 else
12558   echo "$ac_t""no" 1>&6
12559
12560 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12561 echo "configure:12562: checking for dld_init in -ldld" >&5
12562 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12563
12564 xe_check_libs=" -ldld "
12565 cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568 /* Override any gcc2 internal prototype to avoid an error.  */
12569 /* We use char because int might match the return type of a gcc2
12570     builtin and then its argument prototype would still apply.  */
12571 char dld_init();
12572
12573 int main() {
12574 dld_init()
12575 ; return 0; }
12576 EOF
12577 if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12578   rm -rf conftest*
12579   eval "ac_cv_lib_$ac_lib_var=yes"
12580 else
12581   echo "configure: failed program was:" >&5
12582   cat conftest.$ac_ext >&5
12583   rm -rf conftest*
12584   eval "ac_cv_lib_$ac_lib_var=no"
12585 fi
12586 rm -f conftest*
12587 xe_check_libs=""
12588
12589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12590   echo "$ac_t""yes" 1>&6
12591   libdl=dld have_dl=yes;
12592       { test "$extra_verbose" = "yes" && cat << \EOF
12593     Defining HAVE_DLD_INIT
12594 EOF
12595 cat >> confdefs.h <<\EOF
12596 #define HAVE_DLD_INIT 1
12597 EOF
12598 }
12599
12600 else
12601   echo "$ac_t""no" 1>&6
12602 fi
12603
12604
12605 fi
12606
12607
12608   fi
12609
12610   if test -n "$have_dl"; then
12611         
12612 dll_ld=
12613 dll_ldflags=
12614 dll_cflags=
12615 dll_post=
12616 dll_ldo="-o"
12617 ld_dynamic_link_flags=
12618 xehost=$canonical
12619 xealias=$internal_configuration
12620
12621 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12622 echo "configure:12623: checking how to build dynamic libraries for ${xehost}" >&5
12623 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12624 case "$xehost" in
12625 *-*-linux-gnu*) ;;
12626 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12627 esac
12628
12629 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12630 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12631 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12632
12633 case "$xehost_os" in
12634 aix3*)
12635   # AIX sometimes has problems with the GCC collect2 program.  For some
12636   # reason, if we set the COLLECT_NAMES environment variable, the problems
12637   # vanish in a puff of smoke.
12638   if test "${COLLECT_NAMES+set}" != set; then
12639     COLLECT_NAMES=
12640     export COLLECT_NAMES
12641   fi
12642   ;;
12643 esac
12644
12645 # Now see if the compiler is really GCC.
12646 if test "$GCC" = "yes"; then
12647   XEGCC=yes
12648 else
12649   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12650 echo "configure:12651: checking checking whether we are using GNU C" >&5
12651   cat > conftest.$ac_ext <<EOF
12652 #line 12653 "configure"
12653 #include "confdefs.h"
12654
12655 #ifdef __GNUC__
12656   yes;
12657 #endif
12658
12659 EOF
12660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12661   egrep "yes" >/dev/null 2>&1; then
12662   rm -rf conftest*
12663   XEGCC=yes
12664 else
12665   rm -rf conftest*
12666   XEGCC=no
12667 fi
12668 rm -f conftest*
12669
12670   echo "$ac_t""${XEGCC}" 1>&6
12671 fi
12672
12673 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12674 echo "configure:12675: checking how to produce PIC code" >&5
12675 wl=
12676
12677 can_build_shared=yes
12678 if test "$XEGCC" = yes; then
12679   wl='-Wl,'
12680
12681   case "$xehost_os" in
12682   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12683     # PIC is the default for these OSes.
12684     ;;
12685
12686   os2*)
12687     # We can build DLLs from non-PIC.
12688     ;;
12689   amigaos*)
12690     # FIXME: we need at least 68020 code to build shared libraries, but
12691     # adding the `-m68020' flag to GCC prevents building anything better,
12692     # like `-m68040'.
12693     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12694     ;;
12695   *)
12696     dll_cflags='-fPIC'
12697     ;;
12698   esac
12699 else
12700   # PORTME Check for PIC flags for the system compiler.
12701   case "$xehost_os" in
12702   hpux9* | hpux1[0-9]*)
12703     # Is there a better link_static_flag that works with the bundled CC?
12704     wl='-Wl,'
12705     dll_cflags='+Z'
12706     ;;
12707
12708   irix5* | irix6*)
12709     wl='-Wl,'
12710     # PIC (with -KPIC) is the default.
12711     ;;
12712
12713   os2*)
12714     # We can build DLLs from non-PIC.
12715     ;;
12716
12717   osf3* | osf4*)
12718     # All OSF/1 code is PIC.
12719     wl='-Wl,'
12720     ;;
12721
12722   sco3.2v5*)
12723     dll_cflags='-belf -Kpic'
12724     wl='-Wl,'
12725     ;;
12726
12727   unixware*)
12728     dll_cflags="-KPIC"
12729     wl="-Wl,"
12730     ;;
12731
12732   sysv4*)
12733     dll_cflags="-KPIC"
12734     wl="-Wl,"
12735     ;;
12736
12737   sysv5*)
12738     dll_cflags="-KPIC"
12739     wl="-Wl,"
12740     ;;
12741
12742   solaris2*)
12743     dll_cflags='-KPIC'
12744     wl='-Wl,'
12745     ;;
12746
12747   sunos4*)
12748     dll_cflags='-PIC'
12749     wl='-Qoption ld '
12750     ;;
12751
12752   uts4*)
12753     dll_cflags='-pic'
12754     ;;
12755
12756   *)
12757     can_build_shared=no
12758     ;;
12759   esac
12760 fi
12761
12762 if test -n "$dll_cflags"; then
12763   echo "$ac_t""${dll_cflags}" 1>&6
12764   
12765   # Check to make sure the dll_cflags actually works.
12766   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12767 echo "configure:12768: checking if PIC flag ${dll_cflags} really works" >&5
12768   save_CFLAGS="$CFLAGS"
12769   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12770   cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773
12774 int main() {
12775 int x=0;
12776 ; return 0; }
12777 EOF
12778 if { (eval echo configure:12779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12779   rm -rf conftest*
12780   
12781     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12782     # reports no error.  So, we need to grep stderr for (Bundled).
12783     if grep '(Bundled)' config.log >/dev/null; then
12784       echo "$ac_t""no" 1>&6
12785       can_build_shared=no
12786       dll_cflags=
12787     else
12788       echo "$ac_t""yes" 1>&6
12789     fi
12790 else
12791   echo "configure: failed program was:" >&5
12792   cat conftest.$ac_ext >&5
12793   rm -rf conftest*
12794   echo "$ac_t""no" 1>&6
12795     can_build_shared=no
12796     dll_cflags=
12797 fi
12798 rm -f conftest*
12799   CFLAGS="$save_CFLAGS"
12800 else
12801   echo "$ac_t""none" 1>&6
12802 fi
12803
12804 if test "$can_build_shared" = "yes"; then
12805 cc_produces_so=no
12806 xldf=
12807 xcldf=
12808 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12809 echo "configure:12810: checking if C compiler can produce shared libraries" >&5
12810 if test "$XEGCC" = yes; then
12811   xcldf="-shared"
12812   xldf="-shared"
12813 else # Not using GCC
12814   case "$xehost_os" in
12815     aix3* | aix4*)
12816       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12817       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12818       ;;
12819
12820     freebsd2* | netbsd* | openbsd*)
12821       xldf="-Bshareable"
12822       xcldf="${wl}-Bshareable"
12823       ;;
12824
12825     freebsd3*)
12826       xcldf="-shared"
12827       ;;
12828
12829     hpux*)
12830       xldf="-b +s"
12831       xcldf="${wl}-b ${wl}+s"
12832       ;;
12833
12834     irix5* | irix6* | osf3* | osf4*)
12835       xcldf="${wl}-shared"
12836       xldf="-shared"
12837       ;;
12838
12839     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12840       xcldf="-G"
12841       xldf="-G"
12842       ;;
12843
12844     sunos4*)
12845       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12846       xldf="-assert pure-text -Bstatic"
12847       ;;
12848   esac
12849 fi # End if if we are using gcc
12850
12851 if test -n "$xcldf"; then
12852   save_LDFLAGS=$LDFLAGS
12853   save_LIBS=$LIBS
12854   save_xe_libs=$xe_libs
12855   LDFLAGS="$xcldf $LDFLAGS"
12856   LIBS=
12857   xe_libs=
12858   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12859   cat > conftest.$ac_ext <<EOF
12860 #line 12861 "configure"
12861 #include "confdefs.h"
12862
12863 int main() {
12864 int x=0;
12865 ; return 0; }
12866 EOF
12867 if { (eval echo configure:12868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12868   rm -rf conftest*
12869   cc_produces_so=yes
12870 else
12871   echo "configure: failed program was:" >&5
12872   cat conftest.$ac_ext >&5
12873   rm -rf conftest*
12874   cc_produces_so=no
12875 fi
12876 rm -f conftest*
12877   LDFLAGS=$save_LDFLAGS
12878   LIBS=$save_LIBS
12879   xe_libs=$save_xe_libs
12880   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12881 else
12882   cc_produces_so=no
12883 fi
12884 echo "$ac_t""${cc_produces_so}" 1>&6
12885
12886 LTLD=$LD
12887 if test -z "$LTLD"; then
12888   ac_prog=ld
12889   if test "$XEGCC" = yes; then
12890     # Check if gcc -print-prog-name=ld gives a path.
12891     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12892 echo "configure:12893: checking for ld used by GCC" >&5
12893     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12894     case "$ac_prog" in
12895     # Accept absolute paths.
12896     /*)
12897       if test -z "$LTLD"; then
12898         case "$ac_prog" in
12899           *gcc-lib*) LTLD="$CC"
12900                      ;;
12901           *)         LTLD="$ac_prog"
12902                      ;;
12903         esac
12904       fi
12905       ;;
12906     "")
12907       # If it fails, then pretend we aren't using GCC.
12908       ac_prog=ld
12909       ;;
12910     *)
12911       # If it is relative, then search for the first ld in PATH.
12912       with_gnu_ld=unknown
12913       ;;
12914     esac
12915   else
12916     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12917 echo "configure:12918: checking for GNU ld" >&5
12918   fi
12919
12920   if test -z "$LTLD"; then
12921     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12922     for ac_dir in $PATH; do
12923       test -z "$ac_dir" && ac_dir=.
12924       if test -f "$ac_dir/$ac_prog"; then
12925         LTLD="$ac_dir/$ac_prog"
12926         # Check to see if the program is GNU ld.  I'd rather use --version,
12927         # but apparently some GNU ld's only accept -v.
12928         # Break only if it was the GNU/non-GNU ld that we prefer.
12929         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12930           xe_gnu_ld=yes
12931         else
12932           xe_gnu_ld=no
12933         fi
12934       fi
12935     done
12936     IFS="$ac_save_ifs"
12937   fi
12938
12939   if test -n "$LTLD"; then
12940     echo "$ac_t""${LTLD}" 1>&6
12941   else
12942     echo "$ac_t""no" 1>&6
12943   fi
12944
12945   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12946     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12947     exit 1
12948   fi
12949 fi
12950
12951 ld_dynamic_link_flags=
12952
12953 # Check to see if it really is or isn't GNU ld.
12954 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12955 echo "configure:12956: checking if the linker is GNU ld" >&5
12956 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12957 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12958   xe_gnu_ld=yes
12959 else
12960   xe_gnu_ld=no
12961 fi
12962 echo "$ac_t""${xe_gnu_ld}" 1>&6
12963
12964 case "$xehost_os" in
12965   amigaos* | sunos4*)
12966     # On these operating systems, we should treat GNU ld like the system ld.
12967     gnu_ld_acts_native=yes
12968     ;;
12969   *)
12970     gnu_ld_acts_native=no
12971     ;;
12972 esac
12973
12974 if test "$cc_produces_so" = "yes"; then
12975   dll_ld=$CC
12976   dll_ldflags=$xcldf
12977   can_build_shared=yes
12978 else
12979   # OK - only NOW do we futz about with ld.
12980   # See if the linker supports building shared libraries.
12981   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12982 echo "configure:12983: checking whether the linker supports shared libraries" >&5
12983   dll_ld=$CC
12984   dll_ldflags=$LDFLAGS
12985   ld_shlibs=yes
12986   can_build_shared=yes
12987   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12988     # See if GNU ld supports shared libraries.
12989     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12990       dll_ld=$CC
12991       dll_ldflags="-shared"
12992       ld_shlibs=yes
12993     else
12994       ld_shlibs=no
12995     fi
12996   else
12997     # PORTME fill in a description of your system's linker (not GNU ld)
12998     case "$xehost_os" in
12999     aix3*)
13000       dll_ld=$LTLD
13001       dll_ldflags=$xldf
13002       ;;
13003
13004     aix4*)
13005       dll_ldflags=$xcldf
13006       ;;
13007
13008     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13009     # support.  Future versions do this automatically, but an explicit c++rt0.o
13010     # doesn't break anything, and helps significantly (at the cost of a little
13011     # extra space).
13012     freebsd2.2*)
13013       dll_ld=$LTLD
13014       dll_ldflags=$xldf
13015       dll_post="/usr/lib/c++rt0.o"
13016       ;;
13017
13018     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13019     freebsd2*)
13020       dll_ld=$LTLD
13021       dll_ldflags="-Bshareable"
13022       ;;
13023
13024     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13025     freebsd3*)
13026       dll_ldflags="-shared"
13027       ;;
13028
13029     hpux*)
13030       dll_ld=$LTLD
13031       dll_ldflags=$xldf
13032       ;;
13033
13034     irix5* | irix6*)
13035       dll_ld=$LTLD
13036       dll_ldflags=$xldf
13037       ;;
13038
13039     netbsd*)
13040       # Tested with NetBSD 1.2 ld
13041       dll_ld=$LTLD
13042       dll_ldflags=$xldf
13043       ;;
13044
13045     openbsd*)
13046       dll_ld=$LTLD
13047       dll_ldflags=$xldf
13048       ;;
13049
13050     osf3* | osf4*)
13051       dll_ld=$LTLD
13052       dll_ldflags=$xldf
13053       ;;
13054
13055     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13056     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13057       dll_ld=$LTLD
13058       case "$dll_ld" in
13059         *gcc*) dll_ldflags="-shared"
13060                dll_ld=$CC
13061                ;;
13062         *)     dll_ldflags="-G"
13063                ;;
13064       esac
13065       ;;
13066
13067     sunos4*)
13068       if test "$XEGCC" = yes; then
13069         dll_ld=$CC
13070       else
13071         dll_ld=$LTLD
13072       fi
13073       dll_ldflags=$xldf
13074       ;;
13075
13076     uts4*)
13077       dll_ld=$LTLD
13078       dll_ldflags="-G"
13079       ;;
13080
13081     bsdi*)
13082       dll_ldflags="-r"
13083       dll_ld="shlicc2"
13084       ;;
13085
13086     *)
13087       ld_shlibs=no
13088       can_build_shared=no
13089       ;;
13090     esac
13091   fi
13092   echo "$ac_t""${ld_shlibs}" 1>&6
13093   if test "$ld_shlibs" = "no"; then
13094     can_build_shared=no
13095   fi
13096 fi # End of if cc_produces_so = no
13097
13098
13099 if test "$xe_gnu_ld" = yes; then
13100   if test "$ld_shlibs" = yes; then
13101     ld_dynamic_link_flags="${wl}-export-dynamic"
13102   fi
13103 fi
13104
13105 if test -z "$ld_dynamic_link_flags"; then
13106   case "$xehost_os" in
13107   aix3*)
13108     ld_dynamic_link_flags=
13109     ;;
13110
13111   aix4*)
13112     ld_dynamic_link_flags=
13113     ;;
13114
13115   freebsd2.2*)
13116     ld_dynamic_link_flags=
13117     ;;
13118
13119   freebsd2*)
13120     ld_dynamic_link_flags=
13121     ;;
13122
13123   freebsd3*)
13124     ld_dynamic_link_flags=
13125     ;;
13126
13127   hpux*)
13128     ld_dynamic_link_flags="${wl}-E"
13129     ;;
13130
13131   irix5* | irix6*)
13132     ld_dynamic_link_flags=
13133     ;;
13134
13135   netbsd*)
13136     ld_dynamic_link_flags=
13137     ;;
13138
13139   openbsd*)
13140     ld_dynamic_link_flags=
13141     ;;
13142
13143   osf3* | osf4*)
13144     ld_dynamic_link_flags=
13145     ;;
13146
13147   solaris2* | solaris7*)
13148     ld_dynamic_link_flags=
13149     ;;
13150
13151   sco3.2v5* | unixware* | sysv5* | sysv4*)
13152     ld_dynamic_link_flags="${wl}-Bexport"
13153     ;;
13154
13155   sunos4*)
13156     ld_dynamic_link_flags=
13157     ;;
13158
13159   uts4*)
13160     ld_dynamic_link_flags=
13161     ;;
13162
13163   bsdi*)
13164     ld_dynamic_link_flags=
13165     ;;
13166
13167   esac
13168 fi # End of if -z ld_dynamic_link_flags
13169 fi # End of if test "$can_build_shared" = "yes"
13170
13171
13172
13173
13174
13175
13176
13177
13178   fi
13179
13180   if test "$can_build_shared" = "yes"; then
13181     { test "$extra_verbose" = "yes" && cat << \EOF
13182     Defining HAVE_SHLIB
13183 EOF
13184 cat >> confdefs.h <<\EOF
13185 #define HAVE_SHLIB 1
13186 EOF
13187 }
13188
13189     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13190    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13191  fi
13192     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13193     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13194     for ac_func in dlerror _dlerror
13195 do
13196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13197 echo "configure:13198: checking for $ac_func" >&5
13198
13199 cat > conftest.$ac_ext <<EOF
13200 #line 13201 "configure"
13201 #include "confdefs.h"
13202 /* System header to define __stub macros and hopefully few prototypes,
13203     which can conflict with char $ac_func(); below.  */
13204 #include <assert.h>
13205 /* Override any gcc2 internal prototype to avoid an error.  */
13206 /* We use char because int might match the return type of a gcc2
13207     builtin and then its argument prototype would still apply.  */
13208 char $ac_func();
13209
13210 int main() {
13211
13212 /* The GNU C library defines this for functions which it implements
13213     to always fail with ENOSYS.  Some functions are actually named
13214     something starting with __ and the normal name is an alias.  */
13215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13216 choke me
13217 #else
13218 $ac_func();
13219 #endif
13220
13221 ; return 0; }
13222 EOF
13223 if { (eval echo configure:13224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13224   rm -rf conftest*
13225   eval "ac_cv_func_$ac_func=yes"
13226 else
13227   echo "configure: failed program was:" >&5
13228   cat conftest.$ac_ext >&5
13229   rm -rf conftest*
13230   eval "ac_cv_func_$ac_func=no"
13231 fi
13232 rm -f conftest*
13233
13234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13235   echo "$ac_t""yes" 1>&6
13236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13237   { test "$extra_verbose" = "yes" && cat << EOF
13238     Defining $ac_tr_func
13239 EOF
13240 cat >> confdefs.h <<EOF
13241 #define $ac_tr_func 1
13242 EOF
13243 }
13244  
13245 else
13246   echo "$ac_t""no" 1>&6
13247 fi
13248 done
13249
13250     with_modules=yes
13251   else
13252     if test "$with_modules" = "yes"; then
13253       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13254     else
13255       echo "configure: warning: "Module support cannot be provided."" 1>&2
13256     fi
13257     with_modules=no
13258   fi
13259 fi
13260
13261 cat > conftest.$ac_ext <<EOF
13262 #line 13263 "configure"
13263 #include "confdefs.h"
13264 int main(int c,char *v[]){return 0;}
13265 EOF
13266 if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13267 then
13268   :
13269 else
13270   conftest_rc="$?"
13271   echo "configure: failed program was:" >&5
13272   cat conftest.$ac_ext >&5
13273   rm -fr conftest*
13274   
13275   echo ""
13276   echo "*** PANIC *** The C compiler can no longer build working executables."
13277   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13278   echo "*** PANIC *** The most likely reason for this problem is that configure"
13279   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13280   echo "*** PANIC *** found at run time."
13281   echo "*** PANIC ***"
13282   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13283   echo "*** PANIC *** On other systems, try telling configure where to find the"
13284   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13285   echo "*** PANIC ***"
13286   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13287   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13288   echo "*** PANIC *** on your system.  Don't do that."
13289   exit 1
13290 fi
13291 rm -fr conftest*
13292
13293 if test "$win32_processes" = "yes"; then
13294   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13295    echo "    xemacs will be linked with \"process-nt.o\""
13296  fi
13297 else
13298   { test "$extra_verbose" = "yes" && cat << \EOF
13299     Defining HAVE_UNIX_PROCESSES
13300 EOF
13301 cat >> confdefs.h <<\EOF
13302 #define HAVE_UNIX_PROCESSES 1
13303 EOF
13304 }
13305
13306   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13307    echo "    xemacs will be linked with \"process-unix.o\""
13308  fi
13309 fi
13310
13311
13312
13313 T=""
13314 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13315 CFLAGS="$T"
13316
13317
13318 T=""
13319 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13320 extra_objs="$T"
13321
13322
13323 T=""
13324 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
13325 c_switch_general="$T"
13326
13327
13328 T=""
13329 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13330 c_switch_window_system="$T"
13331
13332
13333 T=""
13334 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13335 c_switch_all="$T"
13336
13337
13338 T=""
13339 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
13340 ld_switch_general="$T"
13341
13342
13343 T=""
13344 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13345 ld_switch_window_system="$T"
13346
13347
13348 T=""
13349 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13350 ld_switch_all="$T"
13351
13352
13353 T=""
13354 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13355 ld_libs_general="$T"
13356
13357
13358 T=""
13359 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
13360 ld_libs_window_system="$T"
13361
13362
13363 T=""
13364 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13365 ld_libs_all="$T"
13366
13367
13368
13369 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13370 internal_makefile_list="Makefile.in"
13371 SUBDIR_MAKEFILES=''
13372 test -d lock || mkdir lock
13373 for dir in $MAKE_SUBDIR; do
13374   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13375         test -d "$d" || mkdir "$d"; cd "$d"
13376       done ) ;;
13377    * ) test -d "$dir" || mkdir "$dir" ;;
13378   esac
13379   
13380 T=""
13381 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13382 SUBDIR_MAKEFILES="$T"
13383
13384   
13385 T=""
13386 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13387 internal_makefile_list="$T"
13388
13389 done
13390
13391
13392
13393
13394 for dir in src/s src/m; do
13395   if test ! -d "$dir" ; then
13396     echo Making symbolic link to "$srcdir/$dir"
13397     ${LN_S} "$srcdir/$dir" "$dir"
13398   fi
13399 done
13400
13401 if test "$extra_verbose" = "yes"; then
13402   echo ""
13403   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
13404   echo ""
13405 fi
13406
13407
13408 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13409   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13410   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13411 fi
13412
13413 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13414   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13415   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13416 fi
13417
13418 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13419   test "$extra_verbose" = "yes" && echo "creating TAGS"
13420   echo "\f
13421 $srcdir/TAGS,include" > "TAGS"
13422 fi
13423
13424 if test "$__SUNPRO_C" = "yes"; then
13425   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13426   ( echo "# For use with Sun WorkShop's Source browser."
13427     echo "# See sbquery(1) and sbinit(4) for more information"
13428     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13429   ) > .sbinit
13430 fi
13431
13432 rm -f core
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452 PREFIX=$prefix
13453 while true; do
13454   case "$PREFIX" in
13455     *\$* ) eval "PREFIX=$PREFIX" ;;
13456     *) break ;;
13457   esac
13458 done
13459
13460
13461
13462
13463 EXEC_PREFIX=$exec_prefix
13464 while true; do
13465   case "$EXEC_PREFIX" in
13466     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13467     *) break ;;
13468   esac
13469 done
13470
13471
13472
13473
13474 INFODIR=$infodir
13475 while true; do
13476   case "$INFODIR" in
13477     *\$* ) eval "INFODIR=$INFODIR" ;;
13478     *) break ;;
13479   esac
13480 done
13481
13482
13483
13484
13485 INFOPATH=$infopath
13486 while true; do
13487   case "$INFOPATH" in
13488     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13489     *) break ;;
13490   esac
13491 done
13492
13493
13494
13495
13496 PACKAGE_PATH=$package_path
13497 while true; do
13498   case "$PACKAGE_PATH" in
13499     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13500     *) break ;;
13501   esac
13502 done
13503
13504
13505
13506
13507 LISPDIR=$lispdir
13508 while true; do
13509   case "$LISPDIR" in
13510     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13511     *) break ;;
13512   esac
13513 done
13514
13515
13516
13517
13518 MODULEDIR=$moduledir
13519 while true; do
13520   case "$MODULEDIR" in
13521     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13522     *) break ;;
13523   esac
13524 done
13525
13526
13527
13528
13529 SITELISPDIR=$sitelispdir
13530 while true; do
13531   case "$SITELISPDIR" in
13532     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13533     *) break ;;
13534   esac
13535 done
13536
13537
13538
13539
13540 SITEMODULEDIR=$sitemoduledir
13541 while true; do
13542   case "$SITEMODULEDIR" in
13543     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13544     *) break ;;
13545   esac
13546 done
13547
13548
13549
13550
13551 ETCDIR=$etcdir
13552 while true; do
13553   case "$ETCDIR" in
13554     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13555     *) break ;;
13556   esac
13557 done
13558
13559
13560
13561
13562 LOCKDIR=$lockdir
13563 while true; do
13564   case "$LOCKDIR" in
13565     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13566     *) break ;;
13567   esac
13568 done
13569
13570
13571
13572
13573 DOCDIR=$docdir
13574 while true; do
13575   case "$DOCDIR" in
13576     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13577     *) break ;;
13578   esac
13579 done
13580
13581
13582
13583
13584 ARCHLIBDIR=$archlibdir
13585 while true; do
13586   case "$ARCHLIBDIR" in
13587     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13588     *) break ;;
13589   esac
13590 done
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13612
13613
13614
13615
13616
13617
13618
13619 : ${XEMACS_CC:=$CC}
13620
13621
13622 if test "$with_prefix" = "yes"; then
13623   { test "$extra_verbose" = "yes" && cat << \EOF
13624     Defining PREFIX_USER_DEFINED
13625 EOF
13626 cat >> confdefs.h <<\EOF
13627 #define PREFIX_USER_DEFINED 1
13628 EOF
13629 }
13630
13631 fi
13632
13633 if test "$with_site_lisp" = "no"; then
13634   { test "$extra_verbose" = "yes" && cat << \EOF
13635     Defining INHIBIT_SITE_LISP
13636 EOF
13637 cat >> confdefs.h <<\EOF
13638 #define INHIBIT_SITE_LISP 1
13639 EOF
13640 }
13641
13642 fi
13643 if test "$with_site_modules" = "no"; then
13644   { test "$extra_verbose" = "yes" && cat << \EOF
13645     Defining INHIBIT_SITE_MODULES
13646 EOF
13647 cat >> confdefs.h <<\EOF
13648 #define INHIBIT_SITE_MODULES 1
13649 EOF
13650 }
13651
13652 fi
13653
13654
13655 T=""
13656 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13657 ac_configure_args="$T"
13658
13659 { test "$extra_verbose" = "yes" && cat << EOF
13660     Defining EMACS_CONFIGURATION = "$configuration"
13661 EOF
13662 cat >> confdefs.h <<EOF
13663 #define EMACS_CONFIGURATION "$configuration"
13664 EOF
13665 }
13666
13667 { test "$extra_verbose" = "yes" && cat << EOF
13668     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13669 EOF
13670 cat >> confdefs.h <<EOF
13671 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13672 EOF
13673 }
13674
13675 { test "$extra_verbose" = "yes" && cat << EOF
13676     Defining config_machfile = "$machfile"
13677 EOF
13678 cat >> confdefs.h <<EOF
13679 #define config_machfile "$machfile"
13680 EOF
13681 }
13682
13683 { test "$extra_verbose" = "yes" && cat << EOF
13684     Defining config_opsysfile = "$opsysfile"
13685 EOF
13686 cat >> confdefs.h <<EOF
13687 #define config_opsysfile "$opsysfile"
13688 EOF
13689 }
13690
13691
13692
13693 null_string=""
13694 { test "$extra_verbose" = "yes" && cat << EOF
13695     Defining LD_SWITCH_X_SITE = $null_string
13696 EOF
13697 cat >> confdefs.h <<EOF
13698 #define LD_SWITCH_X_SITE $null_string
13699 EOF
13700 }
13701
13702 { test "$extra_verbose" = "yes" && cat << EOF
13703     Defining LD_SWITCH_X_SITE_AUX = $null_string
13704 EOF
13705 cat >> confdefs.h <<EOF
13706 #define LD_SWITCH_X_SITE_AUX $null_string
13707 EOF
13708 }
13709
13710 { test "$extra_verbose" = "yes" && cat << EOF
13711     Defining C_SWITCH_X_SITE = $null_string
13712 EOF
13713 cat >> confdefs.h <<EOF
13714 #define C_SWITCH_X_SITE $null_string
13715 EOF
13716 }
13717
13718 { test "$extra_verbose" = "yes" && cat << EOF
13719     Defining LD_SWITCH_SITE = $null_string
13720 EOF
13721 cat >> confdefs.h <<EOF
13722 #define LD_SWITCH_SITE $null_string
13723 EOF
13724 }
13725
13726 { test "$extra_verbose" = "yes" && cat << EOF
13727     Defining C_SWITCH_SITE = $null_string
13728 EOF
13729 cat >> confdefs.h <<EOF
13730 #define C_SWITCH_SITE $null_string
13731 EOF
13732 }
13733
13734
13735
13736 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13737     Defining GNU_MALLOC
13738 EOF
13739 cat >> confdefs.h <<\EOF
13740 #define GNU_MALLOC 1
13741 EOF
13742 }
13743
13744 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13745     Defining USE_SYSTEM_MALLOC
13746 EOF
13747 cat >> confdefs.h <<\EOF
13748 #define USE_SYSTEM_MALLOC 1
13749 EOF
13750 }
13751
13752 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13753     Defining USE_DEBUG_MALLOC
13754 EOF
13755 cat >> confdefs.h <<\EOF
13756 #define USE_DEBUG_MALLOC 1
13757 EOF
13758 }
13759
13760                                               { test "$extra_verbose" = "yes" && cat << \EOF
13761     Defining USE_SYSTEM_MALLOC
13762 EOF
13763 cat >> confdefs.h <<\EOF
13764 #define USE_SYSTEM_MALLOC 1
13765 EOF
13766 }
13767
13768 fi
13769 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13770     Defining I18N3
13771 EOF
13772 cat >> confdefs.h <<\EOF
13773 #define I18N3 1
13774 EOF
13775 }
13776
13777 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13778     Defining USE_GCC
13779 EOF
13780 cat >> confdefs.h <<\EOF
13781 #define USE_GCC 1
13782 EOF
13783 }
13784
13785 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13786     Defining EXTERNAL_WIDGET
13787 EOF
13788 cat >> confdefs.h <<\EOF
13789 #define EXTERNAL_WIDGET 1
13790 EOF
13791 }
13792
13793 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13794     Defining NO_DOC_FILE
13795 EOF
13796 cat >> confdefs.h <<\EOF
13797 #define NO_DOC_FILE 1
13798 EOF
13799 }
13800
13801 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13802     Defining PURIFY
13803 EOF
13804 cat >> confdefs.h <<\EOF
13805 #define PURIFY 1
13806 EOF
13807 }
13808
13809 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13810     Defining QUANTIFY
13811 EOF
13812 cat >> confdefs.h <<\EOF
13813 #define QUANTIFY 1
13814 EOF
13815 }
13816
13817 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13818     Defining MAIL_USE_POP
13819 EOF
13820 cat >> confdefs.h <<\EOF
13821 #define MAIL_USE_POP 1
13822 EOF
13823 }
13824
13825 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13826     Defining KERBEROS
13827 EOF
13828 cat >> confdefs.h <<\EOF
13829 #define KERBEROS 1
13830 EOF
13831 }
13832
13833 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13834     Defining HESIOD
13835 EOF
13836 cat >> confdefs.h <<\EOF
13837 #define HESIOD 1
13838 EOF
13839 }
13840
13841 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13842     Defining USE_UNION_TYPE
13843 EOF
13844 cat >> confdefs.h <<\EOF
13845 #define USE_UNION_TYPE 1
13846 EOF
13847 }
13848
13849 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13850     Defining PDUMP
13851 EOF
13852 cat >> confdefs.h <<\EOF
13853 #define PDUMP 1
13854 EOF
13855 }
13856
13857
13858
13859 (
13860 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13861 else
13862   echo "uname -a: `uname -a`"
13863 fi
13864 echo ""
13865 echo "$0 $quoted_arguments"
13866 ) > Installation
13867
13868 if test ! -z ${emacs_beta_version} ; then
13869   if test -z "${emacs_is_beta}" ; then
13870         xemacs_betaname=".${emacs_beta_version}"
13871   else
13872         xemacs_betaname="-b${emacs_beta_version}"
13873   fi
13874 else
13875   xemacs_betaname=""
13876 fi
13877
13878 (
13879 echo "
13880
13881 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13882
13883   Where should the build process find the source code?    $srcdir
13884   What installation prefix should install use?            $prefix
13885   What operating system and machine description files should XEmacs use?
13886         \`$opsysfile' and \`$machfile'
13887   What compiler should XEmacs be built with?              $CC $CFLAGS
13888   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13889   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13890   What window system should XEmacs use?                   ${window_system}"
13891 if test "$with_x11" = "yes"; then
13892   echo "  Where do we find X Windows header files?                $x_includes"
13893   echo "  Where do we find X Windows libraries?                   $x_libraries"
13894 fi
13895 if test -n "$site_includes"; then
13896   echo "  Additional header files:                                $site_includes"
13897 fi
13898 if test -n "$site_libraries"; then
13899   echo "  Additional libraries:                                   $site_libraries"
13900 fi
13901 if test -n "$site_prefixes"; then
13902   echo "  Additional prefixes:                                    $site_prefixes"
13903 fi
13904 if test -n "$runpath"; then
13905   echo "  Runtime library search path:                            $runpath"
13906 fi
13907 if test "$have_xaw" = "yes"; then
13908   echo "  Athena library to link:                                 $athena_lib"
13909   echo "  Athena header include path:                             $athena_h_path"
13910 fi
13911 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13912 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13913 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13914 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13915   echo "  No Xmu; substituting equivalent routines."
13916 fi
13917
13918 if test "$with_xpm" = yes; then
13919   echo "  Compiling in support for XPM images."
13920 elif test "$with_x11" = yes; then
13921   echo "  --------------------------------------------------------------------"
13922   echo "  WARNING: Compiling without XPM support."
13923   if test "$xpm_problem" != ""; then
13924     echo "  Reason: $xpm_problem"
13925   fi
13926   echo "  WARNING: You should strongly consider installing XPM."
13927   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13928   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13929   echo "  --------------------------------------------------------------------"
13930 fi
13931 if test "$with_png" = yes; then
13932   echo "  Compiling in support for PNG image handling."
13933 elif test "$window_system" != "none"; then
13934   echo "  --------------------------------------------------------------------"
13935   echo "  WARNING: Compiling without PNG image support."
13936   if test "$png_problem" != ""; then
13937     echo "  Reason: $png_problem"
13938   fi
13939   echo "  WARNING: You should strongly consider installing the PNG libraries."
13940   echo "  WARNING: Otherwise certain images and glyphs may not display."
13941   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13942   echo "  --------------------------------------------------------------------"
13943 fi
13944 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13945 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13946 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13947 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13948
13949 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13950 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13951 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13952 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13953
13954 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13955 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13956 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13957
13958 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13959
13960 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13961 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13962
13963 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13964 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13965 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13966 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13967 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13968 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13969 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13970 if test "$with_wnn" = yes; then
13971   echo "  Compiling in support for the WNN input method on Mule."
13972   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13973 fi
13974 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13975
13976 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13977 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13978 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13979 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13980 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13981 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13982 case "$with_menubars" in
13983   lucid ) echo "  Using Lucid menubars." ;;
13984   motif ) echo "  Using Motif menubars."
13985           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13986           echo "             We recommend using the Lucid menubar instead."
13987           echo "             Re-run configure with --with-menubars='lucid'." ;;
13988   msw ) echo "  Using MS-Windows menubars." ;;
13989 esac
13990 case "$with_scrollbars" in
13991   lucid    ) echo "  Using Lucid scrollbars."     ;;
13992   motif    ) echo "  Using Motif scrollbars."     ;;
13993   athena   ) echo "  Using Athena scrollbars."    ;;
13994   msw ) echo "  Using MS-Windows scrollbars." ;;
13995 esac
13996 case "$with_widgets" in
13997   motif    ) echo "  Using Motif native widgets."     ;;
13998   athena   ) echo "  Using Athena native widgets."    ;;
13999   msw ) echo "  Using MS-Windows native widgets." ;;
14000 esac
14001 case "$with_dialogs" in
14002   motif    )
14003     echo "  Using Motif dialog boxes."
14004     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14005       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14006       echo "             We recommend using the Athena dialog boxes instead."
14007       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14008       echo "             Read the PROBLEMS file for more information."
14009     fi; fi
14010     ;;
14011   athena   ) echo "  Using Athena dialog boxes."    ;;
14012   msw ) echo "  Using MS-Windows dialog boxes." ;;
14013 esac
14014 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14015 test "$with_clash_detection" = yes && \
14016   echo "  Clash detection will use \"$lockdir\" for locking files."
14017 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14018 test "$with_pop"        = yes && echo "  Using POP for mail access."
14019 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14020 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14021 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14022 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14023 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14024 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14025 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14026   != "no no no no no"; then
14027   echo "  WARNING: ---------------------------------------------------------"
14028   echo "  WARNING: Compiling in support for runtime error checking."
14029   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14030   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14031   echo "  WARNING: ---------------------------------------------------------"
14032 fi
14033 echo ""
14034 ) | tee -a Installation
14035 echo ""
14036
14037
14038 # Remove any trailing slashes in these variables.
14039 test -n "$prefix" &&
14040   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14041 test -n "$exec_prefix" &&
14042   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14043
14044
14045 for file in $internal_makefile_list; do
14046   test "$file" = src/Makefile.in && \
14047     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14048   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14049 done
14050 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14051 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
14052
14053 trap '' 1 2 15
14054
14055 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14056
14057 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14058 # Let make expand exec_prefix.
14059 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14060
14061 # Any assignment to VPATH causes Sun make to only execute
14062 # the first set of double-colon rules, so remove it if not needed.
14063 # If there is a colon in the path, we need to keep it.
14064 if test "x$srcdir" = x.; then
14065   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14066 fi
14067
14068 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14069
14070 DEFS=-DHAVE_CONFIG_H
14071
14072 # Without the "./", some shells look in PATH for config.status.
14073 : ${CONFIG_STATUS=./config.status}
14074
14075 echo creating $CONFIG_STATUS
14076 rm -f $CONFIG_STATUS
14077 cat > $CONFIG_STATUS <<EOF
14078 #! /bin/sh
14079 # Generated automatically by configure.
14080 # Run this file to recreate the current configuration.
14081 # This directory was configured as follows,
14082 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14083 #
14084 # $0 $ac_configure_args
14085 #
14086 # Compiler output produced by configure, useful for debugging
14087 # configure, is in ./config.log if it exists.
14088
14089 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14090 for ac_option
14091 do
14092   case "\$ac_option" in
14093   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14094     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14095     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14096   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14097     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14098     exit 0 ;;
14099   -help | --help | --hel | --he | --h)
14100     echo "\$ac_cs_usage"; exit 0 ;;
14101   *) echo "\$ac_cs_usage"; exit 1 ;;
14102   esac
14103 done
14104
14105 ac_given_srcdir=$srcdir
14106 ac_given_INSTALL="$INSTALL"
14107
14108 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14109 EOF
14110 cat >> $CONFIG_STATUS <<EOF
14111
14112 # Protect against being on the right side of a sed subst in config.status.
14113 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14114  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14115 $ac_vpsub
14116 $extrasub
14117 s%@SHELL@%$SHELL%g
14118 s%@CFLAGS@%$CFLAGS%g
14119 s%@CPPFLAGS@%$CPPFLAGS%g
14120 s%@CXXFLAGS@%$CXXFLAGS%g
14121 s%@FFLAGS@%$FFLAGS%g
14122 s%@DEFS@%$DEFS%g
14123 s%@LDFLAGS@%$LDFLAGS%g
14124 s%@LIBS@%$LIBS%g
14125 s%@exec_prefix@%$exec_prefix%g
14126 s%@prefix@%$prefix%g
14127 s%@program_transform_name@%$program_transform_name%g
14128 s%@bindir@%$bindir%g
14129 s%@sbindir@%$sbindir%g
14130 s%@libexecdir@%$libexecdir%g
14131 s%@datadir@%$datadir%g
14132 s%@sysconfdir@%$sysconfdir%g
14133 s%@sharedstatedir@%$sharedstatedir%g
14134 s%@localstatedir@%$localstatedir%g
14135 s%@libdir@%$libdir%g
14136 s%@includedir@%$includedir%g
14137 s%@oldincludedir@%$oldincludedir%g
14138 s%@infodir@%$infodir%g
14139 s%@mandir@%$mandir%g
14140 s%@LN_S@%$LN_S%g
14141 s%@blddir@%$blddir%g
14142 s%@CC@%$CC%g
14143 s%@CPP@%$CPP%g
14144 s%@start_flags@%$start_flags%g
14145 s%@ld_switch_shared@%$ld_switch_shared%g
14146 s%@start_files@%$start_files%g
14147 s%@ld@%$ld%g
14148 s%@lib_gcc@%$lib_gcc%g
14149 s%@RANLIB@%$RANLIB%g
14150 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14151 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14152 s%@INSTALL_DATA@%$INSTALL_DATA%g
14153 s%@YACC@%$YACC%g
14154 s%@SET_MAKE@%$SET_MAKE%g
14155 s%@X_CFLAGS@%$X_CFLAGS%g
14156 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14157 s%@X_LIBS@%$X_LIBS%g
14158 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14159 s%@install_pp@%$install_pp%g
14160 s%@libs_xauth@%$libs_xauth%g
14161 s%@dnd_objs@%$dnd_objs%g
14162 s%@lwlib_objs@%$lwlib_objs%g
14163 s%@ALLOCA@%$ALLOCA%g
14164 s%@have_esd_config@%$have_esd_config%g
14165 s%@dll_ld@%$dll_ld%g
14166 s%@dll_cflags@%$dll_cflags%g
14167 s%@dll_ldflags@%$dll_ldflags%g
14168 s%@dll_post@%$dll_post%g
14169 s%@dll_ldo@%$dll_ldo%g
14170 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14171 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14172 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14173 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14174 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14175 s%@PROGNAME@%$PROGNAME%g
14176 s%@version@%$version%g
14177 s%@configuration@%$configuration%g
14178 s%@canonical@%$canonical%g
14179 s%@inststaticdir@%$inststaticdir%g
14180 s%@instvardir@%$instvardir%g
14181 s%@srcdir@%$srcdir%g
14182 s%@pkgdir@%$pkgdir%g
14183 s%@statedir@%$statedir%g
14184 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14185 s%@PREFIX@%$PREFIX%g
14186 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14187 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14188 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14189 s%@INFODIR@%$INFODIR%g
14190 s%@infopath@%$infopath%g
14191 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14192 s%@INFOPATH@%$INFOPATH%g
14193 s%@package_path@%$package_path%g
14194 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14195 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14196 s%@lispdir@%$lispdir%g
14197 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14198 s%@LISPDIR@%$LISPDIR%g
14199 s%@moduledir@%$moduledir%g
14200 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14201 s%@MODULEDIR@%$MODULEDIR%g
14202 s%@sitelispdir@%$sitelispdir%g
14203 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14204 s%@SITELISPDIR@%$SITELISPDIR%g
14205 s%@sitemoduledir@%$sitemoduledir%g
14206 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14207 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14208 s%@etcdir@%$etcdir%g
14209 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14210 s%@ETCDIR@%$ETCDIR%g
14211 s%@lockdir@%$lockdir%g
14212 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14213 s%@LOCKDIR@%$LOCKDIR%g
14214 s%@docdir@%$docdir%g
14215 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14216 s%@DOCDIR@%$DOCDIR%g
14217 s%@archlibdir@%$archlibdir%g
14218 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14219 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14220 s%@bitmapdir@%$bitmapdir%g
14221 s%@extra_objs@%$extra_objs%g
14222 s%@machfile@%$machfile%g
14223 s%@opsysfile@%$opsysfile%g
14224 s%@c_switch_general@%$c_switch_general%g
14225 s%@c_switch_window_system@%$c_switch_window_system%g
14226 s%@c_switch_all@%$c_switch_all%g
14227 s%@ld_switch_general@%$ld_switch_general%g
14228 s%@ld_switch_window_system@%$ld_switch_window_system%g
14229 s%@ld_switch_all@%$ld_switch_all%g
14230 s%@ld_libs_general@%$ld_libs_general%g
14231 s%@ld_libs_window_system@%$ld_libs_window_system%g
14232 s%@ld_libs_all@%$ld_libs_all%g
14233 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14234 s%@native_sound_lib@%$native_sound_lib%g
14235 s%@sound_cflags@%$sound_cflags%g
14236 s%@dynodump_arch@%$dynodump_arch%g
14237 s%@XEMACS_CC@%$XEMACS_CC%g
14238 s%@internal_makefile_list@%$internal_makefile_list%g
14239
14240 CEOF
14241 EOF
14242
14243 cat >> $CONFIG_STATUS <<\EOF
14244
14245 # Split the substitutions into bite-sized pieces for seds with
14246 # small command number limits, like on Digital OSF/1 and HP-UX.
14247 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14248 ac_file=1 # Number of current file.
14249 ac_beg=1 # First line for current file.
14250 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14251 ac_more_lines=:
14252 ac_sed_cmds=""
14253 while $ac_more_lines; do
14254   if test $ac_beg -gt 1; then
14255     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14256   else
14257     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14258   fi
14259   if test ! -s conftest.s$ac_file; then
14260     ac_more_lines=false
14261     rm -f conftest.s$ac_file
14262   else
14263     if test -z "$ac_sed_cmds"; then
14264       ac_sed_cmds="sed -f conftest.s$ac_file"
14265     else
14266       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14267     fi
14268     ac_file=`expr $ac_file + 1`
14269     ac_beg=$ac_end
14270     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14271   fi
14272 done
14273 if test -z "$ac_sed_cmds"; then
14274   ac_sed_cmds=cat
14275 fi
14276 EOF
14277
14278 cat >> $CONFIG_STATUS <<EOF
14279
14280 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14281 EOF
14282 cat >> $CONFIG_STATUS <<\EOF
14283 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14284   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14285   case "$ac_file" in
14286   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14287        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14288   *) ac_file_in="${ac_file}.in" ;;
14289   esac
14290
14291   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14292
14293   # Remove last slash and all that follows it.  Not all systems have dirname.
14294   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14295   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14296     # The file is in a subdirectory.
14297     test ! -d "$ac_dir" && mkdir "$ac_dir"
14298     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14299     # A "../" for each directory in $ac_dir_suffix.
14300     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14301   else
14302     ac_dir_suffix= ac_dots=
14303   fi
14304
14305   case "$ac_given_srcdir" in
14306   .)  srcdir=.
14307       if test -z "$ac_dots"; then top_srcdir=.
14308       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14309   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14310   *) # Relative path.
14311     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14312     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14313   esac
14314
14315   case "$ac_given_INSTALL" in
14316   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14317   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14318   esac
14319
14320   echo creating "$ac_file"
14321   rm -f "$ac_file"
14322   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14323   case "$ac_file" in
14324   *Makefile*) ac_comsub="1i\\
14325 # $configure_input" ;;
14326   *) ac_comsub= ;;
14327   esac
14328
14329   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14330   sed -e "$ac_comsub
14331 s%@configure_input@%$configure_input%g
14332 s%@srcdir@%$srcdir%g
14333 s%@top_srcdir@%$top_srcdir%g
14334 s%@INSTALL@%$INSTALL%g
14335 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14336 fi; done
14337 rm -f conftest.s*
14338
14339 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14340 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14341 #
14342 # ac_d sets the value in "#define NAME VALUE" lines.
14343 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14344 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14345 ac_dC='\3'
14346 ac_dD='%g'
14347 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14348 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14349 ac_uB='\([      ]\)%\1#\2define\3'
14350 ac_uC=' '
14351 ac_uD='\4%g'
14352 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14353 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14354 ac_eB='$%\1#\2define\3'
14355 ac_eC=' '
14356 ac_eD='%g'
14357
14358 if test "${CONFIG_HEADERS+set}" != set; then
14359 EOF
14360 cat >> $CONFIG_STATUS <<EOF
14361   CONFIG_HEADERS="src/config.h lwlib/config.h"
14362 EOF
14363 cat >> $CONFIG_STATUS <<\EOF
14364 fi
14365 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14366   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14367   case "$ac_file" in
14368   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14369        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14370   *) ac_file_in="${ac_file}.in" ;;
14371   esac
14372
14373   echo creating $ac_file
14374
14375   rm -f conftest.frag conftest.in conftest.out
14376   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14377   cat $ac_file_inputs > conftest.in
14378
14379 EOF
14380
14381 # Transform confdefs.h into a sed script conftest.vals that substitutes
14382 # the proper values into config.h.in to produce config.h.  And first:
14383 # Protect against being on the right side of a sed subst in config.status.
14384 # Protect against being in an unquoted here document in config.status.
14385 rm -f conftest.vals
14386 cat > conftest.hdr <<\EOF
14387 s/[\\&%]/\\&/g
14388 s%[\\$`]%\\&%g
14389 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14390 s%ac_d%ac_u%gp
14391 s%ac_u%ac_e%gp
14392 EOF
14393 sed -n -f conftest.hdr confdefs.h > conftest.vals
14394 rm -f conftest.hdr
14395
14396 # This sed command replaces #undef with comments.  This is necessary, for
14397 # example, in the case of _POSIX_SOURCE, which is predefined and required
14398 # on some systems where configure will not decide to define it.
14399 cat >> conftest.vals <<\EOF
14400 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14401 EOF
14402
14403 # Break up conftest.vals because some shells have a limit on
14404 # the size of here documents, and old seds have small limits too.
14405
14406 rm -f conftest.tail
14407 while :
14408 do
14409   ac_lines=`grep -c . conftest.vals`
14410   # grep -c gives empty output for an empty file on some AIX systems.
14411   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14412   # Write a limited-size here document to conftest.frag.
14413   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14414   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14415   echo 'CEOF
14416   sed -f conftest.frag conftest.in > conftest.out
14417   rm -f conftest.in
14418   mv conftest.out conftest.in
14419 ' >> $CONFIG_STATUS
14420   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14421   rm -f conftest.vals
14422   mv conftest.tail conftest.vals
14423 done
14424 rm -f conftest.vals
14425
14426 cat >> $CONFIG_STATUS <<\EOF
14427   rm -f conftest.frag conftest.h
14428   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14429   cat conftest.in >> conftest.h
14430   rm -f conftest.in
14431   if cmp -s $ac_file conftest.h 2>/dev/null; then
14432     echo "$ac_file is unchanged"
14433     rm -f conftest.h
14434   else
14435     # Remove last slash and all that follows it.  Not all systems have dirname.
14436       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14437       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14438       # The file is in a subdirectory.
14439       test ! -d "$ac_dir" && mkdir "$ac_dir"
14440     fi
14441     rm -f $ac_file
14442     mv conftest.h $ac_file
14443   fi
14444 fi; done
14445
14446 EOF
14447 cat >> $CONFIG_STATUS <<EOF
14448 CPP="$CPP"
14449  top_srcdir="$srcdir"
14450  MAKE_SUBDIR="$MAKE_SUBDIR"
14451
14452 EOF
14453 cat >> $CONFIG_STATUS <<\EOF
14454 for dir in . $MAKE_SUBDIR; do
14455   (
14456     cd $dir
14457     rm -f junk.c
14458     < Makefile.in \
14459       sed -e '/^# Generated/d' \
14460           -e 's%/\*\*/#.*%%' \
14461           -e 's/^ *# */#/' \
14462           -e '/^##/d' \
14463           -e '/^#/ {
14464 p
14465 d
14466 }'        \
14467           -e '/./ {
14468 s/\([\"]\)/\\\1/g
14469 s/^/"/
14470 s/$/"/
14471 }'  > junk.c;
14472
14473
14474
14475     echo creating $dir/Makefile
14476 $CPP -I. -I${top_srcdir}/src  junk.c \
14477   | sed -e 's/^\#.*//'          \
14478         -e 's/^[        ][      ]*$//'\
14479         -e 's/^ /       /'              \
14480   | sed -n -e '/^..*$/p'        \
14481   | sed '/^\"/ {
14482         s/\\\([\"]\)/\1/g
14483         s/^[    ]*\"//
14484         s/\"[   ]*$//
14485 }' > Makefile.new
14486     chmod 444 Makefile.new
14487     mv -f Makefile.new Makefile
14488
14489     echo creating $dir/GNUmakefile
14490 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14491   | sed -e 's/^\#.*//'          \
14492         -e 's/^[        ][      ]*$//'\
14493         -e 's/^ /       /'              \
14494   | sed -n -e '/^..*$/p'        \
14495   | sed '/^\"/ {
14496         s/\\\([\"]\)/\1/g
14497         s/^[    ]*\"//
14498         s/\"[   ]*$//
14499 }' > Makefile.new
14500     chmod 444 Makefile.new
14501     mv -f Makefile.new GNUmakefile
14502
14503     rm -f junk.c
14504   )
14505 done
14506
14507 sed < config.status >> lib-src/config.values \
14508   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14509   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14510   -e 's/^\([^ ]*\) $/\1 ""/' \
14511   -e 's/ 1$/ t/'
14512
14513
14514 exit 0
14515 EOF
14516 chmod +x $CONFIG_STATUS
14517 rm -fr confdefs* $ac_clean_files
14518 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1