update.
[chise/xemacs-chise.git] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.12 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266
267
268
269
270 arguments="$@"
271
272 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
273 quoted_arguments=
274 for i in "$@"; do
275    case "$i" in
276    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
277    | --no-cr | --no-c) ;;
278    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
279    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
280    *)
281    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
282    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
283    esac
284 done
285
286 while test $# != 0; do
287   arg="$1"; shift
288   case "$arg" in
289     --no-create|--no-recursion) ;;
290         -* )
291             case "$arg" in
292         -*=*)
293           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
294           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
295           valomitted=no
296         ;;
297                                                                           -*)
298                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
299           val="yes" valomitted=yes
300         ;;
301       esac
302
303             optname="$opt"
304       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
305
306             case "${valomitted}-${opt}" in yes-without_* )
307         opt=`echo $opt | sed 's/without/with/'`
308         valomitted="no" val="no" ;;
309       esac
310
311             case "$opt" in
312
313         with_site_lisp  | \
314         with_prefix     | \
315         with_site_modules | \
316         with_x          | \
317         with_x11        | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_utf_2000   | \
344         with_text_coding| \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         const_is_losing | \
362         usage_tracking  | \
363         use_union_type  | \
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_gnudbm=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 )  with_database_gnudbm=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_gnudbm" = "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                           case "$val" in
452             y | ye | yes )                      val=native ;;
453             n | no | non | none )               val=no;;
454             na | nat | nati | nativ | native )  val=native  ;;
455             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
456             b | bo | bot | both )               val=both;;
457             * ) (echo "$progname: Usage error:"
458 echo " " "The \`--$optname' option must have one of these values:
459   \`native', \`nas', \`both', or \`none'."
460 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
461           esac
462           eval "$opt=\"$val\""
463         ;;
464
465                 "with_xim" )
466           case "$val" in
467             y | ye | yes )                val=yes   ;;
468             n | no | non | none )         val=no    ;;
469             x | xl | xli | xlib )         val=xlib  ;;
470             m | mo | mot | moti | motif ) val=motif ;;
471             * ) (echo "$progname: Usage error:"
472 echo " " "The \`--$optname' option must have one of these values:
473   \`motif', \`xlib', \`yes', or \`no'."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
475           esac
476           eval "$opt=\"$val\""
477         ;;
478
479                 "mail_locking" )
480           case "$val" in
481             lockf )     val=lockf ;;
482             flock )     val=flock ;;
483             file )      val=file  ;;
484             * ) (echo "$progname: Usage error:"
485 echo " " "The \`--$optname' option must have one of these values:
486   \`lockf', \`flock', or \`file'."
487 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
488           esac
489           eval "$opt=\"$val\""
490         ;;
491
492                 "error_checking" )
493                           
494           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
495             case "$x" in
496                       n | no | non | none ) new_default=no ;;
497               a | al | all )        new_default=yes ;;
498
499               extents )       error_check_extents=yes ;;
500               noextents )     error_check_extents=no ;;
501
502               typecheck )     error_check_typecheck=yes ;;
503               notypecheck )   error_check_typecheck=no ;;
504
505               bufpos )        error_check_bufpos=yes ;;
506               nobufpos )      error_check_bufpos=no ;;
507
508               gc )            error_check_gc=yes ;;
509               nogc )          error_check_gc=no ;;
510
511               malloc )        error_check_malloc=yes ;;
512               nomalloc )      error_check_malloc=no ;;
513
514               byte_code )     error_check_byte_code=yes ;;
515               nobyte_code )   error_check_byte_code=no ;;
516
517               * ) bogus_error_check=yes ;;
518             esac
519             if test "$bogus_error_check" -o \
520                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
521                 if test "$error_check_default" = yes ; then
522                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
523                 else
524                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
525                 fi
526                 (echo "$progname: Usage error:"
527 echo " " "Valid types for the \`--$optname' option are:
528   $types."
529 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
530             elif test -n "$new_default" ; then
531                 error_check_extents=$new_default
532                 error_check_typecheck=$new_default
533                 error_check_bufpos=$new_default
534                 error_check_gc=$new_default
535                 error_check_malloc=$new_default
536                 error_check_byte_code=$new_default
537                 new_default=    # reset this
538             fi
539             echeck_notfirst=true
540           done
541         ;;
542
543                                 
544                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
545         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
546         archlibdir | docdir | package_path )
547                    if test "$valomitted" = "yes"; then
548              if test "$#" = 0; then
549                  (echo "$progname: Usage error:"
550 echo " " "The \`--$optname' option requires a value."
551 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
552              fi
553              val="$1"; shift
554            fi
555            eval "$opt=\"$val\""
556
557                            case "$opt" in
558                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
559     Defining EXEC_PREFIX_USER_DEFINED
560 EOF
561 cat >> confdefs.h <<\EOF
562 #define EXEC_PREFIX_USER_DEFINED 1
563 EOF
564 }
565  ;;
566              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
567     Defining LISPDIR_USER_DEFINED
568 EOF
569 cat >> confdefs.h <<\EOF
570 #define LISPDIR_USER_DEFINED 1
571 EOF
572 }
573  ;;
574              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
575     Defining SITELISPDIR_USER_DEFINED
576 EOF
577 cat >> confdefs.h <<\EOF
578 #define SITELISPDIR_USER_DEFINED 1
579 EOF
580 }
581  ;;
582              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
583     Defining MODULEDIR_USER_DEFINED
584 EOF
585 cat >> confdefs.h <<\EOF
586 #define MODULEDIR_USER_DEFINED 1
587 EOF
588 }
589  ;;
590              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
591     Defining ETCDIR_USER_DEFINED
592 EOF
593 cat >> confdefs.h <<\EOF
594 #define ETCDIR_USER_DEFINED 1
595 EOF
596 }
597  ;;
598              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
599     Defining INFODIR_USER_DEFINED
600 EOF
601 cat >> confdefs.h <<\EOF
602 #define INFODIR_USER_DEFINED 1
603 EOF
604 }
605  ;;
606              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
607     Defining INFOPATH_USER_DEFINED
608 EOF
609 cat >> confdefs.h <<\EOF
610 #define INFOPATH_USER_DEFINED 1
611 EOF
612 }
613  ;;
614              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
615     Defining PACKAGE_PATH_USER_DEFINED
616 EOF
617 cat >> confdefs.h <<\EOF
618 #define PACKAGE_PATH_USER_DEFINED 1
619 EOF
620 }
621  ;;
622              datadir )
623                 { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining INFODIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define INFODIR_USER_DEFINED 1
628 EOF
629 }
630
631                 { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining LISPDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define LISPDIR_USER_DEFINED 1
636 EOF
637 }
638
639             { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining MODULEDIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define MODULEDIR_USER_DEFINED 1
644 EOF
645 }
646
647                 { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining ETCDIR_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define ETCDIR_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining LOCKDIR_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define LOCKDIR_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
664     Defining DOCDIR_USER_DEFINED
665 EOF
666 cat >> confdefs.h <<\EOF
667 #define DOCDIR_USER_DEFINED 1
668 EOF
669 }
670  ;;
671              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
672     Defining ARCHLIBDIR_USER_DEFINED
673 EOF
674 cat >> confdefs.h <<\EOF
675 #define ARCHLIBDIR_USER_DEFINED 1
676 EOF
677 }
678  ;;
679            esac
680         ;;
681
682                 "no_create" ) ;;
683
684                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
685
686                 "with_menubars"   | \
687         "with_scrollbars" | \
688         "with_dialogs" | \
689         "with_widgets" )
690           case "$val" in
691             l | lu | luc | luci | lucid )               val=lucid  ;;
692             m | mo | mot | moti | motif )               val=motif  ;;
693             athena3d | athena-3d )                      val=athena3d ;;
694             a | at | ath | athe | athen | athena )      val=athena ;;
695             n | no | non | none )                       val=no ;;
696             * ) (echo "$progname: Usage error:"
697 echo " " "The \`--$optname' option must have one of these values:
698   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
699 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
700           esac
701           eval "$opt=\"$val\""
702         ;;
703
704                 "run_in_place"  | \
705         "with_gnu_make" )
706           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
707         ;;
708
709                 * ) (echo "$progname: Usage error:"
710 echo " " "Unrecognized option: $arg"
711 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
712
713       esac
714     ;;
715
716         *-*-*) configuration="$arg" ;;
717
718         *) (echo "$progname: Usage error:"
719 echo " " "Unrecognized argument: $arg"
720 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
721
722   esac
723 done
724
725
726 test -n "$cpp"      && CPP="$cpp"
727 test -n "$cppflags" && CPPFLAGS="$cppflags"
728 test -n "$libs"     && LIBS="$libs"
729 test -n "$ldflags"  && LDFLAGS="$ldflags"
730
731 eval set x "$quoted_arguments"; shift
732
733 test "$extra_verbose" = "yes" && verbose=yes
734
735 test -n "$with_x" && with_x11="$with_x"
736
737 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
738   test "$with_system_malloc" = "default" && with_system_malloc=yes
739 fi
740
741
742
743 if test "$with_cde $with_tooltalk" = "yes no"; then
744   (echo "$progname: Usage error:"
745 echo " " "--with-cde requires --with-tooltalk"
746 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
747 elif test "$with_tooltalk" = "no" ; then with_cde=no
748 elif test "$with_cde" = "yes"; then with_tooltalk=yes
749 fi
750
751
752 case "$srcdir" in
753
754     "" )
755     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
756       if test -f "$dir/src/lisp.h" -a \
757               -f "$dir/lisp/version.el" ; then
758         srcdir="$dir"
759         break
760       fi
761     done
762     if test -z "$srcdir" ; then
763       (echo "$progname: Usage error:"
764 echo " " "Neither the current directory nor its parent seem to
765   contain the XEmacs sources.  If you do not want to build XEmacs in its
766   source tree, you should run \`$progname' in the directory in which
767   you wish to build XEmacs, using the \`--srcdir' option to say where the
768   sources may be found."
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
770     fi
771   ;;
772
773     * )
774     if test ! -f "$srcdir/src/lisp.h" -o \
775             ! -f "$srcdir/lisp/version.el" ; then
776       (echo "$progname: Usage error:"
777 echo " " "The directory specified with the \`--srcdir' option,
778   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
779   either run the \`$progname' script at the top of the XEmacs source
780   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
782     fi
783   ;;
784 esac
785
786 if test -z "$configuration"; then
787     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
788   if test -z "$configuration"; then
789     (echo "$progname: Usage error:"
790 echo " " "XEmacs has not been ported to this host type.
791 Try explicitly specifying the CONFIGURATION when rerunning configure."
792 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
793   fi
794 fi
795
796 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
797 echo "configure:798: checking whether ln -s works" >&5
798
799 rm -f conftestdata
800 if ln -s X conftestdata 2>/dev/null
801 then
802   rm -f conftestdata
803   ac_cv_prog_LN_S="ln -s"
804 else
805   ac_cv_prog_LN_S=ln
806 fi
807 LN_S="$ac_cv_prog_LN_S"
808 if test "$ac_cv_prog_LN_S" = "ln -s"; then
809   echo "$ac_t""yes" 1>&6
810 else
811   echo "$ac_t""no" 1>&6
812 fi
813
814
815 for dir in lisp etc man info; do
816   if test ! -d "$dir" ; then
817     echo Making symbolic link to "$srcdir/$dir"
818     ${LN_S} "$srcdir/$dir" "$dir"
819   fi
820 done
821
822
823 absolute_pwd="`pwd`";
824 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
825 then blddir="$PWD"
826 else blddir="$absolute_pwd"; if test -d "/net"; then
827   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
828   blddir=`echo "$blddir" | \
829    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
830 fi
831 fi
832
833
834 case "$srcdir" in
835   /* ) ;;
836   .  ) srcdir="$blddir" ;;
837   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
838   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
839   srcdir=`echo "$srcdir" | \
840    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
841 fi ;;
842 esac
843
844 if test `pwd` != `sh -c cd $srcdir && pwd`  \
845    && test -f "$srcdir/src/config.h"; then
846   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
847    echo "   as a build directory right now; it has been configured in its own"
848    echo "   right.  To configure in another directory as well, you MUST"
849    echo "   use GNU make.  If you do not have GNU make, then you must"
850    echo "   now do \`make distclean' in $srcdir,"
851    echo "   and then run $progname again.") >&2
852   extrasub='/^VPATH[     ]*=/c\
853 vpath %.c $(srcdir)\
854 vpath %.h $(srcdir)\
855 vpath %.y $(srcdir)\
856 vpath %.l $(srcdir)\
857 vpath %.s $(srcdir)\
858 vpath %.in $(srcdir)'
859 fi
860
861 . "$srcdir/version.sh" || exit 1;
862 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
863 : "${extra_verbose=$beta}"
864 version="${emacs_major_version}.${emacs_minor_version}"
865 { test "$extra_verbose" = "yes" && cat << EOF
866     Defining EMACS_MAJOR_VERSION = $emacs_major_version
867 EOF
868 cat >> confdefs.h <<EOF
869 #define EMACS_MAJOR_VERSION $emacs_major_version
870 EOF
871 }
872
873 { test "$extra_verbose" = "yes" && cat << EOF
874     Defining EMACS_MINOR_VERSION = $emacs_minor_version
875 EOF
876 cat >> confdefs.h <<EOF
877 #define EMACS_MINOR_VERSION $emacs_minor_version
878 EOF
879 }
880
881 if test -n "$emacs_beta_version" ; then
882   if test "$beta" = "yes"; then
883         version="${version}-b${emacs_beta_version}"
884         { test "$extra_verbose" = "yes" && cat << EOF
885     Defining EMACS_BETA_VERSION = $emacs_beta_version
886 EOF
887 cat >> confdefs.h <<EOF
888 #define EMACS_BETA_VERSION $emacs_beta_version
889 EOF
890 }
891
892   else
893         version="${version}.${emacs_beta_version}"
894         { test "$extra_verbose" = "yes" && cat << EOF
895     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
896 EOF
897 cat >> confdefs.h <<EOF
898 #define EMACS_PATCH_LEVEL $emacs_beta_version
899 EOF
900 }
901
902   fi
903 fi
904 { test "$extra_verbose" = "yes" && cat << EOF
905     Defining XEMACS_CODENAME = "$xemacs_codename"
906 EOF
907 cat >> confdefs.h <<EOF
908 #define XEMACS_CODENAME "$xemacs_codename"
909 EOF
910 }
911
912 { test "$extra_verbose" = "yes" && cat << EOF
913     Defining EMACS_VERSION = "$version"
914 EOF
915 cat >> confdefs.h <<EOF
916 #define EMACS_VERSION "$version"
917 EOF
918 }
919
920
921 if test "$with_infodock" = "yes"; then
922   if test ! -f ../../ID-INSTALL; then
923     echo "Cannot build InfoDock without InfoDock sources"
924     with_infodock=no
925   fi
926 fi
927
928 if test "$with_infodock" = "yes"; then
929       { test "$extra_verbose" = "yes" && cat << EOF
930     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
931 EOF
932 cat >> confdefs.h <<EOF
933 #define INFODOCK_MAJOR_VERSION $infodock_major_version
934 EOF
935 }
936
937   { test "$extra_verbose" = "yes" && cat << EOF
938     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
939 EOF
940 cat >> confdefs.h <<EOF
941 #define INFODOCK_MINOR_VERSION $infodock_minor_version
942 EOF
943 }
944
945   { test "$extra_verbose" = "yes" && cat << EOF
946     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define INFODOCK_BUILD_VERSION $infodock_build_version
950 EOF
951 }
952
953   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
954   PROGNAME=infodock
955   CPPFLAGS="$CPPFLAGS -DINFODOCK"
956 else
957   PROGNAME=xemacs
958 fi
959
960 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
961 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
962     Defining ERROR_CHECK_EXTENTS
963 EOF
964 cat >> confdefs.h <<\EOF
965 #define ERROR_CHECK_EXTENTS 1
966 EOF
967 }
968
969 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
970     Defining ERROR_CHECK_TYPECHECK
971 EOF
972 cat >> confdefs.h <<\EOF
973 #define ERROR_CHECK_TYPECHECK 1
974 EOF
975 }
976
977 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
978     Defining ERROR_CHECK_BUFPOS
979 EOF
980 cat >> confdefs.h <<\EOF
981 #define ERROR_CHECK_BUFPOS 1
982 EOF
983 }
984
985 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
986     Defining ERROR_CHECK_GC
987 EOF
988 cat >> confdefs.h <<\EOF
989 #define ERROR_CHECK_GC 1
990 EOF
991 }
992
993 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
994     Defining ERROR_CHECK_MALLOC
995 EOF
996 cat >> confdefs.h <<\EOF
997 #define ERROR_CHECK_MALLOC 1
998 EOF
999 }
1000
1001 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1002     Defining ERROR_CHECK_BYTE_CODE
1003 EOF
1004 cat >> confdefs.h <<\EOF
1005 #define ERROR_CHECK_BYTE_CODE 1
1006 EOF
1007 }
1008
1009 if test "${debug:=$beta}" = "yes"; then
1010   use_assertions=yes memory_usage_stats=yes
1011   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1012    echo "    xemacs will be linked with \"debug.o\""
1013  fi
1014   { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining DEBUG_XEMACS
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define DEBUG_XEMACS 1
1019 EOF
1020 }
1021
1022 fi
1023 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining USE_ASSERTIONS
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define USE_ASSERTIONS 1
1028 EOF
1029 }
1030
1031 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining MEMORY_USAGE_STATS
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define MEMORY_USAGE_STATS 1
1036 EOF
1037 }
1038
1039
1040
1041 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1042 echo "configure:1043: checking "host system type"" >&5
1043 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1044 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1045 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1046 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1047 echo "$ac_t""$configuration" 1>&6
1048
1049
1050
1051
1052
1053 machine='' opsys=''
1054
1055 case "$canonical" in
1056   sparc-*-*        ) machine=sparc ;;
1057   alpha*-*-*       ) machine=alpha ;;
1058   vax-*-*          ) machine=vax ;;
1059   mips-dec-*       ) machine=pmax ;;
1060   mips-sgi-*       ) machine=iris4d ;;
1061   romp-ibm-*       ) machine=ibmrt ;;
1062   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1063   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1064   powerpc*-*       ) machine=powerpc ;;
1065   hppa-*-*         ) machine=hp800 ;;
1066   m88k-dg-*        ) machine=aviion ;;
1067   m68*-sony-*      ) machine=news ;;
1068   mips-sony-*      ) machine=news-risc ;;
1069   clipper-*        ) machine=clipper ;;
1070   arm-*            ) machine=arm ;;
1071   ns32k-*          ) machine=ns32000 ;;
1072 esac
1073
1074 case "$canonical" in
1075   *-*-linux*    ) opsys=linux ;;
1076   *-*-netbsd*   ) opsys=netbsd ;;
1077   *-*-openbsd*  ) opsys=openbsd ;;
1078   *-*-nextstep* ) opsys=nextstep ;;
1079   *-*-vms       ) opsys=vms ;;
1080
1081     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1082   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1083   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1084   *-dec-osf3*                ) opsys=decosf3-1 ;;
1085   *-dec-osf4*                ) opsys=decosf4-0 ;;
1086
1087     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1088   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1089   *-*-ultrix* )         opsys=ultrix4-3 ;;
1090
1091     *-*-aix3.1*  ) opsys=aix3-1 ;;
1092   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1093   *-*-aix3*    ) opsys=aix3-2   ;;
1094   *-*-aix4.0*  ) opsys=aix4     ;;
1095   *-*-aix4.1*  ) opsys=aix4-1   ;;
1096   *-*-aix4*    ) opsys=aix4-2   ;;
1097
1098     *-gnu* )                    opsys=gnu    ;;
1099   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1100   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1101   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1102   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1103   *-*-aos*   )                  opsys=bsd4-3 ;;
1104   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1105   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1106   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1107   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1108   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1109   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1110         if test -z "$NON_GNU_CPP" ; then
1111           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1112             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1113           done
1114         fi
1115         opsys=usg5-4-2 ;;
1116     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1117     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1118 esac
1119
1120 case "$canonical" in
1121
1122     *-*-netbsd* )
1123     case "$canonical" in
1124       i[3-9]86-*-netbsd*) machine=intel386 ;;
1125       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1126                                             machine=hp9000s300 ;;
1127       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1128       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1129     esac
1130   ;;
1131
1132     *-*-openbsd* )
1133     case "${canonical}" in
1134       i386-*-openbsd*)          machine=intel386 ;;
1135       m68k-*-openbsd*)          machine=hp9000s300 ;;
1136       mipsel-*-openbsd*)        machine=pmax ;;
1137      esac
1138    ;;
1139
1140     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1141   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1142
1143     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1144   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1145
1146     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1147
1148     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1149
1150     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1151
1152     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1153
1154     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1155
1156     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1157   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1158   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1159
1160   
1161     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1162
1163     *-convex-bsd* | *-convex-convexos* )
1164     machine=convex opsys=bsd4-3
1165     NON_GNU_CPP="cc -E -P"
1166   ;;
1167
1168     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1169
1170     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1171   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1172   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1173   m88k-dg-dgux*                           ) opsys=dgux     ;;
1174
1175     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1176   m88k-motorola-sysv4* )
1177                     machine=delta88k opsys=usg5-4-2
1178   ;;
1179   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1180
1181     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1182   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1183
1184     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1185
1186     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1187   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1188   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1189
1190       m88k-harris-cxux* )
1191         case "`uname -r`" in
1192        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1193        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1194     esac
1195     NON_GNU_CPP="/lib/cpp"
1196   ;;
1197     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1198     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1199
1200     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1201
1202     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1203
1204     *-hp-hpux* )
1205         case "$canonical" in
1206       m68*  ) machine=hp9000s300 ;;
1207       hppa* ) machine=hp800      ;;
1208     esac
1209
1210     case "$canonical" in
1211       *-hp-hpux7*  )  opsys=hpux   ;;
1212       *-hp-hpux8*  )  opsys=hpux8  ;;
1213       *-hp-hpux9*  )  opsys=hpux9  ;;
1214       *-hp-hpux10* )  opsys=hpux10 ;;
1215       *-hp-hpux11* )  opsys=hpux11 ;;
1216       *            )  opsys=hpux   ;;
1217     esac
1218
1219         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1220    echo "    xemacs will be linked with \"strcat.o\""
1221  fi ;; esac
1222
1223     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1224         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1225     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1226
1227     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1228   ;;
1229
1230     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1231   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1232
1233     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1234   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1235   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1236   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1237   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1238   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1239
1240     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1241   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1242
1243     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1244
1245     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1246
1247     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1248
1249     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1250
1251       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1252
1253     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1254
1255     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1256
1257     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1258
1259     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1260
1261         mips-mips-usg* ) machine=mips4 ;;
1262   mips-mips-riscos4 )
1263     machine=mips4
1264     NON_GNU_CC="cc -systype bsd43"
1265     NON_GNU_CPP="cc -systype bsd43 -E"
1266     case "$canonical" in
1267       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1268       mips-mips-riscos5* ) opsys=riscos5 ;;
1269     esac
1270   ;;
1271   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1272   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1273
1274     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1275
1276     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1277
1278     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1279   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1280
1281     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1282
1283     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1284
1285     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1286
1287     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1288
1289     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1290   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1291
1292     mips-siemens-sysv* | mips-sni-sysv*)
1293     machine=mips-siemens opsys=usg5-4
1294     NON_GNU_CC=/usr/ccs/bin/cc
1295     NON_GNU_CPP=/usr/ccs/lib/cpp
1296   ;;
1297
1298     mips-nec-sysv*)
1299     machine=mips-nec
1300     NON_GNU_CC=/usr/ccs/bin/cc
1301     NON_GNU_CPP=/usr/ccs/lib/cpp
1302   ;;
1303
1304       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1305   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1306     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1307   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1308   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1309   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1310   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1311   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1312   mips-sgi-irix*      ) opsys=irix5-0 ;;
1313
1314     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1315   *-sony-news* ) opsys=newsos5 ;;
1316
1317     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1318
1319     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1320         case "$canonical" in
1321       m68*-sunos1* )             machine=sun1     ;;
1322       m68*-sunos2* )             machine=sun2     ;;
1323       m68* )                     machine=sun3     ;;
1324       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1325       i*86-*-* )                 machine=intel386 ;;
1326       rs6000* )                  machine=rs6000   ;;
1327     esac
1328
1329         case "$canonical" in *-sunos5*)
1330       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1331     esac
1332
1333                     case "$canonical" in
1334       *-sunos4* )
1335         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1336         : ;;
1337       *-solaris2* )
1338         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1339         RANLIB=':' ;;
1340     esac
1341
1342     case "$canonical" in
1343       *-solaris*          )
1344         opsys=sol2
1345         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1346         { test "$extra_verbose" = "yes" && cat << EOF
1347     Defining OS_RELEASE = $os_release
1348 EOF
1349 cat >> confdefs.h <<EOF
1350 #define OS_RELEASE $os_release
1351 EOF
1352 }
1353  ;;
1354
1355             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1356       *-sunos4.0*         ) opsys=sunos4-0      ;;
1357       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1358       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1359       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1360       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1361       *-mach*             ) opsys=mach-bsd4-3   ;;
1362       *                   ) opsys=bsd4-2        ;;
1363     esac
1364
1365     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1366
1367         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1368   ;;
1369
1370     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1371
1372     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1373   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1374
1375     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1376
1377     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1378
1379     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1380       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1381
1382     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1383
1384     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1385
1386     vax-dec-* )
1387     case "$canonical" in
1388       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1389       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1390       *-mach* )                         opsys=mach-bsd4-3 ;;
1391     esac
1392   ;;
1393
1394     ns16k-whitechapel-* ) machine=mg1 ;;
1395
1396     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1397
1398     i[3-9]86-*-* )
1399     machine=intel386
1400     case "$canonical" in
1401       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1402       *-isc2.2* )               opsys=isc2-2 ;;
1403       *-isc4.0* )               opsys=isc4-0 ;;
1404       *-isc4.* )                opsys=isc4-1
1405                                 GCC_TEST_OPTIONS=-posix
1406                                 NON_GCC_TEST_OPTIONS=-Xp
1407                                 ;;
1408       *-isc* )                  opsys=isc3-0 ;;
1409       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1410       *-esix* )                 opsys=esix ;;
1411       *-mach* )                 opsys=mach-bsd4-3 ;;
1412       *-xenix* )                opsys=xenix ;;
1413       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1414       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1415       *-bsdi4* )                opsys=bsdos4 ;;
1416       *-bsdi3* )                opsys=bsdos3 ;;
1417       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1418       *-bsdi2* )                opsys=bsdos2 ;;
1419       *-sco3.2v5* )             opsys=sco5 ;
1420                                                         if test "$dynamic" = "yes" ; then
1421                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1422         else
1423                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1424         fi ;;
1425       *-sysv5* )                opsys=sco7 ;;
1426       *-386bsd* )               opsys=386bsd ;;
1427       *-freebsd* )              opsys=freebsd ;;
1428       *-nextstep* )             opsys=nextstep ;;
1429       *-pc-cygwin* )            opsys=cygwin32 ;;
1430       *-pc-mingw* )             opsys=mingw32 ;
1431                                 test -z "$with_tty" && with_tty="no";;
1432           esac
1433   ;;
1434
1435     m68k-*-linux* ) machine=m68k opsys=linux ;;
1436
1437 esac
1438
1439 if test -z "$machine" -o -z "$opsys"; then
1440   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1441    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1442   ) >&2
1443   exit 1
1444 fi
1445
1446 if test -z "$dynamic"; then
1447   case "$opsys" in
1448     hpux* | sunos4* ) dynamic=no ;;
1449     *) dynamic=yes ;;
1450   esac
1451 fi
1452 if test "$dynamic" = "yes"; then
1453   case "$opsys" in
1454     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1455     decosf* ) ld_call_shared="-call_shared" ;;
1456   esac
1457 else   case "$opsys" in
1458     sol2 )
1459       echo "Static linking is not supported on Solaris 2."
1460       echo "Rerun configure without specifying --dynamic=no."
1461       exit 1 ;;
1462     linux   ) ld_call_shared="-Bstatic" ;;
1463     decosf* ) ld_call_shared="-non_shared" ;;
1464   esac
1465 fi
1466
1467 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1468
1469 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1470 { test "$extra_verbose" = "yes" && cat << EOF
1471     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1472 EOF
1473 cat >> confdefs.h <<EOF
1474 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1475 EOF
1476 }
1477
1478
1479 machfile="m/${machine}.h"
1480 opsysfile="s/${opsys}.h"
1481
1482
1483 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1484 if test "$with_workshop $with_tooltalk" = "yes no"; then
1485   (echo "$progname: Usage error:"
1486 echo " " "--with-workshop requires --with-tooltalk"
1487 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1488 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1489 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1490 fi
1491
1492 if test "$with_workshop" = "yes"; then
1493   { test "$extra_verbose" = "yes" && cat << \EOF
1494     Defining SUNPRO
1495 EOF
1496 cat >> confdefs.h <<\EOF
1497 #define SUNPRO 1
1498 EOF
1499 }
1500
1501   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1502    echo "    xemacs will be linked with \"sunpro.o\""
1503  fi
1504 fi
1505
1506 if test "$with_clash_detection" = "yes"; then
1507   { test "$extra_verbose" = "yes" && cat << \EOF
1508     Defining CLASH_DETECTION
1509 EOF
1510 cat >> confdefs.h <<\EOF
1511 #define CLASH_DETECTION 1
1512 EOF
1513 }
1514
1515   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1516    echo "    xemacs will be linked with \"filelock.o\""
1517  fi
1518 fi
1519
1520 test -n "$compiler" && CC="$compiler"
1521 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1522 fi
1523
1524 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1525 if test "${CFLAGS-unset}" != unset
1526   then cflags_specified=yes;
1527   else cflags_specified=no;
1528 fi
1529
1530 xe_save_CFLAGS="$CFLAGS"
1531
1532 # Extract the first word of "gcc", so it can be a program name with args.
1533 set dummy gcc; ac_word=$2
1534 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1535 echo "configure:1536: checking for $ac_word" >&5
1536
1537 if test -n "$CC"; then
1538   ac_cv_prog_CC="$CC" # Let the user override the test.
1539 else
1540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1541   ac_dummy="$PATH"
1542   for ac_dir in $ac_dummy; do
1543     test -z "$ac_dir" && ac_dir=.
1544     if test -f $ac_dir/$ac_word; then
1545       ac_cv_prog_CC="gcc"
1546       break
1547     fi
1548   done
1549   IFS="$ac_save_ifs"
1550 fi
1551 CC="$ac_cv_prog_CC"
1552 if test -n "$CC"; then
1553   echo "$ac_t""$CC" 1>&6
1554 else
1555   echo "$ac_t""no" 1>&6
1556 fi
1557
1558 if test -z "$CC"; then
1559   # Extract the first word of "cc", so it can be a program name with args.
1560 set dummy cc; ac_word=$2
1561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1562 echo "configure:1563: checking for $ac_word" >&5
1563
1564 if test -n "$CC"; then
1565   ac_cv_prog_CC="$CC" # Let the user override the test.
1566 else
1567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1568   ac_prog_rejected=no
1569   ac_dummy="$PATH"
1570   for ac_dir in $ac_dummy; do
1571     test -z "$ac_dir" && ac_dir=.
1572     if test -f $ac_dir/$ac_word; then
1573       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1574         ac_prog_rejected=yes
1575         continue
1576       fi
1577       ac_cv_prog_CC="cc"
1578       break
1579     fi
1580   done
1581   IFS="$ac_save_ifs"
1582 if test $ac_prog_rejected = yes; then
1583   # We found a bogon in the path, so make sure we never use it.
1584   set dummy $ac_cv_prog_CC
1585   shift
1586   if test $# -gt 0; then
1587     # We chose a different compiler from the bogus one.
1588     # However, it has the same basename, so the bogon will be chosen
1589     # first if we set CC to just the basename; use the full file name.
1590     shift
1591     set dummy "$ac_dir/$ac_word" "$@"
1592     shift
1593     ac_cv_prog_CC="$@"
1594   fi
1595 fi
1596 fi
1597 CC="$ac_cv_prog_CC"
1598 if test -n "$CC"; then
1599   echo "$ac_t""$CC" 1>&6
1600 else
1601   echo "$ac_t""no" 1>&6
1602 fi
1603
1604   if test -z "$CC"; then
1605     case "`uname -s`" in
1606     *win32* | *WIN32*)
1607       # Extract the first word of "cl", so it can be a program name with args.
1608 set dummy cl; ac_word=$2
1609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1610 echo "configure:1611: checking for $ac_word" >&5
1611
1612 if test -n "$CC"; then
1613   ac_cv_prog_CC="$CC" # Let the user override the test.
1614 else
1615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1616   ac_dummy="$PATH"
1617   for ac_dir in $ac_dummy; do
1618     test -z "$ac_dir" && ac_dir=.
1619     if test -f $ac_dir/$ac_word; then
1620       ac_cv_prog_CC="cl"
1621       break
1622     fi
1623   done
1624   IFS="$ac_save_ifs"
1625 fi
1626 CC="$ac_cv_prog_CC"
1627 if test -n "$CC"; then
1628   echo "$ac_t""$CC" 1>&6
1629 else
1630   echo "$ac_t""no" 1>&6
1631 fi
1632  ;;
1633     esac
1634   fi
1635   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1636 fi
1637
1638 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1639 echo "configure:1640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1640
1641 ac_ext=c
1642 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1643 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1644 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1645 ac_cpp='$CPP '"$xe_cppflags"
1646 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1647 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1648 cross_compiling=no
1649
1650 cat > conftest.$ac_ext << EOF
1651
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654
1655 main(){return(0);}
1656 EOF
1657 if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1658   ac_cv_prog_cc_works=yes
1659   # If we can't run a trivial program, we are probably using a cross compiler.
1660   if (./conftest; exit) 2>/dev/null; then
1661     ac_cv_prog_cc_cross=no
1662   else
1663     ac_cv_prog_cc_cross=yes
1664   fi
1665 else
1666   echo "configure: failed program was:" >&5
1667   cat conftest.$ac_ext >&5
1668   ac_cv_prog_cc_works=no
1669 fi
1670 rm -fr conftest*
1671 ac_ext=c
1672 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1673 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1674 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1675 ac_cpp='$CPP '"$xe_cppflags"
1676 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1677 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1678 cross_compiling=no
1679
1680 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1681 if test $ac_cv_prog_cc_works = no; then
1682   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1683 fi
1684 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1685 echo "configure:1686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1686 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1687 cross_compiling=$ac_cv_prog_cc_cross
1688
1689 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1690 echo "configure:1691: checking whether we are using GNU C" >&5
1691
1692 cat > conftest.c <<EOF
1693 #ifdef __GNUC__
1694   yes;
1695 #endif
1696 EOF
1697 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1698   ac_cv_prog_gcc=yes
1699 else
1700   ac_cv_prog_gcc=no
1701 fi
1702
1703 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1704
1705 if test $ac_cv_prog_gcc = yes; then
1706   GCC=yes
1707 else
1708   GCC=
1709 fi
1710
1711 ac_test_CFLAGS="${CFLAGS+set}"
1712 ac_save_CFLAGS="$CFLAGS"
1713 CFLAGS=
1714 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1715 echo "configure:1716: checking whether ${CC-cc} accepts -g" >&5
1716
1717 echo 'void f(){}' > conftest.c
1718 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1719   ac_cv_prog_cc_g=yes
1720 else
1721   ac_cv_prog_cc_g=no
1722 fi
1723 rm -f conftest*
1724
1725
1726 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1727 if test "$ac_test_CFLAGS" = set; then
1728   CFLAGS="$ac_save_CFLAGS"
1729 elif test $ac_cv_prog_cc_g = yes; then
1730   if test "$GCC" = yes; then
1731     CFLAGS="-g -O2"
1732   else
1733     CFLAGS="-g"
1734   fi
1735 else
1736   if test "$GCC" = yes; then
1737     CFLAGS="-O2"
1738   else
1739     CFLAGS=
1740   fi
1741 fi
1742  
1743 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1744   CC=${NON_GNU_CC-cc}
1745   # Extract the first word of "gcc", so it can be a program name with args.
1746 set dummy gcc; ac_word=$2
1747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1748 echo "configure:1749: checking for $ac_word" >&5
1749
1750 if test -n "$CC"; then
1751   ac_cv_prog_CC="$CC" # Let the user override the test.
1752 else
1753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1754   ac_dummy="$PATH"
1755   for ac_dir in $ac_dummy; do
1756     test -z "$ac_dir" && ac_dir=.
1757     if test -f $ac_dir/$ac_word; then
1758       ac_cv_prog_CC="gcc"
1759       break
1760     fi
1761   done
1762   IFS="$ac_save_ifs"
1763 fi
1764 CC="$ac_cv_prog_CC"
1765 if test -n "$CC"; then
1766   echo "$ac_t""$CC" 1>&6
1767 else
1768   echo "$ac_t""no" 1>&6
1769 fi
1770
1771 if test -z "$CC"; then
1772   # Extract the first word of "cc", so it can be a program name with args.
1773 set dummy cc; ac_word=$2
1774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1775 echo "configure:1776: checking for $ac_word" >&5
1776
1777 if test -n "$CC"; then
1778   ac_cv_prog_CC="$CC" # Let the user override the test.
1779 else
1780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1781   ac_prog_rejected=no
1782   ac_dummy="$PATH"
1783   for ac_dir in $ac_dummy; do
1784     test -z "$ac_dir" && ac_dir=.
1785     if test -f $ac_dir/$ac_word; then
1786       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1787         ac_prog_rejected=yes
1788         continue
1789       fi
1790       ac_cv_prog_CC="cc"
1791       break
1792     fi
1793   done
1794   IFS="$ac_save_ifs"
1795 if test $ac_prog_rejected = yes; then
1796   # We found a bogon in the path, so make sure we never use it.
1797   set dummy $ac_cv_prog_CC
1798   shift
1799   if test $# -gt 0; then
1800     # We chose a different compiler from the bogus one.
1801     # However, it has the same basename, so the bogon will be chosen
1802     # first if we set CC to just the basename; use the full file name.
1803     shift
1804     set dummy "$ac_dir/$ac_word" "$@"
1805     shift
1806     ac_cv_prog_CC="$@"
1807   fi
1808 fi
1809 fi
1810 CC="$ac_cv_prog_CC"
1811 if test -n "$CC"; then
1812   echo "$ac_t""$CC" 1>&6
1813 else
1814   echo "$ac_t""no" 1>&6
1815 fi
1816
1817   if test -z "$CC"; then
1818     case "`uname -s`" in
1819     *win32* | *WIN32*)
1820       # Extract the first word of "cl", so it can be a program name with args.
1821 set dummy cl; ac_word=$2
1822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1823 echo "configure:1824: checking for $ac_word" >&5
1824
1825 if test -n "$CC"; then
1826   ac_cv_prog_CC="$CC" # Let the user override the test.
1827 else
1828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1829   ac_dummy="$PATH"
1830   for ac_dir in $ac_dummy; do
1831     test -z "$ac_dir" && ac_dir=.
1832     if test -f $ac_dir/$ac_word; then
1833       ac_cv_prog_CC="cl"
1834       break
1835     fi
1836   done
1837   IFS="$ac_save_ifs"
1838 fi
1839 CC="$ac_cv_prog_CC"
1840 if test -n "$CC"; then
1841   echo "$ac_t""$CC" 1>&6
1842 else
1843   echo "$ac_t""no" 1>&6
1844 fi
1845  ;;
1846     esac
1847   fi
1848   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1849 fi
1850
1851 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1852 echo "configure:1853: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1853
1854 ac_ext=c
1855 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1856 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1857 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1858 ac_cpp='$CPP '"$xe_cppflags"
1859 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1860 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1861 cross_compiling=no
1862
1863 cat > conftest.$ac_ext << EOF
1864
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867
1868 main(){return(0);}
1869 EOF
1870 if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1871   ac_cv_prog_cc_works=yes
1872   # If we can't run a trivial program, we are probably using a cross compiler.
1873   if (./conftest; exit) 2>/dev/null; then
1874     ac_cv_prog_cc_cross=no
1875   else
1876     ac_cv_prog_cc_cross=yes
1877   fi
1878 else
1879   echo "configure: failed program was:" >&5
1880   cat conftest.$ac_ext >&5
1881   ac_cv_prog_cc_works=no
1882 fi
1883 rm -fr conftest*
1884 ac_ext=c
1885 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1886 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1887 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1888 ac_cpp='$CPP '"$xe_cppflags"
1889 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1890 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1891 cross_compiling=no
1892
1893 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1894 if test $ac_cv_prog_cc_works = no; then
1895   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1896 fi
1897 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1898 echo "configure:1899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1899 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1900 cross_compiling=$ac_cv_prog_cc_cross
1901
1902 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1903 echo "configure:1904: checking whether we are using GNU C" >&5
1904
1905 cat > conftest.c <<EOF
1906 #ifdef __GNUC__
1907   yes;
1908 #endif
1909 EOF
1910 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1911   ac_cv_prog_gcc=yes
1912 else
1913   ac_cv_prog_gcc=no
1914 fi
1915
1916 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1917
1918 if test $ac_cv_prog_gcc = yes; then
1919   GCC=yes
1920 else
1921   GCC=
1922 fi
1923
1924 ac_test_CFLAGS="${CFLAGS+set}"
1925 ac_save_CFLAGS="$CFLAGS"
1926 CFLAGS=
1927 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1928 echo "configure:1929: checking whether ${CC-cc} accepts -g" >&5
1929
1930 echo 'void f(){}' > conftest.c
1931 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1932   ac_cv_prog_cc_g=yes
1933 else
1934   ac_cv_prog_cc_g=no
1935 fi
1936 rm -f conftest*
1937
1938
1939 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1940 if test "$ac_test_CFLAGS" = set; then
1941   CFLAGS="$ac_save_CFLAGS"
1942 elif test $ac_cv_prog_cc_g = yes; then
1943   if test "$GCC" = yes; then
1944     CFLAGS="-g -O2"
1945   else
1946     CFLAGS="-g"
1947   fi
1948 else
1949   if test "$GCC" = yes; then
1950     CFLAGS="-O2"
1951   else
1952     CFLAGS=
1953   fi
1954 fi
1955
1956 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1957   CC=gcc
1958   # Extract the first word of "gcc", so it can be a program name with args.
1959 set dummy gcc; ac_word=$2
1960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1961 echo "configure:1962: checking for $ac_word" >&5
1962
1963 if test -n "$CC"; then
1964   ac_cv_prog_CC="$CC" # Let the user override the test.
1965 else
1966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1967   ac_dummy="$PATH"
1968   for ac_dir in $ac_dummy; do
1969     test -z "$ac_dir" && ac_dir=.
1970     if test -f $ac_dir/$ac_word; then
1971       ac_cv_prog_CC="gcc"
1972       break
1973     fi
1974   done
1975   IFS="$ac_save_ifs"
1976 fi
1977 CC="$ac_cv_prog_CC"
1978 if test -n "$CC"; then
1979   echo "$ac_t""$CC" 1>&6
1980 else
1981   echo "$ac_t""no" 1>&6
1982 fi
1983
1984 if test -z "$CC"; then
1985   # Extract the first word of "cc", so it can be a program name with args.
1986 set dummy cc; ac_word=$2
1987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1988 echo "configure:1989: checking for $ac_word" >&5
1989
1990 if test -n "$CC"; then
1991   ac_cv_prog_CC="$CC" # Let the user override the test.
1992 else
1993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1994   ac_prog_rejected=no
1995   ac_dummy="$PATH"
1996   for ac_dir in $ac_dummy; do
1997     test -z "$ac_dir" && ac_dir=.
1998     if test -f $ac_dir/$ac_word; then
1999       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2000         ac_prog_rejected=yes
2001         continue
2002       fi
2003       ac_cv_prog_CC="cc"
2004       break
2005     fi
2006   done
2007   IFS="$ac_save_ifs"
2008 if test $ac_prog_rejected = yes; then
2009   # We found a bogon in the path, so make sure we never use it.
2010   set dummy $ac_cv_prog_CC
2011   shift
2012   if test $# -gt 0; then
2013     # We chose a different compiler from the bogus one.
2014     # However, it has the same basename, so the bogon will be chosen
2015     # first if we set CC to just the basename; use the full file name.
2016     shift
2017     set dummy "$ac_dir/$ac_word" "$@"
2018     shift
2019     ac_cv_prog_CC="$@"
2020   fi
2021 fi
2022 fi
2023 CC="$ac_cv_prog_CC"
2024 if test -n "$CC"; then
2025   echo "$ac_t""$CC" 1>&6
2026 else
2027   echo "$ac_t""no" 1>&6
2028 fi
2029
2030   if test -z "$CC"; then
2031     case "`uname -s`" in
2032     *win32* | *WIN32*)
2033       # Extract the first word of "cl", so it can be a program name with args.
2034 set dummy cl; ac_word=$2
2035 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2036 echo "configure:2037: checking for $ac_word" >&5
2037
2038 if test -n "$CC"; then
2039   ac_cv_prog_CC="$CC" # Let the user override the test.
2040 else
2041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2042   ac_dummy="$PATH"
2043   for ac_dir in $ac_dummy; do
2044     test -z "$ac_dir" && ac_dir=.
2045     if test -f $ac_dir/$ac_word; then
2046       ac_cv_prog_CC="cl"
2047       break
2048     fi
2049   done
2050   IFS="$ac_save_ifs"
2051 fi
2052 CC="$ac_cv_prog_CC"
2053 if test -n "$CC"; then
2054   echo "$ac_t""$CC" 1>&6
2055 else
2056   echo "$ac_t""no" 1>&6
2057 fi
2058  ;;
2059     esac
2060   fi
2061   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2062 fi
2063
2064 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2065 echo "configure:2066: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2066
2067 ac_ext=c
2068 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2069 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2070 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2071 ac_cpp='$CPP '"$xe_cppflags"
2072 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2073 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2074 cross_compiling=no
2075
2076 cat > conftest.$ac_ext << EOF
2077
2078 #line 2079 "configure"
2079 #include "confdefs.h"
2080
2081 main(){return(0);}
2082 EOF
2083 if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2084   ac_cv_prog_cc_works=yes
2085   # If we can't run a trivial program, we are probably using a cross compiler.
2086   if (./conftest; exit) 2>/dev/null; then
2087     ac_cv_prog_cc_cross=no
2088   else
2089     ac_cv_prog_cc_cross=yes
2090   fi
2091 else
2092   echo "configure: failed program was:" >&5
2093   cat conftest.$ac_ext >&5
2094   ac_cv_prog_cc_works=no
2095 fi
2096 rm -fr conftest*
2097 ac_ext=c
2098 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2099 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2100 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2101 ac_cpp='$CPP '"$xe_cppflags"
2102 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2103 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2104 cross_compiling=no
2105
2106 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2107 if test $ac_cv_prog_cc_works = no; then
2108   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2109 fi
2110 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2111 echo "configure:2112: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2112 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2113 cross_compiling=$ac_cv_prog_cc_cross
2114
2115 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2116 echo "configure:2117: checking whether we are using GNU C" >&5
2117
2118 cat > conftest.c <<EOF
2119 #ifdef __GNUC__
2120   yes;
2121 #endif
2122 EOF
2123 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2124   ac_cv_prog_gcc=yes
2125 else
2126   ac_cv_prog_gcc=no
2127 fi
2128
2129 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2130
2131 if test $ac_cv_prog_gcc = yes; then
2132   GCC=yes
2133 else
2134   GCC=
2135 fi
2136
2137 ac_test_CFLAGS="${CFLAGS+set}"
2138 ac_save_CFLAGS="$CFLAGS"
2139 CFLAGS=
2140 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2141 echo "configure:2142: checking whether ${CC-cc} accepts -g" >&5
2142
2143 echo 'void f(){}' > conftest.c
2144 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2145   ac_cv_prog_cc_g=yes
2146 else
2147   ac_cv_prog_cc_g=no
2148 fi
2149 rm -f conftest*
2150
2151
2152 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2153 if test "$ac_test_CFLAGS" = set; then
2154   CFLAGS="$ac_save_CFLAGS"
2155 elif test $ac_cv_prog_cc_g = yes; then
2156   if test "$GCC" = yes; then
2157     CFLAGS="-g -O2"
2158   else
2159     CFLAGS="-g"
2160   fi
2161 else
2162   if test "$GCC" = yes; then
2163     CFLAGS="-O2"
2164   else
2165     CFLAGS=
2166   fi
2167 fi
2168
2169 fi
2170 CFLAGS="$xe_save_CFLAGS"
2171
2172
2173 test -n "$CPP" -a -d "$CPP" && CPP=
2174
2175 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2176
2177 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2178 echo "configure:2179: checking how to run the C preprocessor" >&5
2179 # On Suns, sometimes $CPP names a directory.
2180 if test -n "$CPP" && test -d "$CPP"; then
2181   CPP=
2182 fi
2183 if test -z "$CPP"; then
2184
2185   # This must be in double quotes, not single quotes, because CPP may get
2186   # substituted into the Makefile and "${CC-cc}" will confuse make.
2187   CPP="${CC-cc} -E"
2188   # On the NeXT, cc -E runs the code through the compiler's parser,
2189   # not just through cpp.
2190   cat > conftest.$ac_ext <<EOF
2191 #line 2192 "configure"
2192 #include "confdefs.h"
2193 #include <assert.h>
2194 Syntax Error
2195 EOF
2196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2197 { (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2199 if test -z "$ac_err"; then
2200   :
2201 else
2202   echo "$ac_err" >&5
2203   echo "configure: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   rm -rf conftest*
2206   CPP="${CC-cc} -E -traditional-cpp"
2207   cat > conftest.$ac_ext <<EOF
2208 #line 2209 "configure"
2209 #include "confdefs.h"
2210 #include <assert.h>
2211 Syntax Error
2212 EOF
2213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2214 { (eval echo configure:2215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2216 if test -z "$ac_err"; then
2217   :
2218 else
2219   echo "$ac_err" >&5
2220   echo "configure: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   rm -rf conftest*
2223   CPP="${CC-cc} -nologo -E"
2224   cat > conftest.$ac_ext <<EOF
2225 #line 2226 "configure"
2226 #include "confdefs.h"
2227 #include <assert.h>
2228 Syntax Error
2229 EOF
2230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2231 { (eval echo configure:2232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2233 if test -z "$ac_err"; then
2234   :
2235 else
2236   echo "$ac_err" >&5
2237   echo "configure: failed program was:" >&5
2238   cat conftest.$ac_ext >&5
2239   rm -rf conftest*
2240   CPP=/lib/cpp
2241 fi
2242 rm -f conftest*
2243 fi
2244 rm -f conftest*
2245 fi
2246 rm -f conftest*
2247   ac_cv_prog_CPP="$CPP"
2248   CPP="$ac_cv_prog_CPP"
2249 else
2250   ac_cv_prog_CPP="$CPP"
2251 fi
2252 echo "$ac_t""$CPP" 1>&6
2253
2254
2255 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2256 echo "configure:2257: checking for AIX" >&5
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2259 "configure"
2259 #include "confdefs.h"
2260 #ifdef _AIX
2261   yes
2262 #endif
2263
2264 EOF
2265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2266   egrep "yes" >/dev/null 2>&1; then
2267   rm -rf conftest*
2268   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2269     Defining _ALL_SOURCE
2270 EOF
2271 cat >> confdefs.h <<\EOF
2272 #define _ALL_SOURCE 1
2273 EOF
2274 }
2275
2276 else
2277   rm -rf conftest*
2278   echo "$ac_t""no" 1>&6
2279 fi
2280 rm -f conftest*
2281
2282
2283
2284 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2285 echo "configure:2286: checking for GNU libc" >&5
2286 cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289 #include <features.h>
2290 int main() {
2291
2292 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2293 #error Not a GNU libc system :-(
2294 ******* ======= ******** &&&&&&&&
2295 #endif
2296
2297 ; return 0; }
2298 EOF
2299 if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2300   rm -rf conftest*
2301   have_glibc=yes
2302 else
2303   echo "configure: failed program was:" >&5
2304   cat conftest.$ac_ext >&5
2305   rm -rf conftest*
2306   have_glibc=no
2307 fi
2308 rm -f conftest*
2309 echo "$ac_t""$have_glibc" 1>&6
2310 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2311     Defining _GNU_SOURCE
2312 EOF
2313 cat >> confdefs.h <<\EOF
2314 #define _GNU_SOURCE 1
2315 EOF
2316 }
2317
2318
2319
2320 cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 int main () {
2324 #if defined __SUNPRO_C
2325 return 11;
2326 #elif defined __DECC
2327 return 12;
2328 #else
2329 return 0;
2330 #endif
2331 }
2332 EOF
2333 if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2334 then
2335   :
2336 else
2337   conftest_rc="$?"
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -fr conftest*
2341   case "$conftest_rc" in
2342   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2343   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2344 esac
2345 fi
2346 rm -fr conftest*
2347
2348
2349
2350
2351 echo "Extracting information from the machine- and system-dependent headers..."
2352
2353 tempcname="conftest.c"
2354
2355
2356
2357 cat > $tempcname <<EOF
2358 #define NOT_C_CODE
2359 #define C_SWITCH_SITE
2360 #define C_SWITCH_X_SITE
2361 #define LD_SWITCH_SITE
2362 #define LD_SWITCH_X_SITE
2363 #define LD_SWITCH_X_SITE_AUX
2364 #define OS_RELEASE $os_release
2365 #include "$srcdir/src/$opsysfile"
2366 #include "$srcdir/src/$machfile"
2367
2368 #ifndef LIBS_MACHINE
2369 #define LIBS_MACHINE
2370 #endif
2371 configure___ libs_machine=LIBS_MACHINE
2372
2373 #ifndef LIBS_SYSTEM
2374 #define LIBS_SYSTEM
2375 #endif
2376 configure___ libs_system=LIBS_SYSTEM
2377
2378 #ifndef LIBS_TERMCAP
2379 #define LIBS_TERMCAP
2380 #endif
2381 configure___ libs_termcap=LIBS_TERMCAP
2382
2383 #ifndef LIB_STANDARD
2384 #define LIB_STANDARD
2385 #endif
2386 configure___ libs_standard=LIB_STANDARD
2387
2388
2389 #ifndef OBJECTS_MACHINE
2390 #define OBJECTS_MACHINE
2391 #endif
2392 configure___ objects_machine=OBJECTS_MACHINE
2393
2394 #ifndef OBJECTS_SYSTEM
2395 #define OBJECTS_SYSTEM
2396 #endif
2397 configure___ objects_system=OBJECTS_SYSTEM
2398
2399
2400 #ifndef C_SWITCH_MACHINE
2401 #define C_SWITCH_MACHINE
2402 #endif
2403 configure___ c_switch_machine=C_SWITCH_MACHINE
2404
2405 #ifndef C_SWITCH_SYSTEM
2406 #define C_SWITCH_SYSTEM
2407 #endif
2408 configure___ c_switch_system=C_SWITCH_SYSTEM
2409
2410
2411 #ifndef LD_SWITCH_MACHINE
2412 #define LD_SWITCH_MACHINE
2413 #endif
2414 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2415
2416 #ifndef LD_SWITCH_SYSTEM
2417 #define LD_SWITCH_SYSTEM
2418 #endif
2419 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2420
2421
2422 #ifndef UNEXEC
2423 #define UNEXEC "unexec.o"
2424 #endif
2425 configure___ unexec=UNEXEC
2426
2427
2428 #ifndef LD_SWITCH_SHARED
2429 #define LD_SWITCH_SHARED "-c"
2430 #endif
2431 configure___ ld_switch_shared=LD_SWITCH_SHARED
2432
2433
2434 #ifdef ORDINARY_LINK
2435 #define LD "\$(CC) \$(CFLAGS)"
2436 #else /* no ORDINARY LINK */
2437 #ifdef COFF_ENCAPSULATE
2438 #define LD "\$(CC) -nostdlib"
2439 #else /* not COFF_ENCAPSULATE */
2440 #ifdef LINKER
2441 #define LD LINKER
2442 #else /* ! defined (LINKER) */
2443 #define LD "ld"
2444 #endif /* ! defined (LINKER) */
2445 #endif /* ! defined (COFF_ENCAPSULATE) */
2446 #endif /* not ORDINARY_LINK */
2447 configure___ ld=LD
2448
2449 #ifndef LIB_GCC
2450 #define LIB_GCC
2451 #endif
2452 configure___ lib_gcc=LIB_GCC
2453
2454 #ifndef LD_TEXT_START_ADDR
2455 #define LD_TEXT_START_ADDR
2456 #endif
2457 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2458
2459
2460 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2461 #ifdef NO_REMAP
2462 #ifdef COFF_ENCAPSULATE
2463 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2464 #else /* ! defined (COFF_ENCAPSULATE) */
2465 #define START_FILES "pre-crt0.o /lib/crt0.o"
2466 #endif /* ! defined (COFF_ENCAPSULATE) */
2467 #else /* ! defined (NO_REMAP) */
2468 #define START_FILES "ecrt0.o"
2469 #endif /* ! defined (NO_REMAP) */
2470 #endif /* no ORDINARY_LINK */
2471 #ifndef START_FILES
2472 #define START_FILES
2473 #endif
2474 configure___ start_files=START_FILES
2475
2476 #ifdef ORDINARY_LINK
2477 configure___ ordinary_link=yes
2478 #else
2479 configure___ ordinary_link=no
2480 #endif
2481
2482 #ifdef SYSTEM_MALLOC
2483 configure___ system_malloc=yes
2484 #else
2485 configure___ system_malloc=no
2486 #endif
2487
2488 #ifdef TERMINFO
2489 configure___ have_terminfo=yes
2490 #else
2491 configure___ have_terminfo=no
2492 #endif
2493
2494 #ifdef MAIL_USE_FLOCK
2495 configure___ mail_use_flock=yes
2496 #else
2497 configure___ mail_use_flock=no
2498 #endif
2499
2500 #ifdef MAIL_USE_LOCKF
2501 configure___ mail_use_lockf=yes
2502 #else
2503 configure___ mail_use_lockf=no
2504 #endif
2505
2506 #ifdef HAVE_WIN32_PROCESSES
2507 configure___ win32_processes=yes
2508 #else
2509 configure___ win32_processes=no
2510 #endif
2511
2512 EOF
2513
2514 CPP=`eval "echo $CPP $CPPFLAGS"`
2515 eval `$CPP -Isrc $tempcname \
2516         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2517
2518 rm $tempcname
2519
2520 test "$extra_verbose" = "yes" && \
2521   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 ""
2522
2523 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2524
2525 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2526
2527 if test "$cflags_specified" = "no"; then
2528       if   test "$GCC" = "yes"; then
2529     CFLAGS="-g -O3 -Wall -Wno-switch"
2530               elif test "$__SUNPRO_C" = "yes"; then
2531     case "$opsys" in
2532       sol2    ) CFLAGS="-v -xO4" ;;
2533       sunos4* ) CFLAGS="-xO2";;
2534     esac
2535   elif test "$__DECC" = "yes"; then
2536     CFLAGS="-O3"
2537   elif test "$CC" = "xlc"; then
2538     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2539     else
2540     CFLAGS="-O" ;  fi
2541 fi
2542
2543
2544 if test "$GCC" = "yes"; then
2545   set x $ld_switch_system; shift; ld_switch_system=""
2546   while test -n "$1"; do
2547     case $1 in
2548       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2549       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2550       -Xlinker* ) ;;
2551       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2552     esac
2553     shift
2554   done
2555 fi
2556
2557 if test "$GCC" = "yes"; then
2558   set x $ld_switch_machine; shift; ld_switch_machine=""
2559   while test -n "$1"; do
2560     case $1 in
2561       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2562       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2563       -Xlinker* ) ;;
2564       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2565     esac
2566     shift
2567   done
2568 fi
2569
2570 if test "$GCC" = "yes"; then
2571   set x $LDFLAGS; shift; LDFLAGS=""
2572   while test -n "$1"; do
2573     case $1 in
2574       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2575       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2576       -Xlinker* ) ;;
2577       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2578     esac
2579     shift
2580   done
2581 fi
2582
2583 if test "$GCC" = "yes"; then
2584   set x $ld_call_shared; shift; ld_call_shared=""
2585   while test -n "$1"; do
2586     case $1 in
2587       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2588       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2589       -Xlinker* ) ;;
2590       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2591     esac
2592     shift
2593   done
2594 fi
2595
2596 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2597    echo "    xemacs will be linked with \"$objects_machine\""
2598  fi
2599 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2600    echo "    xemacs will be linked with \"$objects_system\""
2601  fi
2602 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2603    echo "    xemacs will be linked with \"$unexec\""
2604  fi
2605
2606 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2607 echo "configure:2608: checking for dynodump" >&5
2608 if test "$unexec" != "unexsol2.o"; then
2609   echo "$ac_t""no" 1>&6
2610 else
2611   echo "$ac_t""yes" 1>&6
2612   { test "$extra_verbose" = "yes" && cat << \EOF
2613     Defining DYNODUMP
2614 EOF
2615 cat >> confdefs.h <<\EOF
2616 #define DYNODUMP 1
2617 EOF
2618 }
2619
2620   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2621   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2622   case "$machine" in
2623     sparc   ) dynodump_arch=sparc ;;
2624     *86*    ) dynodump_arch=i386  ;;
2625     powerpc ) dynodump_arch=ppc   ;;
2626   esac
2627     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
2628 fi
2629
2630
2631 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2632
2633 if test "$unexec" = "unexaix.o"; then
2634   if   test "$dynamic" = "no"; then
2635   start_flags="-Wl,-bnso,-bnodelcsect"
2636   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2637   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2638     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2639   done
2640   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2641     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2642   done
2643   
2644 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2645 echo "configure:2646: checking for terminateAndUnload in -lC" >&5
2646 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2647
2648 xe_check_libs=" -lC "
2649 cat > conftest.$ac_ext <<EOF
2650 #line 2651 "configure"
2651 #include "confdefs.h"
2652 /* Override any gcc2 internal prototype to avoid an error.  */
2653 /* We use char because int might match the return type of a gcc2
2654     builtin and then its argument prototype would still apply.  */
2655 char terminateAndUnload();
2656
2657 int main() {
2658 terminateAndUnload()
2659 ; return 0; }
2660 EOF
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2662   rm -rf conftest*
2663   eval "ac_cv_lib_$ac_lib_var=yes"
2664 else
2665   echo "configure: failed program was:" >&5
2666   cat conftest.$ac_ext >&5
2667   rm -rf conftest*
2668   eval "ac_cv_lib_$ac_lib_var=no"
2669 fi
2670 rm -f conftest*
2671 xe_check_libs=""
2672
2673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2674   echo "$ac_t""yes" 1>&6
2675   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2676 else
2677   echo "$ac_t""no" 1>&6
2678 fi
2679
2680
2681   fi
2682 elif test -n "$ld_text_start_addr"; then
2683   start_flags="-T $ld_text_start_addr -e __start"
2684 fi
2685
2686
2687
2688
2689 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2690  test -z "$linker" &&  linker='$(CC) -nostdlib'
2691  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2692 fi
2693 test "$GCC" != "yes" && lib_gcc=
2694
2695
2696
2697
2698
2699 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2700 if test -n "$site_libraries"; then
2701   for arg in $site_libraries; do
2702     case "$arg" in
2703      -* ) ;;
2704      * ) test -d "$arg" || \
2705            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2706        arg="-L${arg}" ;;
2707     esac
2708     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2709   done
2710 fi
2711
2712 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2713 if test -n "$site_includes"; then
2714   for arg in $site_includes; do
2715     case "$arg" in
2716       -* ) ;;
2717       * ) test -d "$arg" || \
2718            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2719       arg="-I${arg}" ;;
2720     esac
2721     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2722   done
2723 fi
2724
2725 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2726 if test -n "$site_prefixes"; then
2727   for dir in $site_prefixes; do
2728     lib_dir="${dir}/lib"
2729     inc_dir="${dir}/include"
2730     if test ! -d "$dir"; then
2731       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2732     elif test ! -d "$lib_dir"; then
2733       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2734     else
2735       if test -d "$inc_dir"; then
2736         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
2737       fi
2738       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
2739     fi
2740   done
2741 fi
2742
2743
2744 for dir in "/usr/ccs/lib"; do
2745   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
2746 done
2747
2748 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2749 if test -n "$site_runtime_libraries"; then
2750   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2751   export LD_RUN_PATH
2752 fi
2753
2754
2755 if   test "$dynamic" = "no"; then add_runtime_path=no
2756 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2757 else case "$opsys" in
2758        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2759        * ) add_runtime_path=no ;;
2760      esac
2761 fi
2762
2763 if test "$add_runtime_path" = "yes"; then
2764       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2765 echo "configure:2766: checking "for runtime libraries flag"" >&5
2766   case "$opsys" in
2767     sol2 ) dash_r="-R" ;;
2768     decosf* | linux* | irix*) dash_r="-rpath " ;;
2769     *)
2770       dash_r=""
2771       for try_dash_r in "-R" "-R " "-rpath "; do
2772         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2773         
2774 if test "$GCC" = "yes"; then
2775   set x $xe_check_libs; shift; xe_check_libs=""
2776   while test -n "$1"; do
2777     case $1 in
2778       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2779       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2780       -Xlinker* ) ;;
2781       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2782     esac
2783     shift
2784   done
2785 fi
2786         cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789
2790 int main() {
2791
2792 ; return 0; }
2793 EOF
2794 if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2795   rm -rf conftest*
2796   dash_r="$try_dash_r"
2797 else
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800 fi
2801 rm -f conftest*
2802         xe_check_libs=""
2803         test -n "$dash_r" && break
2804       done ;;
2805   esac
2806   if test -n "$dash_r";
2807     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2808     else echo "$ac_t""NONE" 1>&6
2809   fi
2810 fi
2811
2812 xe_add_unique_runpath_dir='
2813   xe_add_p=yes
2814   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2815   done
2816   if test "$xe_add_p" = "yes"; then
2817     test -n "$runpath" && runpath="${runpath}:"
2818     runpath="${runpath}${xe_runpath_dir}"
2819     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2820   fi'
2821
2822
2823
2824
2825 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2826     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2827   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2828   
2829         runpath="" runpath_dirs=""
2830   if test -n "$LD_RUN_PATH"; then
2831     runpath="$LD_RUN_PATH"
2832   elif test "$GCC" = "yes"; then
2833         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2834     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2835     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2836     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2837       case "$arg" in P,* | -L* | -R* )
2838         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2839           {
2840 xe_runpath_dir="$dir"
2841   test "$xe_runpath_dir" != "/lib"     -a \
2842         "$xe_runpath_dir" != "/usr/lib" -a \
2843         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2844   eval "$xe_add_unique_runpath_dir"
2845 }
2846         done ;;
2847       esac
2848     done
2849     ld_switch_run="$ld_switch_run_save"
2850     rm -f conftest*
2851   else
2852         for arg in $ld_switch_site $ld_switch_x_site; do
2853       case "$arg" in -L*) {
2854 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2855   test "$xe_runpath_dir" != "/lib"     -a \
2856         "$xe_runpath_dir" != "/usr/lib" -a \
2857         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2858   eval "$xe_add_unique_runpath_dir"
2859 };; esac
2860     done
2861         if test "$opsys $need_motif" = "sol2 yes"; then
2862       xe_runpath_dir="/opt/SUNWdt/lib";
2863       eval "$xe_add_unique_runpath_dir";
2864     fi
2865   fi 
2866   if test -n "$runpath"; then
2867     ld_switch_run="${dash_r}${runpath}"
2868     
2869 if test "$GCC" = "yes"; then
2870   set x $ld_switch_run; shift; ld_switch_run=""
2871   while test -n "$1"; do
2872     case $1 in
2873       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2874       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2875       -Xlinker* ) ;;
2876       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2877     esac
2878     shift
2879   done
2880 fi
2881     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2882   fi
2883 fi
2884
2885
2886
2887
2888 GNU_MALLOC=yes
2889 if test "$with_dlmalloc" != "no"; then
2890         doug_lea_malloc=yes
2891 else
2892         doug_lea_malloc=no
2893 fi
2894 after_morecore_hook_exists=yes
2895 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2896 echo "configure:2897: checking for malloc_get_state" >&5
2897
2898 cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 /* System header to define __stub macros and hopefully few prototypes,
2902     which can conflict with char malloc_get_state(); below.  */
2903 #include <assert.h>
2904 /* Override any gcc2 internal prototype to avoid an error.  */
2905 /* We use char because int might match the return type of a gcc2
2906     builtin and then its argument prototype would still apply.  */
2907 char malloc_get_state();
2908
2909 int main() {
2910
2911 /* The GNU C library defines this for functions which it implements
2912     to always fail with ENOSYS.  Some functions are actually named
2913     something starting with __ and the normal name is an alias.  */
2914 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2915 choke me
2916 #else
2917 malloc_get_state();
2918 #endif
2919
2920 ; return 0; }
2921 EOF
2922 if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2923   rm -rf conftest*
2924   eval "ac_cv_func_malloc_get_state=yes"
2925 else
2926   echo "configure: failed program was:" >&5
2927   cat conftest.$ac_ext >&5
2928   rm -rf conftest*
2929   eval "ac_cv_func_malloc_get_state=no"
2930 fi
2931 rm -f conftest*
2932
2933 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2934   echo "$ac_t""yes" 1>&6
2935   :
2936 else
2937   echo "$ac_t""no" 1>&6
2938 doug_lea_malloc=no
2939 fi
2940
2941 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2942 echo "configure:2943: checking for malloc_set_state" >&5
2943
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 /* System header to define __stub macros and hopefully few prototypes,
2948     which can conflict with char malloc_set_state(); below.  */
2949 #include <assert.h>
2950 /* Override any gcc2 internal prototype to avoid an error.  */
2951 /* We use char because int might match the return type of a gcc2
2952     builtin and then its argument prototype would still apply.  */
2953 char malloc_set_state();
2954
2955 int main() {
2956
2957 /* The GNU C library defines this for functions which it implements
2958     to always fail with ENOSYS.  Some functions are actually named
2959     something starting with __ and the normal name is an alias.  */
2960 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2961 choke me
2962 #else
2963 malloc_set_state();
2964 #endif
2965
2966 ; return 0; }
2967 EOF
2968 if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2969   rm -rf conftest*
2970   eval "ac_cv_func_malloc_set_state=yes"
2971 else
2972   echo "configure: failed program was:" >&5
2973   cat conftest.$ac_ext >&5
2974   rm -rf conftest*
2975   eval "ac_cv_func_malloc_set_state=no"
2976 fi
2977 rm -f conftest*
2978
2979 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2980   echo "$ac_t""yes" 1>&6
2981   :
2982 else
2983   echo "$ac_t""no" 1>&6
2984 doug_lea_malloc=no
2985 fi
2986
2987 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2988 echo "configure:2989: checking whether __after_morecore_hook exists" >&5
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 extern void (* __after_morecore_hook)();
2993 int main() {
2994 __after_morecore_hook = 0
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2998   rm -rf conftest*
2999   echo "$ac_t""yes" 1>&6
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   echo "$ac_t""no" 1>&6
3005    after_morecore_hook_exists=no
3006 fi
3007 rm -f conftest*
3008 if test "$system_malloc" = "yes" ; then
3009   GNU_MALLOC=no
3010   GNU_MALLOC_reason="
3011   (The GNU allocators don't work with this system configuration)."
3012 elif test "$with_system_malloc" = "yes" ; then
3013   GNU_MALLOC=no
3014   GNU_MALLOC_reason="
3015   (User chose not to use GNU allocators)."
3016 elif test "$with_debug_malloc" = "yes" ; then
3017   GNU_MALLOC=no
3018   GNU_MALLOC_reason="
3019   (User chose to use Debugging Malloc)."
3020 fi
3021
3022 if test "$doug_lea_malloc" = "yes" ; then
3023   if test "$GNU_MALLOC" = yes ; then
3024     GNU_MALLOC_reason="
3025   (Using Doug Lea's new malloc from the GNU C Library.)"
3026   fi
3027   { test "$extra_verbose" = "yes" && cat << \EOF
3028     Defining DOUG_LEA_MALLOC
3029 EOF
3030 cat >> confdefs.h <<\EOF
3031 #define DOUG_LEA_MALLOC 1
3032 EOF
3033 }
3034
3035   if test "$after_morecore_hook_exists" = "no" ; then
3036     GNU_MALLOC_reason="
3037   (Using Doug Lea's new malloc from the Linux C Library.)"
3038     { test "$extra_verbose" = "yes" && cat << \EOF
3039     Defining _NO_MALLOC_WARNING_
3040 EOF
3041 cat >> confdefs.h <<\EOF
3042 #define _NO_MALLOC_WARNING_ 1
3043 EOF
3044 }
3045
3046   fi
3047   use_minimal_tagbits=yes
3048 fi
3049
3050
3051
3052
3053 # Extract the first word of "ranlib", so it can be a program name with args.
3054 set dummy ranlib; ac_word=$2
3055 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3056 echo "configure:3057: checking for $ac_word" >&5
3057
3058 if test -n "$RANLIB"; then
3059   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3060 else
3061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3062   ac_dummy="$PATH"
3063   for ac_dir in $ac_dummy; do
3064     test -z "$ac_dir" && ac_dir=.
3065     if test -f $ac_dir/$ac_word; then
3066       ac_cv_prog_RANLIB="ranlib"
3067       break
3068     fi
3069   done
3070   IFS="$ac_save_ifs"
3071   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3072 fi
3073 RANLIB="$ac_cv_prog_RANLIB"
3074 if test -n "$RANLIB"; then
3075   echo "$ac_t""$RANLIB" 1>&6
3076 else
3077   echo "$ac_t""no" 1>&6
3078 fi
3079
3080 ac_aux_dir=
3081 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3082   if test -f $ac_dir/install-sh; then
3083     ac_aux_dir=$ac_dir
3084     ac_install_sh="$ac_aux_dir/install-sh -c"
3085     break
3086   elif test -f $ac_dir/install.sh; then
3087     ac_aux_dir=$ac_dir
3088     ac_install_sh="$ac_aux_dir/install.sh -c"
3089     break
3090   fi
3091 done
3092 if test -z "$ac_aux_dir"; then
3093   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3094 fi
3095 ac_config_guess=$ac_aux_dir/config.guess
3096 ac_config_sub=$ac_aux_dir/config.sub
3097 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3098
3099 # Find a good install program.  We prefer a C program (faster),
3100 # so one script is as good as another.  But avoid the broken or
3101 # incompatible versions:
3102 # SysV /etc/install, /usr/sbin/install
3103 # SunOS /usr/etc/install
3104 # IRIX /sbin/install
3105 # AIX /bin/install
3106 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3107 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3108 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3109 # ./install, which can be erroneously created by make from ./install.sh.
3110 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3111 echo "configure:3112: checking for a BSD compatible install" >&5
3112 if test -z "$INSTALL"; then
3113
3114   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3115   for ac_dir in $PATH; do
3116     # Account for people who put trailing slashes in PATH elements.
3117     case "$ac_dir/" in
3118     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3119     *)
3120       # OSF1 and SCO ODT 3.0 have their own names for install.
3121       # Don't use installbsd from OSF since it installs stuff as root
3122       # by default.
3123       for ac_prog in ginstall scoinst install; do
3124         if test -f $ac_dir/$ac_prog; then
3125           if test $ac_prog = install &&
3126             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3127             # AIX install.  It has an incompatible calling convention.
3128             :
3129           else
3130             ac_cv_path_install="$ac_dir/$ac_prog -c"
3131             break 2
3132           fi
3133         fi
3134       done
3135       ;;
3136     esac
3137   done
3138   IFS="$ac_save_IFS"
3139
3140   if test "${ac_cv_path_install+set}" = set; then
3141     INSTALL="$ac_cv_path_install"
3142   else
3143     # As a last resort, use the slow shell script.  We don't cache a
3144     # path for INSTALL within a source directory, because that will
3145     # break other packages using the cache if that directory is
3146     # removed, or if the path is relative.
3147     INSTALL="$ac_install_sh"
3148   fi
3149 fi
3150 echo "$ac_t""$INSTALL" 1>&6
3151
3152 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3153 # It thinks the first close brace ends the variable substitution.
3154 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3155
3156 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3157
3158 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3159
3160 for ac_prog in 'bison -y' byacc
3161 do
3162 # Extract the first word of "$ac_prog", so it can be a program name with args.
3163 set dummy $ac_prog; ac_word=$2
3164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3165 echo "configure:3166: checking for $ac_word" >&5
3166
3167 if test -n "$YACC"; then
3168   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3169 else
3170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3171   ac_dummy="$PATH"
3172   for ac_dir in $ac_dummy; do
3173     test -z "$ac_dir" && ac_dir=.
3174     if test -f $ac_dir/$ac_word; then
3175       ac_cv_prog_YACC="$ac_prog"
3176       break
3177     fi
3178   done
3179   IFS="$ac_save_ifs"
3180 fi
3181 YACC="$ac_cv_prog_YACC"
3182 if test -n "$YACC"; then
3183   echo "$ac_t""$YACC" 1>&6
3184 else
3185   echo "$ac_t""no" 1>&6
3186 fi
3187
3188 test -n "$YACC" && break
3189 done
3190 test -n "$YACC" || YACC="yacc"
3191
3192
3193 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3194 do
3195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3197 echo "configure:3198: checking for $ac_hdr" >&5
3198
3199 cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 #include <$ac_hdr>
3203 EOF
3204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3205 { (eval echo configure:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3207 if test -z "$ac_err"; then
3208   rm -rf conftest*
3209   eval "ac_cv_header_$ac_safe=yes"
3210 else
3211   echo "$ac_err" >&5
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   eval "ac_cv_header_$ac_safe=no"
3216 fi
3217 rm -f conftest*
3218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3219   echo "$ac_t""yes" 1>&6
3220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3221   { test "$extra_verbose" = "yes" && cat << EOF
3222     Defining $ac_tr_hdr
3223 EOF
3224 cat >> confdefs.h <<EOF
3225 #define $ac_tr_hdr 1
3226 EOF
3227 }
3228  
3229 else
3230   echo "$ac_t""no" 1>&6
3231 fi
3232 done
3233
3234 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3235 do
3236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3238 echo "configure:3239: checking for $ac_hdr" >&5
3239
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 #include <$ac_hdr>
3244 EOF
3245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3246 { (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3248 if test -z "$ac_err"; then
3249   rm -rf conftest*
3250   eval "ac_cv_header_$ac_safe=yes"
3251 else
3252   echo "$ac_err" >&5
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   eval "ac_cv_header_$ac_safe=no"
3257 fi
3258 rm -f conftest*
3259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3260   echo "$ac_t""yes" 1>&6
3261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3262   { test "$extra_verbose" = "yes" && cat << EOF
3263     Defining $ac_tr_hdr
3264 EOF
3265 cat >> confdefs.h <<EOF
3266 #define $ac_tr_hdr 1
3267 EOF
3268 }
3269  
3270 else
3271   echo "$ac_t""no" 1>&6
3272 fi
3273 done
3274
3275 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3276 do
3277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3279 echo "configure:3280: checking for $ac_hdr" >&5
3280
3281 cat > conftest.$ac_ext <<EOF
3282 #line 3283 "configure"
3283 #include "confdefs.h"
3284 #include <$ac_hdr>
3285 EOF
3286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3287 { (eval echo configure:3288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3289 if test -z "$ac_err"; then
3290   rm -rf conftest*
3291   eval "ac_cv_header_$ac_safe=yes"
3292 else
3293   echo "$ac_err" >&5
3294   echo "configure: failed program was:" >&5
3295   cat conftest.$ac_ext >&5
3296   rm -rf conftest*
3297   eval "ac_cv_header_$ac_safe=no"
3298 fi
3299 rm -f conftest*
3300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3301   echo "$ac_t""yes" 1>&6
3302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3303   { test "$extra_verbose" = "yes" && cat << EOF
3304     Defining $ac_tr_hdr
3305 EOF
3306 cat >> confdefs.h <<EOF
3307 #define $ac_tr_hdr 1
3308 EOF
3309 }
3310  
3311 else
3312   echo "$ac_t""no" 1>&6
3313 fi
3314 done
3315
3316 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3317 echo "configure:3318: checking for sys/wait.h that is POSIX.1 compatible" >&5
3318
3319 cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <sys/types.h>
3323 #include <sys/wait.h>
3324 #ifndef WEXITSTATUS
3325 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3326 #endif
3327 #ifndef WIFEXITED
3328 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3329 #endif
3330 int main() {
3331 int s;
3332 wait (&s);
3333 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3334 ; return 0; }
3335 EOF
3336 if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3337   rm -rf conftest*
3338   ac_cv_header_sys_wait_h=yes
3339 else
3340   echo "configure: failed program was:" >&5
3341   cat conftest.$ac_ext >&5
3342   rm -rf conftest*
3343   ac_cv_header_sys_wait_h=no
3344 fi
3345 rm -f conftest*
3346
3347 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3348 if test $ac_cv_header_sys_wait_h = yes; then
3349   { test "$extra_verbose" = "yes" && cat << \EOF
3350     Defining HAVE_SYS_WAIT_H
3351 EOF
3352 cat >> confdefs.h <<\EOF
3353 #define HAVE_SYS_WAIT_H 1
3354 EOF
3355 }
3356
3357 fi
3358
3359 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3360 echo "configure:3361: checking for ANSI C header files" >&5
3361
3362 cat > conftest.$ac_ext <<EOF
3363 #line 3364 "configure"
3364 #include "confdefs.h"
3365 #include <stdlib.h>
3366 #include <stdarg.h>
3367 #include <string.h>
3368 #include <float.h>
3369 EOF
3370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3371 { (eval echo configure:3372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3373 if test -z "$ac_err"; then
3374   rm -rf conftest*
3375   ac_cv_header_stdc=yes
3376 else
3377   echo "$ac_err" >&5
3378   echo "configure: failed program was:" >&5
3379   cat conftest.$ac_ext >&5
3380   rm -rf conftest*
3381   ac_cv_header_stdc=no
3382 fi
3383 rm -f conftest*
3384
3385 if test $ac_cv_header_stdc = yes; then
3386   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3387 cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 #include <string.h>
3391 EOF
3392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3393   egrep "memchr" >/dev/null 2>&1; then
3394   :
3395 else
3396   rm -rf conftest*
3397   ac_cv_header_stdc=no
3398 fi
3399 rm -f conftest*
3400
3401 fi
3402
3403 if test $ac_cv_header_stdc = yes; then
3404   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3405 cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include <stdlib.h>
3409 EOF
3410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3411   egrep "free" >/dev/null 2>&1; then
3412   :
3413 else
3414   rm -rf conftest*
3415   ac_cv_header_stdc=no
3416 fi
3417 rm -f conftest*
3418
3419 fi
3420
3421 if test $ac_cv_header_stdc = yes; then
3422   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3423 cat > conftest.$ac_ext <<EOF
3424 #line 3425 "configure"
3425 #include "confdefs.h"
3426 #include <ctype.h>
3427 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3428 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3429 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3430 int main () { int i; for (i = 0; i < 256; i++)
3431 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3432 exit (0); }
3433
3434 EOF
3435 if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3436 then
3437   :
3438 else
3439   conftest_rc="$?"
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -fr conftest*
3443   ac_cv_header_stdc=no
3444 fi
3445 rm -fr conftest*
3446 fi
3447
3448 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3449 if test $ac_cv_header_stdc = yes; then
3450   { test "$extra_verbose" = "yes" && cat << \EOF
3451     Defining STDC_HEADERS
3452 EOF
3453 cat >> confdefs.h <<\EOF
3454 #define STDC_HEADERS 1
3455 EOF
3456 }
3457
3458 fi
3459
3460 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3461 echo "configure:3462: checking whether time.h and sys/time.h may both be included" >&5
3462
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <sys/types.h>
3467 #include <sys/time.h>
3468 #include <time.h>
3469 int main() {
3470 struct tm *tp;
3471 ; return 0; }
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3474   rm -rf conftest*
3475   ac_cv_header_time=yes
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -rf conftest*
3480   ac_cv_header_time=no
3481 fi
3482 rm -f conftest*
3483
3484 echo "$ac_t""$ac_cv_header_time" 1>&6
3485 if test $ac_cv_header_time = yes; then
3486   { test "$extra_verbose" = "yes" && cat << \EOF
3487     Defining TIME_WITH_SYS_TIME
3488 EOF
3489 cat >> confdefs.h <<\EOF
3490 #define TIME_WITH_SYS_TIME 1
3491 EOF
3492 }
3493
3494 fi
3495
3496 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3497 echo "configure:3498: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3498
3499 cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502 #include <sys/types.h>
3503 #include <signal.h>
3504 /* NetBSD declares sys_siglist in unistd.h.  */
3505 #ifdef HAVE_UNISTD_H
3506 #include <unistd.h>
3507 #endif
3508 int main() {
3509 char *msg = *(sys_siglist + 1);
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3513   rm -rf conftest*
3514   ac_cv_decl_sys_siglist=yes
3515 else
3516   echo "configure: failed program was:" >&5
3517   cat conftest.$ac_ext >&5
3518   rm -rf conftest*
3519   ac_cv_decl_sys_siglist=no
3520 fi
3521 rm -f conftest*
3522
3523 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3524 if test $ac_cv_decl_sys_siglist = yes; then
3525   { test "$extra_verbose" = "yes" && cat << \EOF
3526     Defining SYS_SIGLIST_DECLARED
3527 EOF
3528 cat >> confdefs.h <<\EOF
3529 #define SYS_SIGLIST_DECLARED 1
3530 EOF
3531 }
3532
3533 fi
3534
3535
3536 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3537 echo "configure:3538: checking for struct utimbuf" >&5
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #ifdef TIME_WITH_SYS_TIME
3542 #include <sys/time.h>
3543 #include <time.h>
3544 #else
3545 #ifdef HAVE_SYS_TIME_H
3546 #include <sys/time.h>
3547 #else
3548 #include <time.h>
3549 #endif
3550 #endif
3551 #ifdef HAVE_UTIME_H
3552 #include <utime.h>
3553 #endif
3554 int main() {
3555 static struct utimbuf x; x.actime = x.modtime;
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3559   rm -rf conftest*
3560   echo "$ac_t""yes" 1>&6
3561    { test "$extra_verbose" = "yes" && cat << \EOF
3562     Defining HAVE_STRUCT_UTIMBUF
3563 EOF
3564 cat >> confdefs.h <<\EOF
3565 #define HAVE_STRUCT_UTIMBUF 1
3566 EOF
3567 }
3568
3569 else
3570   echo "configure: failed program was:" >&5
3571   cat conftest.$ac_ext >&5
3572   rm -rf conftest*
3573   echo "$ac_t""no" 1>&6
3574 fi
3575 rm -f conftest*
3576
3577 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3578 echo "configure:3579: checking return type of signal handlers" >&5
3579
3580 cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <sys/types.h>
3584 #include <signal.h>
3585 #ifdef signal
3586 #undef signal
3587 #endif
3588 #ifdef __cplusplus
3589 extern "C" void (*signal (int, void (*)(int)))(int);
3590 #else
3591 void (*signal ()) ();
3592 #endif
3593
3594 int main() {
3595 int i;
3596 ; return 0; }
3597 EOF
3598 if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3599   rm -rf conftest*
3600   ac_cv_type_signal=void
3601 else
3602   echo "configure: failed program was:" >&5
3603   cat conftest.$ac_ext >&5
3604   rm -rf conftest*
3605   ac_cv_type_signal=int
3606 fi
3607 rm -f conftest*
3608
3609 echo "$ac_t""$ac_cv_type_signal" 1>&6
3610 { test "$extra_verbose" = "yes" && cat << EOF
3611     Defining RETSIGTYPE = $ac_cv_type_signal
3612 EOF
3613 cat >> confdefs.h <<EOF
3614 #define RETSIGTYPE $ac_cv_type_signal
3615 EOF
3616 }
3617
3618
3619 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3620 echo "configure:3621: checking for size_t" >&5
3621
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 #include <sys/types.h>
3626 #if STDC_HEADERS
3627 #include <stdlib.h>
3628 #include <stddef.h>
3629 #endif
3630 EOF
3631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3632   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3633   rm -rf conftest*
3634   ac_cv_type_size_t=yes
3635 else
3636   rm -rf conftest*
3637   ac_cv_type_size_t=no
3638 fi
3639 rm -f conftest*
3640
3641 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3642 if test $ac_cv_type_size_t = no; then
3643   { test "$extra_verbose" = "yes" && cat << \EOF
3644     Defining size_t = unsigned
3645 EOF
3646 cat >> confdefs.h <<\EOF
3647 #define size_t unsigned
3648 EOF
3649 }
3650
3651 fi
3652
3653 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3654 echo "configure:3655: checking for pid_t" >&5
3655
3656 cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659 #include <sys/types.h>
3660 #if STDC_HEADERS
3661 #include <stdlib.h>
3662 #include <stddef.h>
3663 #endif
3664 EOF
3665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3666   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3667   rm -rf conftest*
3668   ac_cv_type_pid_t=yes
3669 else
3670   rm -rf conftest*
3671   ac_cv_type_pid_t=no
3672 fi
3673 rm -f conftest*
3674
3675 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3676 if test $ac_cv_type_pid_t = no; then
3677   { test "$extra_verbose" = "yes" && cat << \EOF
3678     Defining pid_t = int
3679 EOF
3680 cat >> confdefs.h <<\EOF
3681 #define pid_t int
3682 EOF
3683 }
3684
3685 fi
3686
3687 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3688 echo "configure:3689: checking for uid_t in sys/types.h" >&5
3689
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 #include <sys/types.h>
3694 EOF
3695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3696   egrep "uid_t" >/dev/null 2>&1; then
3697   rm -rf conftest*
3698   ac_cv_type_uid_t=yes
3699 else
3700   rm -rf conftest*
3701   ac_cv_type_uid_t=no
3702 fi
3703 rm -f conftest*
3704
3705
3706 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3707 if test $ac_cv_type_uid_t = no; then
3708   { test "$extra_verbose" = "yes" && cat << \EOF
3709     Defining uid_t = int
3710 EOF
3711 cat >> confdefs.h <<\EOF
3712 #define uid_t int
3713 EOF
3714 }
3715
3716   { test "$extra_verbose" = "yes" && cat << \EOF
3717     Defining gid_t = int
3718 EOF
3719 cat >> confdefs.h <<\EOF
3720 #define gid_t int
3721 EOF
3722 }
3723
3724 fi
3725
3726 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3727 echo "configure:3728: checking for mode_t" >&5
3728
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3733 #if STDC_HEADERS
3734 #include <stdlib.h>
3735 #include <stddef.h>
3736 #endif
3737 EOF
3738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3739   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3740   rm -rf conftest*
3741   ac_cv_type_mode_t=yes
3742 else
3743   rm -rf conftest*
3744   ac_cv_type_mode_t=no
3745 fi
3746 rm -f conftest*
3747
3748 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3749 if test $ac_cv_type_mode_t = no; then
3750   { test "$extra_verbose" = "yes" && cat << \EOF
3751     Defining mode_t = int
3752 EOF
3753 cat >> confdefs.h <<\EOF
3754 #define mode_t int
3755 EOF
3756 }
3757
3758 fi
3759
3760 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3761 echo "configure:3762: checking for off_t" >&5
3762
3763 cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 #include <sys/types.h>
3767 #if STDC_HEADERS
3768 #include <stdlib.h>
3769 #include <stddef.h>
3770 #endif
3771 EOF
3772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3773   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3774   rm -rf conftest*
3775   ac_cv_type_off_t=yes
3776 else
3777   rm -rf conftest*
3778   ac_cv_type_off_t=no
3779 fi
3780 rm -f conftest*
3781
3782 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3783 if test $ac_cv_type_off_t = no; then
3784   { test "$extra_verbose" = "yes" && cat << \EOF
3785     Defining off_t = long
3786 EOF
3787 cat >> confdefs.h <<\EOF
3788 #define off_t long
3789 EOF
3790 }
3791
3792 fi
3793
3794
3795 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3796 echo "configure:3797: checking for struct timeval" >&5
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3800 #ifdef TIME_WITH_SYS_TIME
3801 #include <sys/time.h>
3802 #include <time.h>
3803 #else
3804 #ifdef HAVE_SYS_TIME_H
3805 #include <sys/time.h>
3806 #else
3807 #include <time.h>
3808 #endif
3809 #endif
3810 int main() {
3811 static struct timeval x; x.tv_sec = x.tv_usec;
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3815   rm -rf conftest*
3816   echo "$ac_t""yes" 1>&6
3817   HAVE_TIMEVAL=yes
3818   { test "$extra_verbose" = "yes" && cat << \EOF
3819     Defining HAVE_TIMEVAL
3820 EOF
3821 cat >> confdefs.h <<\EOF
3822 #define HAVE_TIMEVAL 1
3823 EOF
3824 }
3825
3826 else
3827   echo "configure: failed program was:" >&5
3828   cat conftest.$ac_ext >&5
3829   rm -rf conftest*
3830   echo "$ac_t""no" 1>&6
3831    HAVE_TIMEVAL=no
3832 fi
3833 rm -f conftest*
3834
3835 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3836 echo "configure:3837: checking whether struct tm is in sys/time.h or time.h" >&5
3837
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 #include <sys/types.h>
3842 #include <time.h>
3843 int main() {
3844 struct tm *tp; tp->tm_sec;
3845 ; return 0; }
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3848   rm -rf conftest*
3849   ac_cv_struct_tm=time.h
3850 else
3851   echo "configure: failed program was:" >&5
3852   cat conftest.$ac_ext >&5
3853   rm -rf conftest*
3854   ac_cv_struct_tm=sys/time.h
3855 fi
3856 rm -f conftest*
3857
3858 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3859 if test $ac_cv_struct_tm = sys/time.h; then
3860   { test "$extra_verbose" = "yes" && cat << \EOF
3861     Defining TM_IN_SYS_TIME
3862 EOF
3863 cat >> confdefs.h <<\EOF
3864 #define TM_IN_SYS_TIME 1
3865 EOF
3866 }
3867
3868 fi
3869
3870 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3871 echo "configure:3872: checking for tm_zone in struct tm" >&5
3872
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 #include <sys/types.h>
3877 #include <$ac_cv_struct_tm>
3878 int main() {
3879 struct tm tm; tm.tm_zone;
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_struct_tm_zone=yes
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_struct_tm_zone=no
3890 fi
3891 rm -f conftest*
3892
3893 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3894 if test "$ac_cv_struct_tm_zone" = yes; then
3895   { test "$extra_verbose" = "yes" && cat << \EOF
3896     Defining HAVE_TM_ZONE
3897 EOF
3898 cat >> confdefs.h <<\EOF
3899 #define HAVE_TM_ZONE 1
3900 EOF
3901 }
3902
3903 else
3904   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3905 echo "configure:3906: checking for tzname" >&5
3906
3907 cat > conftest.$ac_ext <<EOF
3908 #line 3909 "configure"
3909 #include "confdefs.h"
3910 #include <time.h>
3911 #ifndef tzname /* For SGI.  */
3912 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3913 #endif
3914 int main() {
3915 atoi(*tzname);
3916 ; return 0; }
3917 EOF
3918 if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3919   rm -rf conftest*
3920   ac_cv_var_tzname=yes
3921 else
3922   echo "configure: failed program was:" >&5
3923   cat conftest.$ac_ext >&5
3924   rm -rf conftest*
3925   ac_cv_var_tzname=no
3926 fi
3927 rm -f conftest*
3928
3929 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3930   if test $ac_cv_var_tzname = yes; then
3931     { test "$extra_verbose" = "yes" && cat << \EOF
3932     Defining HAVE_TZNAME
3933 EOF
3934 cat >> confdefs.h <<\EOF
3935 #define HAVE_TZNAME 1
3936 EOF
3937 }
3938
3939   fi
3940 fi
3941
3942
3943 echo $ac_n "checking for working const""... $ac_c" 1>&6
3944 echo "configure:3945: checking for working const" >&5
3945
3946 cat > conftest.$ac_ext <<EOF
3947 #line 3948 "configure"
3948 #include "confdefs.h"
3949
3950 int main() {
3951
3952 /* Ultrix mips cc rejects this.  */
3953 typedef int charset[2]; const charset x;
3954 /* SunOS 4.1.1 cc rejects this.  */
3955 char const *const *ccp;
3956 char **p;
3957 /* NEC SVR4.0.2 mips cc rejects this.  */
3958 struct point {int x, y;};
3959 static struct point const zero = {0,0};
3960 /* AIX XL C 1.02.0.0 rejects this.
3961    It does not let you subtract one const X* pointer from another in an arm
3962    of an if-expression whose if-part is not a constant expression */
3963 const char *g = "string";
3964 ccp = &g + (g ? g-g : 0);
3965 /* HPUX 7.0 cc rejects these. */
3966 ++ccp;
3967 p = (char**) ccp;
3968 ccp = (char const *const *) p;
3969 { /* SCO 3.2v4 cc rejects this.  */
3970   char *t;
3971   char const *s = 0 ? (char *) 0 : (char const *) 0;
3972
3973   *t++ = 0;
3974 }
3975 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3976   int x[] = {25, 17};
3977   const int *foo = &x[0];
3978   ++foo;
3979 }
3980 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3981   typedef const int *iptr;
3982   iptr p = 0;
3983   ++p;
3984 }
3985 { /* AIX XL C 1.02.0.0 rejects this saying
3986      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3987   struct s { int j; const int *ap[3]; };
3988   struct s *b; b->j = 5;
3989 }
3990 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3991   const int foo = 10;
3992 }
3993
3994 ; return 0; }
3995 EOF
3996 if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3997   rm -rf conftest*
3998   ac_cv_c_const=yes
3999 else
4000   echo "configure: failed program was:" >&5
4001   cat conftest.$ac_ext >&5
4002   rm -rf conftest*
4003   ac_cv_c_const=no
4004 fi
4005 rm -f conftest*
4006
4007 echo "$ac_t""$ac_cv_c_const" 1>&6
4008 if test $ac_cv_c_const = no; then
4009   { test "$extra_verbose" = "yes" && cat << \EOF
4010     Defining const = 
4011 EOF
4012 cat >> confdefs.h <<\EOF
4013 #define const 
4014 EOF
4015 }
4016
4017 fi
4018
4019
4020 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4021 echo "configure:4022: checking whether ${MAKE-make} sets \${MAKE}" >&5
4022 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4023
4024 cat > conftestmake <<\EOF
4025 all:
4026         @echo 'ac_maketemp="${MAKE}"'
4027 EOF
4028 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4029 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4030 if test -n "$ac_maketemp"; then
4031   eval ac_cv_prog_make_${ac_make}_set=yes
4032 else
4033   eval ac_cv_prog_make_${ac_make}_set=no
4034 fi
4035 rm -f conftestmake
4036 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4037   echo "$ac_t""yes" 1>&6
4038   SET_MAKE=
4039 else
4040   echo "$ac_t""no" 1>&6
4041   SET_MAKE="MAKE=${MAKE-make}"
4042 fi
4043
4044
4045 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4046 echo "configure:4047: checking whether byte ordering is bigendian" >&5
4047
4048 ac_cv_c_bigendian=unknown
4049 # See if sys/param.h defines the BYTE_ORDER macro.
4050 cat > conftest.$ac_ext <<EOF
4051 #line 4052 "configure"
4052 #include "confdefs.h"
4053 #include <sys/types.h>
4054 #include <sys/param.h>
4055 int main() {
4056
4057 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4058  bogus endian macros
4059 #endif
4060 ; return 0; }
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4063   rm -rf conftest*
4064   # It does; now see whether it defined to BIG_ENDIAN or not.
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4068 #include <sys/types.h>
4069 #include <sys/param.h>
4070 int main() {
4071
4072 #if BYTE_ORDER != BIG_ENDIAN
4073  not big endian
4074 #endif
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078   rm -rf conftest*
4079   ac_cv_c_bigendian=yes
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   ac_cv_c_bigendian=no
4085 fi
4086 rm -f conftest*
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090 fi
4091 rm -f conftest*
4092 if test $ac_cv_c_bigendian = unknown; then
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 main () {
4097   /* Are we little or big endian?  From Harbison&Steele.  */
4098   union
4099   {
4100     long l;
4101     char c[sizeof (long)];
4102   } u;
4103   u.l = 1;
4104   exit (u.c[sizeof (long) - 1] == 1);
4105 }
4106 EOF
4107 if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4108 then
4109   ac_cv_c_bigendian=no
4110 else
4111   conftest_rc="$?"
4112   echo "configure: failed program was:" >&5
4113   cat conftest.$ac_ext >&5
4114   rm -fr conftest*
4115   ac_cv_c_bigendian=yes
4116 fi
4117 rm -fr conftest*
4118 fi
4119
4120 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4121 if test $ac_cv_c_bigendian = yes; then
4122   { test "$extra_verbose" = "yes" && cat << \EOF
4123     Defining WORDS_BIGENDIAN
4124 EOF
4125 cat >> confdefs.h <<\EOF
4126 #define WORDS_BIGENDIAN 1
4127 EOF
4128 }
4129
4130 fi
4131
4132
4133 echo $ac_n "checking size of short""... $ac_c" 1>&6
4134 echo "configure:4135: checking size of short" >&5
4135
4136 cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <stdio.h>
4140 main()
4141 {
4142   FILE *f=fopen("conftestval", "w");
4143   if (!f) exit(1);
4144   fprintf(f, "%d\n", sizeof(short));
4145   exit(0);
4146 }
4147 EOF
4148 if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4149 then
4150   ac_cv_sizeof_short=`cat conftestval`
4151 else
4152   conftest_rc="$?"
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -fr conftest*
4156   ac_cv_sizeof_short=0
4157 fi
4158 rm -fr conftest*
4159 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4160 { test "$extra_verbose" = "yes" && cat << EOF
4161     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4162 EOF
4163 cat >> confdefs.h <<EOF
4164 #define SIZEOF_SHORT $ac_cv_sizeof_short
4165 EOF
4166 }
4167
4168
4169 if test "$ac_cv_sizeof_short" = 0; then
4170   echo ""
4171   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4172   echo "*** PANIC *** Please examine config.log for compilation errors."
4173   exit 1
4174 fi
4175 echo $ac_n "checking size of int""... $ac_c" 1>&6
4176 echo "configure:4177: checking size of int" >&5
4177
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 #include <stdio.h>
4182 main()
4183 {
4184   FILE *f=fopen("conftestval", "w");
4185   if (!f) exit(1);
4186   fprintf(f, "%d\n", sizeof(int));
4187   exit(0);
4188 }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4191 then
4192   ac_cv_sizeof_int=`cat conftestval`
4193 else
4194   conftest_rc="$?"
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -fr conftest*
4198   ac_cv_sizeof_int=0
4199 fi
4200 rm -fr conftest*
4201 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4202 { test "$extra_verbose" = "yes" && cat << EOF
4203     Defining SIZEOF_INT = $ac_cv_sizeof_int
4204 EOF
4205 cat >> confdefs.h <<EOF
4206 #define SIZEOF_INT $ac_cv_sizeof_int
4207 EOF
4208 }
4209
4210
4211 echo $ac_n "checking size of long""... $ac_c" 1>&6
4212 echo "configure:4213: checking size of long" >&5
4213
4214 cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <stdio.h>
4218 main()
4219 {
4220   FILE *f=fopen("conftestval", "w");
4221   if (!f) exit(1);
4222   fprintf(f, "%d\n", sizeof(long));
4223   exit(0);
4224 }
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4227 then
4228   ac_cv_sizeof_long=`cat conftestval`
4229 else
4230   conftest_rc="$?"
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -fr conftest*
4234   ac_cv_sizeof_long=0
4235 fi
4236 rm -fr conftest*
4237 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4238 { test "$extra_verbose" = "yes" && cat << EOF
4239     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4240 EOF
4241 cat >> confdefs.h <<EOF
4242 #define SIZEOF_LONG $ac_cv_sizeof_long
4243 EOF
4244 }
4245
4246
4247 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4248 echo "configure:4249: checking size of long long" >&5
4249
4250 cat > conftest.$ac_ext <<EOF
4251 #line 4252 "configure"
4252 #include "confdefs.h"
4253 #include <stdio.h>
4254 main()
4255 {
4256   FILE *f=fopen("conftestval", "w");
4257   if (!f) exit(1);
4258   fprintf(f, "%d\n", sizeof(long long));
4259   exit(0);
4260 }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4263 then
4264   ac_cv_sizeof_long_long=`cat conftestval`
4265 else
4266   conftest_rc="$?"
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -fr conftest*
4270   ac_cv_sizeof_long_long=0
4271 fi
4272 rm -fr conftest*
4273 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4274 { test "$extra_verbose" = "yes" && cat << EOF
4275     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4276 EOF
4277 cat >> confdefs.h <<EOF
4278 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4279 EOF
4280 }
4281
4282
4283 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4284 echo "configure:4285: checking size of void *" >&5
4285
4286 cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <stdio.h>
4290 main()
4291 {
4292   FILE *f=fopen("conftestval", "w");
4293   if (!f) exit(1);
4294   fprintf(f, "%d\n", sizeof(void *));
4295   exit(0);
4296 }
4297 EOF
4298 if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4299 then
4300   ac_cv_sizeof_void_p=`cat conftestval`
4301 else
4302   conftest_rc="$?"
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -fr conftest*
4306   ac_cv_sizeof_void_p=0
4307 fi
4308 rm -fr conftest*
4309 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4310 { test "$extra_verbose" = "yes" && cat << EOF
4311     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4312 EOF
4313 cat >> confdefs.h <<EOF
4314 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4315 EOF
4316 }
4317
4318
4319
4320 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4321 echo "configure:4322: checking for long file names" >&5
4322
4323 ac_cv_sys_long_file_names=yes
4324 # Test for long file names in all the places we know might matter:
4325 #      .                the current directory, where building will happen
4326 #      $prefix/lib      where we will be installing things
4327 #      $exec_prefix/lib likewise
4328 # eval it to expand exec_prefix.
4329 #      $TMPDIR          if set, where it might want to write temporary files
4330 # if $TMPDIR is not set:
4331 #      /tmp             where it might want to write temporary files
4332 #      /var/tmp         likewise
4333 #      /usr/tmp         likewise
4334 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4335   ac_tmpdirs="$TMPDIR"
4336 else
4337   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4338 fi
4339 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4340   test -d $ac_dir || continue
4341   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4342   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4343   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4344   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4345   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4346     ac_cv_sys_long_file_names=no
4347     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4348     break
4349   fi
4350   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4351 done
4352
4353 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4354 if test $ac_cv_sys_long_file_names = yes; then
4355   { test "$extra_verbose" = "yes" && cat << \EOF
4356     Defining HAVE_LONG_FILE_NAMES
4357 EOF
4358 cat >> confdefs.h <<\EOF
4359 #define HAVE_LONG_FILE_NAMES 1
4360 EOF
4361 }
4362
4363 fi
4364
4365
4366 echo $ac_n "checking for sin""... $ac_c" 1>&6
4367 echo "configure:4368: checking for sin" >&5
4368
4369 cat > conftest.$ac_ext <<EOF
4370 #line 4371 "configure"
4371 #include "confdefs.h"
4372 /* System header to define __stub macros and hopefully few prototypes,
4373     which can conflict with char sin(); below.  */
4374 #include <assert.h>
4375 /* Override any gcc2 internal prototype to avoid an error.  */
4376 /* We use char because int might match the return type of a gcc2
4377     builtin and then its argument prototype would still apply.  */
4378 char sin();
4379
4380 int main() {
4381
4382 /* The GNU C library defines this for functions which it implements
4383     to always fail with ENOSYS.  Some functions are actually named
4384     something starting with __ and the normal name is an alias.  */
4385 #if defined (__stub_sin) || defined (__stub___sin)
4386 choke me
4387 #else
4388 sin();
4389 #endif
4390
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394   rm -rf conftest*
4395   eval "ac_cv_func_sin=yes"
4396 else
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399   rm -rf conftest*
4400   eval "ac_cv_func_sin=no"
4401 fi
4402 rm -f conftest*
4403
4404 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4405   echo "$ac_t""yes" 1>&6
4406   :
4407 else
4408   echo "$ac_t""no" 1>&6
4409
4410 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4411 echo "configure:4412: checking for sin in -lm" >&5
4412 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4413
4414 xe_check_libs=" -lm "
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 /* Override any gcc2 internal prototype to avoid an error.  */
4419 /* We use char because int might match the return type of a gcc2
4420     builtin and then its argument prototype would still apply.  */
4421 char sin();
4422
4423 int main() {
4424 sin()
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4428   rm -rf conftest*
4429   eval "ac_cv_lib_$ac_lib_var=yes"
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   eval "ac_cv_lib_$ac_lib_var=no"
4435 fi
4436 rm -f conftest*
4437 xe_check_libs=""
4438
4439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4440   echo "$ac_t""yes" 1>&6
4441     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4442     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4443   { test "$extra_verbose" = "yes" && cat << EOF
4444     Defining $ac_tr_lib
4445 EOF
4446 cat >> confdefs.h <<EOF
4447 #define $ac_tr_lib 1
4448 EOF
4449 }
4450
4451   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4452
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457
4458 fi
4459
4460
4461 { test "$extra_verbose" = "yes" && cat << \EOF
4462     Defining LISP_FLOAT_TYPE
4463 EOF
4464 cat >> confdefs.h <<\EOF
4465 #define LISP_FLOAT_TYPE 1
4466 EOF
4467 }
4468
4469
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473 #include <math.h>
4474 int main() {
4475 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   { test "$extra_verbose" = "yes" && cat << \EOF
4481     Defining HAVE_INVERSE_HYPERBOLIC
4482 EOF
4483 cat >> confdefs.h <<\EOF
4484 #define HAVE_INVERSE_HYPERBOLIC 1
4485 EOF
4486 }
4487
4488 else
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491 fi
4492 rm -f conftest*
4493
4494 echo "checking type of mail spool file locking" 1>&6
4495 echo "configure:4496: checking type of mail spool file locking" >&5
4496 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4497 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4498 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4499     Defining REAL_MAIL_USE_LOCKF
4500 EOF
4501 cat >> confdefs.h <<\EOF
4502 #define REAL_MAIL_USE_LOCKF 1
4503 EOF
4504 }
4505
4506 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4507     Defining REAL_MAIL_USE_FLOCK
4508 EOF
4509 cat >> confdefs.h <<\EOF
4510 #define REAL_MAIL_USE_FLOCK 1
4511 EOF
4512 }
4513
4514 else mail_locking="dot-locking"
4515 fi
4516
4517 case "$opsys" in decosf*)
4518   
4519 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4520 echo "configure:4521: checking for cma_open in -lpthreads" >&5
4521 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4522
4523 xe_check_libs=" -lpthreads "
4524 cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4527 /* Override any gcc2 internal prototype to avoid an error.  */
4528 /* We use char because int might match the return type of a gcc2
4529     builtin and then its argument prototype would still apply.  */
4530 char cma_open();
4531
4532 int main() {
4533 cma_open()
4534 ; return 0; }
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4537   rm -rf conftest*
4538   eval "ac_cv_lib_$ac_lib_var=yes"
4539 else
4540   echo "configure: failed program was:" >&5
4541   cat conftest.$ac_ext >&5
4542   rm -rf conftest*
4543   eval "ac_cv_lib_$ac_lib_var=no"
4544 fi
4545 rm -f conftest*
4546 xe_check_libs=""
4547
4548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4549   echo "$ac_t""yes" 1>&6
4550     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4551     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4552   { test "$extra_verbose" = "yes" && cat << EOF
4553     Defining $ac_tr_lib
4554 EOF
4555 cat >> confdefs.h <<EOF
4556 #define $ac_tr_lib 1
4557 EOF
4558 }
4559
4560   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4561
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565
4566
4567   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4568     c_switch_site="$c_switch_site -threads" ;;
4569 esac
4570
4571 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4572 echo "configure:4573: checking whether the -xildoff compiler flag is required" >&5
4573 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4574   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4575     then echo "$ac_t""no" 1>&6;
4576     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
4577   fi
4578   else echo "$ac_t""no" 1>&6
4579 fi
4580
4581 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4582   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4583 echo "configure:4584: checking for \"-z ignore\" linker flag" >&5
4584   case "`ld -h 2>&1`" in
4585     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4586       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4587     *) echo "$ac_t""no" 1>&6 ;;
4588   esac
4589 fi
4590
4591
4592 echo "checking "for specified window system"" 1>&6
4593 echo "configure:4594: checking "for specified window system"" >&5
4594
4595 if test "$with_x11" != "no"; then
4596     test "$x_includes $x_libraries" != "NONE NONE" && \
4597    window_system=x11 with_x11=yes
4598
4599         
4600       if test "$x_includes $x_libraries" = "NONE NONE" \
4601     -a -n "$OPENWINHOME" \
4602     -a "$OPENWINHOME" != "/usr/openwin" \
4603     -a -d "$OPENWINHOME"; then
4604       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4605       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4606       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4607   fi
4608
4609   if test "$x_includes" = "NONE"; then
4610                     for dir in "/usr/X11" "/usr/X11R6"; do
4611       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4612     done
4613   fi
4614
4615   if test "$x_libraries" = "NONE"; then
4616     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4617       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4618     done
4619   fi
4620
4621   # If we find X, set shell vars x_includes and x_libraries to the
4622 # paths, otherwise set no_x=yes.
4623 # Uses ac_ vars as temps to allow command line to override cache and checks.
4624 # --without-x overrides everything else, but does not touch the cache.
4625 echo $ac_n "checking for X""... $ac_c" 1>&6
4626 echo "configure:4627: checking for X" >&5
4627
4628 # Check whether --with-x or --without-x was given.
4629 if test "${with_x+set}" = set; then
4630   withval="$with_x"
4631   :
4632 fi
4633
4634 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4635 if test "x$with_x" = xno; then
4636   # The user explicitly disabled X.
4637   have_x=disabled
4638 else
4639   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4640     # Both variables are already set.
4641     have_x=yes
4642   else
4643
4644 # One or both of the vars are not set, and there is no cached value.
4645 ac_x_includes=NO ac_x_libraries=NO
4646 rm -fr conftestdir
4647 if mkdir conftestdir; then
4648   cd conftestdir
4649   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4650   cat > Imakefile <<'EOF'
4651 acfindx:
4652         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4653 EOF
4654   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4655     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4656     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4657     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4658     for ac_extension in a so sl; do
4659       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4660         test -f $ac_im_libdir/libX11.$ac_extension; then
4661         ac_im_usrlibdir=$ac_im_libdir; break
4662       fi
4663     done
4664     # Screen out bogus values from the imake configuration.  They are
4665     # bogus both because they are the default anyway, and because
4666     # using them would break gcc on systems where it needs fixed includes.
4667     case "$ac_im_incroot" in
4668         /usr/include) ;;
4669         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4670     esac
4671     case "$ac_im_usrlibdir" in
4672         /usr/lib | /lib) ;;
4673         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4674     esac
4675   fi
4676   cd ..
4677   rm -fr conftestdir
4678 fi
4679
4680 if test "$ac_x_includes" = NO; then
4681   # Guess where to find include files, by looking for this one X11 .h file.
4682   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4683
4684   # First, try using that file with no special directory specified.
4685 cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 #include <$x_direct_test_include>
4689 EOF
4690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4691 { (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4693 if test -z "$ac_err"; then
4694   rm -rf conftest*
4695   # We can compile using X headers with no special include directory.
4696 ac_x_includes=
4697 else
4698   echo "$ac_err" >&5
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   # Look for the header file in a standard set of common directories.
4703 # Check X11 before X11Rn because it is often a symlink to the current release.
4704   for ac_dir in               \
4705     /usr/X11/include          \
4706     /usr/X11R6/include        \
4707     /usr/X11R5/include        \
4708     /usr/X11R4/include        \
4709                               \
4710     /usr/include/X11          \
4711     /usr/include/X11R6        \
4712     /usr/include/X11R5        \
4713     /usr/include/X11R4        \
4714                               \
4715     /usr/local/X11/include    \
4716     /usr/local/X11R6/include  \
4717     /usr/local/X11R5/include  \
4718     /usr/local/X11R4/include  \
4719                               \
4720     /usr/local/include/X11    \
4721     /usr/local/include/X11R6  \
4722     /usr/local/include/X11R5  \
4723     /usr/local/include/X11R4  \
4724                               \
4725     /usr/X386/include         \
4726     /usr/x386/include         \
4727     /usr/XFree86/include/X11  \
4728                               \
4729     /usr/include              \
4730     /usr/local/include        \
4731     /usr/unsupported/include  \
4732     /usr/athena/include       \
4733     /usr/local/x11r5/include  \
4734     /usr/lpp/Xamples/include  \
4735                               \
4736     /usr/openwin/include      \
4737     /usr/openwin/share/include \
4738     ; \
4739   do
4740     if test -r "$ac_dir/$x_direct_test_include"; then
4741       ac_x_includes=$ac_dir
4742       break
4743     fi
4744   done
4745 fi
4746 rm -f conftest*
4747 fi # $ac_x_includes = NO
4748
4749 if test "$ac_x_libraries" = NO; then
4750   # Check for the libraries.
4751
4752   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4753   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4754
4755   # See if we find them without any special options.
4756   # Don't add to $LIBS permanently.
4757   ac_save_LIBS="$LIBS"
4758   LIBS="-l$x_direct_test_library $LIBS"
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762
4763 int main() {
4764 ${x_direct_test_function}()
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4768   rm -rf conftest*
4769   LIBS="$ac_save_LIBS"
4770 # We can link X programs with no special library path.
4771 ac_x_libraries=
4772 else
4773   echo "configure: failed program was:" >&5
4774   cat conftest.$ac_ext >&5
4775   rm -rf conftest*
4776   LIBS="$ac_save_LIBS"
4777 # First see if replacing the include by lib works.
4778 # Check X11 before X11Rn because it is often a symlink to the current release.
4779 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4780     /usr/X11/lib          \
4781     /usr/X11R6/lib        \
4782     /usr/X11R5/lib        \
4783     /usr/X11R4/lib        \
4784                           \
4785     /usr/lib/X11          \
4786     /usr/lib/X11R6        \
4787     /usr/lib/X11R5        \
4788     /usr/lib/X11R4        \
4789                           \
4790     /usr/local/X11/lib    \
4791     /usr/local/X11R6/lib  \
4792     /usr/local/X11R5/lib  \
4793     /usr/local/X11R4/lib  \
4794                           \
4795     /usr/local/lib/X11    \
4796     /usr/local/lib/X11R6  \
4797     /usr/local/lib/X11R5  \
4798     /usr/local/lib/X11R4  \
4799                           \
4800     /usr/X386/lib         \
4801     /usr/x386/lib         \
4802     /usr/XFree86/lib/X11  \
4803                           \
4804     /usr/lib              \
4805     /usr/local/lib        \
4806     /usr/unsupported/lib  \
4807     /usr/athena/lib       \
4808     /usr/local/x11r5/lib  \
4809     /usr/lpp/Xamples/lib  \
4810     /lib/usr/lib/X11      \
4811                           \
4812     /usr/openwin/lib      \
4813     /usr/openwin/share/lib \
4814     ; \
4815 do
4816   for ac_extension in a so sl; do
4817     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4818       ac_x_libraries=$ac_dir
4819       break 2
4820     fi
4821   done
4822 done
4823 fi
4824 rm -f conftest*
4825 fi # $ac_x_libraries = NO
4826
4827 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4828   # Didn't find X anywhere.  Cache the known absence of X.
4829   ac_cv_have_x="have_x=no"
4830 else
4831   # Record where we found X for the cache.
4832   ac_cv_have_x="have_x=yes \
4833                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4834 fi
4835   fi
4836   eval "$ac_cv_have_x"
4837 fi # $with_x != no
4838
4839 if test "$have_x" != yes; then
4840   echo "$ac_t""$have_x" 1>&6
4841   no_x=yes
4842 else
4843   # If each of the values was on the command line, it overrides each guess.
4844   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4845   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4846   # Update the cache value to reflect the command line values.
4847   ac_cv_have_x="have_x=yes \
4848                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4849   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4850 fi
4851
4852 if test "$no_x" = yes; then
4853   # Not all programs may use this symbol, but it does not hurt to define it.
4854   { test "$extra_verbose" = "yes" && cat << \EOF
4855     Defining X_DISPLAY_MISSING
4856 EOF
4857 cat >> confdefs.h <<\EOF
4858 #define X_DISPLAY_MISSING 1
4859 EOF
4860 }
4861
4862   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4863 else
4864   if test -n "$x_includes"; then
4865     X_CFLAGS="$X_CFLAGS -I$x_includes"
4866   fi
4867
4868   # It would also be nice to do this for all -L options, not just this one.
4869   if test -n "$x_libraries"; then
4870     X_LIBS="$X_LIBS -L$x_libraries"
4871     # For Solaris; some versions of Sun CC require a space after -R and
4872     # others require no space.  Words are not sufficient . . . .
4873     case "`(uname -sr) 2>/dev/null`" in
4874     "SunOS 5"*)
4875       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4876 echo "configure:4877: checking whether -R must be followed by a space" >&5
4877       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4878       cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881
4882 int main() {
4883
4884 ; return 0; }
4885 EOF
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887   rm -rf conftest*
4888   ac_R_nospace=yes
4889 else
4890   echo "configure: failed program was:" >&5
4891   cat conftest.$ac_ext >&5
4892   rm -rf conftest*
4893   ac_R_nospace=no
4894 fi
4895 rm -f conftest*
4896       if test $ac_R_nospace = yes; then
4897         echo "$ac_t""no" 1>&6
4898         X_LIBS="$X_LIBS -R$x_libraries"
4899       else
4900         LIBS="$ac_xsave_LIBS -R $x_libraries"
4901         cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904
4905 int main() {
4906
4907 ; return 0; }
4908 EOF
4909 if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4910   rm -rf conftest*
4911   ac_R_space=yes
4912 else
4913   echo "configure: failed program was:" >&5
4914   cat conftest.$ac_ext >&5
4915   rm -rf conftest*
4916   ac_R_space=no
4917 fi
4918 rm -f conftest*
4919         if test $ac_R_space = yes; then
4920           echo "$ac_t""yes" 1>&6
4921           X_LIBS="$X_LIBS -R $x_libraries"
4922         else
4923           echo "$ac_t""neither works" 1>&6
4924         fi
4925       fi
4926       LIBS="$ac_xsave_LIBS"
4927     esac
4928   fi
4929
4930   # Check for system-dependent libraries X programs must link with.
4931   # Do this before checking for the system-independent R6 libraries
4932   # (-lICE), since we may need -lsocket or whatever for X linking.
4933
4934   if test "$ISC" = yes; then
4935     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4936   else
4937     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4938     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4939     # the Alpha needs dnet_stub (dnet does not exist).
4940     if test "$with_dnet" = "no" ; then
4941 ac_cv_lib_dnet_dnet_ntoa=no
4942 else
4943
4944 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4945 echo "configure:4946: checking for dnet_ntoa in -ldnet" >&5
4946 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4947
4948 xe_check_libs=" -ldnet "
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 /* Override any gcc2 internal prototype to avoid an error.  */
4953 /* We use char because int might match the return type of a gcc2
4954     builtin and then its argument prototype would still apply.  */
4955 char dnet_ntoa();
4956
4957 int main() {
4958 dnet_ntoa()
4959 ; return 0; }
4960 EOF
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962   rm -rf conftest*
4963   eval "ac_cv_lib_$ac_lib_var=yes"
4964 else
4965   echo "configure: failed program was:" >&5
4966   cat conftest.$ac_ext >&5
4967   rm -rf conftest*
4968   eval "ac_cv_lib_$ac_lib_var=no"
4969 fi
4970 rm -f conftest*
4971 xe_check_libs=""
4972
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4974   echo "$ac_t""yes" 1>&6
4975   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979
4980 fi
4981
4982     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4983       
4984 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4985 echo "configure:4986: checking for dnet_ntoa in -ldnet_stub" >&5
4986 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4987
4988 xe_check_libs=" -ldnet_stub "
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 /* Override any gcc2 internal prototype to avoid an error.  */
4993 /* We use char because int might match the return type of a gcc2
4994     builtin and then its argument prototype would still apply.  */
4995 char dnet_ntoa();
4996
4997 int main() {
4998 dnet_ntoa()
4999 ; return 0; }
5000 EOF
5001 if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=yes"
5004 else
5005   echo "configure: failed program was:" >&5
5006   cat conftest.$ac_ext >&5
5007   rm -rf conftest*
5008   eval "ac_cv_lib_$ac_lib_var=no"
5009 fi
5010 rm -f conftest*
5011 xe_check_libs=""
5012
5013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5014   echo "$ac_t""yes" 1>&6
5015   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5016 else
5017   echo "$ac_t""no" 1>&6
5018 fi
5019
5020
5021     fi
5022
5023     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5024     # to get the SysV transport functions.
5025     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5026     # needs -lnsl.
5027     # The nsl library prevents programs from opening the X display
5028     # on Irix 5.2, according to dickey@clark.net.
5029     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5030 echo "configure:5031: checking for gethostbyname" >&5
5031
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 /* System header to define __stub macros and hopefully few prototypes,
5036     which can conflict with char gethostbyname(); below.  */
5037 #include <assert.h>
5038 /* Override any gcc2 internal prototype to avoid an error.  */
5039 /* We use char because int might match the return type of a gcc2
5040     builtin and then its argument prototype would still apply.  */
5041 char gethostbyname();
5042
5043 int main() {
5044
5045 /* The GNU C library defines this for functions which it implements
5046     to always fail with ENOSYS.  Some functions are actually named
5047     something starting with __ and the normal name is an alias.  */
5048 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5049 choke me
5050 #else
5051 gethostbyname();
5052 #endif
5053
5054 ; return 0; }
5055 EOF
5056 if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5057   rm -rf conftest*
5058   eval "ac_cv_func_gethostbyname=yes"
5059 else
5060   echo "configure: failed program was:" >&5
5061   cat conftest.$ac_ext >&5
5062   rm -rf conftest*
5063   eval "ac_cv_func_gethostbyname=no"
5064 fi
5065 rm -f conftest*
5066
5067 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5068   echo "$ac_t""yes" 1>&6
5069   :
5070 else
5071   echo "$ac_t""no" 1>&6
5072 fi
5073
5074     if test $ac_cv_func_gethostbyname = no; then
5075       
5076 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5077 echo "configure:5078: checking for gethostbyname in -lnsl" >&5
5078 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5079
5080 xe_check_libs=" -lnsl "
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084 /* Override any gcc2 internal prototype to avoid an error.  */
5085 /* We use char because int might match the return type of a gcc2
5086     builtin and then its argument prototype would still apply.  */
5087 char gethostbyname();
5088
5089 int main() {
5090 gethostbyname()
5091 ; return 0; }
5092 EOF
5093 if { (eval echo configure:5094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=yes"
5096 else
5097   echo "configure: failed program was:" >&5
5098   cat conftest.$ac_ext >&5
5099   rm -rf conftest*
5100   eval "ac_cv_lib_$ac_lib_var=no"
5101 fi
5102 rm -f conftest*
5103 xe_check_libs=""
5104
5105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5106   echo "$ac_t""yes" 1>&6
5107   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5108 else
5109   echo "$ac_t""no" 1>&6
5110 fi
5111
5112
5113     fi
5114
5115     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5116     # socket/setsockopt and other routines are undefined under SCO ODT
5117     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5118     # on later versions), says simon@lia.di.epfl.ch: it contains
5119     # gethostby* variants that don't use the nameserver (or something).
5120     # -lsocket must be given before -lnsl if both are needed.
5121     # We assume that if connect needs -lnsl, so does gethostbyname.
5122     echo $ac_n "checking for connect""... $ac_c" 1>&6
5123 echo "configure:5124: checking for connect" >&5
5124
5125 cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128 /* System header to define __stub macros and hopefully few prototypes,
5129     which can conflict with char connect(); below.  */
5130 #include <assert.h>
5131 /* Override any gcc2 internal prototype to avoid an error.  */
5132 /* We use char because int might match the return type of a gcc2
5133     builtin and then its argument prototype would still apply.  */
5134 char connect();
5135
5136 int main() {
5137
5138 /* The GNU C library defines this for functions which it implements
5139     to always fail with ENOSYS.  Some functions are actually named
5140     something starting with __ and the normal name is an alias.  */
5141 #if defined (__stub_connect) || defined (__stub___connect)
5142 choke me
5143 #else
5144 connect();
5145 #endif
5146
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   eval "ac_cv_func_connect=yes"
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   eval "ac_cv_func_connect=no"
5157 fi
5158 rm -f conftest*
5159
5160 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5161   echo "$ac_t""yes" 1>&6
5162   :
5163 else
5164   echo "$ac_t""no" 1>&6
5165 fi
5166
5167     if test $ac_cv_func_connect = no; then
5168       
5169 xe_msg_checking="for connect in -lsocket"
5170 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5171 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5172 echo "configure:5173: checking "$xe_msg_checking"" >&5
5173 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5174
5175 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 /* We use char because int might match the return type of a gcc2
5181     builtin and then its argument prototype would still apply.  */
5182 char connect();
5183
5184 int main() {
5185 connect()
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_lib_$ac_lib_var=no"
5196 fi
5197 rm -f conftest*
5198 xe_check_libs=""
5199
5200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5201   echo "$ac_t""yes" 1>&6
5202   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5203 else
5204   echo "$ac_t""no" 1>&6
5205 fi
5206
5207
5208     fi
5209
5210     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5211     echo $ac_n "checking for remove""... $ac_c" 1>&6
5212 echo "configure:5213: checking for remove" >&5
5213
5214 cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217 /* System header to define __stub macros and hopefully few prototypes,
5218     which can conflict with char remove(); below.  */
5219 #include <assert.h>
5220 /* Override any gcc2 internal prototype to avoid an error.  */
5221 /* We use char because int might match the return type of a gcc2
5222     builtin and then its argument prototype would still apply.  */
5223 char remove();
5224
5225 int main() {
5226
5227 /* The GNU C library defines this for functions which it implements
5228     to always fail with ENOSYS.  Some functions are actually named
5229     something starting with __ and the normal name is an alias.  */
5230 #if defined (__stub_remove) || defined (__stub___remove)
5231 choke me
5232 #else
5233 remove();
5234 #endif
5235
5236 ; return 0; }
5237 EOF
5238 if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5239   rm -rf conftest*
5240   eval "ac_cv_func_remove=yes"
5241 else
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   eval "ac_cv_func_remove=no"
5246 fi
5247 rm -f conftest*
5248
5249 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251   :
5252 else
5253   echo "$ac_t""no" 1>&6
5254 fi
5255
5256     if test $ac_cv_func_remove = no; then
5257       
5258 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5259 echo "configure:5260: checking for remove in -lposix" >&5
5260 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5261
5262 xe_check_libs=" -lposix "
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 /* We use char because int might match the return type of a gcc2
5268     builtin and then its argument prototype would still apply.  */
5269 char remove();
5270
5271 int main() {
5272 remove()
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276   rm -rf conftest*
5277   eval "ac_cv_lib_$ac_lib_var=yes"
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   eval "ac_cv_lib_$ac_lib_var=no"
5283 fi
5284 rm -f conftest*
5285 xe_check_libs=""
5286
5287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5288   echo "$ac_t""yes" 1>&6
5289   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5290 else
5291   echo "$ac_t""no" 1>&6
5292 fi
5293
5294
5295     fi
5296
5297     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5298     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5299 echo "configure:5300: checking for shmat" >&5
5300
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 /* System header to define __stub macros and hopefully few prototypes,
5305     which can conflict with char shmat(); below.  */
5306 #include <assert.h>
5307 /* Override any gcc2 internal prototype to avoid an error.  */
5308 /* We use char because int might match the return type of a gcc2
5309     builtin and then its argument prototype would still apply.  */
5310 char shmat();
5311
5312 int main() {
5313
5314 /* The GNU C library defines this for functions which it implements
5315     to always fail with ENOSYS.  Some functions are actually named
5316     something starting with __ and the normal name is an alias.  */
5317 #if defined (__stub_shmat) || defined (__stub___shmat)
5318 choke me
5319 #else
5320 shmat();
5321 #endif
5322
5323 ; return 0; }
5324 EOF
5325 if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5326   rm -rf conftest*
5327   eval "ac_cv_func_shmat=yes"
5328 else
5329   echo "configure: failed program was:" >&5
5330   cat conftest.$ac_ext >&5
5331   rm -rf conftest*
5332   eval "ac_cv_func_shmat=no"
5333 fi
5334 rm -f conftest*
5335
5336 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5337   echo "$ac_t""yes" 1>&6
5338   :
5339 else
5340   echo "$ac_t""no" 1>&6
5341 fi
5342
5343     if test $ac_cv_func_shmat = no; then
5344       
5345 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5346 echo "configure:5347: checking for shmat in -lipc" >&5
5347 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5348
5349 xe_check_libs=" -lipc "
5350 cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353 /* Override any gcc2 internal prototype to avoid an error.  */
5354 /* We use char because int might match the return type of a gcc2
5355     builtin and then its argument prototype would still apply.  */
5356 char shmat();
5357
5358 int main() {
5359 shmat()
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=yes"
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   eval "ac_cv_lib_$ac_lib_var=no"
5370 fi
5371 rm -f conftest*
5372 xe_check_libs=""
5373
5374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5375   echo "$ac_t""yes" 1>&6
5376   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5377 else
5378   echo "$ac_t""no" 1>&6
5379 fi
5380
5381
5382     fi
5383   fi
5384
5385   # Check for libraries that X11R6 Xt/Xaw programs need.
5386   ac_save_LDFLAGS="$LDFLAGS"
5387   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5388   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5389   # check for ICE first), but we must link in the order -lSM -lICE or
5390   # we get undefined symbols.  So assume we have SM if we have ICE.
5391   # These have to be linked with before -lX11, unlike the other
5392   # libraries we check for below, so use a different variable.
5393   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5394   
5395 xe_msg_checking="for IceConnectionNumber in -lICE"
5396 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5397 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5398 echo "configure:5399: checking "$xe_msg_checking"" >&5
5399 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5400
5401 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 /* Override any gcc2 internal prototype to avoid an error.  */
5406 /* We use char because int might match the return type of a gcc2
5407     builtin and then its argument prototype would still apply.  */
5408 char IceConnectionNumber();
5409
5410 int main() {
5411 IceConnectionNumber()
5412 ; return 0; }
5413 EOF
5414 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5415   rm -rf conftest*
5416   eval "ac_cv_lib_$ac_lib_var=yes"
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420   rm -rf conftest*
5421   eval "ac_cv_lib_$ac_lib_var=no"
5422 fi
5423 rm -f conftest*
5424 xe_check_libs=""
5425
5426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5427   echo "$ac_t""yes" 1>&6
5428   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5429 else
5430   echo "$ac_t""no" 1>&6
5431 fi
5432
5433
5434   LDFLAGS="$ac_save_LDFLAGS"
5435
5436 fi
5437  # Autoconf claims to find X library and include dirs for us.
5438   if test "$no_x" = "yes"
5439   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5440   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5441   fi
5442 fi
5443
5444 case "$with_x11" in
5445   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5446   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5447 esac
5448
5449 if test "$with_x11" = "yes"; then
5450   { test "$extra_verbose" = "yes" && cat << \EOF
5451     Defining HAVE_X_WINDOWS
5452 EOF
5453 cat >> confdefs.h <<\EOF
5454 #define HAVE_X_WINDOWS 1
5455 EOF
5456 }
5457
5458   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5459   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5460
5461       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5462     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5463     if test -d "$lib_dir" -a -d "$inc_dir"; then
5464       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5465         x_libraries="$lib_dir $x_libraries"
5466         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5467       esac
5468       case "$x_includes" in "$inc_dir"* ) ;; *)
5469         x_includes="$inc_dir $x_includes"
5470         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5471       esac
5472       break;       fi
5473   done
5474
5475     for rel in "X11R6" "X11R5" "X11R4"; do
5476     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5477     if test -d "$lib_dir" -a -d "$inc_dir"; then
5478       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5479         x_libraries="$x_libraries $lib_dir"
5480         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5481       esac
5482       case "$x_includes" in "$inc_dir"* ) ;; *)
5483         x_includes="$x_includes $inc_dir"
5484         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5485       esac
5486       break;     fi
5487   done
5488
5489     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
5490
5491   ld_switch_x_site="$X_LIBS"
5492
5493   
5494 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5495     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5496   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5497   
5498         runpath="" runpath_dirs=""
5499   if test -n "$LD_RUN_PATH"; then
5500     runpath="$LD_RUN_PATH"
5501   elif test "$GCC" = "yes"; then
5502         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5503     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5504     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5505     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5506       case "$arg" in P,* | -L* | -R* )
5507         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5508           {
5509 xe_runpath_dir="$dir"
5510   test "$xe_runpath_dir" != "/lib"     -a \
5511         "$xe_runpath_dir" != "/usr/lib" -a \
5512         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5513   eval "$xe_add_unique_runpath_dir"
5514 }
5515         done ;;
5516       esac
5517     done
5518     ld_switch_run="$ld_switch_run_save"
5519     rm -f conftest*
5520   else
5521         for arg in $ld_switch_site $ld_switch_x_site; do
5522       case "$arg" in -L*) {
5523 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5524   test "$xe_runpath_dir" != "/lib"     -a \
5525         "$xe_runpath_dir" != "/usr/lib" -a \
5526         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5527   eval "$xe_add_unique_runpath_dir"
5528 };; esac
5529     done
5530         if test "$opsys $need_motif" = "sol2 yes"; then
5531       xe_runpath_dir="/opt/SUNWdt/lib";
5532       eval "$xe_add_unique_runpath_dir";
5533     fi
5534   fi 
5535   if test -n "$runpath"; then
5536     ld_switch_run="${dash_r}${runpath}"
5537     
5538 if test "$GCC" = "yes"; then
5539   set x $ld_switch_run; shift; ld_switch_run=""
5540   while test -n "$1"; do
5541     case $1 in
5542       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5543       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5544       -Xlinker* ) ;;
5545       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5546     esac
5547     shift
5548   done
5549 fi
5550     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5551   fi
5552 fi
5553
5554
5555   if test "$extra_verbose" = "yes"; then
5556     echo; echo "X11 compilation variables:"
5557     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5558     echo
5559   fi
5560
5561             bitmapdirs=
5562   if test "$x_includes" != NONE; then
5563     for i in $x_includes; do
5564       if test -d "$i/bitmaps"; then
5565         bitmapdirs="$i/bitmaps:$bitmapdirs"
5566       fi
5567       if test -d "$i/X11/bitmaps"; then
5568         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5569       fi
5570     done
5571     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5572   fi
5573   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5574     Defining BITMAPDIR = "$bitmapdirs"
5575 EOF
5576 cat >> confdefs.h <<EOF
5577 #define BITMAPDIR "$bitmapdirs"
5578 EOF
5579 }
5580
5581
5582     echo "checking for X defines extracted by xmkmf" 1>&6
5583 echo "configure:5584: checking for X defines extracted by xmkmf" >&5
5584   rm -fr conftestdir
5585   if mkdir conftestdir; then
5586     cd conftestdir
5587     cat > Imakefile <<'EOF'
5588 xetest:
5589         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5590 EOF
5591     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5592       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5593       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5594     fi
5595     cd ..
5596     rm -fr conftestdir
5597     for word in $xmkmf_defines; do
5598       case "$word" in
5599         -D*=* ) ;;
5600         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5601               { test "$extra_verbose" = "yes" && cat << EOF
5602     Defining $word
5603 EOF
5604 cat >> confdefs.h <<EOF
5605 #define $word 1
5606 EOF
5607 }
5608  ;;
5609       esac
5610     done
5611   fi
5612
5613     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5614 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5615 echo "configure:5616: checking for X11/Intrinsic.h" >&5
5616
5617 cat > conftest.$ac_ext <<EOF
5618 #line 5619 "configure"
5619 #include "confdefs.h"
5620 #include <X11/Intrinsic.h>
5621 EOF
5622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5623 { (eval echo configure:5624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5625 if test -z "$ac_err"; then
5626   rm -rf conftest*
5627   eval "ac_cv_header_$ac_safe=yes"
5628 else
5629   echo "$ac_err" >&5
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   eval "ac_cv_header_$ac_safe=no"
5634 fi
5635 rm -f conftest*
5636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5637   echo "$ac_t""yes" 1>&6
5638   :
5639 else
5640   echo "$ac_t""no" 1>&6
5641 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5642 fi
5643
5644
5645       
5646 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5647 echo "configure:5648: checking for XOpenDisplay in -lX11" >&5
5648 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5649
5650 xe_check_libs=" -lX11 "
5651 cat > conftest.$ac_ext <<EOF
5652 #line 5653 "configure"
5653 #include "confdefs.h"
5654 /* Override any gcc2 internal prototype to avoid an error.  */
5655 /* We use char because int might match the return type of a gcc2
5656     builtin and then its argument prototype would still apply.  */
5657 char XOpenDisplay();
5658
5659 int main() {
5660 XOpenDisplay()
5661 ; return 0; }
5662 EOF
5663 if { (eval echo configure:5664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=yes"
5666 else
5667   echo "configure: failed program was:" >&5
5668   cat conftest.$ac_ext >&5
5669   rm -rf conftest*
5670   eval "ac_cv_lib_$ac_lib_var=no"
5671 fi
5672 rm -f conftest*
5673 xe_check_libs=""
5674
5675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5676   echo "$ac_t""yes" 1>&6
5677   have_lib_x11=yes
5678 else
5679   echo "$ac_t""no" 1>&6
5680 fi
5681
5682
5683   if test "$have_lib_x11" != "yes"; then
5684     
5685 xe_msg_checking="for XGetFontProperty in -lX11"
5686 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5687 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5688 echo "configure:5689: checking "$xe_msg_checking"" >&5
5689 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5690
5691 xe_check_libs=" -lX11 -b i486-linuxaout"
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5695 /* Override any gcc2 internal prototype to avoid an error.  */
5696 /* We use char because int might match the return type of a gcc2
5697     builtin and then its argument prototype would still apply.  */
5698 char XGetFontProperty();
5699
5700 int main() {
5701 XGetFontProperty()
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705   rm -rf conftest*
5706   eval "ac_cv_lib_$ac_lib_var=yes"
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=no"
5712 fi
5713 rm -f conftest*
5714 xe_check_libs=""
5715
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5717   echo "$ac_t""yes" 1>&6
5718   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5719 else
5720   echo "$ac_t""no" 1>&6
5721 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5722 fi
5723
5724
5725   fi
5726   libs_x="-lX11"
5727   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5728
5729     
5730 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5731 echo "configure:5732: checking for XShapeSelectInput in -lXext" >&5
5732 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5733
5734 xe_check_libs=" -lXext "
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738 /* Override any gcc2 internal prototype to avoid an error.  */
5739 /* We use char because int might match the return type of a gcc2
5740     builtin and then its argument prototype would still apply.  */
5741 char XShapeSelectInput();
5742
5743 int main() {
5744 XShapeSelectInput()
5745 ; return 0; }
5746 EOF
5747 if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5748   rm -rf conftest*
5749   eval "ac_cv_lib_$ac_lib_var=yes"
5750 else
5751   echo "configure: failed program was:" >&5
5752   cat conftest.$ac_ext >&5
5753   rm -rf conftest*
5754   eval "ac_cv_lib_$ac_lib_var=no"
5755 fi
5756 rm -f conftest*
5757 xe_check_libs=""
5758
5759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5760   echo "$ac_t""yes" 1>&6
5761   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5762 else
5763   echo "$ac_t""no" 1>&6
5764 fi
5765
5766
5767
5768     
5769 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5770 echo "configure:5771: checking for XtOpenDisplay in -lXt" >&5
5771 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5772
5773 xe_check_libs=" -lXt "
5774 cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 /* Override any gcc2 internal prototype to avoid an error.  */
5778 /* We use char because int might match the return type of a gcc2
5779     builtin and then its argument prototype would still apply.  */
5780 char XtOpenDisplay();
5781
5782 int main() {
5783 XtOpenDisplay()
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787   rm -rf conftest*
5788   eval "ac_cv_lib_$ac_lib_var=yes"
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   eval "ac_cv_lib_$ac_lib_var=no"
5794 fi
5795 rm -f conftest*
5796 xe_check_libs=""
5797
5798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5799   echo "$ac_t""yes" 1>&6
5800   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5801 else
5802   echo "$ac_t""no" 1>&6
5803 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5804 fi
5805
5806
5807
5808   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5809 echo "configure:5810: checking the version of X11 being used" >&5
5810   cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 #include <X11/Intrinsic.h>
5814     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5815 EOF
5816 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5817 then
5818   ./conftest foobar; x11_release=$?
5819 else
5820   conftest_rc="$?"
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -fr conftest*
5824   x11_release=4
5825 fi
5826 rm -fr conftest*
5827   echo "$ac_t""R${x11_release}" 1>&6
5828   { test "$extra_verbose" = "yes" && cat << EOF
5829     Defining THIS_IS_X11R${x11_release}
5830 EOF
5831 cat >> confdefs.h <<EOF
5832 #define THIS_IS_X11R${x11_release} 1
5833 EOF
5834 }
5835
5836
5837   for ac_hdr in X11/Xlocale.h
5838 do
5839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5841 echo "configure:5842: checking for $ac_hdr" >&5
5842
5843 cat > conftest.$ac_ext <<EOF
5844 #line 5845 "configure"
5845 #include "confdefs.h"
5846 #include <$ac_hdr>
5847 EOF
5848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5849 { (eval echo configure:5850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5851 if test -z "$ac_err"; then
5852   rm -rf conftest*
5853   eval "ac_cv_header_$ac_safe=yes"
5854 else
5855   echo "$ac_err" >&5
5856   echo "configure: failed program was:" >&5
5857   cat conftest.$ac_ext >&5
5858   rm -rf conftest*
5859   eval "ac_cv_header_$ac_safe=no"
5860 fi
5861 rm -f conftest*
5862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5863   echo "$ac_t""yes" 1>&6
5864     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5865   { test "$extra_verbose" = "yes" && cat << EOF
5866     Defining $ac_tr_hdr
5867 EOF
5868 cat >> confdefs.h <<EOF
5869 #define $ac_tr_hdr 1
5870 EOF
5871 }
5872  
5873 else
5874   echo "$ac_t""no" 1>&6
5875 fi
5876 done
5877
5878
5879     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5880 echo "configure:5881: checking for XFree86" >&5
5881   if test -d "/usr/X386/include" -o \
5882           -f "/etc/XF86Config"    -o \
5883           -f "/etc/X11/XF86Config" -o \
5884           -f "/usr/X11R6/lib/X11/XF86Config"; then
5885     echo "$ac_t""yes" 1>&6
5886     { test "$extra_verbose" = "yes" && cat << \EOF
5887     Defining HAVE_XFREE386
5888 EOF
5889 cat >> confdefs.h <<\EOF
5890 #define HAVE_XFREE386 1
5891 EOF
5892 }
5893
5894   else
5895     echo "$ac_t""no" 1>&6
5896   fi
5897
5898     test -z "$with_xmu" && { 
5899 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5900 echo "configure:5901: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5901 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5902
5903 xe_check_libs=" -lXmu "
5904 cat > conftest.$ac_ext <<EOF
5905 #line 5906 "configure"
5906 #include "confdefs.h"
5907 /* Override any gcc2 internal prototype to avoid an error.  */
5908 /* We use char because int might match the return type of a gcc2
5909     builtin and then its argument prototype would still apply.  */
5910 char XmuReadBitmapDataFromFile();
5911
5912 int main() {
5913 XmuReadBitmapDataFromFile()
5914 ; return 0; }
5915 EOF
5916 if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=yes"
5919 else
5920   echo "configure: failed program was:" >&5
5921   cat conftest.$ac_ext >&5
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=no"
5924 fi
5925 rm -f conftest*
5926 xe_check_libs=""
5927
5928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5929   echo "$ac_t""yes" 1>&6
5930   with_xmu=yes
5931 else
5932   echo "$ac_t""no" 1>&6
5933 with_xmu=no
5934 fi
5935
5936  }
5937   if test "$with_xmu" = "no"; then
5938     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5939    echo "    xemacs will be linked with \"xmu.o\""
5940  fi
5941   else
5942     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5943     { test "$extra_verbose" = "yes" && cat << \EOF
5944     Defining HAVE_XMU
5945 EOF
5946 cat >> confdefs.h <<\EOF
5947 #define HAVE_XMU 1
5948 EOF
5949 }
5950
5951   fi
5952
5953       
5954 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5955 echo "configure:5956: checking for main in -lXbsd" >&5
5956 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5957
5958 xe_check_libs=" -lXbsd "
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962
5963 int main() {
5964 main()
5965 ; return 0; }
5966 EOF
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=yes"
5970 else
5971   echo "configure: failed program was:" >&5
5972   cat conftest.$ac_ext >&5
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=no"
5975 fi
5976 rm -f conftest*
5977 xe_check_libs=""
5978
5979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5980   echo "$ac_t""yes" 1>&6
5981   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985
5986
5987
5988     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5989         if test "$GCC" = "yes"; then
5990       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5991       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5992     else
5993       case "$CC" in
5994         "xlc" ) CC="xlc_r" ;;
5995         "xlC" ) CC="xlC_r" ;;
5996         "cc"  ) CC="cc_r" ;;
5997       esac
5998     fi
5999   fi
6000
6001 fi 
6002 if test "$with_msw" != "no"; then
6003   echo "checking for MS-Windows" 1>&6
6004 echo "configure:6005: checking for MS-Windows" >&5
6005   
6006 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6007 echo "configure:6008: checking for main in -lgdi32" >&5
6008 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6009
6010 xe_check_libs=" -lgdi32 "
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014
6015 int main() {
6016 main()
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=yes"
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=no"
6027 fi
6028 rm -f conftest*
6029 xe_check_libs=""
6030
6031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6032   echo "$ac_t""yes" 1>&6
6033   with_msw=yes
6034 else
6035   echo "$ac_t""no" 1>&6
6036 fi
6037
6038
6039   if test "$with_msw" = "yes"; then
6040     { test "$extra_verbose" = "yes" && cat << \EOF
6041     Defining HAVE_MS_WINDOWS
6042 EOF
6043 cat >> confdefs.h <<\EOF
6044 #define HAVE_MS_WINDOWS 1
6045 EOF
6046 }
6047
6048     install_pp="$blddir/lib-src/installexe.sh"
6049     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6050     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6051     if test "$window_system" != x11; then
6052         window_system=msw
6053         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6054             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6055    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6056  fi
6057         test "$with_menubars"   != "no" && with_menubars=msw \
6058             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6059    echo "    xemacs will be linked with \"menubar-msw.o\""
6060  fi
6061         test "$with_toolbars"   != "no" && with_toolbars=msw \
6062             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6063    echo "    xemacs will be linked with \"toolbar-msw.o\""
6064  fi
6065         test "$with_dialogs"   != "no" && with_dialogs=msw \
6066             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6067    echo "    xemacs will be linked with \"dialog-msw.o\""
6068  fi
6069         test "$with_widgets"   != "no" && with_widgets=msw
6070     else
6071         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6072    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6073  fi
6074         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6075    echo "    xemacs will be linked with \"menubar-msw.o\""
6076  fi
6077         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6078    echo "    xemacs will be linked with \"toolbar-msw.o\""
6079  fi
6080         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6081    echo "    xemacs will be linked with \"dialog-msw.o\""
6082  fi
6083     fi
6084         cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 #include <fcntl.h>
6088     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6091 then
6092   { test "$extra_verbose" = "yes" && cat << \EOF
6093     Defining HAVE_MSG_SELECT
6094 EOF
6095 cat >> confdefs.h <<\EOF
6096 #define HAVE_MSG_SELECT 1
6097 EOF
6098 }
6099
6100 else
6101   conftest_rc="$?"
6102   echo "configure: failed program was:" >&5
6103   cat conftest.$ac_ext >&5
6104 fi
6105 rm -fr conftest*
6106     const_is_losing=no
6107     with_file_coding=yes
6108     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
6109    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\""
6110  fi
6111   fi
6112 fi
6113
6114
6115
6116 test -z "$window_system" && window_system="none"
6117
6118 if test "$window_system" = "none"; then
6119   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6120   do
6121     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6122        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6123     fi
6124     eval "with_${feature}=no"
6125   done
6126 else
6127   test -z "$with_toolbars" && with_toolbars=yes
6128 fi
6129
6130 if test "$with_msw" != "yes"; then
6131   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6132   do
6133     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6134        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6135     fi
6136     eval "with_${feature}=no"
6137   done
6138 else
6139   :
6140 fi
6141
6142 if test "$with_x11" != "yes"; then
6143             for feature in tooltalk cde offix wmcommand xim xmu
6144   do
6145     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6146        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6147     fi
6148     eval "with_${feature}=no"
6149   done
6150 fi
6151
6152 bitmapdir=
6153
6154 case "$window_system" in
6155   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6156   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6157   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6158 esac
6159
6160 case "$x_libraries" in *X11R4* )
6161   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6162   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6163 esac
6164
6165 echo "checking for WM_COMMAND option" 1>&6
6166 echo "configure:6167: checking for WM_COMMAND option" >&5;
6167 if test "$with_wmcommand" != "no"; then
6168   { test "$extra_verbose" = "yes" && cat << \EOF
6169     Defining HAVE_WMCOMMAND
6170 EOF
6171 cat >> confdefs.h <<\EOF
6172 #define HAVE_WMCOMMAND 1
6173 EOF
6174 }
6175
6176 fi
6177
6178 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6179 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6180 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6181 echo "configure:6182: checking for X11/Xauth.h" >&5
6182
6183 cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 #include <X11/Xauth.h>
6187 EOF
6188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6189 { (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6191 if test -z "$ac_err"; then
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=yes"
6194 else
6195   echo "$ac_err" >&5
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_header_$ac_safe=no"
6200 fi
6201 rm -f conftest*
6202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6203   echo "$ac_t""yes" 1>&6
6204   :
6205 else
6206   echo "$ac_t""no" 1>&6
6207 with_xauth=no
6208 fi
6209  }
6210 test -z "$with_xauth" && { 
6211 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6212 echo "configure:6213: checking for XauGetAuthByAddr in -lXau" >&5
6213 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6214
6215 xe_check_libs=" -lXau "
6216 cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 /* Override any gcc2 internal prototype to avoid an error.  */
6220 /* We use char because int might match the return type of a gcc2
6221     builtin and then its argument prototype would still apply.  */
6222 char XauGetAuthByAddr();
6223
6224 int main() {
6225 XauGetAuthByAddr()
6226 ; return 0; }
6227 EOF
6228 if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6229   rm -rf conftest*
6230   eval "ac_cv_lib_$ac_lib_var=yes"
6231 else
6232   echo "configure: failed program was:" >&5
6233   cat conftest.$ac_ext >&5
6234   rm -rf conftest*
6235   eval "ac_cv_lib_$ac_lib_var=no"
6236 fi
6237 rm -f conftest*
6238 xe_check_libs=""
6239
6240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6241   echo "$ac_t""yes" 1>&6
6242   :
6243 else
6244   echo "$ac_t""no" 1>&6
6245 with_xauth=no
6246 fi
6247
6248  }
6249 test -z "$with_xauth" && with_xauth=yes
6250 if test "$with_xauth" = "yes"; then
6251   { test "$extra_verbose" = "yes" && cat << \EOF
6252     Defining HAVE_XAUTH
6253 EOF
6254 cat >> confdefs.h <<\EOF
6255 #define HAVE_XAUTH 1
6256 EOF
6257 }
6258
6259   
6260 T=""
6261 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
6262 libs_xauth="$T"
6263
6264 fi
6265
6266
6267
6268
6269 if test "$with_tooltalk" != "no" ; then
6270       for dir in "" "Tt/" "desktop/" ; do
6271     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6272 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6273 echo "configure:6274: checking for ${dir}tt_c.h" >&5
6274
6275 cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 #include <${dir}tt_c.h>
6279 EOF
6280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6281 { (eval echo configure:6282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6283 if test -z "$ac_err"; then
6284   rm -rf conftest*
6285   eval "ac_cv_header_$ac_safe=yes"
6286 else
6287   echo "$ac_err" >&5
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -rf conftest*
6291   eval "ac_cv_header_$ac_safe=no"
6292 fi
6293 rm -f conftest*
6294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6295   echo "$ac_t""yes" 1>&6
6296   tt_c_h_path="${dir}tt_c.h"; break
6297 else
6298   echo "$ac_t""no" 1>&6
6299 fi
6300
6301   done
6302   if test -z "$tt_c_h_path"; then
6303     if test "$with_tooltalk" = "yes"; then
6304       (echo "$progname: Usage error:"
6305 echo " " "Unable to find required tooltalk header files."
6306 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6307     fi
6308     with_tooltalk=no
6309   fi
6310 fi
6311 if test "$with_tooltalk" != "no" ; then
6312   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6313     
6314 xe_msg_checking="for tt_message_create in -ltt"
6315 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6316 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6317 echo "configure:6318: checking "$xe_msg_checking"" >&5
6318 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6319
6320 xe_check_libs=" -ltt $extra_libs"
6321 cat > conftest.$ac_ext <<EOF
6322 #line 6323 "configure"
6323 #include "confdefs.h"
6324 /* Override any gcc2 internal prototype to avoid an error.  */
6325 /* We use char because int might match the return type of a gcc2
6326     builtin and then its argument prototype would still apply.  */
6327 char tt_message_create();
6328
6329 int main() {
6330 tt_message_create()
6331 ; return 0; }
6332 EOF
6333 if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6334   rm -rf conftest*
6335   eval "ac_cv_lib_$ac_lib_var=yes"
6336 else
6337   echo "configure: failed program was:" >&5
6338   cat conftest.$ac_ext >&5
6339   rm -rf conftest*
6340   eval "ac_cv_lib_$ac_lib_var=no"
6341 fi
6342 rm -f conftest*
6343 xe_check_libs=""
6344
6345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6346   echo "$ac_t""yes" 1>&6
6347   tt_libs="-ltt $extra_libs"; break
6348 else
6349   echo "$ac_t""no" 1>&6
6350 :
6351 fi
6352
6353
6354   done
6355   if test -z "$tt_libs"; then
6356     if test "$with_tooltalk" = "yes"; then
6357       (echo "$progname: Usage error:"
6358 echo " " "Unable to find required tooltalk libraries."
6359 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6360     fi
6361     with_tooltalk=no
6362   fi
6363 fi
6364 test -z "$with_tooltalk" && with_tooltalk=yes
6365 if test "$with_tooltalk" = "yes"; then
6366   { test "$extra_verbose" = "yes" && cat << \EOF
6367     Defining TOOLTALK
6368 EOF
6369 cat >> confdefs.h <<\EOF
6370 #define TOOLTALK 1
6371 EOF
6372 }
6373
6374   { test "$extra_verbose" = "yes" && cat << EOF
6375     Defining TT_C_H_PATH = "$tt_c_h_path"
6376 EOF
6377 cat >> confdefs.h <<EOF
6378 #define TT_C_H_PATH "$tt_c_h_path"
6379 EOF
6380 }
6381
6382   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6383   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6384    echo "    xemacs will be linked with \"tooltalk.o\""
6385  fi
6386 fi
6387
6388 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6389 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6390 echo "configure:6391: checking for Dt/Dt.h" >&5
6391
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 #include <Dt/Dt.h>
6396 EOF
6397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6398 { (eval echo configure:6399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6400 if test -z "$ac_err"; then
6401   rm -rf conftest*
6402   eval "ac_cv_header_$ac_safe=yes"
6403 else
6404   echo "$ac_err" >&5
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -rf conftest*
6408   eval "ac_cv_header_$ac_safe=no"
6409 fi
6410 rm -f conftest*
6411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6412   echo "$ac_t""yes" 1>&6
6413   :
6414 else
6415   echo "$ac_t""no" 1>&6
6416 with_cde=no
6417 fi
6418  }
6419 test -z "$with_cde" && { 
6420 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6421 echo "configure:6422: checking for DtDndDragStart in -lDtSvc" >&5
6422 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6423
6424 xe_check_libs=" -lDtSvc "
6425 cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 /* Override any gcc2 internal prototype to avoid an error.  */
6429 /* We use char because int might match the return type of a gcc2
6430     builtin and then its argument prototype would still apply.  */
6431 char DtDndDragStart();
6432
6433 int main() {
6434 DtDndDragStart()
6435 ; return 0; }
6436 EOF
6437 if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438   rm -rf conftest*
6439   eval "ac_cv_lib_$ac_lib_var=yes"
6440 else
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   eval "ac_cv_lib_$ac_lib_var=no"
6445 fi
6446 rm -f conftest*
6447 xe_check_libs=""
6448
6449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6450   echo "$ac_t""yes" 1>&6
6451   :
6452 else
6453   echo "$ac_t""no" 1>&6
6454 with_cde=no
6455 fi
6456
6457  }
6458 test -z "$with_cde" && with_cde=yes
6459 if test "$with_dragndrop" = no; then
6460   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6461   with_cde=no
6462 fi
6463 if test "$with_cde" = "yes" ; then
6464   { test "$extra_verbose" = "yes" && cat << \EOF
6465     Defining HAVE_CDE
6466 EOF
6467 cat >> confdefs.h <<\EOF
6468 #define HAVE_CDE 1
6469 EOF
6470 }
6471
6472   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6473   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6474   with_tooltalk=yes # CDE requires Tooltalk
6475   need_motif=yes    # CDE requires Motif
6476 fi
6477
6478 test "$window_system" != "x11" && with_offix=no
6479 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6480   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6481   with_offix=no
6482 fi
6483 if test "$with_dragndrop" = no; then
6484   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6485   with_offix=no
6486 fi
6487 if test "$with_cde" = yes; then
6488   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6489   with_offix=no
6490 fi
6491 test -z "$with_offix" && with_offix=no
6492 if test "$with_offix" = "yes"; then
6493   { test "$extra_verbose" = "yes" && cat << \EOF
6494     Defining HAVE_OFFIX_DND
6495 EOF
6496 cat >> confdefs.h <<\EOF
6497 #define HAVE_OFFIX_DND 1
6498 EOF
6499 }
6500
6501   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6502   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6503 fi
6504
6505 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6506 echo "configure:6507: checking if drag and drop API is needed" >&5
6507 if test "$with_dragndrop" != "no" ; then
6508   if test -n "$dragndrop_proto" ; then
6509     with_dragndrop=yes
6510     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6511     { test "$extra_verbose" = "yes" && cat << \EOF
6512     Defining HAVE_DRAGNDROP
6513 EOF
6514 cat >> confdefs.h <<\EOF
6515 #define HAVE_DRAGNDROP 1
6516 EOF
6517 }
6518
6519     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6520   else
6521     with_dragndrop=no
6522     echo "$ac_t""no" 1>&6
6523   fi
6524 fi
6525
6526 echo "checking for LDAP" 1>&6
6527 echo "configure:6528: checking for LDAP" >&5
6528 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6529 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6530 echo "configure:6531: checking for ldap.h" >&5
6531
6532 cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 #include <ldap.h>
6536 EOF
6537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6538 { (eval echo configure:6539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6540 if test -z "$ac_err"; then
6541   rm -rf conftest*
6542   eval "ac_cv_header_$ac_safe=yes"
6543 else
6544   echo "$ac_err" >&5
6545   echo "configure: failed program was:" >&5
6546   cat conftest.$ac_ext >&5
6547   rm -rf conftest*
6548   eval "ac_cv_header_$ac_safe=no"
6549 fi
6550 rm -f conftest*
6551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6552   echo "$ac_t""yes" 1>&6
6553   :
6554 else
6555   echo "$ac_t""no" 1>&6
6556 with_ldap=no
6557 fi
6558  }
6559 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6560 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6561 echo "configure:6562: checking for lber.h" >&5
6562
6563 cat > conftest.$ac_ext <<EOF
6564 #line 6565 "configure"
6565 #include "confdefs.h"
6566 #include <lber.h>
6567 EOF
6568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6569 { (eval echo configure:6570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6571 if test -z "$ac_err"; then
6572   rm -rf conftest*
6573   eval "ac_cv_header_$ac_safe=yes"
6574 else
6575   echo "$ac_err" >&5
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_header_$ac_safe=no"
6580 fi
6581 rm -f conftest*
6582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6583   echo "$ac_t""yes" 1>&6
6584   :
6585 else
6586   echo "$ac_t""no" 1>&6
6587 with_ldap=no
6588 fi
6589  }
6590 if test "$with_ldap" != "no"; then
6591   
6592 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6593 echo "configure:6594: checking for ldap_search in -lldap" >&5
6594 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6595
6596 xe_check_libs=" -lldap "
6597 cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char ldap_search();
6604
6605 int main() {
6606 ldap_search()
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_lib_$ac_lib_var=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=no"
6617 fi
6618 rm -f conftest*
6619 xe_check_libs=""
6620
6621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6622   echo "$ac_t""yes" 1>&6
6623   with_ldap_nolber=yes
6624 else
6625   echo "$ac_t""no" 1>&6
6626 with_ldap_nolber=no
6627 fi
6628
6629
6630   test "$with_ldap_nolber" = "no" && { 
6631 xe_msg_checking="for ldap_open in -lldap"
6632 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6633 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6634 echo "configure:6635: checking "$xe_msg_checking"" >&5
6635 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6636
6637 xe_check_libs=" -lldap -llber"
6638 cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char ldap_open();
6645
6646 int main() {
6647 ldap_open()
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=yes"
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   eval "ac_cv_lib_$ac_lib_var=no"
6658 fi
6659 rm -f conftest*
6660 xe_check_libs=""
6661
6662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6663   echo "$ac_t""yes" 1>&6
6664   with_ldap_lber=yes
6665 else
6666   echo "$ac_t""no" 1>&6
6667 with_ldap_lber=no
6668 fi
6669
6670  }
6671   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6672 xe_msg_checking="for ldap_open in -lldap"
6673 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6674 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6675 echo "configure:6676: checking "$xe_msg_checking"" >&5
6676 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6677
6678 xe_check_libs=" -lldap -llber -lkrb"
6679 cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682 /* Override any gcc2 internal prototype to avoid an error.  */
6683 /* We use char because int might match the return type of a gcc2
6684     builtin and then its argument prototype would still apply.  */
6685 char ldap_open();
6686
6687 int main() {
6688 ldap_open()
6689 ; return 0; }
6690 EOF
6691 if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6692   rm -rf conftest*
6693   eval "ac_cv_lib_$ac_lib_var=yes"
6694 else
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697   rm -rf conftest*
6698   eval "ac_cv_lib_$ac_lib_var=no"
6699 fi
6700 rm -f conftest*
6701 xe_check_libs=""
6702
6703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6704   echo "$ac_t""yes" 1>&6
6705   with_ldap_krb=yes
6706 else
6707   echo "$ac_t""no" 1>&6
6708 with_ldap_krb=no
6709 fi
6710
6711  }
6712   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6713 xe_msg_checking="for ldap_open in -lldap"
6714 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6715 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6716 echo "configure:6717: checking "$xe_msg_checking"" >&5
6717 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6718
6719 xe_check_libs=" -lldap -llber -lkrb -ldes"
6720 cat > conftest.$ac_ext <<EOF
6721 #line 6722 "configure"
6722 #include "confdefs.h"
6723 /* Override any gcc2 internal prototype to avoid an error.  */
6724 /* We use char because int might match the return type of a gcc2
6725     builtin and then its argument prototype would still apply.  */
6726 char ldap_open();
6727
6728 int main() {
6729 ldap_open()
6730 ; return 0; }
6731 EOF
6732 if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6733   rm -rf conftest*
6734   eval "ac_cv_lib_$ac_lib_var=yes"
6735 else
6736   echo "configure: failed program was:" >&5
6737   cat conftest.$ac_ext >&5
6738   rm -rf conftest*
6739   eval "ac_cv_lib_$ac_lib_var=no"
6740 fi
6741 rm -f conftest*
6742 xe_check_libs=""
6743
6744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6745   echo "$ac_t""yes" 1>&6
6746   with_ldap_krbdes=yes
6747 else
6748   echo "$ac_t""no" 1>&6
6749 with_ldap_krbdes=no
6750 fi
6751
6752  }
6753   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
6754 fi
6755 if test "$with_ldap" = "yes"; then
6756   { test "$extra_verbose" = "yes" && cat << \EOF
6757     Defining HAVE_LDAP
6758 EOF
6759 cat >> confdefs.h <<\EOF
6760 #define HAVE_LDAP 1
6761 EOF
6762 }
6763
6764   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6765    echo "    xemacs will be linked with \"eldap.o\""
6766  fi
6767   if test "$with_ldap_nolber" = "yes" ; then
6768     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6769   else
6770     if test "$with_ldap_krb" = "yes" ; then
6771       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6772     fi
6773     if test "$with_ldap_krbdes" = "yes" ; then
6774       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6775       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6776     fi
6777     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6778     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6779   fi
6780   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6781 do
6782 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6783 echo "configure:6784: checking for $ac_func" >&5
6784
6785 cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* System header to define __stub macros and hopefully few prototypes,
6789     which can conflict with char $ac_func(); below.  */
6790 #include <assert.h>
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char $ac_func();
6795
6796 int main() {
6797
6798 /* The GNU C library defines this for functions which it implements
6799     to always fail with ENOSYS.  Some functions are actually named
6800     something starting with __ and the normal name is an alias.  */
6801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6802 choke me
6803 #else
6804 $ac_func();
6805 #endif
6806
6807 ; return 0; }
6808 EOF
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810   rm -rf conftest*
6811   eval "ac_cv_func_$ac_func=yes"
6812 else
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_func_$ac_func=no"
6817 fi
6818 rm -f conftest*
6819
6820 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6821   echo "$ac_t""yes" 1>&6
6822     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6823   { test "$extra_verbose" = "yes" && cat << EOF
6824     Defining $ac_tr_func
6825 EOF
6826 cat >> confdefs.h <<EOF
6827 #define $ac_tr_func 1
6828 EOF
6829 }
6830  
6831 else
6832   echo "$ac_t""no" 1>&6
6833 fi
6834 done
6835
6836 fi
6837
6838
6839 if test "$window_system" != "none"; then
6840   echo "checking for graphics libraries" 1>&6
6841 echo "configure:6842: checking for graphics libraries" >&5
6842
6843     xpm_problem=""
6844   if test -z "$with_xpm"; then
6845     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6846 echo "configure:6847: checking for Xpm - no older than 3.4f" >&5
6847     xe_check_libs=-lXpm
6848     cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851 #include <X11/xpm.h>
6852     int main(int c, char **v) {
6853     return c == 1 ? 0 :
6854       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6855       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6856 EOF
6857 if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6858 then
6859   ./conftest dummy_arg; xpm_status=$?;
6860       if test "$xpm_status" = "0"; then
6861         with_xpm=yes;
6862       else
6863         with_xpm=no;
6864         if test "$xpm_status" = "1"; then
6865           xpm_problem="Xpm library version and header file version don't match!"
6866         elif test "$xpm_status" = "2"; then
6867           xpm_problem="Xpm library version is too old!"
6868         else
6869           xpm_problem="Internal xpm detection logic error!"
6870         fi
6871         echo "
6872 *** WARNING *** $xpm_problem
6873   I'm not touching that with a 10-foot pole!
6874   If you really want to use the installed version of Xpm, rerun
6875   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6876     fi
6877 else
6878   conftest_rc="$?"
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -fr conftest*
6882   with_xpm=no
6883 fi
6884 rm -fr conftest*
6885     xe_check_libs=
6886     echo "$ac_t""$with_xpm" 1>&6
6887   fi
6888   if test "$with_xpm" = "yes"; then
6889     { test "$extra_verbose" = "yes" && cat << \EOF
6890     Defining HAVE_XPM
6891 EOF
6892 cat >> confdefs.h <<\EOF
6893 #define HAVE_XPM 1
6894 EOF
6895 }
6896
6897     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6898     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6899 echo "configure:6900: checking for \"FOR_MSW\" xpm" >&5
6900     xe_check_libs=-lXpm
6901     cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904
6905 int main() {
6906 XpmCreatePixmapFromData()
6907 ; return 0; }
6908 EOF
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6910   rm -rf conftest*
6911   xpm_for_msw=no
6912 else
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   xpm_for_msw=yes
6917 fi
6918 rm -f conftest*
6919     xe_check_libs=
6920     echo "$ac_t""$xpm_for_msw" 1>&6
6921     if test "$xpm_for_msw" = "yes"; then
6922       { test "$extra_verbose" = "yes" && cat << \EOF
6923     Defining FOR_MSW
6924 EOF
6925 cat >> confdefs.h <<\EOF
6926 #define FOR_MSW 1
6927 EOF
6928 }
6929
6930     fi
6931   fi
6932
6933     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6934 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6935 echo "configure:6936: checking for compface.h" >&5
6936
6937 cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6940 #include <compface.h>
6941 EOF
6942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6943 { (eval echo configure:6944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6945 if test -z "$ac_err"; then
6946   rm -rf conftest*
6947   eval "ac_cv_header_$ac_safe=yes"
6948 else
6949   echo "$ac_err" >&5
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -rf conftest*
6953   eval "ac_cv_header_$ac_safe=no"
6954 fi
6955 rm -f conftest*
6956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6957   echo "$ac_t""yes" 1>&6
6958   :
6959 else
6960   echo "$ac_t""no" 1>&6
6961 with_xface=no
6962 fi
6963  }
6964   test -z "$with_xface" && { 
6965 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
6966 echo "configure:6967: checking for UnGenFace in -lcompface" >&5
6967 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
6968
6969 xe_check_libs=" -lcompface "
6970 cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* Override any gcc2 internal prototype to avoid an error.  */
6974 /* We use char because int might match the return type of a gcc2
6975     builtin and then its argument prototype would still apply.  */
6976 char UnGenFace();
6977
6978 int main() {
6979 UnGenFace()
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=yes"
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_lib_$ac_lib_var=no"
6990 fi
6991 rm -f conftest*
6992 xe_check_libs=""
6993
6994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6995   echo "$ac_t""yes" 1>&6
6996   : 
6997 else
6998   echo "$ac_t""no" 1>&6
6999 with_xface=no
7000 fi
7001
7002  }
7003   test -z "$with_xface" && with_xface=yes
7004   if test "$with_xface" = "yes"; then
7005     { test "$extra_verbose" = "yes" && cat << \EOF
7006     Defining HAVE_XFACE
7007 EOF
7008 cat >> confdefs.h <<\EOF
7009 #define HAVE_XFACE 1
7010 EOF
7011 }
7012
7013     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7014   fi
7015
7016         if test "$with_gif" != "no"; then
7017     with_gif="yes"
7018     { test "$extra_verbose" = "yes" && cat << \EOF
7019     Defining HAVE_GIF
7020 EOF
7021 cat >> confdefs.h <<\EOF
7022 #define HAVE_GIF 1
7023 EOF
7024 }
7025
7026     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7027    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7028  fi
7029   fi
7030
7031       if test "$with_png $with_tiff" != "no no"; then
7032     
7033 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7034 echo "configure:7035: checking for inflate in -lc" >&5
7035 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7036
7037 xe_check_libs=" -lc "
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char inflate();
7045
7046 int main() {
7047 inflate()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 xe_check_libs=""
7061
7062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7063   echo "$ac_t""yes" 1>&6
7064   :
7065 else
7066   echo "$ac_t""no" 1>&6
7067
7068 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7069 echo "configure:7070: checking for inflate in -lz" >&5
7070 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7071
7072 xe_check_libs=" -lz "
7073 cat > conftest.$ac_ext <<EOF
7074 #line 7075 "configure"
7075 #include "confdefs.h"
7076 /* Override any gcc2 internal prototype to avoid an error.  */
7077 /* We use char because int might match the return type of a gcc2
7078     builtin and then its argument prototype would still apply.  */
7079 char inflate();
7080
7081 int main() {
7082 inflate()
7083 ; return 0; }
7084 EOF
7085 if { (eval echo configure:7086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7086   rm -rf conftest*
7087   eval "ac_cv_lib_$ac_lib_var=yes"
7088 else
7089   echo "configure: failed program was:" >&5
7090   cat conftest.$ac_ext >&5
7091   rm -rf conftest*
7092   eval "ac_cv_lib_$ac_lib_var=no"
7093 fi
7094 rm -f conftest*
7095 xe_check_libs=""
7096
7097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7098   echo "$ac_t""yes" 1>&6
7099   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7100 else
7101   echo "$ac_t""no" 1>&6
7102
7103 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7104 echo "configure:7105: checking for inflate in -lgz" >&5
7105 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7106
7107 xe_check_libs=" -lgz "
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 /* Override any gcc2 internal prototype to avoid an error.  */
7112 /* We use char because int might match the return type of a gcc2
7113     builtin and then its argument prototype would still apply.  */
7114 char inflate();
7115
7116 int main() {
7117 inflate()
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121   rm -rf conftest*
7122   eval "ac_cv_lib_$ac_lib_var=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_lib_$ac_lib_var=no"
7128 fi
7129 rm -f conftest*
7130 xe_check_libs=""
7131
7132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7133   echo "$ac_t""yes" 1>&6
7134   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7135 else
7136   echo "$ac_t""no" 1>&6
7137 fi
7138
7139
7140 fi
7141
7142
7143 fi
7144
7145
7146   fi
7147
7148     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7149 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7150 echo "configure:7151: checking for jpeglib.h" >&5
7151
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 #include <jpeglib.h>
7156 EOF
7157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7158 { (eval echo configure:7159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7160 if test -z "$ac_err"; then
7161   rm -rf conftest*
7162   eval "ac_cv_header_$ac_safe=yes"
7163 else
7164   echo "$ac_err" >&5
7165   echo "configure: failed program was:" >&5
7166   cat conftest.$ac_ext >&5
7167   rm -rf conftest*
7168   eval "ac_cv_header_$ac_safe=no"
7169 fi
7170 rm -f conftest*
7171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7172   echo "$ac_t""yes" 1>&6
7173   :
7174 else
7175   echo "$ac_t""no" 1>&6
7176 with_jpeg=no
7177 fi
7178  }
7179   test -z "$with_jpeg" && { 
7180 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7181 echo "configure:7182: checking for jpeg_destroy_decompress in -ljpeg" >&5
7182 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7183
7184 xe_check_libs=" -ljpeg "
7185 cat > conftest.$ac_ext <<EOF
7186 #line 7187 "configure"
7187 #include "confdefs.h"
7188 /* Override any gcc2 internal prototype to avoid an error.  */
7189 /* We use char because int might match the return type of a gcc2
7190     builtin and then its argument prototype would still apply.  */
7191 char jpeg_destroy_decompress();
7192
7193 int main() {
7194 jpeg_destroy_decompress()
7195 ; return 0; }
7196 EOF
7197 if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7198   rm -rf conftest*
7199   eval "ac_cv_lib_$ac_lib_var=yes"
7200 else
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   eval "ac_cv_lib_$ac_lib_var=no"
7205 fi
7206 rm -f conftest*
7207 xe_check_libs=""
7208
7209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7210   echo "$ac_t""yes" 1>&6
7211   :
7212 else
7213   echo "$ac_t""no" 1>&6
7214 with_jpeg=no
7215 fi
7216
7217  }
7218   test -z "$with_jpeg" && with_jpeg=yes
7219   if test "$with_jpeg" = "yes"; then
7220     { test "$extra_verbose" = "yes" && cat << \EOF
7221     Defining HAVE_JPEG
7222 EOF
7223 cat >> confdefs.h <<\EOF
7224 #define HAVE_JPEG 1
7225 EOF
7226 }
7227
7228     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7229   fi
7230
7231     png_problem=""
7232   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7233 echo "configure:7234: checking for pow" >&5
7234
7235 cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 /* System header to define __stub macros and hopefully few prototypes,
7239     which can conflict with char pow(); below.  */
7240 #include <assert.h>
7241 /* Override any gcc2 internal prototype to avoid an error.  */
7242 /* We use char because int might match the return type of a gcc2
7243     builtin and then its argument prototype would still apply.  */
7244 char pow();
7245
7246 int main() {
7247
7248 /* The GNU C library defines this for functions which it implements
7249     to always fail with ENOSYS.  Some functions are actually named
7250     something starting with __ and the normal name is an alias.  */
7251 #if defined (__stub_pow) || defined (__stub___pow)
7252 choke me
7253 #else
7254 pow();
7255 #endif
7256
7257 ; return 0; }
7258 EOF
7259 if { (eval echo configure:7260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7260   rm -rf conftest*
7261   eval "ac_cv_func_pow=yes"
7262 else
7263   echo "configure: failed program was:" >&5
7264   cat conftest.$ac_ext >&5
7265   rm -rf conftest*
7266   eval "ac_cv_func_pow=no"
7267 fi
7268 rm -f conftest*
7269
7270 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7271   echo "$ac_t""yes" 1>&6
7272   :
7273 else
7274   echo "$ac_t""no" 1>&6
7275 with_png=no
7276 fi
7277  }
7278   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7279 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7280 echo "configure:7281: checking for png.h" >&5
7281
7282 cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285 #include <png.h>
7286 EOF
7287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7288 { (eval echo configure:7289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7290 if test -z "$ac_err"; then
7291   rm -rf conftest*
7292   eval "ac_cv_header_$ac_safe=yes"
7293 else
7294   echo "$ac_err" >&5
7295   echo "configure: failed program was:" >&5
7296   cat conftest.$ac_ext >&5
7297   rm -rf conftest*
7298   eval "ac_cv_header_$ac_safe=no"
7299 fi
7300 rm -f conftest*
7301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7302   echo "$ac_t""yes" 1>&6
7303   :
7304 else
7305   echo "$ac_t""no" 1>&6
7306 with_png=no
7307 fi
7308  }
7309   test -z "$with_png" && { 
7310 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7311 echo "configure:7312: checking for png_read_image in -lpng" >&5
7312 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7313
7314 xe_check_libs=" -lpng "
7315 cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 /* Override any gcc2 internal prototype to avoid an error.  */
7319 /* We use char because int might match the return type of a gcc2
7320     builtin and then its argument prototype would still apply.  */
7321 char png_read_image();
7322
7323 int main() {
7324 png_read_image()
7325 ; return 0; }
7326 EOF
7327 if { (eval echo configure:7328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7328   rm -rf conftest*
7329   eval "ac_cv_lib_$ac_lib_var=yes"
7330 else
7331   echo "configure: failed program was:" >&5
7332   cat conftest.$ac_ext >&5
7333   rm -rf conftest*
7334   eval "ac_cv_lib_$ac_lib_var=no"
7335 fi
7336 rm -f conftest*
7337 xe_check_libs=""
7338
7339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7340   echo "$ac_t""yes" 1>&6
7341   :
7342 else
7343   echo "$ac_t""no" 1>&6
7344 with_png=no
7345 fi
7346
7347  }
7348   if test -z "$with_png"; then
7349     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7350 echo "configure:7351: checking for workable png version information" >&5
7351     xe_check_libs="-lpng -lz"
7352     cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 #include <png.h>
7356     int main(int c, char **v) {
7357     if (c == 1) return 0;
7358     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7359     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7362 then
7363   ./conftest dummy_arg; png_status=$?;
7364       if test "$png_status" = "0"; then
7365         with_png=yes;
7366       else
7367         with_png=no;
7368         if test "$png_status" = "1"; then
7369           png_problem="PNG library version and header file don't match!"
7370         elif test "$png_status" = "2"; then
7371           png_problem="PNG library version too old (pre 1.0.2)!"
7372         fi
7373         echo "
7374 *** WARNING *** $png_problem
7375   I'm not touching that with a 10-foot pole!
7376   If you really want to use the installed version of libPNG, rerun
7377   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7378     fi
7379 else
7380   conftest_rc="$?"
7381   echo "configure: failed program was:" >&5
7382   cat conftest.$ac_ext >&5
7383   rm -fr conftest*
7384   with_png=no
7385 fi
7386 rm -fr conftest*
7387     xe_check_libs=
7388     echo "$ac_t""$with_png" 1>&6
7389   fi
7390   if test "$with_png" = "yes"; then
7391     { test "$extra_verbose" = "yes" && cat << \EOF
7392     Defining HAVE_PNG
7393 EOF
7394 cat >> confdefs.h <<\EOF
7395 #define HAVE_PNG 1
7396 EOF
7397 }
7398
7399     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7400   fi
7401
7402     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7403 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7404 echo "configure:7405: checking for tiffio.h" >&5
7405
7406 cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 #include <tiffio.h>
7410 EOF
7411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7412 { (eval echo configure:7413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7414 if test -z "$ac_err"; then
7415   rm -rf conftest*
7416   eval "ac_cv_header_$ac_safe=yes"
7417 else
7418   echo "$ac_err" >&5
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_header_$ac_safe=no"
7423 fi
7424 rm -f conftest*
7425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7426   echo "$ac_t""yes" 1>&6
7427   :
7428 else
7429   echo "$ac_t""no" 1>&6
7430 with_tiff=no
7431 fi
7432  }
7433   test -z "$with_tiff" && { 
7434 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7435 echo "configure:7436: checking for TIFFClientOpen in -ltiff" >&5
7436 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7437
7438 xe_check_libs=" -ltiff "
7439 cat > conftest.$ac_ext <<EOF
7440 #line 7441 "configure"
7441 #include "confdefs.h"
7442 /* Override any gcc2 internal prototype to avoid an error.  */
7443 /* We use char because int might match the return type of a gcc2
7444     builtin and then its argument prototype would still apply.  */
7445 char TIFFClientOpen();
7446
7447 int main() {
7448 TIFFClientOpen()
7449 ; return 0; }
7450 EOF
7451 if { (eval echo configure:7452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7452   rm -rf conftest*
7453   eval "ac_cv_lib_$ac_lib_var=yes"
7454 else
7455   echo "configure: failed program was:" >&5
7456   cat conftest.$ac_ext >&5
7457   rm -rf conftest*
7458   eval "ac_cv_lib_$ac_lib_var=no"
7459 fi
7460 rm -f conftest*
7461 xe_check_libs=""
7462
7463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7464   echo "$ac_t""yes" 1>&6
7465   :
7466 else
7467   echo "$ac_t""no" 1>&6
7468 with_tiff=no
7469 fi
7470
7471  }
7472   test -z "$with_tiff" && with_tiff=yes
7473   if test "$with_tiff" = "yes"; then
7474     { test "$extra_verbose" = "yes" && cat << \EOF
7475     Defining HAVE_TIFF
7476 EOF
7477 cat >> confdefs.h <<\EOF
7478 #define HAVE_TIFF 1
7479 EOF
7480 }
7481
7482     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7483   fi
7484 fi
7485
7486
7487 if test "$with_x11" = "yes"; then
7488
7489   echo "checking for X11 graphics libraries" 1>&6
7490 echo "configure:7491: checking for X11 graphics libraries" >&5
7491
7492     
7493 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7494 echo "configure:7495: checking for XawScrollbarSetThumb in -lXaw" >&5
7495 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7496
7497 xe_check_libs=" -lXaw "
7498 cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* Override any gcc2 internal prototype to avoid an error.  */
7502 /* We use char because int might match the return type of a gcc2
7503     builtin and then its argument prototype would still apply.  */
7504 char XawScrollbarSetThumb();
7505
7506 int main() {
7507 XawScrollbarSetThumb()
7508 ; return 0; }
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7511   rm -rf conftest*
7512   eval "ac_cv_lib_$ac_lib_var=yes"
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -rf conftest*
7517   eval "ac_cv_lib_$ac_lib_var=no"
7518 fi
7519 rm -f conftest*
7520 xe_check_libs=""
7521
7522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7523   echo "$ac_t""yes" 1>&6
7524   have_xaw=yes
7525 else
7526   echo "$ac_t""no" 1>&6
7527 have_xaw=no
7528 fi
7529
7530
7531                     
7532     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7533 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7534 echo "configure:7535: checking for Xm/Xm.h" >&5
7535
7536 cat > conftest.$ac_ext <<EOF
7537 #line 7538 "configure"
7538 #include "confdefs.h"
7539 #include <Xm/Xm.h>
7540 EOF
7541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7542 { (eval echo configure:7543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7544 if test -z "$ac_err"; then
7545   rm -rf conftest*
7546   eval "ac_cv_header_$ac_safe=yes"
7547 else
7548   echo "$ac_err" >&5
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   eval "ac_cv_header_$ac_safe=no"
7553 fi
7554 rm -f conftest*
7555 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7556   echo "$ac_t""yes" 1>&6
7557   
7558 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7559 echo "configure:7560: checking for XmStringFree in -lXm" >&5
7560 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7561
7562 xe_check_libs=" -lXm "
7563 cat > conftest.$ac_ext <<EOF
7564 #line 7565 "configure"
7565 #include "confdefs.h"
7566 /* Override any gcc2 internal prototype to avoid an error.  */
7567 /* We use char because int might match the return type of a gcc2
7568     builtin and then its argument prototype would still apply.  */
7569 char XmStringFree();
7570
7571 int main() {
7572 XmStringFree()
7573 ; return 0; }
7574 EOF
7575 if { (eval echo configure:7576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7576   rm -rf conftest*
7577   eval "ac_cv_lib_$ac_lib_var=yes"
7578 else
7579   echo "configure: failed program was:" >&5
7580   cat conftest.$ac_ext >&5
7581   rm -rf conftest*
7582   eval "ac_cv_lib_$ac_lib_var=no"
7583 fi
7584 rm -f conftest*
7585 xe_check_libs=""
7586
7587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7588   echo "$ac_t""yes" 1>&6
7589   have_motif=yes
7590 else
7591   echo "$ac_t""no" 1>&6
7592 have_motif=no
7593 fi
7594
7595
7596 else
7597   echo "$ac_t""no" 1>&6
7598 have_motif=no
7599 fi
7600
7601
7602   if test "$have_motif" = "yes"; then
7603         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7604 echo "configure:7605: checking for Lesstif" >&5
7605     cat > conftest.$ac_ext <<EOF
7606 #line 7607 "configure"
7607 #include "confdefs.h"
7608 #include <Xm/Xm.h>
7609 #ifdef LESSTIF_VERSION
7610 yes
7611 #endif
7612
7613 EOF
7614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7615   egrep "yes" >/dev/null 2>&1; then
7616   rm -rf conftest*
7617   have_lesstif=yes
7618 else
7619   rm -rf conftest*
7620   have_lesstif=no
7621 fi
7622 rm -f conftest*
7623
7624   echo "$ac_t""$have_lesstif" 1>&6
7625   fi
7626
7627 fi 
7628
7629 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7630   with_menubars="lucid" ;;
7631 esac
7632 case "$with_dialogs" in "" | "yes" | "lucid" )
7633   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7634   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7635   else with_dialogs=no
7636   fi ;;
7637 esac
7638 case "$with_scrollbars" in "" | "yes" )
7639   with_scrollbars="lucid" ;;
7640 esac
7641 case "$with_widgets" in "" | "yes" )
7642   if   test "$have_motif" = "yes"; then with_widgets="motif"
7643   else with_widgets=no
7644   fi ;;
7645 esac
7646
7647 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
7648
7649 case "$all_widgets" in *athena* )
7650   { test "$extra_verbose" = "yes" && cat << \EOF
7651     Defining LWLIB_USES_ATHENA
7652 EOF
7653 cat >> confdefs.h <<\EOF
7654 #define LWLIB_USES_ATHENA 1
7655 EOF
7656 }
7657
7658   { test "$extra_verbose" = "yes" && cat << \EOF
7659     Defining NEED_ATHENA
7660 EOF
7661 cat >> confdefs.h <<\EOF
7662 #define NEED_ATHENA 1
7663 EOF
7664 }
7665
7666   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7667   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7668 esac
7669
7670 case "$all_widgets" in *motif* )
7671   { test "$extra_verbose" = "yes" && cat << \EOF
7672     Defining LWLIB_USES_MOTIF
7673 EOF
7674 cat >> confdefs.h <<\EOF
7675 #define LWLIB_USES_MOTIF 1
7676 EOF
7677 }
7678
7679   { test "$extra_verbose" = "yes" && cat << \EOF
7680     Defining NEED_MOTIF
7681 EOF
7682 cat >> confdefs.h <<\EOF
7683 #define NEED_MOTIF 1
7684 EOF
7685 }
7686
7687   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7688   need_motif=yes ;;
7689 esac
7690
7691 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7692 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7693 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7694 case "$all_widgets" in *lucid* )
7695   { test "$extra_verbose" = "yes" && cat << \EOF
7696     Defining NEED_LUCID
7697 EOF
7698 cat >> confdefs.h <<\EOF
7699 #define NEED_LUCID 1
7700 EOF
7701 }
7702
7703   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7704 esac
7705
7706
7707
7708 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7709     Defining LWLIB_SCROLLBARS_ATHENA
7710 EOF
7711 cat >> confdefs.h <<\EOF
7712 #define LWLIB_SCROLLBARS_ATHENA 1
7713 EOF
7714 }
7715 ;; esac
7716 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7717     Defining LWLIB_DIALOGS_ATHENA
7718 EOF
7719 cat >> confdefs.h <<\EOF
7720 #define LWLIB_DIALOGS_ATHENA 1
7721 EOF
7722 }
7723    ;; esac
7724 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7725     Defining LWLIB_SCROLLBARS_ATHENA3D
7726 EOF
7727 cat >> confdefs.h <<\EOF
7728 #define LWLIB_SCROLLBARS_ATHENA3D 1
7729 EOF
7730 }
7731
7732 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7733     Defining LWLIB_DIALOGS_ATHENA3D
7734 EOF
7735 cat >> confdefs.h <<\EOF
7736 #define LWLIB_DIALOGS_ATHENA3D 1
7737 EOF
7738 }
7739
7740
7741 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7742     Defining HAVE_MENUBARS
7743 EOF
7744 cat >> confdefs.h <<\EOF
7745 #define HAVE_MENUBARS 1
7746 EOF
7747 }
7748
7749 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7750     Defining HAVE_SCROLLBARS
7751 EOF
7752 cat >> confdefs.h <<\EOF
7753 #define HAVE_SCROLLBARS 1
7754 EOF
7755 }
7756
7757 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7758     Defining HAVE_DIALOGS
7759 EOF
7760 cat >> confdefs.h <<\EOF
7761 #define HAVE_DIALOGS 1
7762 EOF
7763 }
7764
7765 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7766     Defining HAVE_TOOLBARS
7767 EOF
7768 cat >> confdefs.h <<\EOF
7769 #define HAVE_TOOLBARS 1
7770 EOF
7771 }
7772
7773
7774 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7775     Defining LWLIB_MENUBARS_LUCID
7776 EOF
7777 cat >> confdefs.h <<\EOF
7778 #define LWLIB_MENUBARS_LUCID 1
7779 EOF
7780 }
7781
7782 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7783     Defining LWLIB_SCROLLBARS_LUCID
7784 EOF
7785 cat >> confdefs.h <<\EOF
7786 #define LWLIB_SCROLLBARS_LUCID 1
7787 EOF
7788 }
7789
7790
7791 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7792     Defining LWLIB_MENUBARS_MOTIF
7793 EOF
7794 cat >> confdefs.h <<\EOF
7795 #define LWLIB_MENUBARS_MOTIF 1
7796 EOF
7797 }
7798
7799 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7800     Defining LWLIB_SCROLLBARS_MOTIF
7801 EOF
7802 cat >> confdefs.h <<\EOF
7803 #define LWLIB_SCROLLBARS_MOTIF 1
7804 EOF
7805 }
7806
7807 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7808     Defining LWLIB_DIALOGS_MOTIF
7809 EOF
7810 cat >> confdefs.h <<\EOF
7811 #define LWLIB_DIALOGS_MOTIF 1
7812 EOF
7813 }
7814
7815
7816 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7817    echo "    xemacs will be linked with \"menubar.o\""
7818  fi
7819 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7820    echo "    xemacs will be linked with \"scrollbar.o\""
7821  fi
7822 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7823    echo "    xemacs will be linked with \"dialog.o\""
7824  fi
7825 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7826    echo "    xemacs will be linked with \"toolbar.o\""
7827  fi
7828
7829 if test "$with_x11" = "yes"; then
7830   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7831    echo "    xemacs will be linked with \"menubar-x.o\""
7832  fi
7833   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7834    echo "    xemacs will be linked with \"scrollbar-x.o\""
7835  fi
7836   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7837    echo "    xemacs will be linked with \"dialog-x.o\""
7838  fi
7839   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7840    echo "    xemacs will be linked with \"toolbar-x.o\""
7841  fi
7842   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7843    echo "    xemacs will be linked with \"gui-x.o\""
7844  fi
7845 else
7846   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7847     echo "Attempt to Build NAS sound without X"
7848     echo "Please remove NAS configuration or build with X"
7849     exit 1
7850   fi
7851 fi
7852
7853
7854 test -z "$with_mule" && with_mule=no
7855 test -z "$with_file_coding" && with_file_coding=no
7856
7857
7858 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7859   { test "$extra_verbose" = "yes" && cat << \EOF
7860     Defining FILE_CODING
7861 EOF
7862 cat >> confdefs.h <<\EOF
7863 #define FILE_CODING 1
7864 EOF
7865 }
7866
7867   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7868    echo "    xemacs will be linked with \"file-coding.o\""
7869  fi
7870 fi
7871
7872 if test "$with_mule" = "yes" ; then
7873   echo "checking for Mule-related features" 1>&6
7874 echo "configure:7875: checking for Mule-related features" >&5
7875   { test "$extra_verbose" = "yes" && cat << \EOF
7876     Defining MULE
7877 EOF
7878 cat >> confdefs.h <<\EOF
7879 #define MULE 1
7880 EOF
7881 }
7882
7883   { test "$extra_verbose" = "yes" && cat << \EOF
7884     Defining FILE_CODING
7885 EOF
7886 cat >> confdefs.h <<\EOF
7887 #define FILE_CODING 1
7888 EOF
7889 }
7890
7891   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
7892    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
7893  fi
7894   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
7895     { test "$extra_verbose" = "yes" && cat << \EOF
7896     Defining TEXT_CODING
7897 EOF
7898 cat >> confdefs.h <<\EOF
7899 #define TEXT_CODING 1
7900 EOF
7901 }
7902
7903     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
7904    echo "    xemacs will be linked with \"text-coding.o\""
7905  fi
7906   else
7907     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7908    echo "    xemacs will be linked with \"file-coding.o\""
7909  fi
7910   fi
7911     for ac_hdr in libintl.h
7912 do
7913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7915 echo "configure:7916: checking for $ac_hdr" >&5
7916
7917 cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 #include <$ac_hdr>
7921 EOF
7922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7923 { (eval echo configure:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7925 if test -z "$ac_err"; then
7926   rm -rf conftest*
7927   eval "ac_cv_header_$ac_safe=yes"
7928 else
7929   echo "$ac_err" >&5
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   eval "ac_cv_header_$ac_safe=no"
7934 fi
7935 rm -f conftest*
7936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7937   echo "$ac_t""yes" 1>&6
7938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7939   { test "$extra_verbose" = "yes" && cat << EOF
7940     Defining $ac_tr_hdr
7941 EOF
7942 cat >> confdefs.h <<EOF
7943 #define $ac_tr_hdr 1
7944 EOF
7945 }
7946  
7947 else
7948   echo "$ac_t""no" 1>&6
7949 fi
7950 done
7951
7952   
7953 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7954 echo "configure:7955: checking for strerror in -lintl" >&5
7955 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7956
7957 xe_check_libs=" -lintl "
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 /* Override any gcc2 internal prototype to avoid an error.  */
7962 /* We use char because int might match the return type of a gcc2
7963     builtin and then its argument prototype would still apply.  */
7964 char strerror();
7965
7966 int main() {
7967 strerror()
7968 ; return 0; }
7969 EOF
7970 if { (eval echo configure:7971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=yes"
7973 else
7974   echo "configure: failed program was:" >&5
7975   cat conftest.$ac_ext >&5
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=no"
7978 fi
7979 rm -f conftest*
7980 xe_check_libs=""
7981
7982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7983   echo "$ac_t""yes" 1>&6
7984     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7986   { test "$extra_verbose" = "yes" && cat << EOF
7987     Defining $ac_tr_lib
7988 EOF
7989 cat >> confdefs.h <<EOF
7990 #define $ac_tr_lib 1
7991 EOF
7992 }
7993
7994   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7995
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999
8000
8001
8002   if test "$with_utf_2000" = "yes" ; then
8003     { test "$extra_verbose" = "yes" && cat << \EOF
8004     Defining CHAR_IS_UCS4
8005 EOF
8006 cat >> confdefs.h <<\EOF
8007 #define CHAR_IS_UCS4 1
8008 EOF
8009 }
8010
8011     { test "$extra_verbose" = "yes" && cat << \EOF
8012     Defining UTF2000
8013 EOF
8014 cat >> confdefs.h <<\EOF
8015 #define UTF2000 1
8016 EOF
8017 }
8018
8019   fi
8020
8021   echo "checking for Mule input methods" 1>&6
8022 echo "configure:8023: checking for Mule input methods" >&5
8023         case "$with_xim" in "" | "yes" )
8024     echo "checking for XIM" 1>&6
8025 echo "configure:8026: checking for XIM" >&5
8026     
8027 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8028 echo "configure:8029: checking for XOpenIM in -lX11" >&5
8029 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8030
8031 xe_check_libs=" -lX11 "
8032 cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035 /* Override any gcc2 internal prototype to avoid an error.  */
8036 /* We use char because int might match the return type of a gcc2
8037     builtin and then its argument prototype would still apply.  */
8038 char XOpenIM();
8039
8040 int main() {
8041 XOpenIM()
8042 ; return 0; }
8043 EOF
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8045   rm -rf conftest*
8046   eval "ac_cv_lib_$ac_lib_var=yes"
8047 else
8048   echo "configure: failed program was:" >&5
8049   cat conftest.$ac_ext >&5
8050   rm -rf conftest*
8051   eval "ac_cv_lib_$ac_lib_var=no"
8052 fi
8053 rm -f conftest*
8054 xe_check_libs=""
8055
8056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8057   echo "$ac_t""yes" 1>&6
8058   with_xim=xlib
8059 else
8060   echo "$ac_t""no" 1>&6
8061 with_xim=no
8062 fi
8063
8064
8065         if test "$have_motif $have_lesstif" = "yes no"; then
8066       
8067 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8068 echo "configure:8069: checking for XmImMbLookupString in -lXm" >&5
8069 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8070
8071 xe_check_libs=" -lXm "
8072 cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 /* Override any gcc2 internal prototype to avoid an error.  */
8076 /* We use char because int might match the return type of a gcc2
8077     builtin and then its argument prototype would still apply.  */
8078 char XmImMbLookupString();
8079
8080 int main() {
8081 XmImMbLookupString()
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   eval "ac_cv_lib_$ac_lib_var=yes"
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_lib_$ac_lib_var=no"
8092 fi
8093 rm -f conftest*
8094 xe_check_libs=""
8095
8096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8097   echo "$ac_t""yes" 1>&6
8098   with_xim=motif
8099 else
8100   echo "$ac_t""no" 1>&6
8101 fi
8102
8103
8104     fi ;;
8105   esac
8106   if test "$with_xim" != "no"; then
8107     { test "$extra_verbose" = "yes" && cat << \EOF
8108     Defining HAVE_XIM
8109 EOF
8110 cat >> confdefs.h <<\EOF
8111 #define HAVE_XIM 1
8112 EOF
8113 }
8114
8115     if test "$with_xim" = "xlib"; then
8116       { test "$extra_verbose" = "yes" && cat << \EOF
8117     Defining XIM_XLIB
8118 EOF
8119 cat >> confdefs.h <<\EOF
8120 #define XIM_XLIB 1
8121 EOF
8122 }
8123
8124       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8125    echo "    xemacs will be linked with \"input-method-xlib.o\""
8126  fi
8127     fi
8128     if test "$with_xim" = "motif"; then
8129       { test "$extra_verbose" = "yes" && cat << \EOF
8130     Defining XIM_MOTIF
8131 EOF
8132 cat >> confdefs.h <<\EOF
8133 #define XIM_MOTIF 1
8134 EOF
8135 }
8136
8137       need_motif=yes
8138       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8139    echo "    xemacs will be linked with \"input-method-motif.o\""
8140  fi
8141     fi
8142     if test "$with_xim" = "motif"; then
8143       with_xfs=no
8144     fi
8145   fi
8146
8147     if test "$with_xfs" = "yes" ; then
8148     echo "checking for XFontSet" 1>&6
8149 echo "configure:8150: checking for XFontSet" >&5
8150     
8151 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8152 echo "configure:8153: checking for XmbDrawString in -lX11" >&5
8153 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8154
8155 xe_check_libs=" -lX11 "
8156 cat > conftest.$ac_ext <<EOF
8157 #line 8158 "configure"
8158 #include "confdefs.h"
8159 /* Override any gcc2 internal prototype to avoid an error.  */
8160 /* We use char because int might match the return type of a gcc2
8161     builtin and then its argument prototype would still apply.  */
8162 char XmbDrawString();
8163
8164 int main() {
8165 XmbDrawString()
8166 ; return 0; }
8167 EOF
8168 if { (eval echo configure:8169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8169   rm -rf conftest*
8170   eval "ac_cv_lib_$ac_lib_var=yes"
8171 else
8172   echo "configure: failed program was:" >&5
8173   cat conftest.$ac_ext >&5
8174   rm -rf conftest*
8175   eval "ac_cv_lib_$ac_lib_var=no"
8176 fi
8177 rm -f conftest*
8178 xe_check_libs=""
8179
8180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8181   echo "$ac_t""yes" 1>&6
8182   :
8183 else
8184   echo "$ac_t""no" 1>&6
8185 with_xfs=no
8186 fi
8187
8188
8189     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8190       { test "$extra_verbose" = "yes" && cat << \EOF
8191     Defining USE_XFONTSET
8192 EOF
8193 cat >> confdefs.h <<\EOF
8194 #define USE_XFONTSET 1
8195 EOF
8196 }
8197
8198       if test "$with_xim" = "no" ; then
8199         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8200    echo "    xemacs will be linked with \"input-method-xfs.o\""
8201  fi
8202       fi
8203     fi
8204   fi 
8205     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8206   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8207 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8208 echo "configure:8209: checking for wnn/jllib.h" >&5
8209
8210 cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 #include <wnn/jllib.h>
8214 EOF
8215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216 { (eval echo configure:8217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8218 if test -z "$ac_err"; then
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=yes"
8221 else
8222   echo "$ac_err" >&5
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225   rm -rf conftest*
8226   eval "ac_cv_header_$ac_safe=no"
8227 fi
8228 rm -f conftest*
8229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8230   echo "$ac_t""yes" 1>&6
8231   :
8232 else
8233   echo "$ac_t""no" 1>&6
8234 with_wnn=no
8235 fi
8236  }
8237     if test "$with_wnn" != "no"; then
8238     for ac_func in crypt
8239 do
8240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8241 echo "configure:8242: checking for $ac_func" >&5
8242
8243 cat > conftest.$ac_ext <<EOF
8244 #line 8245 "configure"
8245 #include "confdefs.h"
8246 /* System header to define __stub macros and hopefully few prototypes,
8247     which can conflict with char $ac_func(); below.  */
8248 #include <assert.h>
8249 /* Override any gcc2 internal prototype to avoid an error.  */
8250 /* We use char because int might match the return type of a gcc2
8251     builtin and then its argument prototype would still apply.  */
8252 char $ac_func();
8253
8254 int main() {
8255
8256 /* The GNU C library defines this for functions which it implements
8257     to always fail with ENOSYS.  Some functions are actually named
8258     something starting with __ and the normal name is an alias.  */
8259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8260 choke me
8261 #else
8262 $ac_func();
8263 #endif
8264
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_func_$ac_func=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_func_$ac_func=no"
8275 fi
8276 rm -f conftest*
8277
8278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8279   echo "$ac_t""yes" 1>&6
8280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8281   { test "$extra_verbose" = "yes" && cat << EOF
8282     Defining $ac_tr_func
8283 EOF
8284 cat >> confdefs.h <<EOF
8285 #define $ac_tr_func 1
8286 EOF
8287 }
8288  
8289 else
8290   echo "$ac_t""no" 1>&6
8291 fi
8292 done
8293
8294     test "$ac_cv_func_crypt" != "yes" && { 
8295 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8296 echo "configure:8297: checking for crypt in -lcrypt" >&5
8297 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8298
8299 xe_check_libs=" -lcrypt "
8300 cat > conftest.$ac_ext <<EOF
8301 #line 8302 "configure"
8302 #include "confdefs.h"
8303 /* Override any gcc2 internal prototype to avoid an error.  */
8304 /* We use char because int might match the return type of a gcc2
8305     builtin and then its argument prototype would still apply.  */
8306 char crypt();
8307
8308 int main() {
8309 crypt()
8310 ; return 0; }
8311 EOF
8312 if { (eval echo configure:8313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8313   rm -rf conftest*
8314   eval "ac_cv_lib_$ac_lib_var=yes"
8315 else
8316   echo "configure: failed program was:" >&5
8317   cat conftest.$ac_ext >&5
8318   rm -rf conftest*
8319   eval "ac_cv_lib_$ac_lib_var=no"
8320 fi
8321 rm -f conftest*
8322 xe_check_libs=""
8323
8324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8325   echo "$ac_t""yes" 1>&6
8326     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8327     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8328   { test "$extra_verbose" = "yes" && cat << EOF
8329     Defining $ac_tr_lib
8330 EOF
8331 cat >> confdefs.h <<EOF
8332 #define $ac_tr_lib 1
8333 EOF
8334 }
8335
8336   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8337
8338 else
8339   echo "$ac_t""no" 1>&6
8340 fi
8341
8342  }
8343   fi
8344     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8345     
8346 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8347 echo "configure:8348: checking for jl_dic_list_e in -lwnn" >&5
8348 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8349
8350 xe_check_libs=" -lwnn "
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* Override any gcc2 internal prototype to avoid an error.  */
8355 /* We use char because int might match the return type of a gcc2
8356     builtin and then its argument prototype would still apply.  */
8357 char jl_dic_list_e();
8358
8359 int main() {
8360 jl_dic_list_e()
8361 ; return 0; }
8362 EOF
8363 if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8364   rm -rf conftest*
8365   eval "ac_cv_lib_$ac_lib_var=yes"
8366 else
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -rf conftest*
8370   eval "ac_cv_lib_$ac_lib_var=no"
8371 fi
8372 rm -f conftest*
8373 xe_check_libs=""
8374
8375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8376   echo "$ac_t""yes" 1>&6
8377   libwnn=wnn
8378 else
8379   echo "$ac_t""no" 1>&6
8380 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8381 echo "configure:8382: checking for jl_dic_list_e in -lwnn4" >&5
8382 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8383
8384 xe_check_libs=" -lwnn4 "
8385 cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388 /* Override any gcc2 internal prototype to avoid an error.  */
8389 /* We use char because int might match the return type of a gcc2
8390     builtin and then its argument prototype would still apply.  */
8391 char jl_dic_list_e();
8392
8393 int main() {
8394 jl_dic_list_e()
8395 ; return 0; }
8396 EOF
8397 if { (eval echo configure:8398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8398   rm -rf conftest*
8399   eval "ac_cv_lib_$ac_lib_var=yes"
8400 else
8401   echo "configure: failed program was:" >&5
8402   cat conftest.$ac_ext >&5
8403   rm -rf conftest*
8404   eval "ac_cv_lib_$ac_lib_var=no"
8405 fi
8406 rm -f conftest*
8407 xe_check_libs=""
8408
8409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8410   echo "$ac_t""yes" 1>&6
8411   libwnn=wnn4
8412 else
8413   echo "$ac_t""no" 1>&6
8414 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8415 echo "configure:8416: checking for jl_dic_list_e in -lwnn6" >&5
8416 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8417
8418 xe_check_libs=" -lwnn6 "
8419 cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 /* Override any gcc2 internal prototype to avoid an error.  */
8423 /* We use char because int might match the return type of a gcc2
8424     builtin and then its argument prototype would still apply.  */
8425 char jl_dic_list_e();
8426
8427 int main() {
8428 jl_dic_list_e()
8429 ; return 0; }
8430 EOF
8431 if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8432   rm -rf conftest*
8433   eval "ac_cv_lib_$ac_lib_var=yes"
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   eval "ac_cv_lib_$ac_lib_var=no"
8439 fi
8440 rm -f conftest*
8441 xe_check_libs=""
8442
8443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8444   echo "$ac_t""yes" 1>&6
8445   libwnn=wnn6
8446 else
8447   echo "$ac_t""no" 1>&6
8448 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8449 echo "configure:8450: checking for dic_list_e in -lwnn6_fromsrc" >&5
8450 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8451
8452 xe_check_libs=" -lwnn6_fromsrc "
8453 cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 /* Override any gcc2 internal prototype to avoid an error.  */
8457 /* We use char because int might match the return type of a gcc2
8458     builtin and then its argument prototype would still apply.  */
8459 char dic_list_e();
8460
8461 int main() {
8462 dic_list_e()
8463 ; return 0; }
8464 EOF
8465 if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466   rm -rf conftest*
8467   eval "ac_cv_lib_$ac_lib_var=yes"
8468 else
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   eval "ac_cv_lib_$ac_lib_var=no"
8473 fi
8474 rm -f conftest*
8475 xe_check_libs=""
8476
8477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8478   echo "$ac_t""yes" 1>&6
8479   libwnn=wnn6_fromsrc
8480 else
8481   echo "$ac_t""no" 1>&6
8482 with_wnn=no
8483 fi
8484
8485
8486 fi
8487
8488
8489 fi
8490
8491
8492 fi
8493
8494
8495   fi
8496   test -z "$with_wnn" && with_wnn=yes
8497   if test "$with_wnn" = "yes"; then
8498     { test "$extra_verbose" = "yes" && cat << \EOF
8499     Defining HAVE_WNN
8500 EOF
8501 cat >> confdefs.h <<\EOF
8502 #define HAVE_WNN 1
8503 EOF
8504 }
8505
8506     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8507     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8508    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8509  fi
8510     if test "$with_wnn6" != "no"; then
8511       
8512 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8513 echo "configure:8514: checking for jl_fi_dic_list in -l$libwnn" >&5
8514 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8515
8516 xe_check_libs=" -l$libwnn "
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 /* Override any gcc2 internal prototype to avoid an error.  */
8521 /* We use char because int might match the return type of a gcc2
8522     builtin and then its argument prototype would still apply.  */
8523 char jl_fi_dic_list();
8524
8525 int main() {
8526 jl_fi_dic_list()
8527 ; return 0; }
8528 EOF
8529 if { (eval echo configure:8530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8530   rm -rf conftest*
8531   eval "ac_cv_lib_$ac_lib_var=yes"
8532 else
8533   echo "configure: failed program was:" >&5
8534   cat conftest.$ac_ext >&5
8535   rm -rf conftest*
8536   eval "ac_cv_lib_$ac_lib_var=no"
8537 fi
8538 rm -f conftest*
8539 xe_check_libs=""
8540
8541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8542   echo "$ac_t""yes" 1>&6
8543   with_wnn6=yes
8544 else
8545   echo "$ac_t""no" 1>&6
8546 fi
8547
8548
8549       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8550     Defining WNN6
8551 EOF
8552 cat >> confdefs.h <<\EOF
8553 #define WNN6 1
8554 EOF
8555 }
8556
8557     fi
8558   fi
8559
8560     canna_includes_found=no
8561   if test "$with_canna" != "no"; then
8562     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8563 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8564 echo "configure:8565: checking for canna/jrkanji.h" >&5
8565
8566 cat > conftest.$ac_ext <<EOF
8567 #line 8568 "configure"
8568 #include "confdefs.h"
8569 #include <canna/jrkanji.h>
8570 EOF
8571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8572 { (eval echo configure:8573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8574 if test -z "$ac_err"; then
8575   rm -rf conftest*
8576   eval "ac_cv_header_$ac_safe=yes"
8577 else
8578   echo "$ac_err" >&5
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -rf conftest*
8582   eval "ac_cv_header_$ac_safe=no"
8583 fi
8584 rm -f conftest*
8585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587   canna_includes_found=yes
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591
8592   fi
8593   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8594       -d "/usr/local/canna/include"; then
8595     save_c_switch_site="$c_switch_site"
8596     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8597     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8598 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8599 echo "configure:8600: checking for canna/jrkanji.h" >&5
8600
8601 cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 #include <canna/jrkanji.h>
8605 EOF
8606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8607 { (eval echo configure:8608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8609 if test -z "$ac_err"; then
8610   rm -rf conftest*
8611   eval "ac_cv_header_$ac_safe=yes"
8612 else
8613   echo "$ac_err" >&5
8614   echo "configure: failed program was:" >&5
8615   cat conftest.$ac_ext >&5
8616   rm -rf conftest*
8617   eval "ac_cv_header_$ac_safe=no"
8618 fi
8619 rm -f conftest*
8620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8621   echo "$ac_t""yes" 1>&6
8622   canna_includes_found=yes
8623 else
8624   echo "$ac_t""no" 1>&6
8625 fi
8626
8627     if test "$canna_includes_found" != "yes"; then
8628       c_switch_site="$save_c_switch_site"
8629       with_canna="no"
8630     fi
8631   fi
8632
8633   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8634 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8635 echo "configure:8636: checking for canna/RK.h" >&5
8636
8637 cat > conftest.$ac_ext <<EOF
8638 #line 8639 "configure"
8639 #include "confdefs.h"
8640 #include <canna/RK.h>
8641 EOF
8642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8643 { (eval echo configure:8644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8645 if test -z "$ac_err"; then
8646   rm -rf conftest*
8647   eval "ac_cv_header_$ac_safe=yes"
8648 else
8649   echo "$ac_err" >&5
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_header_$ac_safe=no"
8654 fi
8655 rm -f conftest*
8656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8657   echo "$ac_t""yes" 1>&6
8658   :
8659 else
8660   echo "$ac_t""no" 1>&6
8661 with_canna=no
8662 fi
8663  }
8664   test -z "$with_canna" && { 
8665 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8666 echo "configure:8667: checking for RkBgnBun in -lRKC" >&5
8667 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8668
8669 xe_check_libs=" -lRKC "
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char RkBgnBun();
8677
8678 int main() {
8679 RkBgnBun()
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683   rm -rf conftest*
8684   eval "ac_cv_lib_$ac_lib_var=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=no"
8690 fi
8691 rm -f conftest*
8692 xe_check_libs=""
8693
8694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8695   echo "$ac_t""yes" 1>&6
8696   :
8697 else
8698   echo "$ac_t""no" 1>&6
8699 with_canna=no
8700 fi
8701
8702  }
8703   test -z "$with_canna" && { 
8704 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8705 echo "configure:8706: checking for jrKanjiControl in -lcanna" >&5
8706 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8707
8708 xe_check_libs=" -lcanna "
8709 cat > conftest.$ac_ext <<EOF
8710 #line 8711 "configure"
8711 #include "confdefs.h"
8712 /* Override any gcc2 internal prototype to avoid an error.  */
8713 /* We use char because int might match the return type of a gcc2
8714     builtin and then its argument prototype would still apply.  */
8715 char jrKanjiControl();
8716
8717 int main() {
8718 jrKanjiControl()
8719 ; return 0; }
8720 EOF
8721 if { (eval echo configure:8722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8722   rm -rf conftest*
8723   eval "ac_cv_lib_$ac_lib_var=yes"
8724 else
8725   echo "configure: failed program was:" >&5
8726   cat conftest.$ac_ext >&5
8727   rm -rf conftest*
8728   eval "ac_cv_lib_$ac_lib_var=no"
8729 fi
8730 rm -f conftest*
8731 xe_check_libs=""
8732
8733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8734   echo "$ac_t""yes" 1>&6
8735   :
8736 else
8737   echo "$ac_t""no" 1>&6
8738 with_canna=no
8739 fi
8740
8741  }
8742   test -z "$with_canna" && with_canna=yes
8743   if test "$with_canna" = "yes"; then
8744     { test "$extra_verbose" = "yes" && cat << \EOF
8745     Defining HAVE_CANNA
8746 EOF
8747 cat >> confdefs.h <<\EOF
8748 #define HAVE_CANNA 1
8749 EOF
8750 }
8751
8752     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8753     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8754    echo "    xemacs will be linked with \"mule-canna.o\""
8755  fi
8756   fi
8757
8758 else   for feature in xim canna wnn; do
8759     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8760       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8761     fi
8762     eval "with_${feature}=no"
8763   done
8764 fi 
8765
8766 if test "$need_motif" = "yes" ; then
8767   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8768     
8769 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8770 echo "configure:8771: checking for layout_object_getvalue in -li18n" >&5
8771 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8772
8773 xe_check_libs=" -li18n "
8774 cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 /* Override any gcc2 internal prototype to avoid an error.  */
8778 /* We use char because int might match the return type of a gcc2
8779     builtin and then its argument prototype would still apply.  */
8780 char layout_object_getvalue();
8781
8782 int main() {
8783 layout_object_getvalue()
8784 ; return 0; }
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8787   rm -rf conftest*
8788   eval "ac_cv_lib_$ac_lib_var=yes"
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   eval "ac_cv_lib_$ac_lib_var=no"
8794 fi
8795 rm -f conftest*
8796 xe_check_libs=""
8797
8798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8799   echo "$ac_t""yes" 1>&6
8800   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8801 else
8802   echo "$ac_t""no" 1>&6
8803 fi
8804
8805
8806   
8807 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8808     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8809   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8810   
8811         runpath="" runpath_dirs=""
8812   if test -n "$LD_RUN_PATH"; then
8813     runpath="$LD_RUN_PATH"
8814   elif test "$GCC" = "yes"; then
8815         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8816     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8817     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8818     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8819       case "$arg" in P,* | -L* | -R* )
8820         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8821           {
8822 xe_runpath_dir="$dir"
8823   test "$xe_runpath_dir" != "/lib"     -a \
8824         "$xe_runpath_dir" != "/usr/lib" -a \
8825         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8826   eval "$xe_add_unique_runpath_dir"
8827 }
8828         done ;;
8829       esac
8830     done
8831     ld_switch_run="$ld_switch_run_save"
8832     rm -f conftest*
8833   else
8834         for arg in $ld_switch_site $ld_switch_x_site; do
8835       case "$arg" in -L*) {
8836 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8837   test "$xe_runpath_dir" != "/lib"     -a \
8838         "$xe_runpath_dir" != "/usr/lib" -a \
8839         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8840   eval "$xe_add_unique_runpath_dir"
8841 };; esac
8842     done
8843         if test "$opsys $need_motif" = "sol2 yes"; then
8844       xe_runpath_dir="/opt/SUNWdt/lib";
8845       eval "$xe_add_unique_runpath_dir";
8846     fi
8847   fi 
8848   if test -n "$runpath"; then
8849     ld_switch_run="${dash_r}${runpath}"
8850     
8851 if test "$GCC" = "yes"; then
8852   set x $ld_switch_run; shift; ld_switch_run=""
8853   while test -n "$1"; do
8854     case $1 in
8855       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8856       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8857       -Xlinker* ) ;;
8858       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8859     esac
8860     shift
8861   done
8862 fi
8863     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8864   fi
8865 fi
8866
8867 fi
8868
8869 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
8870 do
8871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8872 echo "configure:8873: checking for $ac_func" >&5
8873
8874 cat > conftest.$ac_ext <<EOF
8875 #line 8876 "configure"
8876 #include "confdefs.h"
8877 /* System header to define __stub macros and hopefully few prototypes,
8878     which can conflict with char $ac_func(); below.  */
8879 #include <assert.h>
8880 /* Override any gcc2 internal prototype to avoid an error.  */
8881 /* We use char because int might match the return type of a gcc2
8882     builtin and then its argument prototype would still apply.  */
8883 char $ac_func();
8884
8885 int main() {
8886
8887 /* The GNU C library defines this for functions which it implements
8888     to always fail with ENOSYS.  Some functions are actually named
8889     something starting with __ and the normal name is an alias.  */
8890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8891 choke me
8892 #else
8893 $ac_func();
8894 #endif
8895
8896 ; return 0; }
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8899   rm -rf conftest*
8900   eval "ac_cv_func_$ac_func=yes"
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -rf conftest*
8905   eval "ac_cv_func_$ac_func=no"
8906 fi
8907 rm -f conftest*
8908
8909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8910   echo "$ac_t""yes" 1>&6
8911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8912   { test "$extra_verbose" = "yes" && cat << EOF
8913     Defining $ac_tr_func
8914 EOF
8915 cat >> confdefs.h <<EOF
8916 #define $ac_tr_func 1
8917 EOF
8918 }
8919  
8920 else
8921   echo "$ac_t""no" 1>&6
8922 fi
8923 done
8924
8925
8926
8927 case "$opsys" in
8928   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8929    echo "    xemacs will be linked with \"realpath.o\""
8930  fi ;;
8931   * )
8932     case "$canonical" in
8933       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8934    echo "    xemacs will be linked with \"realpath.o\""
8935  fi ;;
8936       * ) for ac_func in realpath
8937 do
8938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8939 echo "configure:8940: checking for $ac_func" >&5
8940
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 /* System header to define __stub macros and hopefully few prototypes,
8945     which can conflict with char $ac_func(); below.  */
8946 #include <assert.h>
8947 /* Override any gcc2 internal prototype to avoid an error.  */
8948 /* We use char because int might match the return type of a gcc2
8949     builtin and then its argument prototype would still apply.  */
8950 char $ac_func();
8951
8952 int main() {
8953
8954 /* The GNU C library defines this for functions which it implements
8955     to always fail with ENOSYS.  Some functions are actually named
8956     something starting with __ and the normal name is an alias.  */
8957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8958 choke me
8959 #else
8960 $ac_func();
8961 #endif
8962
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   eval "ac_cv_func_$ac_func=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_func_$ac_func=no"
8973 fi
8974 rm -f conftest*
8975
8976 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8979   { test "$extra_verbose" = "yes" && cat << EOF
8980     Defining $ac_tr_func
8981 EOF
8982 cat >> confdefs.h <<EOF
8983 #define $ac_tr_func 1
8984 EOF
8985 }
8986  
8987 else
8988   echo "$ac_t""no" 1>&6
8989 fi
8990 done
8991
8992           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8993    echo "    xemacs will be linked with \"realpath.o\""
8994  fi ;;
8995     esac ;;
8996 esac
8997
8998 for ac_func in getloadavg
8999 do
9000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9001 echo "configure:9002: checking for $ac_func" >&5
9002
9003 cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* System header to define __stub macros and hopefully few prototypes,
9007     which can conflict with char $ac_func(); below.  */
9008 #include <assert.h>
9009 /* Override any gcc2 internal prototype to avoid an error.  */
9010 /* We use char because int might match the return type of a gcc2
9011     builtin and then its argument prototype would still apply.  */
9012 char $ac_func();
9013
9014 int main() {
9015
9016 /* The GNU C library defines this for functions which it implements
9017     to always fail with ENOSYS.  Some functions are actually named
9018     something starting with __ and the normal name is an alias.  */
9019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9020 choke me
9021 #else
9022 $ac_func();
9023 #endif
9024
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9028   rm -rf conftest*
9029   eval "ac_cv_func_$ac_func=yes"
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_func_$ac_func=no"
9035 fi
9036 rm -f conftest*
9037
9038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9039   echo "$ac_t""yes" 1>&6
9040     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9041   { test "$extra_verbose" = "yes" && cat << EOF
9042     Defining $ac_tr_func
9043 EOF
9044 cat >> confdefs.h <<EOF
9045 #define $ac_tr_func 1
9046 EOF
9047 }
9048  
9049 else
9050   echo "$ac_t""no" 1>&6
9051 fi
9052 done
9053
9054
9055 if test "$ac_cv_func_getloadavg" != "yes"
9056 then
9057   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9058    echo "    xemacs will be linked with \"getloadavg.o\""
9059  fi
9060
9061     
9062 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9063 echo "configure:9064: checking for kstat_open in -lkstat" >&5
9064 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9065
9066 xe_check_libs=" -lkstat "
9067 cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 /* Override any gcc2 internal prototype to avoid an error.  */
9071 /* We use char because int might match the return type of a gcc2
9072     builtin and then its argument prototype would still apply.  */
9073 char kstat_open();
9074
9075 int main() {
9076 kstat_open()
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   eval "ac_cv_lib_$ac_lib_var=yes"
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_lib_$ac_lib_var=no"
9087 fi
9088 rm -f conftest*
9089 xe_check_libs=""
9090
9091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9092   echo "$ac_t""yes" 1>&6
9093     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9094     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9095   { test "$extra_verbose" = "yes" && cat << EOF
9096     Defining $ac_tr_lib
9097 EOF
9098 cat >> confdefs.h <<EOF
9099 #define $ac_tr_lib 1
9100 EOF
9101 }
9102
9103   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9104
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109
9110
9111     
9112 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9113 echo "configure:9114: checking for kvm_read in -lkvm" >&5
9114 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9115
9116 xe_check_libs=" -lkvm "
9117 cat > conftest.$ac_ext <<EOF
9118 #line 9119 "configure"
9119 #include "confdefs.h"
9120 /* Override any gcc2 internal prototype to avoid an error.  */
9121 /* We use char because int might match the return type of a gcc2
9122     builtin and then its argument prototype would still apply.  */
9123 char kvm_read();
9124
9125 int main() {
9126 kvm_read()
9127 ; return 0; }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9130   rm -rf conftest*
9131   eval "ac_cv_lib_$ac_lib_var=yes"
9132 else
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   eval "ac_cv_lib_$ac_lib_var=no"
9137 fi
9138 rm -f conftest*
9139 xe_check_libs=""
9140
9141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9142   echo "$ac_t""yes" 1>&6
9143     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9145   { test "$extra_verbose" = "yes" && cat << EOF
9146     Defining $ac_tr_lib
9147 EOF
9148 cat >> confdefs.h <<EOF
9149 #define $ac_tr_lib 1
9150 EOF
9151 }
9152
9153   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9154
9155 else
9156   echo "$ac_t""no" 1>&6
9157 fi
9158
9159
9160 fi
9161
9162 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9163 echo "configure:9164: checking whether netdb declares h_errno" >&5
9164 cat > conftest.$ac_ext <<EOF
9165 #line 9166 "configure"
9166 #include "confdefs.h"
9167 #include <netdb.h>
9168 int main() {
9169 return h_errno;
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9173   rm -rf conftest*
9174   echo "$ac_t""yes" 1>&6
9175    { test "$extra_verbose" = "yes" && cat << \EOF
9176     Defining HAVE_H_ERRNO
9177 EOF
9178 cat >> confdefs.h <<\EOF
9179 #define HAVE_H_ERRNO 1
9180 EOF
9181 }
9182
9183 else
9184   echo "configure: failed program was:" >&5
9185   cat conftest.$ac_ext >&5
9186   rm -rf conftest*
9187   echo "$ac_t""no" 1>&6
9188 fi
9189 rm -f conftest*
9190
9191 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9192 echo "configure:9193: checking for sigsetjmp" >&5
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <setjmp.h>
9197 int main() {
9198 sigjmp_buf bar; sigsetjmp (bar, 0);
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9202   rm -rf conftest*
9203   echo "$ac_t""yes" 1>&6
9204    { test "$extra_verbose" = "yes" && cat << \EOF
9205     Defining HAVE_SIGSETJMP
9206 EOF
9207 cat >> confdefs.h <<\EOF
9208 #define HAVE_SIGSETJMP 1
9209 EOF
9210 }
9211
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   echo "$ac_t""no" 1>&6
9217 fi
9218 rm -f conftest*
9219
9220 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9221 echo "configure:9222: checking whether localtime caches TZ" >&5
9222
9223 if test "$ac_cv_func_tzset" = "yes"; then
9224 cat > conftest.$ac_ext <<EOF
9225 #line 9226 "configure"
9226 #include "confdefs.h"
9227 #include <time.h>
9228 #if STDC_HEADERS
9229 # include <stdlib.h>
9230 #endif
9231 extern char **environ;
9232 unset_TZ ()
9233 {
9234   char **from, **to;
9235   for (to = from = environ; (*to = *from); from++)
9236     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9237       to++;
9238 }
9239 char TZ_GMT0[] = "TZ=GMT0";
9240 char TZ_PST8[] = "TZ=PST8";
9241 main()
9242 {
9243   time_t now = time ((time_t *) 0);
9244   int hour_GMT0, hour_unset;
9245   if (putenv (TZ_GMT0) != 0)
9246     exit (1);
9247   hour_GMT0 = localtime (&now)->tm_hour;
9248   unset_TZ ();
9249   hour_unset = localtime (&now)->tm_hour;
9250   if (putenv (TZ_PST8) != 0)
9251     exit (1);
9252   if (localtime (&now)->tm_hour == hour_GMT0)
9253     exit (1);
9254   unset_TZ ();
9255   if (localtime (&now)->tm_hour != hour_unset)
9256     exit (1);
9257   exit (0);
9258 }
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9261 then
9262   emacs_cv_localtime_cache=no
9263 else
9264   conftest_rc="$?"
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -fr conftest*
9268   emacs_cv_localtime_cache=yes
9269 fi
9270 rm -fr conftest*
9271 else
9272         # If we lack tzset, report that localtime does not cache TZ,
9273         # since we can't invalidate the cache if we don't have tzset.
9274         emacs_cv_localtime_cache=no
9275 fi
9276 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9277 if test $emacs_cv_localtime_cache = yes; then
9278   { test "$extra_verbose" = "yes" && cat << \EOF
9279     Defining LOCALTIME_CACHE
9280 EOF
9281 cat >> confdefs.h <<\EOF
9282 #define LOCALTIME_CACHE 1
9283 EOF
9284 }
9285
9286 fi
9287
9288 if test "$HAVE_TIMEVAL" = "yes"; then
9289 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9290 echo "configure:9291: checking whether gettimeofday accepts one or two arguments" >&5
9291 cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294
9295 #ifdef TIME_WITH_SYS_TIME
9296 #include <sys/time.h>
9297 #include <time.h>
9298 #else
9299 #ifdef HAVE_SYS_TIME_H
9300 #include <sys/time.h>
9301 #else
9302 #include <time.h>
9303 #endif
9304 #endif
9305   
9306 int main() {
9307
9308   struct timeval time;
9309   struct timezone dummy;
9310   gettimeofday (&time, &dummy);
9311
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   echo "$ac_t""two" 1>&6
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   echo "$ac_t""one" 1>&6
9322    { test "$extra_verbose" = "yes" && cat << \EOF
9323     Defining GETTIMEOFDAY_ONE_ARGUMENT
9324 EOF
9325 cat >> confdefs.h <<\EOF
9326 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9327 EOF
9328 }
9329
9330 fi
9331 rm -f conftest*
9332 fi
9333
9334
9335 echo $ac_n "checking for inline""... $ac_c" 1>&6
9336 echo "configure:9337: checking for inline" >&5
9337
9338 ac_cv_c_inline=no
9339 for ac_kw in inline __inline__ __inline; do
9340   cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 int main() {
9345 } $ac_kw foo() {
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9349   rm -rf conftest*
9350   ac_cv_c_inline=$ac_kw; break
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354 fi
9355 rm -f conftest*
9356 done
9357
9358
9359 echo "$ac_t""$ac_cv_c_inline" 1>&6
9360 case "$ac_cv_c_inline" in
9361   inline | yes) ;;
9362   no) { test "$extra_verbose" = "yes" && cat << \EOF
9363     Defining inline = 
9364 EOF
9365 cat >> confdefs.h <<\EOF
9366 #define inline 
9367 EOF
9368 }
9369  ;;
9370   *)  { test "$extra_verbose" = "yes" && cat << EOF
9371     Defining inline = $ac_cv_c_inline
9372 EOF
9373 cat >> confdefs.h <<EOF
9374 #define inline $ac_cv_c_inline
9375 EOF
9376 }
9377  ;;
9378 esac
9379
9380 if test "$ac_cv_c_inline" != "no"; then
9381   { test "$extra_verbose" = "yes" && cat << \EOF
9382     Defining HAVE_INLINE
9383 EOF
9384 cat >> confdefs.h <<\EOF
9385 #define HAVE_INLINE 1
9386 EOF
9387 }
9388
9389   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9390    echo "    xemacs will be linked with \"inline.o\""
9391  fi
9392 fi
9393
9394
9395 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9396 # for constant arguments.  Useless!
9397 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9398 echo "configure:9399: checking for working alloca.h" >&5
9399
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 #include <alloca.h>
9404 int main() {
9405 char *p = alloca(2 * sizeof(int));
9406 ; return 0; }
9407 EOF
9408 if { (eval echo configure:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9409   rm -rf conftest*
9410   ac_cv_header_alloca_h=yes
9411 else
9412   echo "configure: failed program was:" >&5
9413   cat conftest.$ac_ext >&5
9414   rm -rf conftest*
9415   ac_cv_header_alloca_h=no
9416 fi
9417 rm -f conftest*
9418
9419 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9420 if test $ac_cv_header_alloca_h = yes; then
9421   { test "$extra_verbose" = "yes" && cat << \EOF
9422     Defining HAVE_ALLOCA_H
9423 EOF
9424 cat >> confdefs.h <<\EOF
9425 #define HAVE_ALLOCA_H 1
9426 EOF
9427 }
9428
9429 fi
9430
9431 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9432 echo "configure:9433: checking for alloca" >&5
9433
9434 cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437
9438 #ifdef __GNUC__
9439 # define alloca __builtin_alloca
9440 #else
9441 # ifdef _MSC_VER
9442 #  include <malloc.h>
9443 #  define alloca _alloca
9444 # else
9445 #  if HAVE_ALLOCA_H
9446 #   include <alloca.h>
9447 #  else
9448 #   ifdef _AIX
9449  #pragma alloca
9450 #   else
9451 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9452 char *alloca ();
9453 #    endif
9454 #   endif
9455 #  endif
9456 # endif
9457 #endif
9458
9459 int main() {
9460 char *p = (char *) alloca(1);
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9464   rm -rf conftest*
9465   ac_cv_func_alloca_works=yes
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   ac_cv_func_alloca_works=no
9471 fi
9472 rm -f conftest*
9473
9474 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9475 if test $ac_cv_func_alloca_works = yes; then
9476   { test "$extra_verbose" = "yes" && cat << \EOF
9477     Defining HAVE_ALLOCA
9478 EOF
9479 cat >> confdefs.h <<\EOF
9480 #define HAVE_ALLOCA 1
9481 EOF
9482 }
9483
9484 fi
9485
9486 if test $ac_cv_func_alloca_works = no; then
9487   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9488   # that cause trouble.  Some versions do not even contain alloca or
9489   # contain a buggy version.  If you still want to use their alloca,
9490   # use ar to extract alloca.o from them instead of compiling alloca.c.
9491   ALLOCA=alloca.${ac_objext}
9492   { test "$extra_verbose" = "yes" && cat << \EOF
9493     Defining C_ALLOCA
9494 EOF
9495 cat >> confdefs.h <<\EOF
9496 #define C_ALLOCA 1
9497 EOF
9498 }
9499
9500
9501 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9502 echo "configure:9503: checking whether alloca needs Cray hooks" >&5
9503
9504 cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 #if defined(CRAY) && ! defined(CRAY2)
9508 webecray
9509 #else
9510 wenotbecray
9511 #endif
9512
9513 EOF
9514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9515   egrep "webecray" >/dev/null 2>&1; then
9516   rm -rf conftest*
9517   ac_cv_os_cray=yes
9518 else
9519   rm -rf conftest*
9520   ac_cv_os_cray=no
9521 fi
9522 rm -f conftest*
9523
9524
9525 echo "$ac_t""$ac_cv_os_cray" 1>&6
9526 if test $ac_cv_os_cray = yes; then
9527 for ac_func in _getb67 GETB67 getb67; do
9528   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9529 echo "configure:9530: checking for $ac_func" >&5
9530
9531 cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 /* System header to define __stub macros and hopefully few prototypes,
9535     which can conflict with char $ac_func(); below.  */
9536 #include <assert.h>
9537 /* Override any gcc2 internal prototype to avoid an error.  */
9538 /* We use char because int might match the return type of a gcc2
9539     builtin and then its argument prototype would still apply.  */
9540 char $ac_func();
9541
9542 int main() {
9543
9544 /* The GNU C library defines this for functions which it implements
9545     to always fail with ENOSYS.  Some functions are actually named
9546     something starting with __ and the normal name is an alias.  */
9547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9548 choke me
9549 #else
9550 $ac_func();
9551 #endif
9552
9553 ; return 0; }
9554 EOF
9555 if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9556   rm -rf conftest*
9557   eval "ac_cv_func_$ac_func=yes"
9558 else
9559   echo "configure: failed program was:" >&5
9560   cat conftest.$ac_ext >&5
9561   rm -rf conftest*
9562   eval "ac_cv_func_$ac_func=no"
9563 fi
9564 rm -f conftest*
9565
9566 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9567   echo "$ac_t""yes" 1>&6
9568   { test "$extra_verbose" = "yes" && cat << EOF
9569     Defining CRAY_STACKSEG_END = $ac_func
9570 EOF
9571 cat >> confdefs.h <<EOF
9572 #define CRAY_STACKSEG_END $ac_func
9573 EOF
9574 }
9575
9576   break
9577 else
9578   echo "$ac_t""no" 1>&6
9579 fi
9580
9581 done
9582 fi
9583
9584 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9585 echo "configure:9586: checking stack direction for C alloca" >&5
9586
9587 cat > conftest.$ac_ext <<EOF
9588 #line 9589 "configure"
9589 #include "confdefs.h"
9590 find_stack_direction ()
9591 {
9592   static char *addr = 0;
9593   auto char dummy;
9594   if (addr == 0)
9595     {
9596       addr = &dummy;
9597       return find_stack_direction ();
9598     }
9599   else
9600     return (&dummy > addr) ? 1 : -1;
9601 }
9602 main ()
9603 {
9604   exit (find_stack_direction() < 0);
9605 }
9606 EOF
9607 if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9608 then
9609   ac_cv_c_stack_direction=1
9610 else
9611   conftest_rc="$?"
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614   rm -fr conftest*
9615   ac_cv_c_stack_direction=-1
9616 fi
9617 rm -fr conftest*
9618
9619 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9620 { test "$extra_verbose" = "yes" && cat << EOF
9621     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9622 EOF
9623 cat >> confdefs.h <<EOF
9624 #define STACK_DIRECTION $ac_cv_c_stack_direction
9625 EOF
9626 }
9627
9628 fi
9629
9630 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9631    echo "    xemacs will be linked with \"$ALLOCA\""
9632  fi
9633
9634 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9635 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9636 echo "configure:9637: checking for vfork.h" >&5
9637
9638 cat > conftest.$ac_ext <<EOF
9639 #line 9640 "configure"
9640 #include "confdefs.h"
9641 #include <vfork.h>
9642 EOF
9643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9644 { (eval echo configure:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9646 if test -z "$ac_err"; then
9647   rm -rf conftest*
9648   eval "ac_cv_header_$ac_safe=yes"
9649 else
9650   echo "$ac_err" >&5
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653   rm -rf conftest*
9654   eval "ac_cv_header_$ac_safe=no"
9655 fi
9656 rm -f conftest*
9657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9658   echo "$ac_t""yes" 1>&6
9659   { test "$extra_verbose" = "yes" && cat << \EOF
9660     Defining HAVE_VFORK_H
9661 EOF
9662 cat >> confdefs.h <<\EOF
9663 #define HAVE_VFORK_H 1
9664 EOF
9665 }
9666
9667 else
9668   echo "$ac_t""no" 1>&6
9669 fi
9670
9671 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9672 echo "configure:9673: checking for working vfork" >&5
9673
9674 cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 /* Thanks to Paul Eggert for this test.  */
9678 #include <stdio.h>
9679 #include <sys/types.h>
9680 #include <sys/stat.h>
9681 #ifdef HAVE_UNISTD_H
9682 #include <unistd.h>
9683 #endif
9684 #ifdef HAVE_VFORK_H
9685 #include <vfork.h>
9686 #endif
9687 /* On some sparc systems, changes by the child to local and incoming
9688    argument registers are propagated back to the parent.
9689    The compiler is told about this with #include <vfork.h>,
9690    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9691    Test for this by using a static variable whose address
9692    is put into a register that is clobbered by the vfork.  */
9693 static
9694 #ifdef __cplusplus
9695 sparc_address_test (int arg)
9696 #else
9697 sparc_address_test (arg) int arg;
9698 #endif
9699 {
9700   static pid_t child;
9701   if (!child) {
9702     child = vfork ();
9703     if (child < 0) {
9704       perror ("vfork");
9705       _exit(2);
9706     }
9707     if (!child) {
9708       arg = getpid();
9709       write(-1, "", 0);
9710       _exit (arg);
9711     }
9712   }
9713 }
9714 main() {
9715   pid_t parent = getpid ();
9716   pid_t child;
9717
9718   sparc_address_test ();
9719
9720   child = vfork ();
9721
9722   if (child == 0) {
9723     /* Here is another test for sparc vfork register problems.
9724        This test uses lots of local variables, at least
9725        as many local variables as main has allocated so far
9726        including compiler temporaries.  4 locals are enough for
9727        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9728        A buggy compiler should reuse the register of parent
9729        for one of the local variables, since it will think that
9730        parent can't possibly be used any more in this routine.
9731        Assigning to the local variable will thus munge parent
9732        in the parent process.  */
9733     pid_t
9734       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9735       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9736     /* Convince the compiler that p..p7 are live; otherwise, it might
9737        use the same hardware register for all 8 local variables.  */
9738     if (p != p1 || p != p2 || p != p3 || p != p4
9739         || p != p5 || p != p6 || p != p7)
9740       _exit(1);
9741
9742     /* On some systems (e.g. IRIX 3.3),
9743        vfork doesn't separate parent from child file descriptors.
9744        If the child closes a descriptor before it execs or exits,
9745        this munges the parent's descriptor as well.
9746        Test for this by closing stdout in the child.  */
9747     _exit(close(fileno(stdout)) != 0);
9748   } else {
9749     int status;
9750     struct stat st;
9751
9752     while (wait(&status) != child)
9753       ;
9754     exit(
9755          /* Was there some problem with vforking?  */
9756          child < 0
9757
9758          /* Did the child fail?  (This shouldn't happen.)  */
9759          || status
9760
9761          /* Did the vfork/compiler bug occur?  */
9762          || parent != getpid()
9763
9764          /* Did the file descriptor bug occur?  */
9765          || fstat(fileno(stdout), &st) != 0
9766          );
9767   }
9768 }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9771 then
9772   ac_cv_func_vfork_works=yes
9773 else
9774   conftest_rc="$?"
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -fr conftest*
9778   ac_cv_func_vfork_works=no
9779 fi
9780 rm -fr conftest*
9781
9782 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9783 if test $ac_cv_func_vfork_works = no; then
9784   { test "$extra_verbose" = "yes" && cat << \EOF
9785     Defining vfork = fork
9786 EOF
9787 cat >> confdefs.h <<\EOF
9788 #define vfork fork
9789 EOF
9790 }
9791
9792 fi
9793
9794
9795 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9796 echo "configure:9797: checking for working strcoll" >&5
9797
9798 cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 #include <string.h>
9802 main ()
9803 {
9804   exit (strcoll ("abc", "def") >= 0 ||
9805         strcoll ("ABC", "DEF") >= 0 ||
9806         strcoll ("123", "456") >= 0);
9807 }
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9810 then
9811   ac_cv_func_strcoll_works=yes
9812 else
9813   conftest_rc="$?"
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816   rm -fr conftest*
9817   ac_cv_func_strcoll_works=no
9818 fi
9819 rm -fr conftest*
9820
9821 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9822 if test $ac_cv_func_strcoll_works = yes; then
9823   { test "$extra_verbose" = "yes" && cat << \EOF
9824     Defining HAVE_STRCOLL
9825 EOF
9826 cat >> confdefs.h <<\EOF
9827 #define HAVE_STRCOLL 1
9828 EOF
9829 }
9830
9831 fi
9832
9833
9834 for ac_func in getpgrp
9835 do
9836 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9837 echo "configure:9838: checking for $ac_func" >&5
9838
9839 cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 /* System header to define __stub macros and hopefully few prototypes,
9843     which can conflict with char $ac_func(); below.  */
9844 #include <assert.h>
9845 /* Override any gcc2 internal prototype to avoid an error.  */
9846 /* We use char because int might match the return type of a gcc2
9847     builtin and then its argument prototype would still apply.  */
9848 char $ac_func();
9849
9850 int main() {
9851
9852 /* The GNU C library defines this for functions which it implements
9853     to always fail with ENOSYS.  Some functions are actually named
9854     something starting with __ and the normal name is an alias.  */
9855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9856 choke me
9857 #else
9858 $ac_func();
9859 #endif
9860
9861 ; return 0; }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9864   rm -rf conftest*
9865   eval "ac_cv_func_$ac_func=yes"
9866 else
9867   echo "configure: failed program was:" >&5
9868   cat conftest.$ac_ext >&5
9869   rm -rf conftest*
9870   eval "ac_cv_func_$ac_func=no"
9871 fi
9872 rm -f conftest*
9873
9874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9875   echo "$ac_t""yes" 1>&6
9876     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9877   { test "$extra_verbose" = "yes" && cat << EOF
9878     Defining $ac_tr_func
9879 EOF
9880 cat >> confdefs.h <<EOF
9881 #define $ac_tr_func 1
9882 EOF
9883 }
9884  
9885 else
9886   echo "$ac_t""no" 1>&6
9887 fi
9888 done
9889
9890 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9891 echo "configure:9892: checking whether getpgrp takes no argument" >&5
9892
9893 cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896
9897 /*
9898  * If this system has a BSD-style getpgrp(),
9899  * which takes a pid argument, exit unsuccessfully.
9900  *
9901  * Snarfed from Chet Ramey's bash pgrp.c test program
9902  */
9903 #include <stdio.h>
9904 #include <sys/types.h>
9905
9906 int     pid;
9907 int     pg1, pg2, pg3, pg4;
9908 int     ng, np, s, child;
9909
9910 main()
9911 {
9912         pid = getpid();
9913         pg1 = getpgrp(0);
9914         pg2 = getpgrp();
9915         pg3 = getpgrp(pid);
9916         pg4 = getpgrp(1);
9917
9918         /*
9919          * If all of these values are the same, it's pretty sure that
9920          * we're on a system that ignores getpgrp's first argument.
9921          */
9922         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9923                 exit(0);
9924
9925         child = fork();
9926         if (child < 0)
9927                 exit(1);
9928         else if (child == 0) {
9929                 np = getpid();
9930                 /*
9931                  * If this is Sys V, this will not work; pgrp will be
9932                  * set to np because setpgrp just changes a pgrp to be
9933                  * the same as the pid.
9934                  */
9935                 setpgrp(np, pg1);
9936                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9937                 if (ng == pg1) {
9938                         exit(1);
9939                 } else {
9940                         exit(0);
9941                 }
9942         } else {
9943                 wait(&s);
9944                 exit(s>>8);
9945         }
9946 }
9947
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9950 then
9951   ac_cv_func_getpgrp_void=yes
9952 else
9953   conftest_rc="$?"
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -fr conftest*
9957   ac_cv_func_getpgrp_void=no
9958 fi
9959 rm -fr conftest*
9960
9961
9962 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9963 if test $ac_cv_func_getpgrp_void = yes; then
9964   { test "$extra_verbose" = "yes" && cat << \EOF
9965     Defining GETPGRP_VOID
9966 EOF
9967 cat >> confdefs.h <<\EOF
9968 #define GETPGRP_VOID 1
9969 EOF
9970 }
9971
9972 fi
9973
9974
9975 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9976 echo "configure:9977: checking for working mmap" >&5
9977 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9978 cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981 #include <stdio.h>
9982 #include <unistd.h>
9983 #include <fcntl.h>
9984 #include <sys/mman.h>
9985
9986 #ifndef MAP_VARIABLE
9987 #define MAP_VARIABLE 0
9988 #endif
9989
9990 #ifndef MAP_FAILED
9991 #define MAP_FAILED -1
9992 #endif
9993
9994 int main (int argc, char *argv[])
9995 {
9996   int fd = -1;
9997   caddr_t p;
9998 #ifndef MAP_ANONYMOUS
9999   fd = open ("/dev/zero", O_RDWR);
10000   if (fd < 0)
10001     return 1;
10002 #define MAP_ANONYMOUS 0
10003 #endif
10004   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10005            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10006            fd, 0) != (void *) MAP_FAILED)
10007     return 0;
10008   perror ("conftest: mmap failed");
10009   return 1;
10010 }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10013 then
10014   have_mmap=yes
10015 else
10016   conftest_rc="$?"
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -fr conftest*
10020   have_mmap=no
10021 fi
10022 rm -fr conftest* ;;
10023 esac
10024 echo "$ac_t""$have_mmap" 1>&6
10025 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10026     Defining HAVE_MMAP
10027 EOF
10028 cat >> confdefs.h <<\EOF
10029 #define HAVE_MMAP 1
10030 EOF
10031 }
10032
10033
10034 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10035 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10036 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10037     Defining REL_ALLOC
10038 EOF
10039 cat >> confdefs.h <<\EOF
10040 #define REL_ALLOC 1
10041 EOF
10042 }
10043
10044
10045 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10046 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10047 echo "configure:10048: checking for termios.h" >&5
10048
10049 cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 #include <termios.h>
10053 EOF
10054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10055 { (eval echo configure:10056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10057 if test -z "$ac_err"; then
10058   rm -rf conftest*
10059   eval "ac_cv_header_$ac_safe=yes"
10060 else
10061   echo "$ac_err" >&5
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   eval "ac_cv_header_$ac_safe=no"
10066 fi
10067 rm -f conftest*
10068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10069   echo "$ac_t""yes" 1>&6
10070   { test "$extra_verbose" = "yes" && cat << \EOF
10071     Defining HAVE_TERMIOS
10072 EOF
10073 cat >> confdefs.h <<\EOF
10074 #define HAVE_TERMIOS 1
10075 EOF
10076 }
10077
10078   { test "$extra_verbose" = "yes" && cat << \EOF
10079     Defining SIGNALS_VIA_CHARACTERS
10080 EOF
10081 cat >> confdefs.h <<\EOF
10082 #define SIGNALS_VIA_CHARACTERS 1
10083 EOF
10084 }
10085
10086   { test "$extra_verbose" = "yes" && cat << \EOF
10087     Defining NO_TERMIO
10088 EOF
10089 cat >> confdefs.h <<\EOF
10090 #define NO_TERMIO 1
10091 EOF
10092 }
10093
10094 else
10095   echo "$ac_t""no" 1>&6
10096 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10097 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10098 echo "configure:10099: checking for termio.h" >&5
10099
10100 cat > conftest.$ac_ext <<EOF
10101 #line 10102 "configure"
10102 #include "confdefs.h"
10103 #include <termio.h>
10104 EOF
10105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10106 { (eval echo configure:10107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10108 if test -z "$ac_err"; then
10109   rm -rf conftest*
10110   eval "ac_cv_header_$ac_safe=yes"
10111 else
10112   echo "$ac_err" >&5
10113   echo "configure: failed program was:" >&5
10114   cat conftest.$ac_ext >&5
10115   rm -rf conftest*
10116   eval "ac_cv_header_$ac_safe=no"
10117 fi
10118 rm -f conftest*
10119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10120   echo "$ac_t""yes" 1>&6
10121   { test "$extra_verbose" = "yes" && cat << \EOF
10122     Defining HAVE_TERMIO
10123 EOF
10124 cat >> confdefs.h <<\EOF
10125 #define HAVE_TERMIO 1
10126 EOF
10127 }
10128
10129 else
10130   echo "$ac_t""no" 1>&6
10131 fi
10132
10133 fi
10134
10135
10136
10137 echo $ac_n "checking for socket""... $ac_c" 1>&6
10138 echo "configure:10139: checking for socket" >&5
10139
10140 cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143 /* System header to define __stub macros and hopefully few prototypes,
10144     which can conflict with char socket(); below.  */
10145 #include <assert.h>
10146 /* Override any gcc2 internal prototype to avoid an error.  */
10147 /* We use char because int might match the return type of a gcc2
10148     builtin and then its argument prototype would still apply.  */
10149 char socket();
10150
10151 int main() {
10152
10153 /* The GNU C library defines this for functions which it implements
10154     to always fail with ENOSYS.  Some functions are actually named
10155     something starting with __ and the normal name is an alias.  */
10156 #if defined (__stub_socket) || defined (__stub___socket)
10157 choke me
10158 #else
10159 socket();
10160 #endif
10161
10162 ; return 0; }
10163 EOF
10164 if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10165   rm -rf conftest*
10166   eval "ac_cv_func_socket=yes"
10167 else
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_func_socket=no"
10172 fi
10173 rm -f conftest*
10174
10175 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10176   echo "$ac_t""yes" 1>&6
10177   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10178 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10179 echo "configure:10180: checking for netinet/in.h" >&5
10180
10181 cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184 #include <netinet/in.h>
10185 EOF
10186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10187 { (eval echo configure:10188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10189 if test -z "$ac_err"; then
10190   rm -rf conftest*
10191   eval "ac_cv_header_$ac_safe=yes"
10192 else
10193   echo "$ac_err" >&5
10194   echo "configure: failed program was:" >&5
10195   cat conftest.$ac_ext >&5
10196   rm -rf conftest*
10197   eval "ac_cv_header_$ac_safe=no"
10198 fi
10199 rm -f conftest*
10200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10201   echo "$ac_t""yes" 1>&6
10202   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10203 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10204 echo "configure:10205: checking for arpa/inet.h" >&5
10205
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <arpa/inet.h>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227   
10228   { test "$extra_verbose" = "yes" && cat << \EOF
10229     Defining HAVE_SOCKETS
10230 EOF
10231 cat >> confdefs.h <<\EOF
10232 #define HAVE_SOCKETS 1
10233 EOF
10234 }
10235
10236       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10237 echo "configure:10238: checking "for sun_len member in struct sockaddr_un"" >&5
10238       cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241
10242 #include <sys/types.h>
10243 #include <sys/socket.h>
10244 #include <sys/un.h>
10245       
10246 int main() {
10247 static struct sockaddr_un x; x.sun_len = 1;
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10253     Defining HAVE_SOCKADDR_SUN_LEN
10254 EOF
10255 cat >> confdefs.h <<\EOF
10256 #define HAVE_SOCKADDR_SUN_LEN 1
10257 EOF
10258 }
10259
10260 else
10261   echo "configure: failed program was:" >&5
10262   cat conftest.$ac_ext >&5
10263   rm -rf conftest*
10264   echo "$ac_t""no" 1>&6
10265 fi
10266 rm -f conftest*
10267       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10268 echo "configure:10269: checking "for ip_mreq struct in netinet/in.h"" >&5
10269       cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272
10273 #include <sys/types.h>
10274 #include <netinet/in.h>
10275       
10276 int main() {
10277 static struct ip_mreq x;
10278 ; return 0; }
10279 EOF
10280 if { (eval echo configure:10281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10281   rm -rf conftest*
10282   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10283     Defining HAVE_MULTICAST
10284 EOF
10285 cat >> confdefs.h <<\EOF
10286 #define HAVE_MULTICAST 1
10287 EOF
10288 }
10289
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   echo "$ac_t""no" 1>&6
10295 fi
10296 rm -f conftest*
10297 else
10298   echo "$ac_t""no" 1>&6
10299 fi
10300
10301 else
10302   echo "$ac_t""no" 1>&6
10303 fi
10304
10305 else
10306   echo "$ac_t""no" 1>&6
10307 fi
10308
10309
10310 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10311 echo "configure:10312: checking for msgget" >&5
10312
10313 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 /* System header to define __stub macros and hopefully few prototypes,
10317     which can conflict with char msgget(); below.  */
10318 #include <assert.h>
10319 /* Override any gcc2 internal prototype to avoid an error.  */
10320 /* We use char because int might match the return type of a gcc2
10321     builtin and then its argument prototype would still apply.  */
10322 char msgget();
10323
10324 int main() {
10325
10326 /* The GNU C library defines this for functions which it implements
10327     to always fail with ENOSYS.  Some functions are actually named
10328     something starting with __ and the normal name is an alias.  */
10329 #if defined (__stub_msgget) || defined (__stub___msgget)
10330 choke me
10331 #else
10332 msgget();
10333 #endif
10334
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10338   rm -rf conftest*
10339   eval "ac_cv_func_msgget=yes"
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   eval "ac_cv_func_msgget=no"
10345 fi
10346 rm -f conftest*
10347
10348 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10349   echo "$ac_t""yes" 1>&6
10350   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10351 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10352 echo "configure:10353: checking for sys/ipc.h" >&5
10353
10354 cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 #include <sys/ipc.h>
10358 EOF
10359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10360 { (eval echo configure:10361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10362 if test -z "$ac_err"; then
10363   rm -rf conftest*
10364   eval "ac_cv_header_$ac_safe=yes"
10365 else
10366   echo "$ac_err" >&5
10367   echo "configure: failed program was:" >&5
10368   cat conftest.$ac_ext >&5
10369   rm -rf conftest*
10370   eval "ac_cv_header_$ac_safe=no"
10371 fi
10372 rm -f conftest*
10373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10376 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10377 echo "configure:10378: checking for sys/msg.h" >&5
10378
10379 cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 #include <sys/msg.h>
10383 EOF
10384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10385 { (eval echo configure:10386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10387 if test -z "$ac_err"; then
10388   rm -rf conftest*
10389   eval "ac_cv_header_$ac_safe=yes"
10390 else
10391   echo "$ac_err" >&5
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   eval "ac_cv_header_$ac_safe=no"
10396 fi
10397 rm -f conftest*
10398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10399   echo "$ac_t""yes" 1>&6
10400   { test "$extra_verbose" = "yes" && cat << \EOF
10401     Defining HAVE_SYSVIPC
10402 EOF
10403 cat >> confdefs.h <<\EOF
10404 #define HAVE_SYSVIPC 1
10405 EOF
10406 }
10407
10408 else
10409   echo "$ac_t""no" 1>&6
10410 fi
10411
10412 else
10413   echo "$ac_t""no" 1>&6
10414 fi
10415
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419
10420
10421 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10422 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10423 echo "configure:10424: checking for dirent.h" >&5
10424
10425 cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <dirent.h>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446   { test "$extra_verbose" = "yes" && cat << \EOF
10447     Defining SYSV_SYSTEM_DIR
10448 EOF
10449 cat >> confdefs.h <<\EOF
10450 #define SYSV_SYSTEM_DIR 1
10451 EOF
10452 }
10453
10454 else
10455   echo "$ac_t""no" 1>&6
10456 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10457 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10458 echo "configure:10459: checking for sys/dir.h" >&5
10459
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 #include <sys/dir.h>
10464 EOF
10465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10466 { (eval echo configure:10467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10468 if test -z "$ac_err"; then
10469   rm -rf conftest*
10470   eval "ac_cv_header_$ac_safe=yes"
10471 else
10472   echo "$ac_err" >&5
10473   echo "configure: failed program was:" >&5
10474   cat conftest.$ac_ext >&5
10475   rm -rf conftest*
10476   eval "ac_cv_header_$ac_safe=no"
10477 fi
10478 rm -f conftest*
10479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481   :
10482 else
10483   echo "$ac_t""no" 1>&6
10484 { test "$extra_verbose" = "yes" && cat << \EOF
10485     Defining NONSYSTEM_DIR_LIBRARY
10486 EOF
10487 cat >> confdefs.h <<\EOF
10488 #define NONSYSTEM_DIR_LIBRARY 1
10489 EOF
10490 }
10491
10492 fi
10493
10494 fi
10495
10496
10497 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10498 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10499 echo "configure:10500: checking for nlist.h" >&5
10500
10501 cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504 #include <nlist.h>
10505 EOF
10506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10507 { (eval echo configure:10508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10509 if test -z "$ac_err"; then
10510   rm -rf conftest*
10511   eval "ac_cv_header_$ac_safe=yes"
10512 else
10513   echo "$ac_err" >&5
10514   echo "configure: failed program was:" >&5
10515   cat conftest.$ac_ext >&5
10516   rm -rf conftest*
10517   eval "ac_cv_header_$ac_safe=no"
10518 fi
10519 rm -f conftest*
10520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10521   echo "$ac_t""yes" 1>&6
10522   { test "$extra_verbose" = "yes" && cat << \EOF
10523     Defining NLIST_STRUCT
10524 EOF
10525 cat >> confdefs.h <<\EOF
10526 #define NLIST_STRUCT 1
10527 EOF
10528 }
10529
10530 else
10531   echo "$ac_t""no" 1>&6
10532 fi
10533
10534
10535
10536 echo "checking "for sound support"" 1>&6
10537 echo "configure:10538: checking "for sound support"" >&5
10538 case "$with_sound" in
10539   native | both ) with_native_sound=yes;;
10540   nas    | no   ) with_native_sound=no;;
10541 esac
10542 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10543
10544 if test "$with_native_sound" != "no"; then
10545     if test -n "$native_sound_lib"; then
10546     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10547 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10548 echo "configure:10549: checking for multimedia/audio_device.h" >&5
10549
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553 #include <multimedia/audio_device.h>
10554 EOF
10555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10556 { (eval echo configure:10557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10558 if test -z "$ac_err"; then
10559   rm -rf conftest*
10560   eval "ac_cv_header_$ac_safe=yes"
10561 else
10562   echo "$ac_err" >&5
10563   echo "configure: failed program was:" >&5
10564   cat conftest.$ac_ext >&5
10565   rm -rf conftest*
10566   eval "ac_cv_header_$ac_safe=no"
10567 fi
10568 rm -f conftest*
10569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571   sound_found=yes sound_cflags=""
10572       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10573    echo "    xemacs will be linked with \"sunplay.o\""
10574  fi
10575 else
10576   echo "$ac_t""no" 1>&6
10577 fi
10578
10579   fi
10580
10581     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10582     sound_found=yes
10583     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10584    echo "    xemacs will be linked with \"sunplay.o\""
10585  fi
10586     if test -d "/usr/demo/SOUND/include"
10587       then sound_cflags="-I/usr/demo/SOUND/include"
10588       else sound_cflags="-I/usr/demo/SOUND"
10589     fi
10590     if test -z "$native_sound_lib" ; then
10591       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10592         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10593         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10594       fi
10595     fi
10596   fi
10597
10598     if test -z "$sound_found"; then
10599     case "$canonical" in
10600     *-sgi-* )
10601       if test -z "$native_sound_lib"; then
10602         
10603 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10604 echo "configure:10605: checking for ALopenport in -laudio" >&5
10605 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10606
10607 xe_check_libs=" -laudio "
10608 cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 /* Override any gcc2 internal prototype to avoid an error.  */
10612 /* We use char because int might match the return type of a gcc2
10613     builtin and then its argument prototype would still apply.  */
10614 char ALopenport();
10615
10616 int main() {
10617 ALopenport()
10618 ; return 0; }
10619 EOF
10620 if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10621   rm -rf conftest*
10622   eval "ac_cv_lib_$ac_lib_var=yes"
10623 else
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_lib_$ac_lib_var=no"
10628 fi
10629 rm -f conftest*
10630 xe_check_libs=""
10631
10632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10633   echo "$ac_t""yes" 1>&6
10634   native_sound_lib="-laudio"
10635 else
10636   echo "$ac_t""no" 1>&6
10637 fi
10638
10639
10640       fi
10641       if test -n "$native_sound_lib"; then
10642         sound_found=yes sound_cflags=""
10643         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10644    echo "    xemacs will be linked with \"sgiplay.o\""
10645  fi
10646       fi ;;
10647     hppa*-hp-hpux* )
10648       if test -z "$native_sound_lib"; then
10649         
10650 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10651 echo "configure:10652: checking for AOpenAudio in -lAlib" >&5
10652 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10653
10654 xe_check_libs=" -lAlib "
10655 cat > conftest.$ac_ext <<EOF
10656 #line 10657 "configure"
10657 #include "confdefs.h"
10658 /* Override any gcc2 internal prototype to avoid an error.  */
10659 /* We use char because int might match the return type of a gcc2
10660     builtin and then its argument prototype would still apply.  */
10661 char AOpenAudio();
10662
10663 int main() {
10664 AOpenAudio()
10665 ; return 0; }
10666 EOF
10667 if { (eval echo configure:10668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10668   rm -rf conftest*
10669   eval "ac_cv_lib_$ac_lib_var=yes"
10670 else
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -rf conftest*
10674   eval "ac_cv_lib_$ac_lib_var=no"
10675 fi
10676 rm -f conftest*
10677 xe_check_libs=""
10678
10679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10680   echo "$ac_t""yes" 1>&6
10681   native_sound_lib="-lAlib"
10682 else
10683   echo "$ac_t""no" 1>&6
10684 fi
10685
10686
10687       fi
10688       if test -n "$native_sound_lib"; then
10689         sound_found=yes
10690         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10691    echo "    xemacs will be linked with \"hpplay.o\""
10692  fi
10693         if test "$GCC" = "yes" # Kludge city
10694           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10695           else sound_cflags="+e -I/usr/audio/examples"
10696         fi
10697       fi ;;
10698     esac
10699   fi
10700
10701     if test -z "$sound_found"; then
10702     for dir in "machine" "sys" "linux"; do
10703       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10704 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10705 echo "configure:10706: checking for ${dir}/soundcard.h" >&5
10706
10707 cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 #include <${dir}/soundcard.h>
10711 EOF
10712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10713 { (eval echo configure:10714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10715 if test -z "$ac_err"; then
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=yes"
10718 else
10719   echo "$ac_err" >&5
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   eval "ac_cv_header_$ac_safe=no"
10724 fi
10725 rm -f conftest*
10726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10727   echo "$ac_t""yes" 1>&6
10728   sound_found=yes
10729         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10730    echo "    xemacs will be linked with \"linuxplay.o\""
10731  fi
10732         { test "$extra_verbose" = "yes" && cat << EOF
10733     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10734 EOF
10735 cat >> confdefs.h <<EOF
10736 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10737 EOF
10738 }
10739
10740         break
10741 else
10742   echo "$ac_t""no" 1>&6
10743 fi
10744
10745     done
10746   fi
10747
10748   test "$sound_found" = "yes" && with_native_sound=yes
10749 fi
10750
10751 if test -z "$with_sound"; then
10752   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10753     with_sound=native
10754   fi
10755 fi
10756
10757 if test "$with_native_sound" = "yes"; then
10758   { test "$extra_verbose" = "yes" && cat << \EOF
10759     Defining HAVE_NATIVE_SOUND
10760 EOF
10761 cat >> confdefs.h <<\EOF
10762 #define HAVE_NATIVE_SOUND 1
10763 EOF
10764 }
10765
10766   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10767 fi
10768
10769 case "$with_sound" in both | nas )
10770   { test "$extra_verbose" = "yes" && cat << \EOF
10771     Defining HAVE_NAS_SOUND
10772 EOF
10773 cat >> confdefs.h <<\EOF
10774 #define HAVE_NAS_SOUND 1
10775 EOF
10776 }
10777
10778   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10779    echo "    xemacs will be linked with \"nas.o\""
10780  fi
10781   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10782       cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include <audio/Xtutil.h>
10786 EOF
10787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10788   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10789   :
10790 else
10791   rm -rf conftest*
10792   { test "$extra_verbose" = "yes" && cat << \EOF
10793     Defining NAS_NO_ERROR_JUMP
10794 EOF
10795 cat >> confdefs.h <<\EOF
10796 #define NAS_NO_ERROR_JUMP 1
10797 EOF
10798 }
10799
10800 fi
10801 rm -f conftest*
10802
10803 esac
10804
10805
10806 test -z "$with_tty" && with_tty=yes
10807
10808 if test "$with_tty" = "yes"  ; then
10809   echo "checking for TTY-related features" 1>&6
10810 echo "configure:10811: checking for TTY-related features" >&5
10811   { test "$extra_verbose" = "yes" && cat << \EOF
10812     Defining HAVE_TTY
10813 EOF
10814 cat >> confdefs.h <<\EOF
10815 #define HAVE_TTY 1
10816 EOF
10817 }
10818
10819   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
10820    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\""
10821  fi
10822
10823     if test -z "$with_ncurses"; then
10824     
10825 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10826 echo "configure:10827: checking for tgetent in -lncurses" >&5
10827 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10828
10829 xe_check_libs=" -lncurses "
10830 cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 /* Override any gcc2 internal prototype to avoid an error.  */
10834 /* We use char because int might match the return type of a gcc2
10835     builtin and then its argument prototype would still apply.  */
10836 char tgetent();
10837
10838 int main() {
10839 tgetent()
10840 ; return 0; }
10841 EOF
10842 if { (eval echo configure:10843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10843   rm -rf conftest*
10844   eval "ac_cv_lib_$ac_lib_var=yes"
10845 else
10846   echo "configure: failed program was:" >&5
10847   cat conftest.$ac_ext >&5
10848   rm -rf conftest*
10849   eval "ac_cv_lib_$ac_lib_var=no"
10850 fi
10851 rm -f conftest*
10852 xe_check_libs=""
10853
10854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10855   echo "$ac_t""yes" 1>&6
10856   with_ncurses=yes
10857 else
10858   echo "$ac_t""no" 1>&6
10859 with_ncurses=no
10860 fi
10861
10862
10863   fi
10864   if test "$with_ncurses" = "yes"; then
10865     { test "$extra_verbose" = "yes" && cat << \EOF
10866     Defining HAVE_NCURSES
10867 EOF
10868 cat >> confdefs.h <<\EOF
10869 #define HAVE_NCURSES 1
10870 EOF
10871 }
10872
10873     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10874 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10875 echo "configure:10876: checking for ncurses/curses.h" >&5
10876
10877 cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 #include <ncurses/curses.h>
10881 EOF
10882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10883 { (eval echo configure:10884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10885 if test -z "$ac_err"; then
10886   rm -rf conftest*
10887   eval "ac_cv_header_$ac_safe=yes"
10888 else
10889   echo "$ac_err" >&5
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_header_$ac_safe=no"
10894 fi
10895 rm -f conftest*
10896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10897   echo "$ac_t""yes" 1>&6
10898   curses_h_path=ncurses/curses.h
10899 else
10900   echo "$ac_t""no" 1>&6
10901 fi
10902
10903     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10904 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10905 echo "configure:10906: checking for ncurses/term.h" >&5
10906
10907 cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910 #include <ncurses/term.h>
10911 EOF
10912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10913 { (eval echo configure:10914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10915 if test -z "$ac_err"; then
10916   rm -rf conftest*
10917   eval "ac_cv_header_$ac_safe=yes"
10918 else
10919   echo "$ac_err" >&5
10920   echo "configure: failed program was:" >&5
10921   cat conftest.$ac_ext >&5
10922   rm -rf conftest*
10923   eval "ac_cv_header_$ac_safe=no"
10924 fi
10925 rm -f conftest*
10926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10927   echo "$ac_t""yes" 1>&6
10928   term_h_path=ncurses/term.h
10929 else
10930   echo "$ac_t""no" 1>&6
10931 fi
10932
10933     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10934    echo "    xemacs will be linked with \"terminfo.o\""
10935  fi
10936     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
10937
10938     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
10939                         save_c_switch_site="$c_switch_site"
10940       c_switch_site="$c_switch_site -I/usr/include/ncurses"
10941       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10942 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10943 echo "configure:10944: checking for ncurses/curses.h" >&5
10944
10945 cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948 #include <ncurses/curses.h>
10949 EOF
10950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10951 { (eval echo configure:10952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10953 if test -z "$ac_err"; then
10954   rm -rf conftest*
10955   eval "ac_cv_header_$ac_safe=yes"
10956 else
10957   echo "$ac_err" >&5
10958   echo "configure: failed program was:" >&5
10959   cat conftest.$ac_ext >&5
10960   rm -rf conftest*
10961   eval "ac_cv_header_$ac_safe=no"
10962 fi
10963 rm -f conftest*
10964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10965   echo "$ac_t""yes" 1>&6
10966   curses_h_path=ncurses/curses.h
10967 else
10968   echo "$ac_t""no" 1>&6
10969 fi
10970
10971       if test "$ac_cv_header_ncurses_curses_h" = "yes"
10972         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
10973         else c_switch_site="$save_c_switch_site"
10974       fi
10975     fi
10976   else         if test "$have_terminfo" = "yes"; then
10977       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10978    echo "    xemacs will be linked with \"terminfo.o\""
10979  fi
10980       if test -n "$libs_termcap"; then
10981         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10982       else
10983         for lib in curses termlib termcap; do
10984           
10985 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
10986 echo "configure:10987: checking for tgetent in -l$lib" >&5
10987 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
10988
10989 xe_check_libs=" -l$lib "
10990 cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 /* Override any gcc2 internal prototype to avoid an error.  */
10994 /* We use char because int might match the return type of a gcc2
10995     builtin and then its argument prototype would still apply.  */
10996 char tgetent();
10997
10998 int main() {
10999 tgetent()
11000 ; return 0; }
11001 EOF
11002 if { (eval echo configure:11003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11003   rm -rf conftest*
11004   eval "ac_cv_lib_$ac_lib_var=yes"
11005 else
11006   echo "configure: failed program was:" >&5
11007   cat conftest.$ac_ext >&5
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=no"
11010 fi
11011 rm -f conftest*
11012 xe_check_libs=""
11013
11014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11015   echo "$ac_t""yes" 1>&6
11016   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020
11021
11022         done
11023       fi
11024     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11025    echo "    xemacs will be linked with \"tparam.o\""
11026  fi
11027                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11028       if test -n "$libs_termcap"; then
11029         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11030       else
11031         
11032 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11033 echo "configure:11034: checking for tgetent in -lcurses" >&5
11034 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11035
11036 xe_check_libs=" -lcurses "
11037 cat > conftest.$ac_ext <<EOF
11038 #line 11039 "configure"
11039 #include "confdefs.h"
11040 /* Override any gcc2 internal prototype to avoid an error.  */
11041 /* We use char because int might match the return type of a gcc2
11042     builtin and then its argument prototype would still apply.  */
11043 char tgetent();
11044
11045 int main() {
11046 tgetent()
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=yes"
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   eval "ac_cv_lib_$ac_lib_var=no"
11057 fi
11058 rm -f conftest*
11059 xe_check_libs=""
11060
11061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11062   echo "$ac_t""yes" 1>&6
11063   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11064 else
11065   echo "$ac_t""no" 1>&6
11066 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11067 echo "configure:11068: checking for tgetent in -ltermcap" >&5
11068 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11069
11070 xe_check_libs=" -ltermcap "
11071 cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 /* Override any gcc2 internal prototype to avoid an error.  */
11075 /* We use char because int might match the return type of a gcc2
11076     builtin and then its argument prototype would still apply.  */
11077 char tgetent();
11078
11079 int main() {
11080 tgetent()
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=yes"
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_lib_$ac_lib_var=no"
11091 fi
11092 rm -f conftest*
11093 xe_check_libs=""
11094
11095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11096   echo "$ac_t""yes" 1>&6
11097   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11098 else
11099   echo "$ac_t""no" 1>&6
11100 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11101    echo "    xemacs will be linked with \"termcap.o\""
11102  fi
11103 fi
11104
11105
11106 fi
11107
11108
11109       fi
11110     fi
11111   fi
11112   { test "$extra_verbose" = "yes" && cat << EOF
11113     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11114 EOF
11115 cat >> confdefs.h <<EOF
11116 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11117 EOF
11118 }
11119
11120   { test "$extra_verbose" = "yes" && cat << EOF
11121     Defining TERM_H_PATH = "${term_h_path-term.h}"
11122 EOF
11123 cat >> confdefs.h <<EOF
11124 #define TERM_H_PATH "${term_h_path-term.h}"
11125 EOF
11126 }
11127
11128
11129     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11130 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11131 echo "configure:11132: checking for gpm.h" >&5
11132
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <gpm.h>
11137 EOF
11138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11139 { (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11141 if test -z "$ac_err"; then
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=yes"
11144 else
11145   echo "$ac_err" >&5
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=no"
11150 fi
11151 rm -f conftest*
11152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   :
11155 else
11156   echo "$ac_t""no" 1>&6
11157 with_gpm=no
11158 fi
11159  }
11160   test -z "$with_gpm" && { 
11161 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11162 echo "configure:11163: checking for Gpm_Open in -lgpm" >&5
11163 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11164
11165 xe_check_libs=" -lgpm "
11166 cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169 /* Override any gcc2 internal prototype to avoid an error.  */
11170 /* We use char because int might match the return type of a gcc2
11171     builtin and then its argument prototype would still apply.  */
11172 char Gpm_Open();
11173
11174 int main() {
11175 Gpm_Open()
11176 ; return 0; }
11177 EOF
11178 if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=yes"
11181 else
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_lib_$ac_lib_var=no"
11186 fi
11187 rm -f conftest*
11188 xe_check_libs=""
11189
11190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11191   echo "$ac_t""yes" 1>&6
11192   with_gpm=yes
11193 else
11194   echo "$ac_t""no" 1>&6
11195 with_gpm=no
11196 fi
11197
11198  }
11199   if test "$with_gpm" = "yes"; then
11200     { test "$extra_verbose" = "yes" && cat << \EOF
11201     Defining HAVE_GPM
11202 EOF
11203 cat >> confdefs.h <<\EOF
11204 #define HAVE_GPM 1
11205 EOF
11206 }
11207
11208     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11209    echo "    xemacs will be linked with \"gpmevent.o\""
11210  fi
11211     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11212   fi
11213
11214 else   for feature in ncurses gpm; do
11215     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11216       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11217     fi
11218     eval "with_${feature}=no"
11219   done
11220 fi 
11221 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11222    echo "    xemacs will be linked with \"event-unixoid.o\""
11223  fi
11224
11225
11226 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11227   != "no no no" && echo "checking for database support" 1>&6
11228 echo "configure:11229: checking for database support" >&5
11229
11230 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
11231   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11232 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11233 echo "configure:11234: checking for ndbm.h" >&5
11234
11235 cat > conftest.$ac_ext <<EOF
11236 #line 11237 "configure"
11237 #include "confdefs.h"
11238 #include <ndbm.h>
11239 EOF
11240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11241 { (eval echo configure:11242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11243 if test -z "$ac_err"; then
11244   rm -rf conftest*
11245   eval "ac_cv_header_$ac_safe=yes"
11246 else
11247   echo "$ac_err" >&5
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -rf conftest*
11251   eval "ac_cv_header_$ac_safe=no"
11252 fi
11253 rm -f conftest*
11254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11255   echo "$ac_t""yes" 1>&6
11256   :
11257 else
11258   echo "$ac_t""no" 1>&6
11259
11260     test "$with_database_gnudbm" = "yes" -o \
11261          "$with_database_dbm"    = "yes" && \
11262       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11263     with_database_gnudbm=no with_database_dbm=no
11264 fi
11265
11266 fi
11267
11268 if test "$with_database_gnudbm" != "no"; then
11269   
11270 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11271 echo "configure:11272: checking for dbm_open in -lgdbm" >&5
11272 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11273
11274 xe_check_libs=" -lgdbm "
11275 cat > conftest.$ac_ext <<EOF
11276 #line 11277 "configure"
11277 #include "confdefs.h"
11278 /* Override any gcc2 internal prototype to avoid an error.  */
11279 /* We use char because int might match the return type of a gcc2
11280     builtin and then its argument prototype would still apply.  */
11281 char dbm_open();
11282
11283 int main() {
11284 dbm_open()
11285 ; return 0; }
11286 EOF
11287 if { (eval echo configure:11288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11288   rm -rf conftest*
11289   eval "ac_cv_lib_$ac_lib_var=yes"
11290 else
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   eval "ac_cv_lib_$ac_lib_var=no"
11295 fi
11296 rm -f conftest*
11297 xe_check_libs=""
11298
11299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11300   echo "$ac_t""yes" 1>&6
11301   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11302 else
11303   echo "$ac_t""no" 1>&6
11304 if test "$with_database_gnudbm" = "yes"; then
11305      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11306    fi
11307    with_database_gnudbm=no
11308 fi
11309
11310
11311 fi
11312
11313 if test "$with_database_dbm" != "no"; then
11314   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11315 echo "configure:11316: checking for dbm_open" >&5
11316
11317 cat > conftest.$ac_ext <<EOF
11318 #line 11319 "configure"
11319 #include "confdefs.h"
11320 /* System header to define __stub macros and hopefully few prototypes,
11321     which can conflict with char dbm_open(); below.  */
11322 #include <assert.h>
11323 /* Override any gcc2 internal prototype to avoid an error.  */
11324 /* We use char because int might match the return type of a gcc2
11325     builtin and then its argument prototype would still apply.  */
11326 char dbm_open();
11327
11328 int main() {
11329
11330 /* The GNU C library defines this for functions which it implements
11331     to always fail with ENOSYS.  Some functions are actually named
11332     something starting with __ and the normal name is an alias.  */
11333 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11334 choke me
11335 #else
11336 dbm_open();
11337 #endif
11338
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11342   rm -rf conftest*
11343   eval "ac_cv_func_dbm_open=yes"
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   eval "ac_cv_func_dbm_open=no"
11349 fi
11350 rm -f conftest*
11351
11352 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354   with_database_dbm=yes libdbm=
11355 else
11356   echo "$ac_t""no" 1>&6
11357
11358     
11359 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11360 echo "configure:11361: checking for dbm_open in -ldbm" >&5
11361 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11362
11363 xe_check_libs=" -ldbm "
11364 cat > conftest.$ac_ext <<EOF
11365 #line 11366 "configure"
11366 #include "confdefs.h"
11367 /* Override any gcc2 internal prototype to avoid an error.  */
11368 /* We use char because int might match the return type of a gcc2
11369     builtin and then its argument prototype would still apply.  */
11370 char dbm_open();
11371
11372 int main() {
11373 dbm_open()
11374 ; return 0; }
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11377   rm -rf conftest*
11378   eval "ac_cv_lib_$ac_lib_var=yes"
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   eval "ac_cv_lib_$ac_lib_var=no"
11384 fi
11385 rm -f conftest*
11386 xe_check_libs=""
11387
11388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11389   echo "$ac_t""yes" 1>&6
11390   with_database_dbm=yes libdbm=-ldbm
11391 else
11392   echo "$ac_t""no" 1>&6
11393 test "$with_database_dbm" = "yes" && \
11394         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11395       with_database_dbm=no
11396 fi
11397
11398
11399 fi
11400
11401 fi
11402
11403 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11404 test "$with_database_gnudbm" = "yes" -o \
11405      "$with_database_dbm"    = "yes" && \
11406   { test "$extra_verbose" = "yes" && cat << \EOF
11407     Defining HAVE_DBM
11408 EOF
11409 cat >> confdefs.h <<\EOF
11410 #define HAVE_DBM 1
11411 EOF
11412 }
11413
11414
11415 if test "$with_database_berkdb" != "no"; then
11416   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11417 echo "configure:11418: checking for Berkeley db.h" >&5
11418   for path in "db/db.h" "db.h"; do
11419     cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #ifdef HAVE_INTTYPES_H
11423 #define __BIT_TYPES_DEFINED__
11424 #include <inttypes.h>
11425 typedef uint8_t  u_int8_t;
11426 typedef uint16_t u_int16_t;
11427 typedef uint32_t u_int32_t;
11428 #ifdef WE_DONT_NEED_QUADS
11429 typedef uint64_t u_int64_t;
11430 #endif
11431 #endif
11432 #include <$path>
11433
11434 int main() {
11435
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11439   rm -rf conftest*
11440   db_h_path="$path"; break
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444 fi
11445 rm -f conftest*
11446   done
11447   if test -z "$db_h_path"
11448   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11449   else echo "$ac_t""$db_h_path" 1>&6
11450   fi
11451
11452   if test "$with_database_berkdb" != "no"; then
11453     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11454 echo "configure:11455: checking for Berkeley DB version" >&5
11455     cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 #include <$db_h_path>
11459 #if DB_VERSION_MAJOR > 1
11460 yes
11461 #endif
11462
11463 EOF
11464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11465   egrep "yes" >/dev/null 2>&1; then
11466   rm -rf conftest*
11467   echo "$ac_t""2" 1>&6; dbfunc=db_open
11468 else
11469   rm -rf conftest*
11470   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11471 fi
11472 rm -f conftest*
11473
11474     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11475 echo "configure:11476: checking for $dbfunc" >&5
11476
11477 cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 /* System header to define __stub macros and hopefully few prototypes,
11481     which can conflict with char $dbfunc(); below.  */
11482 #include <assert.h>
11483 /* Override any gcc2 internal prototype to avoid an error.  */
11484 /* We use char because int might match the return type of a gcc2
11485     builtin and then its argument prototype would still apply.  */
11486 char $dbfunc();
11487
11488 int main() {
11489
11490 /* The GNU C library defines this for functions which it implements
11491     to always fail with ENOSYS.  Some functions are actually named
11492     something starting with __ and the normal name is an alias.  */
11493 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11494 choke me
11495 #else
11496 $dbfunc();
11497 #endif
11498
11499 ; return 0; }
11500 EOF
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11502   rm -rf conftest*
11503   eval "ac_cv_func_$dbfunc=yes"
11504 else
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   eval "ac_cv_func_$dbfunc=no"
11509 fi
11510 rm -f conftest*
11511
11512 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514   with_database_berkdb=yes need_libdb=no
11515 else
11516   echo "$ac_t""no" 1>&6
11517
11518     
11519 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11520 echo "configure:11521: checking for $dbfunc in -ldb" >&5
11521 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11522
11523 xe_check_libs=" -ldb "
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 /* Override any gcc2 internal prototype to avoid an error.  */
11528 /* We use char because int might match the return type of a gcc2
11529     builtin and then its argument prototype would still apply.  */
11530 char $dbfunc();
11531
11532 int main() {
11533 $dbfunc()
11534 ; return 0; }
11535 EOF
11536 if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11537   rm -rf conftest*
11538   eval "ac_cv_lib_$ac_lib_var=yes"
11539 else
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   eval "ac_cv_lib_$ac_lib_var=no"
11544 fi
11545 rm -f conftest*
11546 xe_check_libs=""
11547
11548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11549   echo "$ac_t""yes" 1>&6
11550   with_database_berkdb=yes need_libdb=yes
11551 else
11552   echo "$ac_t""no" 1>&6
11553 fi
11554
11555
11556 fi
11557
11558   fi
11559
11560   if test "$with_database_berkdb" = "yes"; then
11561     { test "$extra_verbose" = "yes" && cat << EOF
11562     Defining DB_H_PATH = "$db_h_path"
11563 EOF
11564 cat >> confdefs.h <<EOF
11565 #define DB_H_PATH "$db_h_path"
11566 EOF
11567 }
11568
11569     { test "$extra_verbose" = "yes" && cat << \EOF
11570     Defining HAVE_BERKELEY_DB
11571 EOF
11572 cat >> confdefs.h <<\EOF
11573 #define HAVE_BERKELEY_DB 1
11574 EOF
11575 }
11576
11577     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11578   else with_database_berkdb=no
11579   fi
11580 fi
11581
11582 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11583      != "no no no"; then
11584   { test "$extra_verbose" = "yes" && cat << \EOF
11585     Defining HAVE_DATABASE
11586 EOF
11587 cat >> confdefs.h <<\EOF
11588 #define HAVE_DATABASE 1
11589 EOF
11590 }
11591
11592   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11593    echo "    xemacs will be linked with \"database.o\""
11594  fi
11595 fi
11596
11597 if test "$with_socks" = "yes"; then
11598   
11599 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11600 echo "configure:11601: checking for SOCKSinit in -lsocks" >&5
11601 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11602
11603 xe_check_libs=" -lsocks "
11604 cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 /* Override any gcc2 internal prototype to avoid an error.  */
11608 /* We use char because int might match the return type of a gcc2
11609     builtin and then its argument prototype would still apply.  */
11610 char SOCKSinit();
11611
11612 int main() {
11613 SOCKSinit()
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_lib_$ac_lib_var=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_lib_$ac_lib_var=no"
11624 fi
11625 rm -f conftest*
11626 xe_check_libs=""
11627
11628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11629   echo "$ac_t""yes" 1>&6
11630     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11631     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11632   { test "$extra_verbose" = "yes" && cat << EOF
11633     Defining $ac_tr_lib
11634 EOF
11635 cat >> confdefs.h <<EOF
11636 #define $ac_tr_lib 1
11637 EOF
11638 }
11639
11640   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11641
11642 else
11643   echo "$ac_t""no" 1>&6
11644 fi
11645
11646
11647   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11648     Defining HAVE_SOCKS
11649 EOF
11650 cat >> confdefs.h <<\EOF
11651 #define HAVE_SOCKS 1
11652 EOF
11653 }
11654
11655 fi
11656
11657 if test "$usage_tracking" = "yes"; then
11658   { test "$extra_verbose" = "yes" && cat << \EOF
11659     Defining USAGE_TRACKING
11660 EOF
11661 cat >> confdefs.h <<\EOF
11662 #define USAGE_TRACKING 1
11663 EOF
11664 }
11665
11666   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11667 fi
11668
11669 for ac_hdr in dlfcn.h
11670 do
11671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11673 echo "configure:11674: checking for $ac_hdr" >&5
11674
11675 cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <$ac_hdr>
11679 EOF
11680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11681 { (eval echo configure:11682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11683 if test -z "$ac_err"; then
11684   rm -rf conftest*
11685   eval "ac_cv_header_$ac_safe=yes"
11686 else
11687   echo "$ac_err" >&5
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   eval "ac_cv_header_$ac_safe=no"
11692 fi
11693 rm -f conftest*
11694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11695   echo "$ac_t""yes" 1>&6
11696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11697   { test "$extra_verbose" = "yes" && cat << EOF
11698     Defining $ac_tr_hdr
11699 EOF
11700 cat >> confdefs.h <<EOF
11701 #define $ac_tr_hdr 1
11702 EOF
11703 }
11704  have_dlfcn=yes
11705   { test "$extra_verbose" = "yes" && cat << \EOF
11706     Defining HAVE_DLFCN_H
11707 EOF
11708 cat >> confdefs.h <<\EOF
11709 #define HAVE_DLFCN_H 1
11710 EOF
11711 }
11712
11713 else
11714   echo "$ac_t""no" 1>&6
11715 fi
11716 done
11717
11718 test -z "$with_modules" && test ! -z "$have_dlfcn" && { 
11719 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11720 echo "configure:11721: checking for dlopen in -ldl" >&5
11721 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11722
11723 xe_check_libs=" -ldl "
11724 cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727 /* Override any gcc2 internal prototype to avoid an error.  */
11728 /* We use char because int might match the return type of a gcc2
11729     builtin and then its argument prototype would still apply.  */
11730 char dlopen();
11731
11732 int main() {
11733 dlopen()
11734 ; return 0; }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11737   rm -rf conftest*
11738   eval "ac_cv_lib_$ac_lib_var=yes"
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -rf conftest*
11743   eval "ac_cv_lib_$ac_lib_var=no"
11744 fi
11745 rm -f conftest*
11746 xe_check_libs=""
11747
11748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11749   echo "$ac_t""yes" 1>&6
11750   { test "$extra_verbose" = "yes" && cat << \EOF
11751     Defining HAVE_DLOPEN
11752 EOF
11753 cat >> confdefs.h <<\EOF
11754 #define HAVE_DLOPEN 1
11755 EOF
11756 }
11757  DLL_LIB=dl;  with_modules=yes
11758 else
11759   echo "$ac_t""no" 1>&6
11760 fi
11761
11762  }
11763 test -z "$with_modules" && test ! -z "$have_dlfcn" && { 
11764 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11765 echo "configure:11766: checking for _dlopen in -lc" >&5
11766 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11767
11768 xe_check_libs=" -lc "
11769 cat > conftest.$ac_ext <<EOF
11770 #line 11771 "configure"
11771 #include "confdefs.h"
11772 /* Override any gcc2 internal prototype to avoid an error.  */
11773 /* We use char because int might match the return type of a gcc2
11774     builtin and then its argument prototype would still apply.  */
11775 char _dlopen();
11776
11777 int main() {
11778 _dlopen()
11779 ; return 0; }
11780 EOF
11781 if { (eval echo configure:11782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11782   rm -rf conftest*
11783   eval "ac_cv_lib_$ac_lib_var=yes"
11784 else
11785   echo "configure: failed program was:" >&5
11786   cat conftest.$ac_ext >&5
11787   rm -rf conftest*
11788   eval "ac_cv_lib_$ac_lib_var=no"
11789 fi
11790 rm -f conftest*
11791 xe_check_libs=""
11792
11793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11794   echo "$ac_t""yes" 1>&6
11795   { test "$extra_verbose" = "yes" && cat << \EOF
11796     Defining HAVE_DLOPEN
11797 EOF
11798 cat >> confdefs.h <<\EOF
11799 #define HAVE_DLOPEN 1
11800 EOF
11801 }
11802  DLL_LIB=;   with_modules=yes
11803 else
11804   echo "$ac_t""no" 1>&6
11805 fi
11806
11807  }
11808 test -z "$with_modules" && test ! -z "$have_dlfcn" && { 
11809 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11810 echo "configure:11811: checking for dlopen in -lc" >&5
11811 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11812
11813 xe_check_libs=" -lc "
11814 cat > conftest.$ac_ext <<EOF
11815 #line 11816 "configure"
11816 #include "confdefs.h"
11817 /* Override any gcc2 internal prototype to avoid an error.  */
11818 /* We use char because int might match the return type of a gcc2
11819     builtin and then its argument prototype would still apply.  */
11820 char dlopen();
11821
11822 int main() {
11823 dlopen()
11824 ; return 0; }
11825 EOF
11826 if { (eval echo configure:11827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11827   rm -rf conftest*
11828   eval "ac_cv_lib_$ac_lib_var=yes"
11829 else
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -rf conftest*
11833   eval "ac_cv_lib_$ac_lib_var=no"
11834 fi
11835 rm -f conftest*
11836 xe_check_libs=""
11837
11838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11839   echo "$ac_t""yes" 1>&6
11840   { test "$extra_verbose" = "yes" && cat << \EOF
11841     Defining HAVE_DLOPEN
11842 EOF
11843 cat >> confdefs.h <<\EOF
11844 #define HAVE_DLOPEN 1
11845 EOF
11846 }
11847  DLL_LIB=;   with_modules=yes
11848 else
11849   echo "$ac_t""no" 1>&6
11850 fi
11851
11852  }
11853 test -z "$with_modules" && { 
11854 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11855 echo "configure:11856: checking for shl_load in -ldld" >&5
11856 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11857
11858 xe_check_libs=" -ldld "
11859 cat > conftest.$ac_ext <<EOF
11860 #line 11861 "configure"
11861 #include "confdefs.h"
11862 /* Override any gcc2 internal prototype to avoid an error.  */
11863 /* We use char because int might match the return type of a gcc2
11864     builtin and then its argument prototype would still apply.  */
11865 char shl_load();
11866
11867 int main() {
11868 shl_load()
11869 ; return 0; }
11870 EOF
11871 if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11872   rm -rf conftest*
11873   eval "ac_cv_lib_$ac_lib_var=yes"
11874 else
11875   echo "configure: failed program was:" >&5
11876   cat conftest.$ac_ext >&5
11877   rm -rf conftest*
11878   eval "ac_cv_lib_$ac_lib_var=no"
11879 fi
11880 rm -f conftest*
11881 xe_check_libs=""
11882
11883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11884   echo "$ac_t""yes" 1>&6
11885   { test "$extra_verbose" = "yes" && cat << \EOF
11886     Defining HAVE_SHL_LOAD
11887 EOF
11888 cat >> confdefs.h <<\EOF
11889 #define HAVE_SHL_LOAD 1
11890 EOF
11891 }
11892  DLL_LIB=dld; with_modules=yes
11893 else
11894   echo "$ac_t""no" 1>&6
11895 fi
11896
11897  }
11898 test -z "$with_modules" && { 
11899 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11900 echo "configure:11901: checking for dld_init in -ldld" >&5
11901 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11902
11903 xe_check_libs=" -ldld "
11904 cat > conftest.$ac_ext <<EOF
11905 #line 11906 "configure"
11906 #include "confdefs.h"
11907 /* Override any gcc2 internal prototype to avoid an error.  */
11908 /* We use char because int might match the return type of a gcc2
11909     builtin and then its argument prototype would still apply.  */
11910 char dld_init();
11911
11912 int main() {
11913 dld_init()
11914 ; return 0; }
11915 EOF
11916 if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11917   rm -rf conftest*
11918   eval "ac_cv_lib_$ac_lib_var=yes"
11919 else
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   eval "ac_cv_lib_$ac_lib_var=no"
11924 fi
11925 rm -f conftest*
11926 xe_check_libs=""
11927
11928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11929   echo "$ac_t""yes" 1>&6
11930   { test "$extra_verbose" = "yes" && cat << \EOF
11931     Defining HAVE_DLD_INIT
11932 EOF
11933 cat >> confdefs.h <<\EOF
11934 #define HAVE_DLD_INIT 1
11935 EOF
11936 }
11937  DLL_LIB=dld; with_modules=yes
11938 else
11939   echo "$ac_t""no" 1>&6
11940 fi
11941
11942  }
11943 if test "$with_modules" = "yes"; then
11944   
11945 dll_ld=
11946 dll_ldflags=
11947 dll_cflags=
11948 dll_post=
11949 dll_ldo="-o"
11950 ld_dynamic_link_flags=
11951 xehost=$canonical
11952 xealias=$internal_configuration
11953
11954 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
11955 echo "configure:11956: checking how to build dynamic libraries for ${xehost}" >&5
11956 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
11957 case "$xehost" in
11958 *-*-linux-gnu*) ;;
11959 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
11960 esac
11961
11962 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
11963 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
11964 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
11965
11966 case "$xehost_os" in
11967 aix3*)
11968   # AIX sometimes has problems with the GCC collect2 program.  For some
11969   # reason, if we set the COLLECT_NAMES environment variable, the problems
11970   # vanish in a puff of smoke.
11971   if test "${COLLECT_NAMES+set}" != set; then
11972     COLLECT_NAMES=
11973     export COLLECT_NAMES
11974   fi
11975   ;;
11976 esac
11977
11978 # Now see if the compiler is really GCC.
11979 if test "$GCC" = "yes"; then
11980   XEGCC=yes
11981 else
11982   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
11983 echo "configure:11984: checking checking whether we are using GNU C" >&5
11984   cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987
11988 #ifdef __GNUC__
11989   yes;
11990 #endif
11991
11992 EOF
11993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11994   egrep "yes" >/dev/null 2>&1; then
11995   rm -rf conftest*
11996   XEGCC=yes
11997 else
11998   rm -rf conftest*
11999   XEGCC=no
12000 fi
12001 rm -f conftest*
12002
12003   echo "$ac_t""${XEGCC}" 1>&6
12004 fi
12005
12006 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12007 echo "configure:12008: checking how to produce PIC code" >&5
12008 wl=
12009
12010 can_build_shared=yes
12011 if test "$XEGCC" = yes; then
12012   wl='-Wl,'
12013
12014   case "$xehost_os" in
12015   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12016     # PIC is the default for these OSes.
12017     ;;
12018
12019   os2*)
12020     # We can build DLLs from non-PIC.
12021     ;;
12022   amigaos*)
12023     # FIXME: we need at least 68020 code to build shared libraries, but
12024     # adding the `-m68020' flag to GCC prevents building anything better,
12025     # like `-m68040'.
12026     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12027     ;;
12028   *)
12029     dll_cflags='-fPIC'
12030     ;;
12031   esac
12032 else
12033   # PORTME Check for PIC flags for the system compiler.
12034   case "$xehost_os" in
12035   hpux9* | hpux10*)
12036     # Is there a better link_static_flag that works with the bundled CC?
12037     wl='-Wl,'
12038     dll_cflags='+Z'
12039     ;;
12040
12041   irix5* | irix6*)
12042     wl='-Wl,'
12043     # PIC (with -KPIC) is the default.
12044     ;;
12045
12046   os2*)
12047     # We can build DLLs from non-PIC.
12048     ;;
12049
12050   osf3* | osf4*)
12051     # All OSF/1 code is PIC.
12052     wl='-Wl,'
12053     ;;
12054
12055   sco3.2v5*)
12056     dll_cflags='-belf -Kpic'
12057     wl='-Wl,'
12058     ;;
12059
12060   unixware*)
12061     dll_cflags="-KPIC"
12062     wl="-Wl,"
12063     ;;
12064
12065   sysv4*)
12066     dll_cflags="-KPIC"
12067     wl="-Wl,"
12068     ;;
12069
12070   sysv5*)
12071     dll_cflags="-KPIC"
12072     wl="-Wl,"
12073     ;;
12074
12075   solaris2*)
12076     dll_cflags='-KPIC'
12077     wl='-Wl,'
12078     ;;
12079
12080   sunos4*)
12081     dll_cflags='-PIC'
12082     wl='-Qoption ld '
12083     ;;
12084
12085   uts4*)
12086     dll_cflags='-pic'
12087     ;;
12088
12089   *)
12090     can_build_shared=no
12091     ;;
12092   esac
12093 fi
12094
12095 if test -n "$dll_cflags"; then
12096   echo "$ac_t""${dll_cflags}" 1>&6
12097   
12098   # Check to make sure the dll_cflags actually works.
12099   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12100 echo "configure:12101: checking if PIC flag ${dll_cflags} really works" >&5
12101   save_CFLAGS="$CFLAGS"
12102   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12103   cat > conftest.$ac_ext <<EOF
12104 #line 12105 "configure"
12105 #include "confdefs.h"
12106
12107 int main() {
12108 int x=0;
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12112   rm -rf conftest*
12113   
12114     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12115     # reports no error.  So, we need to grep stderr for (Bundled).
12116     if grep '(Bundled)' config.log >/dev/null; then
12117       echo "$ac_t""no" 1>&6
12118       can_build_shared=no
12119       dll_cflags=
12120     else
12121       echo "$ac_t""yes" 1>&6
12122     fi
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   echo "$ac_t""no" 1>&6
12128     can_build_shared=no
12129     dll_cflags=
12130 fi
12131 rm -f conftest*
12132   CFLAGS="$save_CFLAGS"
12133 else
12134   echo "$ac_t""none" 1>&6
12135 fi
12136
12137 if test "$can_build_shared" = "yes"; then
12138 cc_produces_so=no
12139 xldf=
12140 xcldf=
12141 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12142 echo "configure:12143: checking if C compiler can produce shared libraries" >&5
12143 if test "$XEGCC" = yes; then
12144   xcldf="-shared"
12145   xldf="-shared"
12146 else # Not using GCC
12147   case "$xehost_os" in
12148     aix3* | aix4*)
12149       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12150       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12151       ;;
12152
12153     freebsd2* | netbsd* | openbsd*)
12154       xldf="-Bshareable"
12155       xcldf="${wl}-Bshareable"
12156       ;;
12157
12158     freebsd3*)
12159       xcldf="-shared"
12160       ;;
12161
12162     hpux*)
12163       xldf="-b +s"
12164       xcldf="${wl}-b ${wl}+s"
12165       ;;
12166
12167     irix5* | irix6* | osf3* | osf4*)
12168       xcldf="${wl}-shared"
12169       xldf="-shared"
12170       ;;
12171
12172     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12173       xcldf="-G"
12174       xldf="-G"
12175       ;;
12176
12177     sunos4*)
12178       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12179       xldf="-assert pure-text -Bstatic"
12180       ;;
12181   esac
12182 fi # End if if we are using gcc
12183
12184 if test -n "$xcldf"; then
12185   save_LDFLAGS=$LDFLAGS
12186   save_LIBS=$LIBS
12187   save_xe_libs=$xe_libs
12188   LDFLAGS="$xcldf $LDFLAGS"
12189   LIBS=
12190   xe_libs=
12191   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12192   cat > conftest.$ac_ext <<EOF
12193 #line 12194 "configure"
12194 #include "confdefs.h"
12195
12196 int main() {
12197 int x=0;
12198 ; return 0; }
12199 EOF
12200 if { (eval echo configure:12201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12201   rm -rf conftest*
12202   cc_produces_so=yes
12203 else
12204   echo "configure: failed program was:" >&5
12205   cat conftest.$ac_ext >&5
12206   rm -rf conftest*
12207   cc_produces_so=no
12208 fi
12209 rm -f conftest*
12210   LDFLAGS=$save_LDFLAGS
12211   LIBS=$save_LIBS
12212   xe_libs=$save_xe_libs
12213   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12214 else
12215   cc_produces_so=no
12216 fi
12217 echo "$ac_t""${cc_produces_so}" 1>&6
12218
12219 LTLD=$LD
12220 if test -z "$LTLD"; then
12221   ac_prog=ld
12222   if test "$XEGCC" = yes; then
12223     # Check if gcc -print-prog-name=ld gives a path.
12224     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12225 echo "configure:12226: checking for ld used by GCC" >&5
12226     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12227     case "$ac_prog" in
12228     # Accept absolute paths.
12229     /*)
12230       if test -z "$LTLD"; then
12231         case "$ac_prog" in
12232           *gcc-lib*) LTLD="$CC"
12233                      ;;
12234           *)         LTLD="$ac_prog"
12235                      ;;
12236         esac
12237       fi
12238       ;;
12239     "")
12240       # If it fails, then pretend we aren't using GCC.
12241       ac_prog=ld
12242       ;;
12243     *)
12244       # If it is relative, then search for the first ld in PATH.
12245       with_gnu_ld=unknown
12246       ;;
12247     esac
12248   else
12249     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12250 echo "configure:12251: checking for GNU ld" >&5
12251   fi
12252
12253   if test -z "$LTLD"; then
12254     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12255     for ac_dir in $PATH; do
12256       test -z "$ac_dir" && ac_dir=.
12257       if test -f "$ac_dir/$ac_prog"; then
12258         LTLD="$ac_dir/$ac_prog"
12259         # Check to see if the program is GNU ld.  I'd rather use --version,
12260         # but apparently some GNU ld's only accept -v.
12261         # Break only if it was the GNU/non-GNU ld that we prefer.
12262         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12263           xe_gnu_ld=yes
12264         else
12265           xe_gnu_ld=no
12266         fi
12267       fi
12268     done
12269     IFS="$ac_save_ifs"
12270   fi
12271
12272   if test -n "$LTLD"; then
12273     echo "$ac_t""${LTLD}" 1>&6
12274   else
12275     echo "$ac_t""no" 1>&6
12276   fi
12277
12278   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12279     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12280     exit 1
12281   fi
12282 fi
12283
12284 ld_dynamic_link_flags=
12285
12286 # Check to see if it really is or isn't GNU ld.
12287 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12288 echo "configure:12289: checking if the linker is GNU ld" >&5
12289 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12290 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12291   xe_gnu_ld=yes
12292 else
12293   xe_gnu_ld=no
12294 fi
12295 echo "$ac_t""${xe_gnu_ld}" 1>&6
12296
12297 case "$xehost_os" in
12298   amigaos* | sunos4*)
12299     # On these operating systems, we should treat GNU ld like the system ld.
12300     gnu_ld_acts_native=yes
12301     ;;
12302   *)
12303     gnu_ld_acts_native=no
12304     ;;
12305 esac
12306
12307 if test "$cc_produces_so" = "yes"; then
12308   dll_ld=$CC
12309   dll_ldflags=$xcldf
12310   can_build_shared=yes
12311 else
12312   # OK - only NOW do we futz about with ld.
12313   # See if the linker supports building shared libraries.
12314   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12315 echo "configure:12316: checking whether the linker supports shared libraries" >&5
12316   dll_ld=$CC
12317   dll_ldflags=$LDFLAGS
12318   ld_shlibs=yes
12319   can_build_shared=yes
12320   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12321     # See if GNU ld supports shared libraries.
12322     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12323       dll_ld=$CC
12324       dll_ldflags="-shared"
12325       ld_shlibs=yes
12326     else
12327       ld_shlibs=no
12328     fi
12329   else
12330     # PORTME fill in a description of your system's linker (not GNU ld)
12331     case "$xehost_os" in
12332     aix3*)
12333       dll_ld=$LTLD
12334       dll_ldflags=$xldf
12335       ;;
12336
12337     aix4*)
12338       dll_ldflags=$xcldf
12339       ;;
12340
12341     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12342     # support.  Future versions do this automatically, but an explicit c++rt0.o
12343     # doesn't break anything, and helps significantly (at the cost of a little
12344     # extra space).
12345     freebsd2.2*)
12346       dll_ld=$LTLD
12347       dll_ldflags=$xldf
12348       dll_post="/usr/lib/c++rt0.o"
12349       ;;
12350
12351     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12352     freebsd2*)
12353       dll_ld=$LTLD
12354       dll_ldflags="-Bshareable"
12355       ;;
12356
12357     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12358     freebsd3*)
12359       dll_ldflags="-shared"
12360       ;;
12361
12362     hpux*)
12363       dll_ld=$LTLD
12364       dll_ldflags=$xldf
12365       ;;
12366
12367     irix5* | irix6*)
12368       dll_ld=$LTLD
12369       dll_ldflags=$xldf
12370       ;;
12371
12372     netbsd*)
12373       # Tested with NetBSD 1.2 ld
12374       dll_ld=$LTLD
12375       dll_ldflags=$xldf
12376       ;;
12377
12378     openbsd*)
12379       dll_ld=$LTLD
12380       dll_ldflags=$xldf
12381       ;;
12382
12383     osf3* | osf4*)
12384       dll_ld=$LTLD
12385       dll_ldflags=$xldf
12386       ;;
12387
12388     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12389     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12390       dll_ld=$LTLD
12391       case "$dll_ld" in
12392         *gcc*) dll_ldflags="-shared"
12393                dll_ld=$CC
12394                ;;
12395         *)     dll_ldflags="-G"
12396                ;;
12397       esac
12398       ;;
12399
12400     sunos4*)
12401       if test "$XEGCC" = yes; then
12402         dll_ld=$CC
12403       else
12404         dll_ld=$LTLD
12405       fi
12406       dll_ldflags=$xldf
12407       ;;
12408
12409     uts4*)
12410       dll_ld=$LTLD
12411       dll_ldflags="-G"
12412       ;;
12413
12414     bsdi*)
12415       dll_ldflags="-r"
12416       dll_ld="shlicc2"
12417       ;;
12418
12419     *)
12420       ld_shlibs=no
12421       can_build_shared=no
12422       ;;
12423     esac
12424   fi
12425   echo "$ac_t""${ld_shlibs}" 1>&6
12426   if test "$ld_shlibs" = "no"; then
12427     can_build_shared=no
12428   fi
12429 fi # End of if cc_produces_so = no
12430
12431
12432 if test "$xe_gnu_ld" = yes; then
12433   if test "$ld_shlibs" = yes; then
12434     ld_dynamic_link_flags="${wl}-export-dynamic"
12435   fi
12436 fi
12437
12438 if test -z "$ld_dynamic_link_flags"; then
12439   case "$xehost_os" in
12440   aix3*)
12441     ld_dynamic_link_flags=
12442     ;;
12443
12444   aix4*)
12445     ld_dynamic_link_flags=
12446     ;;
12447
12448   freebsd2.2*)
12449     ld_dynamic_link_flags=
12450     ;;
12451
12452   freebsd2*)
12453     ld_dynamic_link_flags=
12454     ;;
12455
12456   freebsd3*)
12457     ld_dynamic_link_flags=
12458     ;;
12459
12460   hpux*)
12461     ld_dynamic_link_flags="${wl}-E"
12462     ;;
12463
12464   irix5* | irix6*)
12465     ld_dynamic_link_flags=
12466     ;;
12467
12468   netbsd*)
12469     ld_dynamic_link_flags=
12470     ;;
12471
12472   openbsd*)
12473     ld_dynamic_link_flags=
12474     ;;
12475
12476   osf3* | osf4*)
12477     ld_dynamic_link_flags=
12478     ;;
12479
12480   solaris2* | solaris7*)
12481     ld_dynamic_link_flags="${wl}-Bdynamic"
12482     ;;
12483
12484   sco3.2v5* | unixware* | sysv5* | sysv4*)
12485     ld_dynamic_link_flags="${wl}-Bexport"
12486     ;;
12487
12488   sunos4*)
12489     ld_dynamic_link_flags=
12490     ;;
12491
12492   uts4*)
12493     ld_dynamic_link_flags=
12494     ;;
12495
12496   bsdi*)
12497     ld_dynamic_link_flags=
12498     ;;
12499
12500   esac
12501 fi # End of if -z ld_dynamic_link_flags
12502 fi # End of if test "$can_build_shared" = "yes"
12503
12504
12505
12506
12507
12508
12509
12510
12511   if test "$can_build_shared" = "yes"; then
12512     { test "$extra_verbose" = "yes" && cat << \EOF
12513     Defining HAVE_SHLIB
12514 EOF
12515 cat >> confdefs.h <<\EOF
12516 #define HAVE_SHLIB 1
12517 EOF
12518 }
12519
12520     extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
12521    echo "    xemacs will be linked with \"sysdll.o\""
12522  fi
12523     extra_objs="$extra_objs emodules.o" &&  if test "$extra_verbose" = "yes"; then
12524    echo "    xemacs will be linked with \"emodules.o\""
12525  fi
12526     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12527     test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
12528     for ac_func in dlerror _dlerror
12529 do
12530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12531 echo "configure:12532: checking for $ac_func" >&5
12532
12533 cat > conftest.$ac_ext <<EOF
12534 #line 12535 "configure"
12535 #include "confdefs.h"
12536 /* System header to define __stub macros and hopefully few prototypes,
12537     which can conflict with char $ac_func(); below.  */
12538 #include <assert.h>
12539 /* Override any gcc2 internal prototype to avoid an error.  */
12540 /* We use char because int might match the return type of a gcc2
12541     builtin and then its argument prototype would still apply.  */
12542 char $ac_func();
12543
12544 int main() {
12545
12546 /* The GNU C library defines this for functions which it implements
12547     to always fail with ENOSYS.  Some functions are actually named
12548     something starting with __ and the normal name is an alias.  */
12549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12550 choke me
12551 #else
12552 $ac_func();
12553 #endif
12554
12555 ; return 0; }
12556 EOF
12557 if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12558   rm -rf conftest*
12559   eval "ac_cv_func_$ac_func=yes"
12560 else
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_func_$ac_func=no"
12565 fi
12566 rm -f conftest*
12567
12568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12569   echo "$ac_t""yes" 1>&6
12570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12571   { test "$extra_verbose" = "yes" && cat << EOF
12572     Defining $ac_tr_func
12573 EOF
12574 cat >> confdefs.h <<EOF
12575 #define $ac_tr_func 1
12576 EOF
12577 }
12578  
12579 else
12580   echo "$ac_t""no" 1>&6
12581 fi
12582 done
12583
12584   else
12585     echo "configure: warning: disabling shared library support" 1>&2
12586     with_modules=no
12587   fi
12588 fi
12589
12590 cat > conftest.$ac_ext <<EOF
12591 #line 12592 "configure"
12592 #include "confdefs.h"
12593 int main(int c,char *v[]){return 0;}
12594 EOF
12595 if { (eval echo configure:12596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12596 then
12597   :
12598 else
12599   conftest_rc="$?"
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -fr conftest*
12603   
12604   echo ""
12605   echo "*** PANIC *** The C compiler can no longer build working executables."
12606   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12607   echo "*** PANIC *** The most likely reason for this problem is that configure"
12608   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12609   echo "*** PANIC *** found at run time."
12610   echo "*** PANIC ***"
12611   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12612   echo "*** PANIC *** On other systems, try telling configure where to find the"
12613   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12614   echo "*** PANIC ***"
12615   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12616   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12617   echo "*** PANIC *** on your system.  Don't do that."
12618   exit 1
12619 fi
12620 rm -fr conftest*
12621
12622 if test "$win32_processes" = "yes"; then
12623   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12624    echo "    xemacs will be linked with \"process-nt.o\""
12625  fi
12626 else
12627   { test "$extra_verbose" = "yes" && cat << \EOF
12628     Defining HAVE_UNIX_PROCESSES
12629 EOF
12630 cat >> confdefs.h <<\EOF
12631 #define HAVE_UNIX_PROCESSES 1
12632 EOF
12633 }
12634
12635   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12636    echo "    xemacs will be linked with \"process-unix.o\""
12637  fi
12638 fi
12639
12640
12641
12642 T=""
12643 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12644 CFLAGS="$T"
12645
12646
12647 T=""
12648 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12649 extra_objs="$T"
12650
12651
12652 T=""
12653 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
12654 c_switch_general="$T"
12655
12656
12657 T=""
12658 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12659 c_switch_window_system="$T"
12660
12661
12662 T=""
12663 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12664 c_switch_all="$T"
12665
12666
12667 T=""
12668 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
12669 ld_switch_general="$T"
12670
12671
12672 T=""
12673 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12674 ld_switch_window_system="$T"
12675
12676
12677 T=""
12678 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12679 ld_switch_all="$T"
12680
12681
12682 T=""
12683 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12684 ld_libs_general="$T"
12685
12686
12687 T=""
12688 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
12689 ld_libs_window_system="$T"
12690
12691
12692 T=""
12693 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12694 ld_libs_all="$T"
12695
12696
12697
12698 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12699 internal_makefile_list="Makefile.in"
12700 SUBDIR_MAKEFILES=''
12701 test -d lock || mkdir lock
12702 for dir in $MAKE_SUBDIR; do
12703   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12704         test -d "$d" || mkdir "$d"; cd "$d"
12705       done ) ;;
12706    * ) test -d "$dir" || mkdir "$dir" ;;
12707   esac
12708   
12709 T=""
12710 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12711 SUBDIR_MAKEFILES="$T"
12712
12713   
12714 T=""
12715 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12716 internal_makefile_list="$T"
12717
12718 done
12719
12720
12721
12722
12723 for dir in src/s src/m; do
12724   if test ! -d "$dir" ; then
12725     echo Making symbolic link to "$srcdir/$dir"
12726     ${LN_S} "$srcdir/$dir" "$dir"
12727   fi
12728 done
12729
12730 if test "$extra_verbose" = "yes"; then
12731   echo ""
12732   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
12733   echo ""
12734 fi
12735
12736 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12737   echo "creating src/gdbinit"; echo ""
12738   echo "source $srcdir/src/gdbinit" > src/gdbinit
12739 fi
12740
12741 if test "$__SUNPRO_C" = "yes"; then
12742   echo "creating .sbinit"; echo ""
12743   ( echo "# For use with Sun WorkShop's Source browser."
12744     echo "# See sbquery(1) and sbinit(4) for more information"
12745     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12746   ) > .sbinit
12747 fi
12748
12749 rm -f core
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769 PREFIX=$prefix
12770 while true; do
12771   case "$PREFIX" in
12772     *\$* ) eval "PREFIX=$PREFIX" ;;
12773     *) break ;;
12774   esac
12775 done
12776
12777
12778
12779
12780 EXEC_PREFIX=$exec_prefix
12781 while true; do
12782   case "$EXEC_PREFIX" in
12783     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12784     *) break ;;
12785   esac
12786 done
12787
12788
12789
12790
12791 INFODIR=$infodir
12792 while true; do
12793   case "$INFODIR" in
12794     *\$* ) eval "INFODIR=$INFODIR" ;;
12795     *) break ;;
12796   esac
12797 done
12798
12799
12800
12801
12802 INFOPATH=$infopath
12803 while true; do
12804   case "$INFOPATH" in
12805     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12806     *) break ;;
12807   esac
12808 done
12809
12810
12811
12812
12813 PACKAGE_PATH=$package_path
12814 while true; do
12815   case "$PACKAGE_PATH" in
12816     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12817     *) break ;;
12818   esac
12819 done
12820
12821
12822
12823
12824 LISPDIR=$lispdir
12825 while true; do
12826   case "$LISPDIR" in
12827     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12828     *) break ;;
12829   esac
12830 done
12831
12832
12833
12834
12835 MODULEDIR=$moduledir
12836 while true; do
12837   case "$MODULEDIR" in
12838     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12839     *) break ;;
12840   esac
12841 done
12842
12843
12844
12845
12846 SITELISPDIR=$sitelispdir
12847 while true; do
12848   case "$SITELISPDIR" in
12849     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12850     *) break ;;
12851   esac
12852 done
12853
12854
12855
12856
12857 SITEMODULEDIR=$sitemoduledir
12858 while true; do
12859   case "$SITEMODULEDIR" in
12860     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12861     *) break ;;
12862   esac
12863 done
12864
12865
12866
12867
12868 ETCDIR=$etcdir
12869 while true; do
12870   case "$ETCDIR" in
12871     *\$* ) eval "ETCDIR=$ETCDIR" ;;
12872     *) break ;;
12873   esac
12874 done
12875
12876
12877
12878
12879 LOCKDIR=$lockdir
12880 while true; do
12881   case "$LOCKDIR" in
12882     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
12883     *) break ;;
12884   esac
12885 done
12886
12887
12888
12889
12890 DOCDIR=$docdir
12891 while true; do
12892   case "$DOCDIR" in
12893     *\$* ) eval "DOCDIR=$DOCDIR" ;;
12894     *) break ;;
12895   esac
12896 done
12897
12898
12899
12900
12901 ARCHLIBDIR=$archlibdir
12902 while true; do
12903   case "$ARCHLIBDIR" in
12904     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
12905     *) break ;;
12906   esac
12907 done
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
12929
12930
12931
12932
12933
12934
12935
12936 : ${XEMACS_CC:=$CC}
12937
12938
12939 if test "$with_prefix" = "yes"; then
12940   { test "$extra_verbose" = "yes" && cat << \EOF
12941     Defining PREFIX_USER_DEFINED
12942 EOF
12943 cat >> confdefs.h <<\EOF
12944 #define PREFIX_USER_DEFINED 1
12945 EOF
12946 }
12947
12948 fi
12949
12950 if test "$with_site_lisp" = "no"; then
12951   { test "$extra_verbose" = "yes" && cat << \EOF
12952     Defining INHIBIT_SITE_LISP
12953 EOF
12954 cat >> confdefs.h <<\EOF
12955 #define INHIBIT_SITE_LISP 1
12956 EOF
12957 }
12958
12959 fi
12960 if test "$with_site_modules" = "no"; then
12961   { test "$extra_verbose" = "yes" && cat << \EOF
12962     Defining INHIBIT_SITE_MODULES
12963 EOF
12964 cat >> confdefs.h <<\EOF
12965 #define INHIBIT_SITE_MODULES 1
12966 EOF
12967 }
12968
12969 fi
12970
12971
12972 T=""
12973 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12974 ac_configure_args="$T"
12975
12976 { test "$extra_verbose" = "yes" && cat << EOF
12977     Defining EMACS_CONFIGURATION = "$canonical"
12978 EOF
12979 cat >> confdefs.h <<EOF
12980 #define EMACS_CONFIGURATION "$canonical"
12981 EOF
12982 }
12983
12984 { test "$extra_verbose" = "yes" && cat << EOF
12985     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
12986 EOF
12987 cat >> confdefs.h <<EOF
12988 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
12989 EOF
12990 }
12991
12992 { test "$extra_verbose" = "yes" && cat << EOF
12993     Defining config_machfile = "$machfile"
12994 EOF
12995 cat >> confdefs.h <<EOF
12996 #define config_machfile "$machfile"
12997 EOF
12998 }
12999
13000 { test "$extra_verbose" = "yes" && cat << EOF
13001     Defining config_opsysfile = "$opsysfile"
13002 EOF
13003 cat >> confdefs.h <<EOF
13004 #define config_opsysfile "$opsysfile"
13005 EOF
13006 }
13007
13008
13009
13010 null_string=""
13011 { test "$extra_verbose" = "yes" && cat << EOF
13012     Defining LD_SWITCH_X_SITE = $null_string
13013 EOF
13014 cat >> confdefs.h <<EOF
13015 #define LD_SWITCH_X_SITE $null_string
13016 EOF
13017 }
13018
13019 { test "$extra_verbose" = "yes" && cat << EOF
13020     Defining LD_SWITCH_X_SITE_AUX = $null_string
13021 EOF
13022 cat >> confdefs.h <<EOF
13023 #define LD_SWITCH_X_SITE_AUX $null_string
13024 EOF
13025 }
13026
13027 { test "$extra_verbose" = "yes" && cat << EOF
13028     Defining C_SWITCH_X_SITE = $null_string
13029 EOF
13030 cat >> confdefs.h <<EOF
13031 #define C_SWITCH_X_SITE $null_string
13032 EOF
13033 }
13034
13035 { test "$extra_verbose" = "yes" && cat << EOF
13036     Defining LD_SWITCH_SITE = $null_string
13037 EOF
13038 cat >> confdefs.h <<EOF
13039 #define LD_SWITCH_SITE $null_string
13040 EOF
13041 }
13042
13043 { test "$extra_verbose" = "yes" && cat << EOF
13044     Defining C_SWITCH_SITE = $null_string
13045 EOF
13046 cat >> confdefs.h <<EOF
13047 #define C_SWITCH_SITE $null_string
13048 EOF
13049 }
13050
13051
13052
13053 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13054     Defining GNU_MALLOC
13055 EOF
13056 cat >> confdefs.h <<\EOF
13057 #define GNU_MALLOC 1
13058 EOF
13059 }
13060
13061 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13062     Defining USE_SYSTEM_MALLOC
13063 EOF
13064 cat >> confdefs.h <<\EOF
13065 #define USE_SYSTEM_MALLOC 1
13066 EOF
13067 }
13068
13069 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13070     Defining USE_DEBUG_MALLOC
13071 EOF
13072 cat >> confdefs.h <<\EOF
13073 #define USE_DEBUG_MALLOC 1
13074 EOF
13075 }
13076
13077                                               { test "$extra_verbose" = "yes" && cat << \EOF
13078     Defining USE_SYSTEM_MALLOC
13079 EOF
13080 cat >> confdefs.h <<\EOF
13081 #define USE_SYSTEM_MALLOC 1
13082 EOF
13083 }
13084
13085 fi
13086 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13087     Defining I18N3
13088 EOF
13089 cat >> confdefs.h <<\EOF
13090 #define I18N3 1
13091 EOF
13092 }
13093
13094 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13095     Defining USE_GCC
13096 EOF
13097 cat >> confdefs.h <<\EOF
13098 #define USE_GCC 1
13099 EOF
13100 }
13101
13102 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13103     Defining EXTERNAL_WIDGET
13104 EOF
13105 cat >> confdefs.h <<\EOF
13106 #define EXTERNAL_WIDGET 1
13107 EOF
13108 }
13109
13110 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13111     Defining NO_DOC_FILE
13112 EOF
13113 cat >> confdefs.h <<\EOF
13114 #define NO_DOC_FILE 1
13115 EOF
13116 }
13117
13118 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13119     Defining PURIFY
13120 EOF
13121 cat >> confdefs.h <<\EOF
13122 #define PURIFY 1
13123 EOF
13124 }
13125
13126 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13127     Defining QUANTIFY
13128 EOF
13129 cat >> confdefs.h <<\EOF
13130 #define QUANTIFY 1
13131 EOF
13132 }
13133
13134 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13135     Defining MAIL_USE_POP
13136 EOF
13137 cat >> confdefs.h <<\EOF
13138 #define MAIL_USE_POP 1
13139 EOF
13140 }
13141
13142 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13143     Defining KERBEROS
13144 EOF
13145 cat >> confdefs.h <<\EOF
13146 #define KERBEROS 1
13147 EOF
13148 }
13149
13150 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13151     Defining HESIOD
13152 EOF
13153 cat >> confdefs.h <<\EOF
13154 #define HESIOD 1
13155 EOF
13156 }
13157
13158 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13159     Defining USE_UNION_TYPE
13160 EOF
13161 cat >> confdefs.h <<\EOF
13162 #define USE_UNION_TYPE 1
13163 EOF
13164 }
13165
13166
13167
13168 (
13169 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13170 else
13171   echo "uname -a: `uname -a`"
13172 fi
13173 echo ""
13174 echo "$0 $quoted_arguments"
13175 ) > Installation
13176
13177 if test ! -z ${emacs_beta_version} ; then
13178   if test -z "${emacs_is_beta}" ; then
13179         xemacs_betaname=".${emacs_beta_version}"
13180   else
13181         xemacs_betaname="-b${emacs_beta_version}"
13182   fi
13183 else
13184   xemacs_betaname=""    
13185 fi
13186
13187 (
13188 echo "
13189
13190 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13191
13192   Where should the build process find the source code?    $srcdir
13193   What installation prefix should install use?            $prefix
13194   What operating system and machine description files should XEmacs use?
13195         \`$opsysfile' and \`$machfile'
13196   What compiler should XEmacs be built with?              $CC $CFLAGS
13197   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13198   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13199   What window system should XEmacs use?                   ${window_system}"
13200 if test "$with_x11" = "yes"; then
13201   echo "  Where do we find X Windows header files?                $x_includes"
13202   echo "  Where do we find X Windows libraries?                   $x_libraries"
13203 fi
13204 if test -n "$site_includes"; then
13205   echo "  Additional header files:                                $site_includes"
13206 fi
13207 if test -n "$site_libraries"; then
13208   echo "  Additional libraries:                                   $site_libraries"
13209 fi
13210 if test -n "$site_prefixes"; then
13211   echo "  Additional prefixes:                                    $site_prefixes"
13212 fi
13213 if test -n "$runpath"; then
13214   echo "  Runtime library search path:                            $runpath"
13215 fi
13216 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13217 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13218 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13219 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13220   echo "  No Xmu; substituting equivalent routines."
13221 fi
13222
13223 if test "$with_xpm" = yes; then
13224   echo "  Compiling in support for XPM images."
13225 elif test "$with_x11" = yes; then
13226   echo "  --------------------------------------------------------------------"
13227   echo "  WARNING: Compiling without XPM support."
13228   if test "$xpm_problem" != ""; then
13229     echo "  Reason: $xpm_problem"
13230   fi
13231   echo "  WARNING: You should strongly consider installing XPM."
13232   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13233   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13234   echo "  --------------------------------------------------------------------"
13235 fi
13236 if test "$with_png" = yes; then
13237   echo "  Compiling in support for PNG image handling."
13238 elif test "$window_system" != "none"; then
13239   echo "  --------------------------------------------------------------------"
13240   echo "  WARNING: Compiling without PNG image support."
13241   if test "$png_problem" != ""; then
13242     echo "  Reason: $png_problem"
13243   fi
13244   echo "  WARNING: You should strongly consider installing the PNG libraries."
13245   echo "  WARNING: Otherwise certain images and glyphs may not display."
13246   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13247   echo "  --------------------------------------------------------------------"
13248 fi
13249 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13250 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13251 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13252 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13253 case "$with_sound" in
13254   nas    ) echo "  Compiling in network sound (NAS) support." ;;
13255   native ) echo "  Compiling in native sound support." ;;
13256   both   ) echo "  Compiling in both network and native sound support." ;;
13257 esac
13258 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13259
13260 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13261 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13262 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
13263
13264 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13265
13266 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13267 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13268
13269 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13270 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
13271 test "$with_text_coding"     = yes && echo "  Compiling in Text coding support."
13272 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13273 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13274 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13275 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13276 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13277 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13278 if test "$with_wnn" = yes; then
13279   echo "  Compiling in support for the WNN input method on Mule."
13280   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13281 fi
13282 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13283
13284 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13285 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13286 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13287 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13288 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13289 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13290 case "$with_menubars" in
13291   lucid ) echo "  Using Lucid menubars." ;;
13292   motif ) echo "  Using Motif menubars."
13293           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13294           echo "             We recommend using the Lucid menubar instead."
13295           echo "             Re-run configure with --with-menubars='lucid'." ;;
13296 esac
13297 case "$with_scrollbars" in
13298   lucid    ) echo "  Using Lucid scrollbars."     ;;
13299   motif    ) echo "  Using Motif scrollbars."     ;;
13300   athena   ) echo "  Using Athena scrollbars."    ;;
13301   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13302 esac
13303 case "$with_widgets" in
13304   motif    ) echo "  Using Motif native widgets."     ;;
13305 esac
13306 case "$with_dialogs" in
13307   motif    )
13308     echo "  Using Motif dialog boxes."
13309     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13310       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13311       echo "             We recommend using the Athena dialog boxes instead."
13312       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13313       echo "             Read the PROBLEMS file for more information."
13314     fi; fi
13315     ;;
13316   athena   ) echo "  Using Athena dialog boxes."    ;;
13317   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13318 esac
13319 test "$with_modules" = "yes" && echo "  Compiling in DSO module support."
13320 test "$with_clash_detection" = yes && \
13321   echo "  Clash detection will use \"$lockdir\" for locking files."
13322 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13323 test "$with_pop"        = yes && echo "  Using POP for mail access."
13324 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13325 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13326 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13327 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
13328 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
13329 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13330   != "no no no no no"; then
13331   echo "  WARNING: ---------------------------------------------------------"
13332   echo "  WARNING: Compiling in support for runtime error checking."
13333   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13334   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13335   echo "  WARNING: ---------------------------------------------------------"
13336 fi
13337 echo ""
13338 ) | tee -a Installation
13339 echo ""
13340
13341
13342 # Remove any trailing slashes in these variables.
13343 test -n "$prefix" &&
13344   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13345 test -n "$exec_prefix" &&
13346   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13347
13348
13349 for file in $internal_makefile_list; do
13350   test "$file" = src/Makefile.in && \
13351     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13352   ac_output_files="${ac_output_files+$ac_output_files }$file"
13353 done
13354 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13355 if test "$with_modules" = "yes"; then
13356   ac_output_files="$ac_output_files lib-src/ellcc.h"
13357 fi
13358
13359 trap '' 1 2 15
13360
13361 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13362
13363 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13364 # Let make expand exec_prefix.
13365 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13366
13367 # Any assignment to VPATH causes Sun make to only execute
13368 # the first set of double-colon rules, so remove it if not needed.
13369 # If there is a colon in the path, we need to keep it.
13370 if test "x$srcdir" = x.; then
13371   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13372 fi
13373
13374 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13375
13376 DEFS=-DHAVE_CONFIG_H
13377
13378 # Without the "./", some shells look in PATH for config.status.
13379 : ${CONFIG_STATUS=./config.status}
13380
13381 echo creating $CONFIG_STATUS
13382 rm -f $CONFIG_STATUS
13383 cat > $CONFIG_STATUS <<EOF
13384 #! /bin/sh
13385 # Generated automatically by configure.
13386 # Run this file to recreate the current configuration.
13387 # This directory was configured as follows,
13388 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13389 #
13390 # $0 $ac_configure_args
13391 #
13392 # Compiler output produced by configure, useful for debugging
13393 # configure, is in ./config.log if it exists.
13394
13395 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13396 for ac_option
13397 do
13398   case "\$ac_option" in
13399   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13400     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13401     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13402   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13403     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13404     exit 0 ;;
13405   -help | --help | --hel | --he | --h)
13406     echo "\$ac_cs_usage"; exit 0 ;;
13407   *) echo "\$ac_cs_usage"; exit 1 ;;
13408   esac
13409 done
13410
13411 ac_given_srcdir=$srcdir
13412 ac_given_INSTALL="$INSTALL"
13413
13414 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13415 EOF
13416 cat >> $CONFIG_STATUS <<EOF
13417
13418 # Protect against being on the right side of a sed subst in config.status.
13419 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13420  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13421 $ac_vpsub
13422 $extrasub
13423 s%@SHELL@%$SHELL%g
13424 s%@CFLAGS@%$CFLAGS%g
13425 s%@CPPFLAGS@%$CPPFLAGS%g
13426 s%@CXXFLAGS@%$CXXFLAGS%g
13427 s%@FFLAGS@%$FFLAGS%g
13428 s%@DEFS@%$DEFS%g
13429 s%@LDFLAGS@%$LDFLAGS%g
13430 s%@LIBS@%$LIBS%g
13431 s%@exec_prefix@%$exec_prefix%g
13432 s%@prefix@%$prefix%g
13433 s%@program_transform_name@%$program_transform_name%g
13434 s%@bindir@%$bindir%g
13435 s%@sbindir@%$sbindir%g
13436 s%@libexecdir@%$libexecdir%g
13437 s%@datadir@%$datadir%g
13438 s%@sysconfdir@%$sysconfdir%g
13439 s%@sharedstatedir@%$sharedstatedir%g
13440 s%@localstatedir@%$localstatedir%g
13441 s%@libdir@%$libdir%g
13442 s%@includedir@%$includedir%g
13443 s%@oldincludedir@%$oldincludedir%g
13444 s%@infodir@%$infodir%g
13445 s%@mandir@%$mandir%g
13446 s%@LN_S@%$LN_S%g
13447 s%@blddir@%$blddir%g
13448 s%@CC@%$CC%g
13449 s%@CPP@%$CPP%g
13450 s%@start_flags@%$start_flags%g
13451 s%@ld_switch_shared@%$ld_switch_shared%g
13452 s%@start_files@%$start_files%g
13453 s%@ld@%$ld%g
13454 s%@lib_gcc@%$lib_gcc%g
13455 s%@RANLIB@%$RANLIB%g
13456 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13457 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13458 s%@INSTALL_DATA@%$INSTALL_DATA%g
13459 s%@YACC@%$YACC%g
13460 s%@SET_MAKE@%$SET_MAKE%g
13461 s%@X_CFLAGS@%$X_CFLAGS%g
13462 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13463 s%@X_LIBS@%$X_LIBS%g
13464 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13465 s%@install_pp@%$install_pp%g
13466 s%@libs_xauth@%$libs_xauth%g
13467 s%@dnd_objs@%$dnd_objs%g
13468 s%@lwlib_objs@%$lwlib_objs%g
13469 s%@ALLOCA@%$ALLOCA%g
13470 s%@dll_ld@%$dll_ld%g
13471 s%@dll_cflags@%$dll_cflags%g
13472 s%@dll_ldflags@%$dll_ldflags%g
13473 s%@dll_post@%$dll_post%g
13474 s%@dll_ldo@%$dll_ldo%g
13475 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13476 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13477 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13478 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13479 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13480 s%@PROGNAME@%$PROGNAME%g
13481 s%@version@%$version%g
13482 s%@configuration@%$configuration%g
13483 s%@canonical@%$canonical%g
13484 s%@inststaticdir@%$inststaticdir%g
13485 s%@instvardir@%$instvardir%g
13486 s%@srcdir@%$srcdir%g
13487 s%@pkgdir@%$pkgdir%g
13488 s%@statedir@%$statedir%g
13489 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13490 s%@PREFIX@%$PREFIX%g
13491 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13492 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13493 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13494 s%@INFODIR@%$INFODIR%g
13495 s%@infopath@%$infopath%g
13496 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13497 s%@INFOPATH@%$INFOPATH%g
13498 s%@package_path@%$package_path%g
13499 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13500 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13501 s%@lispdir@%$lispdir%g
13502 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13503 s%@LISPDIR@%$LISPDIR%g
13504 s%@moduledir@%$moduledir%g
13505 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13506 s%@MODULEDIR@%$MODULEDIR%g
13507 s%@sitelispdir@%$sitelispdir%g
13508 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13509 s%@SITELISPDIR@%$SITELISPDIR%g
13510 s%@sitemoduledir@%$sitemoduledir%g
13511 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13512 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13513 s%@etcdir@%$etcdir%g
13514 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13515 s%@ETCDIR@%$ETCDIR%g
13516 s%@lockdir@%$lockdir%g
13517 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13518 s%@LOCKDIR@%$LOCKDIR%g
13519 s%@docdir@%$docdir%g
13520 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13521 s%@DOCDIR@%$DOCDIR%g
13522 s%@archlibdir@%$archlibdir%g
13523 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13524 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13525 s%@bitmapdir@%$bitmapdir%g
13526 s%@extra_objs@%$extra_objs%g
13527 s%@machfile@%$machfile%g
13528 s%@opsysfile@%$opsysfile%g
13529 s%@c_switch_general@%$c_switch_general%g
13530 s%@c_switch_window_system@%$c_switch_window_system%g
13531 s%@c_switch_all@%$c_switch_all%g
13532 s%@ld_switch_general@%$ld_switch_general%g
13533 s%@ld_switch_window_system@%$ld_switch_window_system%g
13534 s%@ld_switch_all@%$ld_switch_all%g
13535 s%@ld_libs_general@%$ld_libs_general%g
13536 s%@ld_libs_window_system@%$ld_libs_window_system%g
13537 s%@ld_libs_all@%$ld_libs_all%g
13538 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13539 s%@native_sound_lib@%$native_sound_lib%g
13540 s%@sound_cflags@%$sound_cflags%g
13541 s%@dynodump_arch@%$dynodump_arch%g
13542 s%@XEMACS_CC@%$XEMACS_CC%g
13543 s%@internal_makefile_list@%$internal_makefile_list%g
13544
13545 CEOF
13546 EOF
13547
13548 cat >> $CONFIG_STATUS <<\EOF
13549
13550 # Split the substitutions into bite-sized pieces for seds with
13551 # small command number limits, like on Digital OSF/1 and HP-UX.
13552 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13553 ac_file=1 # Number of current file.
13554 ac_beg=1 # First line for current file.
13555 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13556 ac_more_lines=:
13557 ac_sed_cmds=""
13558 while $ac_more_lines; do
13559   if test $ac_beg -gt 1; then
13560     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13561   else
13562     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13563   fi
13564   if test ! -s conftest.s$ac_file; then
13565     ac_more_lines=false
13566     rm -f conftest.s$ac_file
13567   else
13568     if test -z "$ac_sed_cmds"; then
13569       ac_sed_cmds="sed -f conftest.s$ac_file"
13570     else
13571       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13572     fi
13573     ac_file=`expr $ac_file + 1`
13574     ac_beg=$ac_end
13575     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13576   fi
13577 done
13578 if test -z "$ac_sed_cmds"; then
13579   ac_sed_cmds=cat
13580 fi
13581 EOF
13582
13583 cat >> $CONFIG_STATUS <<EOF
13584
13585 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13586 EOF
13587 cat >> $CONFIG_STATUS <<\EOF
13588 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13589   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13590   case "$ac_file" in
13591   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13592        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13593   *) ac_file_in="${ac_file}.in" ;;
13594   esac
13595
13596   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13597
13598   # Remove last slash and all that follows it.  Not all systems have dirname.
13599   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13600   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13601     # The file is in a subdirectory.
13602     test ! -d "$ac_dir" && mkdir "$ac_dir"
13603     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13604     # A "../" for each directory in $ac_dir_suffix.
13605     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13606   else
13607     ac_dir_suffix= ac_dots=
13608   fi
13609
13610   case "$ac_given_srcdir" in
13611   .)  srcdir=.
13612       if test -z "$ac_dots"; then top_srcdir=.
13613       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13614   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13615   *) # Relative path.
13616     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13617     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13618   esac
13619
13620   case "$ac_given_INSTALL" in
13621   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13622   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13623   esac
13624
13625   echo creating "$ac_file"
13626   rm -f "$ac_file"
13627   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13628   case "$ac_file" in
13629   *Makefile*) ac_comsub="1i\\
13630 # $configure_input" ;;
13631   *) ac_comsub= ;;
13632   esac
13633
13634   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13635   sed -e "$ac_comsub
13636 s%@configure_input@%$configure_input%g
13637 s%@srcdir@%$srcdir%g
13638 s%@top_srcdir@%$top_srcdir%g
13639 s%@INSTALL@%$INSTALL%g
13640 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13641 fi; done
13642 rm -f conftest.s*
13643
13644 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13645 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13646 #
13647 # ac_d sets the value in "#define NAME VALUE" lines.
13648 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13649 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13650 ac_dC='\3'
13651 ac_dD='%g'
13652 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13653 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13654 ac_uB='\([      ]\)%\1#\2define\3'
13655 ac_uC=' '
13656 ac_uD='\4%g'
13657 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13658 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13659 ac_eB='$%\1#\2define\3'
13660 ac_eC=' '
13661 ac_eD='%g'
13662
13663 if test "${CONFIG_HEADERS+set}" != set; then
13664 EOF
13665 cat >> $CONFIG_STATUS <<EOF
13666   CONFIG_HEADERS="src/config.h lwlib/config.h"
13667 EOF
13668 cat >> $CONFIG_STATUS <<\EOF
13669 fi
13670 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13671   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13672   case "$ac_file" in
13673   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13674        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13675   *) ac_file_in="${ac_file}.in" ;;
13676   esac
13677
13678   echo creating $ac_file
13679
13680   rm -f conftest.frag conftest.in conftest.out
13681   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13682   cat $ac_file_inputs > conftest.in
13683
13684 EOF
13685
13686 # Transform confdefs.h into a sed script conftest.vals that substitutes
13687 # the proper values into config.h.in to produce config.h.  And first:
13688 # Protect against being on the right side of a sed subst in config.status.
13689 # Protect against being in an unquoted here document in config.status.
13690 rm -f conftest.vals
13691 cat > conftest.hdr <<\EOF
13692 s/[\\&%]/\\&/g
13693 s%[\\$`]%\\&%g
13694 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13695 s%ac_d%ac_u%gp
13696 s%ac_u%ac_e%gp
13697 EOF
13698 sed -n -f conftest.hdr confdefs.h > conftest.vals
13699 rm -f conftest.hdr
13700
13701 # This sed command replaces #undef with comments.  This is necessary, for
13702 # example, in the case of _POSIX_SOURCE, which is predefined and required
13703 # on some systems where configure will not decide to define it.
13704 cat >> conftest.vals <<\EOF
13705 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13706 EOF
13707
13708 # Break up conftest.vals because some shells have a limit on
13709 # the size of here documents, and old seds have small limits too.
13710
13711 rm -f conftest.tail
13712 while :
13713 do
13714   ac_lines=`grep -c . conftest.vals`
13715   # grep -c gives empty output for an empty file on some AIX systems.
13716   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13717   # Write a limited-size here document to conftest.frag.
13718   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13719   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13720   echo 'CEOF
13721   sed -f conftest.frag conftest.in > conftest.out
13722   rm -f conftest.in
13723   mv conftest.out conftest.in
13724 ' >> $CONFIG_STATUS
13725   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13726   rm -f conftest.vals
13727   mv conftest.tail conftest.vals
13728 done
13729 rm -f conftest.vals
13730
13731 cat >> $CONFIG_STATUS <<\EOF
13732   rm -f conftest.frag conftest.h
13733   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13734   cat conftest.in >> conftest.h
13735   rm -f conftest.in
13736   if cmp -s $ac_file conftest.h 2>/dev/null; then
13737     echo "$ac_file is unchanged"
13738     rm -f conftest.h
13739   else
13740     # Remove last slash and all that follows it.  Not all systems have dirname.
13741       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13742       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13743       # The file is in a subdirectory.
13744       test ! -d "$ac_dir" && mkdir "$ac_dir"
13745     fi
13746     rm -f $ac_file
13747     mv conftest.h $ac_file
13748   fi
13749 fi; done
13750
13751 EOF
13752 cat >> $CONFIG_STATUS <<EOF
13753 CPP="$CPP"
13754  top_srcdir="$srcdir"
13755  MAKE_SUBDIR="$MAKE_SUBDIR"
13756
13757 EOF
13758 cat >> $CONFIG_STATUS <<\EOF
13759 for dir in . $MAKE_SUBDIR; do
13760   (
13761     cd $dir
13762     rm -f junk.c
13763     < Makefile.in \
13764       sed -e '/^# Generated/d' \
13765           -e 's%/\*\*/#.*%%' \
13766           -e 's/^ *# */#/' \
13767           -e '/^##/d' \
13768           -e '/^#/ {
13769 p
13770 d
13771 }'        \
13772           -e '/./ {
13773 s/\([\"]\)/\\\1/g
13774 s/^/"/
13775 s/$/"/
13776 }'  > junk.c;
13777
13778
13779
13780     echo creating $dir/Makefile
13781 $CPP -I. -I${top_srcdir}/src  junk.c \
13782   | sed -e 's/^\#.*//'          \
13783         -e 's/^[        ][      ]*$//'\
13784         -e 's/^ /       /'              \
13785   | sed -n -e '/^..*$/p'        \
13786   | sed '/^\"/ {
13787         s/\\\([\"]\)/\1/g
13788         s/^[    ]*\"//
13789         s/\"[   ]*$//
13790 }' > Makefile.new
13791     chmod 444 Makefile.new
13792     mv -f Makefile.new Makefile
13793
13794     echo creating $dir/GNUmakefile
13795 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13796   | sed -e 's/^\#.*//'          \
13797         -e 's/^[        ][      ]*$//'\
13798         -e 's/^ /       /'              \
13799   | sed -n -e '/^..*$/p'        \
13800   | sed '/^\"/ {
13801         s/\\\([\"]\)/\1/g
13802         s/^[    ]*\"//
13803         s/\"[   ]*$//
13804 }' > Makefile.new
13805     chmod 444 Makefile.new
13806     mv -f Makefile.new GNUmakefile
13807
13808     rm -f junk.c
13809   )
13810 done
13811
13812 sed < config.status >> lib-src/config.values \
13813   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13814   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13815   -e 's/^\([^ ]*\) $/\1 ""/' \
13816   -e 's/ 1$/ t/'
13817
13818
13819 exit 0
13820 EOF
13821 chmod +x $CONFIG_STATUS
13822 rm -fr confdefs* $ac_clean_files
13823 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1